]> granicus.if.org Git - postgresql/blob - configure
Support platforms where strtoll/strtoull are spelled __strtoll/__strtoull.
[postgresql] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for PostgreSQL 11devel.
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='11devel'
586 PACKAGE_STRING='PostgreSQL 11devel'
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 11devel 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 11devel:";;
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 11devel
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 11devel, which was
2409 generated by GNU Autoconf 2.69.  Invocation command line was
2410
2411   $ $0 $@
2412
2413 _ACEOF
2414 exec 5>>config.log
2415 {
2416 cat <<_ASUNAME
2417 ## --------- ##
2418 ## Platform. ##
2419 ## --------- ##
2420
2421 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2422 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2423 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2424 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2425 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2426
2427 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2428 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2429
2430 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2431 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2432 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2433 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2434 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2435 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2436 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2437
2438 _ASUNAME
2439
2440 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2441 for as_dir in $PATH
2442 do
2443   IFS=$as_save_IFS
2444   test -z "$as_dir" && as_dir=.
2445     $as_echo "PATH: $as_dir"
2446   done
2447 IFS=$as_save_IFS
2448
2449 } >&5
2450
2451 cat >&5 <<_ACEOF
2452
2453
2454 ## ----------- ##
2455 ## Core tests. ##
2456 ## ----------- ##
2457
2458 _ACEOF
2459
2460
2461 # Keep a trace of the command line.
2462 # Strip out --no-create and --no-recursion so they do not pile up.
2463 # Strip out --silent because we don't want to record it for future runs.
2464 # Also quote any args containing shell meta-characters.
2465 # Make two passes to allow for proper duplicate-argument suppression.
2466 ac_configure_args=
2467 ac_configure_args0=
2468 ac_configure_args1=
2469 ac_must_keep_next=false
2470 for ac_pass in 1 2
2471 do
2472   for ac_arg
2473   do
2474     case $ac_arg in
2475     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2476     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2477     | -silent | --silent | --silen | --sile | --sil)
2478       continue ;;
2479     *\'*)
2480       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2481     esac
2482     case $ac_pass in
2483     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2484     2)
2485       as_fn_append ac_configure_args1 " '$ac_arg'"
2486       if test $ac_must_keep_next = true; then
2487         ac_must_keep_next=false # Got value, back to normal.
2488       else
2489         case $ac_arg in
2490           *=* | --config-cache | -C | -disable-* | --disable-* \
2491           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2492           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2493           | -with-* | --with-* | -without-* | --without-* | --x)
2494             case "$ac_configure_args0 " in
2495               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2496             esac
2497             ;;
2498           -* ) ac_must_keep_next=true ;;
2499         esac
2500       fi
2501       as_fn_append ac_configure_args " '$ac_arg'"
2502       ;;
2503     esac
2504   done
2505 done
2506 { ac_configure_args0=; unset ac_configure_args0;}
2507 { ac_configure_args1=; unset ac_configure_args1;}
2508
2509 # When interrupted or exit'd, cleanup temporary files, and complete
2510 # config.log.  We remove comments because anyway the quotes in there
2511 # would cause problems or look ugly.
2512 # WARNING: Use '\'' to represent an apostrophe within the trap.
2513 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2514 trap 'exit_status=$?
2515   # Save into config.log some information that might help in debugging.
2516   {
2517     echo
2518
2519     $as_echo "## ---------------- ##
2520 ## Cache variables. ##
2521 ## ---------------- ##"
2522     echo
2523     # The following way of writing the cache mishandles newlines in values,
2524 (
2525   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2526     eval ac_val=\$$ac_var
2527     case $ac_val in #(
2528     *${as_nl}*)
2529       case $ac_var in #(
2530       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2531 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2532       esac
2533       case $ac_var in #(
2534       _ | IFS | as_nl) ;; #(
2535       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2536       *) { eval $ac_var=; unset $ac_var;} ;;
2537       esac ;;
2538     esac
2539   done
2540   (set) 2>&1 |
2541     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2542     *${as_nl}ac_space=\ *)
2543       sed -n \
2544         "s/'\''/'\''\\\\'\'''\''/g;
2545           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2546       ;; #(
2547     *)
2548       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2549       ;;
2550     esac |
2551     sort
2552 )
2553     echo
2554
2555     $as_echo "## ----------------- ##
2556 ## Output variables. ##
2557 ## ----------------- ##"
2558     echo
2559     for ac_var in $ac_subst_vars
2560     do
2561       eval ac_val=\$$ac_var
2562       case $ac_val in
2563       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2564       esac
2565       $as_echo "$ac_var='\''$ac_val'\''"
2566     done | sort
2567     echo
2568
2569     if test -n "$ac_subst_files"; then
2570       $as_echo "## ------------------- ##
2571 ## File substitutions. ##
2572 ## ------------------- ##"
2573       echo
2574       for ac_var in $ac_subst_files
2575       do
2576         eval ac_val=\$$ac_var
2577         case $ac_val in
2578         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2579         esac
2580         $as_echo "$ac_var='\''$ac_val'\''"
2581       done | sort
2582       echo
2583     fi
2584
2585     if test -s confdefs.h; then
2586       $as_echo "## ----------- ##
2587 ## confdefs.h. ##
2588 ## ----------- ##"
2589       echo
2590       cat confdefs.h
2591       echo
2592     fi
2593     test "$ac_signal" != 0 &&
2594       $as_echo "$as_me: caught signal $ac_signal"
2595     $as_echo "$as_me: exit $exit_status"
2596   } >&5
2597   rm -f core *.core core.conftest.* &&
2598     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2599     exit $exit_status
2600 ' 0
2601 for ac_signal in 1 2 13 15; do
2602   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2603 done
2604 ac_signal=0
2605
2606 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2607 rm -f -r conftest* confdefs.h
2608
2609 $as_echo "/* confdefs.h */" > confdefs.h
2610
2611 # Predefined preprocessor variables.
2612
2613 cat >>confdefs.h <<_ACEOF
2614 #define PACKAGE_NAME "$PACKAGE_NAME"
2615 _ACEOF
2616
2617 cat >>confdefs.h <<_ACEOF
2618 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2619 _ACEOF
2620
2621 cat >>confdefs.h <<_ACEOF
2622 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2623 _ACEOF
2624
2625 cat >>confdefs.h <<_ACEOF
2626 #define PACKAGE_STRING "$PACKAGE_STRING"
2627 _ACEOF
2628
2629 cat >>confdefs.h <<_ACEOF
2630 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2631 _ACEOF
2632
2633 cat >>confdefs.h <<_ACEOF
2634 #define PACKAGE_URL "$PACKAGE_URL"
2635 _ACEOF
2636
2637
2638 # Let the site file select an alternate cache file if it wants to.
2639 # Prefer an explicitly selected file to automatically selected ones.
2640 ac_site_file1=NONE
2641 ac_site_file2=NONE
2642 if test -n "$CONFIG_SITE"; then
2643   # We do not want a PATH search for config.site.
2644   case $CONFIG_SITE in #((
2645     -*)  ac_site_file1=./$CONFIG_SITE;;
2646     */*) ac_site_file1=$CONFIG_SITE;;
2647     *)   ac_site_file1=./$CONFIG_SITE;;
2648   esac
2649 elif test "x$prefix" != xNONE; then
2650   ac_site_file1=$prefix/share/config.site
2651   ac_site_file2=$prefix/etc/config.site
2652 else
2653   ac_site_file1=$ac_default_prefix/share/config.site
2654   ac_site_file2=$ac_default_prefix/etc/config.site
2655 fi
2656 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2657 do
2658   test "x$ac_site_file" = xNONE && continue
2659   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2660     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2661 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2662     sed 's/^/| /' "$ac_site_file" >&5
2663     . "$ac_site_file" \
2664       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2665 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2666 as_fn_error $? "failed to load site script $ac_site_file
2667 See \`config.log' for more details" "$LINENO" 5; }
2668   fi
2669 done
2670
2671 if test -r "$cache_file"; then
2672   # Some versions of bash will fail to source /dev/null (special files
2673   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2674   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2675     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2676 $as_echo "$as_me: loading cache $cache_file" >&6;}
2677     case $cache_file in
2678       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2679       *)                      . "./$cache_file";;
2680     esac
2681   fi
2682 else
2683   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2684 $as_echo "$as_me: creating cache $cache_file" >&6;}
2685   >$cache_file
2686 fi
2687
2688 # Check that the precious variables saved in the cache have kept the same
2689 # value.
2690 ac_cache_corrupted=false
2691 for ac_var in $ac_precious_vars; do
2692   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2693   eval ac_new_set=\$ac_env_${ac_var}_set
2694   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2695   eval ac_new_val=\$ac_env_${ac_var}_value
2696   case $ac_old_set,$ac_new_set in
2697     set,)
2698       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2699 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2700       ac_cache_corrupted=: ;;
2701     ,set)
2702       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2703 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2704       ac_cache_corrupted=: ;;
2705     ,);;
2706     *)
2707       if test "x$ac_old_val" != "x$ac_new_val"; then
2708         # differences in whitespace do not lead to failure.
2709         ac_old_val_w=`echo x $ac_old_val`
2710         ac_new_val_w=`echo x $ac_new_val`
2711         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2712           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2713 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2714           ac_cache_corrupted=:
2715         else
2716           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2717 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2718           eval $ac_var=\$ac_old_val
2719         fi
2720         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2721 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2722         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2723 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2724       fi;;
2725   esac
2726   # Pass precious variables to config.status.
2727   if test "$ac_new_set" = set; then
2728     case $ac_new_val in
2729     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2730     *) ac_arg=$ac_var=$ac_new_val ;;
2731     esac
2732     case " $ac_configure_args " in
2733       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2734       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2735     esac
2736   fi
2737 done
2738 if $ac_cache_corrupted; then
2739   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2740 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2741   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2742 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2743   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2744 fi
2745 ## -------------------- ##
2746 ## Main body of script. ##
2747 ## -------------------- ##
2748
2749 ac_ext=c
2750 ac_cpp='$CPP $CPPFLAGS'
2751 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2752 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2753 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2754
2755
2756
2757
2758
2759
2760 ac_aux_dir=
2761 for ac_dir in config "$srcdir"/config; do
2762   if test -f "$ac_dir/install-sh"; then
2763     ac_aux_dir=$ac_dir
2764     ac_install_sh="$ac_aux_dir/install-sh -c"
2765     break
2766   elif test -f "$ac_dir/install.sh"; then
2767     ac_aux_dir=$ac_dir
2768     ac_install_sh="$ac_aux_dir/install.sh -c"
2769     break
2770   elif test -f "$ac_dir/shtool"; then
2771     ac_aux_dir=$ac_dir
2772     ac_install_sh="$ac_aux_dir/shtool install -c"
2773     break
2774   fi
2775 done
2776 if test -z "$ac_aux_dir"; then
2777   as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2778 fi
2779
2780 # These three variables are undocumented and unsupported,
2781 # and are intended to be withdrawn in a future Autoconf release.
2782 # They can cause serious problems if a builder's source tree is in a directory
2783 # whose full name contains unusual characters.
2784 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2785 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2786 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2787
2788
2789
2790 configure_args=$ac_configure_args
2791
2792
2793 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`
2794
2795
2796 cat >>confdefs.h <<_ACEOF
2797 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2798 _ACEOF
2799
2800
2801
2802
2803
2804 # Check whether --with-extra-version was given.
2805 if test "${with_extra_version+set}" = set; then :
2806   withval=$with_extra_version;
2807   case $withval in
2808     yes)
2809       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2810       ;;
2811     no)
2812       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2813       ;;
2814     *)
2815       PG_VERSION="$PACKAGE_VERSION$withval"
2816       ;;
2817   esac
2818
2819 else
2820   PG_VERSION="$PACKAGE_VERSION"
2821 fi
2822
2823
2824
2825 cat >>confdefs.h <<_ACEOF
2826 #define PG_VERSION "$PG_VERSION"
2827 _ACEOF
2828
2829
2830 # Make sure we can run config.sub.
2831 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2832   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2833
2834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2835 $as_echo_n "checking build system type... " >&6; }
2836 if ${ac_cv_build+:} false; then :
2837   $as_echo_n "(cached) " >&6
2838 else
2839   ac_build_alias=$build_alias
2840 test "x$ac_build_alias" = x &&
2841   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2842 test "x$ac_build_alias" = x &&
2843   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2844 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2845   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2846
2847 fi
2848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2849 $as_echo "$ac_cv_build" >&6; }
2850 case $ac_cv_build in
2851 *-*-*) ;;
2852 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2853 esac
2854 build=$ac_cv_build
2855 ac_save_IFS=$IFS; IFS='-'
2856 set x $ac_cv_build
2857 shift
2858 build_cpu=$1
2859 build_vendor=$2
2860 shift; shift
2861 # Remember, the first character of IFS is used to create $*,
2862 # except with old shells:
2863 build_os=$*
2864 IFS=$ac_save_IFS
2865 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2866
2867
2868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2869 $as_echo_n "checking host system type... " >&6; }
2870 if ${ac_cv_host+:} false; then :
2871   $as_echo_n "(cached) " >&6
2872 else
2873   if test "x$host_alias" = x; then
2874   ac_cv_host=$ac_cv_build
2875 else
2876   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2877     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2878 fi
2879
2880 fi
2881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2882 $as_echo "$ac_cv_host" >&6; }
2883 case $ac_cv_host in
2884 *-*-*) ;;
2885 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2886 esac
2887 host=$ac_cv_host
2888 ac_save_IFS=$IFS; IFS='-'
2889 set x $ac_cv_host
2890 shift
2891 host_cpu=$1
2892 host_vendor=$2
2893 shift; shift
2894 # Remember, the first character of IFS is used to create $*,
2895 # except with old shells:
2896 host_os=$*
2897 IFS=$ac_save_IFS
2898 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2899
2900
2901
2902 template=
2903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2904 $as_echo_n "checking which template to use... " >&6; }
2905
2906
2907
2908
2909 # Check whether --with-template was given.
2910 if test "${with_template+set}" = set; then :
2911   withval=$with_template;
2912   case $withval in
2913     yes)
2914       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2915       ;;
2916     no)
2917       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2918       ;;
2919     *)
2920
2921   case $withval in
2922     list)   echo; ls "$srcdir/src/template"; exit;;
2923     *)      if test -f "$srcdir/src/template/$with_template" ; then
2924               template=$withval
2925             else
2926               as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2927             fi;;
2928   esac
2929
2930       ;;
2931   esac
2932
2933 else
2934
2935 # --with-template not given
2936
2937 case $host_os in
2938      aix*) template=aix ;;
2939   cygwin*) template=cygwin ;;
2940   darwin*) template=darwin ;;
2941 dragonfly*) template=netbsd ;;
2942  freebsd*) template=freebsd ;;
2943     hpux*) template=hpux ;;
2944  linux*|gnu*|k*bsd*-gnu)
2945            template=linux ;;
2946    mingw*) template=win32 ;;
2947   netbsd*) template=netbsd ;;
2948  openbsd*) template=openbsd ;;
2949  solaris*) template=solaris ;;
2950 esac
2951
2952   if test x"$template" = x"" ; then
2953     as_fn_error $? "
2954 *******************************************************************
2955 PostgreSQL has apparently not been ported to your platform yet.
2956 To try a manual configuration, look into the src/template directory
2957 for a similar platform and use the '--with-template=' option.
2958
2959 Please also contact <pgsql-bugs@postgresql.org> to see about
2960 rectifying this.  Include the above 'checking host system type...'
2961 line.
2962 *******************************************************************
2963 " "$LINENO" 5
2964   fi
2965
2966
2967 fi
2968
2969
2970
2971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
2972 $as_echo "$template" >&6; }
2973
2974 PORTNAME=$template
2975
2976
2977 # Initialize default assumption that we do not need separate assembly code
2978 # for TAS (test-and-set).  This can be overridden by the template file
2979 # when it's executed.
2980 need_tas=no
2981 tas_file=dummy.s
2982
2983
2984
2985 ##
2986 ## Command line options
2987 ##
2988
2989 #
2990 # Add non-standard directories to the include path
2991 #
2992
2993
2994
2995 # Check whether --with-includes was given.
2996 if test "${with_includes+set}" = set; then :
2997   withval=$with_includes;
2998   case $withval in
2999     yes)
3000       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3001       ;;
3002     no)
3003       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3004       ;;
3005     *)
3006
3007       ;;
3008   esac
3009
3010 fi
3011
3012
3013
3014
3015 #
3016 # Add non-standard directories to the library search path
3017 #
3018
3019
3020
3021 # Check whether --with-libraries was given.
3022 if test "${with_libraries+set}" = set; then :
3023   withval=$with_libraries;
3024   case $withval in
3025     yes)
3026       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3027       ;;
3028     no)
3029       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3030       ;;
3031     *)
3032       LIBRARY_DIRS=$withval
3033       ;;
3034   esac
3035
3036 fi
3037
3038
3039
3040
3041
3042
3043 # Check whether --with-libs was given.
3044 if test "${with_libs+set}" = set; then :
3045   withval=$with_libs;
3046   case $withval in
3047     yes)
3048       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3049       ;;
3050     no)
3051       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3052       ;;
3053     *)
3054       LIBRARY_DIRS=$withval
3055       ;;
3056   esac
3057
3058 fi
3059
3060
3061
3062
3063 #
3064 # 64-bit integer date/time storage is now the only option, but to avoid
3065 # unnecessary breakage of build scripts, continue to accept an explicit
3066 # "--enable-integer-datetimes" switch.
3067 #
3068
3069
3070 # Check whether --enable-integer-datetimes was given.
3071 if test "${enable_integer_datetimes+set}" = set; then :
3072   enableval=$enable_integer_datetimes;
3073   case $enableval in
3074     yes)
3075       :
3076       ;;
3077     no)
3078       as_fn_error $? "--disable-integer-datetimes is no longer supported" "$LINENO" 5
3079       ;;
3080     *)
3081       as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3082       ;;
3083   esac
3084
3085 else
3086   enable_integer_datetimes=yes
3087
3088 fi
3089
3090
3091
3092
3093 #
3094 # NLS
3095 #
3096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3097 $as_echo_n "checking whether NLS is wanted... " >&6; }
3098
3099
3100 # Check whether --enable-nls was given.
3101 if test "${enable_nls+set}" = set; then :
3102   enableval=$enable_nls;
3103   case $enableval in
3104     yes)
3105       :
3106       ;;
3107     no)
3108       :
3109       ;;
3110     *)
3111       enable_nls=yes
3112 WANTED_LANGUAGES=$enableval
3113       ;;
3114   esac
3115
3116 else
3117   enable_nls=no
3118 fi
3119
3120
3121
3122 if test "$enable_nls" = yes; then
3123
3124 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3125
3126 fi
3127
3128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3129 $as_echo "$enable_nls" >&6; }
3130
3131
3132
3133 #
3134 # Default port number (--with-pgport), default 5432
3135 #
3136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3137 $as_echo_n "checking for default port number... " >&6; }
3138
3139
3140
3141 # Check whether --with-pgport was given.
3142 if test "${with_pgport+set}" = set; then :
3143   withval=$with_pgport;
3144   case $withval in
3145     yes)
3146       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3147       ;;
3148     no)
3149       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3150       ;;
3151     *)
3152       default_port=$withval
3153       ;;
3154   esac
3155
3156 else
3157   default_port=5432
3158 fi
3159
3160
3161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3162 $as_echo "$default_port" >&6; }
3163 # Need both of these because some places want an integer and some a string
3164
3165 cat >>confdefs.h <<_ACEOF
3166 #define DEF_PGPORT ${default_port}
3167 _ACEOF
3168
3169
3170 cat >>confdefs.h <<_ACEOF
3171 #define DEF_PGPORT_STR "${default_port}"
3172 _ACEOF
3173
3174
3175
3176 # It's worth validating port; you can get very confusing errors otherwise
3177 if test x"$default_port" = x""; then
3178   as_fn_error $? "invalid --with-pgport specification: empty string" "$LINENO" 5
3179 elif test ! x`echo "$default_port" | sed -e 's/[0-9]*//'` = x""; then
3180   as_fn_error $? "invalid --with-pgport specification: must be a number" "$LINENO" 5
3181 elif test ! x`echo "$default_port" | sed -e 's/^0.//'` = x"$default_port"; then
3182   as_fn_error $? "invalid --with-pgport specification: must not have leading 0" "$LINENO" 5
3183 elif test "$default_port" -lt "1" -o "$default_port" -gt "65535"; then
3184   as_fn_error $? "invalid --with-pgport specification: must be between 1 and 65535" "$LINENO" 5
3185 fi
3186
3187 #
3188 # '-rpath'-like feature can be disabled
3189 #
3190
3191
3192 # Check whether --enable-rpath was given.
3193 if test "${enable_rpath+set}" = set; then :
3194   enableval=$enable_rpath;
3195   case $enableval in
3196     yes)
3197       :
3198       ;;
3199     no)
3200       :
3201       ;;
3202     *)
3203       as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3204       ;;
3205   esac
3206
3207 else
3208   enable_rpath=yes
3209
3210 fi
3211
3212
3213
3214
3215 #
3216 # Spinlocks
3217 #
3218
3219
3220 # Check whether --enable-spinlocks was given.
3221 if test "${enable_spinlocks+set}" = set; then :
3222   enableval=$enable_spinlocks;
3223   case $enableval in
3224     yes)
3225       :
3226       ;;
3227     no)
3228       :
3229       ;;
3230     *)
3231       as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3232       ;;
3233   esac
3234
3235 else
3236   enable_spinlocks=yes
3237
3238 fi
3239
3240
3241
3242 #
3243 # Atomic operations
3244 #
3245
3246
3247 # Check whether --enable-atomics was given.
3248 if test "${enable_atomics+set}" = set; then :
3249   enableval=$enable_atomics;
3250   case $enableval in
3251     yes)
3252       :
3253       ;;
3254     no)
3255       :
3256       ;;
3257     *)
3258       as_fn_error $? "no argument expected for --enable-atomics option" "$LINENO" 5
3259       ;;
3260   esac
3261
3262 else
3263   enable_atomics=yes
3264
3265 fi
3266
3267
3268
3269 #
3270 # Random number generation
3271 #
3272
3273
3274 # Check whether --enable-strong-random was given.
3275 if test "${enable_strong_random+set}" = set; then :
3276   enableval=$enable_strong_random;
3277   case $enableval in
3278     yes)
3279       :
3280       ;;
3281     no)
3282       :
3283       ;;
3284     *)
3285       as_fn_error $? "no argument expected for --enable-strong-random option" "$LINENO" 5
3286       ;;
3287   esac
3288
3289 else
3290   enable_strong_random=yes
3291
3292 fi
3293
3294
3295
3296
3297 #
3298 # --enable-debug adds -g to compiler flags
3299 #
3300
3301
3302 # Check whether --enable-debug was given.
3303 if test "${enable_debug+set}" = set; then :
3304   enableval=$enable_debug;
3305   case $enableval in
3306     yes)
3307       :
3308       ;;
3309     no)
3310       :
3311       ;;
3312     *)
3313       as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3314       ;;
3315   esac
3316
3317 else
3318   enable_debug=no
3319
3320 fi
3321
3322
3323
3324
3325 #
3326 # --enable-profiling enables gcc profiling
3327 #
3328
3329
3330 # Check whether --enable-profiling was given.
3331 if test "${enable_profiling+set}" = set; then :
3332   enableval=$enable_profiling;
3333   case $enableval in
3334     yes)
3335       :
3336       ;;
3337     no)
3338       :
3339       ;;
3340     *)
3341       as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3342       ;;
3343   esac
3344
3345 else
3346   enable_profiling=no
3347
3348 fi
3349
3350
3351
3352 #
3353 # --enable-coverage enables generation of code coverage metrics with gcov
3354 #
3355
3356
3357 # Check whether --enable-coverage was given.
3358 if test "${enable_coverage+set}" = set; then :
3359   enableval=$enable_coverage;
3360   case $enableval in
3361     yes)
3362       if test -z "$GCOV"; then
3363   for ac_prog in gcov
3364 do
3365   # Extract the first word of "$ac_prog", so it can be a program name with args.
3366 set dummy $ac_prog; ac_word=$2
3367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3368 $as_echo_n "checking for $ac_word... " >&6; }
3369 if ${ac_cv_path_GCOV+:} false; then :
3370   $as_echo_n "(cached) " >&6
3371 else
3372   case $GCOV in
3373   [\\/]* | ?:[\\/]*)
3374   ac_cv_path_GCOV="$GCOV" # Let the user override the test with a path.
3375   ;;
3376   *)
3377   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3378 for as_dir in $PATH
3379 do
3380   IFS=$as_save_IFS
3381   test -z "$as_dir" && as_dir=.
3382     for ac_exec_ext in '' $ac_executable_extensions; do
3383   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3384     ac_cv_path_GCOV="$as_dir/$ac_word$ac_exec_ext"
3385     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3386     break 2
3387   fi
3388 done
3389   done
3390 IFS=$as_save_IFS
3391
3392   ;;
3393 esac
3394 fi
3395 GCOV=$ac_cv_path_GCOV
3396 if test -n "$GCOV"; then
3397   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3398 $as_echo "$GCOV" >&6; }
3399 else
3400   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3401 $as_echo "no" >&6; }
3402 fi
3403
3404
3405   test -n "$GCOV" && break
3406 done
3407
3408 else
3409   # Report the value of GCOV in configure's output in all cases.
3410   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCOV" >&5
3411 $as_echo_n "checking for GCOV... " >&6; }
3412   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3413 $as_echo "$GCOV" >&6; }
3414 fi
3415
3416 if test -z "$GCOV"; then
3417   as_fn_error $? "gcov not found" "$LINENO" 5
3418 fi
3419 if test -z "$LCOV"; then
3420   for ac_prog in lcov
3421 do
3422   # Extract the first word of "$ac_prog", so it can be a program name with args.
3423 set dummy $ac_prog; ac_word=$2
3424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3425 $as_echo_n "checking for $ac_word... " >&6; }
3426 if ${ac_cv_path_LCOV+:} false; then :
3427   $as_echo_n "(cached) " >&6
3428 else
3429   case $LCOV in
3430   [\\/]* | ?:[\\/]*)
3431   ac_cv_path_LCOV="$LCOV" # Let the user override the test with a path.
3432   ;;
3433   *)
3434   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3435 for as_dir in $PATH
3436 do
3437   IFS=$as_save_IFS
3438   test -z "$as_dir" && as_dir=.
3439     for ac_exec_ext in '' $ac_executable_extensions; do
3440   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3441     ac_cv_path_LCOV="$as_dir/$ac_word$ac_exec_ext"
3442     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3443     break 2
3444   fi
3445 done
3446   done
3447 IFS=$as_save_IFS
3448
3449   ;;
3450 esac
3451 fi
3452 LCOV=$ac_cv_path_LCOV
3453 if test -n "$LCOV"; then
3454   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3455 $as_echo "$LCOV" >&6; }
3456 else
3457   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3458 $as_echo "no" >&6; }
3459 fi
3460
3461
3462   test -n "$LCOV" && break
3463 done
3464
3465 else
3466   # Report the value of LCOV in configure's output in all cases.
3467   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCOV" >&5
3468 $as_echo_n "checking for LCOV... " >&6; }
3469   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3470 $as_echo "$LCOV" >&6; }
3471 fi
3472
3473 if test -z "$LCOV"; then
3474   as_fn_error $? "lcov not found" "$LINENO" 5
3475 fi
3476 if test -z "$GENHTML"; then
3477   for ac_prog in genhtml
3478 do
3479   # Extract the first word of "$ac_prog", so it can be a program name with args.
3480 set dummy $ac_prog; ac_word=$2
3481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3482 $as_echo_n "checking for $ac_word... " >&6; }
3483 if ${ac_cv_path_GENHTML+:} false; then :
3484   $as_echo_n "(cached) " >&6
3485 else
3486   case $GENHTML in
3487   [\\/]* | ?:[\\/]*)
3488   ac_cv_path_GENHTML="$GENHTML" # Let the user override the test with a path.
3489   ;;
3490   *)
3491   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3492 for as_dir in $PATH
3493 do
3494   IFS=$as_save_IFS
3495   test -z "$as_dir" && as_dir=.
3496     for ac_exec_ext in '' $ac_executable_extensions; do
3497   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3498     ac_cv_path_GENHTML="$as_dir/$ac_word$ac_exec_ext"
3499     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3500     break 2
3501   fi
3502 done
3503   done
3504 IFS=$as_save_IFS
3505
3506   ;;
3507 esac
3508 fi
3509 GENHTML=$ac_cv_path_GENHTML
3510 if test -n "$GENHTML"; then
3511   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3512 $as_echo "$GENHTML" >&6; }
3513 else
3514   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3515 $as_echo "no" >&6; }
3516 fi
3517
3518
3519   test -n "$GENHTML" && break
3520 done
3521
3522 else
3523   # Report the value of GENHTML in configure's output in all cases.
3524   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GENHTML" >&5
3525 $as_echo_n "checking for GENHTML... " >&6; }
3526   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3527 $as_echo "$GENHTML" >&6; }
3528 fi
3529
3530 if test -z "$GENHTML"; then
3531   as_fn_error $? "genhtml not found" "$LINENO" 5
3532 fi
3533       ;;
3534     no)
3535       :
3536       ;;
3537     *)
3538       as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3539       ;;
3540   esac
3541
3542 else
3543   enable_coverage=no
3544
3545 fi
3546
3547
3548
3549
3550 #
3551 # DTrace
3552 #
3553
3554
3555 # Check whether --enable-dtrace was given.
3556 if test "${enable_dtrace+set}" = set; then :
3557   enableval=$enable_dtrace;
3558   case $enableval in
3559     yes)
3560       if test -z "$DTRACE"; then
3561   for ac_prog in dtrace
3562 do
3563   # Extract the first word of "$ac_prog", so it can be a program name with args.
3564 set dummy $ac_prog; ac_word=$2
3565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3566 $as_echo_n "checking for $ac_word... " >&6; }
3567 if ${ac_cv_path_DTRACE+:} false; then :
3568   $as_echo_n "(cached) " >&6
3569 else
3570   case $DTRACE in
3571   [\\/]* | ?:[\\/]*)
3572   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
3573   ;;
3574   *)
3575   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3576 for as_dir in $PATH
3577 do
3578   IFS=$as_save_IFS
3579   test -z "$as_dir" && as_dir=.
3580     for ac_exec_ext in '' $ac_executable_extensions; do
3581   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3582     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
3583     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3584     break 2
3585   fi
3586 done
3587   done
3588 IFS=$as_save_IFS
3589
3590   ;;
3591 esac
3592 fi
3593 DTRACE=$ac_cv_path_DTRACE
3594 if test -n "$DTRACE"; then
3595   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3596 $as_echo "$DTRACE" >&6; }
3597 else
3598   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3599 $as_echo "no" >&6; }
3600 fi
3601
3602
3603   test -n "$DTRACE" && break
3604 done
3605
3606 else
3607   # Report the value of DTRACE in configure's output in all cases.
3608   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
3609 $as_echo_n "checking for DTRACE... " >&6; }
3610   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3611 $as_echo "$DTRACE" >&6; }
3612 fi
3613
3614 if test -z "$DTRACE"; then
3615   as_fn_error $? "dtrace not found" "$LINENO" 5
3616 fi
3617
3618       ;;
3619     no)
3620       :
3621       ;;
3622     *)
3623       as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3624       ;;
3625   esac
3626
3627 else
3628   enable_dtrace=no
3629
3630 fi
3631
3632
3633
3634
3635 #
3636 # TAP tests
3637 #
3638
3639
3640 # Check whether --enable-tap-tests was given.
3641 if test "${enable_tap_tests+set}" = set; then :
3642   enableval=$enable_tap_tests;
3643   case $enableval in
3644     yes)
3645       :
3646       ;;
3647     no)
3648       :
3649       ;;
3650     *)
3651       as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3652       ;;
3653   esac
3654
3655 else
3656   enable_tap_tests=no
3657
3658 fi
3659
3660
3661
3662
3663 #
3664 # Block size
3665 #
3666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3667 $as_echo_n "checking for block size... " >&6; }
3668
3669
3670
3671 # Check whether --with-blocksize was given.
3672 if test "${with_blocksize+set}" = set; then :
3673   withval=$with_blocksize;
3674   case $withval in
3675     yes)
3676       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3677       ;;
3678     no)
3679       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3680       ;;
3681     *)
3682       blocksize=$withval
3683       ;;
3684   esac
3685
3686 else
3687   blocksize=8
3688 fi
3689
3690
3691 case ${blocksize} in
3692   1) BLCKSZ=1024;;
3693   2) BLCKSZ=2048;;
3694   4) BLCKSZ=4096;;
3695   8) BLCKSZ=8192;;
3696  16) BLCKSZ=16384;;
3697  32) BLCKSZ=32768;;
3698   *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3699 esac
3700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3701 $as_echo "${blocksize}kB" >&6; }
3702
3703
3704 cat >>confdefs.h <<_ACEOF
3705 #define BLCKSZ ${BLCKSZ}
3706 _ACEOF
3707
3708
3709 #
3710 # Relation segment size
3711 #
3712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3713 $as_echo_n "checking for segment size... " >&6; }
3714
3715
3716
3717 # Check whether --with-segsize was given.
3718 if test "${with_segsize+set}" = set; then :
3719   withval=$with_segsize;
3720   case $withval in
3721     yes)
3722       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3723       ;;
3724     no)
3725       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3726       ;;
3727     *)
3728       segsize=$withval
3729       ;;
3730   esac
3731
3732 else
3733   segsize=1
3734 fi
3735
3736
3737 # this expression is set up to avoid unnecessary integer overflow
3738 # blocksize is already guaranteed to be a factor of 1024
3739 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3740 test $? -eq 0 || exit 1
3741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3742 $as_echo "${segsize}GB" >&6; }
3743
3744
3745 cat >>confdefs.h <<_ACEOF
3746 #define RELSEG_SIZE ${RELSEG_SIZE}
3747 _ACEOF
3748
3749
3750 #
3751 # WAL block size
3752 #
3753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3754 $as_echo_n "checking for WAL block size... " >&6; }
3755
3756
3757
3758 # Check whether --with-wal-blocksize was given.
3759 if test "${with_wal_blocksize+set}" = set; then :
3760   withval=$with_wal_blocksize;
3761   case $withval in
3762     yes)
3763       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3764       ;;
3765     no)
3766       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3767       ;;
3768     *)
3769       wal_blocksize=$withval
3770       ;;
3771   esac
3772
3773 else
3774   wal_blocksize=8
3775 fi
3776
3777
3778 case ${wal_blocksize} in
3779   1) XLOG_BLCKSZ=1024;;
3780   2) XLOG_BLCKSZ=2048;;
3781   4) XLOG_BLCKSZ=4096;;
3782   8) XLOG_BLCKSZ=8192;;
3783  16) XLOG_BLCKSZ=16384;;
3784  32) XLOG_BLCKSZ=32768;;
3785  64) XLOG_BLCKSZ=65536;;
3786   *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3787 esac
3788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3789 $as_echo "${wal_blocksize}kB" >&6; }
3790
3791
3792 cat >>confdefs.h <<_ACEOF
3793 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3794 _ACEOF
3795
3796
3797 #
3798 # C compiler
3799 #
3800
3801 # For historical reasons you can also use --with-CC to specify the C compiler
3802 # to use, although the standard way to do this is to set the CC environment
3803 # variable.
3804
3805
3806
3807 # Check whether --with-CC was given.
3808 if test "${with_CC+set}" = set; then :
3809   withval=$with_CC;
3810   case $withval in
3811     yes)
3812       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3813       ;;
3814     no)
3815       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3816       ;;
3817     *)
3818       CC=$with_CC
3819       ;;
3820   esac
3821
3822 fi
3823
3824
3825
3826 case $template in
3827   aix) pgac_cc_list="gcc xlc"; pgac_cxx_list="g++ xlC";;
3828     *) pgac_cc_list="gcc cc"; pgac_cxx_list="g++ c++";;
3829 esac
3830
3831 ac_ext=c
3832 ac_cpp='$CPP $CPPFLAGS'
3833 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3834 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3835 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3836 if test -n "$ac_tool_prefix"; then
3837   for ac_prog in $pgac_cc_list
3838   do
3839     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3840 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3842 $as_echo_n "checking for $ac_word... " >&6; }
3843 if ${ac_cv_prog_CC+:} false; then :
3844   $as_echo_n "(cached) " >&6
3845 else
3846   if test -n "$CC"; then
3847   ac_cv_prog_CC="$CC" # Let the user override the test.
3848 else
3849 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3850 for as_dir in $PATH
3851 do
3852   IFS=$as_save_IFS
3853   test -z "$as_dir" && as_dir=.
3854     for ac_exec_ext in '' $ac_executable_extensions; do
3855   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3856     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3857     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3858     break 2
3859   fi
3860 done
3861   done
3862 IFS=$as_save_IFS
3863
3864 fi
3865 fi
3866 CC=$ac_cv_prog_CC
3867 if test -n "$CC"; then
3868   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3869 $as_echo "$CC" >&6; }
3870 else
3871   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3872 $as_echo "no" >&6; }
3873 fi
3874
3875
3876     test -n "$CC" && break
3877   done
3878 fi
3879 if test -z "$CC"; then
3880   ac_ct_CC=$CC
3881   for ac_prog in $pgac_cc_list
3882 do
3883   # Extract the first word of "$ac_prog", so it can be a program name with args.
3884 set dummy $ac_prog; ac_word=$2
3885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3886 $as_echo_n "checking for $ac_word... " >&6; }
3887 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3888   $as_echo_n "(cached) " >&6
3889 else
3890   if test -n "$ac_ct_CC"; then
3891   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3892 else
3893 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3894 for as_dir in $PATH
3895 do
3896   IFS=$as_save_IFS
3897   test -z "$as_dir" && as_dir=.
3898     for ac_exec_ext in '' $ac_executable_extensions; do
3899   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3900     ac_cv_prog_ac_ct_CC="$ac_prog"
3901     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3902     break 2
3903   fi
3904 done
3905   done
3906 IFS=$as_save_IFS
3907
3908 fi
3909 fi
3910 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3911 if test -n "$ac_ct_CC"; then
3912   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3913 $as_echo "$ac_ct_CC" >&6; }
3914 else
3915   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3916 $as_echo "no" >&6; }
3917 fi
3918
3919
3920   test -n "$ac_ct_CC" && break
3921 done
3922
3923   if test "x$ac_ct_CC" = x; then
3924     CC=""
3925   else
3926     case $cross_compiling:$ac_tool_warned in
3927 yes:)
3928 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3929 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3930 ac_tool_warned=yes ;;
3931 esac
3932     CC=$ac_ct_CC
3933   fi
3934 fi
3935
3936
3937 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3938 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3939 as_fn_error $? "no acceptable C compiler found in \$PATH
3940 See \`config.log' for more details" "$LINENO" 5; }
3941
3942 # Provide some information about the compiler.
3943 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3944 set X $ac_compile
3945 ac_compiler=$2
3946 for ac_option in --version -v -V -qversion; do
3947   { { ac_try="$ac_compiler $ac_option >&5"
3948 case "(($ac_try" in
3949   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3950   *) ac_try_echo=$ac_try;;
3951 esac
3952 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3953 $as_echo "$ac_try_echo"; } >&5
3954   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3955   ac_status=$?
3956   if test -s conftest.err; then
3957     sed '10a\
3958 ... rest of stderr output deleted ...
3959          10q' conftest.err >conftest.er1
3960     cat conftest.er1 >&5
3961   fi
3962   rm -f conftest.er1 conftest.err
3963   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3964   test $ac_status = 0; }
3965 done
3966
3967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3968 /* end confdefs.h.  */
3969
3970 int
3971 main ()
3972 {
3973
3974   ;
3975   return 0;
3976 }
3977 _ACEOF
3978 ac_clean_files_save=$ac_clean_files
3979 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3980 # Try to create an executable without -o first, disregard a.out.
3981 # It will help us diagnose broken compilers, and finding out an intuition
3982 # of exeext.
3983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3984 $as_echo_n "checking whether the C compiler works... " >&6; }
3985 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3986
3987 # The possible output files:
3988 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3989
3990 ac_rmfiles=
3991 for ac_file in $ac_files
3992 do
3993   case $ac_file in
3994     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3995     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3996   esac
3997 done
3998 rm -f $ac_rmfiles
3999
4000 if { { ac_try="$ac_link_default"
4001 case "(($ac_try" in
4002   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4003   *) ac_try_echo=$ac_try;;
4004 esac
4005 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4006 $as_echo "$ac_try_echo"; } >&5
4007   (eval "$ac_link_default") 2>&5
4008   ac_status=$?
4009   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4010   test $ac_status = 0; }; then :
4011   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4012 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4013 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
4014 # so that the user can short-circuit this test for compilers unknown to
4015 # Autoconf.
4016 for ac_file in $ac_files ''
4017 do
4018   test -f "$ac_file" || continue
4019   case $ac_file in
4020     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4021         ;;
4022     [ab].out )
4023         # We found the default executable, but exeext='' is most
4024         # certainly right.
4025         break;;
4026     *.* )
4027         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4028         then :; else
4029            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4030         fi
4031         # We set ac_cv_exeext here because the later test for it is not
4032         # safe: cross compilers may not add the suffix if given an `-o'
4033         # argument, so we may need to know it at that point already.
4034         # Even if this section looks crufty: it has the advantage of
4035         # actually working.
4036         break;;
4037     * )
4038         break;;
4039   esac
4040 done
4041 test "$ac_cv_exeext" = no && ac_cv_exeext=
4042
4043 else
4044   ac_file=''
4045 fi
4046 if test -z "$ac_file"; then :
4047   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4048 $as_echo "no" >&6; }
4049 $as_echo "$as_me: failed program was:" >&5
4050 sed 's/^/| /' conftest.$ac_ext >&5
4051
4052 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4053 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4054 as_fn_error 77 "C compiler cannot create executables
4055 See \`config.log' for more details" "$LINENO" 5; }
4056 else
4057   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4058 $as_echo "yes" >&6; }
4059 fi
4060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4061 $as_echo_n "checking for C compiler default output file name... " >&6; }
4062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4063 $as_echo "$ac_file" >&6; }
4064 ac_exeext=$ac_cv_exeext
4065
4066 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4067 ac_clean_files=$ac_clean_files_save
4068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4069 $as_echo_n "checking for suffix of executables... " >&6; }
4070 if { { ac_try="$ac_link"
4071 case "(($ac_try" in
4072   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4073   *) ac_try_echo=$ac_try;;
4074 esac
4075 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4076 $as_echo "$ac_try_echo"; } >&5
4077   (eval "$ac_link") 2>&5
4078   ac_status=$?
4079   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4080   test $ac_status = 0; }; then :
4081   # If both `conftest.exe' and `conftest' are `present' (well, observable)
4082 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4083 # work properly (i.e., refer to `conftest.exe'), while it won't with
4084 # `rm'.
4085 for ac_file in conftest.exe conftest conftest.*; do
4086   test -f "$ac_file" || continue
4087   case $ac_file in
4088     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4089     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4090           break;;
4091     * ) break;;
4092   esac
4093 done
4094 else
4095   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4096 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4097 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4098 See \`config.log' for more details" "$LINENO" 5; }
4099 fi
4100 rm -f conftest conftest$ac_cv_exeext
4101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4102 $as_echo "$ac_cv_exeext" >&6; }
4103
4104 rm -f conftest.$ac_ext
4105 EXEEXT=$ac_cv_exeext
4106 ac_exeext=$EXEEXT
4107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4108 /* end confdefs.h.  */
4109 #include <stdio.h>
4110 int
4111 main ()
4112 {
4113 FILE *f = fopen ("conftest.out", "w");
4114  return ferror (f) || fclose (f) != 0;
4115
4116   ;
4117   return 0;
4118 }
4119 _ACEOF
4120 ac_clean_files="$ac_clean_files conftest.out"
4121 # Check that the compiler produces executables we can run.  If not, either
4122 # the compiler is broken, or we cross compile.
4123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4124 $as_echo_n "checking whether we are cross compiling... " >&6; }
4125 if test "$cross_compiling" != yes; then
4126   { { ac_try="$ac_link"
4127 case "(($ac_try" in
4128   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4129   *) ac_try_echo=$ac_try;;
4130 esac
4131 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4132 $as_echo "$ac_try_echo"; } >&5
4133   (eval "$ac_link") 2>&5
4134   ac_status=$?
4135   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4136   test $ac_status = 0; }
4137   if { ac_try='./conftest$ac_cv_exeext'
4138   { { case "(($ac_try" in
4139   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4140   *) ac_try_echo=$ac_try;;
4141 esac
4142 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4143 $as_echo "$ac_try_echo"; } >&5
4144   (eval "$ac_try") 2>&5
4145   ac_status=$?
4146   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4147   test $ac_status = 0; }; }; then
4148     cross_compiling=no
4149   else
4150     if test "$cross_compiling" = maybe; then
4151         cross_compiling=yes
4152     else
4153         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4154 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4155 as_fn_error $? "cannot run C compiled programs.
4156 If you meant to cross compile, use \`--host'.
4157 See \`config.log' for more details" "$LINENO" 5; }
4158     fi
4159   fi
4160 fi
4161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4162 $as_echo "$cross_compiling" >&6; }
4163
4164 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4165 ac_clean_files=$ac_clean_files_save
4166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4167 $as_echo_n "checking for suffix of object files... " >&6; }
4168 if ${ac_cv_objext+:} false; then :
4169   $as_echo_n "(cached) " >&6
4170 else
4171   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4172 /* end confdefs.h.  */
4173
4174 int
4175 main ()
4176 {
4177
4178   ;
4179   return 0;
4180 }
4181 _ACEOF
4182 rm -f conftest.o conftest.obj
4183 if { { ac_try="$ac_compile"
4184 case "(($ac_try" in
4185   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4186   *) ac_try_echo=$ac_try;;
4187 esac
4188 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4189 $as_echo "$ac_try_echo"; } >&5
4190   (eval "$ac_compile") 2>&5
4191   ac_status=$?
4192   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4193   test $ac_status = 0; }; then :
4194   for ac_file in conftest.o conftest.obj conftest.*; do
4195   test -f "$ac_file" || continue;
4196   case $ac_file in
4197     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4198     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4199        break;;
4200   esac
4201 done
4202 else
4203   $as_echo "$as_me: failed program was:" >&5
4204 sed 's/^/| /' conftest.$ac_ext >&5
4205
4206 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4207 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4208 as_fn_error $? "cannot compute suffix of object files: cannot compile
4209 See \`config.log' for more details" "$LINENO" 5; }
4210 fi
4211 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4212 fi
4213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4214 $as_echo "$ac_cv_objext" >&6; }
4215 OBJEXT=$ac_cv_objext
4216 ac_objext=$OBJEXT
4217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4218 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4219 if ${ac_cv_c_compiler_gnu+:} false; then :
4220   $as_echo_n "(cached) " >&6
4221 else
4222   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4223 /* end confdefs.h.  */
4224
4225 int
4226 main ()
4227 {
4228 #ifndef __GNUC__
4229        choke me
4230 #endif
4231
4232   ;
4233   return 0;
4234 }
4235 _ACEOF
4236 if ac_fn_c_try_compile "$LINENO"; then :
4237   ac_compiler_gnu=yes
4238 else
4239   ac_compiler_gnu=no
4240 fi
4241 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4242 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4243
4244 fi
4245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4246 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4247 if test $ac_compiler_gnu = yes; then
4248   GCC=yes
4249 else
4250   GCC=
4251 fi
4252 ac_test_CFLAGS=${CFLAGS+set}
4253 ac_save_CFLAGS=$CFLAGS
4254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4255 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4256 if ${ac_cv_prog_cc_g+:} false; then :
4257   $as_echo_n "(cached) " >&6
4258 else
4259   ac_save_c_werror_flag=$ac_c_werror_flag
4260    ac_c_werror_flag=yes
4261    ac_cv_prog_cc_g=no
4262    CFLAGS="-g"
4263    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4264 /* end confdefs.h.  */
4265
4266 int
4267 main ()
4268 {
4269
4270   ;
4271   return 0;
4272 }
4273 _ACEOF
4274 if ac_fn_c_try_compile "$LINENO"; then :
4275   ac_cv_prog_cc_g=yes
4276 else
4277   CFLAGS=""
4278       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4279 /* end confdefs.h.  */
4280
4281 int
4282 main ()
4283 {
4284
4285   ;
4286   return 0;
4287 }
4288 _ACEOF
4289 if ac_fn_c_try_compile "$LINENO"; then :
4290
4291 else
4292   ac_c_werror_flag=$ac_save_c_werror_flag
4293          CFLAGS="-g"
4294          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4295 /* end confdefs.h.  */
4296
4297 int
4298 main ()
4299 {
4300
4301   ;
4302   return 0;
4303 }
4304 _ACEOF
4305 if ac_fn_c_try_compile "$LINENO"; then :
4306   ac_cv_prog_cc_g=yes
4307 fi
4308 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4309 fi
4310 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4311 fi
4312 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4313    ac_c_werror_flag=$ac_save_c_werror_flag
4314 fi
4315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4316 $as_echo "$ac_cv_prog_cc_g" >&6; }
4317 if test "$ac_test_CFLAGS" = set; then
4318   CFLAGS=$ac_save_CFLAGS
4319 elif test $ac_cv_prog_cc_g = yes; then
4320   if test "$GCC" = yes; then
4321     CFLAGS="-g -O2"
4322   else
4323     CFLAGS="-g"
4324   fi
4325 else
4326   if test "$GCC" = yes; then
4327     CFLAGS="-O2"
4328   else
4329     CFLAGS=
4330   fi
4331 fi
4332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4333 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4334 if ${ac_cv_prog_cc_c89+:} false; then :
4335   $as_echo_n "(cached) " >&6
4336 else
4337   ac_cv_prog_cc_c89=no
4338 ac_save_CC=$CC
4339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4340 /* end confdefs.h.  */
4341 #include <stdarg.h>
4342 #include <stdio.h>
4343 struct stat;
4344 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4345 struct buf { int x; };
4346 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4347 static char *e (p, i)
4348      char **p;
4349      int i;
4350 {
4351   return p[i];
4352 }
4353 static char *f (char * (*g) (char **, int), char **p, ...)
4354 {
4355   char *s;
4356   va_list v;
4357   va_start (v,p);
4358   s = g (p, va_arg (v,int));
4359   va_end (v);
4360   return s;
4361 }
4362
4363 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4364    function prototypes and stuff, but not '\xHH' hex character constants.
4365    These don't provoke an error unfortunately, instead are silently treated
4366    as 'x'.  The following induces an error, until -std is added to get
4367    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4368    array size at least.  It's necessary to write '\x00'==0 to get something
4369    that's true only with -std.  */
4370 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4371
4372 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4373    inside strings and character constants.  */
4374 #define FOO(x) 'x'
4375 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4376
4377 int test (int i, double x);
4378 struct s1 {int (*f) (int a);};
4379 struct s2 {int (*f) (double a);};
4380 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4381 int argc;
4382 char **argv;
4383 int
4384 main ()
4385 {
4386 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4387   ;
4388   return 0;
4389 }
4390 _ACEOF
4391 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4392         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4393 do
4394   CC="$ac_save_CC $ac_arg"
4395   if ac_fn_c_try_compile "$LINENO"; then :
4396   ac_cv_prog_cc_c89=$ac_arg
4397 fi
4398 rm -f core conftest.err conftest.$ac_objext
4399   test "x$ac_cv_prog_cc_c89" != "xno" && break
4400 done
4401 rm -f conftest.$ac_ext
4402 CC=$ac_save_CC
4403
4404 fi
4405 # AC_CACHE_VAL
4406 case "x$ac_cv_prog_cc_c89" in
4407   x)
4408     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4409 $as_echo "none needed" >&6; } ;;
4410   xno)
4411     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4412 $as_echo "unsupported" >&6; } ;;
4413   *)
4414     CC="$CC $ac_cv_prog_cc_c89"
4415     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4416 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4417 esac
4418 if test "x$ac_cv_prog_cc_c89" != xno; then :
4419
4420 fi
4421
4422 ac_ext=c
4423 ac_cpp='$CPP $CPPFLAGS'
4424 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4425 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4426 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4427
4428 ac_ext=cpp
4429 ac_cpp='$CXXCPP $CPPFLAGS'
4430 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4431 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4432 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4433 if test -z "$CXX"; then
4434   if test -n "$CCC"; then
4435     CXX=$CCC
4436   else
4437     if test -n "$ac_tool_prefix"; then
4438   for ac_prog in $pgac_cxx_list
4439   do
4440     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4441 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4443 $as_echo_n "checking for $ac_word... " >&6; }
4444 if ${ac_cv_prog_CXX+:} false; then :
4445   $as_echo_n "(cached) " >&6
4446 else
4447   if test -n "$CXX"; then
4448   ac_cv_prog_CXX="$CXX" # Let the user override the test.
4449 else
4450 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4451 for as_dir in $PATH
4452 do
4453   IFS=$as_save_IFS
4454   test -z "$as_dir" && as_dir=.
4455     for ac_exec_ext in '' $ac_executable_extensions; do
4456   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4457     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4458     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4459     break 2
4460   fi
4461 done
4462   done
4463 IFS=$as_save_IFS
4464
4465 fi
4466 fi
4467 CXX=$ac_cv_prog_CXX
4468 if test -n "$CXX"; then
4469   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4470 $as_echo "$CXX" >&6; }
4471 else
4472   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4473 $as_echo "no" >&6; }
4474 fi
4475
4476
4477     test -n "$CXX" && break
4478   done
4479 fi
4480 if test -z "$CXX"; then
4481   ac_ct_CXX=$CXX
4482   for ac_prog in $pgac_cxx_list
4483 do
4484   # Extract the first word of "$ac_prog", so it can be a program name with args.
4485 set dummy $ac_prog; ac_word=$2
4486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4487 $as_echo_n "checking for $ac_word... " >&6; }
4488 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4489   $as_echo_n "(cached) " >&6
4490 else
4491   if test -n "$ac_ct_CXX"; then
4492   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4493 else
4494 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4495 for as_dir in $PATH
4496 do
4497   IFS=$as_save_IFS
4498   test -z "$as_dir" && as_dir=.
4499     for ac_exec_ext in '' $ac_executable_extensions; do
4500   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4501     ac_cv_prog_ac_ct_CXX="$ac_prog"
4502     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4503     break 2
4504   fi
4505 done
4506   done
4507 IFS=$as_save_IFS
4508
4509 fi
4510 fi
4511 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4512 if test -n "$ac_ct_CXX"; then
4513   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4514 $as_echo "$ac_ct_CXX" >&6; }
4515 else
4516   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4517 $as_echo "no" >&6; }
4518 fi
4519
4520
4521   test -n "$ac_ct_CXX" && break
4522 done
4523
4524   if test "x$ac_ct_CXX" = x; then
4525     CXX="g++"
4526   else
4527     case $cross_compiling:$ac_tool_warned in
4528 yes:)
4529 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4530 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4531 ac_tool_warned=yes ;;
4532 esac
4533     CXX=$ac_ct_CXX
4534   fi
4535 fi
4536
4537   fi
4538 fi
4539 # Provide some information about the compiler.
4540 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4541 set X $ac_compile
4542 ac_compiler=$2
4543 for ac_option in --version -v -V -qversion; do
4544   { { ac_try="$ac_compiler $ac_option >&5"
4545 case "(($ac_try" in
4546   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4547   *) ac_try_echo=$ac_try;;
4548 esac
4549 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4550 $as_echo "$ac_try_echo"; } >&5
4551   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4552   ac_status=$?
4553   if test -s conftest.err; then
4554     sed '10a\
4555 ... rest of stderr output deleted ...
4556          10q' conftest.err >conftest.er1
4557     cat conftest.er1 >&5
4558   fi
4559   rm -f conftest.er1 conftest.err
4560   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4561   test $ac_status = 0; }
4562 done
4563
4564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4565 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4566 if ${ac_cv_cxx_compiler_gnu+:} false; then :
4567   $as_echo_n "(cached) " >&6
4568 else
4569   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4570 /* end confdefs.h.  */
4571
4572 int
4573 main ()
4574 {
4575 #ifndef __GNUC__
4576        choke me
4577 #endif
4578
4579   ;
4580   return 0;
4581 }
4582 _ACEOF
4583 if ac_fn_cxx_try_compile "$LINENO"; then :
4584   ac_compiler_gnu=yes
4585 else
4586   ac_compiler_gnu=no
4587 fi
4588 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4589 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
4590
4591 fi
4592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4593 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4594 if test $ac_compiler_gnu = yes; then
4595   GXX=yes
4596 else
4597   GXX=
4598 fi
4599 ac_test_CXXFLAGS=${CXXFLAGS+set}
4600 ac_save_CXXFLAGS=$CXXFLAGS
4601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4602 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
4603 if ${ac_cv_prog_cxx_g+:} false; then :
4604   $as_echo_n "(cached) " >&6
4605 else
4606   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4607    ac_cxx_werror_flag=yes
4608    ac_cv_prog_cxx_g=no
4609    CXXFLAGS="-g"
4610    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4611 /* end confdefs.h.  */
4612
4613 int
4614 main ()
4615 {
4616
4617   ;
4618   return 0;
4619 }
4620 _ACEOF
4621 if ac_fn_cxx_try_compile "$LINENO"; then :
4622   ac_cv_prog_cxx_g=yes
4623 else
4624   CXXFLAGS=""
4625       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4626 /* end confdefs.h.  */
4627
4628 int
4629 main ()
4630 {
4631
4632   ;
4633   return 0;
4634 }
4635 _ACEOF
4636 if ac_fn_cxx_try_compile "$LINENO"; then :
4637
4638 else
4639   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4640          CXXFLAGS="-g"
4641          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4642 /* end confdefs.h.  */
4643
4644 int
4645 main ()
4646 {
4647
4648   ;
4649   return 0;
4650 }
4651 _ACEOF
4652 if ac_fn_cxx_try_compile "$LINENO"; then :
4653   ac_cv_prog_cxx_g=yes
4654 fi
4655 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4656 fi
4657 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4658 fi
4659 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4660    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4661 fi
4662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4663 $as_echo "$ac_cv_prog_cxx_g" >&6; }
4664 if test "$ac_test_CXXFLAGS" = set; then
4665   CXXFLAGS=$ac_save_CXXFLAGS
4666 elif test $ac_cv_prog_cxx_g = yes; then
4667   if test "$GXX" = yes; then
4668     CXXFLAGS="-g -O2"
4669   else
4670     CXXFLAGS="-g"
4671   fi
4672 else
4673   if test "$GXX" = yes; then
4674     CXXFLAGS="-O2"
4675   else
4676     CXXFLAGS=
4677   fi
4678 fi
4679 ac_ext=c
4680 ac_cpp='$CPP $CPPFLAGS'
4681 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4682 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4683 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4684
4685
4686 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4687 # but has idiosyncrasies of its own.  We assume icc will define
4688 # __INTEL_COMPILER regardless of CFLAGS.
4689
4690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4691 /* end confdefs.h.  */
4692
4693 int
4694 main ()
4695 {
4696 #ifndef __INTEL_COMPILER
4697 choke me
4698 #endif
4699   ;
4700   return 0;
4701 }
4702 _ACEOF
4703 if ac_fn_c_try_compile "$LINENO"; then :
4704   ICC=yes
4705 else
4706   ICC=no
4707 fi
4708 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4709
4710 # Check if it's Sun Studio compiler. We assume that
4711 # __SUNPRO_C will be defined for Sun Studio compilers
4712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4713 /* end confdefs.h.  */
4714
4715 int
4716 main ()
4717 {
4718 #ifndef __SUNPRO_C
4719 choke me
4720 #endif
4721   ;
4722   return 0;
4723 }
4724 _ACEOF
4725 if ac_fn_c_try_compile "$LINENO"; then :
4726   SUN_STUDIO_CC=yes
4727 else
4728   SUN_STUDIO_CC=no
4729 fi
4730 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4731
4732
4733
4734
4735 #
4736 # LLVM
4737 #
4738 # Checked early because subsequent tests depend on it.
4739
4740
4741
4742 # Check whether --with-llvm was given.
4743 if test "${with_llvm+set}" = set; then :
4744   withval=$with_llvm;
4745   case $withval in
4746     yes)
4747
4748 $as_echo "#define USE_LLVM 1" >>confdefs.h
4749
4750       ;;
4751     no)
4752       :
4753       ;;
4754     *)
4755       as_fn_error $? "no argument expected for --with-llvm option" "$LINENO" 5
4756       ;;
4757   esac
4758
4759 else
4760   with_llvm=no
4761
4762 fi
4763
4764
4765
4766 if test "$with_llvm" = yes ; then
4767    for ac_prog in gawk mawk nawk awk
4768 do
4769   # Extract the first word of "$ac_prog", so it can be a program name with args.
4770 set dummy $ac_prog; ac_word=$2
4771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4772 $as_echo_n "checking for $ac_word... " >&6; }
4773 if ${ac_cv_prog_AWK+:} false; then :
4774   $as_echo_n "(cached) " >&6
4775 else
4776   if test -n "$AWK"; then
4777   ac_cv_prog_AWK="$AWK" # Let the user override the test.
4778 else
4779 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4780 for as_dir in $PATH
4781 do
4782   IFS=$as_save_IFS
4783   test -z "$as_dir" && as_dir=.
4784     for ac_exec_ext in '' $ac_executable_extensions; do
4785   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4786     ac_cv_prog_AWK="$ac_prog"
4787     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4788     break 2
4789   fi
4790 done
4791   done
4792 IFS=$as_save_IFS
4793
4794 fi
4795 fi
4796 AWK=$ac_cv_prog_AWK
4797 if test -n "$AWK"; then
4798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4799 $as_echo "$AWK" >&6; }
4800 else
4801   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4802 $as_echo "no" >&6; }
4803 fi
4804
4805
4806   test -n "$AWK" && break
4807 done
4808
4809
4810
4811
4812
4813   if test -z "$LLVM_CONFIG"; then
4814   for ac_prog in llvm-config llvm-config-6.0 llvm-config-5.0 llvm-config-4.0 llvm-config-3.9
4815 do
4816   # Extract the first word of "$ac_prog", so it can be a program name with args.
4817 set dummy $ac_prog; ac_word=$2
4818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4819 $as_echo_n "checking for $ac_word... " >&6; }
4820 if ${ac_cv_path_LLVM_CONFIG+:} false; then :
4821   $as_echo_n "(cached) " >&6
4822 else
4823   case $LLVM_CONFIG in
4824   [\\/]* | ?:[\\/]*)
4825   ac_cv_path_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test with a path.
4826   ;;
4827   *)
4828   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4829 for as_dir in $PATH
4830 do
4831   IFS=$as_save_IFS
4832   test -z "$as_dir" && as_dir=.
4833     for ac_exec_ext in '' $ac_executable_extensions; do
4834   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4835     ac_cv_path_LLVM_CONFIG="$as_dir/$ac_word$ac_exec_ext"
4836     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4837     break 2
4838   fi
4839 done
4840   done
4841 IFS=$as_save_IFS
4842
4843   ;;
4844 esac
4845 fi
4846 LLVM_CONFIG=$ac_cv_path_LLVM_CONFIG
4847 if test -n "$LLVM_CONFIG"; then
4848   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
4849 $as_echo "$LLVM_CONFIG" >&6; }
4850 else
4851   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4852 $as_echo "no" >&6; }
4853 fi
4854
4855
4856   test -n "$LLVM_CONFIG" && break
4857 done
4858
4859 else
4860   # Report the value of LLVM_CONFIG in configure's output in all cases.
4861   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LLVM_CONFIG" >&5
4862 $as_echo_n "checking for LLVM_CONFIG... " >&6; }
4863   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
4864 $as_echo "$LLVM_CONFIG" >&6; }
4865 fi
4866
4867
4868   # no point continuing if llvm wasn't found
4869   if test -z "$LLVM_CONFIG"; then
4870     as_fn_error $? "llvm-config not found, but required when compiling --with-llvm, specify with LLVM_CONFIG=" "$LINENO" 5
4871   fi
4872   # check if detected $LLVM_CONFIG is executable
4873   pgac_llvm_version="$($LLVM_CONFIG --version 2> /dev/null || echo no)"
4874   if test "x$pgac_llvm_version" = "xno"; then
4875     as_fn_error $? "$LLVM_CONFIG does not work" "$LINENO" 5
4876   fi
4877   # and whether the version is supported
4878   if echo $pgac_llvm_version | $AWK -F '.' '{ if ($1 >= 4 || ($1 == 3 && $2 >= 9)) exit 1; else exit 0;}';then
4879     as_fn_error $? "$LLVM_CONFIG version is $pgac_llvm_version but at least 3.9 is required" "$LINENO" 5
4880   fi
4881
4882   # need clang to create some bitcode files
4883
4884   if test -z "$CLANG"; then
4885   for ac_prog in clang clang-6.0 clang-5.0 clang-4.0 clang-3.9
4886 do
4887   # Extract the first word of "$ac_prog", so it can be a program name with args.
4888 set dummy $ac_prog; ac_word=$2
4889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4890 $as_echo_n "checking for $ac_word... " >&6; }
4891 if ${ac_cv_path_CLANG+:} false; then :
4892   $as_echo_n "(cached) " >&6
4893 else
4894   case $CLANG in
4895   [\\/]* | ?:[\\/]*)
4896   ac_cv_path_CLANG="$CLANG" # Let the user override the test with a path.
4897   ;;
4898   *)
4899   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4900 for as_dir in $PATH
4901 do
4902   IFS=$as_save_IFS
4903   test -z "$as_dir" && as_dir=.
4904     for ac_exec_ext in '' $ac_executable_extensions; do
4905   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4906     ac_cv_path_CLANG="$as_dir/$ac_word$ac_exec_ext"
4907     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4908     break 2
4909   fi
4910 done
4911   done
4912 IFS=$as_save_IFS
4913
4914   ;;
4915 esac
4916 fi
4917 CLANG=$ac_cv_path_CLANG
4918 if test -n "$CLANG"; then
4919   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
4920 $as_echo "$CLANG" >&6; }
4921 else
4922   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4923 $as_echo "no" >&6; }
4924 fi
4925
4926
4927   test -n "$CLANG" && break
4928 done
4929
4930 else
4931   # Report the value of CLANG in configure's output in all cases.
4932   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CLANG" >&5
4933 $as_echo_n "checking for CLANG... " >&6; }
4934   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
4935 $as_echo "$CLANG" >&6; }
4936 fi
4937
4938   if test -z "$CLANG"; then
4939     as_fn_error $? "clang not found, but required when compiling --with-llvm, specify with CLANG=" "$LINENO" 5
4940   fi
4941   # make sure clang is executable
4942   if test "x$($CLANG --version 2> /dev/null || echo no)" = "xno"; then
4943     as_fn_error $? "$CLANG does not work" "$LINENO" 5
4944   fi
4945   # Could check clang version, but it doesn't seem that
4946   # important. Systems with a new enough LLVM version are usually
4947   # going to have a decent clang version too. It's also not entirely
4948   # clear what the minimum version is.
4949
4950   # Collect compiler flags necessary to build the LLVM dependent
4951   # shared library.
4952   for pgac_option in `$LLVM_CONFIG --cppflags`; do
4953     case $pgac_option in
4954       -I*|-D*) LLVM_CPPFLAGS="$pgac_option $LLVM_CPPFLAGS";;
4955     esac
4956   done
4957
4958   for pgac_option in `$LLVM_CONFIG --ldflags`; do
4959     case $pgac_option in
4960       -L*) LDFLAGS="$LDFLAGS $pgac_option";;
4961     esac
4962   done
4963
4964   # ABI influencing options, standard influencing options
4965   for pgac_option in `$LLVM_CONFIG --cxxflags`; do
4966     case $pgac_option in
4967       -fno-rtti*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
4968       -std=*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
4969     esac
4970   done
4971
4972   # Look for components we're interested in, collect necessary
4973   # libs. As some components are optional, we can't just list all of
4974   # them as it'd raise an error.
4975   pgac_components='';
4976   for pgac_component in `$LLVM_CONFIG --components`; do
4977     case $pgac_component in
4978       engine) pgac_components="$pgac_components $pgac_component";;
4979       debuginfodwarf) pgac_components="$pgac_components $pgac_component";;
4980       orcjit) pgac_components="$pgac_components $pgac_component";;
4981       passes) pgac_components="$pgac_components $pgac_component";;
4982       perfjitevents) pgac_components="$pgac_components $pgac_component";;
4983     esac
4984   done;
4985
4986   # And then get the libraries that need to be linked in for the
4987   # selected components.  They're large libraries, we only want to
4988   # link them into the LLVM using shared library.
4989   for pgac_option in `$LLVM_CONFIG --libs --system-libs $pgac_components`; do
4990     case $pgac_option in
4991       -l*) LLVM_LIBS="$LLVM_LIBS $pgac_option";;
4992     esac
4993   done
4994
4995   LLVM_BINPATH=`$LLVM_CONFIG --bindir`
4996
4997   # Check which functionality is present
4998   SAVE_CPPFLAGS="$CPPFLAGS"
4999   CPPFLAGS="$CPPFLAGS $LLVM_CPPFLAGS"
5000   ac_fn_c_check_decl "$LINENO" "LLVMOrcGetSymbolAddressIn" "ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" "#include <llvm-c/OrcBindings.h>
5001 "
5002 if test "x$ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" = xyes; then :
5003   ac_have_decl=1
5004 else
5005   ac_have_decl=0
5006 fi
5007
5008 cat >>confdefs.h <<_ACEOF
5009 #define HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN $ac_have_decl
5010 _ACEOF
5011 ac_fn_c_check_decl "$LINENO" "LLVMOrcRegisterGDB" "ac_cv_have_decl_LLVMOrcRegisterGDB" "#include <llvm-c/OrcBindings.h>
5012 "
5013 if test "x$ac_cv_have_decl_LLVMOrcRegisterGDB" = xyes; then :
5014   ac_have_decl=1
5015 else
5016   ac_have_decl=0
5017 fi
5018
5019 cat >>confdefs.h <<_ACEOF
5020 #define HAVE_DECL_LLVMORCREGISTERGDB $ac_have_decl
5021 _ACEOF
5022 ac_fn_c_check_decl "$LINENO" "LLVMOrcRegisterPerf" "ac_cv_have_decl_LLVMOrcRegisterPerf" "#include <llvm-c/OrcBindings.h>
5023 "
5024 if test "x$ac_cv_have_decl_LLVMOrcRegisterPerf" = xyes; then :
5025   ac_have_decl=1
5026 else
5027   ac_have_decl=0
5028 fi
5029
5030 cat >>confdefs.h <<_ACEOF
5031 #define HAVE_DECL_LLVMORCREGISTERPERF $ac_have_decl
5032 _ACEOF
5033
5034   ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUName" "ac_cv_have_decl_LLVMGetHostCPUName" "#include <llvm-c/TargetMachine.h>
5035 "
5036 if test "x$ac_cv_have_decl_LLVMGetHostCPUName" = xyes; then :
5037   ac_have_decl=1
5038 else
5039   ac_have_decl=0
5040 fi
5041
5042 cat >>confdefs.h <<_ACEOF
5043 #define HAVE_DECL_LLVMGETHOSTCPUNAME $ac_have_decl
5044 _ACEOF
5045
5046   CPPFLAGS="$SAVE_CPPFLAGS"
5047
5048   # LLVM_CONFIG, CLANG are already output via AC_ARG_VAR
5049
5050
5051
5052
5053
5054
5055
5056 fi
5057
5058
5059 unset CFLAGS
5060 unset CXXFLAGS
5061
5062 #
5063 # Read the template
5064 #
5065 . "$srcdir/src/template/$template" || exit
5066
5067 # C[XX]FLAGS are selected so:
5068 # If the user specifies something in the environment, that is used.
5069 # else:  If the template file set something, that is used.
5070 # else:  If coverage was enabled, don't set anything.
5071 # else:  If the compiler is GCC, then we use -O2.
5072 # else:  If the compiler is something else, then we use -O, unless debugging.
5073
5074 if test "$ac_env_CFLAGS_set" = set; then
5075   CFLAGS=$ac_env_CFLAGS_value
5076 elif test "${CFLAGS+set}" = set; then
5077   : # (keep what template set)
5078 elif test "$enable_coverage" = yes; then
5079   : # no optimization by default
5080 elif test "$GCC" = yes; then
5081   CFLAGS="-O2"
5082 else
5083   # if the user selected debug mode, don't use -O
5084   if test "$enable_debug" != yes; then
5085     CFLAGS="-O"
5086   fi
5087 fi
5088
5089 if test "$ac_env_CXXFLAGS_set" = set; then
5090   CXXFLAGS=$ac_env_CXXFLAGS_value
5091 elif test "${CXXFLAGS+set}" = set; then
5092   : # (keep what template set)
5093 elif test "$enable_coverage" = yes; then
5094   : # no optimization by default
5095 elif test "$GCC" = yes; then
5096   CXXFLAGS="-O2"
5097 else
5098   # if the user selected debug mode, don't use -O
5099   if test "$enable_debug" != yes; then
5100     CXXFLAGS="-O"
5101   fi
5102 fi
5103
5104 # When generating bitcode (for inlining) we always want to use -O2
5105 # even when --enable-debug is specified. The bitcode it's not going to
5106 # be used for line-by-line debugging, and JIT inlining doesn't work
5107 # without at least -O1 (otherwise clang will emit 'noinline'
5108 # attributes everywhere), which is bad for testing.  Still allow the
5109 # environment to override if done explicitly.
5110 if test "$ac_env_BITCODE_CFLAGS_set" = set; then
5111   BITCODE_CFLAGS=$ac_env_BITCODE_CFLAGS_value
5112 else
5113   BITCODE_CFLAGS="-O2 $BITCODE_CFLAGS"
5114 fi
5115 if test "$ac_env_BITCODE_CXXFLAGS_set" = set; then
5116   BITCODE_CXXFLAGS=$ac_env_BITCODE_CXXFLAGS_value
5117 else
5118   BITCODE_CXXFLAGS="-O2 $BITCODE_CXXFLAGS"
5119 fi
5120
5121 # C[XX]FLAGS we determined above will be added back at the end
5122 user_CFLAGS=$CFLAGS
5123 CFLAGS=""
5124 user_CXXFLAGS=$CXXFLAGS
5125 CXXFLAGS=""
5126 user_BITCODE_CFLAGS=$BITCODE_CFLAGS
5127 BITCODE_CFLAGS=""
5128 user_BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
5129 BITCODE_CXXFLAGS=""
5130
5131 # set CFLAGS_VECTOR from the environment, if available
5132 if test "$ac_env_CFLAGS_VECTOR_set" = set; then
5133   CFLAGS_VECTOR=$ac_env_CFLAGS_VECTOR_value
5134 fi
5135
5136 # Some versions of GCC support some additional useful warning flags.
5137 # Check whether they are supported, and add them to CFLAGS if so.
5138 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
5139 # but has its own.  Also check other compiler-specific flags here.
5140
5141 if test "$GCC" = yes -a "$ICC" = no; then
5142   CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
5143   CXXFLAGS="-Wall -Wpointer-arith"
5144   # These work in some but not all gcc versions
5145
5146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS" >&5
5147 $as_echo_n "checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS... " >&6; }
5148 if ${pgac_cv_prog_CC_cflags__Wdeclaration_after_statement+:} false; then :
5149   $as_echo_n "(cached) " >&6
5150 else
5151   pgac_save_CFLAGS=$CFLAGS
5152 pgac_save_CC=$CC
5153 CC=${CC}
5154 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5155 ac_save_c_werror_flag=$ac_c_werror_flag
5156 ac_c_werror_flag=yes
5157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5158 /* end confdefs.h.  */
5159
5160 int
5161 main ()
5162 {
5163
5164   ;
5165   return 0;
5166 }
5167 _ACEOF
5168 if ac_fn_c_try_compile "$LINENO"; then :
5169   pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=yes
5170 else
5171   pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=no
5172 fi
5173 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5174 ac_c_werror_flag=$ac_save_c_werror_flag
5175 CFLAGS="$pgac_save_CFLAGS"
5176 CC="$pgac_save_CC"
5177 fi
5178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&5
5179 $as_echo "$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&6; }
5180 if test x"$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" = x"yes"; then
5181   CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5182 fi
5183
5184
5185   # -Wdeclaration-after-statement isn't applicable for C++
5186
5187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wendif-labels, for CFLAGS" >&5
5188 $as_echo_n "checking whether ${CC} supports -Wendif-labels, for CFLAGS... " >&6; }
5189 if ${pgac_cv_prog_CC_cflags__Wendif_labels+:} false; then :
5190   $as_echo_n "(cached) " >&6
5191 else
5192   pgac_save_CFLAGS=$CFLAGS
5193 pgac_save_CC=$CC
5194 CC=${CC}
5195 CFLAGS="${CFLAGS} -Wendif-labels"
5196 ac_save_c_werror_flag=$ac_c_werror_flag
5197 ac_c_werror_flag=yes
5198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5199 /* end confdefs.h.  */
5200
5201 int
5202 main ()
5203 {
5204
5205   ;
5206   return 0;
5207 }
5208 _ACEOF
5209 if ac_fn_c_try_compile "$LINENO"; then :
5210   pgac_cv_prog_CC_cflags__Wendif_labels=yes
5211 else
5212   pgac_cv_prog_CC_cflags__Wendif_labels=no
5213 fi
5214 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5215 ac_c_werror_flag=$ac_save_c_werror_flag
5216 CFLAGS="$pgac_save_CFLAGS"
5217 CC="$pgac_save_CC"
5218 fi
5219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wendif_labels" >&5
5220 $as_echo "$pgac_cv_prog_CC_cflags__Wendif_labels" >&6; }
5221 if test x"$pgac_cv_prog_CC_cflags__Wendif_labels" = x"yes"; then
5222   CFLAGS="${CFLAGS} -Wendif-labels"
5223 fi
5224
5225
5226   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS" >&5
5227 $as_echo_n "checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS... " >&6; }
5228 if ${pgac_cv_prog_CXX_cxxflags__Wendif_labels+:} false; then :
5229   $as_echo_n "(cached) " >&6
5230 else
5231   pgac_save_CXXFLAGS=$CXXFLAGS
5232 pgac_save_CXX=$CXX
5233 CXX=${CXX}
5234 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5235 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5236 ac_cxx_werror_flag=yes
5237 ac_ext=cpp
5238 ac_cpp='$CXXCPP $CPPFLAGS'
5239 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5240 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5241 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5242
5243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5244 /* end confdefs.h.  */
5245
5246 int
5247 main ()
5248 {
5249
5250   ;
5251   return 0;
5252 }
5253 _ACEOF
5254 if ac_fn_cxx_try_compile "$LINENO"; then :
5255   pgac_cv_prog_CXX_cxxflags__Wendif_labels=yes
5256 else
5257   pgac_cv_prog_CXX_cxxflags__Wendif_labels=no
5258 fi
5259 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5260 ac_ext=c
5261 ac_cpp='$CPP $CPPFLAGS'
5262 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5263 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5264 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5265
5266 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5267 CXXFLAGS="$pgac_save_CXXFLAGS"
5268 CXX="$pgac_save_CXX"
5269 fi
5270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&5
5271 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&6; }
5272 if test x"$pgac_cv_prog_CXX_cxxflags__Wendif_labels" = x"yes"; then
5273   CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5274 fi
5275
5276
5277
5278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS" >&5
5279 $as_echo_n "checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS... " >&6; }
5280 if ${pgac_cv_prog_CC_cflags__Wmissing_format_attribute+:} false; then :
5281   $as_echo_n "(cached) " >&6
5282 else
5283   pgac_save_CFLAGS=$CFLAGS
5284 pgac_save_CC=$CC
5285 CC=${CC}
5286 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5287 ac_save_c_werror_flag=$ac_c_werror_flag
5288 ac_c_werror_flag=yes
5289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5290 /* end confdefs.h.  */
5291
5292 int
5293 main ()
5294 {
5295
5296   ;
5297   return 0;
5298 }
5299 _ACEOF
5300 if ac_fn_c_try_compile "$LINENO"; then :
5301   pgac_cv_prog_CC_cflags__Wmissing_format_attribute=yes
5302 else
5303   pgac_cv_prog_CC_cflags__Wmissing_format_attribute=no
5304 fi
5305 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5306 ac_c_werror_flag=$ac_save_c_werror_flag
5307 CFLAGS="$pgac_save_CFLAGS"
5308 CC="$pgac_save_CC"
5309 fi
5310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&5
5311 $as_echo "$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&6; }
5312 if test x"$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" = x"yes"; then
5313   CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5314 fi
5315
5316
5317   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS" >&5
5318 $as_echo_n "checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS... " >&6; }
5319 if ${pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute+:} false; then :
5320   $as_echo_n "(cached) " >&6
5321 else
5322   pgac_save_CXXFLAGS=$CXXFLAGS
5323 pgac_save_CXX=$CXX
5324 CXX=${CXX}
5325 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5326 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5327 ac_cxx_werror_flag=yes
5328 ac_ext=cpp
5329 ac_cpp='$CXXCPP $CPPFLAGS'
5330 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5331 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5332 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5333
5334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5335 /* end confdefs.h.  */
5336
5337 int
5338 main ()
5339 {
5340
5341   ;
5342   return 0;
5343 }
5344 _ACEOF
5345 if ac_fn_cxx_try_compile "$LINENO"; then :
5346   pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=yes
5347 else
5348   pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=no
5349 fi
5350 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5351 ac_ext=c
5352 ac_cpp='$CPP $CPPFLAGS'
5353 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5354 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5355 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5356
5357 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5358 CXXFLAGS="$pgac_save_CXXFLAGS"
5359 CXX="$pgac_save_CXX"
5360 fi
5361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&5
5362 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&6; }
5363 if test x"$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" = x"yes"; then
5364   CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5365 fi
5366
5367
5368   # This was included in -Wall/-Wformat in older GCC versions
5369
5370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-security, for CFLAGS" >&5
5371 $as_echo_n "checking whether ${CC} supports -Wformat-security, for CFLAGS... " >&6; }
5372 if ${pgac_cv_prog_CC_cflags__Wformat_security+:} false; then :
5373   $as_echo_n "(cached) " >&6
5374 else
5375   pgac_save_CFLAGS=$CFLAGS
5376 pgac_save_CC=$CC
5377 CC=${CC}
5378 CFLAGS="${CFLAGS} -Wformat-security"
5379 ac_save_c_werror_flag=$ac_c_werror_flag
5380 ac_c_werror_flag=yes
5381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5382 /* end confdefs.h.  */
5383
5384 int
5385 main ()
5386 {
5387
5388   ;
5389   return 0;
5390 }
5391 _ACEOF
5392 if ac_fn_c_try_compile "$LINENO"; then :
5393   pgac_cv_prog_CC_cflags__Wformat_security=yes
5394 else
5395   pgac_cv_prog_CC_cflags__Wformat_security=no
5396 fi
5397 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5398 ac_c_werror_flag=$ac_save_c_werror_flag
5399 CFLAGS="$pgac_save_CFLAGS"
5400 CC="$pgac_save_CC"
5401 fi
5402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_security" >&5
5403 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_security" >&6; }
5404 if test x"$pgac_cv_prog_CC_cflags__Wformat_security" = x"yes"; then
5405   CFLAGS="${CFLAGS} -Wformat-security"
5406 fi
5407
5408
5409   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wformat-security, for CXXFLAGS" >&5
5410 $as_echo_n "checking whether ${CXX} supports -Wformat-security, for CXXFLAGS... " >&6; }
5411 if ${pgac_cv_prog_CXX_cxxflags__Wformat_security+:} false; then :
5412   $as_echo_n "(cached) " >&6
5413 else
5414   pgac_save_CXXFLAGS=$CXXFLAGS
5415 pgac_save_CXX=$CXX
5416 CXX=${CXX}
5417 CXXFLAGS="${CXXFLAGS} -Wformat-security"
5418 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5419 ac_cxx_werror_flag=yes
5420 ac_ext=cpp
5421 ac_cpp='$CXXCPP $CPPFLAGS'
5422 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5423 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5424 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5425
5426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5427 /* end confdefs.h.  */
5428
5429 int
5430 main ()
5431 {
5432
5433   ;
5434   return 0;
5435 }
5436 _ACEOF
5437 if ac_fn_cxx_try_compile "$LINENO"; then :
5438   pgac_cv_prog_CXX_cxxflags__Wformat_security=yes
5439 else
5440   pgac_cv_prog_CXX_cxxflags__Wformat_security=no
5441 fi
5442 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5443 ac_ext=c
5444 ac_cpp='$CPP $CPPFLAGS'
5445 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5446 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5447 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5448
5449 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5450 CXXFLAGS="$pgac_save_CXXFLAGS"
5451 CXX="$pgac_save_CXX"
5452 fi
5453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wformat_security" >&5
5454 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wformat_security" >&6; }
5455 if test x"$pgac_cv_prog_CXX_cxxflags__Wformat_security" = x"yes"; then
5456   CXXFLAGS="${CXXFLAGS} -Wformat-security"
5457 fi
5458
5459
5460   # Disable strict-aliasing rules; needed for gcc 3.3+
5461
5462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
5463 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
5464 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
5465   $as_echo_n "(cached) " >&6
5466 else
5467   pgac_save_CFLAGS=$CFLAGS
5468 pgac_save_CC=$CC
5469 CC=${CC}
5470 CFLAGS="${CFLAGS} -fno-strict-aliasing"
5471 ac_save_c_werror_flag=$ac_c_werror_flag
5472 ac_c_werror_flag=yes
5473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5474 /* end confdefs.h.  */
5475
5476 int
5477 main ()
5478 {
5479
5480   ;
5481   return 0;
5482 }
5483 _ACEOF
5484 if ac_fn_c_try_compile "$LINENO"; then :
5485   pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
5486 else
5487   pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
5488 fi
5489 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5490 ac_c_werror_flag=$ac_save_c_werror_flag
5491 CFLAGS="$pgac_save_CFLAGS"
5492 CC="$pgac_save_CC"
5493 fi
5494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
5495 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
5496 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
5497   CFLAGS="${CFLAGS} -fno-strict-aliasing"
5498 fi
5499
5500
5501   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
5502 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
5503 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
5504   $as_echo_n "(cached) " >&6
5505 else
5506   pgac_save_CXXFLAGS=$CXXFLAGS
5507 pgac_save_CXX=$CXX
5508 CXX=${CXX}
5509 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
5510 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5511 ac_cxx_werror_flag=yes
5512 ac_ext=cpp
5513 ac_cpp='$CXXCPP $CPPFLAGS'
5514 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5515 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5516 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5517
5518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5519 /* end confdefs.h.  */
5520
5521 int
5522 main ()
5523 {
5524
5525   ;
5526   return 0;
5527 }
5528 _ACEOF
5529 if ac_fn_cxx_try_compile "$LINENO"; then :
5530   pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
5531 else
5532   pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
5533 fi
5534 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5535 ac_ext=c
5536 ac_cpp='$CPP $CPPFLAGS'
5537 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5538 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5539 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5540
5541 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5542 CXXFLAGS="$pgac_save_CXXFLAGS"
5543 CXX="$pgac_save_CXX"
5544 fi
5545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
5546 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
5547 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
5548   CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
5549 fi
5550
5551
5552   # Disable optimizations that assume no overflow; needed for gcc 4.3+
5553
5554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fwrapv, for CFLAGS" >&5
5555 $as_echo_n "checking whether ${CC} supports -fwrapv, for CFLAGS... " >&6; }
5556 if ${pgac_cv_prog_CC_cflags__fwrapv+:} false; then :
5557   $as_echo_n "(cached) " >&6
5558 else
5559   pgac_save_CFLAGS=$CFLAGS
5560 pgac_save_CC=$CC
5561 CC=${CC}
5562 CFLAGS="${CFLAGS} -fwrapv"
5563 ac_save_c_werror_flag=$ac_c_werror_flag
5564 ac_c_werror_flag=yes
5565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5566 /* end confdefs.h.  */
5567
5568 int
5569 main ()
5570 {
5571
5572   ;
5573   return 0;
5574 }
5575 _ACEOF
5576 if ac_fn_c_try_compile "$LINENO"; then :
5577   pgac_cv_prog_CC_cflags__fwrapv=yes
5578 else
5579   pgac_cv_prog_CC_cflags__fwrapv=no
5580 fi
5581 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5582 ac_c_werror_flag=$ac_save_c_werror_flag
5583 CFLAGS="$pgac_save_CFLAGS"
5584 CC="$pgac_save_CC"
5585 fi
5586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fwrapv" >&5
5587 $as_echo "$pgac_cv_prog_CC_cflags__fwrapv" >&6; }
5588 if test x"$pgac_cv_prog_CC_cflags__fwrapv" = x"yes"; then
5589   CFLAGS="${CFLAGS} -fwrapv"
5590 fi
5591
5592
5593   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fwrapv, for CXXFLAGS" >&5
5594 $as_echo_n "checking whether ${CXX} supports -fwrapv, for CXXFLAGS... " >&6; }
5595 if ${pgac_cv_prog_CXX_cxxflags__fwrapv+:} false; then :
5596   $as_echo_n "(cached) " >&6
5597 else
5598   pgac_save_CXXFLAGS=$CXXFLAGS
5599 pgac_save_CXX=$CXX
5600 CXX=${CXX}
5601 CXXFLAGS="${CXXFLAGS} -fwrapv"
5602 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5603 ac_cxx_werror_flag=yes
5604 ac_ext=cpp
5605 ac_cpp='$CXXCPP $CPPFLAGS'
5606 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5607 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5608 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5609
5610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5611 /* end confdefs.h.  */
5612
5613 int
5614 main ()
5615 {
5616
5617   ;
5618   return 0;
5619 }
5620 _ACEOF
5621 if ac_fn_cxx_try_compile "$LINENO"; then :
5622   pgac_cv_prog_CXX_cxxflags__fwrapv=yes
5623 else
5624   pgac_cv_prog_CXX_cxxflags__fwrapv=no
5625 fi
5626 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5627 ac_ext=c
5628 ac_cpp='$CPP $CPPFLAGS'
5629 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5630 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5631 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5632
5633 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5634 CXXFLAGS="$pgac_save_CXXFLAGS"
5635 CXX="$pgac_save_CXX"
5636 fi
5637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fwrapv" >&5
5638 $as_echo "$pgac_cv_prog_CXX_cxxflags__fwrapv" >&6; }
5639 if test x"$pgac_cv_prog_CXX_cxxflags__fwrapv" = x"yes"; then
5640   CXXFLAGS="${CXXFLAGS} -fwrapv"
5641 fi
5642
5643
5644   # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
5645
5646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS" >&5
5647 $as_echo_n "checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS... " >&6; }
5648 if ${pgac_cv_prog_CC_cflags__fexcess_precision_standard+:} false; then :
5649   $as_echo_n "(cached) " >&6
5650 else
5651   pgac_save_CFLAGS=$CFLAGS
5652 pgac_save_CC=$CC
5653 CC=${CC}
5654 CFLAGS="${CFLAGS} -fexcess-precision=standard"
5655 ac_save_c_werror_flag=$ac_c_werror_flag
5656 ac_c_werror_flag=yes
5657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5658 /* end confdefs.h.  */
5659
5660 int
5661 main ()
5662 {
5663
5664   ;
5665   return 0;
5666 }
5667 _ACEOF
5668 if ac_fn_c_try_compile "$LINENO"; then :
5669   pgac_cv_prog_CC_cflags__fexcess_precision_standard=yes
5670 else
5671   pgac_cv_prog_CC_cflags__fexcess_precision_standard=no
5672 fi
5673 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5674 ac_c_werror_flag=$ac_save_c_werror_flag
5675 CFLAGS="$pgac_save_CFLAGS"
5676 CC="$pgac_save_CC"
5677 fi
5678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&5
5679 $as_echo "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&6; }
5680 if test x"$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = x"yes"; then
5681   CFLAGS="${CFLAGS} -fexcess-precision=standard"
5682 fi
5683
5684
5685   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS" >&5
5686 $as_echo_n "checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS... " >&6; }
5687 if ${pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard+:} false; then :
5688   $as_echo_n "(cached) " >&6
5689 else
5690   pgac_save_CXXFLAGS=$CXXFLAGS
5691 pgac_save_CXX=$CXX
5692 CXX=${CXX}
5693 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
5694 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5695 ac_cxx_werror_flag=yes
5696 ac_ext=cpp
5697 ac_cpp='$CXXCPP $CPPFLAGS'
5698 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5699 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5700 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5701
5702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5703 /* end confdefs.h.  */
5704
5705 int
5706 main ()
5707 {
5708
5709   ;
5710   return 0;
5711 }
5712 _ACEOF
5713 if ac_fn_cxx_try_compile "$LINENO"; then :
5714   pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=yes
5715 else
5716   pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=no
5717 fi
5718 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5719 ac_ext=c
5720 ac_cpp='$CPP $CPPFLAGS'
5721 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5722 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5723 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5724
5725 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5726 CXXFLAGS="$pgac_save_CXXFLAGS"
5727 CXX="$pgac_save_CXX"
5728 fi
5729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&5
5730 $as_echo "$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&6; }
5731 if test x"$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" = x"yes"; then
5732   CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
5733 fi
5734
5735
5736   # Optimization flags for specific files that benefit from vectorization
5737   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -funroll-loops, for CFLAGS_VECTOR" >&5
5738 $as_echo_n "checking whether ${CC} supports -funroll-loops, for CFLAGS_VECTOR... " >&6; }
5739 if ${pgac_cv_prog_CC_cflags__funroll_loops+:} false; then :
5740   $as_echo_n "(cached) " >&6
5741 else
5742   pgac_save_CFLAGS=$CFLAGS
5743 pgac_save_CC=$CC
5744 CC=${CC}
5745 CFLAGS="${CFLAGS_VECTOR} -funroll-loops"
5746 ac_save_c_werror_flag=$ac_c_werror_flag
5747 ac_c_werror_flag=yes
5748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5749 /* end confdefs.h.  */
5750
5751 int
5752 main ()
5753 {
5754
5755   ;
5756   return 0;
5757 }
5758 _ACEOF
5759 if ac_fn_c_try_compile "$LINENO"; then :
5760   pgac_cv_prog_CC_cflags__funroll_loops=yes
5761 else
5762   pgac_cv_prog_CC_cflags__funroll_loops=no
5763 fi
5764 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5765 ac_c_werror_flag=$ac_save_c_werror_flag
5766 CFLAGS="$pgac_save_CFLAGS"
5767 CC="$pgac_save_CC"
5768 fi
5769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__funroll_loops" >&5
5770 $as_echo "$pgac_cv_prog_CC_cflags__funroll_loops" >&6; }
5771 if test x"$pgac_cv_prog_CC_cflags__funroll_loops" = x"yes"; then
5772   CFLAGS_VECTOR="${CFLAGS_VECTOR} -funroll-loops"
5773 fi
5774
5775
5776   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTOR" >&5
5777 $as_echo_n "checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTOR... " >&6; }
5778 if ${pgac_cv_prog_CC_cflags__ftree_vectorize+:} false; then :
5779   $as_echo_n "(cached) " >&6
5780 else
5781   pgac_save_CFLAGS=$CFLAGS
5782 pgac_save_CC=$CC
5783 CC=${CC}
5784 CFLAGS="${CFLAGS_VECTOR} -ftree-vectorize"
5785 ac_save_c_werror_flag=$ac_c_werror_flag
5786 ac_c_werror_flag=yes
5787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5788 /* end confdefs.h.  */
5789
5790 int
5791 main ()
5792 {
5793
5794   ;
5795   return 0;
5796 }
5797 _ACEOF
5798 if ac_fn_c_try_compile "$LINENO"; then :
5799   pgac_cv_prog_CC_cflags__ftree_vectorize=yes
5800 else
5801   pgac_cv_prog_CC_cflags__ftree_vectorize=no
5802 fi
5803 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5804 ac_c_werror_flag=$ac_save_c_werror_flag
5805 CFLAGS="$pgac_save_CFLAGS"
5806 CC="$pgac_save_CC"
5807 fi
5808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__ftree_vectorize" >&5
5809 $as_echo "$pgac_cv_prog_CC_cflags__ftree_vectorize" >&6; }
5810 if test x"$pgac_cv_prog_CC_cflags__ftree_vectorize" = x"yes"; then
5811   CFLAGS_VECTOR="${CFLAGS_VECTOR} -ftree-vectorize"
5812 fi
5813
5814
5815   # We want to suppress clang's unhelpful unused-command-line-argument warnings
5816   # but gcc won't complain about unrecognized -Wno-foo switches, so we have to
5817   # test for the positive form and if that works, add the negative form
5818   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
5819 $as_echo_n "checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
5820 if ${pgac_cv_prog_CC_cflags__Wunused_command_line_argument+:} false; then :
5821   $as_echo_n "(cached) " >&6
5822 else
5823   pgac_save_CFLAGS=$CFLAGS
5824 pgac_save_CC=$CC
5825 CC=${CC}
5826 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
5827 ac_save_c_werror_flag=$ac_c_werror_flag
5828 ac_c_werror_flag=yes
5829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5830 /* end confdefs.h.  */
5831
5832 int
5833 main ()
5834 {
5835
5836   ;
5837   return 0;
5838 }
5839 _ACEOF
5840 if ac_fn_c_try_compile "$LINENO"; then :
5841   pgac_cv_prog_CC_cflags__Wunused_command_line_argument=yes
5842 else
5843   pgac_cv_prog_CC_cflags__Wunused_command_line_argument=no
5844 fi
5845 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5846 ac_c_werror_flag=$ac_save_c_werror_flag
5847 CFLAGS="$pgac_save_CFLAGS"
5848 CC="$pgac_save_CC"
5849 fi
5850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&5
5851 $as_echo "$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&6; }
5852 if test x"$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" = x"yes"; then
5853   NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
5854 fi
5855
5856
5857   if test -n "$NOT_THE_CFLAGS"; then
5858     CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
5859   fi
5860 elif test "$ICC" = yes; then
5861   # Intel's compiler has a bug/misoptimization in checking for
5862   # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
5863
5864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -mp1, for CFLAGS" >&5
5865 $as_echo_n "checking whether ${CC} supports -mp1, for CFLAGS... " >&6; }
5866 if ${pgac_cv_prog_CC_cflags__mp1+:} 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="${CFLAGS} -mp1"
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__mp1=yes
5888 else
5889   pgac_cv_prog_CC_cflags__mp1=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__mp1" >&5
5897 $as_echo "$pgac_cv_prog_CC_cflags__mp1" >&6; }
5898 if test x"$pgac_cv_prog_CC_cflags__mp1" = x"yes"; then
5899   CFLAGS="${CFLAGS} -mp1"
5900 fi
5901
5902
5903   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -mp1, for CXXFLAGS" >&5
5904 $as_echo_n "checking whether ${CXX} supports -mp1, for CXXFLAGS... " >&6; }
5905 if ${pgac_cv_prog_CXX_cxxflags__mp1+:} false; then :
5906   $as_echo_n "(cached) " >&6
5907 else
5908   pgac_save_CXXFLAGS=$CXXFLAGS
5909 pgac_save_CXX=$CXX
5910 CXX=${CXX}
5911 CXXFLAGS="${CXXFLAGS} -mp1"
5912 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5913 ac_cxx_werror_flag=yes
5914 ac_ext=cpp
5915 ac_cpp='$CXXCPP $CPPFLAGS'
5916 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5917 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5918 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5919
5920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5921 /* end confdefs.h.  */
5922
5923 int
5924 main ()
5925 {
5926
5927   ;
5928   return 0;
5929 }
5930 _ACEOF
5931 if ac_fn_cxx_try_compile "$LINENO"; then :
5932   pgac_cv_prog_CXX_cxxflags__mp1=yes
5933 else
5934   pgac_cv_prog_CXX_cxxflags__mp1=no
5935 fi
5936 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5937 ac_ext=c
5938 ac_cpp='$CPP $CPPFLAGS'
5939 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5940 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5941 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5942
5943 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5944 CXXFLAGS="$pgac_save_CXXFLAGS"
5945 CXX="$pgac_save_CXX"
5946 fi
5947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__mp1" >&5
5948 $as_echo "$pgac_cv_prog_CXX_cxxflags__mp1" >&6; }
5949 if test x"$pgac_cv_prog_CXX_cxxflags__mp1" = x"yes"; then
5950   CXXFLAGS="${CXXFLAGS} -mp1"
5951 fi
5952
5953
5954   # Make sure strict aliasing is off (though this is said to be the default)
5955
5956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
5957 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
5958 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
5959   $as_echo_n "(cached) " >&6
5960 else
5961   pgac_save_CFLAGS=$CFLAGS
5962 pgac_save_CC=$CC
5963 CC=${CC}
5964 CFLAGS="${CFLAGS} -fno-strict-aliasing"
5965 ac_save_c_werror_flag=$ac_c_werror_flag
5966 ac_c_werror_flag=yes
5967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5968 /* end confdefs.h.  */
5969
5970 int
5971 main ()
5972 {
5973
5974   ;
5975   return 0;
5976 }
5977 _ACEOF
5978 if ac_fn_c_try_compile "$LINENO"; then :
5979   pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
5980 else
5981   pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
5982 fi
5983 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5984 ac_c_werror_flag=$ac_save_c_werror_flag
5985 CFLAGS="$pgac_save_CFLAGS"
5986 CC="$pgac_save_CC"
5987 fi
5988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
5989 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
5990 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
5991   CFLAGS="${CFLAGS} -fno-strict-aliasing"
5992 fi
5993
5994
5995   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
5996 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
5997 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
5998   $as_echo_n "(cached) " >&6
5999 else
6000   pgac_save_CXXFLAGS=$CXXFLAGS
6001 pgac_save_CXX=$CXX
6002 CXX=${CXX}
6003 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6004 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6005 ac_cxx_werror_flag=yes
6006 ac_ext=cpp
6007 ac_cpp='$CXXCPP $CPPFLAGS'
6008 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6009 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6010 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6011
6012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6013 /* end confdefs.h.  */
6014
6015 int
6016 main ()
6017 {
6018
6019   ;
6020   return 0;
6021 }
6022 _ACEOF
6023 if ac_fn_cxx_try_compile "$LINENO"; then :
6024   pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6025 else
6026   pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6027 fi
6028 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6029 ac_ext=c
6030 ac_cpp='$CPP $CPPFLAGS'
6031 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6032 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6033 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6034
6035 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6036 CXXFLAGS="$pgac_save_CXXFLAGS"
6037 CXX="$pgac_save_CXX"
6038 fi
6039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6040 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6041 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6042   CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6043 fi
6044
6045
6046 elif test "$PORTNAME" = "aix"; then
6047   # AIX's xlc has to have strict aliasing turned off too
6048
6049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qnoansialias, for CFLAGS" >&5
6050 $as_echo_n "checking whether ${CC} supports -qnoansialias, for CFLAGS... " >&6; }
6051 if ${pgac_cv_prog_CC_cflags__qnoansialias+:} false; then :
6052   $as_echo_n "(cached) " >&6
6053 else
6054   pgac_save_CFLAGS=$CFLAGS
6055 pgac_save_CC=$CC
6056 CC=${CC}
6057 CFLAGS="${CFLAGS} -qnoansialias"
6058 ac_save_c_werror_flag=$ac_c_werror_flag
6059 ac_c_werror_flag=yes
6060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6061 /* end confdefs.h.  */
6062
6063 int
6064 main ()
6065 {
6066
6067   ;
6068   return 0;
6069 }
6070 _ACEOF
6071 if ac_fn_c_try_compile "$LINENO"; then :
6072   pgac_cv_prog_CC_cflags__qnoansialias=yes
6073 else
6074   pgac_cv_prog_CC_cflags__qnoansialias=no
6075 fi
6076 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6077 ac_c_werror_flag=$ac_save_c_werror_flag
6078 CFLAGS="$pgac_save_CFLAGS"
6079 CC="$pgac_save_CC"
6080 fi
6081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qnoansialias" >&5
6082 $as_echo "$pgac_cv_prog_CC_cflags__qnoansialias" >&6; }
6083 if test x"$pgac_cv_prog_CC_cflags__qnoansialias" = x"yes"; then
6084   CFLAGS="${CFLAGS} -qnoansialias"
6085 fi
6086
6087
6088   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qnoansialias, for CXXFLAGS" >&5
6089 $as_echo_n "checking whether ${CXX} supports -qnoansialias, for CXXFLAGS... " >&6; }
6090 if ${pgac_cv_prog_CXX_cxxflags__qnoansialias+:} false; then :
6091   $as_echo_n "(cached) " >&6
6092 else
6093   pgac_save_CXXFLAGS=$CXXFLAGS
6094 pgac_save_CXX=$CXX
6095 CXX=${CXX}
6096 CXXFLAGS="${CXXFLAGS} -qnoansialias"
6097 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6098 ac_cxx_werror_flag=yes
6099 ac_ext=cpp
6100 ac_cpp='$CXXCPP $CPPFLAGS'
6101 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6102 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6103 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6104
6105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6106 /* end confdefs.h.  */
6107
6108 int
6109 main ()
6110 {
6111
6112   ;
6113   return 0;
6114 }
6115 _ACEOF
6116 if ac_fn_cxx_try_compile "$LINENO"; then :
6117   pgac_cv_prog_CXX_cxxflags__qnoansialias=yes
6118 else
6119   pgac_cv_prog_CXX_cxxflags__qnoansialias=no
6120 fi
6121 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6122 ac_ext=c
6123 ac_cpp='$CPP $CPPFLAGS'
6124 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6125 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6126 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6127
6128 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6129 CXXFLAGS="$pgac_save_CXXFLAGS"
6130 CXX="$pgac_save_CXX"
6131 fi
6132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qnoansialias" >&5
6133 $as_echo "$pgac_cv_prog_CXX_cxxflags__qnoansialias" >&6; }
6134 if test x"$pgac_cv_prog_CXX_cxxflags__qnoansialias" = x"yes"; then
6135   CXXFLAGS="${CXXFLAGS} -qnoansialias"
6136 fi
6137
6138
6139
6140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qlonglong, for CFLAGS" >&5
6141 $as_echo_n "checking whether ${CC} supports -qlonglong, for CFLAGS... " >&6; }
6142 if ${pgac_cv_prog_CC_cflags__qlonglong+:} false; then :
6143   $as_echo_n "(cached) " >&6
6144 else
6145   pgac_save_CFLAGS=$CFLAGS
6146 pgac_save_CC=$CC
6147 CC=${CC}
6148 CFLAGS="${CFLAGS} -qlonglong"
6149 ac_save_c_werror_flag=$ac_c_werror_flag
6150 ac_c_werror_flag=yes
6151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6152 /* end confdefs.h.  */
6153
6154 int
6155 main ()
6156 {
6157
6158   ;
6159   return 0;
6160 }
6161 _ACEOF
6162 if ac_fn_c_try_compile "$LINENO"; then :
6163   pgac_cv_prog_CC_cflags__qlonglong=yes
6164 else
6165   pgac_cv_prog_CC_cflags__qlonglong=no
6166 fi
6167 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6168 ac_c_werror_flag=$ac_save_c_werror_flag
6169 CFLAGS="$pgac_save_CFLAGS"
6170 CC="$pgac_save_CC"
6171 fi
6172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qlonglong" >&5
6173 $as_echo "$pgac_cv_prog_CC_cflags__qlonglong" >&6; }
6174 if test x"$pgac_cv_prog_CC_cflags__qlonglong" = x"yes"; then
6175   CFLAGS="${CFLAGS} -qlonglong"
6176 fi
6177
6178
6179   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qlonglong, for CXXFLAGS" >&5
6180 $as_echo_n "checking whether ${CXX} supports -qlonglong, for CXXFLAGS... " >&6; }
6181 if ${pgac_cv_prog_CXX_cxxflags__qlonglong+:} false; then :
6182   $as_echo_n "(cached) " >&6
6183 else
6184   pgac_save_CXXFLAGS=$CXXFLAGS
6185 pgac_save_CXX=$CXX
6186 CXX=${CXX}
6187 CXXFLAGS="${CXXFLAGS} -qlonglong"
6188 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6189 ac_cxx_werror_flag=yes
6190 ac_ext=cpp
6191 ac_cpp='$CXXCPP $CPPFLAGS'
6192 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6193 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6194 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6195
6196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6197 /* end confdefs.h.  */
6198
6199 int
6200 main ()
6201 {
6202
6203   ;
6204   return 0;
6205 }
6206 _ACEOF
6207 if ac_fn_cxx_try_compile "$LINENO"; then :
6208   pgac_cv_prog_CXX_cxxflags__qlonglong=yes
6209 else
6210   pgac_cv_prog_CXX_cxxflags__qlonglong=no
6211 fi
6212 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6213 ac_ext=c
6214 ac_cpp='$CPP $CPPFLAGS'
6215 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6216 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6217 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6218
6219 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6220 CXXFLAGS="$pgac_save_CXXFLAGS"
6221 CXX="$pgac_save_CXX"
6222 fi
6223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qlonglong" >&5
6224 $as_echo "$pgac_cv_prog_CXX_cxxflags__qlonglong" >&6; }
6225 if test x"$pgac_cv_prog_CXX_cxxflags__qlonglong" = x"yes"; then
6226   CXXFLAGS="${CXXFLAGS} -qlonglong"
6227 fi
6228
6229
6230 elif test "$PORTNAME" = "hpux"; then
6231   # On some versions of HP-UX, libm functions do not set errno by default.
6232   # Fix that by using +Olibmerrno if the compiler recognizes it.
6233
6234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports +Olibmerrno, for CFLAGS" >&5
6235 $as_echo_n "checking whether ${CC} supports +Olibmerrno, for CFLAGS... " >&6; }
6236 if ${pgac_cv_prog_CC_cflags_pOlibmerrno+:} false; then :
6237   $as_echo_n "(cached) " >&6
6238 else
6239   pgac_save_CFLAGS=$CFLAGS
6240 pgac_save_CC=$CC
6241 CC=${CC}
6242 CFLAGS="${CFLAGS} +Olibmerrno"
6243 ac_save_c_werror_flag=$ac_c_werror_flag
6244 ac_c_werror_flag=yes
6245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6246 /* end confdefs.h.  */
6247
6248 int
6249 main ()
6250 {
6251
6252   ;
6253   return 0;
6254 }
6255 _ACEOF
6256 if ac_fn_c_try_compile "$LINENO"; then :
6257   pgac_cv_prog_CC_cflags_pOlibmerrno=yes
6258 else
6259   pgac_cv_prog_CC_cflags_pOlibmerrno=no
6260 fi
6261 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6262 ac_c_werror_flag=$ac_save_c_werror_flag
6263 CFLAGS="$pgac_save_CFLAGS"
6264 CC="$pgac_save_CC"
6265 fi
6266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags_pOlibmerrno" >&5
6267 $as_echo "$pgac_cv_prog_CC_cflags_pOlibmerrno" >&6; }
6268 if test x"$pgac_cv_prog_CC_cflags_pOlibmerrno" = x"yes"; then
6269   CFLAGS="${CFLAGS} +Olibmerrno"
6270 fi
6271
6272
6273   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS" >&5
6274 $as_echo_n "checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS... " >&6; }
6275 if ${pgac_cv_prog_CXX_cxxflags_pOlibmerrno+:} false; then :
6276   $as_echo_n "(cached) " >&6
6277 else
6278   pgac_save_CXXFLAGS=$CXXFLAGS
6279 pgac_save_CXX=$CXX
6280 CXX=${CXX}
6281 CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6282 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6283 ac_cxx_werror_flag=yes
6284 ac_ext=cpp
6285 ac_cpp='$CXXCPP $CPPFLAGS'
6286 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6287 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6288 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6289
6290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6291 /* end confdefs.h.  */
6292
6293 int
6294 main ()
6295 {
6296
6297   ;
6298   return 0;
6299 }
6300 _ACEOF
6301 if ac_fn_cxx_try_compile "$LINENO"; then :
6302   pgac_cv_prog_CXX_cxxflags_pOlibmerrno=yes
6303 else
6304   pgac_cv_prog_CXX_cxxflags_pOlibmerrno=no
6305 fi
6306 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6307 ac_ext=c
6308 ac_cpp='$CPP $CPPFLAGS'
6309 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6310 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6311 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6312
6313 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6314 CXXFLAGS="$pgac_save_CXXFLAGS"
6315 CXX="$pgac_save_CXX"
6316 fi
6317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&5
6318 $as_echo "$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&6; }
6319 if test x"$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" = x"yes"; then
6320   CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6321 fi
6322
6323
6324 fi
6325
6326 CFLAGS_VECTOR=$CFLAGS_VECTOR
6327
6328
6329 # Determine flags used to emit bitcode for JIT inlining. Need to test
6330 # for behaviour changing compiler flags, to keep compatibility with
6331 # compiler used for normal postgres code.
6332 if test "$with_llvm" = yes ; then
6333   CLANGXX="$CLANG -xc++"
6334
6335   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS" >&5
6336 $as_echo_n "checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS... " >&6; }
6337 if ${pgac_cv_prog_CLANG_cflags__fno_strict_aliasing+:} false; then :
6338   $as_echo_n "(cached) " >&6
6339 else
6340   pgac_save_CFLAGS=$CFLAGS
6341 pgac_save_CC=$CC
6342 CC=${CLANG}
6343 CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6344 ac_save_c_werror_flag=$ac_c_werror_flag
6345 ac_c_werror_flag=yes
6346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6347 /* end confdefs.h.  */
6348
6349 int
6350 main ()
6351 {
6352
6353   ;
6354   return 0;
6355 }
6356 _ACEOF
6357 if ac_fn_c_try_compile "$LINENO"; then :
6358   pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=yes
6359 else
6360   pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=no
6361 fi
6362 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6363 ac_c_werror_flag=$ac_save_c_werror_flag
6364 CFLAGS="$pgac_save_CFLAGS"
6365 CC="$pgac_save_CC"
6366 fi
6367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&5
6368 $as_echo "$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&6; }
6369 if test x"$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" = x"yes"; then
6370   BITCODE_CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6371 fi
6372
6373   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS" >&5
6374 $as_echo_n "checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS... " >&6; }
6375 if ${pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing+:} false; then :
6376   $as_echo_n "(cached) " >&6
6377 else
6378   pgac_save_CXXFLAGS=$CXXFLAGS
6379 pgac_save_CXX=$CXX
6380 CXX=${CLANGXX}
6381 CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
6382 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6383 ac_cxx_werror_flag=yes
6384 ac_ext=cpp
6385 ac_cpp='$CXXCPP $CPPFLAGS'
6386 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6387 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6388 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6389
6390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6391 /* end confdefs.h.  */
6392
6393 int
6394 main ()
6395 {
6396
6397   ;
6398   return 0;
6399 }
6400 _ACEOF
6401 if ac_fn_cxx_try_compile "$LINENO"; then :
6402   pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=yes
6403 else
6404   pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=no
6405 fi
6406 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6407 ac_ext=c
6408 ac_cpp='$CPP $CPPFLAGS'
6409 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6410 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6411 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6412
6413 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6414 CXXFLAGS="$pgac_save_CXXFLAGS"
6415 CXX="$pgac_save_CXX"
6416 fi
6417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&5
6418 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&6; }
6419 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6420   BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
6421 fi
6422
6423   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS" >&5
6424 $as_echo_n "checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS... " >&6; }
6425 if ${pgac_cv_prog_CLANG_cflags__fwrapv+:} false; then :
6426   $as_echo_n "(cached) " >&6
6427 else
6428   pgac_save_CFLAGS=$CFLAGS
6429 pgac_save_CC=$CC
6430 CC=${CLANG}
6431 CFLAGS="${BITCODE_CFLAGS} -fwrapv"
6432 ac_save_c_werror_flag=$ac_c_werror_flag
6433 ac_c_werror_flag=yes
6434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6435 /* end confdefs.h.  */
6436
6437 int
6438 main ()
6439 {
6440
6441   ;
6442   return 0;
6443 }
6444 _ACEOF
6445 if ac_fn_c_try_compile "$LINENO"; then :
6446   pgac_cv_prog_CLANG_cflags__fwrapv=yes
6447 else
6448   pgac_cv_prog_CLANG_cflags__fwrapv=no
6449 fi
6450 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6451 ac_c_werror_flag=$ac_save_c_werror_flag
6452 CFLAGS="$pgac_save_CFLAGS"
6453 CC="$pgac_save_CC"
6454 fi
6455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fwrapv" >&5
6456 $as_echo "$pgac_cv_prog_CLANG_cflags__fwrapv" >&6; }
6457 if test x"$pgac_cv_prog_CLANG_cflags__fwrapv" = x"yes"; then
6458   BITCODE_CFLAGS="${BITCODE_CFLAGS} -fwrapv"
6459 fi
6460
6461   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS" >&5
6462 $as_echo_n "checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS... " >&6; }
6463 if ${pgac_cv_prog_CLANGXX_cxxflags__fwrapv+:} false; then :
6464   $as_echo_n "(cached) " >&6
6465 else
6466   pgac_save_CXXFLAGS=$CXXFLAGS
6467 pgac_save_CXX=$CXX
6468 CXX=${CLANGXX}
6469 CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
6470 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6471 ac_cxx_werror_flag=yes
6472 ac_ext=cpp
6473 ac_cpp='$CXXCPP $CPPFLAGS'
6474 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6475 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6476 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6477
6478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6479 /* end confdefs.h.  */
6480
6481 int
6482 main ()
6483 {
6484
6485   ;
6486   return 0;
6487 }
6488 _ACEOF
6489 if ac_fn_cxx_try_compile "$LINENO"; then :
6490   pgac_cv_prog_CLANGXX_cxxflags__fwrapv=yes
6491 else
6492   pgac_cv_prog_CLANGXX_cxxflags__fwrapv=no
6493 fi
6494 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6495 ac_ext=c
6496 ac_cpp='$CPP $CPPFLAGS'
6497 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6498 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6499 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6500
6501 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6502 CXXFLAGS="$pgac_save_CXXFLAGS"
6503 CXX="$pgac_save_CXX"
6504 fi
6505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&5
6506 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&6; }
6507 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" = x"yes"; then
6508   BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
6509 fi
6510
6511   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS" >&5
6512 $as_echo_n "checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS... " >&6; }
6513 if ${pgac_cv_prog_CLANG_cflags__fexcess_precision_standard+:} false; then :
6514   $as_echo_n "(cached) " >&6
6515 else
6516   pgac_save_CFLAGS=$CFLAGS
6517 pgac_save_CC=$CC
6518 CC=${CLANG}
6519 CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
6520 ac_save_c_werror_flag=$ac_c_werror_flag
6521 ac_c_werror_flag=yes
6522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6523 /* end confdefs.h.  */
6524
6525 int
6526 main ()
6527 {
6528
6529   ;
6530   return 0;
6531 }
6532 _ACEOF
6533 if ac_fn_c_try_compile "$LINENO"; then :
6534   pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=yes
6535 else
6536   pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=no
6537 fi
6538 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6539 ac_c_werror_flag=$ac_save_c_werror_flag
6540 CFLAGS="$pgac_save_CFLAGS"
6541 CC="$pgac_save_CC"
6542 fi
6543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&5
6544 $as_echo "$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&6; }
6545 if test x"$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" = x"yes"; then
6546   BITCODE_CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
6547 fi
6548
6549   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS" >&5
6550 $as_echo_n "checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS... " >&6; }
6551 if ${pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard+:} false; then :
6552   $as_echo_n "(cached) " >&6
6553 else
6554   pgac_save_CXXFLAGS=$CXXFLAGS
6555 pgac_save_CXX=$CXX
6556 CXX=${CLANGXX}
6557 CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
6558 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6559 ac_cxx_werror_flag=yes
6560 ac_ext=cpp
6561 ac_cpp='$CXXCPP $CPPFLAGS'
6562 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6563 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6564 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6565
6566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6567 /* end confdefs.h.  */
6568
6569 int
6570 main ()
6571 {
6572
6573   ;
6574   return 0;
6575 }
6576 _ACEOF
6577 if ac_fn_cxx_try_compile "$LINENO"; then :
6578   pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=yes
6579 else
6580   pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=no
6581 fi
6582 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6583 ac_ext=c
6584 ac_cpp='$CPP $CPPFLAGS'
6585 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6586 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6587 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6588
6589 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6590 CXXFLAGS="$pgac_save_CXXFLAGS"
6591 CXX="$pgac_save_CXX"
6592 fi
6593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&5
6594 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&6; }
6595 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" = x"yes"; then
6596   BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
6597 fi
6598
6599 fi
6600
6601 # supply -g if --enable-debug
6602 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
6603   CFLAGS="$CFLAGS -g"
6604 fi
6605
6606 if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then
6607   CXXFLAGS="$CXXFLAGS -g"
6608 fi
6609
6610 # enable code coverage if --enable-coverage
6611 if test "$enable_coverage" = yes; then
6612   if test "$GCC" = yes; then
6613     CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
6614     CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
6615   else
6616     as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
6617   fi
6618 fi
6619
6620 # enable profiling if --enable-profiling
6621 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
6622   if test "$GCC" = yes; then
6623
6624 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
6625
6626     CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
6627     CXXFLAGS="$CXXFLAGS -pg $PLATFORM_PROFILE_FLAGS"
6628   else
6629     as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
6630   fi
6631 fi
6632
6633 # We already have this in Makefile.win32, but configure needs it too
6634 if test "$PORTNAME" = "win32"; then
6635   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
6636 fi
6637
6638 # Now that we're done automatically adding stuff to C[XX]FLAGS, put back the
6639 # user-specified flags (if any) at the end.  This lets users override
6640 # the automatic additions.
6641 CFLAGS="$CFLAGS $user_CFLAGS"
6642 CXXFLAGS="$CXXFLAGS $user_CXXFLAGS"
6643 BITCODE_CFLAGS="$BITCODE_CFLAGS $user_BITCODE_CFLAGS"
6644 BITCODE_CXXFLAGS="$BITCODE_CXXFLAGS $user_BITCODE_CXXFLAGS"
6645
6646 BITCODE_CFLAGS=$BITCODE_CFLAGS
6647
6648 BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
6649
6650
6651 # Check if the compiler still works with the final flag settings
6652 # (note, we're not checking that for CXX, which is optional)
6653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
6654 $as_echo_n "checking whether the C compiler still works... " >&6; }
6655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6656 /* end confdefs.h.  */
6657
6658 int
6659 main ()
6660 {
6661 return 0;
6662   ;
6663   return 0;
6664 }
6665 _ACEOF
6666 if ac_fn_c_try_link "$LINENO"; then :
6667   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6668 $as_echo "yes" >&6; }
6669 else
6670   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6671 $as_echo "no" >&6; }
6672    as_fn_error $? "cannot proceed" "$LINENO" 5
6673 fi
6674 rm -f core conftest.err conftest.$ac_objext \
6675     conftest$ac_exeext conftest.$ac_ext
6676
6677 # Defend against gcc -ffast-math
6678 if test "$GCC" = yes; then
6679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6680 /* end confdefs.h.  */
6681
6682 int
6683 main ()
6684 {
6685 #ifdef __FAST_MATH__
6686 choke me
6687 #endif
6688   ;
6689   return 0;
6690 }
6691 _ACEOF
6692 if ac_fn_c_try_compile "$LINENO"; then :
6693
6694 else
6695   as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
6696 fi
6697 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6698 fi
6699
6700 ac_ext=c
6701 ac_cpp='$CPP $CPPFLAGS'
6702 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6703 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6704 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
6706 $as_echo_n "checking how to run the C preprocessor... " >&6; }
6707 # On Suns, sometimes $CPP names a directory.
6708 if test -n "$CPP" && test -d "$CPP"; then
6709   CPP=
6710 fi
6711 if test -z "$CPP"; then
6712   if ${ac_cv_prog_CPP+:} false; then :
6713   $as_echo_n "(cached) " >&6
6714 else
6715       # Double quotes because CPP needs to be expanded
6716     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
6717     do
6718       ac_preproc_ok=false
6719 for ac_c_preproc_warn_flag in '' yes
6720 do
6721   # Use a header file that comes with gcc, so configuring glibc
6722   # with a fresh cross-compiler works.
6723   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6724   # <limits.h> exists even on freestanding compilers.
6725   # On the NeXT, cc -E runs the code through the compiler's parser,
6726   # not just through cpp. "Syntax error" is here to catch this case.
6727   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6728 /* end confdefs.h.  */
6729 #ifdef __STDC__
6730 # include <limits.h>
6731 #else
6732 # include <assert.h>
6733 #endif
6734                      Syntax error
6735 _ACEOF
6736 if ac_fn_c_try_cpp "$LINENO"; then :
6737
6738 else
6739   # Broken: fails on valid input.
6740 continue
6741 fi
6742 rm -f conftest.err conftest.i conftest.$ac_ext
6743
6744   # OK, works on sane cases.  Now check whether nonexistent headers
6745   # can be detected and how.
6746   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6747 /* end confdefs.h.  */
6748 #include <ac_nonexistent.h>
6749 _ACEOF
6750 if ac_fn_c_try_cpp "$LINENO"; then :
6751   # Broken: success on invalid input.
6752 continue
6753 else
6754   # Passes both tests.
6755 ac_preproc_ok=:
6756 break
6757 fi
6758 rm -f conftest.err conftest.i conftest.$ac_ext
6759
6760 done
6761 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6762 rm -f conftest.i conftest.err conftest.$ac_ext
6763 if $ac_preproc_ok; then :
6764   break
6765 fi
6766
6767     done
6768     ac_cv_prog_CPP=$CPP
6769
6770 fi
6771   CPP=$ac_cv_prog_CPP
6772 else
6773   ac_cv_prog_CPP=$CPP
6774 fi
6775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
6776 $as_echo "$CPP" >&6; }
6777 ac_preproc_ok=false
6778 for ac_c_preproc_warn_flag in '' yes
6779 do
6780   # Use a header file that comes with gcc, so configuring glibc
6781   # with a fresh cross-compiler works.
6782   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6783   # <limits.h> exists even on freestanding compilers.
6784   # On the NeXT, cc -E runs the code through the compiler's parser,
6785   # not just through cpp. "Syntax error" is here to catch this case.
6786   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6787 /* end confdefs.h.  */
6788 #ifdef __STDC__
6789 # include <limits.h>
6790 #else
6791 # include <assert.h>
6792 #endif
6793                      Syntax error
6794 _ACEOF
6795 if ac_fn_c_try_cpp "$LINENO"; then :
6796
6797 else
6798   # Broken: fails on valid input.
6799 continue
6800 fi
6801 rm -f conftest.err conftest.i conftest.$ac_ext
6802
6803   # OK, works on sane cases.  Now check whether nonexistent headers
6804   # can be detected and how.
6805   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6806 /* end confdefs.h.  */
6807 #include <ac_nonexistent.h>
6808 _ACEOF
6809 if ac_fn_c_try_cpp "$LINENO"; then :
6810   # Broken: success on invalid input.
6811 continue
6812 else
6813   # Passes both tests.
6814 ac_preproc_ok=:
6815 break
6816 fi
6817 rm -f conftest.err conftest.i conftest.$ac_ext
6818
6819 done
6820 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6821 rm -f conftest.i conftest.err conftest.$ac_ext
6822 if $ac_preproc_ok; then :
6823
6824 else
6825   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6826 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6827 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
6828 See \`config.log' for more details" "$LINENO" 5; }
6829 fi
6830
6831 ac_ext=c
6832 ac_cpp='$CPP $CPPFLAGS'
6833 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6834 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6835 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6836
6837
6838
6839
6840 #
6841 # Set up TAS assembly code if needed; the template file has now had its
6842 # chance to request this.
6843 #
6844 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
6845
6846
6847 if test "$need_tas" = yes ; then
6848   TAS=tas.o
6849 else
6850   TAS=""
6851 fi
6852
6853
6854
6855 #
6856 # Automatic dependency tracking
6857 #
6858
6859
6860 # Check whether --enable-depend was given.
6861 if test "${enable_depend+set}" = set; then :
6862   enableval=$enable_depend;
6863   case $enableval in
6864     yes)
6865       autodepend=yes
6866       ;;
6867     no)
6868       :
6869       ;;
6870     *)
6871       as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
6872       ;;
6873   esac
6874
6875 else
6876   enable_depend=no
6877
6878 fi
6879
6880
6881
6882
6883
6884 #
6885 # Enable assert checks
6886 #
6887
6888
6889 # Check whether --enable-cassert was given.
6890 if test "${enable_cassert+set}" = set; then :
6891   enableval=$enable_cassert;
6892   case $enableval in
6893     yes)
6894
6895 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
6896
6897       ;;
6898     no)
6899       :
6900       ;;
6901     *)
6902       as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
6903       ;;
6904   esac
6905
6906 else
6907   enable_cassert=no
6908
6909 fi
6910
6911
6912
6913
6914 #
6915 # Include directories
6916 #
6917 ac_save_IFS=$IFS
6918 IFS="${IFS}${PATH_SEPARATOR}"
6919 # SRCH_INC comes from the template file
6920 for dir in $with_includes $SRCH_INC; do
6921   if test -d "$dir"; then
6922     INCLUDES="$INCLUDES -I$dir"
6923   else
6924     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
6925 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
6926   fi
6927 done
6928 IFS=$ac_save_IFS
6929
6930
6931
6932 #
6933 # Library directories
6934 #
6935 ac_save_IFS=$IFS
6936 IFS="${IFS}${PATH_SEPARATOR}"
6937 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
6938 for dir in $LIBRARY_DIRS $SRCH_LIB; do
6939   if test -d "$dir"; then
6940     LIBDIRS="$LIBDIRS -L$dir"
6941   else
6942     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
6943 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
6944   fi
6945 done
6946 IFS=$ac_save_IFS
6947
6948 #
6949 # Enable thread-safe client libraries
6950 #
6951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
6952 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
6953
6954
6955 # Check whether --enable-thread-safety was given.
6956 if test "${enable_thread_safety+set}" = set; then :
6957   enableval=$enable_thread_safety;
6958   case $enableval in
6959     yes)
6960       :
6961       ;;
6962     no)
6963       :
6964       ;;
6965     *)
6966       as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
6967       ;;
6968   esac
6969
6970 else
6971   enable_thread_safety=yes
6972
6973 fi
6974
6975
6976 if test "$enable_thread_safety" = yes; then
6977
6978 $as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
6979
6980 fi
6981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
6982 $as_echo "$enable_thread_safety" >&6; }
6983
6984
6985 #
6986 # ICU
6987 #
6988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ICU support" >&5
6989 $as_echo_n "checking whether to build with ICU support... " >&6; }
6990
6991
6992
6993 # Check whether --with-icu was given.
6994 if test "${with_icu+set}" = set; then :
6995   withval=$with_icu;
6996   case $withval in
6997     yes)
6998
6999 $as_echo "#define USE_ICU 1" >>confdefs.h
7000
7001       ;;
7002     no)
7003       :
7004       ;;
7005     *)
7006       as_fn_error $? "no argument expected for --with-icu option" "$LINENO" 5
7007       ;;
7008   esac
7009
7010 else
7011   with_icu=no
7012
7013 fi
7014
7015
7016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icu" >&5
7017 $as_echo "$with_icu" >&6; }
7018
7019
7020 if test "$with_icu" = yes; then
7021
7022
7023
7024
7025
7026
7027
7028 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7029         if test -n "$ac_tool_prefix"; then
7030   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
7031 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
7032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7033 $as_echo_n "checking for $ac_word... " >&6; }
7034 if ${ac_cv_path_PKG_CONFIG+:} false; then :
7035   $as_echo_n "(cached) " >&6
7036 else
7037   case $PKG_CONFIG in
7038   [\\/]* | ?:[\\/]*)
7039   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
7040   ;;
7041   *)
7042   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7043 for as_dir in $PATH
7044 do
7045   IFS=$as_save_IFS
7046   test -z "$as_dir" && as_dir=.
7047     for ac_exec_ext in '' $ac_executable_extensions; do
7048   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7049     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7050     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7051     break 2
7052   fi
7053 done
7054   done
7055 IFS=$as_save_IFS
7056
7057   ;;
7058 esac
7059 fi
7060 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
7061 if test -n "$PKG_CONFIG"; then
7062   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
7063 $as_echo "$PKG_CONFIG" >&6; }
7064 else
7065   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7066 $as_echo "no" >&6; }
7067 fi
7068
7069
7070 fi
7071 if test -z "$ac_cv_path_PKG_CONFIG"; then
7072   ac_pt_PKG_CONFIG=$PKG_CONFIG
7073   # Extract the first word of "pkg-config", so it can be a program name with args.
7074 set dummy pkg-config; ac_word=$2
7075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7076 $as_echo_n "checking for $ac_word... " >&6; }
7077 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
7078   $as_echo_n "(cached) " >&6
7079 else
7080   case $ac_pt_PKG_CONFIG in
7081   [\\/]* | ?:[\\/]*)
7082   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
7083   ;;
7084   *)
7085   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7086 for as_dir in $PATH
7087 do
7088   IFS=$as_save_IFS
7089   test -z "$as_dir" && as_dir=.
7090     for ac_exec_ext in '' $ac_executable_extensions; do
7091   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7092     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7093     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7094     break 2
7095   fi
7096 done
7097   done
7098 IFS=$as_save_IFS
7099
7100   ;;
7101 esac
7102 fi
7103 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
7104 if test -n "$ac_pt_PKG_CONFIG"; then
7105   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
7106 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
7107 else
7108   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7109 $as_echo "no" >&6; }
7110 fi
7111
7112   if test "x$ac_pt_PKG_CONFIG" = x; then
7113     PKG_CONFIG=""
7114   else
7115     case $cross_compiling:$ac_tool_warned in
7116 yes:)
7117 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7118 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7119 ac_tool_warned=yes ;;
7120 esac
7121     PKG_CONFIG=$ac_pt_PKG_CONFIG
7122   fi
7123 else
7124   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
7125 fi
7126
7127 fi
7128 if test -n "$PKG_CONFIG"; then
7129         _pkg_min_version=0.9.0
7130         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
7131 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
7132         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7133                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7134 $as_echo "yes" >&6; }
7135         else
7136                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7137 $as_echo "no" >&6; }
7138                 PKG_CONFIG=""
7139         fi
7140 fi
7141
7142 pkg_failed=no
7143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5
7144 $as_echo_n "checking for icu-uc icu-i18n... " >&6; }
7145
7146 if test -n "$ICU_CFLAGS"; then
7147     pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
7148  elif test -n "$PKG_CONFIG"; then
7149     if test -n "$PKG_CONFIG" && \
7150     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
7151   ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
7152   ac_status=$?
7153   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7154   test $ac_status = 0; }; then
7155   pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc icu-i18n" 2>/dev/null`
7156                       test "x$?" != "x0" && pkg_failed=yes
7157 else
7158   pkg_failed=yes
7159 fi
7160  else
7161     pkg_failed=untried
7162 fi
7163 if test -n "$ICU_LIBS"; then
7164     pkg_cv_ICU_LIBS="$ICU_LIBS"
7165  elif test -n "$PKG_CONFIG"; then
7166     if test -n "$PKG_CONFIG" && \
7167     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
7168   ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
7169   ac_status=$?
7170   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7171   test $ac_status = 0; }; then
7172   pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc icu-i18n" 2>/dev/null`
7173                       test "x$?" != "x0" && pkg_failed=yes
7174 else
7175   pkg_failed=yes
7176 fi
7177  else
7178     pkg_failed=untried
7179 fi
7180
7181
7182
7183 if test $pkg_failed = yes; then
7184         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7185 $as_echo "no" >&6; }
7186
7187 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7188         _pkg_short_errors_supported=yes
7189 else
7190         _pkg_short_errors_supported=no
7191 fi
7192         if test $_pkg_short_errors_supported = yes; then
7193                 ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
7194         else
7195                 ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
7196         fi
7197         # Put the nasty error message in config.log where it belongs
7198         echo "$ICU_PKG_ERRORS" >&5
7199
7200         as_fn_error $? "Package requirements (icu-uc icu-i18n) were not met:
7201
7202 $ICU_PKG_ERRORS
7203
7204 Consider adjusting the PKG_CONFIG_PATH environment variable if you
7205 installed software in a non-standard prefix.
7206
7207 Alternatively, you may set the environment variables ICU_CFLAGS
7208 and ICU_LIBS to avoid the need to call pkg-config.
7209 See the pkg-config man page for more details." "$LINENO" 5
7210 elif test $pkg_failed = untried; then
7211         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7212 $as_echo "no" >&6; }
7213         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7214 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7215 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
7216 is in your PATH or set the PKG_CONFIG environment variable to the full
7217 path to pkg-config.
7218
7219 Alternatively, you may set the environment variables ICU_CFLAGS
7220 and ICU_LIBS to avoid the need to call pkg-config.
7221 See the pkg-config man page for more details.
7222
7223 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
7224 See \`config.log' for more details" "$LINENO" 5; }
7225 else
7226         ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
7227         ICU_LIBS=$pkg_cv_ICU_LIBS
7228         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7229 $as_echo "yes" >&6; }
7230
7231 fi
7232 fi
7233
7234 #
7235 # Optionally build Tcl modules (PL/Tcl)
7236 #
7237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
7238 $as_echo_n "checking whether to build with Tcl... " >&6; }
7239
7240
7241
7242 # Check whether --with-tcl was given.
7243 if test "${with_tcl+set}" = set; then :
7244   withval=$with_tcl;
7245   case $withval in
7246     yes)
7247       :
7248       ;;
7249     no)
7250       :
7251       ;;
7252     *)
7253       as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
7254       ;;
7255   esac
7256
7257 else
7258   with_tcl=no
7259
7260 fi
7261
7262
7263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
7264 $as_echo "$with_tcl" >&6; }
7265
7266
7267 # We see if the path to the Tcl/Tk configuration scripts is specified.
7268 # This will override the use of tclsh to find the paths to search.
7269
7270
7271
7272
7273 # Check whether --with-tclconfig was given.
7274 if test "${with_tclconfig+set}" = set; then :
7275   withval=$with_tclconfig;
7276   case $withval in
7277     yes)
7278       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
7279       ;;
7280     no)
7281       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
7282       ;;
7283     *)
7284
7285       ;;
7286   esac
7287
7288 fi
7289
7290
7291
7292 #
7293 # Optionally build Perl modules (PL/Perl)
7294 #
7295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
7296 $as_echo_n "checking whether to build Perl modules... " >&6; }
7297
7298
7299
7300 # Check whether --with-perl was given.
7301 if test "${with_perl+set}" = set; then :
7302   withval=$with_perl;
7303   case $withval in
7304     yes)
7305       :
7306       ;;
7307     no)
7308       :
7309       ;;
7310     *)
7311       as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
7312       ;;
7313   esac
7314
7315 else
7316   with_perl=no
7317
7318 fi
7319
7320
7321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
7322 $as_echo "$with_perl" >&6; }
7323
7324
7325 #
7326 # Optionally build Python modules (PL/Python)
7327 #
7328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
7329 $as_echo_n "checking whether to build Python modules... " >&6; }
7330
7331
7332
7333 # Check whether --with-python was given.
7334 if test "${with_python+set}" = set; then :
7335   withval=$with_python;
7336   case $withval in
7337     yes)
7338       :
7339       ;;
7340     no)
7341       :
7342       ;;
7343     *)
7344       as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
7345       ;;
7346   esac
7347
7348 else
7349   with_python=no
7350
7351 fi
7352
7353
7354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
7355 $as_echo "$with_python" >&6; }
7356
7357
7358 #
7359 # GSSAPI
7360 #
7361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
7362 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
7363
7364
7365
7366 # Check whether --with-gssapi was given.
7367 if test "${with_gssapi+set}" = set; then :
7368   withval=$with_gssapi;
7369   case $withval in
7370     yes)
7371
7372
7373 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
7374
7375   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
7376
7377       ;;
7378     no)
7379       :
7380       ;;
7381     *)
7382       as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
7383       ;;
7384   esac
7385
7386 else
7387   with_gssapi=no
7388
7389 fi
7390
7391
7392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
7393 $as_echo "$with_gssapi" >&6; }
7394
7395
7396
7397
7398
7399
7400 #
7401 # Kerberos configuration parameters
7402 #
7403
7404
7405
7406 # Check whether --with-krb-srvnam was given.
7407 if test "${with_krb_srvnam+set}" = set; then :
7408   withval=$with_krb_srvnam;
7409   case $withval in
7410     yes)
7411       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
7412       ;;
7413     no)
7414       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
7415       ;;
7416     *)
7417
7418       ;;
7419   esac
7420
7421 else
7422   with_krb_srvnam="postgres"
7423 fi
7424
7425
7426
7427
7428 cat >>confdefs.h <<_ACEOF
7429 #define PG_KRB_SRVNAM "$with_krb_srvnam"
7430 _ACEOF
7431
7432
7433
7434 #
7435 # PAM
7436 #
7437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
7438 $as_echo_n "checking whether to build with PAM support... " >&6; }
7439
7440
7441
7442 # Check whether --with-pam was given.
7443 if test "${with_pam+set}" = set; then :
7444   withval=$with_pam;
7445   case $withval in
7446     yes)
7447
7448 $as_echo "#define USE_PAM 1" >>confdefs.h
7449
7450       ;;
7451     no)
7452       :
7453       ;;
7454     *)
7455       as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
7456       ;;
7457   esac
7458
7459 else
7460   with_pam=no
7461
7462 fi
7463
7464
7465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
7466 $as_echo "$with_pam" >&6; }
7467
7468
7469 #
7470 # BSD AUTH
7471 #
7472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
7473 $as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
7474
7475
7476
7477 # Check whether --with-bsd-auth was given.
7478 if test "${with_bsd_auth+set}" = set; then :
7479   withval=$with_bsd_auth;
7480   case $withval in
7481     yes)
7482
7483 $as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
7484
7485       ;;
7486     no)
7487       :
7488       ;;
7489     *)
7490       as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
7491       ;;
7492   esac
7493
7494 else
7495   with_bsd_auth=no
7496
7497 fi
7498
7499
7500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
7501 $as_echo "$with_bsd_auth" >&6; }
7502
7503
7504 #
7505 # LDAP
7506 #
7507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
7508 $as_echo_n "checking whether to build with LDAP support... " >&6; }
7509
7510
7511
7512 # Check whether --with-ldap was given.
7513 if test "${with_ldap+set}" = set; then :
7514   withval=$with_ldap;
7515   case $withval in
7516     yes)
7517
7518 $as_echo "#define USE_LDAP 1" >>confdefs.h
7519
7520       ;;
7521     no)
7522       :
7523       ;;
7524     *)
7525       as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
7526       ;;
7527   esac
7528
7529 else
7530   with_ldap=no
7531
7532 fi
7533
7534
7535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
7536 $as_echo "$with_ldap" >&6; }
7537
7538
7539
7540 #
7541 # Bonjour
7542 #
7543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
7544 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
7545
7546
7547
7548 # Check whether --with-bonjour was given.
7549 if test "${with_bonjour+set}" = set; then :
7550   withval=$with_bonjour;
7551   case $withval in
7552     yes)
7553
7554 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
7555
7556       ;;
7557     no)
7558       :
7559       ;;
7560     *)
7561       as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
7562       ;;
7563   esac
7564
7565 else
7566   with_bonjour=no
7567
7568 fi
7569
7570
7571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
7572 $as_echo "$with_bonjour" >&6; }
7573
7574
7575 #
7576 # OpenSSL
7577 #
7578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with OpenSSL support" >&5
7579 $as_echo_n "checking whether to build with OpenSSL support... " >&6; }
7580
7581
7582
7583 # Check whether --with-openssl was given.
7584 if test "${with_openssl+set}" = set; then :
7585   withval=$with_openssl;
7586   case $withval in
7587     yes)
7588
7589 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
7590
7591       ;;
7592     no)
7593       :
7594       ;;
7595     *)
7596       as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
7597       ;;
7598   esac
7599
7600 else
7601   with_openssl=no
7602
7603 fi
7604
7605
7606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_openssl" >&5
7607 $as_echo "$with_openssl" >&6; }
7608
7609
7610 #
7611 # SELinux
7612 #
7613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
7614 $as_echo_n "checking whether to build with SELinux support... " >&6; }
7615
7616
7617
7618 # Check whether --with-selinux was given.
7619 if test "${with_selinux+set}" = set; then :
7620   withval=$with_selinux;
7621   case $withval in
7622     yes)
7623       :
7624       ;;
7625     no)
7626       :
7627       ;;
7628     *)
7629       as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
7630       ;;
7631   esac
7632
7633 else
7634   with_selinux=no
7635
7636 fi
7637
7638
7639
7640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
7641 $as_echo "$with_selinux" >&6; }
7642
7643 #
7644 # Systemd
7645 #
7646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
7647 $as_echo_n "checking whether to build with systemd support... " >&6; }
7648
7649
7650
7651 # Check whether --with-systemd was given.
7652 if test "${with_systemd+set}" = set; then :
7653   withval=$with_systemd;
7654   case $withval in
7655     yes)
7656
7657 $as_echo "#define USE_SYSTEMD 1" >>confdefs.h
7658
7659       ;;
7660     no)
7661       :
7662       ;;
7663     *)
7664       as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
7665       ;;
7666   esac
7667
7668 else
7669   with_systemd=no
7670
7671 fi
7672
7673
7674
7675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
7676 $as_echo "$with_systemd" >&6; }
7677
7678 #
7679 # Readline
7680 #
7681
7682
7683
7684 # Check whether --with-readline was given.
7685 if test "${with_readline+set}" = set; then :
7686   withval=$with_readline;
7687   case $withval in
7688     yes)
7689       :
7690       ;;
7691     no)
7692       :
7693       ;;
7694     *)
7695       as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
7696       ;;
7697   esac
7698
7699 else
7700   with_readline=yes
7701
7702 fi
7703
7704
7705 # readline on MinGW has problems with backslashes in psql and other bugs.
7706 # This is particularly a problem with non-US code pages.
7707 # Therefore disable its use until we understand the cause. 2004-07-20
7708 if test "$PORTNAME" = "win32"; then
7709   if test "$with_readline" = yes; then
7710     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
7711 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
7712     with_readline=no
7713   fi
7714 fi
7715
7716
7717 #
7718 # Prefer libedit
7719 #
7720
7721
7722
7723 # Check whether --with-libedit-preferred was given.
7724 if test "${with_libedit_preferred+set}" = set; then :
7725   withval=$with_libedit_preferred;
7726   case $withval in
7727     yes)
7728       :
7729       ;;
7730     no)
7731       :
7732       ;;
7733     *)
7734       as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
7735       ;;
7736   esac
7737
7738 else
7739   with_libedit_preferred=no
7740
7741 fi
7742
7743
7744
7745
7746 #
7747 # UUID library
7748 #
7749 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
7750 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
7751 # UUID library.  More than one of these might be present on a given platform,
7752 # so we make the user say which one she wants.
7753 #
7754
7755
7756
7757 # Check whether --with-uuid was given.
7758 if test "${with_uuid+set}" = set; then :
7759   withval=$with_uuid;
7760   case $withval in
7761     yes)
7762       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
7763       ;;
7764     no)
7765       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
7766       ;;
7767     *)
7768
7769       ;;
7770   esac
7771
7772 fi
7773
7774
7775 if test x"$with_uuid" = x"" ; then
7776   with_uuid=no
7777 fi
7778
7779
7780
7781 # Check whether --with-ossp-uuid was given.
7782 if test "${with_ossp_uuid+set}" = set; then :
7783   withval=$with_ossp_uuid;
7784   case $withval in
7785     yes)
7786       :
7787       ;;
7788     no)
7789       :
7790       ;;
7791     *)
7792       as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
7793       ;;
7794   esac
7795
7796 else
7797   with_ossp_uuid=no
7798
7799 fi
7800
7801
7802 if test "$with_ossp_uuid" = yes ; then
7803   with_uuid=ossp
7804 fi
7805
7806 if test "$with_uuid" = bsd ; then
7807
7808 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
7809
7810   UUID_EXTRA_OBJS="md5.o sha1.o"
7811 elif test "$with_uuid" = e2fs ; then
7812
7813 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
7814
7815   UUID_EXTRA_OBJS="md5.o sha1.o"
7816 elif test "$with_uuid" = ossp ; then
7817
7818 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
7819
7820   UUID_EXTRA_OBJS=""
7821 elif test "$with_uuid" = no ; then
7822   UUID_EXTRA_OBJS=""
7823 else
7824   as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
7825 fi
7826
7827
7828
7829
7830 #
7831 # XML
7832 #
7833
7834
7835
7836 # Check whether --with-libxml was given.
7837 if test "${with_libxml+set}" = set; then :
7838   withval=$with_libxml;
7839   case $withval in
7840     yes)
7841
7842 $as_echo "#define USE_LIBXML 1" >>confdefs.h
7843
7844       ;;
7845     no)
7846       :
7847       ;;
7848     *)
7849       as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
7850       ;;
7851   esac
7852
7853 else
7854   with_libxml=no
7855
7856 fi
7857
7858
7859
7860 if test "$with_libxml" = yes ; then
7861   if test -z "$XML2_CONFIG"; then
7862   for ac_prog in xml2-config
7863 do
7864   # Extract the first word of "$ac_prog", so it can be a program name with args.
7865 set dummy $ac_prog; ac_word=$2
7866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7867 $as_echo_n "checking for $ac_word... " >&6; }
7868 if ${ac_cv_path_XML2_CONFIG+:} false; then :
7869   $as_echo_n "(cached) " >&6
7870 else
7871   case $XML2_CONFIG in
7872   [\\/]* | ?:[\\/]*)
7873   ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path.
7874   ;;
7875   *)
7876   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7877 for as_dir in $PATH
7878 do
7879   IFS=$as_save_IFS
7880   test -z "$as_dir" && as_dir=.
7881     for ac_exec_ext in '' $ac_executable_extensions; do
7882   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7883     ac_cv_path_XML2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7884     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7885     break 2
7886   fi
7887 done
7888   done
7889 IFS=$as_save_IFS
7890
7891   ;;
7892 esac
7893 fi
7894 XML2_CONFIG=$ac_cv_path_XML2_CONFIG
7895 if test -n "$XML2_CONFIG"; then
7896   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
7897 $as_echo "$XML2_CONFIG" >&6; }
7898 else
7899   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7900 $as_echo "no" >&6; }
7901 fi
7902
7903
7904   test -n "$XML2_CONFIG" && break
7905 done
7906
7907 else
7908   # Report the value of XML2_CONFIG in configure's output in all cases.
7909   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML2_CONFIG" >&5
7910 $as_echo_n "checking for XML2_CONFIG... " >&6; }
7911   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
7912 $as_echo "$XML2_CONFIG" >&6; }
7913 fi
7914
7915   if test -n "$XML2_CONFIG"; then
7916     for pgac_option in `$XML2_CONFIG --cflags`; do
7917       case $pgac_option in
7918         -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
7919       esac
7920     done
7921     for pgac_option in `$XML2_CONFIG --libs`; do
7922       case $pgac_option in
7923         -L*) LDFLAGS="$LDFLAGS $pgac_option";;
7924       esac
7925     done
7926   fi
7927 fi
7928
7929
7930
7931 #
7932 # XSLT
7933 #
7934
7935
7936
7937 # Check whether --with-libxslt was given.
7938 if test "${with_libxslt+set}" = set; then :
7939   withval=$with_libxslt;
7940   case $withval in
7941     yes)
7942
7943 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
7944
7945       ;;
7946     no)
7947       :
7948       ;;
7949     *)
7950       as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
7951       ;;
7952   esac
7953
7954 else
7955   with_libxslt=no
7956
7957 fi
7958
7959
7960
7961
7962
7963
7964 #
7965 # tzdata
7966 #
7967
7968
7969
7970 # Check whether --with-system-tzdata was given.
7971 if test "${with_system_tzdata+set}" = set; then :
7972   withval=$with_system_tzdata;
7973   case $withval in
7974     yes)
7975       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
7976       ;;
7977     no)
7978       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
7979       ;;
7980     *)
7981
7982       ;;
7983   esac
7984
7985 fi
7986
7987
7988
7989
7990 #
7991 # Zlib
7992 #
7993
7994
7995
7996 # Check whether --with-zlib was given.
7997 if test "${with_zlib+set}" = set; then :
7998   withval=$with_zlib;
7999   case $withval in
8000     yes)
8001       :
8002       ;;
8003     no)
8004       :
8005       ;;
8006     *)
8007       as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
8008       ;;
8009   esac
8010
8011 else
8012   with_zlib=yes
8013
8014 fi
8015
8016
8017
8018
8019 #
8020 # Elf
8021 #
8022
8023 # Assume system is ELF if it predefines __ELF__ as 1,
8024 # otherwise believe host_os based default.
8025 case $host_os in
8026     freebsd1*|freebsd2*) elf=no;;
8027     freebsd3*|freebsd4*) elf=yes;;
8028 esac
8029
8030
8031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
8032 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
8033 if ${ac_cv_path_GREP+:} false; then :
8034   $as_echo_n "(cached) " >&6
8035 else
8036   if test -z "$GREP"; then
8037   ac_path_GREP_found=false
8038   # Loop through the user's path and test for each of PROGNAME-LIST
8039   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8040 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8041 do
8042   IFS=$as_save_IFS
8043   test -z "$as_dir" && as_dir=.
8044     for ac_prog in grep ggrep; do
8045     for ac_exec_ext in '' $ac_executable_extensions; do
8046       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
8047       as_fn_executable_p "$ac_path_GREP" || continue
8048 # Check for GNU ac_path_GREP and select it if it is found.
8049   # Check for GNU $ac_path_GREP
8050 case `"$ac_path_GREP" --version 2>&1` in
8051 *GNU*)
8052   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
8053 *)
8054   ac_count=0
8055   $as_echo_n 0123456789 >"conftest.in"
8056   while :
8057   do
8058     cat "conftest.in" "conftest.in" >"conftest.tmp"
8059     mv "conftest.tmp" "conftest.in"
8060     cp "conftest.in" "conftest.nl"
8061     $as_echo 'GREP' >> "conftest.nl"
8062     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
8063     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8064     as_fn_arith $ac_count + 1 && ac_count=$as_val
8065     if test $ac_count -gt ${ac_path_GREP_max-0}; then
8066       # Best one so far, save it but keep looking for a better one
8067       ac_cv_path_GREP="$ac_path_GREP"
8068       ac_path_GREP_max=$ac_count
8069     fi
8070     # 10*(2^10) chars as input seems more than enough
8071     test $ac_count -gt 10 && break
8072   done
8073   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8074 esac
8075
8076       $ac_path_GREP_found && break 3
8077     done
8078   done
8079   done
8080 IFS=$as_save_IFS
8081   if test -z "$ac_cv_path_GREP"; then
8082     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8083   fi
8084 else
8085   ac_cv_path_GREP=$GREP
8086 fi
8087
8088 fi
8089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
8090 $as_echo "$ac_cv_path_GREP" >&6; }
8091  GREP="$ac_cv_path_GREP"
8092
8093
8094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
8095 $as_echo_n "checking for egrep... " >&6; }
8096 if ${ac_cv_path_EGREP+:} false; then :
8097   $as_echo_n "(cached) " >&6
8098 else
8099   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
8100    then ac_cv_path_EGREP="$GREP -E"
8101    else
8102      if test -z "$EGREP"; then
8103   ac_path_EGREP_found=false
8104   # Loop through the user's path and test for each of PROGNAME-LIST
8105   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8106 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8107 do
8108   IFS=$as_save_IFS
8109   test -z "$as_dir" && as_dir=.
8110     for ac_prog in egrep; do
8111     for ac_exec_ext in '' $ac_executable_extensions; do
8112       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
8113       as_fn_executable_p "$ac_path_EGREP" || continue
8114 # Check for GNU ac_path_EGREP and select it if it is found.
8115   # Check for GNU $ac_path_EGREP
8116 case `"$ac_path_EGREP" --version 2>&1` in
8117 *GNU*)
8118   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
8119 *)
8120   ac_count=0
8121   $as_echo_n 0123456789 >"conftest.in"
8122   while :
8123   do
8124     cat "conftest.in" "conftest.in" >"conftest.tmp"
8125     mv "conftest.tmp" "conftest.in"
8126     cp "conftest.in" "conftest.nl"
8127     $as_echo 'EGREP' >> "conftest.nl"
8128     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
8129     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8130     as_fn_arith $ac_count + 1 && ac_count=$as_val
8131     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
8132       # Best one so far, save it but keep looking for a better one
8133       ac_cv_path_EGREP="$ac_path_EGREP"
8134       ac_path_EGREP_max=$ac_count
8135     fi
8136     # 10*(2^10) chars as input seems more than enough
8137     test $ac_count -gt 10 && break
8138   done
8139   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8140 esac
8141
8142       $ac_path_EGREP_found && break 3
8143     done
8144   done
8145   done
8146 IFS=$as_save_IFS
8147   if test -z "$ac_cv_path_EGREP"; then
8148     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8149   fi
8150 else
8151   ac_cv_path_EGREP=$EGREP
8152 fi
8153
8154    fi
8155 fi
8156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
8157 $as_echo "$ac_cv_path_EGREP" >&6; }
8158  EGREP="$ac_cv_path_EGREP"
8159
8160
8161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8162 /* end confdefs.h.  */
8163 #if __ELF__
8164   yes
8165 #endif
8166
8167 _ACEOF
8168 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8169   $EGREP "yes" >/dev/null 2>&1; then :
8170   ELF_SYS=true
8171 else
8172   if test "X$elf" = "Xyes" ; then
8173   ELF_SYS=true
8174 else
8175   ELF_SYS=
8176 fi
8177 fi
8178 rm -f conftest*
8179
8180
8181
8182 #
8183 # Assignments
8184 #
8185
8186 CPPFLAGS="$CPPFLAGS $INCLUDES"
8187 LDFLAGS="$LDFLAGS $LIBDIRS"
8188
8189
8190
8191
8192
8193 # Check whether --with-gnu-ld was given.
8194 if test "${with_gnu_ld+set}" = set; then :
8195   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8196 else
8197   with_gnu_ld=no
8198 fi
8199
8200 ac_prog=ld
8201 if test "$GCC" = yes; then
8202   # Check if gcc -print-prog-name=ld gives a path.
8203   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8204 $as_echo_n "checking for ld used by GCC... " >&6; }
8205   case $host in
8206   *-*-mingw*)
8207     # gcc leaves a trailing carriage return which upsets mingw
8208     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8209   *)
8210     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8211   esac
8212   case "$ac_prog" in
8213     # Accept absolute paths.
8214     [\\/]* | [A-Za-z]:[\\/]*)
8215       re_direlt='/[^/][^/]*/\.\./'
8216       # Canonicalize the path of ld
8217       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8218       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8219         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8220       done
8221       test -z "$LD" && LD="$ac_prog"
8222       ;;
8223   "")
8224     # If it fails, then pretend we aren't using GCC.
8225     ac_prog=ld
8226     ;;
8227   *)
8228     # If it is relative, then search for the first ld in PATH.
8229     with_gnu_ld=unknown
8230     ;;
8231   esac
8232 elif test "$with_gnu_ld" = yes; then
8233   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8234 $as_echo_n "checking for GNU ld... " >&6; }
8235 else
8236   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8237 $as_echo_n "checking for non-GNU ld... " >&6; }
8238 fi
8239 if ${ac_cv_path_LD+:} false; then :
8240   $as_echo_n "(cached) " >&6
8241 else
8242   if test -z "$LD"; then
8243   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8244   for ac_dir in $PATH; do
8245     test -z "$ac_dir" && ac_dir=.
8246     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8247       ac_cv_path_LD="$ac_dir/$ac_prog"
8248       # Check to see if the program is GNU ld.  I'd rather use --version,
8249       # but apparently some GNU ld's only accept -v.
8250       # Break only if it was the GNU/non-GNU ld that we prefer.
8251       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8252         test "$with_gnu_ld" != no && break
8253       else
8254         test "$with_gnu_ld" != yes && break
8255       fi
8256     fi
8257   done
8258   IFS="$ac_save_ifs"
8259 else
8260   ac_cv_path_LD="$LD" # Let the user override the test with a path.
8261 fi
8262 fi
8263
8264 LD="$ac_cv_path_LD"
8265 if test -n "$LD"; then
8266   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8267 $as_echo "$LD" >&6; }
8268 else
8269   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8270 $as_echo "no" >&6; }
8271 fi
8272 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8274 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8275 if ${ac_cv_prog_gnu_ld+:} false; then :
8276   $as_echo_n "(cached) " >&6
8277 else
8278   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8279 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8280   ac_cv_prog_gnu_ld=yes
8281 else
8282   ac_cv_prog_gnu_ld=no
8283 fi
8284 fi
8285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
8286 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
8287 with_gnu_ld=$ac_cv_prog_gnu_ld
8288
8289
8290
8291
8292 if test -n "$ac_tool_prefix"; then
8293   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8294 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8296 $as_echo_n "checking for $ac_word... " >&6; }
8297 if ${ac_cv_prog_RANLIB+:} false; then :
8298   $as_echo_n "(cached) " >&6
8299 else
8300   if test -n "$RANLIB"; then
8301   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8302 else
8303 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8304 for as_dir in $PATH
8305 do
8306   IFS=$as_save_IFS
8307   test -z "$as_dir" && as_dir=.
8308     for ac_exec_ext in '' $ac_executable_extensions; do
8309   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8310     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8311     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8312     break 2
8313   fi
8314 done
8315   done
8316 IFS=$as_save_IFS
8317
8318 fi
8319 fi
8320 RANLIB=$ac_cv_prog_RANLIB
8321 if test -n "$RANLIB"; then
8322   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8323 $as_echo "$RANLIB" >&6; }
8324 else
8325   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8326 $as_echo "no" >&6; }
8327 fi
8328
8329
8330 fi
8331 if test -z "$ac_cv_prog_RANLIB"; then
8332   ac_ct_RANLIB=$RANLIB
8333   # Extract the first word of "ranlib", so it can be a program name with args.
8334 set dummy ranlib; ac_word=$2
8335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8336 $as_echo_n "checking for $ac_word... " >&6; }
8337 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
8338   $as_echo_n "(cached) " >&6
8339 else
8340   if test -n "$ac_ct_RANLIB"; then
8341   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8342 else
8343 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8344 for as_dir in $PATH
8345 do
8346   IFS=$as_save_IFS
8347   test -z "$as_dir" && as_dir=.
8348     for ac_exec_ext in '' $ac_executable_extensions; do
8349   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8350     ac_cv_prog_ac_ct_RANLIB="ranlib"
8351     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8352     break 2
8353   fi
8354 done
8355   done
8356 IFS=$as_save_IFS
8357
8358 fi
8359 fi
8360 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8361 if test -n "$ac_ct_RANLIB"; then
8362   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8363 $as_echo "$ac_ct_RANLIB" >&6; }
8364 else
8365   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8366 $as_echo "no" >&6; }
8367 fi
8368
8369   if test "x$ac_ct_RANLIB" = x; then
8370     RANLIB=":"
8371   else
8372     case $cross_compiling:$ac_tool_warned in
8373 yes:)
8374 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8375 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8376 ac_tool_warned=yes ;;
8377 esac
8378     RANLIB=$ac_ct_RANLIB
8379   fi
8380 else
8381   RANLIB="$ac_cv_prog_RANLIB"
8382 fi
8383
8384
8385   if test -n "$ac_tool_prefix"; then
8386   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
8387 set dummy ${ac_tool_prefix}strip; ac_word=$2
8388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8389 $as_echo_n "checking for $ac_word... " >&6; }
8390 if ${ac_cv_prog_STRIP+:} false; then :
8391   $as_echo_n "(cached) " >&6
8392 else
8393   if test -n "$STRIP"; then
8394   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
8395 else
8396 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8397 for as_dir in $PATH
8398 do
8399   IFS=$as_save_IFS
8400   test -z "$as_dir" && as_dir=.
8401     for ac_exec_ext in '' $ac_executable_extensions; do
8402   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8403     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
8404     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8405     break 2
8406   fi
8407 done
8408   done
8409 IFS=$as_save_IFS
8410
8411 fi
8412 fi
8413 STRIP=$ac_cv_prog_STRIP
8414 if test -n "$STRIP"; then
8415   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
8416 $as_echo "$STRIP" >&6; }
8417 else
8418   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8419 $as_echo "no" >&6; }
8420 fi
8421
8422
8423 fi
8424 if test -z "$ac_cv_prog_STRIP"; then
8425   ac_ct_STRIP=$STRIP
8426   # Extract the first word of "strip", so it can be a program name with args.
8427 set dummy strip; ac_word=$2
8428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8429 $as_echo_n "checking for $ac_word... " >&6; }
8430 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
8431   $as_echo_n "(cached) " >&6
8432 else
8433   if test -n "$ac_ct_STRIP"; then
8434   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
8435 else
8436 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8437 for as_dir in $PATH
8438 do
8439   IFS=$as_save_IFS
8440   test -z "$as_dir" && as_dir=.
8441     for ac_exec_ext in '' $ac_executable_extensions; do
8442   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8443     ac_cv_prog_ac_ct_STRIP="strip"
8444     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8445     break 2
8446   fi
8447 done
8448   done
8449 IFS=$as_save_IFS
8450
8451 fi
8452 fi
8453 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8454 if test -n "$ac_ct_STRIP"; then
8455   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
8456 $as_echo "$ac_ct_STRIP" >&6; }
8457 else
8458   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8459 $as_echo "no" >&6; }
8460 fi
8461
8462   if test "x$ac_ct_STRIP" = x; then
8463     STRIP=":"
8464   else
8465     case $cross_compiling:$ac_tool_warned in
8466 yes:)
8467 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8468 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8469 ac_tool_warned=yes ;;
8470 esac
8471     STRIP=$ac_ct_STRIP
8472   fi
8473 else
8474   STRIP="$ac_cv_prog_STRIP"
8475 fi
8476
8477
8478   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
8479 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
8480   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
8481     STRIP_STATIC_LIB="$STRIP -x"
8482     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
8483     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8484 $as_echo "yes" >&6; }
8485   else
8486     case $host_os in
8487       darwin*)
8488         STRIP="$STRIP -x"
8489         STRIP_STATIC_LIB=$STRIP
8490         STRIP_SHARED_LIB=$STRIP
8491         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8492 $as_echo "yes" >&6; }
8493         ;;
8494       *)
8495         STRIP_STATIC_LIB=:
8496         STRIP_SHARED_LIB=:
8497         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8498 $as_echo "no" >&6; }
8499         ;;
8500     esac
8501   fi
8502
8503
8504
8505 if test -n "$ac_tool_prefix"; then
8506   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
8507 set dummy ${ac_tool_prefix}ar; ac_word=$2
8508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8509 $as_echo_n "checking for $ac_word... " >&6; }
8510 if ${ac_cv_prog_AR+:} false; then :
8511   $as_echo_n "(cached) " >&6
8512 else
8513   if test -n "$AR"; then
8514   ac_cv_prog_AR="$AR" # Let the user override the test.
8515 else
8516 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8517 for as_dir in $PATH
8518 do
8519   IFS=$as_save_IFS
8520   test -z "$as_dir" && as_dir=.
8521     for ac_exec_ext in '' $ac_executable_extensions; do
8522   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8523     ac_cv_prog_AR="${ac_tool_prefix}ar"
8524     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8525     break 2
8526   fi
8527 done
8528   done
8529 IFS=$as_save_IFS
8530
8531 fi
8532 fi
8533 AR=$ac_cv_prog_AR
8534 if test -n "$AR"; then
8535   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8536 $as_echo "$AR" >&6; }
8537 else
8538   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8539 $as_echo "no" >&6; }
8540 fi
8541
8542
8543 fi
8544 if test -z "$ac_cv_prog_AR"; then
8545   ac_ct_AR=$AR
8546   # Extract the first word of "ar", so it can be a program name with args.
8547 set dummy ar; ac_word=$2
8548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8549 $as_echo_n "checking for $ac_word... " >&6; }
8550 if ${ac_cv_prog_ac_ct_AR+:} false; then :
8551   $as_echo_n "(cached) " >&6
8552 else
8553   if test -n "$ac_ct_AR"; then
8554   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8555 else
8556 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8557 for as_dir in $PATH
8558 do
8559   IFS=$as_save_IFS
8560   test -z "$as_dir" && as_dir=.
8561     for ac_exec_ext in '' $ac_executable_extensions; do
8562   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8563     ac_cv_prog_ac_ct_AR="ar"
8564     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8565     break 2
8566   fi
8567 done
8568   done
8569 IFS=$as_save_IFS
8570
8571 fi
8572 fi
8573 ac_ct_AR=$ac_cv_prog_ac_ct_AR
8574 if test -n "$ac_ct_AR"; then
8575   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8576 $as_echo "$ac_ct_AR" >&6; }
8577 else
8578   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8579 $as_echo "no" >&6; }
8580 fi
8581
8582   if test "x$ac_ct_AR" = x; then
8583     AR="ar"
8584   else
8585     case $cross_compiling:$ac_tool_warned in
8586 yes:)
8587 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8588 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8589 ac_tool_warned=yes ;;
8590 esac
8591     AR=$ac_ct_AR
8592   fi
8593 else
8594   AR="$ac_cv_prog_AR"
8595 fi
8596
8597 if test "$PORTNAME" = "win32"; then
8598   if test -n "$ac_tool_prefix"; then
8599   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8600 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
8601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8602 $as_echo_n "checking for $ac_word... " >&6; }
8603 if ${ac_cv_prog_DLLTOOL+:} false; then :
8604   $as_echo_n "(cached) " >&6
8605 else
8606   if test -n "$DLLTOOL"; then
8607   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8608 else
8609 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8610 for as_dir in $PATH
8611 do
8612   IFS=$as_save_IFS
8613   test -z "$as_dir" && as_dir=.
8614     for ac_exec_ext in '' $ac_executable_extensions; do
8615   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8616     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
8617     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8618     break 2
8619   fi
8620 done
8621   done
8622 IFS=$as_save_IFS
8623
8624 fi
8625 fi
8626 DLLTOOL=$ac_cv_prog_DLLTOOL
8627 if test -n "$DLLTOOL"; then
8628   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
8629 $as_echo "$DLLTOOL" >&6; }
8630 else
8631   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8632 $as_echo "no" >&6; }
8633 fi
8634
8635
8636 fi
8637 if test -z "$ac_cv_prog_DLLTOOL"; then
8638   ac_ct_DLLTOOL=$DLLTOOL
8639   # Extract the first word of "dlltool", so it can be a program name with args.
8640 set dummy dlltool; ac_word=$2
8641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8642 $as_echo_n "checking for $ac_word... " >&6; }
8643 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
8644   $as_echo_n "(cached) " >&6
8645 else
8646   if test -n "$ac_ct_DLLTOOL"; then
8647   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
8648 else
8649 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8650 for as_dir in $PATH
8651 do
8652   IFS=$as_save_IFS
8653   test -z "$as_dir" && as_dir=.
8654     for ac_exec_ext in '' $ac_executable_extensions; do
8655   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8656     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
8657     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8658     break 2
8659   fi
8660 done
8661   done
8662 IFS=$as_save_IFS
8663
8664 fi
8665 fi
8666 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
8667 if test -n "$ac_ct_DLLTOOL"; then
8668   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
8669 $as_echo "$ac_ct_DLLTOOL" >&6; }
8670 else
8671   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8672 $as_echo "no" >&6; }
8673 fi
8674
8675   if test "x$ac_ct_DLLTOOL" = x; then
8676     DLLTOOL="dlltool"
8677   else
8678     case $cross_compiling:$ac_tool_warned in
8679 yes:)
8680 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8681 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8682 ac_tool_warned=yes ;;
8683 esac
8684     DLLTOOL=$ac_ct_DLLTOOL
8685   fi
8686 else
8687   DLLTOOL="$ac_cv_prog_DLLTOOL"
8688 fi
8689
8690   if test -n "$ac_tool_prefix"; then
8691   # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
8692 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
8693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8694 $as_echo_n "checking for $ac_word... " >&6; }
8695 if ${ac_cv_prog_DLLWRAP+:} false; then :
8696   $as_echo_n "(cached) " >&6
8697 else
8698   if test -n "$DLLWRAP"; then
8699   ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
8700 else
8701 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8702 for as_dir in $PATH
8703 do
8704   IFS=$as_save_IFS
8705   test -z "$as_dir" && as_dir=.
8706     for ac_exec_ext in '' $ac_executable_extensions; do
8707   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8708     ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
8709     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8710     break 2
8711   fi
8712 done
8713   done
8714 IFS=$as_save_IFS
8715
8716 fi
8717 fi
8718 DLLWRAP=$ac_cv_prog_DLLWRAP
8719 if test -n "$DLLWRAP"; then
8720   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5
8721 $as_echo "$DLLWRAP" >&6; }
8722 else
8723   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8724 $as_echo "no" >&6; }
8725 fi
8726
8727
8728 fi
8729 if test -z "$ac_cv_prog_DLLWRAP"; then
8730   ac_ct_DLLWRAP=$DLLWRAP
8731   # Extract the first word of "dllwrap", so it can be a program name with args.
8732 set dummy dllwrap; ac_word=$2
8733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8734 $as_echo_n "checking for $ac_word... " >&6; }
8735 if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then :
8736   $as_echo_n "(cached) " >&6
8737 else
8738   if test -n "$ac_ct_DLLWRAP"; then
8739   ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
8740 else
8741 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8742 for as_dir in $PATH
8743 do
8744   IFS=$as_save_IFS
8745   test -z "$as_dir" && as_dir=.
8746     for ac_exec_ext in '' $ac_executable_extensions; do
8747   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8748     ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
8749     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8750     break 2
8751   fi
8752 done
8753   done
8754 IFS=$as_save_IFS
8755
8756 fi
8757 fi
8758 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
8759 if test -n "$ac_ct_DLLWRAP"; then
8760   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5
8761 $as_echo "$ac_ct_DLLWRAP" >&6; }
8762 else
8763   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8764 $as_echo "no" >&6; }
8765 fi
8766
8767   if test "x$ac_ct_DLLWRAP" = x; then
8768     DLLWRAP="dllwrap"
8769   else
8770     case $cross_compiling:$ac_tool_warned in
8771 yes:)
8772 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8773 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8774 ac_tool_warned=yes ;;
8775 esac
8776     DLLWRAP=$ac_ct_DLLWRAP
8777   fi
8778 else
8779   DLLWRAP="$ac_cv_prog_DLLWRAP"
8780 fi
8781
8782   if test -n "$ac_tool_prefix"; then
8783   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
8784 set dummy ${ac_tool_prefix}windres; ac_word=$2
8785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8786 $as_echo_n "checking for $ac_word... " >&6; }
8787 if ${ac_cv_prog_WINDRES+:} false; then :
8788   $as_echo_n "(cached) " >&6
8789 else
8790   if test -n "$WINDRES"; then
8791   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
8792 else
8793 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8794 for as_dir in $PATH
8795 do
8796   IFS=$as_save_IFS
8797   test -z "$as_dir" && as_dir=.
8798     for ac_exec_ext in '' $ac_executable_extensions; do
8799   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8800     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
8801     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8802     break 2
8803   fi
8804 done
8805   done
8806 IFS=$as_save_IFS
8807
8808 fi
8809 fi
8810 WINDRES=$ac_cv_prog_WINDRES
8811 if test -n "$WINDRES"; then
8812   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
8813 $as_echo "$WINDRES" >&6; }
8814 else
8815   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8816 $as_echo "no" >&6; }
8817 fi
8818
8819
8820 fi
8821 if test -z "$ac_cv_prog_WINDRES"; then
8822   ac_ct_WINDRES=$WINDRES
8823   # Extract the first word of "windres", so it can be a program name with args.
8824 set dummy windres; ac_word=$2
8825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8826 $as_echo_n "checking for $ac_word... " >&6; }
8827 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
8828   $as_echo_n "(cached) " >&6
8829 else
8830   if test -n "$ac_ct_WINDRES"; then
8831   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
8832 else
8833 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8834 for as_dir in $PATH
8835 do
8836   IFS=$as_save_IFS
8837   test -z "$as_dir" && as_dir=.
8838     for ac_exec_ext in '' $ac_executable_extensions; do
8839   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8840     ac_cv_prog_ac_ct_WINDRES="windres"
8841     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8842     break 2
8843   fi
8844 done
8845   done
8846 IFS=$as_save_IFS
8847
8848 fi
8849 fi
8850 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
8851 if test -n "$ac_ct_WINDRES"; then
8852   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
8853 $as_echo "$ac_ct_WINDRES" >&6; }
8854 else
8855   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8856 $as_echo "no" >&6; }
8857 fi
8858
8859   if test "x$ac_ct_WINDRES" = x; then
8860     WINDRES="windres"
8861   else
8862     case $cross_compiling:$ac_tool_warned in
8863 yes:)
8864 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8865 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8866 ac_tool_warned=yes ;;
8867 esac
8868     WINDRES=$ac_ct_WINDRES
8869   fi
8870 else
8871   WINDRES="$ac_cv_prog_WINDRES"
8872 fi
8873
8874 fi
8875
8876 # Find a good install program.  We prefer a C program (faster),
8877 # so one script is as good as another.  But avoid the broken or
8878 # incompatible versions:
8879 # SysV /etc/install, /usr/sbin/install
8880 # SunOS /usr/etc/install
8881 # IRIX /sbin/install
8882 # AIX /bin/install
8883 # AmigaOS /C/install, which installs bootblocks on floppy discs
8884 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
8885 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
8886 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
8887 # OS/2's system install, which has a completely different semantic
8888 # ./install, which can be erroneously created by make from ./install.sh.
8889 # Reject install programs that cannot install multiple files.
8890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
8891 $as_echo_n "checking for a BSD-compatible install... " >&6; }
8892 if test -z "$INSTALL"; then
8893 if ${ac_cv_path_install+:} false; then :
8894   $as_echo_n "(cached) " >&6
8895 else
8896   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8897 for as_dir in $PATH
8898 do
8899   IFS=$as_save_IFS
8900   test -z "$as_dir" && as_dir=.
8901     # Account for people who put trailing slashes in PATH elements.
8902 case $as_dir/ in #((
8903   ./ | .// | /[cC]/* | \
8904   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
8905   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
8906   /usr/ucb/* ) ;;
8907   *)
8908     # OSF1 and SCO ODT 3.0 have their own names for install.
8909     # Don't use installbsd from OSF since it installs stuff as root
8910     # by default.
8911     for ac_prog in ginstall scoinst install; do
8912       for ac_exec_ext in '' $ac_executable_extensions; do
8913         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
8914           if test $ac_prog = install &&
8915             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
8916             # AIX install.  It has an incompatible calling convention.
8917             :
8918           elif test $ac_prog = install &&
8919             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
8920             # program-specific install script used by HP pwplus--don't use.
8921             :
8922           else
8923             rm -rf conftest.one conftest.two conftest.dir
8924             echo one > conftest.one
8925             echo two > conftest.two
8926             mkdir conftest.dir
8927             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
8928               test -s conftest.one && test -s conftest.two &&
8929               test -s conftest.dir/conftest.one &&
8930               test -s conftest.dir/conftest.two
8931             then
8932               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
8933               break 3
8934             fi
8935           fi
8936         fi
8937       done
8938     done
8939     ;;
8940 esac
8941
8942   done
8943 IFS=$as_save_IFS
8944
8945 rm -rf conftest.one conftest.two conftest.dir
8946
8947 fi
8948   if test "${ac_cv_path_install+set}" = set; then
8949     INSTALL=$ac_cv_path_install
8950   else
8951     # As a last resort, use the slow shell script.  Don't cache a
8952     # value for INSTALL within a source directory, because that will
8953     # break other packages using the cache if that directory is
8954     # removed, or if the value is a relative name.
8955     INSTALL=$ac_install_sh
8956   fi
8957 fi
8958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
8959 $as_echo "$INSTALL" >&6; }
8960
8961 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
8962 # It thinks the first close brace ends the variable substitution.
8963 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
8964
8965 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
8966
8967 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
8968
8969 # When Autoconf chooses install-sh as install program it tries to generate
8970 # a relative path to it in each makefile where it substitutes it. This clashes
8971 # with our Makefile.global concept. This workaround helps.
8972 case $INSTALL in
8973   *install-sh*) install_bin='';;
8974   *) install_bin=$INSTALL;;
8975 esac
8976
8977
8978 if test -z "$TAR"; then
8979   for ac_prog in tar
8980 do
8981   # Extract the first word of "$ac_prog", so it can be a program name with args.
8982 set dummy $ac_prog; ac_word=$2
8983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8984 $as_echo_n "checking for $ac_word... " >&6; }
8985 if ${ac_cv_path_TAR+:} false; then :
8986   $as_echo_n "(cached) " >&6
8987 else
8988   case $TAR in
8989   [\\/]* | ?:[\\/]*)
8990   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
8991   ;;
8992   *)
8993   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8994 for as_dir in $PATH
8995 do
8996   IFS=$as_save_IFS
8997   test -z "$as_dir" && as_dir=.
8998     for ac_exec_ext in '' $ac_executable_extensions; do
8999   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9000     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9001     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9002     break 2
9003   fi
9004 done
9005   done
9006 IFS=$as_save_IFS
9007
9008   ;;
9009 esac
9010 fi
9011 TAR=$ac_cv_path_TAR
9012 if test -n "$TAR"; then
9013   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9014 $as_echo "$TAR" >&6; }
9015 else
9016   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9017 $as_echo "no" >&6; }
9018 fi
9019
9020
9021   test -n "$TAR" && break
9022 done
9023
9024 else
9025   # Report the value of TAR in configure's output in all cases.
9026   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9027 $as_echo_n "checking for TAR... " >&6; }
9028   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9029 $as_echo "$TAR" >&6; }
9030 fi
9031
9032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
9033 $as_echo_n "checking whether ln -s works... " >&6; }
9034 LN_S=$as_ln_s
9035 if test "$LN_S" = "ln -s"; then
9036   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9037 $as_echo "yes" >&6; }
9038 else
9039   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
9040 $as_echo "no, using $LN_S" >&6; }
9041 fi
9042
9043 for ac_prog in gawk mawk nawk awk
9044 do
9045   # Extract the first word of "$ac_prog", so it can be a program name with args.
9046 set dummy $ac_prog; ac_word=$2
9047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9048 $as_echo_n "checking for $ac_word... " >&6; }
9049 if ${ac_cv_prog_AWK+:} false; then :
9050   $as_echo_n "(cached) " >&6
9051 else
9052   if test -n "$AWK"; then
9053   ac_cv_prog_AWK="$AWK" # Let the user override the test.
9054 else
9055 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9056 for as_dir in $PATH
9057 do
9058   IFS=$as_save_IFS
9059   test -z "$as_dir" && as_dir=.
9060     for ac_exec_ext in '' $ac_executable_extensions; do
9061   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9062     ac_cv_prog_AWK="$ac_prog"
9063     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9064     break 2
9065   fi
9066 done
9067   done
9068 IFS=$as_save_IFS
9069
9070 fi
9071 fi
9072 AWK=$ac_cv_prog_AWK
9073 if test -n "$AWK"; then
9074   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
9075 $as_echo "$AWK" >&6; }
9076 else
9077   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9078 $as_echo "no" >&6; }
9079 fi
9080
9081
9082   test -n "$AWK" && break
9083 done
9084
9085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
9086 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
9087 if test -z "$MKDIR_P"; then
9088   if ${ac_cv_path_mkdir+:} false; then :
9089   $as_echo_n "(cached) " >&6
9090 else
9091   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9092 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
9093 do
9094   IFS=$as_save_IFS
9095   test -z "$as_dir" && as_dir=.
9096     for ac_prog in mkdir gmkdir; do
9097          for ac_exec_ext in '' $ac_executable_extensions; do
9098            as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
9099            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
9100              'mkdir (GNU coreutils) '* | \
9101              'mkdir (coreutils) '* | \
9102              'mkdir (fileutils) '4.1*)
9103                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
9104                break 3;;
9105            esac
9106          done
9107        done
9108   done
9109 IFS=$as_save_IFS
9110
9111 fi
9112
9113   test -d ./--version && rmdir ./--version
9114   if test "${ac_cv_path_mkdir+set}" = set; then
9115     MKDIR_P="$ac_cv_path_mkdir -p"
9116   else
9117     # As a last resort, use the slow shell script.  Don't cache a
9118     # value for MKDIR_P within a source directory, because that will
9119     # break other packages using the cache if that directory is
9120     # removed, or if the value is a relative name.
9121     MKDIR_P="$ac_install_sh -d"
9122   fi
9123 fi
9124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
9125 $as_echo "$MKDIR_P" >&6; }
9126
9127 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
9128 # a relative path to it in each makefile where it substitutes it. This clashes
9129 # with our Makefile.global concept. This workaround helps.
9130 case $MKDIR_P in
9131   *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
9132 esac
9133
9134 if test -z "$BISON"; then
9135   for ac_prog in bison
9136 do
9137   # Extract the first word of "$ac_prog", so it can be a program name with args.
9138 set dummy $ac_prog; ac_word=$2
9139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9140 $as_echo_n "checking for $ac_word... " >&6; }
9141 if ${ac_cv_path_BISON+:} false; then :
9142   $as_echo_n "(cached) " >&6
9143 else
9144   case $BISON in
9145   [\\/]* | ?:[\\/]*)
9146   ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
9147   ;;
9148   *)
9149   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9150 for as_dir in $PATH
9151 do
9152   IFS=$as_save_IFS
9153   test -z "$as_dir" && as_dir=.
9154     for ac_exec_ext in '' $ac_executable_extensions; do
9155   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9156     ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
9157     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9158     break 2
9159   fi
9160 done
9161   done
9162 IFS=$as_save_IFS
9163
9164   ;;
9165 esac
9166 fi
9167 BISON=$ac_cv_path_BISON
9168 if test -n "$BISON"; then
9169   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9170 $as_echo "$BISON" >&6; }
9171 else
9172   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9173 $as_echo "no" >&6; }
9174 fi
9175
9176
9177   test -n "$BISON" && break
9178 done
9179
9180 else
9181   # Report the value of BISON in configure's output in all cases.
9182   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BISON" >&5
9183 $as_echo_n "checking for BISON... " >&6; }
9184   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9185 $as_echo "$BISON" >&6; }
9186 fi
9187
9188
9189 if test "$BISON"; then
9190   pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
9191   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
9192 $as_echo "$as_me: using $pgac_bison_version" >&6;}
9193   if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
9194   then
9195     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9196 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9197 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
9198 $as_echo "$as_me: WARNING:
9199 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9200 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
9201     BISON=""
9202   fi
9203   # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
9204   # of the now preferred %name-prefix "base_yy", but the latter
9205   # doesn't work with Bison 2.3 or less.  So for now we silence the
9206   # deprecation warnings.
9207   if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
9208   then
9209     BISONFLAGS="$BISONFLAGS -Wno-deprecated"
9210   fi
9211 fi
9212
9213 if test -z "$BISON"; then
9214   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9215 *** Without Bison you will not be able to build PostgreSQL from Git nor
9216 *** change any of the parser definition files.  You can obtain Bison from
9217 *** a GNU mirror site.  (If you are using the official distribution of
9218 *** PostgreSQL then you do not need to worry about this, because the Bison
9219 *** output is pre-generated.)" >&5
9220 $as_echo "$as_me: WARNING:
9221 *** Without Bison you will not be able to build PostgreSQL from Git nor
9222 *** change any of the parser definition files.  You can obtain Bison from
9223 *** a GNU mirror site.  (If you are using the official distribution of
9224 *** PostgreSQL then you do not need to worry about this, because the Bison
9225 *** output is pre-generated.)" >&2;}
9226 fi
9227 # We don't need AC_SUBST(BISON) because PGAC_PATH_PROGS did it
9228
9229
9230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
9231 $as_echo_n "checking for flex... " >&6; }
9232 if ${pgac_cv_path_flex+:} false; then :
9233   $as_echo_n "(cached) " >&6
9234 else
9235   # Let the user override the test
9236 if test -n "$FLEX"; then
9237   pgac_cv_path_flex=$FLEX
9238 else
9239   pgac_save_IFS=$IFS
9240   IFS=$PATH_SEPARATOR
9241   for pgac_dir in $PATH; do
9242     IFS=$pgac_save_IFS
9243     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
9244       pgac_dir=`pwd`
9245     fi
9246     for pgac_prog in flex lex; do
9247       pgac_candidate="$pgac_dir/$pgac_prog"
9248       if test -f "$pgac_candidate" \
9249         && $pgac_candidate --version </dev/null >/dev/null 2>&1
9250       then
9251         echo '%%'  > conftest.l
9252         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
9253           pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
9254           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;}'
9255           then
9256             pgac_cv_path_flex=$pgac_candidate
9257             break 2
9258           else
9259             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9260 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9261 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
9262 $as_echo "$as_me: WARNING:
9263 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9264 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
9265           fi
9266         fi
9267       fi
9268     done
9269   done
9270   rm -f conftest.l lex.yy.c
9271   : ${pgac_cv_path_flex=no}
9272 fi
9273
9274 fi
9275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
9276 $as_echo "$pgac_cv_path_flex" >&6; }
9277 if test x"$pgac_cv_path_flex" = x"no"; then
9278   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9279 *** Without Flex you will not be able to build PostgreSQL from Git nor
9280 *** change any of the scanner definition files.  You can obtain Flex from
9281 *** a GNU mirror site.  (If you are using the official distribution of
9282 *** PostgreSQL then you do not need to worry about this because the Flex
9283 *** output is pre-generated.)" >&5
9284 $as_echo "$as_me: WARNING:
9285 *** Without Flex you will not be able to build PostgreSQL from Git nor
9286 *** change any of the scanner definition files.  You can obtain Flex from
9287 *** a GNU mirror site.  (If you are using the official distribution of
9288 *** PostgreSQL then you do not need to worry about this because the Flex
9289 *** output is pre-generated.)" >&2;}
9290
9291   FLEX=
9292 else
9293   FLEX=$pgac_cv_path_flex
9294   pgac_flex_version=`$FLEX --version 2>/dev/null`
9295   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
9296 $as_echo "$as_me: using $pgac_flex_version" >&6;}
9297 fi
9298
9299
9300
9301
9302
9303 if test -z "$PERL"; then
9304   for ac_prog in perl
9305 do
9306   # Extract the first word of "$ac_prog", so it can be a program name with args.
9307 set dummy $ac_prog; ac_word=$2
9308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9309 $as_echo_n "checking for $ac_word... " >&6; }
9310 if ${ac_cv_path_PERL+:} false; then :
9311   $as_echo_n "(cached) " >&6
9312 else
9313   case $PERL in
9314   [\\/]* | ?:[\\/]*)
9315   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
9316   ;;
9317   *)
9318   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9319 for as_dir in $PATH
9320 do
9321   IFS=$as_save_IFS
9322   test -z "$as_dir" && as_dir=.
9323     for ac_exec_ext in '' $ac_executable_extensions; do
9324   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9325     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
9326     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9327     break 2
9328   fi
9329 done
9330   done
9331 IFS=$as_save_IFS
9332
9333   ;;
9334 esac
9335 fi
9336 PERL=$ac_cv_path_PERL
9337 if test -n "$PERL"; then
9338   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9339 $as_echo "$PERL" >&6; }
9340 else
9341   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9342 $as_echo "no" >&6; }
9343 fi
9344
9345
9346   test -n "$PERL" && break
9347 done
9348
9349 else
9350   # Report the value of PERL in configure's output in all cases.
9351   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PERL" >&5
9352 $as_echo_n "checking for PERL... " >&6; }
9353   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9354 $as_echo "$PERL" >&6; }
9355 fi
9356
9357
9358 if test "$PERL"; then
9359   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'`
9360   { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
9361 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
9362   if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
9363     $AWK '{ if ($1 == 5 && $2 >= 8) exit 1; else exit 0;}'
9364   then
9365     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9366 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
9367 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
9368 $as_echo "$as_me: WARNING:
9369 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
9370 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
9371     PERL=""
9372   fi
9373 fi
9374
9375 if test -z "$PERL"; then
9376   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9377 *** Without Perl you will not be able to build PostgreSQL from Git.
9378 *** You can obtain Perl from any CPAN mirror site.
9379 *** (If you are using the official distribution of PostgreSQL then you do not
9380 *** need to worry about this, because the Perl output is pre-generated.)" >&5
9381 $as_echo "$as_me: WARNING:
9382 *** Without Perl you will not be able to build PostgreSQL from Git.
9383 *** You can obtain Perl from any CPAN mirror site.
9384 *** (If you are using the official distribution of PostgreSQL then you do not
9385 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
9386 fi
9387
9388 if test "$with_perl" = yes; then
9389   if test -z "$PERL"; then
9390     as_fn_error $? "Perl not found" "$LINENO" 5
9391   fi
9392
9393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
9394 $as_echo_n "checking for Perl archlibexp... " >&6; }
9395 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
9396 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
9397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
9398 $as_echo "$perl_archlibexp" >&6; }
9399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
9400 $as_echo_n "checking for Perl privlibexp... " >&6; }
9401 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
9402 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
9403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
9404 $as_echo "$perl_privlibexp" >&6; }
9405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
9406 $as_echo_n "checking for Perl useshrplib... " >&6; }
9407 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
9408 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
9409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
9410 $as_echo "$perl_useshrplib" >&6; }
9411   if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
9412     as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
9413 You might have to rebuild your Perl installation.  Refer to the
9414 documentation for details.  Use --without-perl to disable building
9415 PL/Perl." "$LINENO" 5
9416   fi
9417
9418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS recommended by Perl" >&5
9419 $as_echo_n "checking for CFLAGS recommended by Perl... " >&6; }
9420 perl_ccflags=`$PERL -MConfig -e 'print $Config{ccflags}'`
9421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_ccflags" >&5
9422 $as_echo "$perl_ccflags" >&6; }
9423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS to compile embedded Perl" >&5
9424 $as_echo_n "checking for CFLAGS to compile embedded Perl... " >&6; }
9425 perl_embed_ccflags=`$PERL -MConfig -e 'foreach $f (split(" ",$Config{ccflags})) {print $f, " " if ($f =~ /^-D[^_]/ || $f =~ /^-D_USE_32BIT_TIME_T/)}'`
9426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ccflags" >&5
9427 $as_echo "$perl_embed_ccflags" >&6; }
9428
9429
9430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
9431 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
9432 if test "$PORTNAME" = "win32" ; then
9433         perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
9434         if test -e "$perl_archlibexp/CORE/$perl_lib.lib"; then
9435                 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
9436         else
9437                 perl_lib=`basename $perl_archlibexp/CORE/libperl[5-9]*.a .a | sed 's/^lib//'`
9438                 if test -e "$perl_archlibexp/CORE/lib$perl_lib.a"; then
9439                         perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
9440                 fi
9441         fi
9442 else
9443         pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
9444         pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
9445         perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
9446 fi
9447 if test -z "$perl_embed_ldflags" ; then
9448         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9449 $as_echo "no" >&6; }
9450         as_fn_error $? "could not determine flags for linking embedded Perl.
9451 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
9452 installed." "$LINENO" 5
9453 else
9454         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
9455 $as_echo "$perl_embed_ldflags" >&6; }
9456 fi
9457
9458 fi
9459
9460 if test "$with_python" = yes; then
9461   if test -z "$PYTHON"; then
9462   for ac_prog in python
9463 do
9464   # Extract the first word of "$ac_prog", so it can be a program name with args.
9465 set dummy $ac_prog; ac_word=$2
9466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9467 $as_echo_n "checking for $ac_word... " >&6; }
9468 if ${ac_cv_path_PYTHON+:} false; then :
9469   $as_echo_n "(cached) " >&6
9470 else
9471   case $PYTHON in
9472   [\\/]* | ?:[\\/]*)
9473   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
9474   ;;
9475   *)
9476   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9477 for as_dir in $PATH
9478 do
9479   IFS=$as_save_IFS
9480   test -z "$as_dir" && as_dir=.
9481     for ac_exec_ext in '' $ac_executable_extensions; do
9482   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9483     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
9484     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9485     break 2
9486   fi
9487 done
9488   done
9489 IFS=$as_save_IFS
9490
9491   ;;
9492 esac
9493 fi
9494 PYTHON=$ac_cv_path_PYTHON
9495 if test -n "$PYTHON"; then
9496   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
9497 $as_echo "$PYTHON" >&6; }
9498 else
9499   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9500 $as_echo "no" >&6; }
9501 fi
9502
9503
9504   test -n "$PYTHON" && break
9505 done
9506
9507 else
9508   # Report the value of PYTHON in configure's output in all cases.
9509   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHON" >&5
9510 $as_echo_n "checking for PYTHON... " >&6; }
9511   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
9512 $as_echo "$PYTHON" >&6; }
9513 fi
9514
9515 if test x"$PYTHON" = x""; then
9516   as_fn_error $? "Python not found" "$LINENO" 5
9517 fi
9518
9519
9520 python_fullversion=`${PYTHON} -c "import sys; print(sys.version)" | sed q`
9521 { $as_echo "$as_me:${as_lineno-$LINENO}: using python $python_fullversion" >&5
9522 $as_echo "$as_me: using python $python_fullversion" >&6;}
9523 # python_fullversion is typically n.n.n plus some trailing junk
9524 python_majorversion=`echo "$python_fullversion" | sed 's/^\([0-9]*\).*/\1/'`
9525 python_minorversion=`echo "$python_fullversion" | sed 's/^[0-9]*\.\([0-9]*\).*/\1/'`
9526 python_version=`echo "$python_fullversion" | sed 's/^\([0-9]*\.[0-9]*\).*/\1/'`
9527 # Reject unsupported Python versions as soon as practical.
9528 if test "$python_majorversion" -lt 3 -a "$python_minorversion" -lt 4; then
9529   as_fn_error $? "Python version $python_version is too old (version 2.4 or later is required)" "$LINENO" 5
9530 fi
9531
9532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python distutils module" >&5
9533 $as_echo_n "checking for Python distutils module... " >&6; }
9534 if "${PYTHON}" -c 'import distutils' 2>&5
9535 then
9536     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9537 $as_echo "yes" >&6; }
9538 else
9539     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9540 $as_echo "no" >&6; }
9541     as_fn_error $? "distutils module not found" "$LINENO" 5
9542 fi
9543
9544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
9545 $as_echo_n "checking Python configuration directory... " >&6; }
9546 python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
9547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
9548 $as_echo "$python_configdir" >&6; }
9549
9550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directories" >&5
9551 $as_echo_n "checking Python include directories... " >&6; }
9552 python_includespec=`${PYTHON} -c "
9553 import distutils.sysconfig
9554 a = '-I' + distutils.sysconfig.get_python_inc(False)
9555 b = '-I' + distutils.sysconfig.get_python_inc(True)
9556 if a == b:
9557     print(a)
9558 else:
9559     print(a + ' ' + b)"`
9560 if test "$PORTNAME" = win32 ; then
9561     python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
9562 fi
9563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
9564 $as_echo "$python_includespec" >&6; }
9565
9566
9567
9568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
9569 $as_echo_n "checking how to link an embedded Python application... " >&6; }
9570
9571 python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
9572 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
9573
9574 # If LDLIBRARY exists and has a shlib extension, use it verbatim.
9575 ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
9576 if test -e "${python_libdir}/${python_ldlibrary}" -a x"${python_ldlibrary}" != x"${ldlibrary}"
9577 then
9578         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
9579         found_shlib=1
9580 else
9581         # Otherwise, guess the base name of the shlib.
9582         # LDVERSION was added in Python 3.2, before that use VERSION,
9583         # or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS.
9584         python_ldversion=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDVERSION'))))"`
9585         if test x"${python_ldversion}" != x""; then
9586                 ldlibrary="python${python_ldversion}"
9587         else
9588                 python_version_var=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('VERSION'))))"`
9589                 if test x"${python_version_var}" != x""; then
9590                         ldlibrary="python${python_version_var}"
9591                 else
9592                         ldlibrary="python${python_version}"
9593                 fi
9594         fi
9595         # Search for a likely-looking file.
9596         found_shlib=0
9597         for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
9598         do
9599                 # We don't know the platform DLSUFFIX here, so check 'em all.
9600                 for e in .so .dll .dylib .sl; do
9601                         if test -e "$d/lib${ldlibrary}$e"; then
9602                                 python_libdir="$d"
9603                                 found_shlib=1
9604                                 break 2
9605                         fi
9606                 done
9607         done
9608         # Some platforms (OpenBSD) require us to accept a bare versioned shlib
9609         # (".so.n.n") as well. However, check this only after failing to find
9610         # ".so" anywhere, because yet other platforms (Debian) put the .so
9611         # symlink in a different directory from the underlying versioned shlib.
9612         if test "$found_shlib" != 1; then
9613                 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
9614                 do
9615                         for f in "$d/lib${ldlibrary}.so."* ; do
9616                                 if test -e "$f"; then
9617                                         python_libdir="$d"
9618                                         found_shlib=1
9619                                         break 2
9620                                 fi
9621                         done
9622                 done
9623         fi
9624         # As usual, Windows has its own ideas.  Possible default library
9625         # locations include c:/Windows/System32 and (for Cygwin) /usr/bin,
9626         # and the "lib" prefix might not be there.
9627         if test "$found_shlib" != 1 -a \( "$PORTNAME" = win32 -o "$PORTNAME" = cygwin \); then
9628                 for d in "${python_libdir}" "${python_configdir}" c:/Windows/System32 /usr/bin
9629                 do
9630                         for f in "$d/lib${ldlibrary}.dll" "$d/${ldlibrary}.dll" ; do
9631                                 if test -e "$f"; then
9632                                         python_libdir="$d"
9633                                         found_shlib=1
9634                                         break 2
9635                                 fi
9636                         done
9637                 done
9638         fi
9639 fi
9640 if test "$found_shlib" != 1; then
9641         as_fn_error $? "could not find shared library for Python
9642 You might have to rebuild your Python installation.  Refer to the
9643 documentation for details.  Use --without-python to disable building
9644 PL/Python." "$LINENO" 5
9645 fi
9646 python_libspec="-L${python_libdir} -l${ldlibrary}"
9647
9648 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
9649
9650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
9651 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
9652
9653
9654
9655 fi
9656
9657 if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
9658   if test -z "$ZIC"; then
9659   for ac_prog in zic
9660 do
9661   # Extract the first word of "$ac_prog", so it can be a program name with args.
9662 set dummy $ac_prog; ac_word=$2
9663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9664 $as_echo_n "checking for $ac_word... " >&6; }
9665 if ${ac_cv_path_ZIC+:} false; then :
9666   $as_echo_n "(cached) " >&6
9667 else
9668   case $ZIC in
9669   [\\/]* | ?:[\\/]*)
9670   ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
9671   ;;
9672   *)
9673   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9674 for as_dir in $PATH
9675 do
9676   IFS=$as_save_IFS
9677   test -z "$as_dir" && as_dir=.
9678     for ac_exec_ext in '' $ac_executable_extensions; do
9679   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9680     ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
9681     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9682     break 2
9683   fi
9684 done
9685   done
9686 IFS=$as_save_IFS
9687
9688   ;;
9689 esac
9690 fi
9691 ZIC=$ac_cv_path_ZIC
9692 if test -n "$ZIC"; then
9693   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
9694 $as_echo "$ZIC" >&6; }
9695 else
9696   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9697 $as_echo "no" >&6; }
9698 fi
9699
9700
9701   test -n "$ZIC" && break
9702 done
9703
9704 else
9705   # Report the value of ZIC in configure's output in all cases.
9706   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIC" >&5
9707 $as_echo_n "checking for ZIC... " >&6; }
9708   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
9709 $as_echo "$ZIC" >&6; }
9710 fi
9711
9712   if test -z "$ZIC"; then
9713     as_fn_error $? "
9714 When cross-compiling, either use the option --with-system-tzdata to use
9715 existing time-zone data, or set the environment variable ZIC to a zic
9716 program to use during the build." "$LINENO" 5
9717   fi
9718 fi
9719
9720 #
9721 # Pthreads
9722 #
9723 # For each platform, we need to know about any special compile and link
9724 # libraries, and whether the normal C function names are thread-safe.
9725 # See the comment at the top of src/port/thread.c for more information.
9726 # WIN32 doesn't need the pthread tests;  it always uses threads
9727 #
9728 # These tests are run before the library-tests, because linking with the
9729 # other libraries can pull in the pthread functions as a side-effect.  We
9730 # want to use the -pthread or similar flags directly, and not rely on
9731 # the side-effects of linking with some other library.
9732 #
9733 # note: We have to use AS_IF here rather than plain if. The AC_CHECK_HEADER
9734 # invocation below is the first one in the script, and autoconf generates
9735 # additional code for that, which must not be inside the if-block. AS_IF
9736 # knows how to do that.
9737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
9738 $as_echo_n "checking for ANSI C header files... " >&6; }
9739 if ${ac_cv_header_stdc+:} false; then :
9740   $as_echo_n "(cached) " >&6
9741 else
9742   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9743 /* end confdefs.h.  */
9744 #include <stdlib.h>
9745 #include <stdarg.h>
9746 #include <string.h>
9747 #include <float.h>
9748
9749 int
9750 main ()
9751 {
9752
9753   ;
9754   return 0;
9755 }
9756 _ACEOF
9757 if ac_fn_c_try_compile "$LINENO"; then :
9758   ac_cv_header_stdc=yes
9759 else
9760   ac_cv_header_stdc=no
9761 fi
9762 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9763
9764 if test $ac_cv_header_stdc = yes; then
9765   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9766   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9767 /* end confdefs.h.  */
9768 #include <string.h>
9769
9770 _ACEOF
9771 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9772   $EGREP "memchr" >/dev/null 2>&1; then :
9773
9774 else
9775   ac_cv_header_stdc=no
9776 fi
9777 rm -f conftest*
9778
9779 fi
9780
9781 if test $ac_cv_header_stdc = yes; then
9782   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9783   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9784 /* end confdefs.h.  */
9785 #include <stdlib.h>
9786
9787 _ACEOF
9788 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9789   $EGREP "free" >/dev/null 2>&1; then :
9790
9791 else
9792   ac_cv_header_stdc=no
9793 fi
9794 rm -f conftest*
9795
9796 fi
9797
9798 if test $ac_cv_header_stdc = yes; then
9799   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9800   if test "$cross_compiling" = yes; then :
9801   :
9802 else
9803   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9804 /* end confdefs.h.  */
9805 #include <ctype.h>
9806 #include <stdlib.h>
9807 #if ((' ' & 0x0FF) == 0x020)
9808 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9809 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9810 #else
9811 # define ISLOWER(c) \
9812                    (('a' <= (c) && (c) <= 'i') \
9813                      || ('j' <= (c) && (c) <= 'r') \
9814                      || ('s' <= (c) && (c) <= 'z'))
9815 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9816 #endif
9817
9818 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9819 int
9820 main ()
9821 {
9822   int i;
9823   for (i = 0; i < 256; i++)
9824     if (XOR (islower (i), ISLOWER (i))
9825         || toupper (i) != TOUPPER (i))
9826       return 2;
9827   return 0;
9828 }
9829 _ACEOF
9830 if ac_fn_c_try_run "$LINENO"; then :
9831
9832 else
9833   ac_cv_header_stdc=no
9834 fi
9835 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9836   conftest.$ac_objext conftest.beam conftest.$ac_ext
9837 fi
9838
9839 fi
9840 fi
9841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
9842 $as_echo "$ac_cv_header_stdc" >&6; }
9843 if test $ac_cv_header_stdc = yes; then
9844
9845 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
9846
9847 fi
9848
9849 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
9850 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
9851                   inttypes.h stdint.h unistd.h
9852 do :
9853   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9854 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
9855 "
9856 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9857   cat >>confdefs.h <<_ACEOF
9858 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9859 _ACEOF
9860
9861 fi
9862
9863 done
9864
9865
9866 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then :
9867    # then
9868
9869
9870
9871 ac_ext=c
9872 ac_cpp='$CPP $CPPFLAGS'
9873 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9874 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9875 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9876
9877 ax_pthread_ok=no
9878
9879 # We used to check for pthread.h first, but this fails if pthread.h
9880 # requires special compiler flags (e.g. on Tru64 or Sequent).
9881 # It gets checked for in the link test anyway.
9882
9883 # First of all, check if the user has set any of the PTHREAD_LIBS,
9884 # etcetera environment variables, and if threads linking works using
9885 # them:
9886 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
9887         save_CFLAGS="$CFLAGS"
9888         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
9889         save_LIBS="$LIBS"
9890         LIBS="$PTHREAD_LIBS $LIBS"
9891         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
9892 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
9893         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9894 /* end confdefs.h.  */
9895
9896 /* Override any GCC internal prototype to avoid an error.
9897    Use char because int might match the return type of a GCC
9898    builtin and then its argument prototype would still apply.  */
9899 #ifdef __cplusplus
9900 extern "C"
9901 #endif
9902 char pthread_join ();
9903 int
9904 main ()
9905 {
9906 return pthread_join ();
9907   ;
9908   return 0;
9909 }
9910 _ACEOF
9911 if ac_fn_c_try_link "$LINENO"; then :
9912   ax_pthread_ok=yes
9913 fi
9914 rm -f core conftest.err conftest.$ac_objext \
9915     conftest$ac_exeext conftest.$ac_ext
9916         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
9917 $as_echo "$ax_pthread_ok" >&6; }
9918         if test x"$ax_pthread_ok" = xno; then
9919                 PTHREAD_LIBS=""
9920                 PTHREAD_CFLAGS=""
9921         fi
9922         LIBS="$save_LIBS"
9923         CFLAGS="$save_CFLAGS"
9924 fi
9925
9926 # We must check for the threads library under a number of different
9927 # names; the ordering is very important because some systems
9928 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
9929 # libraries is broken (non-POSIX).
9930
9931 # Create a list of thread flags to try.  Items starting with a "-" are
9932 # C compiler flags, and other items are library names, except for "none"
9933 # which indicates that we try without any flags at all, and "pthread-config"
9934 # which is a program returning the flags for the Pth emulation library.
9935
9936 ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mt -mthreads pthread --thread-safe pthread-config"
9937
9938 # The ordering *is* (sometimes) important.  Some notes on the
9939 # individual items follow:
9940
9941 # pthreads: AIX (must check this before -lpthread)
9942 # none: in case threads are in libc; should be tried before -Kthread and
9943 #       other compiler flags to prevent continual compiler warnings
9944 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
9945 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
9946 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
9947 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
9948 # -pthreads: Solaris/gcc
9949 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
9950 #      doesn't hurt to check since this sometimes defines pthreads and
9951 #      -D_REENTRANT too), HP C (must be checked before -lpthread, which
9952 #      is present but should not be used directly)
9953 # -mthreads: Mingw32/gcc, Lynx/gcc
9954 # pthread: Linux, etcetera
9955 # --thread-safe: KAI C++
9956 # pthread-config: use pthread-config program (for GNU Pth library)
9957
9958 case $host_os in
9959
9960         hpux*)
9961
9962         # From the cc(1) man page: "[-mt] Sets various -D flags to enable
9963         # multi-threading and also sets -lpthread."
9964
9965         ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
9966         ;;
9967
9968         openedition*)
9969
9970         # IBM z/OS requires a feature-test macro to be defined in order to
9971         # enable POSIX threads at all, so give the user a hint if this is
9972         # not set. (We don't define these ourselves, as they can affect
9973         # other portions of the system API in unpredictable ways.)
9974
9975         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9976 /* end confdefs.h.  */
9977
9978 #            if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
9979              AX_PTHREAD_ZOS_MISSING
9980 #            endif
9981
9982 _ACEOF
9983 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9984   $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
9985   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
9986 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
9987 fi
9988 rm -f conftest*
9989
9990         ;;
9991
9992         solaris*)
9993
9994         # Newer versions of Solaris require the "-mt -lpthread" pair, and we
9995         # check that first.  On some older versions, libc contains stubbed
9996         # (non-functional) versions of the pthreads routines, so link-based
9997         # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
9998         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
9999         # a function called by this macro, so we could check for that, but
10000         # who knows whether they'll stub that too in a future libc.)  So
10001         # we'll look for -pthreads and -lpthread shortly thereafter.
10002
10003         ax_pthread_flags="-mt,pthread -pthreads -pthread pthread $ax_pthread_flags"
10004         ;;
10005 esac
10006
10007 # Older versions of Clang only give a warning instead of an error for an
10008 # unrecognized option, unless we specify -Werror. (We throw in some extra
10009 # Clang warning flags for good measure.)
10010
10011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler needs certain flags to reject unknown flags" >&5
10012 $as_echo_n "checking if compiler needs certain flags to reject unknown flags... " >&6; }
10013 if ${ax_cv_PTHREAD_REJECT_UNKNOWN+:} false; then :
10014   $as_echo_n "(cached) " >&6
10015 else
10016   ax_cv_PTHREAD_REJECT_UNKNOWN=unknown
10017      save_CFLAGS="$CFLAGS"
10018      ax_pthread_extra_flags="-Wunknown-warning-option -Wunused-command-line-argument"
10019      CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wfoobaz -foobaz"
10020      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10021 /* end confdefs.h.  */
10022 int foo(void);
10023 int
10024 main ()
10025 {
10026 foo()
10027   ;
10028   return 0;
10029 }
10030 _ACEOF
10031 if ac_fn_c_try_compile "$LINENO"; then :
10032   ax_cv_PTHREAD_REJECT_UNKNOWN="-Werror $ax_pthread_extra_flags"
10033 else
10034   ax_cv_PTHREAD_REJECT_UNKNOWN=no
10035 fi
10036 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10037      CFLAGS="$save_CFLAGS"
10038
10039 fi
10040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_REJECT_UNKNOWN" >&5
10041 $as_echo "$ax_cv_PTHREAD_REJECT_UNKNOWN" >&6; }
10042 ax_pthread_extra_flags=
10043 if test "x$ax_cv_PTHREAD_REJECT_UNKNOWN" != "xno"; then :
10044   ax_pthread_extra_flags="$ax_cv_PTHREAD_REJECT_UNKNOWN"
10045 fi
10046
10047 if test x"$ax_pthread_ok" = xno; then
10048 for flag in $ax_pthread_flags; do
10049
10050         case $flag in
10051                 none)
10052                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
10053 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
10054                 ;;
10055
10056                 -mt,pthread)
10057                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
10058 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
10059                 PTHREAD_CFLAGS="-mt"
10060                 PTHREAD_LIBS="-lpthread"
10061                 ;;
10062
10063                 -*)
10064                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
10065 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
10066                 PTHREAD_CFLAGS="$flag"
10067                 ;;
10068
10069                 pthread-config)
10070                 # Extract the first word of "pthread-config", so it can be a program name with args.
10071 set dummy pthread-config; ac_word=$2
10072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10073 $as_echo_n "checking for $ac_word... " >&6; }
10074 if ${ac_cv_prog_ax_pthread_config+:} false; then :
10075   $as_echo_n "(cached) " >&6
10076 else
10077   if test -n "$ax_pthread_config"; then
10078   ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
10079 else
10080 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10081 for as_dir in $PATH
10082 do
10083   IFS=$as_save_IFS
10084   test -z "$as_dir" && as_dir=.
10085     for ac_exec_ext in '' $ac_executable_extensions; do
10086   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10087     ac_cv_prog_ax_pthread_config="yes"
10088     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10089     break 2
10090   fi
10091 done
10092   done
10093 IFS=$as_save_IFS
10094
10095   test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
10096 fi
10097 fi
10098 ax_pthread_config=$ac_cv_prog_ax_pthread_config
10099 if test -n "$ax_pthread_config"; then
10100   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
10101 $as_echo "$ax_pthread_config" >&6; }
10102 else
10103   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10104 $as_echo "no" >&6; }
10105 fi
10106
10107
10108                 if test x"$ax_pthread_config" = xno; then continue; fi
10109                 PTHREAD_CFLAGS="`pthread-config --cflags`"
10110                 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
10111                 ;;
10112
10113                 *)
10114                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
10115 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
10116                 PTHREAD_LIBS="-l$flag"
10117                 ;;
10118         esac
10119
10120         save_LIBS="$LIBS"
10121         save_CFLAGS="$CFLAGS"
10122         LIBS="$PTHREAD_LIBS $LIBS"
10123         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
10124
10125         # Check for various functions.  We must include pthread.h,
10126         # since some functions may be macros.  (On the Sequent, we
10127         # need a special flag -Kthread to make this header compile.)
10128         # We check for pthread_join because it is in -lpthread on IRIX
10129         # while pthread_create is in libc.  We check for pthread_attr_init
10130         # due to DEC craziness with -lpthreads.  We check for
10131         # pthread_cleanup_push because it is one of the few pthread
10132         # functions on Solaris that doesn't have a non-functional libc stub.
10133         # We try pthread_create on general principles.
10134         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10135 /* end confdefs.h.  */
10136 #include <pthread.h>
10137                         static void routine(void *a) { a = 0; }
10138                         static void *start_routine(void *a) { return a; }
10139 int
10140 main ()
10141 {
10142 pthread_t th; pthread_attr_t attr;
10143                         pthread_create(&th, 0, start_routine, 0);
10144                         pthread_join(th, 0);
10145                         pthread_attr_init(&attr);
10146                         pthread_cleanup_push(routine, 0);
10147                         pthread_cleanup_pop(0) /* ; */
10148   ;
10149   return 0;
10150 }
10151 _ACEOF
10152 if ac_fn_c_try_link "$LINENO"; then :
10153   ax_pthread_ok=yes
10154 fi
10155 rm -f core conftest.err conftest.$ac_objext \
10156     conftest$ac_exeext conftest.$ac_ext
10157
10158         LIBS="$save_LIBS"
10159         CFLAGS="$save_CFLAGS"
10160
10161         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10162 $as_echo "$ax_pthread_ok" >&6; }
10163         if test "x$ax_pthread_ok" = xyes; then
10164                 break;
10165         fi
10166
10167         PTHREAD_LIBS=""
10168         PTHREAD_CFLAGS=""
10169 done
10170 fi
10171
10172 # Various other checks:
10173 if test "x$ax_pthread_ok" = xyes; then
10174         save_LIBS="$LIBS"
10175         LIBS="$PTHREAD_LIBS $LIBS"
10176         save_CFLAGS="$CFLAGS"
10177         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10178
10179         # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
10180         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
10181 $as_echo_n "checking for joinable pthread attribute... " >&6; }
10182 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
10183   $as_echo_n "(cached) " >&6
10184 else
10185   ax_cv_PTHREAD_JOINABLE_ATTR=unknown
10186              for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
10187                  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10188 /* end confdefs.h.  */
10189 #include <pthread.h>
10190 int
10191 main ()
10192 {
10193 int attr = $attr; return attr /* ; */
10194   ;
10195   return 0;
10196 }
10197 _ACEOF
10198 if ac_fn_c_try_link "$LINENO"; then :
10199   ax_cv_PTHREAD_JOINABLE_ATTR=$attr; break
10200 fi
10201 rm -f core conftest.err conftest.$ac_objext \
10202     conftest$ac_exeext conftest.$ac_ext
10203              done
10204
10205 fi
10206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
10207 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
10208         if test "$ax_cv_PTHREAD_JOINABLE_ATTR" != unknown && \
10209                test "$ax_cv_PTHREAD_JOINABLE_ATTR" != PTHREAD_CREATE_JOINABLE; then :
10210
10211 cat >>confdefs.h <<_ACEOF
10212 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
10213 _ACEOF
10214
10215 fi
10216
10217         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
10218 $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
10219 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
10220   $as_echo_n "(cached) " >&6
10221 else
10222   ax_cv_PTHREAD_SPECIAL_FLAGS=no
10223              ax_pthread_special_flags_added=no
10224              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10225 /* end confdefs.h.  */
10226
10227 #                 if !defined(_REENTRANT) && !defined(_THREAD_SAFE)
10228                   AX_PTHREAD_NEED_SPECIAL_FLAG
10229 #                 endif
10230
10231 _ACEOF
10232 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10233   $EGREP "AX_PTHREAD_NEED_SPECIAL_FLAG" >/dev/null 2>&1; then :
10234   case $host_os in
10235                   aix* | freebsd*)
10236                   ax_cv_PTHREAD_SPECIAL_FLAGS="-D_THREAD_SAFE"
10237                   ;;
10238                   darwin* | hpux* | osf* | solaris*)
10239                   ax_cv_PTHREAD_SPECIAL_FLAGS="-D_REENTRANT"
10240                   ;;
10241                   esac
10242
10243 fi
10244 rm -f conftest*
10245
10246
10247 fi
10248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
10249 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
10250         if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
10251                test "x$ax_pthread_special_flags_added" != "xyes"; then :
10252   PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
10253                ax_pthread_special_flags_added=yes
10254 fi
10255
10256         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
10257 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
10258 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
10259   $as_echo_n "(cached) " >&6
10260 else
10261   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10262 /* end confdefs.h.  */
10263 #include <pthread.h>
10264 int
10265 main ()
10266 {
10267 int i = PTHREAD_PRIO_INHERIT;
10268   ;
10269   return 0;
10270 }
10271 _ACEOF
10272 if ac_fn_c_try_link "$LINENO"; then :
10273   ax_cv_PTHREAD_PRIO_INHERIT=yes
10274 else
10275   ax_cv_PTHREAD_PRIO_INHERIT=no
10276 fi
10277 rm -f core conftest.err conftest.$ac_objext \
10278     conftest$ac_exeext conftest.$ac_ext
10279
10280 fi
10281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
10282 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
10283         if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
10284
10285 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
10286
10287 fi
10288
10289         LIBS="$save_LIBS"
10290         CFLAGS="$save_CFLAGS"
10291
10292         # More AIX lossage: compile with *_r variant
10293         if test "x$GCC" != xyes; then
10294             case $host_os in
10295                 aix*)
10296                 case "x/$CC" in #(
10297   x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
10298     #handle absolute path differently from PATH based program lookup
10299                    case "x$CC" in #(
10300   x/*) :
10301     if as_fn_executable_p ${CC}_r; then :
10302   PTHREAD_CC="${CC}_r"
10303 fi ;; #(
10304   *) :
10305     for ac_prog in ${CC}_r
10306 do
10307   # Extract the first word of "$ac_prog", so it can be a program name with args.
10308 set dummy $ac_prog; ac_word=$2
10309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10310 $as_echo_n "checking for $ac_word... " >&6; }
10311 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
10312   $as_echo_n "(cached) " >&6
10313 else
10314   if test -n "$PTHREAD_CC"; then
10315   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
10316 else
10317 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10318 for as_dir in $PATH
10319 do
10320   IFS=$as_save_IFS
10321   test -z "$as_dir" && as_dir=.
10322     for ac_exec_ext in '' $ac_executable_extensions; do
10323   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10324     ac_cv_prog_PTHREAD_CC="$ac_prog"
10325     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10326     break 2
10327   fi
10328 done
10329   done
10330 IFS=$as_save_IFS
10331
10332 fi
10333 fi
10334 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
10335 if test -n "$PTHREAD_CC"; then
10336   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
10337 $as_echo "$PTHREAD_CC" >&6; }
10338 else
10339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10340 $as_echo "no" >&6; }
10341 fi
10342
10343
10344   test -n "$PTHREAD_CC" && break
10345 done
10346 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
10347  ;;
10348 esac ;; #(
10349   *) :
10350      ;;
10351 esac
10352                 ;;
10353             esac
10354         fi
10355 fi
10356
10357 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
10358
10359
10360
10361
10362
10363 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
10364 if test x"$ax_pthread_ok" = xyes; then
10365
10366 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
10367
10368         :
10369 else
10370         ax_pthread_ok=no
10371
10372 fi
10373 ac_ext=c
10374 ac_cpp='$CPP $CPPFLAGS'
10375 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10376 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10377 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10378
10379         # set thread flags
10380
10381 # Some platforms use these, so just define them.  They can't hurt if they
10382 # are not supported.  For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
10383 # enables 5-arg getpwuid_r, among other things.
10384 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
10385
10386 # Check for *_r functions
10387 _CFLAGS="$CFLAGS"
10388 _LIBS="$LIBS"
10389 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10390 LIBS="$LIBS $PTHREAD_LIBS"
10391
10392 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
10393 if test "x$ac_cv_header_pthread_h" = xyes; then :
10394
10395 else
10396   as_fn_error $? "
10397 pthread.h not found;  use --disable-thread-safety to disable thread safety" "$LINENO" 5
10398 fi
10399
10400
10401
10402 for ac_func in strerror_r getpwuid_r gethostbyname_r
10403 do :
10404   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10405 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10406 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10407   cat >>confdefs.h <<_ACEOF
10408 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10409 _ACEOF
10410
10411 fi
10412 done
10413
10414
10415 # Do test here with the proper thread flags
10416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
10417 $as_echo_n "checking whether strerror_r returns int... " >&6; }
10418 if ${pgac_cv_func_strerror_r_int+:} false; then :
10419   $as_echo_n "(cached) " >&6
10420 else
10421   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10422 /* end confdefs.h.  */
10423 #include <string.h>
10424 int
10425 main ()
10426 {
10427 #ifndef _AIX
10428 int strerror_r(int, char *, size_t);
10429 #else
10430 /* Older AIX has 'int' for the third argument so we don't test the args. */
10431 int strerror_r();
10432 #endif
10433   ;
10434   return 0;
10435 }
10436 _ACEOF
10437 if ac_fn_c_try_compile "$LINENO"; then :
10438   pgac_cv_func_strerror_r_int=yes
10439 else
10440   pgac_cv_func_strerror_r_int=no
10441 fi
10442 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10443 fi
10444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
10445 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
10446 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
10447
10448 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
10449
10450 fi
10451
10452
10453 CFLAGS="$_CFLAGS"
10454 LIBS="$_LIBS"
10455
10456
10457 else
10458    # else
10459 # do not use values from template file
10460 PTHREAD_CFLAGS=
10461 PTHREAD_LIBS=
10462
10463 fi # fi
10464
10465
10466
10467
10468
10469 ##
10470 ## Libraries
10471 ##
10472 ## Most libraries are included only if they demonstrably provide a function
10473 ## we need, but libm is an exception: always include it, because there are
10474 ## too many compilers that play cute optimization games that will break
10475 ## probes for standard functions such as pow().
10476 ##
10477
10478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
10479 $as_echo_n "checking for main in -lm... " >&6; }
10480 if ${ac_cv_lib_m_main+:} false; then :
10481   $as_echo_n "(cached) " >&6
10482 else
10483   ac_check_lib_save_LIBS=$LIBS
10484 LIBS="-lm  $LIBS"
10485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10486 /* end confdefs.h.  */
10487
10488
10489 int
10490 main ()
10491 {
10492 return main ();
10493   ;
10494   return 0;
10495 }
10496 _ACEOF
10497 if ac_fn_c_try_link "$LINENO"; then :
10498   ac_cv_lib_m_main=yes
10499 else
10500   ac_cv_lib_m_main=no
10501 fi
10502 rm -f core conftest.err conftest.$ac_objext \
10503     conftest$ac_exeext conftest.$ac_ext
10504 LIBS=$ac_check_lib_save_LIBS
10505 fi
10506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
10507 $as_echo "$ac_cv_lib_m_main" >&6; }
10508 if test "x$ac_cv_lib_m_main" = xyes; then :
10509   cat >>confdefs.h <<_ACEOF
10510 #define HAVE_LIBM 1
10511 _ACEOF
10512
10513   LIBS="-lm $LIBS"
10514
10515 fi
10516
10517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
10518 $as_echo_n "checking for library containing setproctitle... " >&6; }
10519 if ${ac_cv_search_setproctitle+:} false; then :
10520   $as_echo_n "(cached) " >&6
10521 else
10522   ac_func_search_save_LIBS=$LIBS
10523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10524 /* end confdefs.h.  */
10525
10526 /* Override any GCC internal prototype to avoid an error.
10527    Use char because int might match the return type of a GCC
10528    builtin and then its argument prototype would still apply.  */
10529 #ifdef __cplusplus
10530 extern "C"
10531 #endif
10532 char setproctitle ();
10533 int
10534 main ()
10535 {
10536 return setproctitle ();
10537   ;
10538   return 0;
10539 }
10540 _ACEOF
10541 for ac_lib in '' util; do
10542   if test -z "$ac_lib"; then
10543     ac_res="none required"
10544   else
10545     ac_res=-l$ac_lib
10546     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10547   fi
10548   if ac_fn_c_try_link "$LINENO"; then :
10549   ac_cv_search_setproctitle=$ac_res
10550 fi
10551 rm -f core conftest.err conftest.$ac_objext \
10552     conftest$ac_exeext
10553   if ${ac_cv_search_setproctitle+:} false; then :
10554   break
10555 fi
10556 done
10557 if ${ac_cv_search_setproctitle+:} false; then :
10558
10559 else
10560   ac_cv_search_setproctitle=no
10561 fi
10562 rm conftest.$ac_ext
10563 LIBS=$ac_func_search_save_LIBS
10564 fi
10565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
10566 $as_echo "$ac_cv_search_setproctitle" >&6; }
10567 ac_res=$ac_cv_search_setproctitle
10568 if test "$ac_res" != no; then :
10569   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10570
10571 fi
10572
10573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
10574 $as_echo_n "checking for library containing dlopen... " >&6; }
10575 if ${ac_cv_search_dlopen+:} false; then :
10576   $as_echo_n "(cached) " >&6
10577 else
10578   ac_func_search_save_LIBS=$LIBS
10579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10580 /* end confdefs.h.  */
10581
10582 /* Override any GCC internal prototype to avoid an error.
10583    Use char because int might match the return type of a GCC
10584    builtin and then its argument prototype would still apply.  */
10585 #ifdef __cplusplus
10586 extern "C"
10587 #endif
10588 char dlopen ();
10589 int
10590 main ()
10591 {
10592 return dlopen ();
10593   ;
10594   return 0;
10595 }
10596 _ACEOF
10597 for ac_lib in '' dl; do
10598   if test -z "$ac_lib"; then
10599     ac_res="none required"
10600   else
10601     ac_res=-l$ac_lib
10602     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10603   fi
10604   if ac_fn_c_try_link "$LINENO"; then :
10605   ac_cv_search_dlopen=$ac_res
10606 fi
10607 rm -f core conftest.err conftest.$ac_objext \
10608     conftest$ac_exeext
10609   if ${ac_cv_search_dlopen+:} false; then :
10610   break
10611 fi
10612 done
10613 if ${ac_cv_search_dlopen+:} false; then :
10614
10615 else
10616   ac_cv_search_dlopen=no
10617 fi
10618 rm conftest.$ac_ext
10619 LIBS=$ac_func_search_save_LIBS
10620 fi
10621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
10622 $as_echo "$ac_cv_search_dlopen" >&6; }
10623 ac_res=$ac_cv_search_dlopen
10624 if test "$ac_res" != no; then :
10625   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10626
10627 fi
10628
10629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
10630 $as_echo_n "checking for library containing socket... " >&6; }
10631 if ${ac_cv_search_socket+:} false; then :
10632   $as_echo_n "(cached) " >&6
10633 else
10634   ac_func_search_save_LIBS=$LIBS
10635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10636 /* end confdefs.h.  */
10637
10638 /* Override any GCC internal prototype to avoid an error.
10639    Use char because int might match the return type of a GCC
10640    builtin and then its argument prototype would still apply.  */
10641 #ifdef __cplusplus
10642 extern "C"
10643 #endif
10644 char socket ();
10645 int
10646 main ()
10647 {
10648 return socket ();
10649   ;
10650   return 0;
10651 }
10652 _ACEOF
10653 for ac_lib in '' socket ws2_32; do
10654   if test -z "$ac_lib"; then
10655     ac_res="none required"
10656   else
10657     ac_res=-l$ac_lib
10658     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10659   fi
10660   if ac_fn_c_try_link "$LINENO"; then :
10661   ac_cv_search_socket=$ac_res
10662 fi
10663 rm -f core conftest.err conftest.$ac_objext \
10664     conftest$ac_exeext
10665   if ${ac_cv_search_socket+:} false; then :
10666   break
10667 fi
10668 done
10669 if ${ac_cv_search_socket+:} false; then :
10670
10671 else
10672   ac_cv_search_socket=no
10673 fi
10674 rm conftest.$ac_ext
10675 LIBS=$ac_func_search_save_LIBS
10676 fi
10677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
10678 $as_echo "$ac_cv_search_socket" >&6; }
10679 ac_res=$ac_cv_search_socket
10680 if test "$ac_res" != no; then :
10681   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10682
10683 fi
10684
10685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
10686 $as_echo_n "checking for library containing shl_load... " >&6; }
10687 if ${ac_cv_search_shl_load+:} false; then :
10688   $as_echo_n "(cached) " >&6
10689 else
10690   ac_func_search_save_LIBS=$LIBS
10691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10692 /* end confdefs.h.  */
10693
10694 /* Override any GCC internal prototype to avoid an error.
10695    Use char because int might match the return type of a GCC
10696    builtin and then its argument prototype would still apply.  */
10697 #ifdef __cplusplus
10698 extern "C"
10699 #endif
10700 char shl_load ();
10701 int
10702 main ()
10703 {
10704 return shl_load ();
10705   ;
10706   return 0;
10707 }
10708 _ACEOF
10709 for ac_lib in '' dld; do
10710   if test -z "$ac_lib"; then
10711     ac_res="none required"
10712   else
10713     ac_res=-l$ac_lib
10714     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10715   fi
10716   if ac_fn_c_try_link "$LINENO"; then :
10717   ac_cv_search_shl_load=$ac_res
10718 fi
10719 rm -f core conftest.err conftest.$ac_objext \
10720     conftest$ac_exeext
10721   if ${ac_cv_search_shl_load+:} false; then :
10722   break
10723 fi
10724 done
10725 if ${ac_cv_search_shl_load+:} false; then :
10726
10727 else
10728   ac_cv_search_shl_load=no
10729 fi
10730 rm conftest.$ac_ext
10731 LIBS=$ac_func_search_save_LIBS
10732 fi
10733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
10734 $as_echo "$ac_cv_search_shl_load" >&6; }
10735 ac_res=$ac_cv_search_shl_load
10736 if test "$ac_res" != no; then :
10737   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10738
10739 fi
10740
10741 # We only use libld in port/dynloader/aix.c
10742 case $host_os in
10743      aix*)
10744         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ldopen" >&5
10745 $as_echo_n "checking for library containing ldopen... " >&6; }
10746 if ${ac_cv_search_ldopen+:} false; then :
10747   $as_echo_n "(cached) " >&6
10748 else
10749   ac_func_search_save_LIBS=$LIBS
10750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10751 /* end confdefs.h.  */
10752
10753 /* Override any GCC internal prototype to avoid an error.
10754    Use char because int might match the return type of a GCC
10755    builtin and then its argument prototype would still apply.  */
10756 #ifdef __cplusplus
10757 extern "C"
10758 #endif
10759 char ldopen ();
10760 int
10761 main ()
10762 {
10763 return ldopen ();
10764   ;
10765   return 0;
10766 }
10767 _ACEOF
10768 for ac_lib in '' ld; do
10769   if test -z "$ac_lib"; then
10770     ac_res="none required"
10771   else
10772     ac_res=-l$ac_lib
10773     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10774   fi
10775   if ac_fn_c_try_link "$LINENO"; then :
10776   ac_cv_search_ldopen=$ac_res
10777 fi
10778 rm -f core conftest.err conftest.$ac_objext \
10779     conftest$ac_exeext
10780   if ${ac_cv_search_ldopen+:} false; then :
10781   break
10782 fi
10783 done
10784 if ${ac_cv_search_ldopen+:} false; then :
10785
10786 else
10787   ac_cv_search_ldopen=no
10788 fi
10789 rm conftest.$ac_ext
10790 LIBS=$ac_func_search_save_LIBS
10791 fi
10792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ldopen" >&5
10793 $as_echo "$ac_cv_search_ldopen" >&6; }
10794 ac_res=$ac_cv_search_ldopen
10795 if test "$ac_res" != no; then :
10796   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10797
10798 fi
10799
10800         ;;
10801 esac
10802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
10803 $as_echo_n "checking for library containing getopt_long... " >&6; }
10804 if ${ac_cv_search_getopt_long+:} false; then :
10805   $as_echo_n "(cached) " >&6
10806 else
10807   ac_func_search_save_LIBS=$LIBS
10808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10809 /* end confdefs.h.  */
10810
10811 /* Override any GCC internal prototype to avoid an error.
10812    Use char because int might match the return type of a GCC
10813    builtin and then its argument prototype would still apply.  */
10814 #ifdef __cplusplus
10815 extern "C"
10816 #endif
10817 char getopt_long ();
10818 int
10819 main ()
10820 {
10821 return getopt_long ();
10822   ;
10823   return 0;
10824 }
10825 _ACEOF
10826 for ac_lib in '' getopt gnugetopt; do
10827   if test -z "$ac_lib"; then
10828     ac_res="none required"
10829   else
10830     ac_res=-l$ac_lib
10831     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10832   fi
10833   if ac_fn_c_try_link "$LINENO"; then :
10834   ac_cv_search_getopt_long=$ac_res
10835 fi
10836 rm -f core conftest.err conftest.$ac_objext \
10837     conftest$ac_exeext
10838   if ${ac_cv_search_getopt_long+:} false; then :
10839   break
10840 fi
10841 done
10842 if ${ac_cv_search_getopt_long+:} false; then :
10843
10844 else
10845   ac_cv_search_getopt_long=no
10846 fi
10847 rm conftest.$ac_ext
10848 LIBS=$ac_func_search_save_LIBS
10849 fi
10850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
10851 $as_echo "$ac_cv_search_getopt_long" >&6; }
10852 ac_res=$ac_cv_search_getopt_long
10853 if test "$ac_res" != no; then :
10854   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10855
10856 fi
10857
10858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
10859 $as_echo_n "checking for library containing crypt... " >&6; }
10860 if ${ac_cv_search_crypt+:} false; then :
10861   $as_echo_n "(cached) " >&6
10862 else
10863   ac_func_search_save_LIBS=$LIBS
10864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10865 /* end confdefs.h.  */
10866
10867 /* Override any GCC internal prototype to avoid an error.
10868    Use char because int might match the return type of a GCC
10869    builtin and then its argument prototype would still apply.  */
10870 #ifdef __cplusplus
10871 extern "C"
10872 #endif
10873 char crypt ();
10874 int
10875 main ()
10876 {
10877 return crypt ();
10878   ;
10879   return 0;
10880 }
10881 _ACEOF
10882 for ac_lib in '' crypt; do
10883   if test -z "$ac_lib"; then
10884     ac_res="none required"
10885   else
10886     ac_res=-l$ac_lib
10887     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10888   fi
10889   if ac_fn_c_try_link "$LINENO"; then :
10890   ac_cv_search_crypt=$ac_res
10891 fi
10892 rm -f core conftest.err conftest.$ac_objext \
10893     conftest$ac_exeext
10894   if ${ac_cv_search_crypt+:} false; then :
10895   break
10896 fi
10897 done
10898 if ${ac_cv_search_crypt+:} false; then :
10899
10900 else
10901   ac_cv_search_crypt=no
10902 fi
10903 rm conftest.$ac_ext
10904 LIBS=$ac_func_search_save_LIBS
10905 fi
10906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
10907 $as_echo "$ac_cv_search_crypt" >&6; }
10908 ac_res=$ac_cv_search_crypt
10909 if test "$ac_res" != no; then :
10910   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10911
10912 fi
10913
10914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
10915 $as_echo_n "checking for library containing shm_open... " >&6; }
10916 if ${ac_cv_search_shm_open+:} false; then :
10917   $as_echo_n "(cached) " >&6
10918 else
10919   ac_func_search_save_LIBS=$LIBS
10920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10921 /* end confdefs.h.  */
10922
10923 /* Override any GCC internal prototype to avoid an error.
10924    Use char because int might match the return type of a GCC
10925    builtin and then its argument prototype would still apply.  */
10926 #ifdef __cplusplus
10927 extern "C"
10928 #endif
10929 char shm_open ();
10930 int
10931 main ()
10932 {
10933 return shm_open ();
10934   ;
10935   return 0;
10936 }
10937 _ACEOF
10938 for ac_lib in '' rt; do
10939   if test -z "$ac_lib"; then
10940     ac_res="none required"
10941   else
10942     ac_res=-l$ac_lib
10943     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10944   fi
10945   if ac_fn_c_try_link "$LINENO"; then :
10946   ac_cv_search_shm_open=$ac_res
10947 fi
10948 rm -f core conftest.err conftest.$ac_objext \
10949     conftest$ac_exeext
10950   if ${ac_cv_search_shm_open+:} false; then :
10951   break
10952 fi
10953 done
10954 if ${ac_cv_search_shm_open+:} false; then :
10955
10956 else
10957   ac_cv_search_shm_open=no
10958 fi
10959 rm conftest.$ac_ext
10960 LIBS=$ac_func_search_save_LIBS
10961 fi
10962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
10963 $as_echo "$ac_cv_search_shm_open" >&6; }
10964 ac_res=$ac_cv_search_shm_open
10965 if test "$ac_res" != no; then :
10966   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10967
10968 fi
10969
10970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
10971 $as_echo_n "checking for library containing shm_unlink... " >&6; }
10972 if ${ac_cv_search_shm_unlink+:} false; then :
10973   $as_echo_n "(cached) " >&6
10974 else
10975   ac_func_search_save_LIBS=$LIBS
10976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10977 /* end confdefs.h.  */
10978
10979 /* Override any GCC internal prototype to avoid an error.
10980    Use char because int might match the return type of a GCC
10981    builtin and then its argument prototype would still apply.  */
10982 #ifdef __cplusplus
10983 extern "C"
10984 #endif
10985 char shm_unlink ();
10986 int
10987 main ()
10988 {
10989 return shm_unlink ();
10990   ;
10991   return 0;
10992 }
10993 _ACEOF
10994 for ac_lib in '' rt; do
10995   if test -z "$ac_lib"; then
10996     ac_res="none required"
10997   else
10998     ac_res=-l$ac_lib
10999     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11000   fi
11001   if ac_fn_c_try_link "$LINENO"; then :
11002   ac_cv_search_shm_unlink=$ac_res
11003 fi
11004 rm -f core conftest.err conftest.$ac_objext \
11005     conftest$ac_exeext
11006   if ${ac_cv_search_shm_unlink+:} false; then :
11007   break
11008 fi
11009 done
11010 if ${ac_cv_search_shm_unlink+:} false; then :
11011
11012 else
11013   ac_cv_search_shm_unlink=no
11014 fi
11015 rm conftest.$ac_ext
11016 LIBS=$ac_func_search_save_LIBS
11017 fi
11018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
11019 $as_echo "$ac_cv_search_shm_unlink" >&6; }
11020 ac_res=$ac_cv_search_shm_unlink
11021 if test "$ac_res" != no; then :
11022   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11023
11024 fi
11025
11026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
11027 $as_echo_n "checking for library containing clock_gettime... " >&6; }
11028 if ${ac_cv_search_clock_gettime+:} false; then :
11029   $as_echo_n "(cached) " >&6
11030 else
11031   ac_func_search_save_LIBS=$LIBS
11032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11033 /* end confdefs.h.  */
11034
11035 /* Override any GCC internal prototype to avoid an error.
11036    Use char because int might match the return type of a GCC
11037    builtin and then its argument prototype would still apply.  */
11038 #ifdef __cplusplus
11039 extern "C"
11040 #endif
11041 char clock_gettime ();
11042 int
11043 main ()
11044 {
11045 return clock_gettime ();
11046   ;
11047   return 0;
11048 }
11049 _ACEOF
11050 for ac_lib in '' rt posix4; do
11051   if test -z "$ac_lib"; then
11052     ac_res="none required"
11053   else
11054     ac_res=-l$ac_lib
11055     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11056   fi
11057   if ac_fn_c_try_link "$LINENO"; then :
11058   ac_cv_search_clock_gettime=$ac_res
11059 fi
11060 rm -f core conftest.err conftest.$ac_objext \
11061     conftest$ac_exeext
11062   if ${ac_cv_search_clock_gettime+:} false; then :
11063   break
11064 fi
11065 done
11066 if ${ac_cv_search_clock_gettime+:} false; then :
11067
11068 else
11069   ac_cv_search_clock_gettime=no
11070 fi
11071 rm conftest.$ac_ext
11072 LIBS=$ac_func_search_save_LIBS
11073 fi
11074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
11075 $as_echo "$ac_cv_search_clock_gettime" >&6; }
11076 ac_res=$ac_cv_search_clock_gettime
11077 if test "$ac_res" != no; then :
11078   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11079
11080 fi
11081
11082 # Solaris:
11083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
11084 $as_echo_n "checking for library containing fdatasync... " >&6; }
11085 if ${ac_cv_search_fdatasync+:} false; then :
11086   $as_echo_n "(cached) " >&6
11087 else
11088   ac_func_search_save_LIBS=$LIBS
11089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11090 /* end confdefs.h.  */
11091
11092 /* Override any GCC internal prototype to avoid an error.
11093    Use char because int might match the return type of a GCC
11094    builtin and then its argument prototype would still apply.  */
11095 #ifdef __cplusplus
11096 extern "C"
11097 #endif
11098 char fdatasync ();
11099 int
11100 main ()
11101 {
11102 return fdatasync ();
11103   ;
11104   return 0;
11105 }
11106 _ACEOF
11107 for ac_lib in '' rt posix4; do
11108   if test -z "$ac_lib"; then
11109     ac_res="none required"
11110   else
11111     ac_res=-l$ac_lib
11112     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11113   fi
11114   if ac_fn_c_try_link "$LINENO"; then :
11115   ac_cv_search_fdatasync=$ac_res
11116 fi
11117 rm -f core conftest.err conftest.$ac_objext \
11118     conftest$ac_exeext
11119   if ${ac_cv_search_fdatasync+:} false; then :
11120   break
11121 fi
11122 done
11123 if ${ac_cv_search_fdatasync+:} false; then :
11124
11125 else
11126   ac_cv_search_fdatasync=no
11127 fi
11128 rm conftest.$ac_ext
11129 LIBS=$ac_func_search_save_LIBS
11130 fi
11131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
11132 $as_echo "$ac_cv_search_fdatasync" >&6; }
11133 ac_res=$ac_cv_search_fdatasync
11134 if test "$ac_res" != no; then :
11135   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11136
11137 fi
11138
11139 # Required for thread_test.c on Solaris
11140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sched_yield" >&5
11141 $as_echo_n "checking for library containing sched_yield... " >&6; }
11142 if ${ac_cv_search_sched_yield+:} false; then :
11143   $as_echo_n "(cached) " >&6
11144 else
11145   ac_func_search_save_LIBS=$LIBS
11146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11147 /* end confdefs.h.  */
11148
11149 /* Override any GCC internal prototype to avoid an error.
11150    Use char because int might match the return type of a GCC
11151    builtin and then its argument prototype would still apply.  */
11152 #ifdef __cplusplus
11153 extern "C"
11154 #endif
11155 char sched_yield ();
11156 int
11157 main ()
11158 {
11159 return sched_yield ();
11160   ;
11161   return 0;
11162 }
11163 _ACEOF
11164 for ac_lib in '' rt; do
11165   if test -z "$ac_lib"; then
11166     ac_res="none required"
11167   else
11168     ac_res=-l$ac_lib
11169     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11170   fi
11171   if ac_fn_c_try_link "$LINENO"; then :
11172   ac_cv_search_sched_yield=$ac_res
11173 fi
11174 rm -f core conftest.err conftest.$ac_objext \
11175     conftest$ac_exeext
11176   if ${ac_cv_search_sched_yield+:} false; then :
11177   break
11178 fi
11179 done
11180 if ${ac_cv_search_sched_yield+:} false; then :
11181
11182 else
11183   ac_cv_search_sched_yield=no
11184 fi
11185 rm conftest.$ac_ext
11186 LIBS=$ac_func_search_save_LIBS
11187 fi
11188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sched_yield" >&5
11189 $as_echo "$ac_cv_search_sched_yield" >&6; }
11190 ac_res=$ac_cv_search_sched_yield
11191 if test "$ac_res" != no; then :
11192   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11193
11194 fi
11195
11196 # Required for thread_test.c on Solaris 2.5:
11197 # Other ports use it too (HP-UX) so test unconditionally
11198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
11199 $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
11200 if ${ac_cv_search_gethostbyname_r+:} false; then :
11201   $as_echo_n "(cached) " >&6
11202 else
11203   ac_func_search_save_LIBS=$LIBS
11204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11205 /* end confdefs.h.  */
11206
11207 /* Override any GCC internal prototype to avoid an error.
11208    Use char because int might match the return type of a GCC
11209    builtin and then its argument prototype would still apply.  */
11210 #ifdef __cplusplus
11211 extern "C"
11212 #endif
11213 char gethostbyname_r ();
11214 int
11215 main ()
11216 {
11217 return gethostbyname_r ();
11218   ;
11219   return 0;
11220 }
11221 _ACEOF
11222 for ac_lib in '' nsl; do
11223   if test -z "$ac_lib"; then
11224     ac_res="none required"
11225   else
11226     ac_res=-l$ac_lib
11227     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11228   fi
11229   if ac_fn_c_try_link "$LINENO"; then :
11230   ac_cv_search_gethostbyname_r=$ac_res
11231 fi
11232 rm -f core conftest.err conftest.$ac_objext \
11233     conftest$ac_exeext
11234   if ${ac_cv_search_gethostbyname_r+:} false; then :
11235   break
11236 fi
11237 done
11238 if ${ac_cv_search_gethostbyname_r+:} false; then :
11239
11240 else
11241   ac_cv_search_gethostbyname_r=no
11242 fi
11243 rm conftest.$ac_ext
11244 LIBS=$ac_func_search_save_LIBS
11245 fi
11246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
11247 $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
11248 ac_res=$ac_cv_search_gethostbyname_r
11249 if test "$ac_res" != no; then :
11250   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11251
11252 fi
11253
11254 # Cygwin:
11255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
11256 $as_echo_n "checking for library containing shmget... " >&6; }
11257 if ${ac_cv_search_shmget+:} false; then :
11258   $as_echo_n "(cached) " >&6
11259 else
11260   ac_func_search_save_LIBS=$LIBS
11261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11262 /* end confdefs.h.  */
11263
11264 /* Override any GCC internal prototype to avoid an error.
11265    Use char because int might match the return type of a GCC
11266    builtin and then its argument prototype would still apply.  */
11267 #ifdef __cplusplus
11268 extern "C"
11269 #endif
11270 char shmget ();
11271 int
11272 main ()
11273 {
11274 return shmget ();
11275   ;
11276   return 0;
11277 }
11278 _ACEOF
11279 for ac_lib in '' cygipc; do
11280   if test -z "$ac_lib"; then
11281     ac_res="none required"
11282   else
11283     ac_res=-l$ac_lib
11284     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11285   fi
11286   if ac_fn_c_try_link "$LINENO"; then :
11287   ac_cv_search_shmget=$ac_res
11288 fi
11289 rm -f core conftest.err conftest.$ac_objext \
11290     conftest$ac_exeext
11291   if ${ac_cv_search_shmget+:} false; then :
11292   break
11293 fi
11294 done
11295 if ${ac_cv_search_shmget+:} false; then :
11296
11297 else
11298   ac_cv_search_shmget=no
11299 fi
11300 rm conftest.$ac_ext
11301 LIBS=$ac_func_search_save_LIBS
11302 fi
11303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
11304 $as_echo "$ac_cv_search_shmget" >&6; }
11305 ac_res=$ac_cv_search_shmget
11306 if test "$ac_res" != no; then :
11307   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11308
11309 fi
11310
11311
11312 if test "$with_readline" = yes; then
11313
11314
11315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
11316 $as_echo_n "checking for library containing readline... " >&6; }
11317 if ${pgac_cv_check_readline+:} false; then :
11318   $as_echo_n "(cached) " >&6
11319 else
11320   pgac_cv_check_readline=no
11321 pgac_save_LIBS=$LIBS
11322 if test x"$with_libedit_preferred" != x"yes"
11323 then    READLINE_ORDER="-lreadline -ledit"
11324 else    READLINE_ORDER="-ledit -lreadline"
11325 fi
11326 for pgac_rllib in $READLINE_ORDER ; do
11327   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
11328     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
11329     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11330 /* end confdefs.h.  */
11331
11332 /* Override any GCC internal prototype to avoid an error.
11333    Use char because int might match the return type of a GCC
11334    builtin and then its argument prototype would still apply.  */
11335 #ifdef __cplusplus
11336 extern "C"
11337 #endif
11338 char readline ();
11339 int
11340 main ()
11341 {
11342 return readline ();
11343   ;
11344   return 0;
11345 }
11346 _ACEOF
11347 if ac_fn_c_try_link "$LINENO"; then :
11348
11349       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
11350       # recognize dependent libraries; assume curses is needed if we didn't
11351       # find any dependency.
11352       case $host_os in
11353         netbsd* | openbsd* | irix*)
11354           if test x"$pgac_lib" = x"" ; then
11355             pgac_lib=" -lcurses"
11356           fi ;;
11357       esac
11358
11359       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
11360       break
11361
11362 fi
11363 rm -f core conftest.err conftest.$ac_objext \
11364     conftest$ac_exeext conftest.$ac_ext
11365   done
11366   if test "$pgac_cv_check_readline" != no ; then
11367     break
11368   fi
11369 done
11370 LIBS=$pgac_save_LIBS
11371
11372 fi
11373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
11374 $as_echo "$pgac_cv_check_readline" >&6; }
11375 if test "$pgac_cv_check_readline" != no ; then
11376   LIBS="$pgac_cv_check_readline $LIBS"
11377
11378 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
11379
11380 fi
11381
11382
11383   if test x"$pgac_cv_check_readline" = x"no"; then
11384     as_fn_error $? "readline library not found
11385 If you have readline already installed, see config.log for details on the
11386 failure.  It is possible the compiler isn't looking in the proper directory.
11387 Use --without-readline to disable readline support." "$LINENO" 5
11388   fi
11389 fi
11390
11391 if test "$with_zlib" = yes; then
11392   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
11393 $as_echo_n "checking for inflate in -lz... " >&6; }
11394 if ${ac_cv_lib_z_inflate+:} false; then :
11395   $as_echo_n "(cached) " >&6
11396 else
11397   ac_check_lib_save_LIBS=$LIBS
11398 LIBS="-lz  $LIBS"
11399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11400 /* end confdefs.h.  */
11401
11402 /* Override any GCC internal prototype to avoid an error.
11403    Use char because int might match the return type of a GCC
11404    builtin and then its argument prototype would still apply.  */
11405 #ifdef __cplusplus
11406 extern "C"
11407 #endif
11408 char inflate ();
11409 int
11410 main ()
11411 {
11412 return inflate ();
11413   ;
11414   return 0;
11415 }
11416 _ACEOF
11417 if ac_fn_c_try_link "$LINENO"; then :
11418   ac_cv_lib_z_inflate=yes
11419 else
11420   ac_cv_lib_z_inflate=no
11421 fi
11422 rm -f core conftest.err conftest.$ac_objext \
11423     conftest$ac_exeext conftest.$ac_ext
11424 LIBS=$ac_check_lib_save_LIBS
11425 fi
11426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
11427 $as_echo "$ac_cv_lib_z_inflate" >&6; }
11428 if test "x$ac_cv_lib_z_inflate" = xyes; then :
11429   cat >>confdefs.h <<_ACEOF
11430 #define HAVE_LIBZ 1
11431 _ACEOF
11432
11433   LIBS="-lz $LIBS"
11434
11435 else
11436   as_fn_error $? "zlib library not found
11437 If you have zlib already installed, see config.log for details on the
11438 failure.  It is possible the compiler isn't looking in the proper directory.
11439 Use --without-zlib to disable zlib support." "$LINENO" 5
11440 fi
11441
11442 fi
11443
11444 if test "$enable_spinlocks" = yes; then
11445
11446 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
11447
11448 else
11449   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
11450 *** Not using spinlocks will cause poor performance." >&5
11451 $as_echo "$as_me: WARNING:
11452 *** Not using spinlocks will cause poor performance." >&2;}
11453 fi
11454
11455 if test "$enable_atomics" = yes; then
11456
11457 $as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
11458
11459 else
11460   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
11461 *** Not using atomic operations will cause poor performance." >&5
11462 $as_echo "$as_me: WARNING:
11463 *** Not using atomic operations will cause poor performance." >&2;}
11464 fi
11465
11466 if test "$with_gssapi" = yes ; then
11467   if test "$PORTNAME" != "win32"; then
11468     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
11469 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
11470 if ${ac_cv_search_gss_init_sec_context+:} false; then :
11471   $as_echo_n "(cached) " >&6
11472 else
11473   ac_func_search_save_LIBS=$LIBS
11474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11475 /* end confdefs.h.  */
11476
11477 /* Override any GCC internal prototype to avoid an error.
11478    Use char because int might match the return type of a GCC
11479    builtin and then its argument prototype would still apply.  */
11480 #ifdef __cplusplus
11481 extern "C"
11482 #endif
11483 char gss_init_sec_context ();
11484 int
11485 main ()
11486 {
11487 return gss_init_sec_context ();
11488   ;
11489   return 0;
11490 }
11491 _ACEOF
11492 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
11493   if test -z "$ac_lib"; then
11494     ac_res="none required"
11495   else
11496     ac_res=-l$ac_lib
11497     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11498   fi
11499   if ac_fn_c_try_link "$LINENO"; then :
11500   ac_cv_search_gss_init_sec_context=$ac_res
11501 fi
11502 rm -f core conftest.err conftest.$ac_objext \
11503     conftest$ac_exeext
11504   if ${ac_cv_search_gss_init_sec_context+:} false; then :
11505   break
11506 fi
11507 done
11508 if ${ac_cv_search_gss_init_sec_context+:} false; then :
11509
11510 else
11511   ac_cv_search_gss_init_sec_context=no
11512 fi
11513 rm conftest.$ac_ext
11514 LIBS=$ac_func_search_save_LIBS
11515 fi
11516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
11517 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
11518 ac_res=$ac_cv_search_gss_init_sec_context
11519 if test "$ac_res" != no; then :
11520   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11521
11522 else
11523   as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
11524 fi
11525
11526   else
11527     LIBS="$LIBS -lgssapi32"
11528   fi
11529 fi
11530
11531 if test "$with_openssl" = yes ; then
11532     if test "$PORTNAME" != "win32"; then
11533      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
11534 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
11535 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
11536   $as_echo_n "(cached) " >&6
11537 else
11538   ac_check_lib_save_LIBS=$LIBS
11539 LIBS="-lcrypto  $LIBS"
11540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11541 /* end confdefs.h.  */
11542
11543 /* Override any GCC internal prototype to avoid an error.
11544    Use char because int might match the return type of a GCC
11545    builtin and then its argument prototype would still apply.  */
11546 #ifdef __cplusplus
11547 extern "C"
11548 #endif
11549 char CRYPTO_new_ex_data ();
11550 int
11551 main ()
11552 {
11553 return CRYPTO_new_ex_data ();
11554   ;
11555   return 0;
11556 }
11557 _ACEOF
11558 if ac_fn_c_try_link "$LINENO"; then :
11559   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
11560 else
11561   ac_cv_lib_crypto_CRYPTO_new_ex_data=no
11562 fi
11563 rm -f core conftest.err conftest.$ac_objext \
11564     conftest$ac_exeext conftest.$ac_ext
11565 LIBS=$ac_check_lib_save_LIBS
11566 fi
11567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
11568 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
11569 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
11570   cat >>confdefs.h <<_ACEOF
11571 #define HAVE_LIBCRYPTO 1
11572 _ACEOF
11573
11574   LIBS="-lcrypto $LIBS"
11575
11576 else
11577   as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
11578 fi
11579
11580      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
11581 $as_echo_n "checking for SSL_new in -lssl... " >&6; }
11582 if ${ac_cv_lib_ssl_SSL_new+:} false; then :
11583   $as_echo_n "(cached) " >&6
11584 else
11585   ac_check_lib_save_LIBS=$LIBS
11586 LIBS="-lssl  $LIBS"
11587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11588 /* end confdefs.h.  */
11589
11590 /* Override any GCC internal prototype to avoid an error.
11591    Use char because int might match the return type of a GCC
11592    builtin and then its argument prototype would still apply.  */
11593 #ifdef __cplusplus
11594 extern "C"
11595 #endif
11596 char SSL_new ();
11597 int
11598 main ()
11599 {
11600 return SSL_new ();
11601   ;
11602   return 0;
11603 }
11604 _ACEOF
11605 if ac_fn_c_try_link "$LINENO"; then :
11606   ac_cv_lib_ssl_SSL_new=yes
11607 else
11608   ac_cv_lib_ssl_SSL_new=no
11609 fi
11610 rm -f core conftest.err conftest.$ac_objext \
11611     conftest$ac_exeext conftest.$ac_ext
11612 LIBS=$ac_check_lib_save_LIBS
11613 fi
11614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
11615 $as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
11616 if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
11617   cat >>confdefs.h <<_ACEOF
11618 #define HAVE_LIBSSL 1
11619 _ACEOF
11620
11621   LIBS="-lssl $LIBS"
11622
11623 else
11624   as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
11625 fi
11626
11627   else
11628      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
11629 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
11630 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
11631   $as_echo_n "(cached) " >&6
11632 else
11633   ac_func_search_save_LIBS=$LIBS
11634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11635 /* end confdefs.h.  */
11636
11637 /* Override any GCC internal prototype to avoid an error.
11638    Use char because int might match the return type of a GCC
11639    builtin and then its argument prototype would still apply.  */
11640 #ifdef __cplusplus
11641 extern "C"
11642 #endif
11643 char CRYPTO_new_ex_data ();
11644 int
11645 main ()
11646 {
11647 return CRYPTO_new_ex_data ();
11648   ;
11649   return 0;
11650 }
11651 _ACEOF
11652 for ac_lib in '' eay32 crypto; do
11653   if test -z "$ac_lib"; then
11654     ac_res="none required"
11655   else
11656     ac_res=-l$ac_lib
11657     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11658   fi
11659   if ac_fn_c_try_link "$LINENO"; then :
11660   ac_cv_search_CRYPTO_new_ex_data=$ac_res
11661 fi
11662 rm -f core conftest.err conftest.$ac_objext \
11663     conftest$ac_exeext
11664   if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
11665   break
11666 fi
11667 done
11668 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
11669
11670 else
11671   ac_cv_search_CRYPTO_new_ex_data=no
11672 fi
11673 rm conftest.$ac_ext
11674 LIBS=$ac_func_search_save_LIBS
11675 fi
11676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
11677 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
11678 ac_res=$ac_cv_search_CRYPTO_new_ex_data
11679 if test "$ac_res" != no; then :
11680   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11681
11682 else
11683   as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
11684 fi
11685
11686      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
11687 $as_echo_n "checking for library containing SSL_new... " >&6; }
11688 if ${ac_cv_search_SSL_new+:} false; then :
11689   $as_echo_n "(cached) " >&6
11690 else
11691   ac_func_search_save_LIBS=$LIBS
11692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11693 /* end confdefs.h.  */
11694
11695 /* Override any GCC internal prototype to avoid an error.
11696    Use char because int might match the return type of a GCC
11697    builtin and then its argument prototype would still apply.  */
11698 #ifdef __cplusplus
11699 extern "C"
11700 #endif
11701 char SSL_new ();
11702 int
11703 main ()
11704 {
11705 return SSL_new ();
11706   ;
11707   return 0;
11708 }
11709 _ACEOF
11710 for ac_lib in '' ssleay32 ssl; do
11711   if test -z "$ac_lib"; then
11712     ac_res="none required"
11713   else
11714     ac_res=-l$ac_lib
11715     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11716   fi
11717   if ac_fn_c_try_link "$LINENO"; then :
11718   ac_cv_search_SSL_new=$ac_res
11719 fi
11720 rm -f core conftest.err conftest.$ac_objext \
11721     conftest$ac_exeext
11722   if ${ac_cv_search_SSL_new+:} false; then :
11723   break
11724 fi
11725 done
11726 if ${ac_cv_search_SSL_new+:} false; then :
11727
11728 else
11729   ac_cv_search_SSL_new=no
11730 fi
11731 rm conftest.$ac_ext
11732 LIBS=$ac_func_search_save_LIBS
11733 fi
11734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
11735 $as_echo "$ac_cv_search_SSL_new" >&6; }
11736 ac_res=$ac_cv_search_SSL_new
11737 if test "$ac_res" != no; then :
11738   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11739
11740 else
11741   as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
11742 fi
11743
11744   fi
11745   for ac_func in SSL_clear_options SSL_get_current_compression X509_get_signature_nid
11746 do :
11747   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11748 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11749 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11750   cat >>confdefs.h <<_ACEOF
11751 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11752 _ACEOF
11753
11754 fi
11755 done
11756
11757   # Functions introduced in OpenSSL 1.1.0. We used to check for
11758   # OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
11759   # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
11760   # doesn't have these OpenSSL 1.1.0 functions. So check for individual
11761   # functions.
11762   for ac_func in OPENSSL_init_ssl BIO_get_data BIO_meth_new ASN1_STRING_get0_data RAND_OpenSSL
11763 do :
11764   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11765 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11766 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11767   cat >>confdefs.h <<_ACEOF
11768 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11769 _ACEOF
11770
11771 fi
11772 done
11773
11774   # OpenSSL versions before 1.1.0 required setting callback functions, for
11775   # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
11776   # function was removed.
11777   for ac_func in CRYPTO_lock
11778 do :
11779   ac_fn_c_check_func "$LINENO" "CRYPTO_lock" "ac_cv_func_CRYPTO_lock"
11780 if test "x$ac_cv_func_CRYPTO_lock" = xyes; then :
11781   cat >>confdefs.h <<_ACEOF
11782 #define HAVE_CRYPTO_LOCK 1
11783 _ACEOF
11784
11785 fi
11786 done
11787
11788 fi
11789
11790 if test "$with_pam" = yes ; then
11791   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
11792 $as_echo_n "checking for pam_start in -lpam... " >&6; }
11793 if ${ac_cv_lib_pam_pam_start+:} false; then :
11794   $as_echo_n "(cached) " >&6
11795 else
11796   ac_check_lib_save_LIBS=$LIBS
11797 LIBS="-lpam  $LIBS"
11798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11799 /* end confdefs.h.  */
11800
11801 /* Override any GCC internal prototype to avoid an error.
11802    Use char because int might match the return type of a GCC
11803    builtin and then its argument prototype would still apply.  */
11804 #ifdef __cplusplus
11805 extern "C"
11806 #endif
11807 char pam_start ();
11808 int
11809 main ()
11810 {
11811 return pam_start ();
11812   ;
11813   return 0;
11814 }
11815 _ACEOF
11816 if ac_fn_c_try_link "$LINENO"; then :
11817   ac_cv_lib_pam_pam_start=yes
11818 else
11819   ac_cv_lib_pam_pam_start=no
11820 fi
11821 rm -f core conftest.err conftest.$ac_objext \
11822     conftest$ac_exeext conftest.$ac_ext
11823 LIBS=$ac_check_lib_save_LIBS
11824 fi
11825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
11826 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
11827 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
11828   cat >>confdefs.h <<_ACEOF
11829 #define HAVE_LIBPAM 1
11830 _ACEOF
11831
11832   LIBS="-lpam $LIBS"
11833
11834 else
11835   as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
11836 fi
11837
11838 fi
11839
11840 if test "$with_libxml" = yes ; then
11841   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
11842 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
11843 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
11844   $as_echo_n "(cached) " >&6
11845 else
11846   ac_check_lib_save_LIBS=$LIBS
11847 LIBS="-lxml2  $LIBS"
11848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11849 /* end confdefs.h.  */
11850
11851 /* Override any GCC internal prototype to avoid an error.
11852    Use char because int might match the return type of a GCC
11853    builtin and then its argument prototype would still apply.  */
11854 #ifdef __cplusplus
11855 extern "C"
11856 #endif
11857 char xmlSaveToBuffer ();
11858 int
11859 main ()
11860 {
11861 return xmlSaveToBuffer ();
11862   ;
11863   return 0;
11864 }
11865 _ACEOF
11866 if ac_fn_c_try_link "$LINENO"; then :
11867   ac_cv_lib_xml2_xmlSaveToBuffer=yes
11868 else
11869   ac_cv_lib_xml2_xmlSaveToBuffer=no
11870 fi
11871 rm -f core conftest.err conftest.$ac_objext \
11872     conftest$ac_exeext conftest.$ac_ext
11873 LIBS=$ac_check_lib_save_LIBS
11874 fi
11875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
11876 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
11877 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
11878   cat >>confdefs.h <<_ACEOF
11879 #define HAVE_LIBXML2 1
11880 _ACEOF
11881
11882   LIBS="-lxml2 $LIBS"
11883
11884 else
11885   as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
11886 fi
11887
11888 fi
11889
11890 if test "$with_libxslt" = yes ; then
11891   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
11892 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
11893 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
11894   $as_echo_n "(cached) " >&6
11895 else
11896   ac_check_lib_save_LIBS=$LIBS
11897 LIBS="-lxslt  $LIBS"
11898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11899 /* end confdefs.h.  */
11900
11901 /* Override any GCC internal prototype to avoid an error.
11902    Use char because int might match the return type of a GCC
11903    builtin and then its argument prototype would still apply.  */
11904 #ifdef __cplusplus
11905 extern "C"
11906 #endif
11907 char xsltCleanupGlobals ();
11908 int
11909 main ()
11910 {
11911 return xsltCleanupGlobals ();
11912   ;
11913   return 0;
11914 }
11915 _ACEOF
11916 if ac_fn_c_try_link "$LINENO"; then :
11917   ac_cv_lib_xslt_xsltCleanupGlobals=yes
11918 else
11919   ac_cv_lib_xslt_xsltCleanupGlobals=no
11920 fi
11921 rm -f core conftest.err conftest.$ac_objext \
11922     conftest$ac_exeext conftest.$ac_ext
11923 LIBS=$ac_check_lib_save_LIBS
11924 fi
11925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
11926 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
11927 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
11928   cat >>confdefs.h <<_ACEOF
11929 #define HAVE_LIBXSLT 1
11930 _ACEOF
11931
11932   LIBS="-lxslt $LIBS"
11933
11934 else
11935   as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
11936 fi
11937
11938 fi
11939
11940 # Note: We can test for libldap_r only after we know PTHREAD_LIBS
11941 if test "$with_ldap" = yes ; then
11942   _LIBS="$LIBS"
11943   if test "$PORTNAME" != "win32"; then
11944     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
11945 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
11946 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
11947   $as_echo_n "(cached) " >&6
11948 else
11949   ac_check_lib_save_LIBS=$LIBS
11950 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
11951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11952 /* end confdefs.h.  */
11953
11954 /* Override any GCC internal prototype to avoid an error.
11955    Use char because int might match the return type of a GCC
11956    builtin and then its argument prototype would still apply.  */
11957 #ifdef __cplusplus
11958 extern "C"
11959 #endif
11960 char ldap_bind ();
11961 int
11962 main ()
11963 {
11964 return ldap_bind ();
11965   ;
11966   return 0;
11967 }
11968 _ACEOF
11969 if ac_fn_c_try_link "$LINENO"; then :
11970   ac_cv_lib_ldap_ldap_bind=yes
11971 else
11972   ac_cv_lib_ldap_ldap_bind=no
11973 fi
11974 rm -f core conftest.err conftest.$ac_objext \
11975     conftest$ac_exeext conftest.$ac_ext
11976 LIBS=$ac_check_lib_save_LIBS
11977 fi
11978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
11979 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
11980 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
11981   cat >>confdefs.h <<_ACEOF
11982 #define HAVE_LIBLDAP 1
11983 _ACEOF
11984
11985   LIBS="-lldap $LIBS"
11986
11987 else
11988   as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
11989 fi
11990
11991     LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
11992     if test "$enable_thread_safety" = yes; then
11993       # on some platforms ldap_r fails to link without PTHREAD_LIBS
11994       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_simple_bind in -lldap_r" >&5
11995 $as_echo_n "checking for ldap_simple_bind in -lldap_r... " >&6; }
11996 if ${ac_cv_lib_ldap_r_ldap_simple_bind+:} false; then :
11997   $as_echo_n "(cached) " >&6
11998 else
11999   ac_check_lib_save_LIBS=$LIBS
12000 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
12001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12002 /* end confdefs.h.  */
12003
12004 /* Override any GCC internal prototype to avoid an error.
12005    Use char because int might match the return type of a GCC
12006    builtin and then its argument prototype would still apply.  */
12007 #ifdef __cplusplus
12008 extern "C"
12009 #endif
12010 char ldap_simple_bind ();
12011 int
12012 main ()
12013 {
12014 return ldap_simple_bind ();
12015   ;
12016   return 0;
12017 }
12018 _ACEOF
12019 if ac_fn_c_try_link "$LINENO"; then :
12020   ac_cv_lib_ldap_r_ldap_simple_bind=yes
12021 else
12022   ac_cv_lib_ldap_r_ldap_simple_bind=no
12023 fi
12024 rm -f core conftest.err conftest.$ac_objext \
12025     conftest$ac_exeext conftest.$ac_ext
12026 LIBS=$ac_check_lib_save_LIBS
12027 fi
12028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
12029 $as_echo "$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
12030 if test "x$ac_cv_lib_ldap_r_ldap_simple_bind" = xyes; then :
12031   cat >>confdefs.h <<_ACEOF
12032 #define HAVE_LIBLDAP_R 1
12033 _ACEOF
12034
12035   LIBS="-lldap_r $LIBS"
12036
12037 else
12038   as_fn_error $? "library 'ldap_r' is required for LDAP" "$LINENO" 5
12039 fi
12040
12041       LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
12042     else
12043       LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
12044     fi
12045     for ac_func in ldap_initialize
12046 do :
12047   ac_fn_c_check_func "$LINENO" "ldap_initialize" "ac_cv_func_ldap_initialize"
12048 if test "x$ac_cv_func_ldap_initialize" = xyes; then :
12049   cat >>confdefs.h <<_ACEOF
12050 #define HAVE_LDAP_INITIALIZE 1
12051 _ACEOF
12052
12053 fi
12054 done
12055
12056   else
12057     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
12058 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
12059 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
12060   $as_echo_n "(cached) " >&6
12061 else
12062   ac_check_lib_save_LIBS=$LIBS
12063 LIBS="-lwldap32  $LIBS"
12064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12065 /* end confdefs.h.  */
12066
12067 /* Override any GCC internal prototype to avoid an error.
12068    Use char because int might match the return type of a GCC
12069    builtin and then its argument prototype would still apply.  */
12070 #ifdef __cplusplus
12071 extern "C"
12072 #endif
12073 char ldap_bind ();
12074 int
12075 main ()
12076 {
12077 return ldap_bind ();
12078   ;
12079   return 0;
12080 }
12081 _ACEOF
12082 if ac_fn_c_try_link "$LINENO"; then :
12083   ac_cv_lib_wldap32_ldap_bind=yes
12084 else
12085   ac_cv_lib_wldap32_ldap_bind=no
12086 fi
12087 rm -f core conftest.err conftest.$ac_objext \
12088     conftest$ac_exeext conftest.$ac_ext
12089 LIBS=$ac_check_lib_save_LIBS
12090 fi
12091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
12092 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
12093 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
12094   cat >>confdefs.h <<_ACEOF
12095 #define HAVE_LIBWLDAP32 1
12096 _ACEOF
12097
12098   LIBS="-lwldap32 $LIBS"
12099
12100 else
12101   as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
12102 fi
12103
12104     LDAP_LIBS_FE="-lwldap32"
12105     LDAP_LIBS_BE="-lwldap32"
12106   fi
12107   LIBS="$_LIBS"
12108 fi
12109
12110
12111
12112 # for contrib/sepgsql
12113 if test "$with_selinux" = yes; then
12114   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
12115 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
12116 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
12117   $as_echo_n "(cached) " >&6
12118 else
12119   ac_check_lib_save_LIBS=$LIBS
12120 LIBS="-lselinux  $LIBS"
12121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12122 /* end confdefs.h.  */
12123
12124 /* Override any GCC internal prototype to avoid an error.
12125    Use char because int might match the return type of a GCC
12126    builtin and then its argument prototype would still apply.  */
12127 #ifdef __cplusplus
12128 extern "C"
12129 #endif
12130 char security_compute_create_name ();
12131 int
12132 main ()
12133 {
12134 return security_compute_create_name ();
12135   ;
12136   return 0;
12137 }
12138 _ACEOF
12139 if ac_fn_c_try_link "$LINENO"; then :
12140   ac_cv_lib_selinux_security_compute_create_name=yes
12141 else
12142   ac_cv_lib_selinux_security_compute_create_name=no
12143 fi
12144 rm -f core conftest.err conftest.$ac_objext \
12145     conftest$ac_exeext conftest.$ac_ext
12146 LIBS=$ac_check_lib_save_LIBS
12147 fi
12148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
12149 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
12150 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
12151   cat >>confdefs.h <<_ACEOF
12152 #define HAVE_LIBSELINUX 1
12153 _ACEOF
12154
12155   LIBS="-lselinux $LIBS"
12156
12157 else
12158   as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
12159 fi
12160
12161 fi
12162
12163 # for contrib/uuid-ossp
12164 if test "$with_uuid" = bsd ; then
12165   # On BSD, the UUID functions are in libc
12166   ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
12167 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
12168   UUID_LIBS=""
12169 else
12170   as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
12171 fi
12172
12173 elif test "$with_uuid" = e2fs ; then
12174   # On macOS, the UUID functions are in libc
12175   ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
12176 if test "x$ac_cv_func_uuid_generate" = xyes; then :
12177   UUID_LIBS=""
12178 else
12179   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
12180 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
12181 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
12182   $as_echo_n "(cached) " >&6
12183 else
12184   ac_check_lib_save_LIBS=$LIBS
12185 LIBS="-luuid  $LIBS"
12186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12187 /* end confdefs.h.  */
12188
12189 /* Override any GCC internal prototype to avoid an error.
12190    Use char because int might match the return type of a GCC
12191    builtin and then its argument prototype would still apply.  */
12192 #ifdef __cplusplus
12193 extern "C"
12194 #endif
12195 char uuid_generate ();
12196 int
12197 main ()
12198 {
12199 return uuid_generate ();
12200   ;
12201   return 0;
12202 }
12203 _ACEOF
12204 if ac_fn_c_try_link "$LINENO"; then :
12205   ac_cv_lib_uuid_uuid_generate=yes
12206 else
12207   ac_cv_lib_uuid_uuid_generate=no
12208 fi
12209 rm -f core conftest.err conftest.$ac_objext \
12210     conftest$ac_exeext conftest.$ac_ext
12211 LIBS=$ac_check_lib_save_LIBS
12212 fi
12213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
12214 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
12215 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
12216   UUID_LIBS="-luuid"
12217 else
12218   as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
12219 fi
12220
12221 fi
12222
12223 elif test "$with_uuid" = ossp ; then
12224   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
12225 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
12226 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
12227   $as_echo_n "(cached) " >&6
12228 else
12229   ac_check_lib_save_LIBS=$LIBS
12230 LIBS="-lossp-uuid  $LIBS"
12231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12232 /* end confdefs.h.  */
12233
12234 /* Override any GCC internal prototype to avoid an error.
12235    Use char because int might match the return type of a GCC
12236    builtin and then its argument prototype would still apply.  */
12237 #ifdef __cplusplus
12238 extern "C"
12239 #endif
12240 char uuid_export ();
12241 int
12242 main ()
12243 {
12244 return uuid_export ();
12245   ;
12246   return 0;
12247 }
12248 _ACEOF
12249 if ac_fn_c_try_link "$LINENO"; then :
12250   ac_cv_lib_ossp_uuid_uuid_export=yes
12251 else
12252   ac_cv_lib_ossp_uuid_uuid_export=no
12253 fi
12254 rm -f core conftest.err conftest.$ac_objext \
12255     conftest$ac_exeext conftest.$ac_ext
12256 LIBS=$ac_check_lib_save_LIBS
12257 fi
12258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
12259 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
12260 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
12261   UUID_LIBS="-lossp-uuid"
12262 else
12263   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
12264 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
12265 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
12266   $as_echo_n "(cached) " >&6
12267 else
12268   ac_check_lib_save_LIBS=$LIBS
12269 LIBS="-luuid  $LIBS"
12270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12271 /* end confdefs.h.  */
12272
12273 /* Override any GCC internal prototype to avoid an error.
12274    Use char because int might match the return type of a GCC
12275    builtin and then its argument prototype would still apply.  */
12276 #ifdef __cplusplus
12277 extern "C"
12278 #endif
12279 char uuid_export ();
12280 int
12281 main ()
12282 {
12283 return uuid_export ();
12284   ;
12285   return 0;
12286 }
12287 _ACEOF
12288 if ac_fn_c_try_link "$LINENO"; then :
12289   ac_cv_lib_uuid_uuid_export=yes
12290 else
12291   ac_cv_lib_uuid_uuid_export=no
12292 fi
12293 rm -f core conftest.err conftest.$ac_objext \
12294     conftest$ac_exeext conftest.$ac_ext
12295 LIBS=$ac_check_lib_save_LIBS
12296 fi
12297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
12298 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
12299 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
12300   UUID_LIBS="-luuid"
12301 else
12302   as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
12303 fi
12304
12305 fi
12306
12307 fi
12308
12309
12310
12311 ##
12312 ## Header files
12313 ##
12314
12315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
12316 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
12317 if ${ac_cv_header_stdbool_h+:} false; then :
12318   $as_echo_n "(cached) " >&6
12319 else
12320   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12321 /* end confdefs.h.  */
12322
12323              #include <stdbool.h>
12324              #ifndef bool
12325               "error: bool is not defined"
12326              #endif
12327              #ifndef false
12328               "error: false is not defined"
12329              #endif
12330              #if false
12331               "error: false is not 0"
12332              #endif
12333              #ifndef true
12334               "error: true is not defined"
12335              #endif
12336              #if true != 1
12337               "error: true is not 1"
12338              #endif
12339              #ifndef __bool_true_false_are_defined
12340               "error: __bool_true_false_are_defined is not defined"
12341              #endif
12342
12343              struct s { _Bool s: 1; _Bool t; } s;
12344
12345              char a[true == 1 ? 1 : -1];
12346              char b[false == 0 ? 1 : -1];
12347              char c[__bool_true_false_are_defined == 1 ? 1 : -1];
12348              char d[(bool) 0.5 == true ? 1 : -1];
12349              /* See body of main program for 'e'.  */
12350              char f[(_Bool) 0.0 == false ? 1 : -1];
12351              char g[true];
12352              char h[sizeof (_Bool)];
12353              char i[sizeof s.t];
12354              enum { j = false, k = true, l = false * true, m = true * 256 };
12355              /* The following fails for
12356                 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
12357              _Bool n[m];
12358              char o[sizeof n == m * sizeof n[0] ? 1 : -1];
12359              char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
12360              /* Catch a bug in an HP-UX C compiler.  See
12361                 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
12362                 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
12363               */
12364              _Bool q = true;
12365              _Bool *pq = &q;
12366
12367 int
12368 main ()
12369 {
12370
12371              bool e = &s;
12372              *pq |= q;
12373              *pq |= ! q;
12374              /* Refer to every declared value, to avoid compiler optimizations.  */
12375              return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
12376                      + !m + !n + !o + !p + !q + !pq);
12377
12378   ;
12379   return 0;
12380 }
12381 _ACEOF
12382 if ac_fn_c_try_compile "$LINENO"; then :
12383   ac_cv_header_stdbool_h=yes
12384 else
12385   ac_cv_header_stdbool_h=no
12386 fi
12387 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12388 fi
12389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
12390 $as_echo "$ac_cv_header_stdbool_h" >&6; }
12391    ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
12392 if test "x$ac_cv_type__Bool" = xyes; then :
12393
12394 cat >>confdefs.h <<_ACEOF
12395 #define HAVE__BOOL 1
12396 _ACEOF
12397
12398
12399 fi
12400
12401
12402 if test $ac_cv_header_stdbool_h = yes; then
12403
12404 $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
12405
12406 fi
12407
12408
12409 for ac_header in atomic.h crypt.h dld.h fp_class.h getopt.h ieeefp.h ifaddrs.h langinfo.h mbarrier.h poll.h sys/epoll.h sys/ipc.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/sockio.h sys/tas.h sys/un.h termios.h ucred.h utime.h wchar.h wctype.h
12410 do :
12411   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12412 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12413 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12414   cat >>confdefs.h <<_ACEOF
12415 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12416 _ACEOF
12417
12418 fi
12419
12420 done
12421
12422
12423 # On BSD, test for net/if.h will fail unless sys/socket.h
12424 # is included first.
12425 for ac_header in net/if.h
12426 do :
12427   ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
12428 #include <sys/socket.h>
12429
12430 "
12431 if test "x$ac_cv_header_net_if_h" = xyes; then :
12432   cat >>confdefs.h <<_ACEOF
12433 #define HAVE_NET_IF_H 1
12434 _ACEOF
12435
12436 fi
12437
12438 done
12439
12440
12441 # On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
12442 # is included first.
12443 for ac_header in sys/ucred.h
12444 do :
12445   ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
12446 #include <sys/param.h>
12447
12448 "
12449 if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
12450   cat >>confdefs.h <<_ACEOF
12451 #define HAVE_SYS_UCRED_H 1
12452 _ACEOF
12453
12454 fi
12455
12456 done
12457
12458
12459 # At least on IRIX, test for netinet/tcp.h will fail unless
12460 # netinet/in.h is included first.
12461 for ac_header in netinet/tcp.h
12462 do :
12463   ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
12464 #include <netinet/in.h>
12465
12466 "
12467 if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
12468   cat >>confdefs.h <<_ACEOF
12469 #define HAVE_NETINET_TCP_H 1
12470 _ACEOF
12471
12472 fi
12473
12474 done
12475
12476
12477 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
12478   for ac_header in readline/readline.h
12479 do :
12480   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
12481 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
12482   cat >>confdefs.h <<_ACEOF
12483 #define HAVE_READLINE_READLINE_H 1
12484 _ACEOF
12485
12486 else
12487   for ac_header in readline.h
12488 do :
12489   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
12490 if test "x$ac_cv_header_readline_h" = xyes; then :
12491   cat >>confdefs.h <<_ACEOF
12492 #define HAVE_READLINE_H 1
12493 _ACEOF
12494
12495 else
12496   as_fn_error $? "readline header not found
12497 If you have readline already installed, see config.log for details on the
12498 failure.  It is possible the compiler isn't looking in the proper directory.
12499 Use --without-readline to disable readline support." "$LINENO" 5
12500 fi
12501
12502 done
12503
12504 fi
12505
12506 done
12507
12508   for ac_header in readline/history.h
12509 do :
12510   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
12511 if test "x$ac_cv_header_readline_history_h" = xyes; then :
12512   cat >>confdefs.h <<_ACEOF
12513 #define HAVE_READLINE_HISTORY_H 1
12514 _ACEOF
12515
12516 else
12517   for ac_header in history.h
12518 do :
12519   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
12520 if test "x$ac_cv_header_history_h" = xyes; then :
12521   cat >>confdefs.h <<_ACEOF
12522 #define HAVE_HISTORY_H 1
12523 _ACEOF
12524
12525 else
12526   as_fn_error $? "history header not found
12527 If you have readline already installed, see config.log for details on the
12528 failure.  It is possible the compiler isn't looking in the proper directory.
12529 Use --without-readline to disable readline support." "$LINENO" 5
12530 fi
12531
12532 done
12533
12534 fi
12535
12536 done
12537
12538 fi
12539
12540 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
12541 # Some installations of libedit usurp /usr/include/readline/, which seems
12542 # bad practice, since in combined installations readline will have its headers
12543 # there.  We might have to resort to AC_EGREP checks to make sure we found
12544 # the proper header...
12545   for ac_header in editline/readline.h
12546 do :
12547   ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
12548 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
12549   cat >>confdefs.h <<_ACEOF
12550 #define HAVE_EDITLINE_READLINE_H 1
12551 _ACEOF
12552
12553 else
12554   for ac_header in readline.h
12555 do :
12556   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
12557 if test "x$ac_cv_header_readline_h" = xyes; then :
12558   cat >>confdefs.h <<_ACEOF
12559 #define HAVE_READLINE_H 1
12560 _ACEOF
12561
12562 else
12563   for ac_header in readline/readline.h
12564 do :
12565   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
12566 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
12567   cat >>confdefs.h <<_ACEOF
12568 #define HAVE_READLINE_READLINE_H 1
12569 _ACEOF
12570
12571 else
12572   as_fn_error $? "readline header not found
12573 If you have libedit already installed, see config.log for details on the
12574 failure.  It is possible the compiler isn't looking in the proper directory.
12575 Use --without-readline to disable libedit support." "$LINENO" 5
12576 fi
12577
12578 done
12579
12580 fi
12581
12582 done
12583
12584 fi
12585
12586 done
12587
12588 # Note: in a libedit installation, history.h is sometimes a dummy, and may
12589 # not be there at all.  Hence, don't complain if not found.  We must check
12590 # though, since in yet other versions it is an independent header.
12591   for ac_header in editline/history.h
12592 do :
12593   ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
12594 if test "x$ac_cv_header_editline_history_h" = xyes; then :
12595   cat >>confdefs.h <<_ACEOF
12596 #define HAVE_EDITLINE_HISTORY_H 1
12597 _ACEOF
12598
12599 else
12600   for ac_header in history.h
12601 do :
12602   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
12603 if test "x$ac_cv_header_history_h" = xyes; then :
12604   cat >>confdefs.h <<_ACEOF
12605 #define HAVE_HISTORY_H 1
12606 _ACEOF
12607
12608 else
12609   for ac_header in readline/history.h
12610 do :
12611   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
12612 if test "x$ac_cv_header_readline_history_h" = xyes; then :
12613   cat >>confdefs.h <<_ACEOF
12614 #define HAVE_READLINE_HISTORY_H 1
12615 _ACEOF
12616
12617 fi
12618
12619 done
12620
12621 fi
12622
12623 done
12624
12625 fi
12626
12627 done
12628
12629 fi
12630
12631 if test "$with_zlib" = yes; then
12632   ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
12633 if test "x$ac_cv_header_zlib_h" = xyes; then :
12634
12635 else
12636   as_fn_error $? "zlib header not found
12637 If you have zlib already installed, see config.log for details on the
12638 failure.  It is possible the compiler isn't looking in the proper directory.
12639 Use --without-zlib to disable zlib support." "$LINENO" 5
12640 fi
12641
12642
12643 fi
12644
12645 if test "$with_gssapi" = yes ; then
12646   for ac_header in gssapi/gssapi.h
12647 do :
12648   ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
12649 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
12650   cat >>confdefs.h <<_ACEOF
12651 #define HAVE_GSSAPI_GSSAPI_H 1
12652 _ACEOF
12653
12654 else
12655   for ac_header in gssapi.h
12656 do :
12657   ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
12658 if test "x$ac_cv_header_gssapi_h" = xyes; then :
12659   cat >>confdefs.h <<_ACEOF
12660 #define HAVE_GSSAPI_H 1
12661 _ACEOF
12662
12663 else
12664   as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
12665 fi
12666
12667 done
12668
12669 fi
12670
12671 done
12672
12673 fi
12674
12675 if test "$with_openssl" = yes ; then
12676   ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
12677 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
12678
12679 else
12680   as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
12681 fi
12682
12683
12684   ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
12685 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
12686
12687 else
12688   as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
12689 fi
12690
12691
12692 fi
12693
12694 if test "$with_pam" = yes ; then
12695   for ac_header in security/pam_appl.h
12696 do :
12697   ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
12698 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
12699   cat >>confdefs.h <<_ACEOF
12700 #define HAVE_SECURITY_PAM_APPL_H 1
12701 _ACEOF
12702
12703 else
12704   for ac_header in pam/pam_appl.h
12705 do :
12706   ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
12707 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
12708   cat >>confdefs.h <<_ACEOF
12709 #define HAVE_PAM_PAM_APPL_H 1
12710 _ACEOF
12711
12712 else
12713   as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
12714 fi
12715
12716 done
12717
12718 fi
12719
12720 done
12721
12722 fi
12723
12724 if test "$with_bsd_auth" = yes ; then
12725   ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
12726 if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
12727
12728 else
12729   as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
12730 fi
12731
12732
12733 fi
12734
12735 if test "$with_systemd" = yes ; then
12736   ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
12737 if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
12738
12739 else
12740   as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
12741 fi
12742
12743
12744 fi
12745
12746 if test "$with_libxml" = yes ; then
12747   ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
12748 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
12749
12750 else
12751   as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
12752 fi
12753
12754
12755 fi
12756
12757 if test "$with_libxslt" = yes ; then
12758   ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
12759 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
12760
12761 else
12762   as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
12763 fi
12764
12765
12766 fi
12767
12768 if test "$with_ldap" = yes ; then
12769   if test "$PORTNAME" != "win32"; then
12770      for ac_header in ldap.h
12771 do :
12772   ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
12773 if test "x$ac_cv_header_ldap_h" = xyes; then :
12774   cat >>confdefs.h <<_ACEOF
12775 #define HAVE_LDAP_H 1
12776 _ACEOF
12777
12778 else
12779   as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
12780 fi
12781
12782 done
12783
12784      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
12785 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
12786 if ${pgac_cv_ldap_safe+:} false; then :
12787   $as_echo_n "(cached) " >&6
12788 else
12789   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12790 /* end confdefs.h.  */
12791 #include <ldap.h>
12792 #if !defined(LDAP_VENDOR_VERSION) || \
12793      (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
12794       LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
12795 choke me
12796 #endif
12797 int
12798 main ()
12799 {
12800
12801   ;
12802   return 0;
12803 }
12804 _ACEOF
12805 if ac_fn_c_try_compile "$LINENO"; then :
12806   pgac_cv_ldap_safe=yes
12807 else
12808   pgac_cv_ldap_safe=no
12809 fi
12810 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12811 fi
12812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
12813 $as_echo "$pgac_cv_ldap_safe" >&6; }
12814
12815 if test "$pgac_cv_ldap_safe" != yes; then
12816   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
12817 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
12818 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
12819 *** also uses LDAP will crash on exit." >&5
12820 $as_echo "$as_me: WARNING:
12821 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
12822 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
12823 *** also uses LDAP will crash on exit." >&2;}
12824 fi
12825   else
12826      for ac_header in winldap.h
12827 do :
12828   ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
12829 #include <windows.h>
12830
12831 "
12832 if test "x$ac_cv_header_winldap_h" = xyes; then :
12833   cat >>confdefs.h <<_ACEOF
12834 #define HAVE_WINLDAP_H 1
12835 _ACEOF
12836
12837 else
12838   as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
12839 fi
12840
12841 done
12842
12843   fi
12844 fi
12845
12846 if test "$with_bonjour" = yes ; then
12847   ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
12848 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
12849
12850 else
12851   as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
12852 fi
12853
12854
12855 fi
12856
12857 # for contrib/uuid-ossp
12858 if test "$with_uuid" = bsd ; then
12859   for ac_header in uuid.h
12860 do :
12861   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
12862 if test "x$ac_cv_header_uuid_h" = xyes; then :
12863   cat >>confdefs.h <<_ACEOF
12864 #define HAVE_UUID_H 1
12865 _ACEOF
12866  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12867 /* end confdefs.h.  */
12868 #include <uuid.h>
12869
12870 _ACEOF
12871 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12872   $EGREP "uuid_to_string" >/dev/null 2>&1; then :
12873
12874 else
12875   as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
12876 fi
12877 rm -f conftest*
12878
12879 else
12880   as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
12881 fi
12882
12883 done
12884
12885 elif test "$with_uuid" = e2fs ; then
12886   for ac_header in uuid/uuid.h
12887 do :
12888   ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
12889 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
12890   cat >>confdefs.h <<_ACEOF
12891 #define HAVE_UUID_UUID_H 1
12892 _ACEOF
12893  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12894 /* end confdefs.h.  */
12895 #include <uuid/uuid.h>
12896
12897 _ACEOF
12898 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12899   $EGREP "uuid_generate" >/dev/null 2>&1; then :
12900
12901 else
12902   as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
12903 fi
12904 rm -f conftest*
12905
12906 else
12907   for ac_header in uuid.h
12908 do :
12909   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
12910 if test "x$ac_cv_header_uuid_h" = xyes; then :
12911   cat >>confdefs.h <<_ACEOF
12912 #define HAVE_UUID_H 1
12913 _ACEOF
12914  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12915 /* end confdefs.h.  */
12916 #include <uuid.h>
12917
12918 _ACEOF
12919 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12920   $EGREP "uuid_generate" >/dev/null 2>&1; then :
12921
12922 else
12923   as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
12924 fi
12925 rm -f conftest*
12926
12927 else
12928   as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
12929 fi
12930
12931 done
12932
12933 fi
12934
12935 done
12936
12937 elif test "$with_uuid" = ossp ; then
12938   for ac_header in ossp/uuid.h
12939 do :
12940   ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
12941 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
12942   cat >>confdefs.h <<_ACEOF
12943 #define HAVE_OSSP_UUID_H 1
12944 _ACEOF
12945  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12946 /* end confdefs.h.  */
12947 #include <ossp/uuid.h>
12948
12949 _ACEOF
12950 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12951   $EGREP "uuid_export" >/dev/null 2>&1; then :
12952
12953 else
12954   as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
12955 fi
12956 rm -f conftest*
12957
12958 else
12959   for ac_header in uuid.h
12960 do :
12961   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
12962 if test "x$ac_cv_header_uuid_h" = xyes; then :
12963   cat >>confdefs.h <<_ACEOF
12964 #define HAVE_UUID_H 1
12965 _ACEOF
12966  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12967 /* end confdefs.h.  */
12968 #include <uuid.h>
12969
12970 _ACEOF
12971 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12972   $EGREP "uuid_export" >/dev/null 2>&1; then :
12973
12974 else
12975   as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
12976 fi
12977 rm -f conftest*
12978
12979 else
12980   as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
12981 fi
12982
12983 done
12984
12985 fi
12986
12987 done
12988
12989 fi
12990
12991 if test "$PORTNAME" = "win32" ; then
12992    for ac_header in crtdefs.h
12993 do :
12994   ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
12995 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
12996   cat >>confdefs.h <<_ACEOF
12997 #define HAVE_CRTDEFS_H 1
12998 _ACEOF
12999
13000 fi
13001
13002 done
13003
13004 fi
13005
13006 ##
13007 ## Types, structures, compiler characteristics
13008 ##
13009
13010   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13011 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
13012 if ${ac_cv_c_bigendian+:} false; then :
13013   $as_echo_n "(cached) " >&6
13014 else
13015   ac_cv_c_bigendian=unknown
13016     # See if we're dealing with a universal compiler.
13017     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13018 /* end confdefs.h.  */
13019 #ifndef __APPLE_CC__
13020                not a universal capable compiler
13021              #endif
13022              typedef int dummy;
13023
13024 _ACEOF
13025 if ac_fn_c_try_compile "$LINENO"; then :
13026
13027         # Check for potential -arch flags.  It is not universal unless
13028         # there are at least two -arch flags with different values.
13029         ac_arch=
13030         ac_prev=
13031         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13032          if test -n "$ac_prev"; then
13033            case $ac_word in
13034              i?86 | x86_64 | ppc | ppc64)
13035                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13036                  ac_arch=$ac_word
13037                else
13038                  ac_cv_c_bigendian=universal
13039                  break
13040                fi
13041                ;;
13042            esac
13043            ac_prev=
13044          elif test "x$ac_word" = "x-arch"; then
13045            ac_prev=arch
13046          fi
13047        done
13048 fi
13049 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13050     if test $ac_cv_c_bigendian = unknown; then
13051       # See if sys/param.h defines the BYTE_ORDER macro.
13052       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13053 /* end confdefs.h.  */
13054 #include <sys/types.h>
13055              #include <sys/param.h>
13056
13057 int
13058 main ()
13059 {
13060 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13061                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13062                      && LITTLE_ENDIAN)
13063               bogus endian macros
13064              #endif
13065
13066   ;
13067   return 0;
13068 }
13069 _ACEOF
13070 if ac_fn_c_try_compile "$LINENO"; then :
13071   # It does; now see whether it defined to BIG_ENDIAN or not.
13072          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13073 /* end confdefs.h.  */
13074 #include <sys/types.h>
13075                 #include <sys/param.h>
13076
13077 int
13078 main ()
13079 {
13080 #if BYTE_ORDER != BIG_ENDIAN
13081                  not big endian
13082                 #endif
13083
13084   ;
13085   return 0;
13086 }
13087 _ACEOF
13088 if ac_fn_c_try_compile "$LINENO"; then :
13089   ac_cv_c_bigendian=yes
13090 else
13091   ac_cv_c_bigendian=no
13092 fi
13093 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13094 fi
13095 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13096     fi
13097     if test $ac_cv_c_bigendian = unknown; then
13098       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13099       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13100 /* end confdefs.h.  */
13101 #include <limits.h>
13102
13103 int
13104 main ()
13105 {
13106 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13107               bogus endian macros
13108              #endif
13109
13110   ;
13111   return 0;
13112 }
13113 _ACEOF
13114 if ac_fn_c_try_compile "$LINENO"; then :
13115   # It does; now see whether it defined to _BIG_ENDIAN or not.
13116          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13117 /* end confdefs.h.  */
13118 #include <limits.h>
13119
13120 int
13121 main ()
13122 {
13123 #ifndef _BIG_ENDIAN
13124                  not big endian
13125                 #endif
13126
13127   ;
13128   return 0;
13129 }
13130 _ACEOF
13131 if ac_fn_c_try_compile "$LINENO"; then :
13132   ac_cv_c_bigendian=yes
13133 else
13134   ac_cv_c_bigendian=no
13135 fi
13136 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13137 fi
13138 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13139     fi
13140     if test $ac_cv_c_bigendian = unknown; then
13141       # Compile a test program.
13142       if test "$cross_compiling" = yes; then :
13143   # Try to guess by grepping values from an object file.
13144          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13145 /* end confdefs.h.  */
13146 short int ascii_mm[] =
13147                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13148                 short int ascii_ii[] =
13149                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13150                 int use_ascii (int i) {
13151                   return ascii_mm[i] + ascii_ii[i];
13152                 }
13153                 short int ebcdic_ii[] =
13154                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13155                 short int ebcdic_mm[] =
13156                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13157                 int use_ebcdic (int i) {
13158                   return ebcdic_mm[i] + ebcdic_ii[i];
13159                 }
13160                 extern int foo;
13161
13162 int
13163 main ()
13164 {
13165 return use_ascii (foo) == use_ebcdic (foo);
13166   ;
13167   return 0;
13168 }
13169 _ACEOF
13170 if ac_fn_c_try_compile "$LINENO"; then :
13171   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13172               ac_cv_c_bigendian=yes
13173             fi
13174             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13175               if test "$ac_cv_c_bigendian" = unknown; then
13176                 ac_cv_c_bigendian=no
13177               else
13178                 # finding both strings is unlikely to happen, but who knows?
13179                 ac_cv_c_bigendian=unknown
13180               fi
13181             fi
13182 fi
13183 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13184 else
13185   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13186 /* end confdefs.h.  */
13187 $ac_includes_default
13188 int
13189 main ()
13190 {
13191
13192              /* Are we little or big endian?  From Harbison&Steele.  */
13193              union
13194              {
13195                long int l;
13196                char c[sizeof (long int)];
13197              } u;
13198              u.l = 1;
13199              return u.c[sizeof (long int) - 1] == 1;
13200
13201   ;
13202   return 0;
13203 }
13204 _ACEOF
13205 if ac_fn_c_try_run "$LINENO"; then :
13206   ac_cv_c_bigendian=no
13207 else
13208   ac_cv_c_bigendian=yes
13209 fi
13210 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13211   conftest.$ac_objext conftest.beam conftest.$ac_ext
13212 fi
13213
13214     fi
13215 fi
13216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13217 $as_echo "$ac_cv_c_bigendian" >&6; }
13218  case $ac_cv_c_bigendian in #(
13219    yes)
13220      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13221 ;; #(
13222    no)
13223       ;; #(
13224    universal)
13225
13226 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
13227
13228      ;; #(
13229    *)
13230      as_fn_error $? "unknown endianness
13231  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
13232  esac
13233
13234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
13235 $as_echo_n "checking for inline... " >&6; }
13236 if ${ac_cv_c_inline+:} false; then :
13237   $as_echo_n "(cached) " >&6
13238 else
13239   ac_cv_c_inline=no
13240 for ac_kw in inline __inline__ __inline; do
13241   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13242 /* end confdefs.h.  */
13243 #ifndef __cplusplus
13244 typedef int foo_t;
13245 static $ac_kw foo_t static_foo () {return 0; }
13246 $ac_kw foo_t foo () {return 0; }
13247 #endif
13248
13249 _ACEOF
13250 if ac_fn_c_try_compile "$LINENO"; then :
13251   ac_cv_c_inline=$ac_kw
13252 fi
13253 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13254   test "$ac_cv_c_inline" != no && break
13255 done
13256
13257 fi
13258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
13259 $as_echo "$ac_cv_c_inline" >&6; }
13260
13261 case $ac_cv_c_inline in
13262   inline | yes) ;;
13263   *)
13264     case $ac_cv_c_inline in
13265       no) ac_val=;;
13266       *) ac_val=$ac_cv_c_inline;;
13267     esac
13268     cat >>confdefs.h <<_ACEOF
13269 #ifndef __cplusplus
13270 #define inline $ac_val
13271 #endif
13272 _ACEOF
13273     ;;
13274 esac
13275
13276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
13277 $as_echo_n "checking for printf format archetype... " >&6; }
13278 if ${pgac_cv_printf_archetype+:} false; then :
13279   $as_echo_n "(cached) " >&6
13280 else
13281   ac_save_c_werror_flag=$ac_c_werror_flag
13282 ac_c_werror_flag=yes
13283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13284 /* end confdefs.h.  */
13285 extern int
13286 pgac_write(int ignore, const char *fmt,...)
13287 __attribute__((format(gnu_printf, 2, 3)));
13288 int
13289 main ()
13290 {
13291
13292   ;
13293   return 0;
13294 }
13295 _ACEOF
13296 if ac_fn_c_try_compile "$LINENO"; then :
13297   pgac_cv_printf_archetype=gnu_printf
13298 else
13299   pgac_cv_printf_archetype=printf
13300 fi
13301 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13302 ac_c_werror_flag=$ac_save_c_werror_flag
13303 fi
13304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
13305 $as_echo "$pgac_cv_printf_archetype" >&6; }
13306
13307 cat >>confdefs.h <<_ACEOF
13308 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
13309 _ACEOF
13310
13311
13312
13313   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array members" >&5
13314 $as_echo_n "checking for flexible array members... " >&6; }
13315 if ${ac_cv_c_flexmember+:} false; then :
13316   $as_echo_n "(cached) " >&6
13317 else
13318   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13319 /* end confdefs.h.  */
13320 #include <stdlib.h>
13321             #include <stdio.h>
13322             #include <stddef.h>
13323             struct s { int n; double d[]; };
13324 int
13325 main ()
13326 {
13327 int m = getchar ();
13328             struct s *p = malloc (offsetof (struct s, d)
13329                                   + m * sizeof (double));
13330             p->d[0] = 0.0;
13331             return p->d != (double *) NULL;
13332   ;
13333   return 0;
13334 }
13335 _ACEOF
13336 if ac_fn_c_try_compile "$LINENO"; then :
13337   ac_cv_c_flexmember=yes
13338 else
13339   ac_cv_c_flexmember=no
13340 fi
13341 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13342 fi
13343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
13344 $as_echo "$ac_cv_c_flexmember" >&6; }
13345   if test $ac_cv_c_flexmember = yes; then
13346
13347 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
13348
13349   else
13350     $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
13351
13352   fi
13353
13354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed types" >&5
13355 $as_echo_n "checking for signed types... " >&6; }
13356 if ${pgac_cv_c_signed+:} false; then :
13357   $as_echo_n "(cached) " >&6
13358 else
13359   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13360 /* end confdefs.h.  */
13361
13362 int
13363 main ()
13364 {
13365 signed char c; signed short s; signed int i;
13366   ;
13367   return 0;
13368 }
13369 _ACEOF
13370 if ac_fn_c_try_compile "$LINENO"; then :
13371   pgac_cv_c_signed=yes
13372 else
13373   pgac_cv_c_signed=no
13374 fi
13375 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13376 fi
13377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_signed" >&5
13378 $as_echo "$pgac_cv_c_signed" >&6; }
13379 if test x"$pgac_cv_c_signed" = xno ; then
13380
13381 $as_echo "#define signed /**/" >>confdefs.h
13382
13383 fi
13384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5
13385 $as_echo_n "checking for __func__... " >&6; }
13386 if ${pgac_cv_funcname_func_support+:} false; then :
13387   $as_echo_n "(cached) " >&6
13388 else
13389   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13390 /* end confdefs.h.  */
13391 #include <stdio.h>
13392 int
13393 main ()
13394 {
13395 printf("%s\n", __func__);
13396   ;
13397   return 0;
13398 }
13399 _ACEOF
13400 if ac_fn_c_try_compile "$LINENO"; then :
13401   pgac_cv_funcname_func_support=yes
13402 else
13403   pgac_cv_funcname_func_support=no
13404 fi
13405 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13406 fi
13407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_func_support" >&5
13408 $as_echo "$pgac_cv_funcname_func_support" >&6; }
13409 if test x"$pgac_cv_funcname_func_support" = xyes ; then
13410
13411 $as_echo "#define HAVE_FUNCNAME__FUNC 1" >>confdefs.h
13412
13413 else
13414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__" >&5
13415 $as_echo_n "checking for __FUNCTION__... " >&6; }
13416 if ${pgac_cv_funcname_function_support+:} false; then :
13417   $as_echo_n "(cached) " >&6
13418 else
13419   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13420 /* end confdefs.h.  */
13421 #include <stdio.h>
13422 int
13423 main ()
13424 {
13425 printf("%s\n", __FUNCTION__);
13426   ;
13427   return 0;
13428 }
13429 _ACEOF
13430 if ac_fn_c_try_compile "$LINENO"; then :
13431   pgac_cv_funcname_function_support=yes
13432 else
13433   pgac_cv_funcname_function_support=no
13434 fi
13435 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13436 fi
13437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_function_support" >&5
13438 $as_echo "$pgac_cv_funcname_function_support" >&6; }
13439 if test x"$pgac_cv_funcname_function_support" = xyes ; then
13440
13441 $as_echo "#define HAVE_FUNCNAME__FUNCTION 1" >>confdefs.h
13442
13443 fi
13444 fi
13445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
13446 $as_echo_n "checking for _Static_assert... " >&6; }
13447 if ${pgac_cv__static_assert+:} false; then :
13448   $as_echo_n "(cached) " >&6
13449 else
13450   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13451 /* end confdefs.h.  */
13452
13453 int
13454 main ()
13455 {
13456 ({ _Static_assert(1, "foo"); })
13457   ;
13458   return 0;
13459 }
13460 _ACEOF
13461 if ac_fn_c_try_link "$LINENO"; then :
13462   pgac_cv__static_assert=yes
13463 else
13464   pgac_cv__static_assert=no
13465 fi
13466 rm -f core conftest.err conftest.$ac_objext \
13467     conftest$ac_exeext conftest.$ac_ext
13468 fi
13469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
13470 $as_echo "$pgac_cv__static_assert" >&6; }
13471 if test x"$pgac_cv__static_assert" = xyes ; then
13472
13473 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
13474
13475 fi
13476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5
13477 $as_echo_n "checking for typeof... " >&6; }
13478 if ${pgac_cv_c_typeof+:} false; then :
13479   $as_echo_n "(cached) " >&6
13480 else
13481   pgac_cv_c_typeof=no
13482 for pgac_kw in typeof __typeof__ decltype; do
13483   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13484 /* end confdefs.h.  */
13485
13486 int
13487 main ()
13488 {
13489 int x = 0;
13490 $pgac_kw(x) y;
13491 y = x;
13492 return y;
13493   ;
13494   return 0;
13495 }
13496 _ACEOF
13497 if ac_fn_c_try_compile "$LINENO"; then :
13498   pgac_cv_c_typeof=$pgac_kw
13499 fi
13500 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13501   test "$pgac_cv_c_typeof" != no && break
13502 done
13503 fi
13504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_typeof" >&5
13505 $as_echo "$pgac_cv_c_typeof" >&6; }
13506 if test "$pgac_cv_c_typeof" != no; then
13507
13508 $as_echo "#define HAVE_TYPEOF 1" >>confdefs.h
13509
13510   if test "$pgac_cv_c_typeof" != typeof; then
13511
13512 cat >>confdefs.h <<_ACEOF
13513 #define typeof $pgac_cv_c_typeof
13514 _ACEOF
13515
13516   fi
13517 fi
13518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
13519 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
13520 if ${pgac_cv__types_compatible+:} false; then :
13521   $as_echo_n "(cached) " >&6
13522 else
13523   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13524 /* end confdefs.h.  */
13525
13526 int
13527 main ()
13528 {
13529  int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
13530   ;
13531   return 0;
13532 }
13533 _ACEOF
13534 if ac_fn_c_try_compile "$LINENO"; then :
13535   pgac_cv__types_compatible=yes
13536 else
13537   pgac_cv__types_compatible=no
13538 fi
13539 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13540 fi
13541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
13542 $as_echo "$pgac_cv__types_compatible" >&6; }
13543 if test x"$pgac_cv__types_compatible" = xyes ; then
13544
13545 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
13546
13547 fi
13548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap16" >&5
13549 $as_echo_n "checking for __builtin_bswap16... " >&6; }
13550 if ${pgac_cv__builtin_bswap16+:} false; then :
13551   $as_echo_n "(cached) " >&6
13552 else
13553   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13554 /* end confdefs.h.  */
13555 static unsigned long int x = __builtin_bswap16(0xaabb);
13556
13557 _ACEOF
13558 if ac_fn_c_try_compile "$LINENO"; then :
13559   pgac_cv__builtin_bswap16=yes
13560 else
13561   pgac_cv__builtin_bswap16=no
13562 fi
13563 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13564 fi
13565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap16" >&5
13566 $as_echo "$pgac_cv__builtin_bswap16" >&6; }
13567 if test x"$pgac_cv__builtin_bswap16" = xyes ; then
13568
13569 $as_echo "#define HAVE__BUILTIN_BSWAP16 1" >>confdefs.h
13570
13571 fi
13572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
13573 $as_echo_n "checking for __builtin_bswap32... " >&6; }
13574 if ${pgac_cv__builtin_bswap32+:} false; then :
13575   $as_echo_n "(cached) " >&6
13576 else
13577   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13578 /* end confdefs.h.  */
13579 static unsigned long int x = __builtin_bswap32(0xaabbccdd);
13580
13581 _ACEOF
13582 if ac_fn_c_try_compile "$LINENO"; then :
13583   pgac_cv__builtin_bswap32=yes
13584 else
13585   pgac_cv__builtin_bswap32=no
13586 fi
13587 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13588 fi
13589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
13590 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
13591 if test x"$pgac_cv__builtin_bswap32" = xyes ; then
13592
13593 $as_echo "#define HAVE__BUILTIN_BSWAP32 1" >>confdefs.h
13594
13595 fi
13596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
13597 $as_echo_n "checking for __builtin_bswap64... " >&6; }
13598 if ${pgac_cv__builtin_bswap64+:} false; then :
13599   $as_echo_n "(cached) " >&6
13600 else
13601   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13602 /* end confdefs.h.  */
13603 static unsigned long int x = __builtin_bswap64(0xaabbccddeeff0011);
13604
13605 _ACEOF
13606 if ac_fn_c_try_compile "$LINENO"; then :
13607   pgac_cv__builtin_bswap64=yes
13608 else
13609   pgac_cv__builtin_bswap64=no
13610 fi
13611 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13612 fi
13613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
13614 $as_echo "$pgac_cv__builtin_bswap64" >&6; }
13615 if test x"$pgac_cv__builtin_bswap64" = xyes ; then
13616
13617 $as_echo "#define HAVE__BUILTIN_BSWAP64 1" >>confdefs.h
13618
13619 fi
13620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
13621 $as_echo_n "checking for __builtin_constant_p... " >&6; }
13622 if ${pgac_cv__builtin_constant_p+:} false; then :
13623   $as_echo_n "(cached) " >&6
13624 else
13625   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13626 /* end confdefs.h.  */
13627 static int x;
13628   static int y[__builtin_constant_p(x) ? x : 1];
13629   static int z[__builtin_constant_p("string literal") ? 1 : x];
13630
13631
13632 _ACEOF
13633 if ac_fn_c_try_compile "$LINENO"; then :
13634   pgac_cv__builtin_constant_p=yes
13635 else
13636   pgac_cv__builtin_constant_p=no
13637 fi
13638 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13639 fi
13640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
13641 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
13642 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
13643
13644 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
13645
13646 fi
13647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
13648 $as_echo_n "checking for __builtin_unreachable... " >&6; }
13649 if ${pgac_cv__builtin_unreachable+:} false; then :
13650   $as_echo_n "(cached) " >&6
13651 else
13652   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13653 /* end confdefs.h.  */
13654
13655 int
13656 main ()
13657 {
13658 __builtin_unreachable();
13659   ;
13660   return 0;
13661 }
13662 _ACEOF
13663 if ac_fn_c_try_link "$LINENO"; then :
13664   pgac_cv__builtin_unreachable=yes
13665 else
13666   pgac_cv__builtin_unreachable=no
13667 fi
13668 rm -f core conftest.err conftest.$ac_objext \
13669     conftest$ac_exeext conftest.$ac_ext
13670 fi
13671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
13672 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
13673 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
13674
13675 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
13676
13677 fi
13678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for computed goto support" >&5
13679 $as_echo_n "checking for computed goto support... " >&6; }
13680 if ${pgac_cv_computed_goto+:} false; then :
13681   $as_echo_n "(cached) " >&6
13682 else
13683   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13684 /* end confdefs.h.  */
13685
13686 int
13687 main ()
13688 {
13689 void *labeladdrs[] = {&&my_label};
13690   goto *labeladdrs[0];
13691   my_label:
13692   return 1;
13693
13694   ;
13695   return 0;
13696 }
13697 _ACEOF
13698 if ac_fn_c_try_compile "$LINENO"; then :
13699   pgac_cv_computed_goto=yes
13700 else
13701   pgac_cv_computed_goto=no
13702 fi
13703 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13704 fi
13705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_computed_goto" >&5
13706 $as_echo "$pgac_cv_computed_goto" >&6; }
13707 if test x"$pgac_cv_computed_goto" = xyes ; then
13708
13709 $as_echo "#define HAVE_COMPUTED_GOTO 1" >>confdefs.h
13710
13711 fi
13712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __VA_ARGS__" >&5
13713 $as_echo_n "checking for __VA_ARGS__... " >&6; }
13714 if ${pgac_cv__va_args+:} false; then :
13715   $as_echo_n "(cached) " >&6
13716 else
13717   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13718 /* end confdefs.h.  */
13719 #include <stdio.h>
13720 int
13721 main ()
13722 {
13723 #define debug(...) fprintf(stderr, __VA_ARGS__)
13724 debug("%s", "blarg");
13725
13726   ;
13727   return 0;
13728 }
13729 _ACEOF
13730 if ac_fn_c_try_compile "$LINENO"; then :
13731   pgac_cv__va_args=yes
13732 else
13733   pgac_cv__va_args=no
13734 fi
13735 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13736 fi
13737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__va_args" >&5
13738 $as_echo "$pgac_cv__va_args" >&6; }
13739 if test x"$pgac_cv__va_args" = xyes ; then
13740
13741 $as_echo "#define HAVE__VA_ARGS 1" >>confdefs.h
13742
13743 fi
13744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13745 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
13746 if ${ac_cv_struct_tm+:} false; then :
13747   $as_echo_n "(cached) " >&6
13748 else
13749   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13750 /* end confdefs.h.  */
13751 #include <sys/types.h>
13752 #include <time.h>
13753
13754 int
13755 main ()
13756 {
13757 struct tm tm;
13758                                      int *p = &tm.tm_sec;
13759                                      return !p;
13760   ;
13761   return 0;
13762 }
13763 _ACEOF
13764 if ac_fn_c_try_compile "$LINENO"; then :
13765   ac_cv_struct_tm=time.h
13766 else
13767   ac_cv_struct_tm=sys/time.h
13768 fi
13769 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13770 fi
13771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13772 $as_echo "$ac_cv_struct_tm" >&6; }
13773 if test $ac_cv_struct_tm = sys/time.h; then
13774
13775 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
13776
13777 fi
13778
13779 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
13780 #include <$ac_cv_struct_tm>
13781
13782 "
13783 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
13784
13785 cat >>confdefs.h <<_ACEOF
13786 #define HAVE_STRUCT_TM_TM_ZONE 1
13787 _ACEOF
13788
13789
13790 fi
13791
13792 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13793
13794 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
13795
13796 fi
13797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13798 $as_echo_n "checking for tzname... " >&6; }
13799 if ${ac_cv_var_tzname+:} false; then :
13800   $as_echo_n "(cached) " >&6
13801 else
13802   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13803 /* end confdefs.h.  */
13804 #include <stdlib.h>
13805 #include <time.h>
13806 #ifndef tzname /* For SGI.  */
13807 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
13808 #endif
13809
13810 int
13811 main ()
13812 {
13813 atoi(*tzname);
13814   ;
13815   return 0;
13816 }
13817 _ACEOF
13818 if ac_fn_c_try_link "$LINENO"; then :
13819   ac_cv_var_tzname=yes
13820 else
13821   ac_cv_var_tzname=no
13822 fi
13823 rm -f core conftest.err conftest.$ac_objext \
13824     conftest$ac_exeext conftest.$ac_ext
13825 fi
13826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13827 $as_echo "$ac_cv_var_tzname" >&6; }
13828 if test $ac_cv_var_tzname = yes; then
13829
13830 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
13831
13832 fi
13833
13834 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
13835 #ifdef HAVE_SYS_IPC_H
13836 #include <sys/ipc.h>
13837 #endif
13838 #ifdef HAVE_SYS_SEM_H
13839 #include <sys/sem.h>
13840 #endif
13841 "
13842 if test "x$ac_cv_type_union_semun" = xyes; then :
13843
13844 cat >>confdefs.h <<_ACEOF
13845 #define HAVE_UNION_SEMUN 1
13846 _ACEOF
13847
13848
13849 fi
13850
13851 ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
13852 #ifdef HAVE_SYS_UN_H
13853 #include <sys/un.h>
13854 #endif
13855
13856 "
13857 if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
13858
13859 $as_echo "#define HAVE_UNIX_SOCKETS 1" >>confdefs.h
13860
13861 fi
13862
13863 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
13864 #include <sys/socket.h>
13865
13866 "
13867 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
13868
13869 cat >>confdefs.h <<_ACEOF
13870 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
13871 _ACEOF
13872
13873
13874 fi
13875
13876 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
13877 #include <sys/socket.h>
13878
13879 "
13880 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
13881
13882 cat >>confdefs.h <<_ACEOF
13883 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
13884 _ACEOF
13885
13886
13887 fi
13888 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
13889 #include <sys/socket.h>
13890
13891 "
13892 if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
13893
13894 cat >>confdefs.h <<_ACEOF
13895 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
13896 _ACEOF
13897
13898
13899 fi
13900 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
13901 #include <sys/socket.h>
13902
13903 "
13904 if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
13905
13906 cat >>confdefs.h <<_ACEOF
13907 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
13908 _ACEOF
13909
13910
13911 fi
13912 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
13913 #include <sys/socket.h>
13914
13915 "
13916 if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
13917
13918 cat >>confdefs.h <<_ACEOF
13919 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
13920 _ACEOF
13921
13922
13923 fi
13924 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
13925 #include <sys/socket.h>
13926
13927 "
13928 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
13929
13930 cat >>confdefs.h <<_ACEOF
13931 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
13932 _ACEOF
13933
13934
13935 fi
13936
13937 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include <sys/types.h>
13938 #include <sys/socket.h>
13939 #include <netdb.h>
13940
13941 "
13942 if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
13943
13944 cat >>confdefs.h <<_ACEOF
13945 #define HAVE_STRUCT_ADDRINFO 1
13946 _ACEOF
13947
13948
13949 fi
13950
13951
13952   ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
13953 if test "x$ac_cv_type_intptr_t" = xyes; then :
13954
13955 $as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
13956
13957 else
13958   for ac_type in 'int' 'long int' 'long long int'; do
13959        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13960 /* end confdefs.h.  */
13961 $ac_includes_default
13962 int
13963 main ()
13964 {
13965 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
13966 test_array [0] = 0;
13967 return test_array [0];
13968
13969   ;
13970   return 0;
13971 }
13972 _ACEOF
13973 if ac_fn_c_try_compile "$LINENO"; then :
13974
13975 cat >>confdefs.h <<_ACEOF
13976 #define intptr_t $ac_type
13977 _ACEOF
13978
13979           ac_type=
13980 fi
13981 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13982        test -z "$ac_type" && break
13983      done
13984 fi
13985
13986
13987
13988   ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
13989 if test "x$ac_cv_type_uintptr_t" = xyes; then :
13990
13991 $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
13992
13993 else
13994   for ac_type in 'unsigned int' 'unsigned long int' \
13995         'unsigned long long int'; do
13996        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13997 /* end confdefs.h.  */
13998 $ac_includes_default
13999 int
14000 main ()
14001 {
14002 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
14003 test_array [0] = 0;
14004 return test_array [0];
14005
14006   ;
14007   return 0;
14008 }
14009 _ACEOF
14010 if ac_fn_c_try_compile "$LINENO"; then :
14011
14012 cat >>confdefs.h <<_ACEOF
14013 #define uintptr_t $ac_type
14014 _ACEOF
14015
14016           ac_type=
14017 fi
14018 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14019        test -z "$ac_type" && break
14020      done
14021 fi
14022
14023
14024
14025   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
14026 $as_echo_n "checking for unsigned long long int... " >&6; }
14027 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
14028   $as_echo_n "(cached) " >&6
14029 else
14030   ac_cv_type_unsigned_long_long_int=yes
14031      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
14032        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14033 /* end confdefs.h.  */
14034
14035   /* For now, do not test the preprocessor; as of 2007 there are too many
14036          implementations with broken preprocessors.  Perhaps this can
14037          be revisited in 2012.  In the meantime, code should not expect
14038          #if to work with literals wider than 32 bits.  */
14039       /* Test literals.  */
14040       long long int ll = 9223372036854775807ll;
14041       long long int nll = -9223372036854775807LL;
14042       unsigned long long int ull = 18446744073709551615ULL;
14043       /* Test constant expressions.   */
14044       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
14045                      ? 1 : -1)];
14046       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
14047                      ? 1 : -1)];
14048       int i = 63;
14049 int
14050 main ()
14051 {
14052 /* Test availability of runtime routines for shift and division.  */
14053       long long int llmax = 9223372036854775807ll;
14054       unsigned long long int ullmax = 18446744073709551615ull;
14055       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
14056               | (llmax / ll) | (llmax % ll)
14057               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
14058               | (ullmax / ull) | (ullmax % ull));
14059   ;
14060   return 0;
14061 }
14062
14063 _ACEOF
14064 if ac_fn_c_try_link "$LINENO"; then :
14065
14066 else
14067   ac_cv_type_unsigned_long_long_int=no
14068 fi
14069 rm -f core conftest.err conftest.$ac_objext \
14070     conftest$ac_exeext conftest.$ac_ext
14071      fi
14072 fi
14073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
14074 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
14075   if test $ac_cv_type_unsigned_long_long_int = yes; then
14076
14077 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
14078
14079   fi
14080
14081
14082
14083   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
14084 $as_echo_n "checking for long long int... " >&6; }
14085 if ${ac_cv_type_long_long_int+:} false; then :
14086   $as_echo_n "(cached) " >&6
14087 else
14088   ac_cv_type_long_long_int=yes
14089       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
14090         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
14091         if test $ac_cv_type_long_long_int = yes; then
14092                                   if test "$cross_compiling" = yes; then :
14093   :
14094 else
14095   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14096 /* end confdefs.h.  */
14097 #include <limits.h>
14098                  #ifndef LLONG_MAX
14099                  # define HALF \
14100                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
14101                  # define LLONG_MAX (HALF - 1 + HALF)
14102                  #endif
14103 int
14104 main ()
14105 {
14106 long long int n = 1;
14107                  int i;
14108                  for (i = 0; ; i++)
14109                    {
14110                      long long int m = n << i;
14111                      if (m >> i != n)
14112                        return 1;
14113                      if (LLONG_MAX / 2 < m)
14114                        break;
14115                    }
14116                  return 0;
14117   ;
14118   return 0;
14119 }
14120 _ACEOF
14121 if ac_fn_c_try_run "$LINENO"; then :
14122
14123 else
14124   ac_cv_type_long_long_int=no
14125 fi
14126 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14127   conftest.$ac_objext conftest.beam conftest.$ac_ext
14128 fi
14129
14130         fi
14131       fi
14132 fi
14133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
14134 $as_echo "$ac_cv_type_long_long_int" >&6; }
14135   if test $ac_cv_type_long_long_int = yes; then
14136
14137 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
14138
14139   fi
14140
14141
14142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
14143 $as_echo_n "checking for locale_t... " >&6; }
14144 if ${pgac_cv_type_locale_t+:} false; then :
14145   $as_echo_n "(cached) " >&6
14146 else
14147   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14148 /* end confdefs.h.  */
14149 #include <locale.h>
14150 locale_t x;
14151 int
14152 main ()
14153 {
14154
14155   ;
14156   return 0;
14157 }
14158 _ACEOF
14159 if ac_fn_c_try_compile "$LINENO"; then :
14160   pgac_cv_type_locale_t=yes
14161 else
14162   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14163 /* end confdefs.h.  */
14164 #include <xlocale.h>
14165 locale_t x;
14166 int
14167 main ()
14168 {
14169
14170   ;
14171   return 0;
14172 }
14173 _ACEOF
14174 if ac_fn_c_try_compile "$LINENO"; then :
14175   pgac_cv_type_locale_t='yes (in xlocale.h)'
14176 else
14177   pgac_cv_type_locale_t=no
14178 fi
14179 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14180 fi
14181 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14182 fi
14183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
14184 $as_echo "$pgac_cv_type_locale_t" >&6; }
14185 if test "$pgac_cv_type_locale_t" != no; then
14186
14187 $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
14188
14189 fi
14190 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
14191
14192 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
14193
14194 fi
14195
14196 # MSVC doesn't cope well with defining restrict to __restrict, the
14197 # spelling it understands, because it conflicts with
14198 # __declspec(restrict). Therefore we define pg_restrict to the
14199 # appropriate definition, which presumably won't conflict.
14200 #
14201 # Allow platforms with buggy compilers to force restrict to not be
14202 # used by setting $FORCE_DISABLE_RESTRICT=yes in the relevant
14203 # template.
14204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
14205 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
14206 if ${ac_cv_c_restrict+:} false; then :
14207   $as_echo_n "(cached) " >&6
14208 else
14209   ac_cv_c_restrict=no
14210    # The order here caters to the fact that C++ does not require restrict.
14211    for ac_kw in __restrict __restrict__ _Restrict restrict; do
14212      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14213 /* end confdefs.h.  */
14214 typedef int * int_ptr;
14215         int foo (int_ptr $ac_kw ip) {
14216         return ip[0];
14217        }
14218 int
14219 main ()
14220 {
14221 int s[1];
14222         int * $ac_kw t = s;
14223         t[0] = 0;
14224         return foo(t)
14225   ;
14226   return 0;
14227 }
14228 _ACEOF
14229 if ac_fn_c_try_compile "$LINENO"; then :
14230   ac_cv_c_restrict=$ac_kw
14231 fi
14232 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14233      test "$ac_cv_c_restrict" != no && break
14234    done
14235
14236 fi
14237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
14238 $as_echo "$ac_cv_c_restrict" >&6; }
14239
14240  case $ac_cv_c_restrict in
14241    restrict) ;;
14242    no) $as_echo "#define restrict /**/" >>confdefs.h
14243  ;;
14244    *)  cat >>confdefs.h <<_ACEOF
14245 #define restrict $ac_cv_c_restrict
14246 _ACEOF
14247  ;;
14248  esac
14249
14250 if test "$ac_cv_c_restrict" = "no" -o "x$FORCE_DISABLE_RESTRICT" = "xyes"; then
14251   pg_restrict=""
14252 else
14253   pg_restrict="$ac_cv_c_restrict"
14254 fi
14255
14256 cat >>confdefs.h <<_ACEOF
14257 #define pg_restrict $pg_restrict
14258 _ACEOF
14259
14260
14261 ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
14262 #include <sys/param.h>
14263 #ifdef HAVE_SYS_UCRED_H
14264 #include <sys/ucred.h>
14265 #endif
14266 "
14267 if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
14268
14269 cat >>confdefs.h <<_ACEOF
14270 #define HAVE_STRUCT_CMSGCRED 1
14271 _ACEOF
14272
14273
14274 fi
14275
14276
14277 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
14278 #include <getopt.h>
14279 #endif
14280 "
14281 if test "x$ac_cv_type_struct_option" = xyes; then :
14282
14283 cat >>confdefs.h <<_ACEOF
14284 #define HAVE_STRUCT_OPTION 1
14285 _ACEOF
14286
14287
14288 fi
14289
14290
14291 if test "$with_zlib" = yes; then
14292   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
14293   # did not).  While we could work around the lack of z_streamp, it
14294   # seems unwise to encourage people to use such old zlib versions...
14295   ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
14296 "
14297 if test "x$ac_cv_type_z_streamp" = xyes; then :
14298
14299 else
14300   as_fn_error $? "zlib version is too old
14301 Use --without-zlib to disable zlib support." "$LINENO" 5
14302 fi
14303
14304 fi
14305
14306 # On PPC, check if assembler supports LWARX instruction's mutex hint bit
14307 case $host_cpu in
14308   ppc*|powerpc*)
14309     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports lwarx hint bit" >&5
14310 $as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
14311     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14312 /* end confdefs.h.  */
14313
14314 int
14315 main ()
14316 {
14317 int a = 0; int *p = &a; int r;
14318          __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
14319   ;
14320   return 0;
14321 }
14322 _ACEOF
14323 if ac_fn_c_try_compile "$LINENO"; then :
14324   pgac_cv_have_ppc_mutex_hint=yes
14325 else
14326   pgac_cv_have_ppc_mutex_hint=no
14327 fi
14328 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14329     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_ppc_mutex_hint" >&5
14330 $as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
14331     if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
14332
14333 $as_echo "#define HAVE_PPC_LWARX_MUTEX_HINT 1" >>confdefs.h
14334
14335     fi
14336   ;;
14337 esac
14338
14339 # Check largefile support.  You might think this is a system service not a
14340 # compiler characteristic, but you'd be wrong.  We must check this before
14341 # probing existence of related functions such as fseeko, since the largefile
14342 # defines can affect what is generated for that.
14343 if test "$PORTNAME" != "win32"; then
14344    # Check whether --enable-largefile was given.
14345 if test "${enable_largefile+set}" = set; then :
14346   enableval=$enable_largefile;
14347 fi
14348
14349 if test "$enable_largefile" != no; then
14350
14351   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
14352 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
14353 if ${ac_cv_sys_largefile_CC+:} false; then :
14354   $as_echo_n "(cached) " >&6
14355 else
14356   ac_cv_sys_largefile_CC=no
14357      if test "$GCC" != yes; then
14358        ac_save_CC=$CC
14359        while :; do
14360          # IRIX 6.2 and later do not support large files by default,
14361          # so use the C compiler's -n32 option if that helps.
14362          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14363 /* end confdefs.h.  */
14364 #include <sys/types.h>
14365  /* Check that off_t can represent 2**63 - 1 correctly.
14366     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14367     since some C++ compilers masquerading as C compilers
14368     incorrectly reject 9223372036854775807.  */
14369 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14370   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14371                        && LARGE_OFF_T % 2147483647 == 1)
14372                       ? 1 : -1];
14373 int
14374 main ()
14375 {
14376
14377   ;
14378   return 0;
14379 }
14380 _ACEOF
14381          if ac_fn_c_try_compile "$LINENO"; then :
14382   break
14383 fi
14384 rm -f core conftest.err conftest.$ac_objext
14385          CC="$CC -n32"
14386          if ac_fn_c_try_compile "$LINENO"; then :
14387   ac_cv_sys_largefile_CC=' -n32'; break
14388 fi
14389 rm -f core conftest.err conftest.$ac_objext
14390          break
14391        done
14392        CC=$ac_save_CC
14393        rm -f conftest.$ac_ext
14394     fi
14395 fi
14396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
14397 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
14398   if test "$ac_cv_sys_largefile_CC" != no; then
14399     CC=$CC$ac_cv_sys_largefile_CC
14400   fi
14401
14402   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
14403 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
14404 if ${ac_cv_sys_file_offset_bits+:} false; then :
14405   $as_echo_n "(cached) " >&6
14406 else
14407   while :; do
14408   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14409 /* end confdefs.h.  */
14410 #include <sys/types.h>
14411  /* Check that off_t can represent 2**63 - 1 correctly.
14412     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14413     since some C++ compilers masquerading as C compilers
14414     incorrectly reject 9223372036854775807.  */
14415 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14416   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14417                        && LARGE_OFF_T % 2147483647 == 1)
14418                       ? 1 : -1];
14419 int
14420 main ()
14421 {
14422
14423   ;
14424   return 0;
14425 }
14426 _ACEOF
14427 if ac_fn_c_try_compile "$LINENO"; then :
14428   ac_cv_sys_file_offset_bits=no; break
14429 fi
14430 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14431   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14432 /* end confdefs.h.  */
14433 #define _FILE_OFFSET_BITS 64
14434 #include <sys/types.h>
14435  /* Check that off_t can represent 2**63 - 1 correctly.
14436     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14437     since some C++ compilers masquerading as C compilers
14438     incorrectly reject 9223372036854775807.  */
14439 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14440   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14441                        && LARGE_OFF_T % 2147483647 == 1)
14442                       ? 1 : -1];
14443 int
14444 main ()
14445 {
14446
14447   ;
14448   return 0;
14449 }
14450 _ACEOF
14451 if ac_fn_c_try_compile "$LINENO"; then :
14452   ac_cv_sys_file_offset_bits=64; break
14453 fi
14454 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14455   ac_cv_sys_file_offset_bits=unknown
14456   break
14457 done
14458 fi
14459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
14460 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
14461 case $ac_cv_sys_file_offset_bits in #(
14462   no | unknown) ;;
14463   *)
14464 cat >>confdefs.h <<_ACEOF
14465 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14466 _ACEOF
14467 ;;
14468 esac
14469 rm -rf conftest*
14470   if test $ac_cv_sys_file_offset_bits = unknown; then
14471     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
14472 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
14473 if ${ac_cv_sys_large_files+:} false; then :
14474   $as_echo_n "(cached) " >&6
14475 else
14476   while :; do
14477   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14478 /* end confdefs.h.  */
14479 #include <sys/types.h>
14480  /* Check that off_t can represent 2**63 - 1 correctly.
14481     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14482     since some C++ compilers masquerading as C compilers
14483     incorrectly reject 9223372036854775807.  */
14484 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14485   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14486                        && LARGE_OFF_T % 2147483647 == 1)
14487                       ? 1 : -1];
14488 int
14489 main ()
14490 {
14491
14492   ;
14493   return 0;
14494 }
14495 _ACEOF
14496 if ac_fn_c_try_compile "$LINENO"; then :
14497   ac_cv_sys_large_files=no; break
14498 fi
14499 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14500   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14501 /* end confdefs.h.  */
14502 #define _LARGE_FILES 1
14503 #include <sys/types.h>
14504  /* Check that off_t can represent 2**63 - 1 correctly.
14505     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14506     since some C++ compilers masquerading as C compilers
14507     incorrectly reject 9223372036854775807.  */
14508 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14509   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14510                        && LARGE_OFF_T % 2147483647 == 1)
14511                       ? 1 : -1];
14512 int
14513 main ()
14514 {
14515
14516   ;
14517   return 0;
14518 }
14519 _ACEOF
14520 if ac_fn_c_try_compile "$LINENO"; then :
14521   ac_cv_sys_large_files=1; break
14522 fi
14523 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14524   ac_cv_sys_large_files=unknown
14525   break
14526 done
14527 fi
14528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
14529 $as_echo "$ac_cv_sys_large_files" >&6; }
14530 case $ac_cv_sys_large_files in #(
14531   no | unknown) ;;
14532   *)
14533 cat >>confdefs.h <<_ACEOF
14534 #define _LARGE_FILES $ac_cv_sys_large_files
14535 _ACEOF
14536 ;;
14537 esac
14538 rm -rf conftest*
14539   fi
14540
14541
14542 fi
14543
14544
14545 fi
14546
14547 # Check for largefile support (must be after AC_SYS_LARGEFILE)
14548 # The cast to long int works around a bug in the HP C Compiler
14549 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14550 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14551 # This bug is HP SR number 8606223364.
14552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
14553 $as_echo_n "checking size of off_t... " >&6; }
14554 if ${ac_cv_sizeof_off_t+:} false; then :
14555   $as_echo_n "(cached) " >&6
14556 else
14557   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :
14558
14559 else
14560   if test "$ac_cv_type_off_t" = yes; then
14561      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14562 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14563 as_fn_error 77 "cannot compute sizeof (off_t)
14564 See \`config.log' for more details" "$LINENO" 5; }
14565    else
14566      ac_cv_sizeof_off_t=0
14567    fi
14568 fi
14569
14570 fi
14571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
14572 $as_echo "$ac_cv_sizeof_off_t" >&6; }
14573
14574
14575
14576 cat >>confdefs.h <<_ACEOF
14577 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
14578 _ACEOF
14579
14580
14581
14582 # If we don't have largefile support, can't handle segsize >= 2GB.
14583 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
14584    as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
14585 fi
14586
14587 # The cast to long int works around a bug in the HP C Compiler
14588 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14589 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14590 # This bug is HP SR number 8606223364.
14591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of bool" >&5
14592 $as_echo_n "checking size of bool... " >&6; }
14593 if ${ac_cv_sizeof_bool+:} false; then :
14594   $as_echo_n "(cached) " >&6
14595 else
14596   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (bool))" "ac_cv_sizeof_bool"        "#ifdef HAVE_STDBOOL_H
14597 #include <stdbool.h>
14598 #endif
14599 "; then :
14600
14601 else
14602   if test "$ac_cv_type_bool" = yes; then
14603      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14604 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14605 as_fn_error 77 "cannot compute sizeof (bool)
14606 See \`config.log' for more details" "$LINENO" 5; }
14607    else
14608      ac_cv_sizeof_bool=0
14609    fi
14610 fi
14611
14612 fi
14613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_bool" >&5
14614 $as_echo "$ac_cv_sizeof_bool" >&6; }
14615
14616
14617
14618 cat >>confdefs.h <<_ACEOF
14619 #define SIZEOF_BOOL $ac_cv_sizeof_bool
14620 _ACEOF
14621
14622
14623
14624
14625 ##
14626 ## Functions, global variables
14627 ##
14628
14629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
14630 $as_echo_n "checking for int timezone... " >&6; }
14631 if ${pgac_cv_var_int_timezone+:} false; then :
14632   $as_echo_n "(cached) " >&6
14633 else
14634   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14635 /* end confdefs.h.  */
14636 #include <time.h>
14637 int res;
14638 int
14639 main ()
14640 {
14641 #ifndef __CYGWIN__
14642 res = timezone / 60;
14643 #else
14644 res = _timezone / 60;
14645 #endif
14646   ;
14647   return 0;
14648 }
14649 _ACEOF
14650 if ac_fn_c_try_link "$LINENO"; then :
14651   pgac_cv_var_int_timezone=yes
14652 else
14653   pgac_cv_var_int_timezone=no
14654 fi
14655 rm -f core conftest.err conftest.$ac_objext \
14656     conftest$ac_exeext conftest.$ac_ext
14657 fi
14658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
14659 $as_echo "$pgac_cv_var_int_timezone" >&6; }
14660 if test x"$pgac_cv_var_int_timezone" = xyes ; then
14661
14662 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
14663
14664 fi
14665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for accept()" >&5
14666 $as_echo_n "checking types of arguments for accept()... " >&6; }
14667  if ${ac_cv_func_accept_return+:} false; then :
14668   $as_echo_n "(cached) " >&6
14669 else
14670    if ${ac_cv_func_accept_arg1+:} false; then :
14671   $as_echo_n "(cached) " >&6
14672 else
14673     if ${ac_cv_func_accept_arg2+:} false; then :
14674   $as_echo_n "(cached) " >&6
14675 else
14676      if ${ac_cv_func_accept_arg3+:} false; then :
14677   $as_echo_n "(cached) " >&6
14678 else
14679       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL' 'SOCKET WSAAPI'; do
14680       for ac_cv_func_accept_arg1 in 'int' 'unsigned int' 'SOCKET'; do
14681        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
14682         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
14683          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14684 /* end confdefs.h.  */
14685 #include <sys/types.h>
14686 #include <sys/socket.h>
14687 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
14688 _ACEOF
14689 if ac_fn_c_try_compile "$LINENO"; then :
14690   ac_not_found=no; break 4
14691 else
14692   ac_not_found=yes
14693 fi
14694 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14695        done
14696       done
14697      done
14698     done
14699     if test "$ac_not_found" = yes; then
14700       as_fn_error $? "could not determine argument types" "$LINENO" 5
14701     fi
14702     if test "$ac_cv_func_accept_arg3" = "void"; then
14703       ac_cv_func_accept_arg3=int
14704     fi
14705
14706 fi
14707
14708 fi
14709
14710 fi
14711
14712 fi
14713  { $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
14714 $as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
14715
14716 cat >>confdefs.h <<_ACEOF
14717 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
14718 _ACEOF
14719
14720
14721 cat >>confdefs.h <<_ACEOF
14722 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
14723 _ACEOF
14724
14725
14726 cat >>confdefs.h <<_ACEOF
14727 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
14728 _ACEOF
14729
14730
14731 cat >>confdefs.h <<_ACEOF
14732 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
14733 _ACEOF
14734
14735
14736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
14737 $as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
14738 if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
14739   $as_echo_n "(cached) " >&6
14740 else
14741   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14742 /* end confdefs.h.  */
14743 #include <sys/time.h>
14744 int
14745 main ()
14746 {
14747 struct timeval *tp;
14748 struct timezone *tzp;
14749 gettimeofday(tp,tzp);
14750   ;
14751   return 0;
14752 }
14753 _ACEOF
14754 if ac_fn_c_try_compile "$LINENO"; then :
14755   pgac_cv_func_gettimeofday_1arg=no
14756 else
14757   pgac_cv_func_gettimeofday_1arg=yes
14758 fi
14759 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14760 fi
14761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5
14762 $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
14763 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
14764
14765 $as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
14766
14767 fi
14768
14769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcstombs_l declaration" >&5
14770 $as_echo_n "checking for wcstombs_l declaration... " >&6; }
14771 if ${pgac_cv_func_wcstombs_l+:} false; then :
14772   $as_echo_n "(cached) " >&6
14773 else
14774   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14775 /* end confdefs.h.  */
14776 #include <stdlib.h>
14777 #include <locale.h>
14778 int
14779 main ()
14780 {
14781 #ifndef wcstombs_l
14782 (void) wcstombs_l;
14783 #endif
14784   ;
14785   return 0;
14786 }
14787 _ACEOF
14788 if ac_fn_c_try_compile "$LINENO"; then :
14789   pgac_cv_func_wcstombs_l='yes'
14790 else
14791   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14792 /* end confdefs.h.  */
14793 #include <stdlib.h>
14794 #include <locale.h>
14795 #include <xlocale.h>
14796 int
14797 main ()
14798 {
14799 #ifndef wcstombs_l
14800 (void) wcstombs_l;
14801 #endif
14802   ;
14803   return 0;
14804 }
14805 _ACEOF
14806 if ac_fn_c_try_compile "$LINENO"; then :
14807   pgac_cv_func_wcstombs_l='yes (in xlocale.h)'
14808 else
14809   pgac_cv_func_wcstombs_l='no'
14810 fi
14811 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14812 fi
14813 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14814 fi
14815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_wcstombs_l" >&5
14816 $as_echo "$pgac_cv_func_wcstombs_l" >&6; }
14817 if test "$pgac_cv_func_wcstombs_l" = 'yes (in xlocale.h)'; then
14818
14819 $as_echo "#define WCSTOMBS_L_IN_XLOCALE 1" >>confdefs.h
14820
14821 fi
14822
14823 # Some versions of libedit contain strlcpy(), setproctitle(), and other
14824 # symbols that that library has no business exposing to the world.  Pending
14825 # acquisition of a clue by those developers, ignore libedit (including its
14826 # possible alias of libreadline) while checking for everything else.
14827 LIBS_including_readline="$LIBS"
14828 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
14829
14830 for ac_func in cbrt clock_gettime dlopen fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memmove poll posix_fallocate pstat pthread_is_threaded_np readlink setproctitle setsid shm_open symlink sync_file_range utime utimes wcstombs_l
14831 do :
14832   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14833 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14834 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14835   cat >>confdefs.h <<_ACEOF
14836 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14837 _ACEOF
14838
14839 fi
14840 done
14841
14842
14843 ac_fn_c_check_func "$LINENO" "fseeko" "ac_cv_func_fseeko"
14844 if test "x$ac_cv_func_fseeko" = xyes; then :
14845   $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
14846
14847 else
14848   case " $LIBOBJS " in
14849   *" fseeko.$ac_objext "* ) ;;
14850   *) LIBOBJS="$LIBOBJS fseeko.$ac_objext"
14851  ;;
14852 esac
14853
14854 fi
14855
14856
14857 case $host_os in
14858         # NetBSD uses a custom fseeko/ftello built on fsetpos/fgetpos
14859         # Mingw uses macros to access Win32 API calls
14860         netbsd*|mingw*)
14861
14862 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
14863
14864                 ac_cv_func_fseeko=yes;;
14865         *)
14866                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
14867 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
14868 if ${ac_cv_sys_largefile_source+:} false; then :
14869   $as_echo_n "(cached) " >&6
14870 else
14871   while :; do
14872   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14873 /* end confdefs.h.  */
14874 #include <sys/types.h> /* for off_t */
14875      #include <stdio.h>
14876 int
14877 main ()
14878 {
14879 int (*fp) (FILE *, off_t, int) = fseeko;
14880      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
14881   ;
14882   return 0;
14883 }
14884 _ACEOF
14885 if ac_fn_c_try_link "$LINENO"; then :
14886   ac_cv_sys_largefile_source=no; break
14887 fi
14888 rm -f core conftest.err conftest.$ac_objext \
14889     conftest$ac_exeext conftest.$ac_ext
14890   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14891 /* end confdefs.h.  */
14892 #define _LARGEFILE_SOURCE 1
14893 #include <sys/types.h> /* for off_t */
14894      #include <stdio.h>
14895 int
14896 main ()
14897 {
14898 int (*fp) (FILE *, off_t, int) = fseeko;
14899      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
14900   ;
14901   return 0;
14902 }
14903 _ACEOF
14904 if ac_fn_c_try_link "$LINENO"; then :
14905   ac_cv_sys_largefile_source=1; break
14906 fi
14907 rm -f core conftest.err conftest.$ac_objext \
14908     conftest$ac_exeext conftest.$ac_ext
14909   ac_cv_sys_largefile_source=unknown
14910   break
14911 done
14912 fi
14913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
14914 $as_echo "$ac_cv_sys_largefile_source" >&6; }
14915 case $ac_cv_sys_largefile_source in #(
14916   no | unknown) ;;
14917   *)
14918 cat >>confdefs.h <<_ACEOF
14919 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
14920 _ACEOF
14921 ;;
14922 esac
14923 rm -rf conftest*
14924
14925 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
14926 # in glibc 2.1.3, but that breaks too many other things.
14927 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
14928 if test $ac_cv_sys_largefile_source != unknown; then
14929
14930 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
14931
14932 fi
14933 ;;
14934 esac
14935
14936 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
14937 # by calling it, 2009-04-02
14938 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
14939 if test "$PORTNAME" != "solaris"; then
14940 for ac_func in posix_fadvise
14941 do :
14942   ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
14943 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
14944   cat >>confdefs.h <<_ACEOF
14945 #define HAVE_POSIX_FADVISE 1
14946 _ACEOF
14947
14948 fi
14949 done
14950
14951 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
14952 "
14953 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
14954   ac_have_decl=1
14955 else
14956   ac_have_decl=0
14957 fi
14958
14959 cat >>confdefs.h <<_ACEOF
14960 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
14961 _ACEOF
14962
14963 fi
14964
14965 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
14966 "
14967 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
14968   ac_have_decl=1
14969 else
14970   ac_have_decl=0
14971 fi
14972
14973 cat >>confdefs.h <<_ACEOF
14974 #define HAVE_DECL_FDATASYNC $ac_have_decl
14975 _ACEOF
14976
14977 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
14978 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
14979   ac_have_decl=1
14980 else
14981   ac_have_decl=0
14982 fi
14983
14984 cat >>confdefs.h <<_ACEOF
14985 #define HAVE_DECL_STRLCAT $ac_have_decl
14986 _ACEOF
14987 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
14988 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
14989   ac_have_decl=1
14990 else
14991   ac_have_decl=0
14992 fi
14993
14994 cat >>confdefs.h <<_ACEOF
14995 #define HAVE_DECL_STRLCPY $ac_have_decl
14996 _ACEOF
14997 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
14998 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
14999   ac_have_decl=1
15000 else
15001   ac_have_decl=0
15002 fi
15003
15004 cat >>confdefs.h <<_ACEOF
15005 #define HAVE_DECL_STRNLEN $ac_have_decl
15006 _ACEOF
15007
15008 # This is probably only present on macOS, but may as well check always
15009 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
15010 "
15011 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
15012   ac_have_decl=1
15013 else
15014   ac_have_decl=0
15015 fi
15016
15017 cat >>confdefs.h <<_ACEOF
15018 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
15019 _ACEOF
15020
15021
15022 HAVE_IPV6=no
15023 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default
15024 #include <netinet/in.h>
15025 "
15026 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
15027
15028 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
15029
15030          HAVE_IPV6=yes
15031 fi
15032
15033
15034
15035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
15036 $as_echo_n "checking for PS_STRINGS... " >&6; }
15037 if ${pgac_cv_var_PS_STRINGS+:} false; then :
15038   $as_echo_n "(cached) " >&6
15039 else
15040   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15041 /* end confdefs.h.  */
15042 #include <machine/vmparam.h>
15043 #include <sys/exec.h>
15044
15045 int
15046 main ()
15047 {
15048 PS_STRINGS->ps_nargvstr = 1;
15049 PS_STRINGS->ps_argvstr = "foo";
15050   ;
15051   return 0;
15052 }
15053 _ACEOF
15054 if ac_fn_c_try_link "$LINENO"; then :
15055   pgac_cv_var_PS_STRINGS=yes
15056 else
15057   pgac_cv_var_PS_STRINGS=no
15058 fi
15059 rm -f core conftest.err conftest.$ac_objext \
15060     conftest$ac_exeext conftest.$ac_ext
15061 fi
15062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
15063 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
15064 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
15065
15066 $as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
15067
15068 fi
15069
15070
15071 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
15072 # is missing.  Yes, there are machines that have only one.  We may
15073 # also decide to use snprintf.c if snprintf() is present but does not
15074 # have all the features we need --- see below.
15075
15076 if test "$PORTNAME" = "win32"; then
15077   # Win32 gets snprintf.c built unconditionally.
15078   #
15079   # To properly translate all NLS languages strings, we must support the
15080   # *printf() %$ format, which allows *printf() arguments to be selected
15081   # by position in the translated string.
15082   #
15083   # libintl versions < 0.13 use the native *printf() functions, and Win32
15084   # *printf() doesn't understand %$, so we must use our /port versions,
15085   # which do understand %$. libintl versions >= 0.13 include their own
15086   # *printf versions on Win32.  The libintl 0.13 release note text is:
15087   #
15088   #   C format strings with positions, as they arise when a translator
15089   #   needs to reorder a sentence, are now supported on all platforms.
15090   #   On those few platforms (NetBSD and Woe32) for which the native
15091   #   printf()/fprintf()/... functions don't support such format
15092   #   strings, replacements are provided through <libintl.h>.
15093   #
15094   # We could use libintl >= 0.13's *printf() if we were sure that we had
15095   # a litint >= 0.13 at runtime, but seeing that there is no clean way
15096   # to guarantee that, it is best to just use our own, so we are sure to
15097   # get %$ support. In include/port.h we disable the *printf() macros
15098   # that might have been defined by libintl.
15099   #
15100   # We do this unconditionally whether NLS is used or not so we are sure
15101   # that all Win32 libraries and binaries behave the same.
15102   pgac_need_repl_snprintf=yes
15103 else
15104   pgac_need_repl_snprintf=no
15105   for ac_func in snprintf
15106 do :
15107   ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
15108 if test "x$ac_cv_func_snprintf" = xyes; then :
15109   cat >>confdefs.h <<_ACEOF
15110 #define HAVE_SNPRINTF 1
15111 _ACEOF
15112
15113 else
15114   pgac_need_repl_snprintf=yes
15115 fi
15116 done
15117
15118   for ac_func in vsnprintf
15119 do :
15120   ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
15121 if test "x$ac_cv_func_vsnprintf" = xyes; then :
15122   cat >>confdefs.h <<_ACEOF
15123 #define HAVE_VSNPRINTF 1
15124 _ACEOF
15125
15126 else
15127   pgac_need_repl_snprintf=yes
15128 fi
15129 done
15130
15131 fi
15132
15133
15134 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
15135 # include/c.h will provide declarations.  Note this is a separate test
15136 # from whether the functions exist in the C library --- there are
15137 # systems that have the functions but don't bother to declare them :-(
15138
15139 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
15140 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
15141   ac_have_decl=1
15142 else
15143   ac_have_decl=0
15144 fi
15145
15146 cat >>confdefs.h <<_ACEOF
15147 #define HAVE_DECL_SNPRINTF $ac_have_decl
15148 _ACEOF
15149 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
15150 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
15151   ac_have_decl=1
15152 else
15153   ac_have_decl=0
15154 fi
15155
15156 cat >>confdefs.h <<_ACEOF
15157 #define HAVE_DECL_VSNPRINTF $ac_have_decl
15158 _ACEOF
15159
15160
15161
15162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf" >&5
15163 $as_echo_n "checking for isinf... " >&6; }
15164 if ${ac_cv_func_isinf+:} false; then :
15165   $as_echo_n "(cached) " >&6
15166 else
15167   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15168 /* end confdefs.h.  */
15169
15170 #include <math.h>
15171 double glob_double;
15172
15173 int
15174 main ()
15175 {
15176 return isinf(glob_double) ? 0 : 1;
15177   ;
15178   return 0;
15179 }
15180 _ACEOF
15181 if ac_fn_c_try_link "$LINENO"; then :
15182   ac_cv_func_isinf=yes
15183 else
15184   ac_cv_func_isinf=no
15185 fi
15186 rm -f core conftest.err conftest.$ac_objext \
15187     conftest$ac_exeext conftest.$ac_ext
15188 fi
15189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_isinf" >&5
15190 $as_echo "$ac_cv_func_isinf" >&6; }
15191
15192 if test $ac_cv_func_isinf = yes ; then
15193
15194 $as_echo "#define HAVE_ISINF 1" >>confdefs.h
15195
15196 else
15197   case " $LIBOBJS " in
15198   *" isinf.$ac_objext "* ) ;;
15199   *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
15200  ;;
15201 esac
15202
15203   # Look for a way to implement a substitute for isinf()
15204   for ac_func in fpclass fp_class fp_class_d class
15205 do :
15206   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15207 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15208 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15209   cat >>confdefs.h <<_ACEOF
15210 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15211 _ACEOF
15212  break
15213 fi
15214 done
15215
15216 fi
15217
15218 ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
15219 if test "x$ac_cv_func_crypt" = xyes; then :
15220   $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
15221
15222 else
15223   case " $LIBOBJS " in
15224   *" crypt.$ac_objext "* ) ;;
15225   *) LIBOBJS="$LIBOBJS crypt.$ac_objext"
15226  ;;
15227 esac
15228
15229 fi
15230
15231 ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
15232 if test "x$ac_cv_func_fls" = xyes; then :
15233   $as_echo "#define HAVE_FLS 1" >>confdefs.h
15234
15235 else
15236   case " $LIBOBJS " in
15237   *" fls.$ac_objext "* ) ;;
15238   *) LIBOBJS="$LIBOBJS fls.$ac_objext"
15239  ;;
15240 esac
15241
15242 fi
15243
15244 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
15245 if test "x$ac_cv_func_getopt" = xyes; then :
15246   $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
15247
15248 else
15249   case " $LIBOBJS " in
15250   *" getopt.$ac_objext "* ) ;;
15251   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15252  ;;
15253 esac
15254
15255 fi
15256
15257 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
15258 if test "x$ac_cv_func_getrusage" = xyes; then :
15259   $as_echo "#define HAVE_GETRUSAGE 1" >>confdefs.h
15260
15261 else
15262   case " $LIBOBJS " in
15263   *" getrusage.$ac_objext "* ) ;;
15264   *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
15265  ;;
15266 esac
15267
15268 fi
15269
15270 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
15271 if test "x$ac_cv_func_inet_aton" = xyes; then :
15272   $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
15273
15274 else
15275   case " $LIBOBJS " in
15276   *" inet_aton.$ac_objext "* ) ;;
15277   *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
15278  ;;
15279 esac
15280
15281 fi
15282
15283 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
15284 if test "x$ac_cv_func_mkdtemp" = xyes; then :
15285   $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
15286
15287 else
15288   case " $LIBOBJS " in
15289   *" mkdtemp.$ac_objext "* ) ;;
15290   *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
15291  ;;
15292 esac
15293
15294 fi
15295
15296 ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
15297 if test "x$ac_cv_func_random" = xyes; then :
15298   $as_echo "#define HAVE_RANDOM 1" >>confdefs.h
15299
15300 else
15301   case " $LIBOBJS " in
15302   *" random.$ac_objext "* ) ;;
15303   *) LIBOBJS="$LIBOBJS random.$ac_objext"
15304  ;;
15305 esac
15306
15307 fi
15308
15309 ac_fn_c_check_func "$LINENO" "rint" "ac_cv_func_rint"
15310 if test "x$ac_cv_func_rint" = xyes; then :
15311   $as_echo "#define HAVE_RINT 1" >>confdefs.h
15312
15313 else
15314   case " $LIBOBJS " in
15315   *" rint.$ac_objext "* ) ;;
15316   *) LIBOBJS="$LIBOBJS rint.$ac_objext"
15317  ;;
15318 esac
15319
15320 fi
15321
15322 ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
15323 if test "x$ac_cv_func_srandom" = xyes; then :
15324   $as_echo "#define HAVE_SRANDOM 1" >>confdefs.h
15325
15326 else
15327   case " $LIBOBJS " in
15328   *" srandom.$ac_objext "* ) ;;
15329   *) LIBOBJS="$LIBOBJS srandom.$ac_objext"
15330  ;;
15331 esac
15332
15333 fi
15334
15335 ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
15336 if test "x$ac_cv_func_strerror" = xyes; then :
15337   $as_echo "#define HAVE_STRERROR 1" >>confdefs.h
15338
15339 else
15340   case " $LIBOBJS " in
15341   *" strerror.$ac_objext "* ) ;;
15342   *) LIBOBJS="$LIBOBJS strerror.$ac_objext"
15343  ;;
15344 esac
15345
15346 fi
15347
15348 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
15349 if test "x$ac_cv_func_strlcat" = xyes; then :
15350   $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
15351
15352 else
15353   case " $LIBOBJS " in
15354   *" strlcat.$ac_objext "* ) ;;
15355   *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
15356  ;;
15357 esac
15358
15359 fi
15360
15361 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
15362 if test "x$ac_cv_func_strlcpy" = xyes; then :
15363   $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
15364
15365 else
15366   case " $LIBOBJS " in
15367   *" strlcpy.$ac_objext "* ) ;;
15368   *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
15369  ;;
15370 esac
15371
15372 fi
15373
15374 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
15375 if test "x$ac_cv_func_strnlen" = xyes; then :
15376   $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
15377
15378 else
15379   case " $LIBOBJS " in
15380   *" strnlen.$ac_objext "* ) ;;
15381   *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
15382  ;;
15383 esac
15384
15385 fi
15386
15387
15388
15389 case $host_os in
15390
15391         # Windows uses a specialised env handler
15392         # and doesn't need a replacement getpeereid because it doesn't use
15393         # Unix sockets.
15394         mingw*)
15395
15396 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
15397
15398
15399 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
15400
15401                 ac_cv_func_unsetenv=yes
15402                 ac_cv_func_getpeereid=yes;;
15403         *)
15404                 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
15405 if test "x$ac_cv_func_unsetenv" = xyes; then :
15406   $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
15407
15408 else
15409   case " $LIBOBJS " in
15410   *" unsetenv.$ac_objext "* ) ;;
15411   *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext"
15412  ;;
15413 esac
15414
15415 fi
15416
15417 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
15418 if test "x$ac_cv_func_getpeereid" = xyes; then :
15419   $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
15420
15421 else
15422   case " $LIBOBJS " in
15423   *" getpeereid.$ac_objext "* ) ;;
15424   *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
15425  ;;
15426 esac
15427
15428 fi
15429
15430
15431                 ;;
15432 esac
15433
15434 # System's version of getaddrinfo(), if any, may be used only if we found
15435 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
15436 # We use only our own getaddrinfo.c on Windows, but it's time to revisit that.
15437 if test x"$ac_cv_type_struct_addrinfo" = xyes && \
15438    test "$PORTNAME" != "win32"; then
15439   ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
15440 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
15441   $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
15442
15443 else
15444   case " $LIBOBJS " in
15445   *" getaddrinfo.$ac_objext "* ) ;;
15446   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
15447  ;;
15448 esac
15449
15450 fi
15451
15452
15453 else
15454   case " $LIBOBJS " in
15455   *" getaddrinfo.$ac_objext "* ) ;;
15456   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
15457  ;;
15458 esac
15459
15460 fi
15461
15462 # Similarly, use system's getopt_long() only if system provides struct option.
15463 if test x"$ac_cv_type_struct_option" = xyes ; then
15464   ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
15465 if test "x$ac_cv_func_getopt_long" = xyes; then :
15466   $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
15467
15468 else
15469   case " $LIBOBJS " in
15470   *" getopt_long.$ac_objext "* ) ;;
15471   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15472  ;;
15473 esac
15474
15475 fi
15476
15477
15478 else
15479   case " $LIBOBJS " in
15480   *" getopt_long.$ac_objext "* ) ;;
15481   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15482  ;;
15483 esac
15484
15485 fi
15486
15487 # Solaris' getopt() doesn't do what we want for long options, so always use
15488 # our version on that platform.
15489 if test "$PORTNAME" = "solaris"; then
15490   case " $LIBOBJS " in
15491   *" getopt.$ac_objext "* ) ;;
15492   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15493  ;;
15494 esac
15495
15496 fi
15497
15498 # mingw has adopted a GNU-centric interpretation of optind/optreset,
15499 # so always use our version on Windows.
15500 if test "$PORTNAME" = "win32"; then
15501   case " $LIBOBJS " in
15502   *" getopt.$ac_objext "* ) ;;
15503   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15504  ;;
15505 esac
15506
15507   case " $LIBOBJS " in
15508   *" getopt_long.$ac_objext "* ) ;;
15509   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15510  ;;
15511 esac
15512
15513 fi
15514
15515 # Win32 (really MinGW) support
15516 if test "$PORTNAME" = "win32"; then
15517   ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
15518 if test "x$ac_cv_func_gettimeofday" = xyes; then :
15519   $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
15520
15521 else
15522   case " $LIBOBJS " in
15523   *" gettimeofday.$ac_objext "* ) ;;
15524   *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
15525  ;;
15526 esac
15527
15528 fi
15529
15530
15531   case " $LIBOBJS " in
15532   *" dirmod.$ac_objext "* ) ;;
15533   *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
15534  ;;
15535 esac
15536
15537   case " $LIBOBJS " in
15538   *" kill.$ac_objext "* ) ;;
15539   *) LIBOBJS="$LIBOBJS kill.$ac_objext"
15540  ;;
15541 esac
15542
15543   case " $LIBOBJS " in
15544   *" open.$ac_objext "* ) ;;
15545   *) LIBOBJS="$LIBOBJS open.$ac_objext"
15546  ;;
15547 esac
15548
15549   case " $LIBOBJS " in
15550   *" system.$ac_objext "* ) ;;
15551   *) LIBOBJS="$LIBOBJS system.$ac_objext"
15552  ;;
15553 esac
15554
15555   case " $LIBOBJS " in
15556   *" win32env.$ac_objext "* ) ;;
15557   *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
15558  ;;
15559 esac
15560
15561   case " $LIBOBJS " in
15562   *" win32error.$ac_objext "* ) ;;
15563   *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
15564  ;;
15565 esac
15566
15567   case " $LIBOBJS " in
15568   *" win32security.$ac_objext "* ) ;;
15569   *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
15570  ;;
15571 esac
15572
15573   case " $LIBOBJS " in
15574   *" win32setlocale.$ac_objext "* ) ;;
15575   *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
15576  ;;
15577 esac
15578
15579
15580 $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
15581
15582   ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
15583 #define WIN32_LEAN_AND_MEAN
15584 #include <windows.h>
15585 #include <string.h>
15586 #include <dbghelp.h>
15587 "
15588 if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
15589
15590 cat >>confdefs.h <<_ACEOF
15591 #define HAVE_MINIDUMP_TYPE 1
15592 _ACEOF
15593
15594 pgac_minidump_type=yes
15595 else
15596   pgac_minidump_type=no
15597 fi
15598
15599 fi
15600 if test x"$pgac_minidump_type" = x"yes" ; then
15601   have_win32_dbghelp=yes
15602
15603 else
15604   have_win32_dbghelp=no
15605
15606 fi
15607
15608 # Cygwin needs only a bit of that
15609 if test "$PORTNAME" = "cygwin"; then
15610   case " $LIBOBJS " in
15611   *" dirmod.$ac_objext "* ) ;;
15612   *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
15613  ;;
15614 esac
15615
15616 fi
15617
15618 ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
15619 /* NetBSD declares sys_siglist in unistd.h.  */
15620 #ifdef HAVE_UNISTD_H
15621 # include <unistd.h>
15622 #endif
15623
15624 "
15625 if test "x$ac_cv_have_decl_sys_siglist" = xyes; then :
15626   ac_have_decl=1
15627 else
15628   ac_have_decl=0
15629 fi
15630
15631 cat >>confdefs.h <<_ACEOF
15632 #define HAVE_DECL_SYS_SIGLIST $ac_have_decl
15633 _ACEOF
15634
15635
15636 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
15637 if test "x$ac_cv_func_syslog" = xyes; then :
15638   ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
15639 if test "x$ac_cv_header_syslog_h" = xyes; then :
15640
15641 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
15642
15643 fi
15644
15645
15646 fi
15647
15648
15649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
15650 $as_echo_n "checking for opterr... " >&6; }
15651 if ${pgac_cv_var_int_opterr+:} false; then :
15652   $as_echo_n "(cached) " >&6
15653 else
15654   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15655 /* end confdefs.h.  */
15656 #include <unistd.h>
15657 int
15658 main ()
15659 {
15660 extern int opterr; opterr = 1;
15661   ;
15662   return 0;
15663 }
15664 _ACEOF
15665 if ac_fn_c_try_link "$LINENO"; then :
15666   pgac_cv_var_int_opterr=yes
15667 else
15668   pgac_cv_var_int_opterr=no
15669 fi
15670 rm -f core conftest.err conftest.$ac_objext \
15671     conftest$ac_exeext conftest.$ac_ext
15672 fi
15673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
15674 $as_echo "$pgac_cv_var_int_opterr" >&6; }
15675 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
15676
15677 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
15678
15679 fi
15680
15681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
15682 $as_echo_n "checking for optreset... " >&6; }
15683 if ${pgac_cv_var_int_optreset+:} false; then :
15684   $as_echo_n "(cached) " >&6
15685 else
15686   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15687 /* end confdefs.h.  */
15688 #include <unistd.h>
15689 int
15690 main ()
15691 {
15692 extern int optreset; optreset = 1;
15693   ;
15694   return 0;
15695 }
15696 _ACEOF
15697 if ac_fn_c_try_link "$LINENO"; then :
15698   pgac_cv_var_int_optreset=yes
15699 else
15700   pgac_cv_var_int_optreset=no
15701 fi
15702 rm -f core conftest.err conftest.$ac_objext \
15703     conftest$ac_exeext conftest.$ac_ext
15704 fi
15705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
15706 $as_echo "$pgac_cv_var_int_optreset" >&6; }
15707 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
15708
15709 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
15710
15711 fi
15712
15713 for ac_func in strtoll __strtoll strtoq
15714 do :
15715   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15716 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15717 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15718   cat >>confdefs.h <<_ACEOF
15719 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15720 _ACEOF
15721  break
15722 fi
15723 done
15724
15725 for ac_func in strtoull __strtoull strtouq
15726 do :
15727   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15728 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15729 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15730   cat >>confdefs.h <<_ACEOF
15731 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15732 _ACEOF
15733  break
15734 fi
15735 done
15736
15737 # strto[u]ll may exist but not be declared
15738 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
15739 if test "x$ac_cv_have_decl_strtoll" = xyes; then :
15740   ac_have_decl=1
15741 else
15742   ac_have_decl=0
15743 fi
15744
15745 cat >>confdefs.h <<_ACEOF
15746 #define HAVE_DECL_STRTOLL $ac_have_decl
15747 _ACEOF
15748 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
15749 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
15750   ac_have_decl=1
15751 else
15752   ac_have_decl=0
15753 fi
15754
15755 cat >>confdefs.h <<_ACEOF
15756 #define HAVE_DECL_STRTOULL $ac_have_decl
15757 _ACEOF
15758
15759
15760 if test "$with_icu" = yes; then
15761   ac_save_CPPFLAGS=$CPPFLAGS
15762   CPPFLAGS="$ICU_CFLAGS $CPPFLAGS"
15763
15764   # Verify we have ICU's header files
15765   ac_fn_c_check_header_mongrel "$LINENO" "unicode/ucol.h" "ac_cv_header_unicode_ucol_h" "$ac_includes_default"
15766 if test "x$ac_cv_header_unicode_ucol_h" = xyes; then :
15767
15768 else
15769   as_fn_error $? "header file <unicode/ucol.h> is required for ICU" "$LINENO" 5
15770 fi
15771
15772
15773
15774   CPPFLAGS=$ac_save_CPPFLAGS
15775 fi
15776
15777 # Lastly, restore full LIBS list and check for readline/libedit symbols
15778 LIBS="$LIBS_including_readline"
15779
15780 if test "$with_readline" = yes; then
15781   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_append_character" >&5
15782 $as_echo_n "checking for rl_completion_append_character... " >&6; }
15783 if ${pgac_cv_var_rl_completion_append_character+:} false; then :
15784   $as_echo_n "(cached) " >&6
15785 else
15786   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15787 /* end confdefs.h.  */
15788 #include <stdio.h>
15789 #ifdef HAVE_READLINE_READLINE_H
15790 # include <readline/readline.h>
15791 #elif defined(HAVE_READLINE_H)
15792 # include <readline.h>
15793 #endif
15794
15795 int
15796 main ()
15797 {
15798 rl_completion_append_character = 'x';
15799   ;
15800   return 0;
15801 }
15802 _ACEOF
15803 if ac_fn_c_try_link "$LINENO"; then :
15804   pgac_cv_var_rl_completion_append_character=yes
15805 else
15806   pgac_cv_var_rl_completion_append_character=no
15807 fi
15808 rm -f core conftest.err conftest.$ac_objext \
15809     conftest$ac_exeext conftest.$ac_ext
15810 fi
15811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_append_character" >&5
15812 $as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
15813 if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
15814
15815 $as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
15816
15817 fi
15818   for ac_func in rl_completion_matches rl_filename_completion_function rl_reset_screen_size
15819 do :
15820   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15821 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15822 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15823   cat >>confdefs.h <<_ACEOF
15824 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15825 _ACEOF
15826
15827 fi
15828 done
15829
15830   for ac_func in append_history history_truncate_file
15831 do :
15832   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15833 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15834 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15835   cat >>confdefs.h <<_ACEOF
15836 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15837 _ACEOF
15838
15839 fi
15840 done
15841
15842 fi
15843
15844
15845 # This test makes sure that run tests work at all.  Sometimes a shared
15846 # library is found by the linker, but the runtime linker can't find it.
15847 # This check should come after all modifications of compiler or linker
15848 # variables, and before any other run tests.
15849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
15850 $as_echo_n "checking test program... " >&6; }
15851 if test "$cross_compiling" = yes; then :
15852   { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
15853 $as_echo "cross-compiling" >&6; }
15854 else
15855   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15856 /* end confdefs.h.  */
15857 int main() { return 0; }
15858 _ACEOF
15859 if ac_fn_c_try_run "$LINENO"; then :
15860   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15861 $as_echo "ok" >&6; }
15862 else
15863   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
15864 $as_echo "failed" >&6; }
15865 as_fn_error $? "
15866 Could not execute a simple test program.  This may be a problem
15867 related to locating shared libraries.  Check the file 'config.log'
15868 for the exact reason." "$LINENO" 5
15869 fi
15870 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15871   conftest.$ac_objext conftest.beam conftest.$ac_ext
15872 fi
15873
15874
15875 # --------------------
15876 # Run tests below here
15877 # --------------------
15878
15879 # Force use of our snprintf if system's doesn't do arg control
15880 # See comment above at snprintf test for details.
15881 if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
15882   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports argument control" >&5
15883 $as_echo_n "checking whether snprintf supports argument control... " >&6; }
15884 if ${pgac_cv_snprintf_arg_control+:} false; then :
15885   $as_echo_n "(cached) " >&6
15886 else
15887   if test "$cross_compiling" = yes; then :
15888   pgac_cv_snprintf_arg_control=cross
15889 else
15890   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15891 /* end confdefs.h.  */
15892 #include <stdio.h>
15893 #include <string.h>
15894
15895 int main()
15896 {
15897   char buf[100];
15898
15899   /* can it swap arguments? */
15900   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
15901   if (strcmp(buf, "4 3") != 0)
15902     return 1;
15903   return 0;
15904 }
15905 _ACEOF
15906 if ac_fn_c_try_run "$LINENO"; then :
15907   pgac_cv_snprintf_arg_control=yes
15908 else
15909   pgac_cv_snprintf_arg_control=no
15910 fi
15911 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15912   conftest.$ac_objext conftest.beam conftest.$ac_ext
15913 fi
15914
15915
15916 fi
15917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_arg_control" >&5
15918 $as_echo "$pgac_cv_snprintf_arg_control" >&6; }
15919
15920   if test $pgac_cv_snprintf_arg_control != yes ; then
15921     pgac_need_repl_snprintf=yes
15922   fi
15923 fi
15924
15925
15926
15927
15928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
15929 $as_echo_n "checking whether long int is 64 bits... " >&6; }
15930 if ${pgac_cv_type_long_int_64+:} false; then :
15931   $as_echo_n "(cached) " >&6
15932 else
15933   if test "$cross_compiling" = yes; then :
15934   # If cross-compiling, check the size reported by the compiler and
15935 # trust that the arithmetic works.
15936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15937 /* end confdefs.h.  */
15938
15939 int
15940 main ()
15941 {
15942 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
15943 test_array [0] = 0;
15944 return test_array [0];
15945
15946   ;
15947   return 0;
15948 }
15949 _ACEOF
15950 if ac_fn_c_try_compile "$LINENO"; then :
15951   pgac_cv_type_long_int_64=yes
15952 else
15953   pgac_cv_type_long_int_64=no
15954 fi
15955 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15956 else
15957   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15958 /* end confdefs.h.  */
15959 typedef long int ac_int64;
15960
15961 /*
15962  * These are globals to discourage the compiler from folding all the
15963  * arithmetic tests down to compile-time constants.
15964  */
15965 ac_int64 a = 20000001;
15966 ac_int64 b = 40000005;
15967
15968 int does_int64_work()
15969 {
15970   ac_int64 c,d;
15971
15972   if (sizeof(ac_int64) != 8)
15973     return 0;                   /* definitely not the right size */
15974
15975   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
15976   c = a * b;
15977   d = (c + b) / b;
15978   if (d != a+1)
15979     return 0;
15980   return 1;
15981 }
15982
15983 int
15984 main() {
15985   return (! does_int64_work());
15986 }
15987 _ACEOF
15988 if ac_fn_c_try_run "$LINENO"; then :
15989   pgac_cv_type_long_int_64=yes
15990 else
15991   pgac_cv_type_long_int_64=no
15992 fi
15993 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15994   conftest.$ac_objext conftest.beam conftest.$ac_ext
15995 fi
15996
15997 fi
15998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
15999 $as_echo "$pgac_cv_type_long_int_64" >&6; }
16000
16001 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
16002 if test x"$pgac_cv_type_long_int_64" = xyes ; then
16003
16004 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
16005
16006 fi
16007
16008
16009 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
16010   pg_int64_type="long int"
16011 else
16012   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
16013 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
16014 if ${pgac_cv_type_long_long_int_64+:} false; then :
16015   $as_echo_n "(cached) " >&6
16016 else
16017   if test "$cross_compiling" = yes; then :
16018   # If cross-compiling, check the size reported by the compiler and
16019 # trust that the arithmetic works.
16020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16021 /* end confdefs.h.  */
16022
16023 int
16024 main ()
16025 {
16026 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
16027 test_array [0] = 0;
16028 return test_array [0];
16029
16030   ;
16031   return 0;
16032 }
16033 _ACEOF
16034 if ac_fn_c_try_compile "$LINENO"; then :
16035   pgac_cv_type_long_long_int_64=yes
16036 else
16037   pgac_cv_type_long_long_int_64=no
16038 fi
16039 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16040 else
16041   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16042 /* end confdefs.h.  */
16043 typedef long long int ac_int64;
16044
16045 /*
16046  * These are globals to discourage the compiler from folding all the
16047  * arithmetic tests down to compile-time constants.
16048  */
16049 ac_int64 a = 20000001;
16050 ac_int64 b = 40000005;
16051
16052 int does_int64_work()
16053 {
16054   ac_int64 c,d;
16055
16056   if (sizeof(ac_int64) != 8)
16057     return 0;                   /* definitely not the right size */
16058
16059   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16060   c = a * b;
16061   d = (c + b) / b;
16062   if (d != a+1)
16063     return 0;
16064   return 1;
16065 }
16066
16067 int
16068 main() {
16069   return (! does_int64_work());
16070 }
16071 _ACEOF
16072 if ac_fn_c_try_run "$LINENO"; then :
16073   pgac_cv_type_long_long_int_64=yes
16074 else
16075   pgac_cv_type_long_long_int_64=no
16076 fi
16077 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16078   conftest.$ac_objext conftest.beam conftest.$ac_ext
16079 fi
16080
16081 fi
16082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
16083 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
16084
16085 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
16086 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
16087
16088 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
16089
16090 fi
16091
16092   if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
16093     pg_int64_type="long long int"
16094   else
16095     as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
16096   fi
16097 fi
16098
16099
16100 cat >>confdefs.h <<_ACEOF
16101 #define PG_INT64_TYPE $pg_int64_type
16102 _ACEOF
16103
16104
16105 # If we found "long int" is 64 bits, assume snprintf handles it.  If
16106 # we found we need to use "long long int", better check.  We cope with
16107 # snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
16108 # work, fall back to our own snprintf emulation (which we know uses %lld).
16109
16110 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
16111   if test $pgac_need_repl_snprintf = no; then
16112     { $as_echo "$as_me:${as_lineno-$LINENO}: checking snprintf length modifier for long long int" >&5
16113 $as_echo_n "checking snprintf length modifier for long long int... " >&6; }
16114 if ${pgac_cv_snprintf_long_long_int_modifier+:} false; then :
16115   $as_echo_n "(cached) " >&6
16116 else
16117   for pgac_modifier in 'll' 'q' 'I64'; do
16118 if test "$cross_compiling" = yes; then :
16119   pgac_cv_snprintf_long_long_int_modifier=cross; break
16120 else
16121   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16122 /* end confdefs.h.  */
16123 #include <stdio.h>
16124 #include <string.h>
16125 typedef long long int ac_int64;
16126 #define INT64_FORMAT "%${pgac_modifier}d"
16127
16128 ac_int64 a = 20000001;
16129 ac_int64 b = 40000005;
16130
16131 int does_int64_snprintf_work()
16132 {
16133   ac_int64 c;
16134   char buf[100];
16135
16136   if (sizeof(ac_int64) != 8)
16137     return 0;                   /* doesn't look like the right size */
16138
16139   c = a * b;
16140   snprintf(buf, 100, INT64_FORMAT, c);
16141   if (strcmp(buf, "800000140000005") != 0)
16142     return 0;                   /* either multiply or snprintf is busted */
16143   return 1;
16144 }
16145
16146 int
16147 main() {
16148   return (! does_int64_snprintf_work());
16149 }
16150 _ACEOF
16151 if ac_fn_c_try_run "$LINENO"; then :
16152   pgac_cv_snprintf_long_long_int_modifier=$pgac_modifier; break
16153 fi
16154 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16155   conftest.$ac_objext conftest.beam conftest.$ac_ext
16156 fi
16157
16158 done
16159 fi
16160
16161 LONG_LONG_INT_MODIFIER=''
16162
16163 case $pgac_cv_snprintf_long_long_int_modifier in
16164   cross) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot test (not on host machine)" >&5
16165 $as_echo "cannot test (not on host machine)" >&6; };;
16166   ?*)    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_long_long_int_modifier" >&5
16167 $as_echo "$pgac_cv_snprintf_long_long_int_modifier" >&6; }
16168          LONG_LONG_INT_MODIFIER=$pgac_cv_snprintf_long_long_int_modifier;;
16169   *)     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
16170 $as_echo "none" >&6; };;
16171 esac
16172     if test "$LONG_LONG_INT_MODIFIER" = ""; then
16173       # Force usage of our own snprintf, since system snprintf is broken
16174       pgac_need_repl_snprintf=yes
16175       LONG_LONG_INT_MODIFIER='ll'
16176     fi
16177   else
16178     # Here if we previously decided we needed to use our own snprintf
16179     LONG_LONG_INT_MODIFIER='ll'
16180   fi
16181 else
16182   # Here if we are not using 'long long int' at all
16183   LONG_LONG_INT_MODIFIER='l'
16184 fi
16185
16186 INT64_MODIFIER="\"$LONG_LONG_INT_MODIFIER\""
16187
16188
16189 cat >>confdefs.h <<_ACEOF
16190 #define INT64_MODIFIER $INT64_MODIFIER
16191 _ACEOF
16192
16193
16194 # Also force use of our snprintf if the system's doesn't support the %z flag.
16195 if test "$pgac_need_repl_snprintf" = no; then
16196   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports the %z modifier" >&5
16197 $as_echo_n "checking whether snprintf supports the %z modifier... " >&6; }
16198 if ${pgac_cv_snprintf_size_t_support+:} false; then :
16199   $as_echo_n "(cached) " >&6
16200 else
16201   if test "$cross_compiling" = yes; then :
16202   pgac_cv_snprintf_size_t_support=cross
16203 else
16204   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16205 /* end confdefs.h.  */
16206 #include <stdio.h>
16207 #include <string.h>
16208
16209 int main()
16210 {
16211   char bufz[100];
16212   char buf64[100];
16213
16214   /*
16215    * Print the largest unsigned number fitting in a size_t using both %zu
16216    * and the previously-determined format for 64-bit integers.  Note that
16217    * we don't run this code unless we know snprintf handles 64-bit ints.
16218    */
16219   bufz[0] = '\0';  /* in case snprintf fails to emit anything */
16220   snprintf(bufz, sizeof(bufz), "%zu", ~((size_t) 0));
16221   snprintf(buf64, sizeof(buf64), "%" INT64_MODIFIER "u",
16222     (unsigned PG_INT64_TYPE) ~((size_t) 0));
16223   if (strcmp(bufz, buf64) != 0)
16224     return 1;
16225   return 0;
16226 }
16227 _ACEOF
16228 if ac_fn_c_try_run "$LINENO"; then :
16229   pgac_cv_snprintf_size_t_support=yes
16230 else
16231   pgac_cv_snprintf_size_t_support=no
16232 fi
16233 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16234   conftest.$ac_objext conftest.beam conftest.$ac_ext
16235 fi
16236
16237
16238 fi
16239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_size_t_support" >&5
16240 $as_echo "$pgac_cv_snprintf_size_t_support" >&6; }
16241
16242   if test "$pgac_cv_snprintf_size_t_support" != yes; then
16243     pgac_need_repl_snprintf=yes
16244   fi
16245 fi
16246
16247 # Now we have checked all the reasons to replace snprintf
16248 if test $pgac_need_repl_snprintf = yes; then
16249
16250 $as_echo "#define USE_REPL_SNPRINTF 1" >>confdefs.h
16251
16252   case " $LIBOBJS " in
16253   *" snprintf.$ac_objext "* ) ;;
16254   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
16255  ;;
16256 esac
16257
16258 fi
16259
16260 # has to be down here, rather than with the other builtins, because
16261 # the test uses PG_INT64_TYPE.
16262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_mul_overflow" >&5
16263 $as_echo_n "checking for __builtin_mul_overflow... " >&6; }
16264 if ${pgac_cv__builtin_op_overflow+:} false; then :
16265   $as_echo_n "(cached) " >&6
16266 else
16267   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16268 /* end confdefs.h.  */
16269
16270 PG_INT64_TYPE a = 1;
16271 PG_INT64_TYPE b = 1;
16272 PG_INT64_TYPE result;
16273 int oflo;
16274
16275 int
16276 main ()
16277 {
16278 oflo = __builtin_mul_overflow(a, b, &result);
16279   ;
16280   return 0;
16281 }
16282 _ACEOF
16283 if ac_fn_c_try_link "$LINENO"; then :
16284   pgac_cv__builtin_op_overflow=yes
16285 else
16286   pgac_cv__builtin_op_overflow=no
16287 fi
16288 rm -f core conftest.err conftest.$ac_objext \
16289     conftest$ac_exeext conftest.$ac_ext
16290 fi
16291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_op_overflow" >&5
16292 $as_echo "$pgac_cv__builtin_op_overflow" >&6; }
16293 if test x"$pgac_cv__builtin_op_overflow" = xyes ; then
16294
16295 $as_echo "#define HAVE__BUILTIN_OP_OVERFLOW 1" >>confdefs.h
16296
16297 fi
16298
16299 # Check size of void *, size_t (enables tweaks for > 32bit address space)
16300 # The cast to long int works around a bug in the HP C Compiler
16301 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16302 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16303 # This bug is HP SR number 8606223364.
16304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
16305 $as_echo_n "checking size of void *... " >&6; }
16306 if ${ac_cv_sizeof_void_p+:} false; then :
16307   $as_echo_n "(cached) " >&6
16308 else
16309   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
16310
16311 else
16312   if test "$ac_cv_type_void_p" = yes; then
16313      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16314 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16315 as_fn_error 77 "cannot compute sizeof (void *)
16316 See \`config.log' for more details" "$LINENO" 5; }
16317    else
16318      ac_cv_sizeof_void_p=0
16319    fi
16320 fi
16321
16322 fi
16323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
16324 $as_echo "$ac_cv_sizeof_void_p" >&6; }
16325
16326
16327
16328 cat >>confdefs.h <<_ACEOF
16329 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
16330 _ACEOF
16331
16332
16333 # The cast to long int works around a bug in the HP C Compiler
16334 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16335 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16336 # This bug is HP SR number 8606223364.
16337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
16338 $as_echo_n "checking size of size_t... " >&6; }
16339 if ${ac_cv_sizeof_size_t+:} false; then :
16340   $as_echo_n "(cached) " >&6
16341 else
16342   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
16343
16344 else
16345   if test "$ac_cv_type_size_t" = yes; then
16346      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16347 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16348 as_fn_error 77 "cannot compute sizeof (size_t)
16349 See \`config.log' for more details" "$LINENO" 5; }
16350    else
16351      ac_cv_sizeof_size_t=0
16352    fi
16353 fi
16354
16355 fi
16356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
16357 $as_echo "$ac_cv_sizeof_size_t" >&6; }
16358
16359
16360
16361 cat >>confdefs.h <<_ACEOF
16362 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
16363 _ACEOF
16364
16365
16366 # The cast to long int works around a bug in the HP C Compiler
16367 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16368 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16369 # This bug is HP SR number 8606223364.
16370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
16371 $as_echo_n "checking size of long... " >&6; }
16372 if ${ac_cv_sizeof_long+:} false; then :
16373   $as_echo_n "(cached) " >&6
16374 else
16375   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
16376
16377 else
16378   if test "$ac_cv_type_long" = yes; then
16379      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16380 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16381 as_fn_error 77 "cannot compute sizeof (long)
16382 See \`config.log' for more details" "$LINENO" 5; }
16383    else
16384      ac_cv_sizeof_long=0
16385    fi
16386 fi
16387
16388 fi
16389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
16390 $as_echo "$ac_cv_sizeof_long" >&6; }
16391
16392
16393
16394 cat >>confdefs.h <<_ACEOF
16395 #define SIZEOF_LONG $ac_cv_sizeof_long
16396 _ACEOF
16397
16398
16399
16400 # Decide whether float4 is passed by value: user-selectable, enabled by default
16401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float4 passed by value" >&5
16402 $as_echo_n "checking whether to build with float4 passed by value... " >&6; }
16403
16404
16405 # Check whether --enable-float4-byval was given.
16406 if test "${enable_float4_byval+set}" = set; then :
16407   enableval=$enable_float4_byval;
16408   case $enableval in
16409     yes)
16410
16411 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
16412
16413                float4passbyval=true
16414       ;;
16415     no)
16416       float4passbyval=false
16417       ;;
16418     *)
16419       as_fn_error $? "no argument expected for --enable-float4-byval option" "$LINENO" 5
16420       ;;
16421   esac
16422
16423 else
16424   enable_float4_byval=yes
16425
16426 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
16427
16428                float4passbyval=true
16429 fi
16430
16431
16432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float4_byval" >&5
16433 $as_echo "$enable_float4_byval" >&6; }
16434
16435 cat >>confdefs.h <<_ACEOF
16436 #define FLOAT4PASSBYVAL $float4passbyval
16437 _ACEOF
16438
16439
16440 # Decide whether float8 is passed by value.
16441 # Note: this setting also controls int8 and related types such as timestamp.
16442 # If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
16443 # If not, trying to select it is an error.
16444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float8 passed by value" >&5
16445 $as_echo_n "checking whether to build with float8 passed by value... " >&6; }
16446 if test $ac_cv_sizeof_void_p -ge 8 ; then
16447
16448
16449 # Check whether --enable-float8-byval was given.
16450 if test "${enable_float8_byval+set}" = set; then :
16451   enableval=$enable_float8_byval;
16452   case $enableval in
16453     yes)
16454       :
16455       ;;
16456     no)
16457       :
16458       ;;
16459     *)
16460       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
16461       ;;
16462   esac
16463
16464 else
16465   enable_float8_byval=yes
16466
16467 fi
16468
16469
16470 else
16471
16472
16473 # Check whether --enable-float8-byval was given.
16474 if test "${enable_float8_byval+set}" = set; then :
16475   enableval=$enable_float8_byval;
16476   case $enableval in
16477     yes)
16478       :
16479       ;;
16480     no)
16481       :
16482       ;;
16483     *)
16484       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
16485       ;;
16486   esac
16487
16488 else
16489   enable_float8_byval=no
16490
16491 fi
16492
16493
16494   if test "$enable_float8_byval" = yes ; then
16495     as_fn_error $? "--enable-float8-byval is not supported on 32-bit platforms." "$LINENO" 5
16496   fi
16497 fi
16498 if test "$enable_float8_byval" = yes ; then
16499
16500 $as_echo "#define USE_FLOAT8_BYVAL 1" >>confdefs.h
16501
16502   float8passbyval=true
16503 else
16504   float8passbyval=false
16505 fi
16506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float8_byval" >&5
16507 $as_echo "$enable_float8_byval" >&6; }
16508
16509 cat >>confdefs.h <<_ACEOF
16510 #define FLOAT8PASSBYVAL $float8passbyval
16511 _ACEOF
16512
16513
16514 # Determine memory alignment requirements for the basic C data types.
16515
16516 # The cast to long int works around a bug in the HP C Compiler,
16517 # see AC_CHECK_SIZEOF for more information.
16518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
16519 $as_echo_n "checking alignment of short... " >&6; }
16520 if ${ac_cv_alignof_short+:} false; then :
16521   $as_echo_n "(cached) " >&6
16522 else
16523   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short"        "$ac_includes_default
16524 #ifndef offsetof
16525 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16526 #endif
16527 typedef struct { char x; short y; } ac__type_alignof_;"; then :
16528
16529 else
16530   if test "$ac_cv_type_short" = yes; then
16531      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16532 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16533 as_fn_error 77 "cannot compute alignment of short
16534 See \`config.log' for more details" "$LINENO" 5; }
16535    else
16536      ac_cv_alignof_short=0
16537    fi
16538 fi
16539
16540 fi
16541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
16542 $as_echo "$ac_cv_alignof_short" >&6; }
16543
16544
16545
16546 cat >>confdefs.h <<_ACEOF
16547 #define ALIGNOF_SHORT $ac_cv_alignof_short
16548 _ACEOF
16549
16550
16551 # The cast to long int works around a bug in the HP C Compiler,
16552 # see AC_CHECK_SIZEOF for more information.
16553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
16554 $as_echo_n "checking alignment of int... " >&6; }
16555 if ${ac_cv_alignof_int+:} false; then :
16556   $as_echo_n "(cached) " >&6
16557 else
16558   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int"        "$ac_includes_default
16559 #ifndef offsetof
16560 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16561 #endif
16562 typedef struct { char x; int y; } ac__type_alignof_;"; then :
16563
16564 else
16565   if test "$ac_cv_type_int" = yes; then
16566      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16567 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16568 as_fn_error 77 "cannot compute alignment of int
16569 See \`config.log' for more details" "$LINENO" 5; }
16570    else
16571      ac_cv_alignof_int=0
16572    fi
16573 fi
16574
16575 fi
16576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
16577 $as_echo "$ac_cv_alignof_int" >&6; }
16578
16579
16580
16581 cat >>confdefs.h <<_ACEOF
16582 #define ALIGNOF_INT $ac_cv_alignof_int
16583 _ACEOF
16584
16585
16586 # The cast to long int works around a bug in the HP C Compiler,
16587 # see AC_CHECK_SIZEOF for more information.
16588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
16589 $as_echo_n "checking alignment of long... " >&6; }
16590 if ${ac_cv_alignof_long+:} false; then :
16591   $as_echo_n "(cached) " >&6
16592 else
16593   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long"        "$ac_includes_default
16594 #ifndef offsetof
16595 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16596 #endif
16597 typedef struct { char x; long y; } ac__type_alignof_;"; then :
16598
16599 else
16600   if test "$ac_cv_type_long" = yes; then
16601      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16602 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16603 as_fn_error 77 "cannot compute alignment of long
16604 See \`config.log' for more details" "$LINENO" 5; }
16605    else
16606      ac_cv_alignof_long=0
16607    fi
16608 fi
16609
16610 fi
16611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
16612 $as_echo "$ac_cv_alignof_long" >&6; }
16613
16614
16615
16616 cat >>confdefs.h <<_ACEOF
16617 #define ALIGNOF_LONG $ac_cv_alignof_long
16618 _ACEOF
16619
16620
16621 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
16622   # The cast to long int works around a bug in the HP C Compiler,
16623 # see AC_CHECK_SIZEOF for more information.
16624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
16625 $as_echo_n "checking alignment of long long int... " >&6; }
16626 if ${ac_cv_alignof_long_long_int+:} false; then :
16627   $as_echo_n "(cached) " >&6
16628 else
16629   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int"        "$ac_includes_default
16630 #ifndef offsetof
16631 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16632 #endif
16633 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
16634
16635 else
16636   if test "$ac_cv_type_long_long_int" = yes; then
16637      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16638 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16639 as_fn_error 77 "cannot compute alignment of long long int
16640 See \`config.log' for more details" "$LINENO" 5; }
16641    else
16642      ac_cv_alignof_long_long_int=0
16643    fi
16644 fi
16645
16646 fi
16647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
16648 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
16649
16650
16651
16652 cat >>confdefs.h <<_ACEOF
16653 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
16654 _ACEOF
16655
16656
16657 fi
16658 # The cast to long int works around a bug in the HP C Compiler,
16659 # see AC_CHECK_SIZEOF for more information.
16660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
16661 $as_echo_n "checking alignment of double... " >&6; }
16662 if ${ac_cv_alignof_double+:} false; then :
16663   $as_echo_n "(cached) " >&6
16664 else
16665   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double"        "$ac_includes_default
16666 #ifndef offsetof
16667 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16668 #endif
16669 typedef struct { char x; double y; } ac__type_alignof_;"; then :
16670
16671 else
16672   if test "$ac_cv_type_double" = yes; then
16673      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16674 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16675 as_fn_error 77 "cannot compute alignment of double
16676 See \`config.log' for more details" "$LINENO" 5; }
16677    else
16678      ac_cv_alignof_double=0
16679    fi
16680 fi
16681
16682 fi
16683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
16684 $as_echo "$ac_cv_alignof_double" >&6; }
16685
16686
16687
16688 cat >>confdefs.h <<_ACEOF
16689 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
16690 _ACEOF
16691
16692
16693
16694 # Compute maximum alignment of any basic type.
16695 # We assume long's alignment is at least as strong as char, short, or int;
16696 # but we must check long long (if it is being used for int64) and double.
16697 # Note that we intentionally do not consider any types wider than 64 bits,
16698 # as allowing MAXIMUM_ALIGNOF to exceed 8 would be too much of a penalty
16699 # for disk and memory space.
16700
16701 MAX_ALIGNOF=$ac_cv_alignof_long
16702 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
16703   MAX_ALIGNOF=$ac_cv_alignof_double
16704 fi
16705 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
16706   MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
16707 fi
16708
16709 cat >>confdefs.h <<_ACEOF
16710 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
16711 _ACEOF
16712
16713
16714
16715 # Some platforms predefine the types int8, int16, etc.  Only check
16716 # a (hopefully) representative subset.
16717 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
16718 "
16719 if test "x$ac_cv_type_int8" = xyes; then :
16720
16721 cat >>confdefs.h <<_ACEOF
16722 #define HAVE_INT8 1
16723 _ACEOF
16724
16725
16726 fi
16727 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
16728 "
16729 if test "x$ac_cv_type_uint8" = xyes; then :
16730
16731 cat >>confdefs.h <<_ACEOF
16732 #define HAVE_UINT8 1
16733 _ACEOF
16734
16735
16736 fi
16737 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
16738 "
16739 if test "x$ac_cv_type_int64" = xyes; then :
16740
16741 cat >>confdefs.h <<_ACEOF
16742 #define HAVE_INT64 1
16743 _ACEOF
16744
16745
16746 fi
16747 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
16748 "
16749 if test "x$ac_cv_type_uint64" = xyes; then :
16750
16751 cat >>confdefs.h <<_ACEOF
16752 #define HAVE_UINT64 1
16753 _ACEOF
16754
16755
16756 fi
16757
16758
16759 # Some compilers offer a 128-bit integer scalar type.
16760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
16761 $as_echo_n "checking for __int128... " >&6; }
16762 if ${pgac_cv__128bit_int+:} false; then :
16763   $as_echo_n "(cached) " >&6
16764 else
16765   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16766 /* end confdefs.h.  */
16767
16768 /*
16769  * We don't actually run this test, just link it to verify that any support
16770  * functions needed for __int128 are present.
16771  *
16772  * These are globals to discourage the compiler from folding all the
16773  * arithmetic tests down to compile-time constants.  We do not have
16774  * convenient support for 128bit literals at this point...
16775  */
16776 __int128 a = 48828125;
16777 __int128 b = 97656250;
16778
16779 int
16780 main ()
16781 {
16782
16783 __int128 c,d;
16784 a = (a << 12) + 1; /* 200000000001 */
16785 b = (b << 12) + 5; /* 400000000005 */
16786 /* try the most relevant arithmetic ops */
16787 c = a * b;
16788 d = (c + b) / b;
16789 /* must use the results, else compiler may optimize arithmetic away */
16790 if (d != a+1)
16791   return 1;
16792
16793   ;
16794   return 0;
16795 }
16796 _ACEOF
16797 if ac_fn_c_try_link "$LINENO"; then :
16798   pgac_cv__128bit_int=yes
16799 else
16800   pgac_cv__128bit_int=no
16801 fi
16802 rm -f core conftest.err conftest.$ac_objext \
16803     conftest$ac_exeext conftest.$ac_ext
16804 fi
16805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
16806 $as_echo "$pgac_cv__128bit_int" >&6; }
16807 if test x"$pgac_cv__128bit_int" = xyes ; then
16808   # Use of non-default alignment with __int128 tickles bugs in some compilers.
16809   # If not cross-compiling, we can test for bugs and disable use of __int128
16810   # with buggy compilers.  If cross-compiling, hope for the best.
16811   # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83925
16812   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128 alignment bug" >&5
16813 $as_echo_n "checking for __int128 alignment bug... " >&6; }
16814 if ${pgac_cv__128bit_int_bug+:} false; then :
16815   $as_echo_n "(cached) " >&6
16816 else
16817   if test "$cross_compiling" = yes; then :
16818   pgac_cv__128bit_int_bug="assuming ok"
16819 else
16820   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16821 /* end confdefs.h.  */
16822
16823 /* This must match the corresponding code in c.h: */
16824 #if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__)
16825 #define pg_attribute_aligned(a) __attribute__((aligned(a)))
16826 #endif
16827 typedef __int128 int128a
16828 #if defined(pg_attribute_aligned)
16829 pg_attribute_aligned(8)
16830 #endif
16831 ;
16832 int128a holder;
16833 void pass_by_val(void *buffer, int128a par) { holder = par; }
16834
16835 int
16836 main ()
16837 {
16838
16839 long int i64 = 97656225L << 12;
16840 int128a q;
16841 pass_by_val(main, (int128a) i64);
16842 q = (int128a) i64;
16843 if (q != holder)
16844   return 1;
16845
16846   ;
16847   return 0;
16848 }
16849 _ACEOF
16850 if ac_fn_c_try_run "$LINENO"; then :
16851   pgac_cv__128bit_int_bug=ok
16852 else
16853   pgac_cv__128bit_int_bug=broken
16854 fi
16855 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16856   conftest.$ac_objext conftest.beam conftest.$ac_ext
16857 fi
16858
16859 fi
16860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int_bug" >&5
16861 $as_echo "$pgac_cv__128bit_int_bug" >&6; }
16862   if test x"$pgac_cv__128bit_int_bug" != xbroken ; then
16863
16864 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
16865
16866     # The cast to long int works around a bug in the HP C Compiler,
16867 # see AC_CHECK_SIZEOF for more information.
16868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of PG_INT128_TYPE" >&5
16869 $as_echo_n "checking alignment of PG_INT128_TYPE... " >&6; }
16870 if ${ac_cv_alignof_PG_INT128_TYPE+:} false; then :
16871   $as_echo_n "(cached) " >&6
16872 else
16873   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_PG_INT128_TYPE"        "$ac_includes_default
16874 #ifndef offsetof
16875 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16876 #endif
16877 typedef struct { char x; PG_INT128_TYPE y; } ac__type_alignof_;"; then :
16878
16879 else
16880   if test "$ac_cv_type_PG_INT128_TYPE" = yes; then
16881      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16882 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16883 as_fn_error 77 "cannot compute alignment of PG_INT128_TYPE
16884 See \`config.log' for more details" "$LINENO" 5; }
16885    else
16886      ac_cv_alignof_PG_INT128_TYPE=0
16887    fi
16888 fi
16889
16890 fi
16891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_PG_INT128_TYPE" >&5
16892 $as_echo "$ac_cv_alignof_PG_INT128_TYPE" >&6; }
16893
16894
16895
16896 cat >>confdefs.h <<_ACEOF
16897 #define ALIGNOF_PG_INT128_TYPE $ac_cv_alignof_PG_INT128_TYPE
16898 _ACEOF
16899
16900
16901   fi
16902 fi
16903
16904 # Check for various atomic operations now that we have checked how to declare
16905 # 64bit integers.
16906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
16907 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
16908 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
16909   $as_echo_n "(cached) " >&6
16910 else
16911   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16912 /* end confdefs.h.  */
16913
16914 int
16915 main ()
16916 {
16917 char lock = 0;
16918    __sync_lock_test_and_set(&lock, 1);
16919    __sync_lock_release(&lock);
16920   ;
16921   return 0;
16922 }
16923 _ACEOF
16924 if ac_fn_c_try_link "$LINENO"; then :
16925   pgac_cv_gcc_sync_char_tas="yes"
16926 else
16927   pgac_cv_gcc_sync_char_tas="no"
16928 fi
16929 rm -f core conftest.err conftest.$ac_objext \
16930     conftest$ac_exeext conftest.$ac_ext
16931 fi
16932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
16933 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
16934 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
16935
16936 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
16937
16938 fi
16939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
16940 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
16941 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
16942   $as_echo_n "(cached) " >&6
16943 else
16944   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16945 /* end confdefs.h.  */
16946
16947 int
16948 main ()
16949 {
16950 int lock = 0;
16951    __sync_lock_test_and_set(&lock, 1);
16952    __sync_lock_release(&lock);
16953   ;
16954   return 0;
16955 }
16956 _ACEOF
16957 if ac_fn_c_try_link "$LINENO"; then :
16958   pgac_cv_gcc_sync_int32_tas="yes"
16959 else
16960   pgac_cv_gcc_sync_int32_tas="no"
16961 fi
16962 rm -f core conftest.err conftest.$ac_objext \
16963     conftest$ac_exeext conftest.$ac_ext
16964 fi
16965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
16966 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
16967 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
16968
16969 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
16970
16971 fi
16972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
16973 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
16974 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
16975   $as_echo_n "(cached) " >&6
16976 else
16977   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16978 /* end confdefs.h.  */
16979
16980 int
16981 main ()
16982 {
16983 int val = 0;
16984    __sync_val_compare_and_swap(&val, 0, 37);
16985   ;
16986   return 0;
16987 }
16988 _ACEOF
16989 if ac_fn_c_try_link "$LINENO"; then :
16990   pgac_cv_gcc_sync_int32_cas="yes"
16991 else
16992   pgac_cv_gcc_sync_int32_cas="no"
16993 fi
16994 rm -f core conftest.err conftest.$ac_objext \
16995     conftest$ac_exeext conftest.$ac_ext
16996 fi
16997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
16998 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
16999 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
17000
17001 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
17002
17003 fi
17004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
17005 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
17006 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
17007   $as_echo_n "(cached) " >&6
17008 else
17009   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17010 /* end confdefs.h.  */
17011
17012 int
17013 main ()
17014 {
17015 PG_INT64_TYPE lock = 0;
17016    __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
17017   ;
17018   return 0;
17019 }
17020 _ACEOF
17021 if ac_fn_c_try_link "$LINENO"; then :
17022   pgac_cv_gcc_sync_int64_cas="yes"
17023 else
17024   pgac_cv_gcc_sync_int64_cas="no"
17025 fi
17026 rm -f core conftest.err conftest.$ac_objext \
17027     conftest$ac_exeext conftest.$ac_ext
17028 fi
17029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
17030 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
17031 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
17032
17033 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
17034
17035 fi
17036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
17037 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
17038 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
17039   $as_echo_n "(cached) " >&6
17040 else
17041   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17042 /* end confdefs.h.  */
17043
17044 int
17045 main ()
17046 {
17047 int val = 0;
17048    int expect = 0;
17049    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17050   ;
17051   return 0;
17052 }
17053 _ACEOF
17054 if ac_fn_c_try_link "$LINENO"; then :
17055   pgac_cv_gcc_atomic_int32_cas="yes"
17056 else
17057   pgac_cv_gcc_atomic_int32_cas="no"
17058 fi
17059 rm -f core conftest.err conftest.$ac_objext \
17060     conftest$ac_exeext conftest.$ac_ext
17061 fi
17062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
17063 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
17064 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
17065
17066 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
17067
17068 fi
17069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
17070 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
17071 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
17072   $as_echo_n "(cached) " >&6
17073 else
17074   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17075 /* end confdefs.h.  */
17076
17077 int
17078 main ()
17079 {
17080 PG_INT64_TYPE val = 0;
17081    PG_INT64_TYPE expect = 0;
17082    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17083   ;
17084   return 0;
17085 }
17086 _ACEOF
17087 if ac_fn_c_try_link "$LINENO"; then :
17088   pgac_cv_gcc_atomic_int64_cas="yes"
17089 else
17090   pgac_cv_gcc_atomic_int64_cas="no"
17091 fi
17092 rm -f core conftest.err conftest.$ac_objext \
17093     conftest$ac_exeext conftest.$ac_ext
17094 fi
17095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
17096 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
17097 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
17098
17099 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
17100
17101 fi
17102
17103
17104 # Check for x86 cpuid instruction
17105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
17106 $as_echo_n "checking for __get_cpuid... " >&6; }
17107 if ${pgac_cv__get_cpuid+:} false; then :
17108   $as_echo_n "(cached) " >&6
17109 else
17110   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17111 /* end confdefs.h.  */
17112 #include <cpuid.h>
17113 int
17114 main ()
17115 {
17116 unsigned int exx[4] = {0, 0, 0, 0};
17117   __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
17118
17119   ;
17120   return 0;
17121 }
17122 _ACEOF
17123 if ac_fn_c_try_link "$LINENO"; then :
17124   pgac_cv__get_cpuid="yes"
17125 else
17126   pgac_cv__get_cpuid="no"
17127 fi
17128 rm -f core conftest.err conftest.$ac_objext \
17129     conftest$ac_exeext conftest.$ac_ext
17130 fi
17131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
17132 $as_echo "$pgac_cv__get_cpuid" >&6; }
17133 if test x"$pgac_cv__get_cpuid" = x"yes"; then
17134
17135 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
17136
17137 fi
17138
17139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
17140 $as_echo_n "checking for __cpuid... " >&6; }
17141 if ${pgac_cv__cpuid+:} false; then :
17142   $as_echo_n "(cached) " >&6
17143 else
17144   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17145 /* end confdefs.h.  */
17146 #include <intrin.h>
17147 int
17148 main ()
17149 {
17150 unsigned int exx[4] = {0, 0, 0, 0};
17151   __get_cpuid(exx[0], 1);
17152
17153   ;
17154   return 0;
17155 }
17156 _ACEOF
17157 if ac_fn_c_try_link "$LINENO"; then :
17158   pgac_cv__cpuid="yes"
17159 else
17160   pgac_cv__cpuid="no"
17161 fi
17162 rm -f core conftest.err conftest.$ac_objext \
17163     conftest$ac_exeext conftest.$ac_ext
17164 fi
17165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
17166 $as_echo "$pgac_cv__cpuid" >&6; }
17167 if test x"$pgac_cv__cpuid" = x"yes"; then
17168
17169 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
17170
17171 fi
17172
17173 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
17174 #
17175 # First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
17176 # with the default compiler flags. If not, check if adding the -msse4.2
17177 # flag helps. CFLAGS_SSE42 is set to -msse4.2 if that's required.
17178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
17179 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
17180 if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
17181   $as_echo_n "(cached) " >&6
17182 else
17183   pgac_save_CFLAGS=$CFLAGS
17184 CFLAGS="$pgac_save_CFLAGS "
17185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17186 /* end confdefs.h.  */
17187 #include <nmmintrin.h>
17188 int
17189 main ()
17190 {
17191 unsigned int crc = 0;
17192    crc = _mm_crc32_u8(crc, 0);
17193    crc = _mm_crc32_u32(crc, 0);
17194    /* return computed value, to prevent the above being optimized away */
17195    return crc == 0;
17196   ;
17197   return 0;
17198 }
17199 _ACEOF
17200 if ac_fn_c_try_link "$LINENO"; then :
17201   pgac_cv_sse42_crc32_intrinsics_=yes
17202 else
17203   pgac_cv_sse42_crc32_intrinsics_=no
17204 fi
17205 rm -f core conftest.err conftest.$ac_objext \
17206     conftest$ac_exeext conftest.$ac_ext
17207 CFLAGS="$pgac_save_CFLAGS"
17208 fi
17209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
17210 $as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
17211 if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
17212   CFLAGS_SSE42=""
17213   pgac_sse42_crc32_intrinsics=yes
17214 fi
17215
17216 if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
17217   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
17218 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
17219 if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
17220   $as_echo_n "(cached) " >&6
17221 else
17222   pgac_save_CFLAGS=$CFLAGS
17223 CFLAGS="$pgac_save_CFLAGS -msse4.2"
17224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17225 /* end confdefs.h.  */
17226 #include <nmmintrin.h>
17227 int
17228 main ()
17229 {
17230 unsigned int crc = 0;
17231    crc = _mm_crc32_u8(crc, 0);
17232    crc = _mm_crc32_u32(crc, 0);
17233    /* return computed value, to prevent the above being optimized away */
17234    return crc == 0;
17235   ;
17236   return 0;
17237 }
17238 _ACEOF
17239 if ac_fn_c_try_link "$LINENO"; then :
17240   pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
17241 else
17242   pgac_cv_sse42_crc32_intrinsics__msse4_2=no
17243 fi
17244 rm -f core conftest.err conftest.$ac_objext \
17245     conftest$ac_exeext conftest.$ac_ext
17246 CFLAGS="$pgac_save_CFLAGS"
17247 fi
17248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
17249 $as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
17250 if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
17251   CFLAGS_SSE42="-msse4.2"
17252   pgac_sse42_crc32_intrinsics=yes
17253 fi
17254
17255 fi
17256
17257
17258 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
17259 # define __SSE4_2__ in that case.
17260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17261 /* end confdefs.h.  */
17262
17263 int
17264 main ()
17265 {
17266
17267 #ifndef __SSE4_2__
17268 #error __SSE4_2__ not defined
17269 #endif
17270
17271   ;
17272   return 0;
17273 }
17274 _ACEOF
17275 if ac_fn_c_try_compile "$LINENO"; then :
17276   SSE4_2_TARGETED=1
17277 fi
17278 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17279
17280 # Check for ARMv8 CRC Extension intrinsics to do CRC calculations.
17281 #
17282 # First check if __crc32c* intrinsics can be used with the default compiler
17283 # flags. If not, check if adding -march=armv8-a+crc flag helps.
17284 # CFLAGS_ARMV8_CRC32C is set if the extra flag is required.
17285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=" >&5
17286 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=... " >&6; }
17287 if ${pgac_cv_armv8_crc32c_intrinsics_+:} false; then :
17288   $as_echo_n "(cached) " >&6
17289 else
17290   pgac_save_CFLAGS=$CFLAGS
17291 CFLAGS="$pgac_save_CFLAGS "
17292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17293 /* end confdefs.h.  */
17294 #include <arm_acle.h>
17295 int
17296 main ()
17297 {
17298 unsigned int crc = 0;
17299    crc = __crc32cb(crc, 0);
17300    crc = __crc32ch(crc, 0);
17301    crc = __crc32cw(crc, 0);
17302    crc = __crc32cd(crc, 0);
17303    /* return computed value, to prevent the above being optimized away */
17304    return crc == 0;
17305   ;
17306   return 0;
17307 }
17308 _ACEOF
17309 if ac_fn_c_try_link "$LINENO"; then :
17310   pgac_cv_armv8_crc32c_intrinsics_=yes
17311 else
17312   pgac_cv_armv8_crc32c_intrinsics_=no
17313 fi
17314 rm -f core conftest.err conftest.$ac_objext \
17315     conftest$ac_exeext conftest.$ac_ext
17316 CFLAGS="$pgac_save_CFLAGS"
17317 fi
17318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics_" >&5
17319 $as_echo "$pgac_cv_armv8_crc32c_intrinsics_" >&6; }
17320 if test x"$pgac_cv_armv8_crc32c_intrinsics_" = x"yes"; then
17321   CFLAGS_ARMV8_CRC32C=""
17322   pgac_armv8_crc32c_intrinsics=yes
17323 fi
17324
17325 if test x"$pgac_armv8_crc32c_intrinsics" != x"yes"; then
17326   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc" >&5
17327 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc... " >&6; }
17328 if ${pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc+:} false; then :
17329   $as_echo_n "(cached) " >&6
17330 else
17331   pgac_save_CFLAGS=$CFLAGS
17332 CFLAGS="$pgac_save_CFLAGS -march=armv8-a+crc"
17333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17334 /* end confdefs.h.  */
17335 #include <arm_acle.h>
17336 int
17337 main ()
17338 {
17339 unsigned int crc = 0;
17340    crc = __crc32cb(crc, 0);
17341    crc = __crc32ch(crc, 0);
17342    crc = __crc32cw(crc, 0);
17343    crc = __crc32cd(crc, 0);
17344    /* return computed value, to prevent the above being optimized away */
17345    return crc == 0;
17346   ;
17347   return 0;
17348 }
17349 _ACEOF
17350 if ac_fn_c_try_link "$LINENO"; then :
17351   pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=yes
17352 else
17353   pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=no
17354 fi
17355 rm -f core conftest.err conftest.$ac_objext \
17356     conftest$ac_exeext conftest.$ac_ext
17357 CFLAGS="$pgac_save_CFLAGS"
17358 fi
17359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&5
17360 $as_echo "$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&6; }
17361 if test x"$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" = x"yes"; then
17362   CFLAGS_ARMV8_CRC32C="-march=armv8-a+crc"
17363   pgac_armv8_crc32c_intrinsics=yes
17364 fi
17365
17366 fi
17367
17368
17369 # Select CRC-32C implementation.
17370 #
17371 # If we are targeting a processor that has Intel SSE 4.2 instructions, we can
17372 # use the special CRC instructions for calculating CRC-32C. If we're not
17373 # targeting such a processor, but we can nevertheless produce code that uses
17374 # the SSE intrinsics, perhaps with some extra CFLAGS, compile both
17375 # implementations and select which one to use at runtime, depending on whether
17376 # SSE 4.2 is supported by the processor we're running on.
17377 #
17378 # Similarly, if we are targeting an ARM processor that has the CRC
17379 # instructions that are part of the ARMv8 CRC Extension, use them. And if
17380 # we're not targeting such a processor, but can nevertheless produce code that
17381 # uses the CRC instructions, compile both, and select at runtime.
17382 #
17383 # You can override this logic by setting the appropriate USE_*_CRC32 flag to 1
17384 # in the template or configure command line.
17385 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
17386   # Use Intel SSE 4.2 if available.
17387   if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
17388     USE_SSE42_CRC32C=1
17389   else
17390     # Intel SSE 4.2, with runtime check? The CPUID instruction is needed for
17391     # the runtime check.
17392     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
17393       USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
17394     else
17395       # Use ARM CRC Extension if available.
17396       if test x"$pgac_armv8_crc32c_intrinsics" = x"yes" && test x"$CFLAGS_ARMV8_CRC32C" = x""; then
17397         USE_ARMV8_CRC32C=1
17398       else
17399         # ARM CRC Extension, with runtime check?
17400         if test x"$pgac_armv8_crc32c_intrinsics" = x"yes"; then
17401           USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK=1
17402         else
17403           # fall back to slicing-by-8 algorithm, which doesn't require any
17404           # special CPU support.
17405           USE_SLICING_BY_8_CRC32C=1
17406         fi
17407       fi
17408     fi
17409   fi
17410 fi
17411
17412 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
17413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
17414 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
17415 if test x"$USE_SSE42_CRC32C" = x"1"; then
17416
17417 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
17418
17419   PG_CRC32C_OBJS="pg_crc32c_sse42.o"
17420   { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
17421 $as_echo "SSE 4.2" >&6; }
17422 else
17423   if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
17424
17425 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
17426
17427     PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_sse42_choose.o"
17428     { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
17429 $as_echo "SSE 4.2 with runtime check" >&6; }
17430   else
17431     if test x"$USE_ARMV8_CRC32C" = x"1"; then
17432
17433 $as_echo "#define USE_ARMV8_CRC32C 1" >>confdefs.h
17434
17435       PG_CRC32C_OBJS="pg_crc32c_armv8.o"
17436       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions" >&5
17437 $as_echo "ARMv8 CRC instructions" >&6; }
17438     else
17439       if test x"$USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
17440
17441 $as_echo "#define USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
17442
17443         PG_CRC32C_OBJS="pg_crc32c_armv8.o pg_crc32c_sb8.o pg_crc32c_armv8_choose.o"
17444         { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions with runtime check" >&5
17445 $as_echo "ARMv8 CRC instructions with runtime check" >&6; }
17446       else
17447
17448 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
17449
17450         PG_CRC32C_OBJS="pg_crc32c_sb8.o"
17451         { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
17452 $as_echo "slicing-by-8" >&6; }
17453       fi
17454     fi
17455   fi
17456 fi
17457
17458
17459
17460 # Select semaphore implementation type.
17461 if test "$PORTNAME" != "win32"; then
17462   if test x"$PREFERRED_SEMAPHORES" = x"NAMED_POSIX" ; then
17463     # Need sem_open for this
17464     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5
17465 $as_echo_n "checking for library containing sem_open... " >&6; }
17466 if ${ac_cv_search_sem_open+:} false; then :
17467   $as_echo_n "(cached) " >&6
17468 else
17469   ac_func_search_save_LIBS=$LIBS
17470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17471 /* end confdefs.h.  */
17472
17473 /* Override any GCC internal prototype to avoid an error.
17474    Use char because int might match the return type of a GCC
17475    builtin and then its argument prototype would still apply.  */
17476 #ifdef __cplusplus
17477 extern "C"
17478 #endif
17479 char sem_open ();
17480 int
17481 main ()
17482 {
17483 return sem_open ();
17484   ;
17485   return 0;
17486 }
17487 _ACEOF
17488 for ac_lib in '' rt pthread; do
17489   if test -z "$ac_lib"; then
17490     ac_res="none required"
17491   else
17492     ac_res=-l$ac_lib
17493     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17494   fi
17495   if ac_fn_c_try_link "$LINENO"; then :
17496   ac_cv_search_sem_open=$ac_res
17497 fi
17498 rm -f core conftest.err conftest.$ac_objext \
17499     conftest$ac_exeext
17500   if ${ac_cv_search_sem_open+:} false; then :
17501   break
17502 fi
17503 done
17504 if ${ac_cv_search_sem_open+:} false; then :
17505
17506 else
17507   ac_cv_search_sem_open=no
17508 fi
17509 rm conftest.$ac_ext
17510 LIBS=$ac_func_search_save_LIBS
17511 fi
17512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5
17513 $as_echo "$ac_cv_search_sem_open" >&6; }
17514 ac_res=$ac_cv_search_sem_open
17515 if test "$ac_res" != no; then :
17516   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17517   USE_NAMED_POSIX_SEMAPHORES=1
17518 fi
17519
17520   fi
17521   if test x"$PREFERRED_SEMAPHORES" = x"UNNAMED_POSIX" ; then
17522     # Need sem_init for this
17523     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
17524 $as_echo_n "checking for library containing sem_init... " >&6; }
17525 if ${ac_cv_search_sem_init+:} false; then :
17526   $as_echo_n "(cached) " >&6
17527 else
17528   ac_func_search_save_LIBS=$LIBS
17529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17530 /* end confdefs.h.  */
17531
17532 /* Override any GCC internal prototype to avoid an error.
17533    Use char because int might match the return type of a GCC
17534    builtin and then its argument prototype would still apply.  */
17535 #ifdef __cplusplus
17536 extern "C"
17537 #endif
17538 char sem_init ();
17539 int
17540 main ()
17541 {
17542 return sem_init ();
17543   ;
17544   return 0;
17545 }
17546 _ACEOF
17547 for ac_lib in '' rt pthread; do
17548   if test -z "$ac_lib"; then
17549     ac_res="none required"
17550   else
17551     ac_res=-l$ac_lib
17552     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17553   fi
17554   if ac_fn_c_try_link "$LINENO"; then :
17555   ac_cv_search_sem_init=$ac_res
17556 fi
17557 rm -f core conftest.err conftest.$ac_objext \
17558     conftest$ac_exeext
17559   if ${ac_cv_search_sem_init+:} false; then :
17560   break
17561 fi
17562 done
17563 if ${ac_cv_search_sem_init+:} false; then :
17564
17565 else
17566   ac_cv_search_sem_init=no
17567 fi
17568 rm conftest.$ac_ext
17569 LIBS=$ac_func_search_save_LIBS
17570 fi
17571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
17572 $as_echo "$ac_cv_search_sem_init" >&6; }
17573 ac_res=$ac_cv_search_sem_init
17574 if test "$ac_res" != no; then :
17575   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17576   USE_UNNAMED_POSIX_SEMAPHORES=1
17577 fi
17578
17579   fi
17580   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which semaphore API to use" >&5
17581 $as_echo_n "checking which semaphore API to use... " >&6; }
17582   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
17583
17584 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
17585
17586     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
17587     sematype="named POSIX"
17588   else
17589     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
17590
17591 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
17592
17593       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
17594       sematype="unnamed POSIX"
17595     else
17596
17597 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
17598
17599       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
17600       sematype="System V"
17601     fi
17602   fi
17603   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sematype" >&5
17604 $as_echo "$sematype" >&6; }
17605 else
17606
17607 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
17608
17609   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
17610 fi
17611
17612
17613 # Select shared-memory implementation type.
17614 if test "$PORTNAME" != "win32"; then
17615
17616 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
17617
17618   SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
17619 else
17620
17621 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
17622
17623   SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
17624 fi
17625
17626 # Select random number source
17627 #
17628 # You can override this logic by setting the appropriate USE_*RANDOM flag to 1
17629 # in the template or configure command line.
17630
17631 # If not selected manually, try to select a source automatically.
17632 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
17633   if test x"$with_openssl" = x"yes" ; then
17634     USE_OPENSSL_RANDOM=1
17635   elif test "$PORTNAME" = "win32" ; then
17636     USE_WIN32_RANDOM=1
17637   else
17638     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5
17639 $as_echo_n "checking for /dev/urandom... " >&6; }
17640 if ${ac_cv_file__dev_urandom+:} false; then :
17641   $as_echo_n "(cached) " >&6
17642 else
17643   test "$cross_compiling" = yes &&
17644   as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
17645 if test -r "/dev/urandom"; then
17646   ac_cv_file__dev_urandom=yes
17647 else
17648   ac_cv_file__dev_urandom=no
17649 fi
17650 fi
17651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5
17652 $as_echo "$ac_cv_file__dev_urandom" >&6; }
17653 if test "x$ac_cv_file__dev_urandom" = xyes; then :
17654
17655 fi
17656
17657
17658     if test x"$ac_cv_file__dev_urandom" = x"yes" ; then
17659       USE_DEV_URANDOM=1
17660     fi
17661   fi
17662 fi
17663
17664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which random number source to use" >&5
17665 $as_echo_n "checking which random number source to use... " >&6; }
17666 if test "$enable_strong_random" = yes ; then
17667   if test x"$USE_OPENSSL_RANDOM" = x"1" ; then
17668
17669 $as_echo "#define USE_OPENSSL_RANDOM 1" >>confdefs.h
17670
17671     { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5
17672 $as_echo "OpenSSL" >&6; }
17673   elif test x"$USE_WIN32_RANDOM" = x"1" ; then
17674
17675 $as_echo "#define USE_WIN32_RANDOM 1" >>confdefs.h
17676
17677     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
17678 $as_echo "Windows native" >&6; }
17679   elif test x"$USE_DEV_URANDOM" = x"1" ; then
17680
17681 $as_echo "#define USE_DEV_URANDOM 1" >>confdefs.h
17682
17683     { $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
17684 $as_echo "/dev/urandom" >&6; }
17685   else
17686     as_fn_error $? "
17687 no source of strong random numbers was found
17688 PostgreSQL can use OpenSSL or /dev/urandom as a source of random numbers,
17689 for authentication protocols. You can use --disable-strong-random to use a
17690 built-in pseudo random number generator, but that may be insecure." "$LINENO" 5
17691   fi
17692
17693 $as_echo "#define HAVE_STRONG_RANDOM 1" >>confdefs.h
17694
17695 else
17696     { $as_echo "$as_me:${as_lineno-$LINENO}: result: weak builtin PRNG" >&5
17697 $as_echo "weak builtin PRNG" >&6; }
17698     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
17699 *** Not using a strong random number source may be insecure." >&5
17700 $as_echo "$as_me: WARNING:
17701 *** Not using a strong random number source may be insecure." >&2;}
17702 fi
17703
17704 # If not set in template file, set bytes to use libc memset()
17705 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
17706   MEMSET_LOOP_LIMIT=1024
17707 fi
17708
17709 cat >>confdefs.h <<_ACEOF
17710 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
17711 _ACEOF
17712
17713
17714
17715 if test "$enable_nls" = yes ; then
17716
17717   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
17718 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
17719 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
17720   $as_echo_n "(cached) " >&6
17721 else
17722   ac_func_search_save_LIBS=$LIBS
17723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17724 /* end confdefs.h.  */
17725
17726 /* Override any GCC internal prototype to avoid an error.
17727    Use char because int might match the return type of a GCC
17728    builtin and then its argument prototype would still apply.  */
17729 #ifdef __cplusplus
17730 extern "C"
17731 #endif
17732 char bind_textdomain_codeset ();
17733 int
17734 main ()
17735 {
17736 return bind_textdomain_codeset ();
17737   ;
17738   return 0;
17739 }
17740 _ACEOF
17741 for ac_lib in '' intl; do
17742   if test -z "$ac_lib"; then
17743     ac_res="none required"
17744   else
17745     ac_res=-l$ac_lib
17746     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17747   fi
17748   if ac_fn_c_try_link "$LINENO"; then :
17749   ac_cv_search_bind_textdomain_codeset=$ac_res
17750 fi
17751 rm -f core conftest.err conftest.$ac_objext \
17752     conftest$ac_exeext
17753   if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
17754   break
17755 fi
17756 done
17757 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
17758
17759 else
17760   ac_cv_search_bind_textdomain_codeset=no
17761 fi
17762 rm conftest.$ac_ext
17763 LIBS=$ac_func_search_save_LIBS
17764 fi
17765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
17766 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
17767 ac_res=$ac_cv_search_bind_textdomain_codeset
17768 if test "$ac_res" != no; then :
17769   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17770
17771 else
17772   as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
17773 fi
17774
17775   ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
17776 if test "x$ac_cv_header_libintl_h" = xyes; then :
17777
17778 else
17779   as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
17780 fi
17781
17782
17783   if test -z "$MSGFMT"; then
17784   for ac_prog in msgfmt
17785 do
17786   # Extract the first word of "$ac_prog", so it can be a program name with args.
17787 set dummy $ac_prog; ac_word=$2
17788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17789 $as_echo_n "checking for $ac_word... " >&6; }
17790 if ${ac_cv_path_MSGFMT+:} false; then :
17791   $as_echo_n "(cached) " >&6
17792 else
17793   case $MSGFMT in
17794   [\\/]* | ?:[\\/]*)
17795   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
17796   ;;
17797   *)
17798   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17799 for as_dir in $PATH
17800 do
17801   IFS=$as_save_IFS
17802   test -z "$as_dir" && as_dir=.
17803     for ac_exec_ext in '' $ac_executable_extensions; do
17804   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17805     ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
17806     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17807     break 2
17808   fi
17809 done
17810   done
17811 IFS=$as_save_IFS
17812
17813   ;;
17814 esac
17815 fi
17816 MSGFMT=$ac_cv_path_MSGFMT
17817 if test -n "$MSGFMT"; then
17818   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
17819 $as_echo "$MSGFMT" >&6; }
17820 else
17821   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17822 $as_echo "no" >&6; }
17823 fi
17824
17825
17826   test -n "$MSGFMT" && break
17827 done
17828
17829 else
17830   # Report the value of MSGFMT in configure's output in all cases.
17831   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGFMT" >&5
17832 $as_echo_n "checking for MSGFMT... " >&6; }
17833   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
17834 $as_echo "$MSGFMT" >&6; }
17835 fi
17836
17837   if test -z "$MSGFMT"; then
17838     as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
17839   fi
17840   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
17841 $as_echo_n "checking for msgfmt flags... " >&6; }
17842 if ${pgac_cv_msgfmt_flags+:} false; then :
17843   $as_echo_n "(cached) " >&6
17844 else
17845   if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
17846     pgac_cv_msgfmt_flags=-c
17847 fi
17848 fi
17849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
17850 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
17851   MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
17852
17853   if test -z "$MSGMERGE"; then
17854   for ac_prog in msgmerge
17855 do
17856   # Extract the first word of "$ac_prog", so it can be a program name with args.
17857 set dummy $ac_prog; ac_word=$2
17858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17859 $as_echo_n "checking for $ac_word... " >&6; }
17860 if ${ac_cv_path_MSGMERGE+:} false; then :
17861   $as_echo_n "(cached) " >&6
17862 else
17863   case $MSGMERGE in
17864   [\\/]* | ?:[\\/]*)
17865   ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
17866   ;;
17867   *)
17868   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17869 for as_dir in $PATH
17870 do
17871   IFS=$as_save_IFS
17872   test -z "$as_dir" && as_dir=.
17873     for ac_exec_ext in '' $ac_executable_extensions; do
17874   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17875     ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
17876     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17877     break 2
17878   fi
17879 done
17880   done
17881 IFS=$as_save_IFS
17882
17883   ;;
17884 esac
17885 fi
17886 MSGMERGE=$ac_cv_path_MSGMERGE
17887 if test -n "$MSGMERGE"; then
17888   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
17889 $as_echo "$MSGMERGE" >&6; }
17890 else
17891   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17892 $as_echo "no" >&6; }
17893 fi
17894
17895
17896   test -n "$MSGMERGE" && break
17897 done
17898
17899 else
17900   # Report the value of MSGMERGE in configure's output in all cases.
17901   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGMERGE" >&5
17902 $as_echo_n "checking for MSGMERGE... " >&6; }
17903   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
17904 $as_echo "$MSGMERGE" >&6; }
17905 fi
17906
17907   if test -z "$XGETTEXT"; then
17908   for ac_prog in xgettext
17909 do
17910   # Extract the first word of "$ac_prog", so it can be a program name with args.
17911 set dummy $ac_prog; ac_word=$2
17912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17913 $as_echo_n "checking for $ac_word... " >&6; }
17914 if ${ac_cv_path_XGETTEXT+:} false; then :
17915   $as_echo_n "(cached) " >&6
17916 else
17917   case $XGETTEXT in
17918   [\\/]* | ?:[\\/]*)
17919   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
17920   ;;
17921   *)
17922   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17923 for as_dir in $PATH
17924 do
17925   IFS=$as_save_IFS
17926   test -z "$as_dir" && as_dir=.
17927     for ac_exec_ext in '' $ac_executable_extensions; do
17928   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17929     ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
17930     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17931     break 2
17932   fi
17933 done
17934   done
17935 IFS=$as_save_IFS
17936
17937   ;;
17938 esac
17939 fi
17940 XGETTEXT=$ac_cv_path_XGETTEXT
17941 if test -n "$XGETTEXT"; then
17942   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
17943 $as_echo "$XGETTEXT" >&6; }
17944 else
17945   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17946 $as_echo "no" >&6; }
17947 fi
17948
17949
17950   test -n "$XGETTEXT" && break
17951 done
17952
17953 else
17954   # Report the value of XGETTEXT in configure's output in all cases.
17955   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XGETTEXT" >&5
17956 $as_echo_n "checking for XGETTEXT... " >&6; }
17957   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
17958 $as_echo "$XGETTEXT" >&6; }
17959 fi
17960
17961
17962 fi
17963
17964 # Check for Tcl configuration script tclConfig.sh
17965 if test "$with_tcl" = yes; then
17966     if test -z "$TCLSH"; then
17967   for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
17968 do
17969   # Extract the first word of "$ac_prog", so it can be a program name with args.
17970 set dummy $ac_prog; ac_word=$2
17971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17972 $as_echo_n "checking for $ac_word... " >&6; }
17973 if ${ac_cv_path_TCLSH+:} false; then :
17974   $as_echo_n "(cached) " >&6
17975 else
17976   case $TCLSH in
17977   [\\/]* | ?:[\\/]*)
17978   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
17979   ;;
17980   *)
17981   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17982 for as_dir in $PATH
17983 do
17984   IFS=$as_save_IFS
17985   test -z "$as_dir" && as_dir=.
17986     for ac_exec_ext in '' $ac_executable_extensions; do
17987   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17988     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
17989     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17990     break 2
17991   fi
17992 done
17993   done
17994 IFS=$as_save_IFS
17995
17996   ;;
17997 esac
17998 fi
17999 TCLSH=$ac_cv_path_TCLSH
18000 if test -n "$TCLSH"; then
18001   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18002 $as_echo "$TCLSH" >&6; }
18003 else
18004   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18005 $as_echo "no" >&6; }
18006 fi
18007
18008
18009   test -n "$TCLSH" && break
18010 done
18011
18012 else
18013   # Report the value of TCLSH in configure's output in all cases.
18014   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCLSH" >&5
18015 $as_echo_n "checking for TCLSH... " >&6; }
18016   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18017 $as_echo "$TCLSH" >&6; }
18018 fi
18019
18020 if test x"$TCLSH" = x""; then
18021   as_fn_error $? "Tcl shell not found" "$LINENO" 5
18022 fi
18023
18024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
18025 $as_echo_n "checking for tclConfig.sh... " >&6; }
18026 # Let user override test
18027 if test -z "$TCL_CONFIG_SH"; then
18028     pgac_test_dirs="$with_tclconfig"
18029
18030     set X $pgac_test_dirs; shift
18031     if test $# -eq 0; then
18032         test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
18033         set X `echo 'puts $auto_path' | $TCLSH`; shift
18034     fi
18035
18036     for pgac_dir do
18037         if test -r "$pgac_dir/tclConfig.sh"; then
18038             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
18039             break
18040         fi
18041     done
18042 fi
18043
18044 if test -z "$TCL_CONFIG_SH"; then
18045     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18046 $as_echo "no" >&6; }
18047     as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
18048 else
18049     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
18050 $as_echo "$TCL_CONFIG_SH" >&6; }
18051 fi
18052
18053
18054
18055     . "$TCL_CONFIG_SH"
18056 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
18057 eval TCL_LIBS=\"$TCL_LIBS\"
18058 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
18059 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
18060
18061         if test "$TCL_SHARED_BUILD" != 1; then
18062       as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
18063 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
18064     fi
18065     # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
18066     ac_save_CPPFLAGS=$CPPFLAGS
18067     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
18068     ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
18069 if test "x$ac_cv_header_tcl_h" = xyes; then :
18070
18071 else
18072   as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
18073 fi
18074
18075
18076     CPPFLAGS=$ac_save_CPPFLAGS
18077 fi
18078
18079 # check for <perl.h>
18080 if test "$with_perl" = yes; then
18081   ac_save_CPPFLAGS=$CPPFLAGS
18082   CPPFLAGS="$CPPFLAGS -I$perl_archlibexp/CORE"
18083   ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
18084 "
18085 if test "x$ac_cv_header_perl_h" = xyes; then :
18086
18087 else
18088   as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
18089 fi
18090
18091
18092   # While we're at it, check that we can link to libperl.
18093   # On most platforms, if perl.h is there then libperl.so will be too, but at
18094   # this writing Debian packages them separately.  There is no known reason to
18095   # waste cycles on separate probes for the Tcl or Python libraries, though.
18096   pgac_save_LIBS=$LIBS
18097   LIBS="$perl_embed_ldflags"
18098   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
18099 $as_echo_n "checking for libperl... " >&6; }
18100   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18101 /* end confdefs.h.  */
18102
18103 #include <EXTERN.h>
18104 #include <perl.h>
18105
18106 int
18107 main ()
18108 {
18109 perl_alloc();
18110   ;
18111   return 0;
18112 }
18113 _ACEOF
18114 if ac_fn_c_try_link "$LINENO"; then :
18115   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18116 $as_echo "yes" >&6; }
18117 else
18118   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18119 $as_echo "no" >&6; }
18120      as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
18121 fi
18122 rm -f core conftest.err conftest.$ac_objext \
18123     conftest$ac_exeext conftest.$ac_ext
18124   LIBS=$pgac_save_LIBS
18125   CPPFLAGS=$ac_save_CPPFLAGS
18126 fi
18127
18128 # check for <Python.h>
18129 if test "$with_python" = yes; then
18130   ac_save_CPPFLAGS=$CPPFLAGS
18131   CPPFLAGS="$python_includespec $CPPFLAGS"
18132   ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
18133 if test "x$ac_cv_header_Python_h" = xyes; then :
18134
18135 else
18136   as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
18137 fi
18138
18139
18140   CPPFLAGS=$ac_save_CPPFLAGS
18141 fi
18142
18143 #
18144 # Check for DocBook and tools
18145 #
18146 if test -z "$XMLLINT"; then
18147   for ac_prog in xmllint
18148 do
18149   # Extract the first word of "$ac_prog", so it can be a program name with args.
18150 set dummy $ac_prog; ac_word=$2
18151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18152 $as_echo_n "checking for $ac_word... " >&6; }
18153 if ${ac_cv_path_XMLLINT+:} false; then :
18154   $as_echo_n "(cached) " >&6
18155 else
18156   case $XMLLINT in
18157   [\\/]* | ?:[\\/]*)
18158   ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path.
18159   ;;
18160   *)
18161   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18162 for as_dir in $PATH
18163 do
18164   IFS=$as_save_IFS
18165   test -z "$as_dir" && as_dir=.
18166     for ac_exec_ext in '' $ac_executable_extensions; do
18167   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18168     ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext"
18169     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18170     break 2
18171   fi
18172 done
18173   done
18174 IFS=$as_save_IFS
18175
18176   ;;
18177 esac
18178 fi
18179 XMLLINT=$ac_cv_path_XMLLINT
18180 if test -n "$XMLLINT"; then
18181   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18182 $as_echo "$XMLLINT" >&6; }
18183 else
18184   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18185 $as_echo "no" >&6; }
18186 fi
18187
18188
18189   test -n "$XMLLINT" && break
18190 done
18191
18192 else
18193   # Report the value of XMLLINT in configure's output in all cases.
18194   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMLLINT" >&5
18195 $as_echo_n "checking for XMLLINT... " >&6; }
18196   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18197 $as_echo "$XMLLINT" >&6; }
18198 fi
18199
18200
18201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook XML V4.2" >&5
18202 $as_echo_n "checking for DocBook XML V4.2... " >&6; }
18203 if ${pgac_cv_check_docbook+:} false; then :
18204   $as_echo_n "(cached) " >&6
18205 else
18206   cat >conftest.xml <<EOF
18207 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
18208 <book>
18209  <title>test</title>
18210  <chapter>
18211   <title>random</title>
18212    <sect1>
18213     <title>testsect</title>
18214     <para>text</para>
18215   </sect1>
18216  </chapter>
18217 </book>
18218 EOF
18219
18220 pgac_cv_check_docbook=no
18221
18222 if test -n "$XMLLINT"; then
18223   $XMLLINT --noout --valid conftest.xml 1>&5 2>&1
18224   if test $? -eq 0; then
18225     pgac_cv_check_docbook=yes
18226   fi
18227 fi
18228 rm -f conftest.xml
18229 fi
18230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_docbook" >&5
18231 $as_echo "$pgac_cv_check_docbook" >&6; }
18232
18233 have_docbook=$pgac_cv_check_docbook
18234
18235
18236 if test -z "$DBTOEPUB"; then
18237   for ac_prog in dbtoepub
18238 do
18239   # Extract the first word of "$ac_prog", so it can be a program name with args.
18240 set dummy $ac_prog; ac_word=$2
18241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18242 $as_echo_n "checking for $ac_word... " >&6; }
18243 if ${ac_cv_path_DBTOEPUB+:} false; then :
18244   $as_echo_n "(cached) " >&6
18245 else
18246   case $DBTOEPUB in
18247   [\\/]* | ?:[\\/]*)
18248   ac_cv_path_DBTOEPUB="$DBTOEPUB" # Let the user override the test with a path.
18249   ;;
18250   *)
18251   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18252 for as_dir in $PATH
18253 do
18254   IFS=$as_save_IFS
18255   test -z "$as_dir" && as_dir=.
18256     for ac_exec_ext in '' $ac_executable_extensions; do
18257   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18258     ac_cv_path_DBTOEPUB="$as_dir/$ac_word$ac_exec_ext"
18259     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18260     break 2
18261   fi
18262 done
18263   done
18264 IFS=$as_save_IFS
18265
18266   ;;
18267 esac
18268 fi
18269 DBTOEPUB=$ac_cv_path_DBTOEPUB
18270 if test -n "$DBTOEPUB"; then
18271   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18272 $as_echo "$DBTOEPUB" >&6; }
18273 else
18274   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18275 $as_echo "no" >&6; }
18276 fi
18277
18278
18279   test -n "$DBTOEPUB" && break
18280 done
18281
18282 else
18283   # Report the value of DBTOEPUB in configure's output in all cases.
18284   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBTOEPUB" >&5
18285 $as_echo_n "checking for DBTOEPUB... " >&6; }
18286   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18287 $as_echo "$DBTOEPUB" >&6; }
18288 fi
18289
18290 if test -z "$XSLTPROC"; then
18291   for ac_prog in xsltproc
18292 do
18293   # Extract the first word of "$ac_prog", so it can be a program name with args.
18294 set dummy $ac_prog; ac_word=$2
18295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18296 $as_echo_n "checking for $ac_word... " >&6; }
18297 if ${ac_cv_path_XSLTPROC+:} false; then :
18298   $as_echo_n "(cached) " >&6
18299 else
18300   case $XSLTPROC in
18301   [\\/]* | ?:[\\/]*)
18302   ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
18303   ;;
18304   *)
18305   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18306 for as_dir in $PATH
18307 do
18308   IFS=$as_save_IFS
18309   test -z "$as_dir" && as_dir=.
18310     for ac_exec_ext in '' $ac_executable_extensions; do
18311   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18312     ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
18313     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18314     break 2
18315   fi
18316 done
18317   done
18318 IFS=$as_save_IFS
18319
18320   ;;
18321 esac
18322 fi
18323 XSLTPROC=$ac_cv_path_XSLTPROC
18324 if test -n "$XSLTPROC"; then
18325   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18326 $as_echo "$XSLTPROC" >&6; }
18327 else
18328   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18329 $as_echo "no" >&6; }
18330 fi
18331
18332
18333   test -n "$XSLTPROC" && break
18334 done
18335
18336 else
18337   # Report the value of XSLTPROC in configure's output in all cases.
18338   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSLTPROC" >&5
18339 $as_echo_n "checking for XSLTPROC... " >&6; }
18340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18341 $as_echo "$XSLTPROC" >&6; }
18342 fi
18343
18344 if test -z "$FOP"; then
18345   for ac_prog in fop
18346 do
18347   # Extract the first word of "$ac_prog", so it can be a program name with args.
18348 set dummy $ac_prog; ac_word=$2
18349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18350 $as_echo_n "checking for $ac_word... " >&6; }
18351 if ${ac_cv_path_FOP+:} false; then :
18352   $as_echo_n "(cached) " >&6
18353 else
18354   case $FOP in
18355   [\\/]* | ?:[\\/]*)
18356   ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
18357   ;;
18358   *)
18359   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18360 for as_dir in $PATH
18361 do
18362   IFS=$as_save_IFS
18363   test -z "$as_dir" && as_dir=.
18364     for ac_exec_ext in '' $ac_executable_extensions; do
18365   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18366     ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
18367     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18368     break 2
18369   fi
18370 done
18371   done
18372 IFS=$as_save_IFS
18373
18374   ;;
18375 esac
18376 fi
18377 FOP=$ac_cv_path_FOP
18378 if test -n "$FOP"; then
18379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18380 $as_echo "$FOP" >&6; }
18381 else
18382   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18383 $as_echo "no" >&6; }
18384 fi
18385
18386
18387   test -n "$FOP" && break
18388 done
18389
18390 else
18391   # Report the value of FOP in configure's output in all cases.
18392   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FOP" >&5
18393 $as_echo_n "checking for FOP... " >&6; }
18394   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18395 $as_echo "$FOP" >&6; }
18396 fi
18397
18398
18399 #
18400 # Check for test tools
18401 #
18402 if test "$enable_tap_tests" = yes; then
18403   # Check for necessary modules, unless user has specified the "prove" to use;
18404   # in that case it's her responsibility to have a working configuration.
18405   # (prove might be part of a different Perl installation than perl, eg on
18406   # MSys, so the result of AX_PROG_PERL_MODULES could be irrelevant anyway.)
18407   if test -z "$PROVE"; then
18408     # Test::More and Time::HiRes are supposed to be part of core Perl,
18409     # but some distros omit them in a minimal installation.
18410
18411
18412
18413
18414
18415
18416
18417
18418
18419
18420 # Make sure we have perl
18421 if test -z "$PERL"; then
18422 # Extract the first word of "perl", so it can be a program name with args.
18423 set dummy perl; ac_word=$2
18424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18425 $as_echo_n "checking for $ac_word... " >&6; }
18426 if ${ac_cv_prog_PERL+:} false; then :
18427   $as_echo_n "(cached) " >&6
18428 else
18429   if test -n "$PERL"; then
18430   ac_cv_prog_PERL="$PERL" # Let the user override the test.
18431 else
18432 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18433 for as_dir in $PATH
18434 do
18435   IFS=$as_save_IFS
18436   test -z "$as_dir" && as_dir=.
18437     for ac_exec_ext in '' $ac_executable_extensions; do
18438   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18439     ac_cv_prog_PERL="perl"
18440     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18441     break 2
18442   fi
18443 done
18444   done
18445 IFS=$as_save_IFS
18446
18447 fi
18448 fi
18449 PERL=$ac_cv_prog_PERL
18450 if test -n "$PERL"; then
18451   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
18452 $as_echo "$PERL" >&6; }
18453 else
18454   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18455 $as_echo "no" >&6; }
18456 fi
18457
18458
18459 fi
18460
18461 if test "x$PERL" != x; then
18462   ax_perl_modules_failed=0
18463   for ax_perl_module in 'IPC::Run' 'Test::More 0.87' 'Time::HiRes' ; do
18464     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl module $ax_perl_module" >&5
18465 $as_echo_n "checking for perl module $ax_perl_module... " >&6; }
18466
18467     # Would be nice to log result here, but can't rely on autoconf internals
18468     $PERL -e "use $ax_perl_module; exit" > /dev/null 2>&1
18469     if test $? -ne 0; then
18470       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18471 $as_echo "no" >&6; };
18472       ax_perl_modules_failed=1
18473    else
18474       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
18475 $as_echo "ok" >&6; };
18476     fi
18477   done
18478
18479   # Run optional shell commands
18480   if test "$ax_perl_modules_failed" = 0; then
18481     :
18482
18483   else
18484     :
18485     as_fn_error $? "Additional Perl modules are required to run TAP tests" "$LINENO" 5
18486   fi
18487 else
18488   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find perl" >&5
18489 $as_echo "$as_me: WARNING: could not find perl" >&2;}
18490 fi
18491   fi
18492   # Now make sure we know where prove is
18493   if test -z "$PROVE"; then
18494   for ac_prog in prove
18495 do
18496   # Extract the first word of "$ac_prog", so it can be a program name with args.
18497 set dummy $ac_prog; ac_word=$2
18498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18499 $as_echo_n "checking for $ac_word... " >&6; }
18500 if ${ac_cv_path_PROVE+:} false; then :
18501   $as_echo_n "(cached) " >&6
18502 else
18503   case $PROVE in
18504   [\\/]* | ?:[\\/]*)
18505   ac_cv_path_PROVE="$PROVE" # Let the user override the test with a path.
18506   ;;
18507   *)
18508   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18509 for as_dir in $PATH
18510 do
18511   IFS=$as_save_IFS
18512   test -z "$as_dir" && as_dir=.
18513     for ac_exec_ext in '' $ac_executable_extensions; do
18514   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18515     ac_cv_path_PROVE="$as_dir/$ac_word$ac_exec_ext"
18516     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18517     break 2
18518   fi
18519 done
18520   done
18521 IFS=$as_save_IFS
18522
18523   ;;
18524 esac
18525 fi
18526 PROVE=$ac_cv_path_PROVE
18527 if test -n "$PROVE"; then
18528   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
18529 $as_echo "$PROVE" >&6; }
18530 else
18531   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18532 $as_echo "no" >&6; }
18533 fi
18534
18535
18536   test -n "$PROVE" && break
18537 done
18538
18539 else
18540   # Report the value of PROVE in configure's output in all cases.
18541   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROVE" >&5
18542 $as_echo_n "checking for PROVE... " >&6; }
18543   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
18544 $as_echo "$PROVE" >&6; }
18545 fi
18546
18547   if test -z "$PROVE"; then
18548     as_fn_error $? "prove not found" "$LINENO" 5
18549   fi
18550 fi
18551
18552 # Thread testing
18553
18554 # We have to run the thread test near the end so we have all our symbols
18555 # defined.  Cross compiling throws a warning.
18556 #
18557 if test "$enable_thread_safety" = yes; then
18558 if test "$PORTNAME" != "win32"
18559 then
18560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking thread safety of required library functions" >&5
18561 $as_echo_n "checking thread safety of required library functions... " >&6; }
18562
18563 _CFLAGS="$CFLAGS"
18564 _LIBS="$LIBS"
18565 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
18566 LIBS="$LIBS $PTHREAD_LIBS"
18567 if test "$cross_compiling" = yes; then :
18568   { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
18569 $as_echo "maybe" >&6; }
18570   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
18571 *** Skipping thread test program because of cross-compile build.
18572 *** Run the program in src/test/thread on the target machine.
18573 " >&5
18574 $as_echo "$as_me: WARNING:
18575 *** Skipping thread test program because of cross-compile build.
18576 *** Run the program in src/test/thread on the target machine.
18577 " >&2;}
18578 else
18579   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18580 /* end confdefs.h.  */
18581 #include "$srcdir/src/test/thread/thread_test.c"
18582 _ACEOF
18583 if ac_fn_c_try_run "$LINENO"; then :
18584   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18585 $as_echo "yes" >&6; }
18586 else
18587   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18588 $as_echo "no" >&6; }
18589   as_fn_error $? "thread test program failed
18590 This platform is not thread-safe.  Check the file 'config.log' or compile
18591 and run src/test/thread/thread_test for the exact reason.
18592 Use --disable-thread-safety to disable thread safety." "$LINENO" 5
18593 fi
18594 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18595   conftest.$ac_objext conftest.beam conftest.$ac_ext
18596 fi
18597
18598 CFLAGS="$_CFLAGS"
18599 LIBS="$_LIBS"
18600 else
18601 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** skipping thread test on Win32" >&5
18602 $as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
18603 fi
18604 fi
18605
18606 # If compiler will take -Wl,--as-needed (or various platform-specific
18607 # spellings thereof) then add that to LDFLAGS.  This is much easier than
18608 # trying to filter LIBS to the minimum for each executable.
18609 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
18610 # libreadline; therefore we postpone testing it until we know what library
18611 # dependencies readline has.  The test code will try to link with $LIBS.
18612 if test "$with_readline" = yes; then
18613   link_test_func=readline
18614 else
18615   link_test_func=exit
18616 fi
18617
18618 if test "$PORTNAME" = "darwin"; then
18619   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
18620 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
18621 if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
18622   $as_echo_n "(cached) " >&6
18623 else
18624   pgac_save_LDFLAGS=$LDFLAGS
18625 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
18626 if test "$cross_compiling" = yes; then :
18627   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
18628 else
18629   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18630 /* end confdefs.h.  */
18631 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18632 int
18633 main ()
18634 {
18635
18636   ;
18637   return 0;
18638 }
18639 _ACEOF
18640 if ac_fn_c_try_run "$LINENO"; then :
18641   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
18642 else
18643   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
18644 fi
18645 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18646   conftest.$ac_objext conftest.beam conftest.$ac_ext
18647 fi
18648
18649 LDFLAGS="$pgac_save_LDFLAGS"
18650 fi
18651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
18652 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
18653 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
18654   LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
18655 fi
18656
18657 elif test "$PORTNAME" = "openbsd"; then
18658   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
18659 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
18660 if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
18661   $as_echo_n "(cached) " >&6
18662 else
18663   pgac_save_LDFLAGS=$LDFLAGS
18664 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
18665 if test "$cross_compiling" = yes; then :
18666   pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
18667 else
18668   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18669 /* end confdefs.h.  */
18670 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18671 int
18672 main ()
18673 {
18674
18675   ;
18676   return 0;
18677 }
18678 _ACEOF
18679 if ac_fn_c_try_run "$LINENO"; then :
18680   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
18681 else
18682   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
18683 fi
18684 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18685   conftest.$ac_objext conftest.beam conftest.$ac_ext
18686 fi
18687
18688 LDFLAGS="$pgac_save_LDFLAGS"
18689 fi
18690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
18691 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
18692 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
18693   LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
18694 fi
18695
18696 else
18697   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
18698 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
18699 if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
18700   $as_echo_n "(cached) " >&6
18701 else
18702   pgac_save_LDFLAGS=$LDFLAGS
18703 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
18704 if test "$cross_compiling" = yes; then :
18705   pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
18706 else
18707   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18708 /* end confdefs.h.  */
18709 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18710 int
18711 main ()
18712 {
18713
18714   ;
18715   return 0;
18716 }
18717 _ACEOF
18718 if ac_fn_c_try_run "$LINENO"; then :
18719   pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
18720 else
18721   pgac_cv_prog_cc_ldflags__Wl___as_needed=no
18722 fi
18723 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18724   conftest.$ac_objext conftest.beam conftest.$ac_ext
18725 fi
18726
18727 LDFLAGS="$pgac_save_LDFLAGS"
18728 fi
18729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
18730 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
18731 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
18732   LDFLAGS="$LDFLAGS -Wl,--as-needed"
18733 fi
18734
18735 fi
18736
18737 # Create compiler version string
18738 if test x"$GCC" = x"yes" ; then
18739   cc_string=`${CC} --version | sed q`
18740   case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
18741 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
18742   cc_string=`${CC} -V 2>&1 | sed q`
18743 else
18744   cc_string=$CC
18745 fi
18746
18747
18748 cat >>confdefs.h <<_ACEOF
18749 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
18750 _ACEOF
18751
18752
18753 # Supply a numeric version string for use by 3rd party add-ons
18754 # awk -F is a regex on some platforms, and not on others, so make "." a tab
18755 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
18756 tr '.' '        ' |
18757 $AWK '{printf "%d%04d", $1, $2}'`"
18758
18759 cat >>confdefs.h <<_ACEOF
18760 #define PG_VERSION_NUM $PG_VERSION_NUM
18761 _ACEOF
18762
18763
18764
18765
18766 # Begin output steps
18767
18768 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
18769 $as_echo "$as_me: using compiler=$cc_string" >&6;}
18770 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
18771 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
18772 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
18773 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
18774 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
18775 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
18776 # Currently only used when LLVM is used
18777 if test "$with_llvm" = yes ; then
18778    { $as_echo "$as_me:${as_lineno-$LINENO}: using CXX=$CXX" >&5
18779 $as_echo "$as_me: using CXX=$CXX" >&6;}
18780    { $as_echo "$as_me:${as_lineno-$LINENO}: using CXXFLAGS=$CXXFLAGS" >&5
18781 $as_echo "$as_me: using CXXFLAGS=$CXXFLAGS" >&6;}
18782    { $as_echo "$as_me:${as_lineno-$LINENO}: using CLANG=$CLANG" >&5
18783 $as_echo "$as_me: using CLANG=$CLANG" >&6;}
18784    { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&5
18785 $as_echo "$as_me: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&6;}
18786    { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&5
18787 $as_echo "$as_me: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&6;}
18788 fi
18789
18790 # prepare build tree if outside source tree
18791 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
18792 # Note 2: /bin/pwd might be better than shell's built-in at getting
18793 #         a symlink-free name.
18794 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
18795   vpath_build=no
18796 else
18797   vpath_build=yes
18798   if test "$no_create" != yes; then
18799     $as_echo_n "preparing build tree... " >&6
18800     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
18801     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
18802       || as_fn_error $? "failed" "$LINENO" 5
18803     { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
18804 $as_echo "done" >&6; }
18805   fi
18806 fi
18807
18808
18809
18810 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
18811
18812
18813 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}"
18814
18815
18816 if test "$PORTNAME" = "win32"; then
18817 ac_config_commands="$ac_config_commands check_win32_symlinks"
18818
18819 fi
18820
18821 ac_config_headers="$ac_config_headers src/include/pg_config.h"
18822
18823
18824 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
18825
18826
18827 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
18828
18829
18830 cat >confcache <<\_ACEOF
18831 # This file is a shell script that caches the results of configure
18832 # tests run on this system so they can be shared between configure
18833 # scripts and configure runs, see configure's option --config-cache.
18834 # It is not useful on other systems.  If it contains results you don't
18835 # want to keep, you may remove or edit it.
18836 #
18837 # config.status only pays attention to the cache file if you give it
18838 # the --recheck option to rerun configure.
18839 #
18840 # `ac_cv_env_foo' variables (set or unset) will be overridden when
18841 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18842 # following values.
18843
18844 _ACEOF
18845
18846 # The following way of writing the cache mishandles newlines in values,
18847 # but we know of no workaround that is simple, portable, and efficient.
18848 # So, we kill variables containing newlines.
18849 # Ultrix sh set writes to stderr and can't be redirected directly,
18850 # and sets the high bit in the cache file unless we assign to the vars.
18851 (
18852   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
18853     eval ac_val=\$$ac_var
18854     case $ac_val in #(
18855     *${as_nl}*)
18856       case $ac_var in #(
18857       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
18858 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
18859       esac
18860       case $ac_var in #(
18861       _ | IFS | as_nl) ;; #(
18862       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
18863       *) { eval $ac_var=; unset $ac_var;} ;;
18864       esac ;;
18865     esac
18866   done
18867
18868   (set) 2>&1 |
18869     case $as_nl`(ac_space=' '; set) 2>&1` in #(
18870     *${as_nl}ac_space=\ *)
18871       # `set' does not quote correctly, so add quotes: double-quote
18872       # substitution turns \\\\ into \\, and sed turns \\ into \.
18873       sed -n \
18874         "s/'/'\\\\''/g;
18875           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18876       ;; #(
18877     *)
18878       # `set' quotes correctly as required by POSIX, so do not add quotes.
18879       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
18880       ;;
18881     esac |
18882     sort
18883 ) |
18884   sed '
18885      /^ac_cv_env_/b end
18886      t clear
18887      :clear
18888      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18889      t end
18890      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18891      :end' >>confcache
18892 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
18893   if test -w "$cache_file"; then
18894     if test "x$cache_file" != "x/dev/null"; then
18895       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
18896 $as_echo "$as_me: updating cache $cache_file" >&6;}
18897       if test ! -f "$cache_file" || test -h "$cache_file"; then
18898         cat confcache >"$cache_file"
18899       else
18900         case $cache_file in #(
18901         */* | ?:*)
18902           mv -f confcache "$cache_file"$$ &&
18903           mv -f "$cache_file"$$ "$cache_file" ;; #(
18904         *)
18905           mv -f confcache "$cache_file" ;;
18906         esac
18907       fi
18908     fi
18909   else
18910     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
18911 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
18912   fi
18913 fi
18914 rm -f confcache
18915
18916 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18917 # Let make expand exec_prefix.
18918 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18919
18920 DEFS=-DHAVE_CONFIG_H
18921
18922 ac_libobjs=
18923 ac_ltlibobjs=
18924 U=
18925 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
18926   # 1. Remove the extension, and $U if already installed.
18927   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
18928   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
18929   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
18930   #    will be set to the directory where LIBOBJS objects are built.
18931   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
18932   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
18933 done
18934 LIBOBJS=$ac_libobjs
18935
18936 LTLIBOBJS=$ac_ltlibobjs
18937
18938
18939
18940
18941 : "${CONFIG_STATUS=./config.status}"
18942 ac_write_fail=0
18943 ac_clean_files_save=$ac_clean_files
18944 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18945 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
18946 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
18947 as_write_fail=0
18948 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
18949 #! $SHELL
18950 # Generated by $as_me.
18951 # Run this file to recreate the current configuration.
18952 # Compiler output produced by configure, useful for debugging
18953 # configure, is in config.log if it exists.
18954
18955 debug=false
18956 ac_cs_recheck=false
18957 ac_cs_silent=false
18958
18959 SHELL=\${CONFIG_SHELL-$SHELL}
18960 export SHELL
18961 _ASEOF
18962 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
18963 ## -------------------- ##
18964 ## M4sh Initialization. ##
18965 ## -------------------- ##
18966
18967 # Be more Bourne compatible
18968 DUALCASE=1; export DUALCASE # for MKS sh
18969 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
18970   emulate sh
18971   NULLCMD=:
18972   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
18973   # is contrary to our usage.  Disable this feature.
18974   alias -g '${1+"$@"}'='"$@"'
18975   setopt NO_GLOB_SUBST
18976 else
18977   case `(set -o) 2>/dev/null` in #(
18978   *posix*) :
18979     set -o posix ;; #(
18980   *) :
18981      ;;
18982 esac
18983 fi
18984
18985
18986 as_nl='
18987 '
18988 export as_nl
18989 # Printing a long string crashes Solaris 7 /usr/bin/printf.
18990 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
18991 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
18992 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
18993 # Prefer a ksh shell builtin over an external printf program on Solaris,
18994 # but without wasting forks for bash or zsh.
18995 if test -z "$BASH_VERSION$ZSH_VERSION" \
18996     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
18997   as_echo='print -r --'
18998   as_echo_n='print -rn --'
18999 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19000   as_echo='printf %s\n'
19001   as_echo_n='printf %s'
19002 else
19003   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19004     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19005     as_echo_n='/usr/ucb/echo -n'
19006   else
19007     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19008     as_echo_n_body='eval
19009       arg=$1;
19010       case $arg in #(
19011       *"$as_nl"*)
19012         expr "X$arg" : "X\\(.*\\)$as_nl";
19013         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19014       esac;
19015       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19016     '
19017     export as_echo_n_body
19018     as_echo_n='sh -c $as_echo_n_body as_echo'
19019   fi
19020   export as_echo_body
19021   as_echo='sh -c $as_echo_body as_echo'
19022 fi
19023
19024 # The user is always right.
19025 if test "${PATH_SEPARATOR+set}" != set; then
19026   PATH_SEPARATOR=:
19027   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19028     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19029       PATH_SEPARATOR=';'
19030   }
19031 fi
19032
19033
19034 # IFS
19035 # We need space, tab and new line, in precisely that order.  Quoting is
19036 # there to prevent editors from complaining about space-tab.
19037 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
19038 # splitting by setting IFS to empty value.)
19039 IFS=" ""        $as_nl"
19040
19041 # Find who we are.  Look in the path if we contain no directory separator.
19042 as_myself=
19043 case $0 in #((
19044   *[\\/]* ) as_myself=$0 ;;
19045   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19046 for as_dir in $PATH
19047 do
19048   IFS=$as_save_IFS
19049   test -z "$as_dir" && as_dir=.
19050     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19051   done
19052 IFS=$as_save_IFS
19053
19054      ;;
19055 esac
19056 # We did not find ourselves, most probably we were run as `sh COMMAND'
19057 # in which case we are not to be found in the path.
19058 if test "x$as_myself" = x; then
19059   as_myself=$0
19060 fi
19061 if test ! -f "$as_myself"; then
19062   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19063   exit 1
19064 fi
19065
19066 # Unset variables that we do not need and which cause bugs (e.g. in
19067 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
19068 # suppresses any "Segmentation fault" message there.  '((' could
19069 # trigger a bug in pdksh 5.2.14.
19070 for as_var in BASH_ENV ENV MAIL MAILPATH
19071 do eval test x\${$as_var+set} = xset \
19072   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19073 done
19074 PS1='$ '
19075 PS2='> '
19076 PS4='+ '
19077
19078 # NLS nuisances.
19079 LC_ALL=C
19080 export LC_ALL
19081 LANGUAGE=C
19082 export LANGUAGE
19083
19084 # CDPATH.
19085 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19086
19087
19088 # as_fn_error STATUS ERROR [LINENO LOG_FD]
19089 # ----------------------------------------
19090 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19091 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19092 # script with STATUS, using 1 if that was 0.
19093 as_fn_error ()
19094 {
19095   as_status=$1; test $as_status -eq 0 && as_status=1
19096   if test "$4"; then
19097     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19098     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19099   fi
19100   $as_echo "$as_me: error: $2" >&2
19101   as_fn_exit $as_status
19102 } # as_fn_error
19103
19104
19105 # as_fn_set_status STATUS
19106 # -----------------------
19107 # Set $? to STATUS, without forking.
19108 as_fn_set_status ()
19109 {
19110   return $1
19111 } # as_fn_set_status
19112
19113 # as_fn_exit STATUS
19114 # -----------------
19115 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19116 as_fn_exit ()
19117 {
19118   set +e
19119   as_fn_set_status $1
19120   exit $1
19121 } # as_fn_exit
19122
19123 # as_fn_unset VAR
19124 # ---------------
19125 # Portably unset VAR.
19126 as_fn_unset ()
19127 {
19128   { eval $1=; unset $1;}
19129 }
19130 as_unset=as_fn_unset
19131 # as_fn_append VAR VALUE
19132 # ----------------------
19133 # Append the text in VALUE to the end of the definition contained in VAR. Take
19134 # advantage of any shell optimizations that allow amortized linear growth over
19135 # repeated appends, instead of the typical quadratic growth present in naive
19136 # implementations.
19137 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19138   eval 'as_fn_append ()
19139   {
19140     eval $1+=\$2
19141   }'
19142 else
19143   as_fn_append ()
19144   {
19145     eval $1=\$$1\$2
19146   }
19147 fi # as_fn_append
19148
19149 # as_fn_arith ARG...
19150 # ------------------
19151 # Perform arithmetic evaluation on the ARGs, and store the result in the
19152 # global $as_val. Take advantage of shells that can avoid forks. The arguments
19153 # must be portable across $(()) and expr.
19154 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19155   eval 'as_fn_arith ()
19156   {
19157     as_val=$(( $* ))
19158   }'
19159 else
19160   as_fn_arith ()
19161   {
19162     as_val=`expr "$@" || test $? -eq 1`
19163   }
19164 fi # as_fn_arith
19165
19166
19167 if expr a : '\(a\)' >/dev/null 2>&1 &&
19168    test "X`expr 00001 : '.*\(...\)'`" = X001; then
19169   as_expr=expr
19170 else
19171   as_expr=false
19172 fi
19173
19174 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
19175   as_basename=basename
19176 else
19177   as_basename=false
19178 fi
19179
19180 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19181   as_dirname=dirname
19182 else
19183   as_dirname=false
19184 fi
19185
19186 as_me=`$as_basename -- "$0" ||
19187 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19188          X"$0" : 'X\(//\)$' \| \
19189          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19190 $as_echo X/"$0" |
19191     sed '/^.*\/\([^/][^/]*\)\/*$/{
19192             s//\1/
19193             q
19194           }
19195           /^X\/\(\/\/\)$/{
19196             s//\1/
19197             q
19198           }
19199           /^X\/\(\/\).*/{
19200             s//\1/
19201             q
19202           }
19203           s/.*/./; q'`
19204
19205 # Avoid depending upon Character Ranges.
19206 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19207 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19208 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19209 as_cr_digits='0123456789'
19210 as_cr_alnum=$as_cr_Letters$as_cr_digits
19211
19212 ECHO_C= ECHO_N= ECHO_T=
19213 case `echo -n x` in #(((((
19214 -n*)
19215   case `echo 'xy\c'` in
19216   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
19217   xy)  ECHO_C='\c';;
19218   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
19219        ECHO_T=' ';;
19220   esac;;
19221 *)
19222   ECHO_N='-n';;
19223 esac
19224
19225 rm -f conf$$ conf$$.exe conf$$.file
19226 if test -d conf$$.dir; then
19227   rm -f conf$$.dir/conf$$.file
19228 else
19229   rm -f conf$$.dir
19230   mkdir conf$$.dir 2>/dev/null
19231 fi
19232 if (echo >conf$$.file) 2>/dev/null; then
19233   if ln -s conf$$.file conf$$ 2>/dev/null; then
19234     as_ln_s='ln -s'
19235     # ... but there are two gotchas:
19236     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19237     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
19238     # In both cases, we have to default to `cp -pR'.
19239     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
19240       as_ln_s='cp -pR'
19241   elif ln conf$$.file conf$$ 2>/dev/null; then
19242     as_ln_s=ln
19243   else
19244     as_ln_s='cp -pR'
19245   fi
19246 else
19247   as_ln_s='cp -pR'
19248 fi
19249 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19250 rmdir conf$$.dir 2>/dev/null
19251
19252
19253 # as_fn_mkdir_p
19254 # -------------
19255 # Create "$as_dir" as a directory, including parents if necessary.
19256 as_fn_mkdir_p ()
19257 {
19258
19259   case $as_dir in #(
19260   -*) as_dir=./$as_dir;;
19261   esac
19262   test -d "$as_dir" || eval $as_mkdir_p || {
19263     as_dirs=
19264     while :; do
19265       case $as_dir in #(
19266       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19267       *) as_qdir=$as_dir;;
19268       esac
19269       as_dirs="'$as_qdir' $as_dirs"
19270       as_dir=`$as_dirname -- "$as_dir" ||
19271 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19272          X"$as_dir" : 'X\(//\)[^/]' \| \
19273          X"$as_dir" : 'X\(//\)$' \| \
19274          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19275 $as_echo X"$as_dir" |
19276     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19277             s//\1/
19278             q
19279           }
19280           /^X\(\/\/\)[^/].*/{
19281             s//\1/
19282             q
19283           }
19284           /^X\(\/\/\)$/{
19285             s//\1/
19286             q
19287           }
19288           /^X\(\/\).*/{
19289             s//\1/
19290             q
19291           }
19292           s/.*/./; q'`
19293       test -d "$as_dir" && break
19294     done
19295     test -z "$as_dirs" || eval "mkdir $as_dirs"
19296   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
19297
19298
19299 } # as_fn_mkdir_p
19300 if mkdir -p . 2>/dev/null; then
19301   as_mkdir_p='mkdir -p "$as_dir"'
19302 else
19303   test -d ./-p && rmdir ./-p
19304   as_mkdir_p=false
19305 fi
19306
19307
19308 # as_fn_executable_p FILE
19309 # -----------------------
19310 # Test if FILE is an executable regular file.
19311 as_fn_executable_p ()
19312 {
19313   test -f "$1" && test -x "$1"
19314 } # as_fn_executable_p
19315 as_test_x='test -x'
19316 as_executable_p=as_fn_executable_p
19317
19318 # Sed expression to map a string onto a valid CPP name.
19319 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19320
19321 # Sed expression to map a string onto a valid variable name.
19322 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19323
19324
19325 exec 6>&1
19326 ## ----------------------------------- ##
19327 ## Main body of $CONFIG_STATUS script. ##
19328 ## ----------------------------------- ##
19329 _ASEOF
19330 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19331
19332 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19333 # Save the log message, to keep $0 and so on meaningful, and to
19334 # report actual input values of CONFIG_FILES etc. instead of their
19335 # values after options handling.
19336 ac_log="
19337 This file was extended by PostgreSQL $as_me 11devel, which was
19338 generated by GNU Autoconf 2.69.  Invocation command line was
19339
19340   CONFIG_FILES    = $CONFIG_FILES
19341   CONFIG_HEADERS  = $CONFIG_HEADERS
19342   CONFIG_LINKS    = $CONFIG_LINKS
19343   CONFIG_COMMANDS = $CONFIG_COMMANDS
19344   $ $0 $@
19345
19346 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19347 "
19348
19349 _ACEOF
19350
19351 case $ac_config_files in *"
19352 "*) set x $ac_config_files; shift; ac_config_files=$*;;
19353 esac
19354
19355 case $ac_config_headers in *"
19356 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19357 esac
19358
19359
19360 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19361 # Files that config.status was made for.
19362 config_files="$ac_config_files"
19363 config_headers="$ac_config_headers"
19364 config_links="$ac_config_links"
19365 config_commands="$ac_config_commands"
19366
19367 _ACEOF
19368
19369 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19370 ac_cs_usage="\
19371 \`$as_me' instantiates files and other configuration actions
19372 from templates according to the current configuration.  Unless the files
19373 and actions are specified as TAGs, all are instantiated by default.
19374
19375 Usage: $0 [OPTION]... [TAG]...
19376
19377   -h, --help       print this help, then exit
19378   -V, --version    print version number and configuration settings, then exit
19379       --config     print configuration, then exit
19380   -q, --quiet, --silent
19381                    do not print progress messages
19382   -d, --debug      don't remove temporary files
19383       --recheck    update $as_me by reconfiguring in the same conditions
19384       --file=FILE[:TEMPLATE]
19385                    instantiate the configuration file FILE
19386       --header=FILE[:TEMPLATE]
19387                    instantiate the configuration header FILE
19388
19389 Configuration files:
19390 $config_files
19391
19392 Configuration headers:
19393 $config_headers
19394
19395 Configuration links:
19396 $config_links
19397
19398 Configuration commands:
19399 $config_commands
19400
19401 Report bugs to <pgsql-bugs@postgresql.org>."
19402
19403 _ACEOF
19404 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19405 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
19406 ac_cs_version="\\
19407 PostgreSQL config.status 11devel
19408 configured by $0, generated by GNU Autoconf 2.69,
19409   with options \\"\$ac_cs_config\\"
19410
19411 Copyright (C) 2012 Free Software Foundation, Inc.
19412 This config.status script is free software; the Free Software Foundation
19413 gives unlimited permission to copy, distribute and modify it."
19414
19415 ac_pwd='$ac_pwd'
19416 srcdir='$srcdir'
19417 INSTALL='$INSTALL'
19418 MKDIR_P='$MKDIR_P'
19419 AWK='$AWK'
19420 test -n "\$AWK" || AWK=awk
19421 _ACEOF
19422
19423 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19424 # The default lists apply if the user does not specify any file.
19425 ac_need_defaults=:
19426 while test $# != 0
19427 do
19428   case $1 in
19429   --*=?*)
19430     ac_option=`expr "X$1" : 'X\([^=]*\)='`
19431     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
19432     ac_shift=:
19433     ;;
19434   --*=)
19435     ac_option=`expr "X$1" : 'X\([^=]*\)='`
19436     ac_optarg=
19437     ac_shift=:
19438     ;;
19439   *)
19440     ac_option=$1
19441     ac_optarg=$2
19442     ac_shift=shift
19443     ;;
19444   esac
19445
19446   case $ac_option in
19447   # Handling of the options.
19448   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19449     ac_cs_recheck=: ;;
19450   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
19451     $as_echo "$ac_cs_version"; exit ;;
19452   --config | --confi | --conf | --con | --co | --c )
19453     $as_echo "$ac_cs_config"; exit ;;
19454   --debug | --debu | --deb | --de | --d | -d )
19455     debug=: ;;
19456   --file | --fil | --fi | --f )
19457     $ac_shift
19458     case $ac_optarg in
19459     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19460     '') as_fn_error $? "missing file argument" ;;
19461     esac
19462     as_fn_append CONFIG_FILES " '$ac_optarg'"
19463     ac_need_defaults=false;;
19464   --header | --heade | --head | --hea )
19465     $ac_shift
19466     case $ac_optarg in
19467     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19468     esac
19469     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
19470     ac_need_defaults=false;;
19471   --he | --h)
19472     # Conflict between --help and --header
19473     as_fn_error $? "ambiguous option: \`$1'
19474 Try \`$0 --help' for more information.";;
19475   --help | --hel | -h )
19476     $as_echo "$ac_cs_usage"; exit ;;
19477   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19478   | -silent | --silent | --silen | --sile | --sil | --si | --s)
19479     ac_cs_silent=: ;;
19480
19481   # This is an error.
19482   -*) as_fn_error $? "unrecognized option: \`$1'
19483 Try \`$0 --help' for more information." ;;
19484
19485   *) as_fn_append ac_config_targets " $1"
19486      ac_need_defaults=false ;;
19487
19488   esac
19489   shift
19490 done
19491
19492 ac_configure_extra_args=
19493
19494 if $ac_cs_silent; then
19495   exec 6>/dev/null
19496   ac_configure_extra_args="$ac_configure_extra_args --silent"
19497 fi
19498
19499 _ACEOF
19500 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19501 if \$ac_cs_recheck; then
19502   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19503   shift
19504   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
19505   CONFIG_SHELL='$SHELL'
19506   export CONFIG_SHELL
19507   exec "\$@"
19508 fi
19509
19510 _ACEOF
19511 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19512 exec 5>>config.log
19513 {
19514   echo
19515   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19516 ## Running $as_me. ##
19517 _ASBOX
19518   $as_echo "$ac_log"
19519 } >&5
19520
19521 _ACEOF
19522 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19523 _ACEOF
19524
19525 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19526
19527 # Handling of arguments.
19528 for ac_config_target in $ac_config_targets
19529 do
19530   case $ac_config_target in
19531     "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
19532     "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
19533     "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
19534     "src/backend/port/dynloader.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
19535     "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
19536     "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
19537     "src/include/dynloader.h") CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
19538     "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
19539     "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
19540     "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
19541     "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
19542     "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
19543     "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
19544
19545   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
19546   esac
19547 done
19548
19549
19550 # If the user did not use the arguments to specify the items to instantiate,
19551 # then the envvar interface is used.  Set only those that are not.
19552 # We use the long form for the default assignment because of an extremely
19553 # bizarre bug on SunOS 4.1.3.
19554 if $ac_need_defaults; then
19555   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19556   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19557   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
19558   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19559 fi
19560
19561 # Have a temporary directory for convenience.  Make it in the build tree
19562 # simply because there is no reason against having it here, and in addition,
19563 # creating and moving files from /tmp can sometimes cause problems.
19564 # Hook for its removal unless debugging.
19565 # Note that there is a small window in which the directory will not be cleaned:
19566 # after its creation but before its name has been assigned to `$tmp'.
19567 $debug ||
19568 {
19569   tmp= ac_tmp=
19570   trap 'exit_status=$?
19571   : "${ac_tmp:=$tmp}"
19572   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
19573 ' 0
19574   trap 'as_fn_exit 1' 1 2 13 15
19575 }
19576 # Create a (secure) tmp directory for tmp files.
19577
19578 {
19579   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
19580   test -d "$tmp"
19581 }  ||
19582 {
19583   tmp=./conf$$-$RANDOM
19584   (umask 077 && mkdir "$tmp")
19585 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
19586 ac_tmp=$tmp
19587
19588 # Set up the scripts for CONFIG_FILES section.
19589 # No need to generate them if there are no CONFIG_FILES.
19590 # This happens for instance with `./config.status config.h'.
19591 if test -n "$CONFIG_FILES"; then
19592
19593
19594 ac_cr=`echo X | tr X '\015'`
19595 # On cygwin, bash can eat \r inside `` if the user requested igncr.
19596 # But we know of no other shell where ac_cr would be empty at this
19597 # point, so we can use a bashism as a fallback.
19598 if test "x$ac_cr" = x; then
19599   eval ac_cr=\$\'\\r\'
19600 fi
19601 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
19602 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
19603   ac_cs_awk_cr='\\r'
19604 else
19605   ac_cs_awk_cr=$ac_cr
19606 fi
19607
19608 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
19609 _ACEOF
19610
19611
19612 {
19613   echo "cat >conf$$subs.awk <<_ACEOF" &&
19614   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
19615   echo "_ACEOF"
19616 } >conf$$subs.sh ||
19617   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19618 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
19619 ac_delim='%!_!# '
19620 for ac_last_try in false false false false false :; do
19621   . ./conf$$subs.sh ||
19622     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19623
19624   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
19625   if test $ac_delim_n = $ac_delim_num; then
19626     break
19627   elif $ac_last_try; then
19628     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19629   else
19630     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19631   fi
19632 done
19633 rm -f conf$$subs.sh
19634
19635 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19636 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
19637 _ACEOF
19638 sed -n '
19639 h
19640 s/^/S["/; s/!.*/"]=/
19641 p
19642 g
19643 s/^[^!]*!//
19644 :repl
19645 t repl
19646 s/'"$ac_delim"'$//
19647 t delim
19648 :nl
19649 h
19650 s/\(.\{148\}\)..*/\1/
19651 t more1
19652 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
19653 p
19654 n
19655 b repl
19656 :more1
19657 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19658 p
19659 g
19660 s/.\{148\}//
19661 t nl
19662 :delim
19663 h
19664 s/\(.\{148\}\)..*/\1/
19665 t more2
19666 s/["\\]/\\&/g; s/^/"/; s/$/"/
19667 p
19668 b
19669 :more2
19670 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19671 p
19672 g
19673 s/.\{148\}//
19674 t delim
19675 ' <conf$$subs.awk | sed '
19676 /^[^""]/{
19677   N
19678   s/\n//
19679 }
19680 ' >>$CONFIG_STATUS || ac_write_fail=1
19681 rm -f conf$$subs.awk
19682 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19683 _ACAWK
19684 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
19685   for (key in S) S_is_set[key] = 1
19686   FS = "\a"
19687
19688 }
19689 {
19690   line = $ 0
19691   nfields = split(line, field, "@")
19692   substed = 0
19693   len = length(field[1])
19694   for (i = 2; i < nfields; i++) {
19695     key = field[i]
19696     keylen = length(key)
19697     if (S_is_set[key]) {
19698       value = S[key]
19699       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
19700       len += length(value) + length(field[++i])
19701       substed = 1
19702     } else
19703       len += 1 + keylen
19704   }
19705
19706   print line
19707 }
19708
19709 _ACAWK
19710 _ACEOF
19711 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19712 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
19713   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
19714 else
19715   cat
19716 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
19717   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
19718 _ACEOF
19719
19720 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
19721 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
19722 # trailing colons and then remove the whole line if VPATH becomes empty
19723 # (actually we leave an empty line to preserve line numbers).
19724 if test "x$srcdir" = x.; then
19725   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
19726 h
19727 s///
19728 s/^/:/
19729 s/[      ]*$/:/
19730 s/:\$(srcdir):/:/g
19731 s/:\${srcdir}:/:/g
19732 s/:@srcdir@:/:/g
19733 s/^:*//
19734 s/:*$//
19735 x
19736 s/\(=[   ]*\).*/\1/
19737 G
19738 s/\n//
19739 s/^[^=]*=[       ]*$//
19740 }'
19741 fi
19742
19743 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19744 fi # test -n "$CONFIG_FILES"
19745
19746 # Set up the scripts for CONFIG_HEADERS section.
19747 # No need to generate them if there are no CONFIG_HEADERS.
19748 # This happens for instance with `./config.status Makefile'.
19749 if test -n "$CONFIG_HEADERS"; then
19750 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
19751 BEGIN {
19752 _ACEOF
19753
19754 # Transform confdefs.h into an awk script `defines.awk', embedded as
19755 # here-document in config.status, that substitutes the proper values into
19756 # config.h.in to produce config.h.
19757
19758 # Create a delimiter string that does not exist in confdefs.h, to ease
19759 # handling of long lines.
19760 ac_delim='%!_!# '
19761 for ac_last_try in false false :; do
19762   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
19763   if test -z "$ac_tt"; then
19764     break
19765   elif $ac_last_try; then
19766     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
19767   else
19768     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19769   fi
19770 done
19771
19772 # For the awk script, D is an array of macro values keyed by name,
19773 # likewise P contains macro parameters if any.  Preserve backslash
19774 # newline sequences.
19775
19776 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
19777 sed -n '
19778 s/.\{148\}/&'"$ac_delim"'/g
19779 t rset
19780 :rset
19781 s/^[     ]*#[    ]*define[       ][      ]*/ /
19782 t def
19783 d
19784 :def
19785 s/\\$//
19786 t bsnl
19787 s/["\\]/\\&/g
19788 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
19789 D["\1"]=" \3"/p
19790 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
19791 d
19792 :bsnl
19793 s/["\\]/\\&/g
19794 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
19795 D["\1"]=" \3\\\\\\n"\\/p
19796 t cont
19797 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
19798 t cont
19799 d
19800 :cont
19801 n
19802 s/.\{148\}/&'"$ac_delim"'/g
19803 t clear
19804 :clear
19805 s/\\$//
19806 t bsnlc
19807 s/["\\]/\\&/g; s/^/"/; s/$/"/p
19808 d
19809 :bsnlc
19810 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
19811 b cont
19812 ' <confdefs.h | sed '
19813 s/'"$ac_delim"'/"\\\
19814 "/g' >>$CONFIG_STATUS || ac_write_fail=1
19815
19816 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19817   for (key in D) D_is_set[key] = 1
19818   FS = "\a"
19819 }
19820 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
19821   line = \$ 0
19822   split(line, arg, " ")
19823   if (arg[1] == "#") {
19824     defundef = arg[2]
19825     mac1 = arg[3]
19826   } else {
19827     defundef = substr(arg[1], 2)
19828     mac1 = arg[2]
19829   }
19830   split(mac1, mac2, "(") #)
19831   macro = mac2[1]
19832   prefix = substr(line, 1, index(line, defundef) - 1)
19833   if (D_is_set[macro]) {
19834     # Preserve the white space surrounding the "#".
19835     print prefix "define", macro P[macro] D[macro]
19836     next
19837   } else {
19838     # Replace #undef with comments.  This is necessary, for example,
19839     # in the case of _POSIX_SOURCE, which is predefined and required
19840     # on some systems where configure will not decide to define it.
19841     if (defundef == "undef") {
19842       print "/*", prefix defundef, macro, "*/"
19843       next
19844     }
19845   }
19846 }
19847 { print }
19848 _ACAWK
19849 _ACEOF
19850 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19851   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
19852 fi # test -n "$CONFIG_HEADERS"
19853
19854
19855 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
19856 shift
19857 for ac_tag
19858 do
19859   case $ac_tag in
19860   :[FHLC]) ac_mode=$ac_tag; continue;;
19861   esac
19862   case $ac_mode$ac_tag in
19863   :[FHL]*:*);;
19864   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
19865   :[FH]-) ac_tag=-:-;;
19866   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
19867   esac
19868   ac_save_IFS=$IFS
19869   IFS=:
19870   set x $ac_tag
19871   IFS=$ac_save_IFS
19872   shift
19873   ac_file=$1
19874   shift
19875
19876   case $ac_mode in
19877   :L) ac_source=$1;;
19878   :[FH])
19879     ac_file_inputs=
19880     for ac_f
19881     do
19882       case $ac_f in
19883       -) ac_f="$ac_tmp/stdin";;
19884       *) # Look for the file first in the build tree, then in the source tree
19885          # (if the path is not absolute).  The absolute path cannot be DOS-style,
19886          # because $ac_f cannot contain `:'.
19887          test -f "$ac_f" ||
19888            case $ac_f in
19889            [\\/$]*) false;;
19890            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
19891            esac ||
19892            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
19893       esac
19894       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
19895       as_fn_append ac_file_inputs " '$ac_f'"
19896     done
19897
19898     # Let's still pretend it is `configure' which instantiates (i.e., don't
19899     # use $as_me), people would be surprised to read:
19900     #    /* config.h.  Generated by config.status.  */
19901     configure_input='Generated from '`
19902           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
19903         `' by configure.'
19904     if test x"$ac_file" != x-; then
19905       configure_input="$ac_file.  $configure_input"
19906       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
19907 $as_echo "$as_me: creating $ac_file" >&6;}
19908     fi
19909     # Neutralize special characters interpreted by sed in replacement strings.
19910     case $configure_input in #(
19911     *\&* | *\|* | *\\* )
19912        ac_sed_conf_input=`$as_echo "$configure_input" |
19913        sed 's/[\\\\&|]/\\\\&/g'`;; #(
19914     *) ac_sed_conf_input=$configure_input;;
19915     esac
19916
19917     case $ac_tag in
19918     *:-:* | *:-) cat >"$ac_tmp/stdin" \
19919       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
19920     esac
19921     ;;
19922   esac
19923
19924   ac_dir=`$as_dirname -- "$ac_file" ||
19925 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19926          X"$ac_file" : 'X\(//\)[^/]' \| \
19927          X"$ac_file" : 'X\(//\)$' \| \
19928          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
19929 $as_echo X"$ac_file" |
19930     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19931             s//\1/
19932             q
19933           }
19934           /^X\(\/\/\)[^/].*/{
19935             s//\1/
19936             q
19937           }
19938           /^X\(\/\/\)$/{
19939             s//\1/
19940             q
19941           }
19942           /^X\(\/\).*/{
19943             s//\1/
19944             q
19945           }
19946           s/.*/./; q'`
19947   as_dir="$ac_dir"; as_fn_mkdir_p
19948   ac_builddir=.
19949
19950 case "$ac_dir" in
19951 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
19952 *)
19953   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
19954   # A ".." for each directory in $ac_dir_suffix.
19955   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
19956   case $ac_top_builddir_sub in
19957   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
19958   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
19959   esac ;;
19960 esac
19961 ac_abs_top_builddir=$ac_pwd
19962 ac_abs_builddir=$ac_pwd$ac_dir_suffix
19963 # for backward compatibility:
19964 ac_top_builddir=$ac_top_build_prefix
19965
19966 case $srcdir in
19967   .)  # We are building in place.
19968     ac_srcdir=.
19969     ac_top_srcdir=$ac_top_builddir_sub
19970     ac_abs_top_srcdir=$ac_pwd ;;
19971   [\\/]* | ?:[\\/]* )  # Absolute name.
19972     ac_srcdir=$srcdir$ac_dir_suffix;
19973     ac_top_srcdir=$srcdir
19974     ac_abs_top_srcdir=$srcdir ;;
19975   *) # Relative name.
19976     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
19977     ac_top_srcdir=$ac_top_build_prefix$srcdir
19978     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
19979 esac
19980 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
19981
19982
19983   case $ac_mode in
19984   :F)
19985   #
19986   # CONFIG_FILE
19987   #
19988
19989   case $INSTALL in
19990   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19991   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
19992   esac
19993   ac_MKDIR_P=$MKDIR_P
19994   case $MKDIR_P in
19995   [\\/$]* | ?:[\\/]* ) ;;
19996   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
19997   esac
19998 _ACEOF
19999
20000 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20001 # If the template does not know about datarootdir, expand it.
20002 # FIXME: This hack should be removed a few years after 2.60.
20003 ac_datarootdir_hack=; ac_datarootdir_seen=
20004 ac_sed_dataroot='
20005 /datarootdir/ {
20006   p
20007   q
20008 }
20009 /@datadir@/p
20010 /@docdir@/p
20011 /@infodir@/p
20012 /@localedir@/p
20013 /@mandir@/p'
20014 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20015 *datarootdir*) ac_datarootdir_seen=yes;;
20016 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20017   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20018 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20019 _ACEOF
20020 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20021   ac_datarootdir_hack='
20022   s&@datadir@&$datadir&g
20023   s&@docdir@&$docdir&g
20024   s&@infodir@&$infodir&g
20025   s&@localedir@&$localedir&g
20026   s&@mandir@&$mandir&g
20027   s&\\\${datarootdir}&$datarootdir&g' ;;
20028 esac
20029 _ACEOF
20030
20031 # Neutralize VPATH when `$srcdir' = `.'.
20032 # Shell code in configure.ac might set extrasub.
20033 # FIXME: do we really want to maintain this feature?
20034 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20035 ac_sed_extra="$ac_vpsub
20036 $extrasub
20037 _ACEOF
20038 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20039 :t
20040 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20041 s|@configure_input@|$ac_sed_conf_input|;t t
20042 s&@top_builddir@&$ac_top_builddir_sub&;t t
20043 s&@top_build_prefix@&$ac_top_build_prefix&;t t
20044 s&@srcdir@&$ac_srcdir&;t t
20045 s&@abs_srcdir@&$ac_abs_srcdir&;t t
20046 s&@top_srcdir@&$ac_top_srcdir&;t t
20047 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20048 s&@builddir@&$ac_builddir&;t t
20049 s&@abs_builddir@&$ac_abs_builddir&;t t
20050 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20051 s&@INSTALL@&$ac_INSTALL&;t t
20052 s&@MKDIR_P@&$ac_MKDIR_P&;t t
20053 $ac_datarootdir_hack
20054 "
20055 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
20056   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20057
20058 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20059   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20060   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
20061       "$ac_tmp/out"`; test -z "$ac_out"; } &&
20062   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20063 which seems to be undefined.  Please make sure it is defined" >&5
20064 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20065 which seems to be undefined.  Please make sure it is defined" >&2;}
20066
20067   rm -f "$ac_tmp/stdin"
20068   case $ac_file in
20069   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20070   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20071   esac \
20072   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20073  ;;
20074   :H)
20075   #
20076   # CONFIG_HEADER
20077   #
20078   if test x"$ac_file" != x-; then
20079     {
20080       $as_echo "/* $configure_input  */" \
20081       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20082     } >"$ac_tmp/config.h" \
20083       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20084     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20085       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20086 $as_echo "$as_me: $ac_file is unchanged" >&6;}
20087     else
20088       rm -f "$ac_file"
20089       mv "$ac_tmp/config.h" "$ac_file" \
20090         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20091     fi
20092   else
20093     $as_echo "/* $configure_input  */" \
20094       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20095       || as_fn_error $? "could not create -" "$LINENO" 5
20096   fi
20097  ;;
20098   :L)
20099   #
20100   # CONFIG_LINK
20101   #
20102
20103   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20104     :
20105   else
20106     # Prefer the file from the source tree if names are identical.
20107     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20108       ac_source=$srcdir/$ac_source
20109     fi
20110
20111     { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20112 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
20113
20114     if test ! -r "$ac_source"; then
20115       as_fn_error $? "$ac_source: file not found" "$LINENO" 5
20116     fi
20117     rm -f "$ac_file"
20118
20119     # Try a relative symlink, then a hard link, then a copy.
20120     case $ac_source in
20121     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20122         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20123     esac
20124     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20125       ln "$ac_source" "$ac_file" 2>/dev/null ||
20126       cp -p "$ac_source" "$ac_file" ||
20127       as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
20128   fi
20129  ;;
20130   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20131 $as_echo "$as_me: executing $ac_file commands" >&6;}
20132  ;;
20133   esac
20134
20135
20136   case $ac_file$ac_mode in
20137     "check_win32_symlinks":C)
20138 # Links sometimes fail undetected on Mingw -
20139 # so here we detect it and warn the user
20140 for FILE in $CONFIG_LINKS
20141  do
20142         # test -e works for symlinks in the MinGW console
20143         test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
20144 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
20145  done
20146  ;;
20147     "src/include/pg_config.h":H)
20148 # Update timestamp for pg_config.h (see Makefile.global)
20149 echo >src/include/stamp-h
20150  ;;
20151     "src/include/pg_config_ext.h":H)
20152 # Update timestamp for pg_config_ext.h (see Makefile.global)
20153 echo >src/include/stamp-ext-h
20154  ;;
20155     "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
20156
20157   esac
20158 done # for ac_tag
20159
20160
20161 as_fn_exit 0
20162 _ACEOF
20163 ac_clean_files=$ac_clean_files_save
20164
20165 test $ac_write_fail = 0 ||
20166   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
20167
20168
20169 # configure is writing to config.log, and then calls config.status.
20170 # config.status does its own redirection, appending to config.log.
20171 # Unfortunately, on DOS this fails, as config.log is still kept open
20172 # by configure, so config.status won't be able to write to it; its
20173 # output is simply discarded.  So we exec the FD to /dev/null,
20174 # effectively closing config.log, so it can be properly (re)opened and
20175 # appended to by config.status.  When coming back to configure, we
20176 # need to make the FD available again.
20177 if test "$no_create" != yes; then
20178   ac_cs_success=:
20179   ac_config_status_args=
20180   test "$silent" = yes &&
20181     ac_config_status_args="$ac_config_status_args --quiet"
20182   exec 5>/dev/null
20183   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20184   exec 5>>config.log
20185   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20186   # would make configure fail if this is the last instruction.
20187   $ac_cs_success || as_fn_exit 1
20188 fi
20189 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20190   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20191 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
20192 fi
20193