]> granicus.if.org Git - postgresql/blob - configure
Add note about diskspace usage of pg_commit_ts
[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-2017, 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 OSX
634 XSLTPROC
635 XMLLINT
636 DBTOEPUB
637 have_docbook
638 NSGMLS
639 TCL_SHLIB_LD_LIBS
640 TCL_SHARED_BUILD
641 TCL_LIB_SPEC
642 TCL_LIBS
643 TCL_INCLUDE_SPEC
644 TCL_CONFIG_SH
645 TCLSH
646 XGETTEXT
647 MSGMERGE
648 MSGFMT_FLAGS
649 MSGFMT
650 PG_CRC32C_OBJS
651 CFLAGS_SSE42
652 have_win32_dbghelp
653 HAVE_IPV6
654 LIBOBJS
655 UUID_LIBS
656 LDAP_LIBS_BE
657 LDAP_LIBS_FE
658 PTHREAD_CFLAGS
659 PTHREAD_LIBS
660 PTHREAD_CC
661 ax_pthread_config
662 ZIC
663 python_additional_libs
664 python_libspec
665 python_libdir
666 python_includespec
667 python_version
668 python_majorversion
669 PYTHON
670 perl_embed_ldflags
671 perl_embed_ccflags
672 perl_useshrplib
673 perl_privlibexp
674 perl_archlibexp
675 PERL
676 FLEXFLAGS
677 FLEX
678 BISONFLAGS
679 BISON
680 MKDIR_P
681 AWK
682 LN_S
683 TAR
684 install_bin
685 INSTALL_DATA
686 INSTALL_SCRIPT
687 INSTALL_PROGRAM
688 WINDRES
689 DLLWRAP
690 DLLTOOL
691 AR
692 STRIP_SHARED_LIB
693 STRIP_STATIC_LIB
694 STRIP
695 RANLIB
696 with_gnu_ld
697 LD
698 LDFLAGS_SL
699 LDFLAGS_EX
700 ELF_SYS
701 EGREP
702 GREP
703 with_zlib
704 with_system_tzdata
705 with_libxslt
706 with_libxml
707 XML2_CONFIG
708 UUID_EXTRA_OBJS
709 with_uuid
710 with_systemd
711 with_selinux
712 with_openssl
713 krb_srvtab
714 with_python
715 with_perl
716 with_tcl
717 ICU_LIBS
718 ICU_CFLAGS
719 PKG_CONFIG_LIBDIR
720 PKG_CONFIG_PATH
721 PKG_CONFIG
722 with_icu
723 enable_thread_safety
724 INCLUDES
725 autodepend
726 TAS
727 GCC
728 CPP
729 CFLAGS_VECTOR
730 SUN_STUDIO_CC
731 OBJEXT
732 EXEEXT
733 ac_ct_CC
734 CPPFLAGS
735 LDFLAGS
736 CFLAGS
737 CC
738 enable_tap_tests
739 enable_dtrace
740 DTRACEFLAGS
741 DTRACE
742 enable_coverage
743 GENHTML
744 LCOV
745 GCOV
746 enable_debug
747 enable_strong_random
748 enable_rpath
749 default_port
750 WANTED_LANGUAGES
751 enable_nls
752 PORTNAME
753 host_os
754 host_vendor
755 host_cpu
756 host
757 build_os
758 build_vendor
759 build_cpu
760 build
761 PG_MAJORVERSION
762 configure_args
763 target_alias
764 host_alias
765 build_alias
766 LIBS
767 ECHO_T
768 ECHO_N
769 ECHO_C
770 DEFS
771 mandir
772 localedir
773 libdir
774 psdir
775 pdfdir
776 dvidir
777 htmldir
778 infodir
779 docdir
780 oldincludedir
781 includedir
782 localstatedir
783 sharedstatedir
784 sysconfdir
785 datadir
786 datarootdir
787 libexecdir
788 sbindir
789 bindir
790 program_transform_name
791 prefix
792 exec_prefix
793 PACKAGE_URL
794 PACKAGE_BUGREPORT
795 PACKAGE_STRING
796 PACKAGE_VERSION
797 PACKAGE_TARNAME
798 PACKAGE_NAME
799 PATH_SEPARATOR
800 SHELL'
801 ac_subst_files=''
802 ac_user_opts='
803 enable_option_checking
804 with_extra_version
805 with_template
806 with_includes
807 with_libraries
808 with_libs
809 enable_integer_datetimes
810 enable_nls
811 with_pgport
812 enable_rpath
813 enable_spinlocks
814 enable_atomics
815 enable_strong_random
816 enable_debug
817 enable_profiling
818 enable_coverage
819 enable_dtrace
820 enable_tap_tests
821 with_blocksize
822 with_segsize
823 with_wal_blocksize
824 with_wal_segsize
825 with_CC
826 enable_depend
827 enable_cassert
828 enable_thread_safety
829 with_icu
830 with_tcl
831 with_tclconfig
832 with_perl
833 with_python
834 with_gssapi
835 with_krb_srvnam
836 with_pam
837 with_bsd_auth
838 with_ldap
839 with_bonjour
840 with_openssl
841 with_selinux
842 with_systemd
843 with_readline
844 with_libedit_preferred
845 with_uuid
846 with_ossp_uuid
847 with_libxml
848 with_libxslt
849 with_system_tzdata
850 with_zlib
851 with_gnu_ld
852 enable_largefile
853 enable_float4_byval
854 enable_float8_byval
855 '
856       ac_precious_vars='build_alias
857 host_alias
858 target_alias
859 CC
860 CFLAGS
861 LDFLAGS
862 LIBS
863 CPPFLAGS
864 CPP
865 PKG_CONFIG
866 PKG_CONFIG_PATH
867 PKG_CONFIG_LIBDIR
868 ICU_CFLAGS
869 ICU_LIBS
870 LDFLAGS_EX
871 LDFLAGS_SL'
872
873
874 # Initialize some variables set by options.
875 ac_init_help=
876 ac_init_version=false
877 ac_unrecognized_opts=
878 ac_unrecognized_sep=
879 # The variables have the same names as the options, with
880 # dashes changed to underlines.
881 cache_file=/dev/null
882 exec_prefix=NONE
883 no_create=
884 no_recursion=
885 prefix=NONE
886 program_prefix=NONE
887 program_suffix=NONE
888 program_transform_name=s,x,x,
889 silent=
890 site=
891 srcdir=
892 verbose=
893 x_includes=NONE
894 x_libraries=NONE
895
896 # Installation directory options.
897 # These are left unexpanded so users can "make install exec_prefix=/foo"
898 # and all the variables that are supposed to be based on exec_prefix
899 # by default will actually change.
900 # Use braces instead of parens because sh, perl, etc. also accept them.
901 # (The list follows the same order as the GNU Coding Standards.)
902 bindir='${exec_prefix}/bin'
903 sbindir='${exec_prefix}/sbin'
904 libexecdir='${exec_prefix}/libexec'
905 datarootdir='${prefix}/share'
906 datadir='${datarootdir}'
907 sysconfdir='${prefix}/etc'
908 sharedstatedir='${prefix}/com'
909 localstatedir='${prefix}/var'
910 includedir='${prefix}/include'
911 oldincludedir='/usr/include'
912 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
913 infodir='${datarootdir}/info'
914 htmldir='${docdir}'
915 dvidir='${docdir}'
916 pdfdir='${docdir}'
917 psdir='${docdir}'
918 libdir='${exec_prefix}/lib'
919 localedir='${datarootdir}/locale'
920 mandir='${datarootdir}/man'
921
922 ac_prev=
923 ac_dashdash=
924 for ac_option
925 do
926   # If the previous option needs an argument, assign it.
927   if test -n "$ac_prev"; then
928     eval $ac_prev=\$ac_option
929     ac_prev=
930     continue
931   fi
932
933   case $ac_option in
934   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
935   *=)   ac_optarg= ;;
936   *)    ac_optarg=yes ;;
937   esac
938
939   # Accept the important Cygnus configure options, so we can diagnose typos.
940
941   case $ac_dashdash$ac_option in
942   --)
943     ac_dashdash=yes ;;
944
945   -bindir | --bindir | --bindi | --bind | --bin | --bi)
946     ac_prev=bindir ;;
947   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
948     bindir=$ac_optarg ;;
949
950   -build | --build | --buil | --bui | --bu)
951     ac_prev=build_alias ;;
952   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
953     build_alias=$ac_optarg ;;
954
955   -cache-file | --cache-file | --cache-fil | --cache-fi \
956   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
957     ac_prev=cache_file ;;
958   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
959   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
960     cache_file=$ac_optarg ;;
961
962   --config-cache | -C)
963     cache_file=config.cache ;;
964
965   -datadir | --datadir | --datadi | --datad)
966     ac_prev=datadir ;;
967   -datadir=* | --datadir=* | --datadi=* | --datad=*)
968     datadir=$ac_optarg ;;
969
970   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
971   | --dataroo | --dataro | --datar)
972     ac_prev=datarootdir ;;
973   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
974   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
975     datarootdir=$ac_optarg ;;
976
977   -disable-* | --disable-*)
978     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
979     # Reject names that are not valid shell variable names.
980     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
981       as_fn_error $? "invalid feature name: $ac_useropt"
982     ac_useropt_orig=$ac_useropt
983     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
984     case $ac_user_opts in
985       *"
986 "enable_$ac_useropt"
987 "*) ;;
988       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
989          ac_unrecognized_sep=', ';;
990     esac
991     eval enable_$ac_useropt=no ;;
992
993   -docdir | --docdir | --docdi | --doc | --do)
994     ac_prev=docdir ;;
995   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
996     docdir=$ac_optarg ;;
997
998   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
999     ac_prev=dvidir ;;
1000   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1001     dvidir=$ac_optarg ;;
1002
1003   -enable-* | --enable-*)
1004     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1005     # Reject names that are not valid shell variable names.
1006     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1007       as_fn_error $? "invalid feature name: $ac_useropt"
1008     ac_useropt_orig=$ac_useropt
1009     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1010     case $ac_user_opts in
1011       *"
1012 "enable_$ac_useropt"
1013 "*) ;;
1014       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1015          ac_unrecognized_sep=', ';;
1016     esac
1017     eval enable_$ac_useropt=\$ac_optarg ;;
1018
1019   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1020   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1021   | --exec | --exe | --ex)
1022     ac_prev=exec_prefix ;;
1023   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1024   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1025   | --exec=* | --exe=* | --ex=*)
1026     exec_prefix=$ac_optarg ;;
1027
1028   -gas | --gas | --ga | --g)
1029     # Obsolete; use --with-gas.
1030     with_gas=yes ;;
1031
1032   -help | --help | --hel | --he | -h)
1033     ac_init_help=long ;;
1034   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1035     ac_init_help=recursive ;;
1036   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1037     ac_init_help=short ;;
1038
1039   -host | --host | --hos | --ho)
1040     ac_prev=host_alias ;;
1041   -host=* | --host=* | --hos=* | --ho=*)
1042     host_alias=$ac_optarg ;;
1043
1044   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1045     ac_prev=htmldir ;;
1046   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1047   | --ht=*)
1048     htmldir=$ac_optarg ;;
1049
1050   -includedir | --includedir | --includedi | --included | --include \
1051   | --includ | --inclu | --incl | --inc)
1052     ac_prev=includedir ;;
1053   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1054   | --includ=* | --inclu=* | --incl=* | --inc=*)
1055     includedir=$ac_optarg ;;
1056
1057   -infodir | --infodir | --infodi | --infod | --info | --inf)
1058     ac_prev=infodir ;;
1059   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1060     infodir=$ac_optarg ;;
1061
1062   -libdir | --libdir | --libdi | --libd)
1063     ac_prev=libdir ;;
1064   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1065     libdir=$ac_optarg ;;
1066
1067   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1068   | --libexe | --libex | --libe)
1069     ac_prev=libexecdir ;;
1070   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1071   | --libexe=* | --libex=* | --libe=*)
1072     libexecdir=$ac_optarg ;;
1073
1074   -localedir | --localedir | --localedi | --localed | --locale)
1075     ac_prev=localedir ;;
1076   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1077     localedir=$ac_optarg ;;
1078
1079   -localstatedir | --localstatedir | --localstatedi | --localstated \
1080   | --localstate | --localstat | --localsta | --localst | --locals)
1081     ac_prev=localstatedir ;;
1082   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1083   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1084     localstatedir=$ac_optarg ;;
1085
1086   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1087     ac_prev=mandir ;;
1088   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1089     mandir=$ac_optarg ;;
1090
1091   -nfp | --nfp | --nf)
1092     # Obsolete; use --without-fp.
1093     with_fp=no ;;
1094
1095   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1096   | --no-cr | --no-c | -n)
1097     no_create=yes ;;
1098
1099   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1100   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1101     no_recursion=yes ;;
1102
1103   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1104   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1105   | --oldin | --oldi | --old | --ol | --o)
1106     ac_prev=oldincludedir ;;
1107   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1108   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1109   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1110     oldincludedir=$ac_optarg ;;
1111
1112   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1113     ac_prev=prefix ;;
1114   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1115     prefix=$ac_optarg ;;
1116
1117   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1118   | --program-pre | --program-pr | --program-p)
1119     ac_prev=program_prefix ;;
1120   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1121   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1122     program_prefix=$ac_optarg ;;
1123
1124   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1125   | --program-suf | --program-su | --program-s)
1126     ac_prev=program_suffix ;;
1127   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1128   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1129     program_suffix=$ac_optarg ;;
1130
1131   -program-transform-name | --program-transform-name \
1132   | --program-transform-nam | --program-transform-na \
1133   | --program-transform-n | --program-transform- \
1134   | --program-transform | --program-transfor \
1135   | --program-transfo | --program-transf \
1136   | --program-trans | --program-tran \
1137   | --progr-tra | --program-tr | --program-t)
1138     ac_prev=program_transform_name ;;
1139   -program-transform-name=* | --program-transform-name=* \
1140   | --program-transform-nam=* | --program-transform-na=* \
1141   | --program-transform-n=* | --program-transform-=* \
1142   | --program-transform=* | --program-transfor=* \
1143   | --program-transfo=* | --program-transf=* \
1144   | --program-trans=* | --program-tran=* \
1145   | --progr-tra=* | --program-tr=* | --program-t=*)
1146     program_transform_name=$ac_optarg ;;
1147
1148   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1149     ac_prev=pdfdir ;;
1150   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1151     pdfdir=$ac_optarg ;;
1152
1153   -psdir | --psdir | --psdi | --psd | --ps)
1154     ac_prev=psdir ;;
1155   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1156     psdir=$ac_optarg ;;
1157
1158   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1159   | -silent | --silent | --silen | --sile | --sil)
1160     silent=yes ;;
1161
1162   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1163     ac_prev=sbindir ;;
1164   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1165   | --sbi=* | --sb=*)
1166     sbindir=$ac_optarg ;;
1167
1168   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1169   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1170   | --sharedst | --shareds | --shared | --share | --shar \
1171   | --sha | --sh)
1172     ac_prev=sharedstatedir ;;
1173   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1174   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1175   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1176   | --sha=* | --sh=*)
1177     sharedstatedir=$ac_optarg ;;
1178
1179   -site | --site | --sit)
1180     ac_prev=site ;;
1181   -site=* | --site=* | --sit=*)
1182     site=$ac_optarg ;;
1183
1184   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1185     ac_prev=srcdir ;;
1186   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1187     srcdir=$ac_optarg ;;
1188
1189   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1190   | --syscon | --sysco | --sysc | --sys | --sy)
1191     ac_prev=sysconfdir ;;
1192   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1193   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1194     sysconfdir=$ac_optarg ;;
1195
1196   -target | --target | --targe | --targ | --tar | --ta | --t)
1197     ac_prev=target_alias ;;
1198   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1199     target_alias=$ac_optarg ;;
1200
1201   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1202     verbose=yes ;;
1203
1204   -version | --version | --versio | --versi | --vers | -V)
1205     ac_init_version=: ;;
1206
1207   -with-* | --with-*)
1208     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1209     # Reject names that are not valid shell variable names.
1210     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1211       as_fn_error $? "invalid package name: $ac_useropt"
1212     ac_useropt_orig=$ac_useropt
1213     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1214     case $ac_user_opts in
1215       *"
1216 "with_$ac_useropt"
1217 "*) ;;
1218       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1219          ac_unrecognized_sep=', ';;
1220     esac
1221     eval with_$ac_useropt=\$ac_optarg ;;
1222
1223   -without-* | --without-*)
1224     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1225     # Reject names that are not valid shell variable names.
1226     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1227       as_fn_error $? "invalid package name: $ac_useropt"
1228     ac_useropt_orig=$ac_useropt
1229     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1230     case $ac_user_opts in
1231       *"
1232 "with_$ac_useropt"
1233 "*) ;;
1234       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1235          ac_unrecognized_sep=', ';;
1236     esac
1237     eval with_$ac_useropt=no ;;
1238
1239   --x)
1240     # Obsolete; use --with-x.
1241     with_x=yes ;;
1242
1243   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1244   | --x-incl | --x-inc | --x-in | --x-i)
1245     ac_prev=x_includes ;;
1246   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1247   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1248     x_includes=$ac_optarg ;;
1249
1250   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1251   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1252     ac_prev=x_libraries ;;
1253   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1254   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1255     x_libraries=$ac_optarg ;;
1256
1257   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1258 Try \`$0 --help' for more information"
1259     ;;
1260
1261   *=*)
1262     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1263     # Reject names that are not valid shell variable names.
1264     case $ac_envvar in #(
1265       '' | [0-9]* | *[!_$as_cr_alnum]* )
1266       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1267     esac
1268     eval $ac_envvar=\$ac_optarg
1269     export $ac_envvar ;;
1270
1271   *)
1272     # FIXME: should be removed in autoconf 3.0.
1273     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1274     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1275       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1276     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1277     ;;
1278
1279   esac
1280 done
1281
1282 if test -n "$ac_prev"; then
1283   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1284   as_fn_error $? "missing argument to $ac_option"
1285 fi
1286
1287 if test -n "$ac_unrecognized_opts"; then
1288   case $enable_option_checking in
1289     no) ;;
1290     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1291     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1292   esac
1293 fi
1294
1295 # Check all directory arguments for consistency.
1296 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1297                 datadir sysconfdir sharedstatedir localstatedir includedir \
1298                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1299                 libdir localedir mandir
1300 do
1301   eval ac_val=\$$ac_var
1302   # Remove trailing slashes.
1303   case $ac_val in
1304     */ )
1305       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1306       eval $ac_var=\$ac_val;;
1307   esac
1308   # Be sure to have absolute directory names.
1309   case $ac_val in
1310     [\\/$]* | ?:[\\/]* )  continue;;
1311     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1312   esac
1313   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1314 done
1315
1316 # There might be people who depend on the old broken behavior: `$host'
1317 # used to hold the argument of --host etc.
1318 # FIXME: To remove some day.
1319 build=$build_alias
1320 host=$host_alias
1321 target=$target_alias
1322
1323 # FIXME: To remove some day.
1324 if test "x$host_alias" != x; then
1325   if test "x$build_alias" = x; then
1326     cross_compiling=maybe
1327   elif test "x$build_alias" != "x$host_alias"; then
1328     cross_compiling=yes
1329   fi
1330 fi
1331
1332 ac_tool_prefix=
1333 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1334
1335 test "$silent" = yes && exec 6>/dev/null
1336
1337
1338 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1339 ac_ls_di=`ls -di .` &&
1340 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1341   as_fn_error $? "working directory cannot be determined"
1342 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1343   as_fn_error $? "pwd does not report name of working directory"
1344
1345
1346 # Find the source files, if location was not specified.
1347 if test -z "$srcdir"; then
1348   ac_srcdir_defaulted=yes
1349   # Try the directory containing this script, then the parent directory.
1350   ac_confdir=`$as_dirname -- "$as_myself" ||
1351 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1352          X"$as_myself" : 'X\(//\)[^/]' \| \
1353          X"$as_myself" : 'X\(//\)$' \| \
1354          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1355 $as_echo X"$as_myself" |
1356     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1357             s//\1/
1358             q
1359           }
1360           /^X\(\/\/\)[^/].*/{
1361             s//\1/
1362             q
1363           }
1364           /^X\(\/\/\)$/{
1365             s//\1/
1366             q
1367           }
1368           /^X\(\/\).*/{
1369             s//\1/
1370             q
1371           }
1372           s/.*/./; q'`
1373   srcdir=$ac_confdir
1374   if test ! -r "$srcdir/$ac_unique_file"; then
1375     srcdir=..
1376   fi
1377 else
1378   ac_srcdir_defaulted=no
1379 fi
1380 if test ! -r "$srcdir/$ac_unique_file"; then
1381   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1382   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1383 fi
1384 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1385 ac_abs_confdir=`(
1386         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1387         pwd)`
1388 # When building in place, set srcdir=.
1389 if test "$ac_abs_confdir" = "$ac_pwd"; then
1390   srcdir=.
1391 fi
1392 # Remove unnecessary trailing slashes from srcdir.
1393 # Double slashes in file names in object file debugging info
1394 # mess up M-x gdb in Emacs.
1395 case $srcdir in
1396 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1397 esac
1398 for ac_var in $ac_precious_vars; do
1399   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1400   eval ac_env_${ac_var}_value=\$${ac_var}
1401   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1402   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1403 done
1404
1405 #
1406 # Report the --help message.
1407 #
1408 if test "$ac_init_help" = "long"; then
1409   # Omit some internal or obsolete options to make the list less imposing.
1410   # This message is too long to be a string in the A/UX 3.1 sh.
1411   cat <<_ACEOF
1412 \`configure' configures PostgreSQL 11devel to adapt to many kinds of systems.
1413
1414 Usage: $0 [OPTION]... [VAR=VALUE]...
1415
1416 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1417 VAR=VALUE.  See below for descriptions of some of the useful variables.
1418
1419 Defaults for the options are specified in brackets.
1420
1421 Configuration:
1422   -h, --help              display this help and exit
1423       --help=short        display options specific to this package
1424       --help=recursive    display the short help of all the included packages
1425   -V, --version           display version information and exit
1426   -q, --quiet, --silent   do not print \`checking ...' messages
1427       --cache-file=FILE   cache test results in FILE [disabled]
1428   -C, --config-cache      alias for \`--cache-file=config.cache'
1429   -n, --no-create         do not create output files
1430       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1431
1432 Installation directories:
1433   --prefix=PREFIX         install architecture-independent files in PREFIX
1434                           [$ac_default_prefix]
1435   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1436                           [PREFIX]
1437
1438 By default, \`make install' will install all the files in
1439 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1440 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1441 for instance \`--prefix=\$HOME'.
1442
1443 For better control, use the options below.
1444
1445 Fine tuning of the installation directories:
1446   --bindir=DIR            user executables [EPREFIX/bin]
1447   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1448   --libexecdir=DIR        program executables [EPREFIX/libexec]
1449   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1450   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1451   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1452   --libdir=DIR            object code libraries [EPREFIX/lib]
1453   --includedir=DIR        C header files [PREFIX/include]
1454   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1455   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1456   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1457   --infodir=DIR           info documentation [DATAROOTDIR/info]
1458   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1459   --mandir=DIR            man documentation [DATAROOTDIR/man]
1460   --docdir=DIR            documentation root [DATAROOTDIR/doc/postgresql]
1461   --htmldir=DIR           html documentation [DOCDIR]
1462   --dvidir=DIR            dvi documentation [DOCDIR]
1463   --pdfdir=DIR            pdf documentation [DOCDIR]
1464   --psdir=DIR             ps documentation [DOCDIR]
1465 _ACEOF
1466
1467   cat <<\_ACEOF
1468
1469 System types:
1470   --build=BUILD     configure for building on BUILD [guessed]
1471   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1472 _ACEOF
1473 fi
1474
1475 if test -n "$ac_init_help"; then
1476   case $ac_init_help in
1477      short | recursive ) echo "Configuration of PostgreSQL 11devel:";;
1478    esac
1479   cat <<\_ACEOF
1480
1481 Optional Features:
1482   --disable-option-checking  ignore unrecognized --enable/--with options
1483   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1484   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1485   --disable-integer-datetimes
1486                           obsolete option, no longer supported
1487   --enable-nls[=LANGUAGES]
1488                           enable Native Language Support
1489   --disable-rpath         do not embed shared library search path in
1490                           executables
1491   --disable-spinlocks     do not use spinlocks
1492   --disable-atomics       do not use atomic operations
1493   --disable-strong-random do not use a strong random number source
1494   --enable-debug          build with debugging symbols (-g)
1495   --enable-profiling      build with profiling enabled
1496   --enable-coverage       build with coverage testing instrumentation
1497   --enable-dtrace         build with DTrace support
1498   --enable-tap-tests      enable TAP tests (requires Perl and IPC::Run)
1499   --enable-depend         turn on automatic dependency tracking
1500   --enable-cassert        enable assertion checks (for debugging)
1501   --disable-thread-safety disable thread-safety in client libraries
1502   --disable-largefile     omit support for large files
1503   --disable-float4-byval  disable float4 passed by value
1504   --disable-float8-byval  disable float8 passed by value
1505
1506 Optional Packages:
1507   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1508   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1509   --with-extra-version=STRING
1510                           append STRING to version
1511   --with-template=NAME    override operating system template
1512   --with-includes=DIRS    look for additional header files in DIRS
1513   --with-libraries=DIRS   look for additional libraries in DIRS
1514   --with-libs=DIRS        alternative spelling of --with-libraries
1515   --with-pgport=PORTNUM   set default port number [5432]
1516   --with-blocksize=BLOCKSIZE
1517                           set table block size in kB [8]
1518   --with-segsize=SEGSIZE  set table segment size in GB [1]
1519   --with-wal-blocksize=BLOCKSIZE
1520                           set WAL block size in kB [8]
1521   --with-wal-segsize=SEGSIZE
1522                           set WAL segment size in MB [16]
1523   --with-CC=CMD           set compiler (deprecated)
1524   --with-icu              build with ICU support
1525   --with-tcl              build Tcl modules (PL/Tcl)
1526   --with-tclconfig=DIR    tclConfig.sh is in DIR
1527   --with-perl             build Perl modules (PL/Perl)
1528   --with-python           build Python modules (PL/Python)
1529   --with-gssapi           build with GSSAPI support
1530   --with-krb-srvnam=NAME  default service principal name in Kerberos (GSSAPI)
1531                           [postgres]
1532   --with-pam              build with PAM support
1533   --with-bsd-auth         build with BSD Authentication support
1534   --with-ldap             build with LDAP support
1535   --with-bonjour          build with Bonjour support
1536   --with-openssl          build with OpenSSL support
1537   --with-selinux          build with SELinux support
1538   --with-systemd          build with systemd support
1539   --without-readline      do not use GNU Readline nor BSD Libedit for editing
1540   --with-libedit-preferred
1541                           prefer BSD Libedit over GNU Readline
1542   --with-uuid=LIB         build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1543   --with-ossp-uuid        obsolete spelling of --with-uuid=ossp
1544   --with-libxml           build with XML support
1545   --with-libxslt          use XSLT support when building contrib/xml2
1546   --with-system-tzdata=DIR
1547                           use system time zone data in DIR
1548   --without-zlib          do not use Zlib
1549   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1550
1551 Some influential environment variables:
1552   CC          C compiler command
1553   CFLAGS      C compiler flags
1554   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1555               nonstandard directory <lib dir>
1556   LIBS        libraries to pass to the linker, e.g. -l<library>
1557   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1558               you have headers in a nonstandard directory <include dir>
1559   CPP         C preprocessor
1560   PKG_CONFIG  path to pkg-config utility
1561   PKG_CONFIG_PATH
1562               directories to add to pkg-config's search path
1563   PKG_CONFIG_LIBDIR
1564               path overriding pkg-config's built-in search path
1565   ICU_CFLAGS  C compiler flags for ICU, overriding pkg-config
1566   ICU_LIBS    linker flags for ICU, overriding pkg-config
1567   LDFLAGS_EX  extra linker flags for linking executables only
1568   LDFLAGS_SL  extra linker flags for linking shared libraries only
1569
1570 Use these variables to override the choices made by `configure' or to help
1571 it to find libraries and programs with nonstandard names/locations.
1572
1573 Report bugs to <pgsql-bugs@postgresql.org>.
1574 _ACEOF
1575 ac_status=$?
1576 fi
1577
1578 if test "$ac_init_help" = "recursive"; then
1579   # If there are subdirs, report their specific --help.
1580   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1581     test -d "$ac_dir" ||
1582       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1583       continue
1584     ac_builddir=.
1585
1586 case "$ac_dir" in
1587 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1588 *)
1589   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1590   # A ".." for each directory in $ac_dir_suffix.
1591   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1592   case $ac_top_builddir_sub in
1593   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1594   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1595   esac ;;
1596 esac
1597 ac_abs_top_builddir=$ac_pwd
1598 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1599 # for backward compatibility:
1600 ac_top_builddir=$ac_top_build_prefix
1601
1602 case $srcdir in
1603   .)  # We are building in place.
1604     ac_srcdir=.
1605     ac_top_srcdir=$ac_top_builddir_sub
1606     ac_abs_top_srcdir=$ac_pwd ;;
1607   [\\/]* | ?:[\\/]* )  # Absolute name.
1608     ac_srcdir=$srcdir$ac_dir_suffix;
1609     ac_top_srcdir=$srcdir
1610     ac_abs_top_srcdir=$srcdir ;;
1611   *) # Relative name.
1612     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1613     ac_top_srcdir=$ac_top_build_prefix$srcdir
1614     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1615 esac
1616 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1617
1618     cd "$ac_dir" || { ac_status=$?; continue; }
1619     # Check for guested configure.
1620     if test -f "$ac_srcdir/configure.gnu"; then
1621       echo &&
1622       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1623     elif test -f "$ac_srcdir/configure"; then
1624       echo &&
1625       $SHELL "$ac_srcdir/configure" --help=recursive
1626     else
1627       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1628     fi || ac_status=$?
1629     cd "$ac_pwd" || { ac_status=$?; break; }
1630   done
1631 fi
1632
1633 test -n "$ac_init_help" && exit $ac_status
1634 if $ac_init_version; then
1635   cat <<\_ACEOF
1636 PostgreSQL configure 11devel
1637 generated by GNU Autoconf 2.69
1638
1639 Copyright (C) 2012 Free Software Foundation, Inc.
1640 This configure script is free software; the Free Software Foundation
1641 gives unlimited permission to copy, distribute and modify it.
1642
1643 Copyright (c) 1996-2017, PostgreSQL Global Development Group
1644 _ACEOF
1645   exit
1646 fi
1647
1648 ## ------------------------ ##
1649 ## Autoconf initialization. ##
1650 ## ------------------------ ##
1651
1652 # ac_fn_c_try_compile LINENO
1653 # --------------------------
1654 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1655 ac_fn_c_try_compile ()
1656 {
1657   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1658   rm -f conftest.$ac_objext
1659   if { { ac_try="$ac_compile"
1660 case "(($ac_try" in
1661   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1662   *) ac_try_echo=$ac_try;;
1663 esac
1664 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1665 $as_echo "$ac_try_echo"; } >&5
1666   (eval "$ac_compile") 2>conftest.err
1667   ac_status=$?
1668   if test -s conftest.err; then
1669     grep -v '^ *+' conftest.err >conftest.er1
1670     cat conftest.er1 >&5
1671     mv -f conftest.er1 conftest.err
1672   fi
1673   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1674   test $ac_status = 0; } && {
1675          test -z "$ac_c_werror_flag" ||
1676          test ! -s conftest.err
1677        } && test -s conftest.$ac_objext; then :
1678   ac_retval=0
1679 else
1680   $as_echo "$as_me: failed program was:" >&5
1681 sed 's/^/| /' conftest.$ac_ext >&5
1682
1683         ac_retval=1
1684 fi
1685   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1686   as_fn_set_status $ac_retval
1687
1688 } # ac_fn_c_try_compile
1689
1690 # ac_fn_c_try_link LINENO
1691 # -----------------------
1692 # Try to link conftest.$ac_ext, and return whether this succeeded.
1693 ac_fn_c_try_link ()
1694 {
1695   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1696   rm -f conftest.$ac_objext conftest$ac_exeext
1697   if { { ac_try="$ac_link"
1698 case "(($ac_try" in
1699   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1700   *) ac_try_echo=$ac_try;;
1701 esac
1702 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1703 $as_echo "$ac_try_echo"; } >&5
1704   (eval "$ac_link") 2>conftest.err
1705   ac_status=$?
1706   if test -s conftest.err; then
1707     grep -v '^ *+' conftest.err >conftest.er1
1708     cat conftest.er1 >&5
1709     mv -f conftest.er1 conftest.err
1710   fi
1711   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1712   test $ac_status = 0; } && {
1713          test -z "$ac_c_werror_flag" ||
1714          test ! -s conftest.err
1715        } && test -s conftest$ac_exeext && {
1716          test "$cross_compiling" = yes ||
1717          test -x conftest$ac_exeext
1718        }; then :
1719   ac_retval=0
1720 else
1721   $as_echo "$as_me: failed program was:" >&5
1722 sed 's/^/| /' conftest.$ac_ext >&5
1723
1724         ac_retval=1
1725 fi
1726   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1727   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1728   # interfere with the next link command; also delete a directory that is
1729   # left behind by Apple's compiler.  We do this before executing the actions.
1730   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1731   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1732   as_fn_set_status $ac_retval
1733
1734 } # ac_fn_c_try_link
1735
1736 # ac_fn_c_try_cpp LINENO
1737 # ----------------------
1738 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1739 ac_fn_c_try_cpp ()
1740 {
1741   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1742   if { { ac_try="$ac_cpp conftest.$ac_ext"
1743 case "(($ac_try" in
1744   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1745   *) ac_try_echo=$ac_try;;
1746 esac
1747 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1748 $as_echo "$ac_try_echo"; } >&5
1749   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1750   ac_status=$?
1751   if test -s conftest.err; then
1752     grep -v '^ *+' conftest.err >conftest.er1
1753     cat conftest.er1 >&5
1754     mv -f conftest.er1 conftest.err
1755   fi
1756   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1757   test $ac_status = 0; } > conftest.i && {
1758          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1759          test ! -s conftest.err
1760        }; then :
1761   ac_retval=0
1762 else
1763   $as_echo "$as_me: failed program was:" >&5
1764 sed 's/^/| /' conftest.$ac_ext >&5
1765
1766     ac_retval=1
1767 fi
1768   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1769   as_fn_set_status $ac_retval
1770
1771 } # ac_fn_c_try_cpp
1772
1773 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1774 # -------------------------------------------------------
1775 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1776 # the include files in INCLUDES and setting the cache variable VAR
1777 # accordingly.
1778 ac_fn_c_check_header_mongrel ()
1779 {
1780   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1781   if eval \${$3+:} false; then :
1782   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1783 $as_echo_n "checking for $2... " >&6; }
1784 if eval \${$3+:} false; then :
1785   $as_echo_n "(cached) " >&6
1786 fi
1787 eval ac_res=\$$3
1788                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1789 $as_echo "$ac_res" >&6; }
1790 else
1791   # Is the header compilable?
1792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1793 $as_echo_n "checking $2 usability... " >&6; }
1794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1795 /* end confdefs.h.  */
1796 $4
1797 #include <$2>
1798 _ACEOF
1799 if ac_fn_c_try_compile "$LINENO"; then :
1800   ac_header_compiler=yes
1801 else
1802   ac_header_compiler=no
1803 fi
1804 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1806 $as_echo "$ac_header_compiler" >&6; }
1807
1808 # Is the header present?
1809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1810 $as_echo_n "checking $2 presence... " >&6; }
1811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1812 /* end confdefs.h.  */
1813 #include <$2>
1814 _ACEOF
1815 if ac_fn_c_try_cpp "$LINENO"; then :
1816   ac_header_preproc=yes
1817 else
1818   ac_header_preproc=no
1819 fi
1820 rm -f conftest.err conftest.i conftest.$ac_ext
1821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1822 $as_echo "$ac_header_preproc" >&6; }
1823
1824 # So?  What about this header?
1825 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1826   yes:no: )
1827     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1828 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1829     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1830 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1831     ;;
1832   no:yes:* )
1833     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1834 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1835     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1836 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1837     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1838 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1839     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1840 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1841     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1842 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1843 ( $as_echo "## ---------------------------------------- ##
1844 ## Report this to pgsql-bugs@postgresql.org ##
1845 ## ---------------------------------------- ##"
1846      ) | sed "s/^/$as_me: WARNING:     /" >&2
1847     ;;
1848 esac
1849   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1850 $as_echo_n "checking for $2... " >&6; }
1851 if eval \${$3+:} false; then :
1852   $as_echo_n "(cached) " >&6
1853 else
1854   eval "$3=\$ac_header_compiler"
1855 fi
1856 eval ac_res=\$$3
1857                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1858 $as_echo "$ac_res" >&6; }
1859 fi
1860   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1861
1862 } # ac_fn_c_check_header_mongrel
1863
1864 # ac_fn_c_try_run LINENO
1865 # ----------------------
1866 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1867 # that executables *can* be run.
1868 ac_fn_c_try_run ()
1869 {
1870   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1871   if { { ac_try="$ac_link"
1872 case "(($ac_try" in
1873   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1874   *) ac_try_echo=$ac_try;;
1875 esac
1876 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1877 $as_echo "$ac_try_echo"; } >&5
1878   (eval "$ac_link") 2>&5
1879   ac_status=$?
1880   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1881   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1882   { { case "(($ac_try" in
1883   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1884   *) ac_try_echo=$ac_try;;
1885 esac
1886 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1887 $as_echo "$ac_try_echo"; } >&5
1888   (eval "$ac_try") 2>&5
1889   ac_status=$?
1890   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1891   test $ac_status = 0; }; }; then :
1892   ac_retval=0
1893 else
1894   $as_echo "$as_me: program exited with status $ac_status" >&5
1895        $as_echo "$as_me: failed program was:" >&5
1896 sed 's/^/| /' conftest.$ac_ext >&5
1897
1898        ac_retval=$ac_status
1899 fi
1900   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1901   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1902   as_fn_set_status $ac_retval
1903
1904 } # ac_fn_c_try_run
1905
1906 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1907 # -------------------------------------------------------
1908 # Tests whether HEADER exists and can be compiled using the include files in
1909 # INCLUDES, setting the cache variable VAR accordingly.
1910 ac_fn_c_check_header_compile ()
1911 {
1912   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1913   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1914 $as_echo_n "checking for $2... " >&6; }
1915 if eval \${$3+:} false; then :
1916   $as_echo_n "(cached) " >&6
1917 else
1918   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1919 /* end confdefs.h.  */
1920 $4
1921 #include <$2>
1922 _ACEOF
1923 if ac_fn_c_try_compile "$LINENO"; then :
1924   eval "$3=yes"
1925 else
1926   eval "$3=no"
1927 fi
1928 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1929 fi
1930 eval ac_res=\$$3
1931                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1932 $as_echo "$ac_res" >&6; }
1933   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1934
1935 } # ac_fn_c_check_header_compile
1936
1937 # ac_fn_c_check_func LINENO FUNC VAR
1938 # ----------------------------------
1939 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1940 ac_fn_c_check_func ()
1941 {
1942   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1943   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1944 $as_echo_n "checking for $2... " >&6; }
1945 if eval \${$3+:} false; then :
1946   $as_echo_n "(cached) " >&6
1947 else
1948   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1949 /* end confdefs.h.  */
1950 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1951    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1952 #define $2 innocuous_$2
1953
1954 /* System header to define __stub macros and hopefully few prototypes,
1955     which can conflict with char $2 (); below.
1956     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1957     <limits.h> exists even on freestanding compilers.  */
1958
1959 #ifdef __STDC__
1960 # include <limits.h>
1961 #else
1962 # include <assert.h>
1963 #endif
1964
1965 #undef $2
1966
1967 /* Override any GCC internal prototype to avoid an error.
1968    Use char because int might match the return type of a GCC
1969    builtin and then its argument prototype would still apply.  */
1970 #ifdef __cplusplus
1971 extern "C"
1972 #endif
1973 char $2 ();
1974 /* The GNU C library defines this for functions which it implements
1975     to always fail with ENOSYS.  Some functions are actually named
1976     something starting with __ and the normal name is an alias.  */
1977 #if defined __stub_$2 || defined __stub___$2
1978 choke me
1979 #endif
1980
1981 int
1982 main ()
1983 {
1984 return $2 ();
1985   ;
1986   return 0;
1987 }
1988 _ACEOF
1989 if ac_fn_c_try_link "$LINENO"; then :
1990   eval "$3=yes"
1991 else
1992   eval "$3=no"
1993 fi
1994 rm -f core conftest.err conftest.$ac_objext \
1995     conftest$ac_exeext conftest.$ac_ext
1996 fi
1997 eval ac_res=\$$3
1998                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1999 $as_echo "$ac_res" >&6; }
2000   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2001
2002 } # ac_fn_c_check_func
2003
2004 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2005 # ----------------------------------------------------
2006 # Tries to find if the field MEMBER exists in type AGGR, after including
2007 # INCLUDES, setting cache variable VAR accordingly.
2008 ac_fn_c_check_member ()
2009 {
2010   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2011   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2012 $as_echo_n "checking for $2.$3... " >&6; }
2013 if eval \${$4+:} false; then :
2014   $as_echo_n "(cached) " >&6
2015 else
2016   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2017 /* end confdefs.h.  */
2018 $5
2019 int
2020 main ()
2021 {
2022 static $2 ac_aggr;
2023 if (ac_aggr.$3)
2024 return 0;
2025   ;
2026   return 0;
2027 }
2028 _ACEOF
2029 if ac_fn_c_try_compile "$LINENO"; then :
2030   eval "$4=yes"
2031 else
2032   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2033 /* end confdefs.h.  */
2034 $5
2035 int
2036 main ()
2037 {
2038 static $2 ac_aggr;
2039 if (sizeof ac_aggr.$3)
2040 return 0;
2041   ;
2042   return 0;
2043 }
2044 _ACEOF
2045 if ac_fn_c_try_compile "$LINENO"; then :
2046   eval "$4=yes"
2047 else
2048   eval "$4=no"
2049 fi
2050 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2051 fi
2052 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2053 fi
2054 eval ac_res=\$$4
2055                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2056 $as_echo "$ac_res" >&6; }
2057   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2058
2059 } # ac_fn_c_check_member
2060
2061 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2062 # -------------------------------------------
2063 # Tests whether TYPE exists after having included INCLUDES, setting cache
2064 # variable VAR accordingly.
2065 ac_fn_c_check_type ()
2066 {
2067   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2068   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2069 $as_echo_n "checking for $2... " >&6; }
2070 if eval \${$3+:} false; then :
2071   $as_echo_n "(cached) " >&6
2072 else
2073   eval "$3=no"
2074   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2075 /* end confdefs.h.  */
2076 $4
2077 int
2078 main ()
2079 {
2080 if (sizeof ($2))
2081          return 0;
2082   ;
2083   return 0;
2084 }
2085 _ACEOF
2086 if ac_fn_c_try_compile "$LINENO"; then :
2087   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2088 /* end confdefs.h.  */
2089 $4
2090 int
2091 main ()
2092 {
2093 if (sizeof (($2)))
2094             return 0;
2095   ;
2096   return 0;
2097 }
2098 _ACEOF
2099 if ac_fn_c_try_compile "$LINENO"; then :
2100
2101 else
2102   eval "$3=yes"
2103 fi
2104 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2105 fi
2106 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2107 fi
2108 eval ac_res=\$$3
2109                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2110 $as_echo "$ac_res" >&6; }
2111   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2112
2113 } # ac_fn_c_check_type
2114
2115 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2116 # --------------------------------------------
2117 # Tries to find the compile-time value of EXPR in a program that includes
2118 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2119 # computed
2120 ac_fn_c_compute_int ()
2121 {
2122   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2123   if test "$cross_compiling" = yes; then
2124     # Depending upon the size, compute the lo and hi bounds.
2125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2126 /* end confdefs.h.  */
2127 $4
2128 int
2129 main ()
2130 {
2131 static int test_array [1 - 2 * !(($2) >= 0)];
2132 test_array [0] = 0;
2133 return test_array [0];
2134
2135   ;
2136   return 0;
2137 }
2138 _ACEOF
2139 if ac_fn_c_try_compile "$LINENO"; then :
2140   ac_lo=0 ac_mid=0
2141   while :; do
2142     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2143 /* end confdefs.h.  */
2144 $4
2145 int
2146 main ()
2147 {
2148 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2149 test_array [0] = 0;
2150 return test_array [0];
2151
2152   ;
2153   return 0;
2154 }
2155 _ACEOF
2156 if ac_fn_c_try_compile "$LINENO"; then :
2157   ac_hi=$ac_mid; break
2158 else
2159   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2160                         if test $ac_lo -le $ac_mid; then
2161                           ac_lo= ac_hi=
2162                           break
2163                         fi
2164                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2165 fi
2166 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2167   done
2168 else
2169   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2170 /* end confdefs.h.  */
2171 $4
2172 int
2173 main ()
2174 {
2175 static int test_array [1 - 2 * !(($2) < 0)];
2176 test_array [0] = 0;
2177 return test_array [0];
2178
2179   ;
2180   return 0;
2181 }
2182 _ACEOF
2183 if ac_fn_c_try_compile "$LINENO"; then :
2184   ac_hi=-1 ac_mid=-1
2185   while :; do
2186     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2187 /* end confdefs.h.  */
2188 $4
2189 int
2190 main ()
2191 {
2192 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2193 test_array [0] = 0;
2194 return test_array [0];
2195
2196   ;
2197   return 0;
2198 }
2199 _ACEOF
2200 if ac_fn_c_try_compile "$LINENO"; then :
2201   ac_lo=$ac_mid; break
2202 else
2203   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2204                         if test $ac_mid -le $ac_hi; then
2205                           ac_lo= ac_hi=
2206                           break
2207                         fi
2208                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2209 fi
2210 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2211   done
2212 else
2213   ac_lo= ac_hi=
2214 fi
2215 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2216 fi
2217 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2218 # Binary search between lo and hi bounds.
2219 while test "x$ac_lo" != "x$ac_hi"; do
2220   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2221   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2222 /* end confdefs.h.  */
2223 $4
2224 int
2225 main ()
2226 {
2227 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2228 test_array [0] = 0;
2229 return test_array [0];
2230
2231   ;
2232   return 0;
2233 }
2234 _ACEOF
2235 if ac_fn_c_try_compile "$LINENO"; then :
2236   ac_hi=$ac_mid
2237 else
2238   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2239 fi
2240 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2241 done
2242 case $ac_lo in #((
2243 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2244 '') ac_retval=1 ;;
2245 esac
2246   else
2247     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2248 /* end confdefs.h.  */
2249 $4
2250 static long int longval () { return $2; }
2251 static unsigned long int ulongval () { return $2; }
2252 #include <stdio.h>
2253 #include <stdlib.h>
2254 int
2255 main ()
2256 {
2257
2258   FILE *f = fopen ("conftest.val", "w");
2259   if (! f)
2260     return 1;
2261   if (($2) < 0)
2262     {
2263       long int i = longval ();
2264       if (i != ($2))
2265         return 1;
2266       fprintf (f, "%ld", i);
2267     }
2268   else
2269     {
2270       unsigned long int i = ulongval ();
2271       if (i != ($2))
2272         return 1;
2273       fprintf (f, "%lu", i);
2274     }
2275   /* Do not output a trailing newline, as this causes \r\n confusion
2276      on some platforms.  */
2277   return ferror (f) || fclose (f) != 0;
2278
2279   ;
2280   return 0;
2281 }
2282 _ACEOF
2283 if ac_fn_c_try_run "$LINENO"; then :
2284   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2285 else
2286   ac_retval=1
2287 fi
2288 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2289   conftest.$ac_objext conftest.beam conftest.$ac_ext
2290 rm -f conftest.val
2291
2292   fi
2293   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2294   as_fn_set_status $ac_retval
2295
2296 } # ac_fn_c_compute_int
2297
2298 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2299 # ---------------------------------------------
2300 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2301 # accordingly.
2302 ac_fn_c_check_decl ()
2303 {
2304   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2305   as_decl_name=`echo $2|sed 's/ *(.*//'`
2306   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2307   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2308 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2309 if eval \${$3+:} false; then :
2310   $as_echo_n "(cached) " >&6
2311 else
2312   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2313 /* end confdefs.h.  */
2314 $4
2315 int
2316 main ()
2317 {
2318 #ifndef $as_decl_name
2319 #ifdef __cplusplus
2320   (void) $as_decl_use;
2321 #else
2322   (void) $as_decl_name;
2323 #endif
2324 #endif
2325
2326   ;
2327   return 0;
2328 }
2329 _ACEOF
2330 if ac_fn_c_try_compile "$LINENO"; then :
2331   eval "$3=yes"
2332 else
2333   eval "$3=no"
2334 fi
2335 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2336 fi
2337 eval ac_res=\$$3
2338                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2339 $as_echo "$ac_res" >&6; }
2340   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2341
2342 } # ac_fn_c_check_decl
2343 cat >config.log <<_ACEOF
2344 This file contains any messages produced by compilers while
2345 running configure, to aid debugging if configure makes a mistake.
2346
2347 It was created by PostgreSQL $as_me 11devel, which was
2348 generated by GNU Autoconf 2.69.  Invocation command line was
2349
2350   $ $0 $@
2351
2352 _ACEOF
2353 exec 5>>config.log
2354 {
2355 cat <<_ASUNAME
2356 ## --------- ##
2357 ## Platform. ##
2358 ## --------- ##
2359
2360 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2361 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2362 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2363 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2364 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2365
2366 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2367 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2368
2369 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2370 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2371 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2372 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2373 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2374 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2375 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2376
2377 _ASUNAME
2378
2379 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2380 for as_dir in $PATH
2381 do
2382   IFS=$as_save_IFS
2383   test -z "$as_dir" && as_dir=.
2384     $as_echo "PATH: $as_dir"
2385   done
2386 IFS=$as_save_IFS
2387
2388 } >&5
2389
2390 cat >&5 <<_ACEOF
2391
2392
2393 ## ----------- ##
2394 ## Core tests. ##
2395 ## ----------- ##
2396
2397 _ACEOF
2398
2399
2400 # Keep a trace of the command line.
2401 # Strip out --no-create and --no-recursion so they do not pile up.
2402 # Strip out --silent because we don't want to record it for future runs.
2403 # Also quote any args containing shell meta-characters.
2404 # Make two passes to allow for proper duplicate-argument suppression.
2405 ac_configure_args=
2406 ac_configure_args0=
2407 ac_configure_args1=
2408 ac_must_keep_next=false
2409 for ac_pass in 1 2
2410 do
2411   for ac_arg
2412   do
2413     case $ac_arg in
2414     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2415     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2416     | -silent | --silent | --silen | --sile | --sil)
2417       continue ;;
2418     *\'*)
2419       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2420     esac
2421     case $ac_pass in
2422     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2423     2)
2424       as_fn_append ac_configure_args1 " '$ac_arg'"
2425       if test $ac_must_keep_next = true; then
2426         ac_must_keep_next=false # Got value, back to normal.
2427       else
2428         case $ac_arg in
2429           *=* | --config-cache | -C | -disable-* | --disable-* \
2430           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2431           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2432           | -with-* | --with-* | -without-* | --without-* | --x)
2433             case "$ac_configure_args0 " in
2434               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2435             esac
2436             ;;
2437           -* ) ac_must_keep_next=true ;;
2438         esac
2439       fi
2440       as_fn_append ac_configure_args " '$ac_arg'"
2441       ;;
2442     esac
2443   done
2444 done
2445 { ac_configure_args0=; unset ac_configure_args0;}
2446 { ac_configure_args1=; unset ac_configure_args1;}
2447
2448 # When interrupted or exit'd, cleanup temporary files, and complete
2449 # config.log.  We remove comments because anyway the quotes in there
2450 # would cause problems or look ugly.
2451 # WARNING: Use '\'' to represent an apostrophe within the trap.
2452 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2453 trap 'exit_status=$?
2454   # Save into config.log some information that might help in debugging.
2455   {
2456     echo
2457
2458     $as_echo "## ---------------- ##
2459 ## Cache variables. ##
2460 ## ---------------- ##"
2461     echo
2462     # The following way of writing the cache mishandles newlines in values,
2463 (
2464   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2465     eval ac_val=\$$ac_var
2466     case $ac_val in #(
2467     *${as_nl}*)
2468       case $ac_var in #(
2469       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2470 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2471       esac
2472       case $ac_var in #(
2473       _ | IFS | as_nl) ;; #(
2474       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2475       *) { eval $ac_var=; unset $ac_var;} ;;
2476       esac ;;
2477     esac
2478   done
2479   (set) 2>&1 |
2480     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2481     *${as_nl}ac_space=\ *)
2482       sed -n \
2483         "s/'\''/'\''\\\\'\'''\''/g;
2484           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2485       ;; #(
2486     *)
2487       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2488       ;;
2489     esac |
2490     sort
2491 )
2492     echo
2493
2494     $as_echo "## ----------------- ##
2495 ## Output variables. ##
2496 ## ----------------- ##"
2497     echo
2498     for ac_var in $ac_subst_vars
2499     do
2500       eval ac_val=\$$ac_var
2501       case $ac_val in
2502       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2503       esac
2504       $as_echo "$ac_var='\''$ac_val'\''"
2505     done | sort
2506     echo
2507
2508     if test -n "$ac_subst_files"; then
2509       $as_echo "## ------------------- ##
2510 ## File substitutions. ##
2511 ## ------------------- ##"
2512       echo
2513       for ac_var in $ac_subst_files
2514       do
2515         eval ac_val=\$$ac_var
2516         case $ac_val in
2517         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2518         esac
2519         $as_echo "$ac_var='\''$ac_val'\''"
2520       done | sort
2521       echo
2522     fi
2523
2524     if test -s confdefs.h; then
2525       $as_echo "## ----------- ##
2526 ## confdefs.h. ##
2527 ## ----------- ##"
2528       echo
2529       cat confdefs.h
2530       echo
2531     fi
2532     test "$ac_signal" != 0 &&
2533       $as_echo "$as_me: caught signal $ac_signal"
2534     $as_echo "$as_me: exit $exit_status"
2535   } >&5
2536   rm -f core *.core core.conftest.* &&
2537     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2538     exit $exit_status
2539 ' 0
2540 for ac_signal in 1 2 13 15; do
2541   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2542 done
2543 ac_signal=0
2544
2545 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2546 rm -f -r conftest* confdefs.h
2547
2548 $as_echo "/* confdefs.h */" > confdefs.h
2549
2550 # Predefined preprocessor variables.
2551
2552 cat >>confdefs.h <<_ACEOF
2553 #define PACKAGE_NAME "$PACKAGE_NAME"
2554 _ACEOF
2555
2556 cat >>confdefs.h <<_ACEOF
2557 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2558 _ACEOF
2559
2560 cat >>confdefs.h <<_ACEOF
2561 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2562 _ACEOF
2563
2564 cat >>confdefs.h <<_ACEOF
2565 #define PACKAGE_STRING "$PACKAGE_STRING"
2566 _ACEOF
2567
2568 cat >>confdefs.h <<_ACEOF
2569 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2570 _ACEOF
2571
2572 cat >>confdefs.h <<_ACEOF
2573 #define PACKAGE_URL "$PACKAGE_URL"
2574 _ACEOF
2575
2576
2577 # Let the site file select an alternate cache file if it wants to.
2578 # Prefer an explicitly selected file to automatically selected ones.
2579 ac_site_file1=NONE
2580 ac_site_file2=NONE
2581 if test -n "$CONFIG_SITE"; then
2582   # We do not want a PATH search for config.site.
2583   case $CONFIG_SITE in #((
2584     -*)  ac_site_file1=./$CONFIG_SITE;;
2585     */*) ac_site_file1=$CONFIG_SITE;;
2586     *)   ac_site_file1=./$CONFIG_SITE;;
2587   esac
2588 elif test "x$prefix" != xNONE; then
2589   ac_site_file1=$prefix/share/config.site
2590   ac_site_file2=$prefix/etc/config.site
2591 else
2592   ac_site_file1=$ac_default_prefix/share/config.site
2593   ac_site_file2=$ac_default_prefix/etc/config.site
2594 fi
2595 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2596 do
2597   test "x$ac_site_file" = xNONE && continue
2598   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2599     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2600 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2601     sed 's/^/| /' "$ac_site_file" >&5
2602     . "$ac_site_file" \
2603       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2604 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2605 as_fn_error $? "failed to load site script $ac_site_file
2606 See \`config.log' for more details" "$LINENO" 5; }
2607   fi
2608 done
2609
2610 if test -r "$cache_file"; then
2611   # Some versions of bash will fail to source /dev/null (special files
2612   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2613   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2614     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2615 $as_echo "$as_me: loading cache $cache_file" >&6;}
2616     case $cache_file in
2617       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2618       *)                      . "./$cache_file";;
2619     esac
2620   fi
2621 else
2622   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2623 $as_echo "$as_me: creating cache $cache_file" >&6;}
2624   >$cache_file
2625 fi
2626
2627 # Check that the precious variables saved in the cache have kept the same
2628 # value.
2629 ac_cache_corrupted=false
2630 for ac_var in $ac_precious_vars; do
2631   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2632   eval ac_new_set=\$ac_env_${ac_var}_set
2633   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2634   eval ac_new_val=\$ac_env_${ac_var}_value
2635   case $ac_old_set,$ac_new_set in
2636     set,)
2637       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2638 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2639       ac_cache_corrupted=: ;;
2640     ,set)
2641       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2642 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2643       ac_cache_corrupted=: ;;
2644     ,);;
2645     *)
2646       if test "x$ac_old_val" != "x$ac_new_val"; then
2647         # differences in whitespace do not lead to failure.
2648         ac_old_val_w=`echo x $ac_old_val`
2649         ac_new_val_w=`echo x $ac_new_val`
2650         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2651           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2652 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2653           ac_cache_corrupted=:
2654         else
2655           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2656 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2657           eval $ac_var=\$ac_old_val
2658         fi
2659         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2660 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2661         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2662 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2663       fi;;
2664   esac
2665   # Pass precious variables to config.status.
2666   if test "$ac_new_set" = set; then
2667     case $ac_new_val in
2668     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2669     *) ac_arg=$ac_var=$ac_new_val ;;
2670     esac
2671     case " $ac_configure_args " in
2672       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2673       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2674     esac
2675   fi
2676 done
2677 if $ac_cache_corrupted; then
2678   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2679 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2680   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2681 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2682   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2683 fi
2684 ## -------------------- ##
2685 ## Main body of script. ##
2686 ## -------------------- ##
2687
2688 ac_ext=c
2689 ac_cpp='$CPP $CPPFLAGS'
2690 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2691 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2692 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2693
2694
2695
2696
2697
2698
2699 ac_aux_dir=
2700 for ac_dir in config "$srcdir"/config; do
2701   if test -f "$ac_dir/install-sh"; then
2702     ac_aux_dir=$ac_dir
2703     ac_install_sh="$ac_aux_dir/install-sh -c"
2704     break
2705   elif test -f "$ac_dir/install.sh"; then
2706     ac_aux_dir=$ac_dir
2707     ac_install_sh="$ac_aux_dir/install.sh -c"
2708     break
2709   elif test -f "$ac_dir/shtool"; then
2710     ac_aux_dir=$ac_dir
2711     ac_install_sh="$ac_aux_dir/shtool install -c"
2712     break
2713   fi
2714 done
2715 if test -z "$ac_aux_dir"; then
2716   as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2717 fi
2718
2719 # These three variables are undocumented and unsupported,
2720 # and are intended to be withdrawn in a future Autoconf release.
2721 # They can cause serious problems if a builder's source tree is in a directory
2722 # whose full name contains unusual characters.
2723 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2724 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2725 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2726
2727
2728
2729 configure_args=$ac_configure_args
2730
2731
2732 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`
2733
2734
2735 cat >>confdefs.h <<_ACEOF
2736 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2737 _ACEOF
2738
2739
2740
2741
2742
2743 # Check whether --with-extra-version was given.
2744 if test "${with_extra_version+set}" = set; then :
2745   withval=$with_extra_version;
2746   case $withval in
2747     yes)
2748       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2749       ;;
2750     no)
2751       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2752       ;;
2753     *)
2754       PG_VERSION="$PACKAGE_VERSION$withval"
2755       ;;
2756   esac
2757
2758 else
2759   PG_VERSION="$PACKAGE_VERSION"
2760 fi
2761
2762
2763
2764 cat >>confdefs.h <<_ACEOF
2765 #define PG_VERSION "$PG_VERSION"
2766 _ACEOF
2767
2768
2769 # Make sure we can run config.sub.
2770 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2771   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2772
2773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2774 $as_echo_n "checking build system type... " >&6; }
2775 if ${ac_cv_build+:} false; then :
2776   $as_echo_n "(cached) " >&6
2777 else
2778   ac_build_alias=$build_alias
2779 test "x$ac_build_alias" = x &&
2780   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2781 test "x$ac_build_alias" = x &&
2782   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2783 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2784   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2785
2786 fi
2787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2788 $as_echo "$ac_cv_build" >&6; }
2789 case $ac_cv_build in
2790 *-*-*) ;;
2791 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2792 esac
2793 build=$ac_cv_build
2794 ac_save_IFS=$IFS; IFS='-'
2795 set x $ac_cv_build
2796 shift
2797 build_cpu=$1
2798 build_vendor=$2
2799 shift; shift
2800 # Remember, the first character of IFS is used to create $*,
2801 # except with old shells:
2802 build_os=$*
2803 IFS=$ac_save_IFS
2804 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2805
2806
2807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2808 $as_echo_n "checking host system type... " >&6; }
2809 if ${ac_cv_host+:} false; then :
2810   $as_echo_n "(cached) " >&6
2811 else
2812   if test "x$host_alias" = x; then
2813   ac_cv_host=$ac_cv_build
2814 else
2815   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2816     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2817 fi
2818
2819 fi
2820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2821 $as_echo "$ac_cv_host" >&6; }
2822 case $ac_cv_host in
2823 *-*-*) ;;
2824 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2825 esac
2826 host=$ac_cv_host
2827 ac_save_IFS=$IFS; IFS='-'
2828 set x $ac_cv_host
2829 shift
2830 host_cpu=$1
2831 host_vendor=$2
2832 shift; shift
2833 # Remember, the first character of IFS is used to create $*,
2834 # except with old shells:
2835 host_os=$*
2836 IFS=$ac_save_IFS
2837 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2838
2839
2840
2841 template=
2842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2843 $as_echo_n "checking which template to use... " >&6; }
2844
2845
2846
2847
2848 # Check whether --with-template was given.
2849 if test "${with_template+set}" = set; then :
2850   withval=$with_template;
2851   case $withval in
2852     yes)
2853       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2854       ;;
2855     no)
2856       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2857       ;;
2858     *)
2859
2860   case $withval in
2861     list)   echo; ls "$srcdir/src/template"; exit;;
2862     *)      if test -f "$srcdir/src/template/$with_template" ; then
2863               template=$withval
2864             else
2865               as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2866             fi;;
2867   esac
2868
2869       ;;
2870   esac
2871
2872 else
2873
2874 # --with-template not given
2875
2876 case $host_os in
2877      aix*) template=aix ;;
2878   cygwin*) template=cygwin ;;
2879   darwin*) template=darwin ;;
2880 dragonfly*) template=netbsd ;;
2881  freebsd*) template=freebsd ;;
2882     hpux*) template=hpux ;;
2883  linux*|gnu*|k*bsd*-gnu)
2884            template=linux ;;
2885    mingw*) template=win32 ;;
2886   netbsd*) template=netbsd ;;
2887  openbsd*) template=openbsd ;;
2888  solaris*) template=solaris ;;
2889 esac
2890
2891   if test x"$template" = x"" ; then
2892     as_fn_error $? "
2893 *******************************************************************
2894 PostgreSQL has apparently not been ported to your platform yet.
2895 To try a manual configuration, look into the src/template directory
2896 for a similar platform and use the '--with-template=' option.
2897
2898 Please also contact <pgsql-bugs@postgresql.org> to see about
2899 rectifying this.  Include the above 'checking host system type...'
2900 line.
2901 *******************************************************************
2902 " "$LINENO" 5
2903   fi
2904
2905
2906 fi
2907
2908
2909
2910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
2911 $as_echo "$template" >&6; }
2912
2913 PORTNAME=$template
2914
2915
2916 # Initialize default assumption that we do not need separate assembly code
2917 # for TAS (test-and-set).  This can be overridden by the template file
2918 # when it's executed.
2919 need_tas=no
2920 tas_file=dummy.s
2921
2922
2923
2924 ##
2925 ## Command line options
2926 ##
2927
2928 #
2929 # Add non-standard directories to the include path
2930 #
2931
2932
2933
2934 # Check whether --with-includes was given.
2935 if test "${with_includes+set}" = set; then :
2936   withval=$with_includes;
2937   case $withval in
2938     yes)
2939       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
2940       ;;
2941     no)
2942       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
2943       ;;
2944     *)
2945
2946       ;;
2947   esac
2948
2949 fi
2950
2951
2952
2953
2954 #
2955 # Add non-standard directories to the library search path
2956 #
2957
2958
2959
2960 # Check whether --with-libraries was given.
2961 if test "${with_libraries+set}" = set; then :
2962   withval=$with_libraries;
2963   case $withval in
2964     yes)
2965       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
2966       ;;
2967     no)
2968       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
2969       ;;
2970     *)
2971       LIBRARY_DIRS=$withval
2972       ;;
2973   esac
2974
2975 fi
2976
2977
2978
2979
2980
2981
2982 # Check whether --with-libs was given.
2983 if test "${with_libs+set}" = set; then :
2984   withval=$with_libs;
2985   case $withval in
2986     yes)
2987       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
2988       ;;
2989     no)
2990       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
2991       ;;
2992     *)
2993       LIBRARY_DIRS=$withval
2994       ;;
2995   esac
2996
2997 fi
2998
2999
3000
3001
3002 #
3003 # 64-bit integer date/time storage is now the only option, but to avoid
3004 # unnecessary breakage of build scripts, continue to accept an explicit
3005 # "--enable-integer-datetimes" switch.
3006 #
3007
3008
3009 # Check whether --enable-integer-datetimes was given.
3010 if test "${enable_integer_datetimes+set}" = set; then :
3011   enableval=$enable_integer_datetimes;
3012   case $enableval in
3013     yes)
3014       :
3015       ;;
3016     no)
3017       as_fn_error $? "--disable-integer-datetimes is no longer supported" "$LINENO" 5
3018       ;;
3019     *)
3020       as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3021       ;;
3022   esac
3023
3024 else
3025   enable_integer_datetimes=yes
3026
3027 fi
3028
3029
3030
3031
3032 #
3033 # NLS
3034 #
3035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3036 $as_echo_n "checking whether NLS is wanted... " >&6; }
3037
3038
3039 # Check whether --enable-nls was given.
3040 if test "${enable_nls+set}" = set; then :
3041   enableval=$enable_nls;
3042   case $enableval in
3043     yes)
3044       :
3045       ;;
3046     no)
3047       :
3048       ;;
3049     *)
3050       enable_nls=yes
3051 WANTED_LANGUAGES=$enableval
3052       ;;
3053   esac
3054
3055 else
3056   enable_nls=no
3057 fi
3058
3059
3060
3061 if test "$enable_nls" = yes; then
3062
3063 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3064
3065 fi
3066
3067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3068 $as_echo "$enable_nls" >&6; }
3069
3070
3071
3072 #
3073 # Default port number (--with-pgport), default 5432
3074 #
3075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3076 $as_echo_n "checking for default port number... " >&6; }
3077
3078
3079
3080 # Check whether --with-pgport was given.
3081 if test "${with_pgport+set}" = set; then :
3082   withval=$with_pgport;
3083   case $withval in
3084     yes)
3085       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3086       ;;
3087     no)
3088       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3089       ;;
3090     *)
3091       default_port=$withval
3092       ;;
3093   esac
3094
3095 else
3096   default_port=5432
3097 fi
3098
3099
3100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3101 $as_echo "$default_port" >&6; }
3102 # Need both of these because some places want an integer and some a string
3103
3104 cat >>confdefs.h <<_ACEOF
3105 #define DEF_PGPORT ${default_port}
3106 _ACEOF
3107
3108
3109 cat >>confdefs.h <<_ACEOF
3110 #define DEF_PGPORT_STR "${default_port}"
3111 _ACEOF
3112
3113
3114
3115 # It's worth validating port; you can get very confusing errors otherwise
3116 if test x"$default_port" = x""; then
3117   as_fn_error $? "invalid --with-pgport specification: empty string" "$LINENO" 5
3118 elif test ! x`echo "$default_port" | sed -e 's/[0-9]*//'` = x""; then
3119   as_fn_error $? "invalid --with-pgport specification: must be a number" "$LINENO" 5
3120 elif test ! x`echo "$default_port" | sed -e 's/^0.//'` = x"$default_port"; then
3121   as_fn_error $? "invalid --with-pgport specification: must not have leading 0" "$LINENO" 5
3122 elif test "$default_port" -lt "1" -o "$default_port" -gt "65535"; then
3123   as_fn_error $? "invalid --with-pgport specification: must be between 1 and 65535" "$LINENO" 5
3124 fi
3125
3126 #
3127 # '-rpath'-like feature can be disabled
3128 #
3129
3130
3131 # Check whether --enable-rpath was given.
3132 if test "${enable_rpath+set}" = set; then :
3133   enableval=$enable_rpath;
3134   case $enableval in
3135     yes)
3136       :
3137       ;;
3138     no)
3139       :
3140       ;;
3141     *)
3142       as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3143       ;;
3144   esac
3145
3146 else
3147   enable_rpath=yes
3148
3149 fi
3150
3151
3152
3153
3154 #
3155 # Spinlocks
3156 #
3157
3158
3159 # Check whether --enable-spinlocks was given.
3160 if test "${enable_spinlocks+set}" = set; then :
3161   enableval=$enable_spinlocks;
3162   case $enableval in
3163     yes)
3164       :
3165       ;;
3166     no)
3167       :
3168       ;;
3169     *)
3170       as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3171       ;;
3172   esac
3173
3174 else
3175   enable_spinlocks=yes
3176
3177 fi
3178
3179
3180
3181 #
3182 # Atomic operations
3183 #
3184
3185
3186 # Check whether --enable-atomics was given.
3187 if test "${enable_atomics+set}" = set; then :
3188   enableval=$enable_atomics;
3189   case $enableval in
3190     yes)
3191       :
3192       ;;
3193     no)
3194       :
3195       ;;
3196     *)
3197       as_fn_error $? "no argument expected for --enable-atomics option" "$LINENO" 5
3198       ;;
3199   esac
3200
3201 else
3202   enable_atomics=yes
3203
3204 fi
3205
3206
3207
3208 #
3209 # Random number generation
3210 #
3211
3212
3213 # Check whether --enable-strong-random was given.
3214 if test "${enable_strong_random+set}" = set; then :
3215   enableval=$enable_strong_random;
3216   case $enableval in
3217     yes)
3218       :
3219       ;;
3220     no)
3221       :
3222       ;;
3223     *)
3224       as_fn_error $? "no argument expected for --enable-strong-random option" "$LINENO" 5
3225       ;;
3226   esac
3227
3228 else
3229   enable_strong_random=yes
3230
3231 fi
3232
3233
3234
3235
3236 #
3237 # --enable-debug adds -g to compiler flags
3238 #
3239
3240
3241 # Check whether --enable-debug was given.
3242 if test "${enable_debug+set}" = set; then :
3243   enableval=$enable_debug;
3244   case $enableval in
3245     yes)
3246       :
3247       ;;
3248     no)
3249       :
3250       ;;
3251     *)
3252       as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3253       ;;
3254   esac
3255
3256 else
3257   enable_debug=no
3258
3259 fi
3260
3261
3262
3263
3264 #
3265 # --enable-profiling enables gcc profiling
3266 #
3267
3268
3269 # Check whether --enable-profiling was given.
3270 if test "${enable_profiling+set}" = set; then :
3271   enableval=$enable_profiling;
3272   case $enableval in
3273     yes)
3274       :
3275       ;;
3276     no)
3277       :
3278       ;;
3279     *)
3280       as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3281       ;;
3282   esac
3283
3284 else
3285   enable_profiling=no
3286
3287 fi
3288
3289
3290
3291 #
3292 # --enable-coverage enables generation of code coverage metrics with gcov
3293 #
3294
3295
3296 # Check whether --enable-coverage was given.
3297 if test "${enable_coverage+set}" = set; then :
3298   enableval=$enable_coverage;
3299   case $enableval in
3300     yes)
3301       if test -z "$GCOV"; then
3302   for ac_prog in gcov
3303 do
3304   # Extract the first word of "$ac_prog", so it can be a program name with args.
3305 set dummy $ac_prog; ac_word=$2
3306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3307 $as_echo_n "checking for $ac_word... " >&6; }
3308 if ${ac_cv_path_GCOV+:} false; then :
3309   $as_echo_n "(cached) " >&6
3310 else
3311   case $GCOV in
3312   [\\/]* | ?:[\\/]*)
3313   ac_cv_path_GCOV="$GCOV" # Let the user override the test with a path.
3314   ;;
3315   *)
3316   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3317 for as_dir in $PATH
3318 do
3319   IFS=$as_save_IFS
3320   test -z "$as_dir" && as_dir=.
3321     for ac_exec_ext in '' $ac_executable_extensions; do
3322   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3323     ac_cv_path_GCOV="$as_dir/$ac_word$ac_exec_ext"
3324     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3325     break 2
3326   fi
3327 done
3328   done
3329 IFS=$as_save_IFS
3330
3331   ;;
3332 esac
3333 fi
3334 GCOV=$ac_cv_path_GCOV
3335 if test -n "$GCOV"; then
3336   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3337 $as_echo "$GCOV" >&6; }
3338 else
3339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3340 $as_echo "no" >&6; }
3341 fi
3342
3343
3344   test -n "$GCOV" && break
3345 done
3346
3347 else
3348   # Report the value of GCOV in configure's output in all cases.
3349   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCOV" >&5
3350 $as_echo_n "checking for GCOV... " >&6; }
3351   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3352 $as_echo "$GCOV" >&6; }
3353 fi
3354
3355 if test -z "$GCOV"; then
3356   as_fn_error $? "gcov not found" "$LINENO" 5
3357 fi
3358 if test -z "$LCOV"; then
3359   for ac_prog in lcov
3360 do
3361   # Extract the first word of "$ac_prog", so it can be a program name with args.
3362 set dummy $ac_prog; ac_word=$2
3363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3364 $as_echo_n "checking for $ac_word... " >&6; }
3365 if ${ac_cv_path_LCOV+:} false; then :
3366   $as_echo_n "(cached) " >&6
3367 else
3368   case $LCOV in
3369   [\\/]* | ?:[\\/]*)
3370   ac_cv_path_LCOV="$LCOV" # Let the user override the test with a path.
3371   ;;
3372   *)
3373   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3374 for as_dir in $PATH
3375 do
3376   IFS=$as_save_IFS
3377   test -z "$as_dir" && as_dir=.
3378     for ac_exec_ext in '' $ac_executable_extensions; do
3379   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3380     ac_cv_path_LCOV="$as_dir/$ac_word$ac_exec_ext"
3381     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3382     break 2
3383   fi
3384 done
3385   done
3386 IFS=$as_save_IFS
3387
3388   ;;
3389 esac
3390 fi
3391 LCOV=$ac_cv_path_LCOV
3392 if test -n "$LCOV"; then
3393   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3394 $as_echo "$LCOV" >&6; }
3395 else
3396   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3397 $as_echo "no" >&6; }
3398 fi
3399
3400
3401   test -n "$LCOV" && break
3402 done
3403
3404 else
3405   # Report the value of LCOV in configure's output in all cases.
3406   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCOV" >&5
3407 $as_echo_n "checking for LCOV... " >&6; }
3408   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3409 $as_echo "$LCOV" >&6; }
3410 fi
3411
3412 if test -z "$LCOV"; then
3413   as_fn_error $? "lcov not found" "$LINENO" 5
3414 fi
3415 if test -z "$GENHTML"; then
3416   for ac_prog in genhtml
3417 do
3418   # Extract the first word of "$ac_prog", so it can be a program name with args.
3419 set dummy $ac_prog; ac_word=$2
3420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3421 $as_echo_n "checking for $ac_word... " >&6; }
3422 if ${ac_cv_path_GENHTML+:} false; then :
3423   $as_echo_n "(cached) " >&6
3424 else
3425   case $GENHTML in
3426   [\\/]* | ?:[\\/]*)
3427   ac_cv_path_GENHTML="$GENHTML" # Let the user override the test with a path.
3428   ;;
3429   *)
3430   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3431 for as_dir in $PATH
3432 do
3433   IFS=$as_save_IFS
3434   test -z "$as_dir" && as_dir=.
3435     for ac_exec_ext in '' $ac_executable_extensions; do
3436   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3437     ac_cv_path_GENHTML="$as_dir/$ac_word$ac_exec_ext"
3438     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3439     break 2
3440   fi
3441 done
3442   done
3443 IFS=$as_save_IFS
3444
3445   ;;
3446 esac
3447 fi
3448 GENHTML=$ac_cv_path_GENHTML
3449 if test -n "$GENHTML"; then
3450   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3451 $as_echo "$GENHTML" >&6; }
3452 else
3453   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3454 $as_echo "no" >&6; }
3455 fi
3456
3457
3458   test -n "$GENHTML" && break
3459 done
3460
3461 else
3462   # Report the value of GENHTML in configure's output in all cases.
3463   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GENHTML" >&5
3464 $as_echo_n "checking for GENHTML... " >&6; }
3465   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3466 $as_echo "$GENHTML" >&6; }
3467 fi
3468
3469 if test -z "$GENHTML"; then
3470   as_fn_error $? "genhtml not found" "$LINENO" 5
3471 fi
3472       ;;
3473     no)
3474       :
3475       ;;
3476     *)
3477       as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3478       ;;
3479   esac
3480
3481 else
3482   enable_coverage=no
3483
3484 fi
3485
3486
3487
3488
3489 #
3490 # DTrace
3491 #
3492
3493
3494 # Check whether --enable-dtrace was given.
3495 if test "${enable_dtrace+set}" = set; then :
3496   enableval=$enable_dtrace;
3497   case $enableval in
3498     yes)
3499       if test -z "$DTRACE"; then
3500   for ac_prog in dtrace
3501 do
3502   # Extract the first word of "$ac_prog", so it can be a program name with args.
3503 set dummy $ac_prog; ac_word=$2
3504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3505 $as_echo_n "checking for $ac_word... " >&6; }
3506 if ${ac_cv_path_DTRACE+:} false; then :
3507   $as_echo_n "(cached) " >&6
3508 else
3509   case $DTRACE in
3510   [\\/]* | ?:[\\/]*)
3511   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
3512   ;;
3513   *)
3514   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3515 for as_dir in $PATH
3516 do
3517   IFS=$as_save_IFS
3518   test -z "$as_dir" && as_dir=.
3519     for ac_exec_ext in '' $ac_executable_extensions; do
3520   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3521     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
3522     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3523     break 2
3524   fi
3525 done
3526   done
3527 IFS=$as_save_IFS
3528
3529   ;;
3530 esac
3531 fi
3532 DTRACE=$ac_cv_path_DTRACE
3533 if test -n "$DTRACE"; then
3534   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3535 $as_echo "$DTRACE" >&6; }
3536 else
3537   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3538 $as_echo "no" >&6; }
3539 fi
3540
3541
3542   test -n "$DTRACE" && break
3543 done
3544
3545 else
3546   # Report the value of DTRACE in configure's output in all cases.
3547   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
3548 $as_echo_n "checking for DTRACE... " >&6; }
3549   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3550 $as_echo "$DTRACE" >&6; }
3551 fi
3552
3553 if test -z "$DTRACE"; then
3554   as_fn_error $? "dtrace not found" "$LINENO" 5
3555 fi
3556
3557       ;;
3558     no)
3559       :
3560       ;;
3561     *)
3562       as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3563       ;;
3564   esac
3565
3566 else
3567   enable_dtrace=no
3568
3569 fi
3570
3571
3572
3573
3574 #
3575 # TAP tests
3576 #
3577
3578
3579 # Check whether --enable-tap-tests was given.
3580 if test "${enable_tap_tests+set}" = set; then :
3581   enableval=$enable_tap_tests;
3582   case $enableval in
3583     yes)
3584       :
3585       ;;
3586     no)
3587       :
3588       ;;
3589     *)
3590       as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3591       ;;
3592   esac
3593
3594 else
3595   enable_tap_tests=no
3596
3597 fi
3598
3599
3600
3601
3602 #
3603 # Block size
3604 #
3605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3606 $as_echo_n "checking for block size... " >&6; }
3607
3608
3609
3610 # Check whether --with-blocksize was given.
3611 if test "${with_blocksize+set}" = set; then :
3612   withval=$with_blocksize;
3613   case $withval in
3614     yes)
3615       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3616       ;;
3617     no)
3618       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3619       ;;
3620     *)
3621       blocksize=$withval
3622       ;;
3623   esac
3624
3625 else
3626   blocksize=8
3627 fi
3628
3629
3630 case ${blocksize} in
3631   1) BLCKSZ=1024;;
3632   2) BLCKSZ=2048;;
3633   4) BLCKSZ=4096;;
3634   8) BLCKSZ=8192;;
3635  16) BLCKSZ=16384;;
3636  32) BLCKSZ=32768;;
3637   *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3638 esac
3639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3640 $as_echo "${blocksize}kB" >&6; }
3641
3642
3643 cat >>confdefs.h <<_ACEOF
3644 #define BLCKSZ ${BLCKSZ}
3645 _ACEOF
3646
3647
3648 #
3649 # Relation segment size
3650 #
3651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3652 $as_echo_n "checking for segment size... " >&6; }
3653
3654
3655
3656 # Check whether --with-segsize was given.
3657 if test "${with_segsize+set}" = set; then :
3658   withval=$with_segsize;
3659   case $withval in
3660     yes)
3661       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3662       ;;
3663     no)
3664       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3665       ;;
3666     *)
3667       segsize=$withval
3668       ;;
3669   esac
3670
3671 else
3672   segsize=1
3673 fi
3674
3675
3676 # this expression is set up to avoid unnecessary integer overflow
3677 # blocksize is already guaranteed to be a factor of 1024
3678 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3679 test $? -eq 0 || exit 1
3680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3681 $as_echo "${segsize}GB" >&6; }
3682
3683
3684 cat >>confdefs.h <<_ACEOF
3685 #define RELSEG_SIZE ${RELSEG_SIZE}
3686 _ACEOF
3687
3688
3689 #
3690 # WAL block size
3691 #
3692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3693 $as_echo_n "checking for WAL block size... " >&6; }
3694
3695
3696
3697 # Check whether --with-wal-blocksize was given.
3698 if test "${with_wal_blocksize+set}" = set; then :
3699   withval=$with_wal_blocksize;
3700   case $withval in
3701     yes)
3702       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3703       ;;
3704     no)
3705       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3706       ;;
3707     *)
3708       wal_blocksize=$withval
3709       ;;
3710   esac
3711
3712 else
3713   wal_blocksize=8
3714 fi
3715
3716
3717 case ${wal_blocksize} in
3718   1) XLOG_BLCKSZ=1024;;
3719   2) XLOG_BLCKSZ=2048;;
3720   4) XLOG_BLCKSZ=4096;;
3721   8) XLOG_BLCKSZ=8192;;
3722  16) XLOG_BLCKSZ=16384;;
3723  32) XLOG_BLCKSZ=32768;;
3724  64) XLOG_BLCKSZ=65536;;
3725   *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3726 esac
3727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3728 $as_echo "${wal_blocksize}kB" >&6; }
3729
3730
3731 cat >>confdefs.h <<_ACEOF
3732 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3733 _ACEOF
3734
3735
3736 #
3737 # WAL segment size
3738 #
3739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL segment size" >&5
3740 $as_echo_n "checking for WAL segment size... " >&6; }
3741
3742
3743
3744 # Check whether --with-wal-segsize was given.
3745 if test "${with_wal_segsize+set}" = set; then :
3746   withval=$with_wal_segsize;
3747   case $withval in
3748     yes)
3749       as_fn_error $? "argument required for --with-wal-segsize option" "$LINENO" 5
3750       ;;
3751     no)
3752       as_fn_error $? "argument required for --with-wal-segsize option" "$LINENO" 5
3753       ;;
3754     *)
3755       wal_segsize=$withval
3756       ;;
3757   esac
3758
3759 else
3760   wal_segsize=16
3761 fi
3762
3763
3764 case ${wal_segsize} in
3765   1) ;;
3766   2) ;;
3767   4) ;;
3768   8) ;;
3769  16) ;;
3770  32) ;;
3771  64) ;;
3772  128) ;;
3773  256) ;;
3774  512) ;;
3775  1024) ;;
3776   *) as_fn_error $? "Invalid WAL segment size. Allowed values are 1,2,4,8,16,32,64,128,256,512,1024." "$LINENO" 5
3777 esac
3778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_segsize}MB" >&5
3779 $as_echo "${wal_segsize}MB" >&6; }
3780
3781
3782 cat >>confdefs.h <<_ACEOF
3783 #define XLOG_SEG_SIZE (${wal_segsize} * 1024 * 1024)
3784 _ACEOF
3785
3786
3787 #
3788 # C compiler
3789 #
3790
3791 # For historical reasons you can also use --with-CC to specify the C compiler
3792 # to use, although the standard way to do this is to set the CC environment
3793 # variable.
3794
3795
3796
3797 # Check whether --with-CC was given.
3798 if test "${with_CC+set}" = set; then :
3799   withval=$with_CC;
3800   case $withval in
3801     yes)
3802       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3803       ;;
3804     no)
3805       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3806       ;;
3807     *)
3808       CC=$with_CC
3809       ;;
3810   esac
3811
3812 fi
3813
3814
3815
3816 case $template in
3817   aix) pgac_cc_list="gcc xlc";;
3818     *) pgac_cc_list="gcc cc";;
3819 esac
3820
3821 ac_ext=c
3822 ac_cpp='$CPP $CPPFLAGS'
3823 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3824 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3825 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3826 if test -n "$ac_tool_prefix"; then
3827   for ac_prog in $pgac_cc_list
3828   do
3829     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3830 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3832 $as_echo_n "checking for $ac_word... " >&6; }
3833 if ${ac_cv_prog_CC+:} false; then :
3834   $as_echo_n "(cached) " >&6
3835 else
3836   if test -n "$CC"; then
3837   ac_cv_prog_CC="$CC" # Let the user override the test.
3838 else
3839 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3840 for as_dir in $PATH
3841 do
3842   IFS=$as_save_IFS
3843   test -z "$as_dir" && as_dir=.
3844     for ac_exec_ext in '' $ac_executable_extensions; do
3845   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3846     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3847     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3848     break 2
3849   fi
3850 done
3851   done
3852 IFS=$as_save_IFS
3853
3854 fi
3855 fi
3856 CC=$ac_cv_prog_CC
3857 if test -n "$CC"; then
3858   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3859 $as_echo "$CC" >&6; }
3860 else
3861   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3862 $as_echo "no" >&6; }
3863 fi
3864
3865
3866     test -n "$CC" && break
3867   done
3868 fi
3869 if test -z "$CC"; then
3870   ac_ct_CC=$CC
3871   for ac_prog in $pgac_cc_list
3872 do
3873   # Extract the first word of "$ac_prog", so it can be a program name with args.
3874 set dummy $ac_prog; ac_word=$2
3875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3876 $as_echo_n "checking for $ac_word... " >&6; }
3877 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3878   $as_echo_n "(cached) " >&6
3879 else
3880   if test -n "$ac_ct_CC"; then
3881   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3882 else
3883 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3884 for as_dir in $PATH
3885 do
3886   IFS=$as_save_IFS
3887   test -z "$as_dir" && as_dir=.
3888     for ac_exec_ext in '' $ac_executable_extensions; do
3889   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3890     ac_cv_prog_ac_ct_CC="$ac_prog"
3891     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3892     break 2
3893   fi
3894 done
3895   done
3896 IFS=$as_save_IFS
3897
3898 fi
3899 fi
3900 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3901 if test -n "$ac_ct_CC"; then
3902   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3903 $as_echo "$ac_ct_CC" >&6; }
3904 else
3905   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3906 $as_echo "no" >&6; }
3907 fi
3908
3909
3910   test -n "$ac_ct_CC" && break
3911 done
3912
3913   if test "x$ac_ct_CC" = x; then
3914     CC=""
3915   else
3916     case $cross_compiling:$ac_tool_warned in
3917 yes:)
3918 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3919 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3920 ac_tool_warned=yes ;;
3921 esac
3922     CC=$ac_ct_CC
3923   fi
3924 fi
3925
3926
3927 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3928 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3929 as_fn_error $? "no acceptable C compiler found in \$PATH
3930 See \`config.log' for more details" "$LINENO" 5; }
3931
3932 # Provide some information about the compiler.
3933 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3934 set X $ac_compile
3935 ac_compiler=$2
3936 for ac_option in --version -v -V -qversion; do
3937   { { ac_try="$ac_compiler $ac_option >&5"
3938 case "(($ac_try" in
3939   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3940   *) ac_try_echo=$ac_try;;
3941 esac
3942 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3943 $as_echo "$ac_try_echo"; } >&5
3944   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3945   ac_status=$?
3946   if test -s conftest.err; then
3947     sed '10a\
3948 ... rest of stderr output deleted ...
3949          10q' conftest.err >conftest.er1
3950     cat conftest.er1 >&5
3951   fi
3952   rm -f conftest.er1 conftest.err
3953   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3954   test $ac_status = 0; }
3955 done
3956
3957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3958 /* end confdefs.h.  */
3959
3960 int
3961 main ()
3962 {
3963
3964   ;
3965   return 0;
3966 }
3967 _ACEOF
3968 ac_clean_files_save=$ac_clean_files
3969 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3970 # Try to create an executable without -o first, disregard a.out.
3971 # It will help us diagnose broken compilers, and finding out an intuition
3972 # of exeext.
3973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3974 $as_echo_n "checking whether the C compiler works... " >&6; }
3975 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3976
3977 # The possible output files:
3978 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3979
3980 ac_rmfiles=
3981 for ac_file in $ac_files
3982 do
3983   case $ac_file in
3984     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3985     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3986   esac
3987 done
3988 rm -f $ac_rmfiles
3989
3990 if { { ac_try="$ac_link_default"
3991 case "(($ac_try" in
3992   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3993   *) ac_try_echo=$ac_try;;
3994 esac
3995 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3996 $as_echo "$ac_try_echo"; } >&5
3997   (eval "$ac_link_default") 2>&5
3998   ac_status=$?
3999   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4000   test $ac_status = 0; }; then :
4001   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4002 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4003 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
4004 # so that the user can short-circuit this test for compilers unknown to
4005 # Autoconf.
4006 for ac_file in $ac_files ''
4007 do
4008   test -f "$ac_file" || continue
4009   case $ac_file in
4010     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4011         ;;
4012     [ab].out )
4013         # We found the default executable, but exeext='' is most
4014         # certainly right.
4015         break;;
4016     *.* )
4017         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4018         then :; else
4019            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4020         fi
4021         # We set ac_cv_exeext here because the later test for it is not
4022         # safe: cross compilers may not add the suffix if given an `-o'
4023         # argument, so we may need to know it at that point already.
4024         # Even if this section looks crufty: it has the advantage of
4025         # actually working.
4026         break;;
4027     * )
4028         break;;
4029   esac
4030 done
4031 test "$ac_cv_exeext" = no && ac_cv_exeext=
4032
4033 else
4034   ac_file=''
4035 fi
4036 if test -z "$ac_file"; then :
4037   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4038 $as_echo "no" >&6; }
4039 $as_echo "$as_me: failed program was:" >&5
4040 sed 's/^/| /' conftest.$ac_ext >&5
4041
4042 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4043 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4044 as_fn_error 77 "C compiler cannot create executables
4045 See \`config.log' for more details" "$LINENO" 5; }
4046 else
4047   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4048 $as_echo "yes" >&6; }
4049 fi
4050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4051 $as_echo_n "checking for C compiler default output file name... " >&6; }
4052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4053 $as_echo "$ac_file" >&6; }
4054 ac_exeext=$ac_cv_exeext
4055
4056 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4057 ac_clean_files=$ac_clean_files_save
4058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4059 $as_echo_n "checking for suffix of executables... " >&6; }
4060 if { { ac_try="$ac_link"
4061 case "(($ac_try" in
4062   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4063   *) ac_try_echo=$ac_try;;
4064 esac
4065 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4066 $as_echo "$ac_try_echo"; } >&5
4067   (eval "$ac_link") 2>&5
4068   ac_status=$?
4069   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4070   test $ac_status = 0; }; then :
4071   # If both `conftest.exe' and `conftest' are `present' (well, observable)
4072 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4073 # work properly (i.e., refer to `conftest.exe'), while it won't with
4074 # `rm'.
4075 for ac_file in conftest.exe conftest conftest.*; do
4076   test -f "$ac_file" || continue
4077   case $ac_file in
4078     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4079     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4080           break;;
4081     * ) break;;
4082   esac
4083 done
4084 else
4085   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4086 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4087 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4088 See \`config.log' for more details" "$LINENO" 5; }
4089 fi
4090 rm -f conftest conftest$ac_cv_exeext
4091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4092 $as_echo "$ac_cv_exeext" >&6; }
4093
4094 rm -f conftest.$ac_ext
4095 EXEEXT=$ac_cv_exeext
4096 ac_exeext=$EXEEXT
4097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4098 /* end confdefs.h.  */
4099 #include <stdio.h>
4100 int
4101 main ()
4102 {
4103 FILE *f = fopen ("conftest.out", "w");
4104  return ferror (f) || fclose (f) != 0;
4105
4106   ;
4107   return 0;
4108 }
4109 _ACEOF
4110 ac_clean_files="$ac_clean_files conftest.out"
4111 # Check that the compiler produces executables we can run.  If not, either
4112 # the compiler is broken, or we cross compile.
4113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4114 $as_echo_n "checking whether we are cross compiling... " >&6; }
4115 if test "$cross_compiling" != yes; then
4116   { { ac_try="$ac_link"
4117 case "(($ac_try" in
4118   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4119   *) ac_try_echo=$ac_try;;
4120 esac
4121 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4122 $as_echo "$ac_try_echo"; } >&5
4123   (eval "$ac_link") 2>&5
4124   ac_status=$?
4125   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4126   test $ac_status = 0; }
4127   if { ac_try='./conftest$ac_cv_exeext'
4128   { { case "(($ac_try" in
4129   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4130   *) ac_try_echo=$ac_try;;
4131 esac
4132 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4133 $as_echo "$ac_try_echo"; } >&5
4134   (eval "$ac_try") 2>&5
4135   ac_status=$?
4136   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4137   test $ac_status = 0; }; }; then
4138     cross_compiling=no
4139   else
4140     if test "$cross_compiling" = maybe; then
4141         cross_compiling=yes
4142     else
4143         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4144 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4145 as_fn_error $? "cannot run C compiled programs.
4146 If you meant to cross compile, use \`--host'.
4147 See \`config.log' for more details" "$LINENO" 5; }
4148     fi
4149   fi
4150 fi
4151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4152 $as_echo "$cross_compiling" >&6; }
4153
4154 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4155 ac_clean_files=$ac_clean_files_save
4156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4157 $as_echo_n "checking for suffix of object files... " >&6; }
4158 if ${ac_cv_objext+:} false; then :
4159   $as_echo_n "(cached) " >&6
4160 else
4161   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4162 /* end confdefs.h.  */
4163
4164 int
4165 main ()
4166 {
4167
4168   ;
4169   return 0;
4170 }
4171 _ACEOF
4172 rm -f conftest.o conftest.obj
4173 if { { ac_try="$ac_compile"
4174 case "(($ac_try" in
4175   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4176   *) ac_try_echo=$ac_try;;
4177 esac
4178 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4179 $as_echo "$ac_try_echo"; } >&5
4180   (eval "$ac_compile") 2>&5
4181   ac_status=$?
4182   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4183   test $ac_status = 0; }; then :
4184   for ac_file in conftest.o conftest.obj conftest.*; do
4185   test -f "$ac_file" || continue;
4186   case $ac_file in
4187     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4188     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4189        break;;
4190   esac
4191 done
4192 else
4193   $as_echo "$as_me: failed program was:" >&5
4194 sed 's/^/| /' conftest.$ac_ext >&5
4195
4196 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4197 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4198 as_fn_error $? "cannot compute suffix of object files: cannot compile
4199 See \`config.log' for more details" "$LINENO" 5; }
4200 fi
4201 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4202 fi
4203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4204 $as_echo "$ac_cv_objext" >&6; }
4205 OBJEXT=$ac_cv_objext
4206 ac_objext=$OBJEXT
4207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4208 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4209 if ${ac_cv_c_compiler_gnu+:} false; then :
4210   $as_echo_n "(cached) " >&6
4211 else
4212   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4213 /* end confdefs.h.  */
4214
4215 int
4216 main ()
4217 {
4218 #ifndef __GNUC__
4219        choke me
4220 #endif
4221
4222   ;
4223   return 0;
4224 }
4225 _ACEOF
4226 if ac_fn_c_try_compile "$LINENO"; then :
4227   ac_compiler_gnu=yes
4228 else
4229   ac_compiler_gnu=no
4230 fi
4231 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4232 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4233
4234 fi
4235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4236 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4237 if test $ac_compiler_gnu = yes; then
4238   GCC=yes
4239 else
4240   GCC=
4241 fi
4242 ac_test_CFLAGS=${CFLAGS+set}
4243 ac_save_CFLAGS=$CFLAGS
4244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4245 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4246 if ${ac_cv_prog_cc_g+:} false; then :
4247   $as_echo_n "(cached) " >&6
4248 else
4249   ac_save_c_werror_flag=$ac_c_werror_flag
4250    ac_c_werror_flag=yes
4251    ac_cv_prog_cc_g=no
4252    CFLAGS="-g"
4253    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4254 /* end confdefs.h.  */
4255
4256 int
4257 main ()
4258 {
4259
4260   ;
4261   return 0;
4262 }
4263 _ACEOF
4264 if ac_fn_c_try_compile "$LINENO"; then :
4265   ac_cv_prog_cc_g=yes
4266 else
4267   CFLAGS=""
4268       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4269 /* end confdefs.h.  */
4270
4271 int
4272 main ()
4273 {
4274
4275   ;
4276   return 0;
4277 }
4278 _ACEOF
4279 if ac_fn_c_try_compile "$LINENO"; then :
4280
4281 else
4282   ac_c_werror_flag=$ac_save_c_werror_flag
4283          CFLAGS="-g"
4284          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4285 /* end confdefs.h.  */
4286
4287 int
4288 main ()
4289 {
4290
4291   ;
4292   return 0;
4293 }
4294 _ACEOF
4295 if ac_fn_c_try_compile "$LINENO"; then :
4296   ac_cv_prog_cc_g=yes
4297 fi
4298 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4299 fi
4300 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4301 fi
4302 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4303    ac_c_werror_flag=$ac_save_c_werror_flag
4304 fi
4305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4306 $as_echo "$ac_cv_prog_cc_g" >&6; }
4307 if test "$ac_test_CFLAGS" = set; then
4308   CFLAGS=$ac_save_CFLAGS
4309 elif test $ac_cv_prog_cc_g = yes; then
4310   if test "$GCC" = yes; then
4311     CFLAGS="-g -O2"
4312   else
4313     CFLAGS="-g"
4314   fi
4315 else
4316   if test "$GCC" = yes; then
4317     CFLAGS="-O2"
4318   else
4319     CFLAGS=
4320   fi
4321 fi
4322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4323 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4324 if ${ac_cv_prog_cc_c89+:} false; then :
4325   $as_echo_n "(cached) " >&6
4326 else
4327   ac_cv_prog_cc_c89=no
4328 ac_save_CC=$CC
4329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4330 /* end confdefs.h.  */
4331 #include <stdarg.h>
4332 #include <stdio.h>
4333 struct stat;
4334 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4335 struct buf { int x; };
4336 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4337 static char *e (p, i)
4338      char **p;
4339      int i;
4340 {
4341   return p[i];
4342 }
4343 static char *f (char * (*g) (char **, int), char **p, ...)
4344 {
4345   char *s;
4346   va_list v;
4347   va_start (v,p);
4348   s = g (p, va_arg (v,int));
4349   va_end (v);
4350   return s;
4351 }
4352
4353 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4354    function prototypes and stuff, but not '\xHH' hex character constants.
4355    These don't provoke an error unfortunately, instead are silently treated
4356    as 'x'.  The following induces an error, until -std is added to get
4357    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4358    array size at least.  It's necessary to write '\x00'==0 to get something
4359    that's true only with -std.  */
4360 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4361
4362 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4363    inside strings and character constants.  */
4364 #define FOO(x) 'x'
4365 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4366
4367 int test (int i, double x);
4368 struct s1 {int (*f) (int a);};
4369 struct s2 {int (*f) (double a);};
4370 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4371 int argc;
4372 char **argv;
4373 int
4374 main ()
4375 {
4376 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4377   ;
4378   return 0;
4379 }
4380 _ACEOF
4381 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4382         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4383 do
4384   CC="$ac_save_CC $ac_arg"
4385   if ac_fn_c_try_compile "$LINENO"; then :
4386   ac_cv_prog_cc_c89=$ac_arg
4387 fi
4388 rm -f core conftest.err conftest.$ac_objext
4389   test "x$ac_cv_prog_cc_c89" != "xno" && break
4390 done
4391 rm -f conftest.$ac_ext
4392 CC=$ac_save_CC
4393
4394 fi
4395 # AC_CACHE_VAL
4396 case "x$ac_cv_prog_cc_c89" in
4397   x)
4398     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4399 $as_echo "none needed" >&6; } ;;
4400   xno)
4401     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4402 $as_echo "unsupported" >&6; } ;;
4403   *)
4404     CC="$CC $ac_cv_prog_cc_c89"
4405     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4406 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4407 esac
4408 if test "x$ac_cv_prog_cc_c89" != xno; then :
4409
4410 fi
4411
4412 ac_ext=c
4413 ac_cpp='$CPP $CPPFLAGS'
4414 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4415 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4416 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4417
4418
4419 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4420 # but has idiosyncrasies of its own.  We assume icc will define
4421 # __INTEL_COMPILER regardless of CFLAGS.
4422
4423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4424 /* end confdefs.h.  */
4425
4426 int
4427 main ()
4428 {
4429 #ifndef __INTEL_COMPILER
4430 choke me
4431 #endif
4432   ;
4433   return 0;
4434 }
4435 _ACEOF
4436 if ac_fn_c_try_compile "$LINENO"; then :
4437   ICC=yes
4438 else
4439   ICC=no
4440 fi
4441 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4442
4443 # Check if it's Sun Studio compiler. We assume that
4444 # __SUNPRO_C will be defined for Sun Studio compilers
4445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4446 /* end confdefs.h.  */
4447
4448 int
4449 main ()
4450 {
4451 #ifndef __SUNPRO_C
4452 choke me
4453 #endif
4454   ;
4455   return 0;
4456 }
4457 _ACEOF
4458 if ac_fn_c_try_compile "$LINENO"; then :
4459   SUN_STUDIO_CC=yes
4460 else
4461   SUN_STUDIO_CC=no
4462 fi
4463 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4464
4465
4466
4467 unset CFLAGS
4468
4469 #
4470 # Read the template
4471 #
4472 . "$srcdir/src/template/$template" || exit
4473
4474 # CFLAGS are selected so:
4475 # If the user specifies something in the environment, that is used.
4476 # else:  If the template file set something, that is used.
4477 # else:  If coverage was enabled, don't set anything.
4478 # else:  If the compiler is GCC, then we use -O2.
4479 # else:  If the compiler is something else, then we use -O, unless debugging.
4480
4481 if test "$ac_env_CFLAGS_set" = set; then
4482   CFLAGS=$ac_env_CFLAGS_value
4483 elif test "${CFLAGS+set}" = set; then
4484   : # (keep what template set)
4485 elif test "$enable_coverage" = yes; then
4486   : # no optimization by default
4487 elif test "$GCC" = yes; then
4488   CFLAGS="-O2"
4489 else
4490   # if the user selected debug mode, don't use -O
4491   if test "$enable_debug" != yes; then
4492     CFLAGS="-O"
4493   fi
4494 fi
4495
4496 # CFLAGS we determined above will be added back at the end
4497 user_CFLAGS=$CFLAGS
4498 CFLAGS=""
4499
4500 # set CFLAGS_VECTOR from the environment, if available
4501 if test "$ac_env_CFLAGS_VECTOR_set" = set; then
4502   CFLAGS_VECTOR=$ac_env_CFLAGS_VECTOR_value
4503 fi
4504
4505 # Some versions of GCC support some additional useful warning flags.
4506 # Check whether they are supported, and add them to CFLAGS if so.
4507 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
4508 # but has its own.  Also check other compiler-specific flags here.
4509
4510 if test "$GCC" = yes -a "$ICC" = no; then
4511   CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
4512   # These work in some but not all gcc versions
4513   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5
4514 $as_echo_n "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
4515 if ${pgac_cv_prog_cc_cflags__Wdeclaration_after_statement+:} false; then :
4516   $as_echo_n "(cached) " >&6
4517 else
4518   pgac_save_CFLAGS=$CFLAGS
4519 CFLAGS="$pgac_save_CFLAGS -Wdeclaration-after-statement"
4520 ac_save_c_werror_flag=$ac_c_werror_flag
4521 ac_c_werror_flag=yes
4522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4523 /* end confdefs.h.  */
4524
4525 int
4526 main ()
4527 {
4528
4529   ;
4530   return 0;
4531 }
4532 _ACEOF
4533 if ac_fn_c_try_compile "$LINENO"; then :
4534   pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=yes
4535 else
4536   pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=no
4537 fi
4538 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4539 ac_c_werror_flag=$ac_save_c_werror_flag
4540 CFLAGS="$pgac_save_CFLAGS"
4541 fi
4542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&5
4543 $as_echo "$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&6; }
4544 if test x"$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" = x"yes"; then
4545   CFLAGS="$CFLAGS -Wdeclaration-after-statement"
4546 fi
4547
4548   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wendif-labels" >&5
4549 $as_echo_n "checking whether $CC supports -Wendif-labels... " >&6; }
4550 if ${pgac_cv_prog_cc_cflags__Wendif_labels+:} false; then :
4551   $as_echo_n "(cached) " >&6
4552 else
4553   pgac_save_CFLAGS=$CFLAGS
4554 CFLAGS="$pgac_save_CFLAGS -Wendif-labels"
4555 ac_save_c_werror_flag=$ac_c_werror_flag
4556 ac_c_werror_flag=yes
4557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4558 /* end confdefs.h.  */
4559
4560 int
4561 main ()
4562 {
4563
4564   ;
4565   return 0;
4566 }
4567 _ACEOF
4568 if ac_fn_c_try_compile "$LINENO"; then :
4569   pgac_cv_prog_cc_cflags__Wendif_labels=yes
4570 else
4571   pgac_cv_prog_cc_cflags__Wendif_labels=no
4572 fi
4573 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4574 ac_c_werror_flag=$ac_save_c_werror_flag
4575 CFLAGS="$pgac_save_CFLAGS"
4576 fi
4577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wendif_labels" >&5
4578 $as_echo "$pgac_cv_prog_cc_cflags__Wendif_labels" >&6; }
4579 if test x"$pgac_cv_prog_cc_cflags__Wendif_labels" = x"yes"; then
4580   CFLAGS="$CFLAGS -Wendif-labels"
4581 fi
4582
4583   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wmissing-format-attribute" >&5
4584 $as_echo_n "checking whether $CC supports -Wmissing-format-attribute... " >&6; }
4585 if ${pgac_cv_prog_cc_cflags__Wmissing_format_attribute+:} false; then :
4586   $as_echo_n "(cached) " >&6
4587 else
4588   pgac_save_CFLAGS=$CFLAGS
4589 CFLAGS="$pgac_save_CFLAGS -Wmissing-format-attribute"
4590 ac_save_c_werror_flag=$ac_c_werror_flag
4591 ac_c_werror_flag=yes
4592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4593 /* end confdefs.h.  */
4594
4595 int
4596 main ()
4597 {
4598
4599   ;
4600   return 0;
4601 }
4602 _ACEOF
4603 if ac_fn_c_try_compile "$LINENO"; then :
4604   pgac_cv_prog_cc_cflags__Wmissing_format_attribute=yes
4605 else
4606   pgac_cv_prog_cc_cflags__Wmissing_format_attribute=no
4607 fi
4608 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4609 ac_c_werror_flag=$ac_save_c_werror_flag
4610 CFLAGS="$pgac_save_CFLAGS"
4611 fi
4612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wmissing_format_attribute" >&5
4613 $as_echo "$pgac_cv_prog_cc_cflags__Wmissing_format_attribute" >&6; }
4614 if test x"$pgac_cv_prog_cc_cflags__Wmissing_format_attribute" = x"yes"; then
4615   CFLAGS="$CFLAGS -Wmissing-format-attribute"
4616 fi
4617
4618   # This was included in -Wall/-Wformat in older GCC versions
4619   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wformat-security" >&5
4620 $as_echo_n "checking whether $CC supports -Wformat-security... " >&6; }
4621 if ${pgac_cv_prog_cc_cflags__Wformat_security+:} false; then :
4622   $as_echo_n "(cached) " >&6
4623 else
4624   pgac_save_CFLAGS=$CFLAGS
4625 CFLAGS="$pgac_save_CFLAGS -Wformat-security"
4626 ac_save_c_werror_flag=$ac_c_werror_flag
4627 ac_c_werror_flag=yes
4628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4629 /* end confdefs.h.  */
4630
4631 int
4632 main ()
4633 {
4634
4635   ;
4636   return 0;
4637 }
4638 _ACEOF
4639 if ac_fn_c_try_compile "$LINENO"; then :
4640   pgac_cv_prog_cc_cflags__Wformat_security=yes
4641 else
4642   pgac_cv_prog_cc_cflags__Wformat_security=no
4643 fi
4644 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4645 ac_c_werror_flag=$ac_save_c_werror_flag
4646 CFLAGS="$pgac_save_CFLAGS"
4647 fi
4648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wformat_security" >&5
4649 $as_echo "$pgac_cv_prog_cc_cflags__Wformat_security" >&6; }
4650 if test x"$pgac_cv_prog_cc_cflags__Wformat_security" = x"yes"; then
4651   CFLAGS="$CFLAGS -Wformat-security"
4652 fi
4653
4654   # Disable strict-aliasing rules; needed for gcc 3.3+
4655   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-strict-aliasing" >&5
4656 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4657 if ${pgac_cv_prog_cc_cflags__fno_strict_aliasing+:} false; then :
4658   $as_echo_n "(cached) " >&6
4659 else
4660   pgac_save_CFLAGS=$CFLAGS
4661 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4662 ac_save_c_werror_flag=$ac_c_werror_flag
4663 ac_c_werror_flag=yes
4664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4665 /* end confdefs.h.  */
4666
4667 int
4668 main ()
4669 {
4670
4671   ;
4672   return 0;
4673 }
4674 _ACEOF
4675 if ac_fn_c_try_compile "$LINENO"; then :
4676   pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4677 else
4678   pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4679 fi
4680 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4681 ac_c_werror_flag=$ac_save_c_werror_flag
4682 CFLAGS="$pgac_save_CFLAGS"
4683 fi
4684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4685 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4686 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4687   CFLAGS="$CFLAGS -fno-strict-aliasing"
4688 fi
4689
4690   # Disable optimizations that assume no overflow; needed for gcc 4.3+
4691   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fwrapv" >&5
4692 $as_echo_n "checking whether $CC supports -fwrapv... " >&6; }
4693 if ${pgac_cv_prog_cc_cflags__fwrapv+:} false; then :
4694   $as_echo_n "(cached) " >&6
4695 else
4696   pgac_save_CFLAGS=$CFLAGS
4697 CFLAGS="$pgac_save_CFLAGS -fwrapv"
4698 ac_save_c_werror_flag=$ac_c_werror_flag
4699 ac_c_werror_flag=yes
4700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4701 /* end confdefs.h.  */
4702
4703 int
4704 main ()
4705 {
4706
4707   ;
4708   return 0;
4709 }
4710 _ACEOF
4711 if ac_fn_c_try_compile "$LINENO"; then :
4712   pgac_cv_prog_cc_cflags__fwrapv=yes
4713 else
4714   pgac_cv_prog_cc_cflags__fwrapv=no
4715 fi
4716 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4717 ac_c_werror_flag=$ac_save_c_werror_flag
4718 CFLAGS="$pgac_save_CFLAGS"
4719 fi
4720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fwrapv" >&5
4721 $as_echo "$pgac_cv_prog_cc_cflags__fwrapv" >&6; }
4722 if test x"$pgac_cv_prog_cc_cflags__fwrapv" = x"yes"; then
4723   CFLAGS="$CFLAGS -fwrapv"
4724 fi
4725
4726   # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
4727   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fexcess-precision=standard" >&5
4728 $as_echo_n "checking whether $CC supports -fexcess-precision=standard... " >&6; }
4729 if ${pgac_cv_prog_cc_cflags__fexcess_precision_standard+:} false; then :
4730   $as_echo_n "(cached) " >&6
4731 else
4732   pgac_save_CFLAGS=$CFLAGS
4733 CFLAGS="$pgac_save_CFLAGS -fexcess-precision=standard"
4734 ac_save_c_werror_flag=$ac_c_werror_flag
4735 ac_c_werror_flag=yes
4736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4737 /* end confdefs.h.  */
4738
4739 int
4740 main ()
4741 {
4742
4743   ;
4744   return 0;
4745 }
4746 _ACEOF
4747 if ac_fn_c_try_compile "$LINENO"; then :
4748   pgac_cv_prog_cc_cflags__fexcess_precision_standard=yes
4749 else
4750   pgac_cv_prog_cc_cflags__fexcess_precision_standard=no
4751 fi
4752 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4753 ac_c_werror_flag=$ac_save_c_werror_flag
4754 CFLAGS="$pgac_save_CFLAGS"
4755 fi
4756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fexcess_precision_standard" >&5
4757 $as_echo "$pgac_cv_prog_cc_cflags__fexcess_precision_standard" >&6; }
4758 if test x"$pgac_cv_prog_cc_cflags__fexcess_precision_standard" = x"yes"; then
4759   CFLAGS="$CFLAGS -fexcess-precision=standard"
4760 fi
4761
4762   # Optimization flags for specific files that benefit from vectorization
4763   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -funroll-loops" >&5
4764 $as_echo_n "checking whether $CC supports -funroll-loops... " >&6; }
4765 if ${pgac_cv_prog_cc_cflags__funroll_loops+:} false; then :
4766   $as_echo_n "(cached) " >&6
4767 else
4768   pgac_save_CFLAGS=$CFLAGS
4769 CFLAGS="$pgac_save_CFLAGS -funroll-loops"
4770 ac_save_c_werror_flag=$ac_c_werror_flag
4771 ac_c_werror_flag=yes
4772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4773 /* end confdefs.h.  */
4774
4775 int
4776 main ()
4777 {
4778
4779   ;
4780   return 0;
4781 }
4782 _ACEOF
4783 if ac_fn_c_try_compile "$LINENO"; then :
4784   pgac_cv_prog_cc_cflags__funroll_loops=yes
4785 else
4786   pgac_cv_prog_cc_cflags__funroll_loops=no
4787 fi
4788 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4789 ac_c_werror_flag=$ac_save_c_werror_flag
4790 CFLAGS="$pgac_save_CFLAGS"
4791 fi
4792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__funroll_loops" >&5
4793 $as_echo "$pgac_cv_prog_cc_cflags__funroll_loops" >&6; }
4794 if test x"$pgac_cv_prog_cc_cflags__funroll_loops" = x"yes"; then
4795   CFLAGS_VECTOR="${CFLAGS_VECTOR} -funroll-loops"
4796 fi
4797
4798   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -ftree-vectorize" >&5
4799 $as_echo_n "checking whether $CC supports -ftree-vectorize... " >&6; }
4800 if ${pgac_cv_prog_cc_cflags__ftree_vectorize+:} false; then :
4801   $as_echo_n "(cached) " >&6
4802 else
4803   pgac_save_CFLAGS=$CFLAGS
4804 CFLAGS="$pgac_save_CFLAGS -ftree-vectorize"
4805 ac_save_c_werror_flag=$ac_c_werror_flag
4806 ac_c_werror_flag=yes
4807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4808 /* end confdefs.h.  */
4809
4810 int
4811 main ()
4812 {
4813
4814   ;
4815   return 0;
4816 }
4817 _ACEOF
4818 if ac_fn_c_try_compile "$LINENO"; then :
4819   pgac_cv_prog_cc_cflags__ftree_vectorize=yes
4820 else
4821   pgac_cv_prog_cc_cflags__ftree_vectorize=no
4822 fi
4823 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4824 ac_c_werror_flag=$ac_save_c_werror_flag
4825 CFLAGS="$pgac_save_CFLAGS"
4826 fi
4827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__ftree_vectorize" >&5
4828 $as_echo "$pgac_cv_prog_cc_cflags__ftree_vectorize" >&6; }
4829 if test x"$pgac_cv_prog_cc_cflags__ftree_vectorize" = x"yes"; then
4830   CFLAGS_VECTOR="${CFLAGS_VECTOR} -ftree-vectorize"
4831 fi
4832
4833   # We want to suppress clang's unhelpful unused-command-line-argument warnings
4834   # but gcc won't complain about unrecognized -Wno-foo switches, so we have to
4835   # test for the positive form and if that works, add the negative form
4836   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wunused-command-line-argument" >&5
4837 $as_echo_n "checking whether $CC supports -Wunused-command-line-argument... " >&6; }
4838 if ${pgac_cv_prog_cc_cflags__Wunused_command_line_argument+:} false; then :
4839   $as_echo_n "(cached) " >&6
4840 else
4841   pgac_save_CFLAGS=$CFLAGS
4842 CFLAGS="$pgac_save_CFLAGS -Wunused-command-line-argument"
4843 ac_save_c_werror_flag=$ac_c_werror_flag
4844 ac_c_werror_flag=yes
4845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4846 /* end confdefs.h.  */
4847
4848 int
4849 main ()
4850 {
4851
4852   ;
4853   return 0;
4854 }
4855 _ACEOF
4856 if ac_fn_c_try_compile "$LINENO"; then :
4857   pgac_cv_prog_cc_cflags__Wunused_command_line_argument=yes
4858 else
4859   pgac_cv_prog_cc_cflags__Wunused_command_line_argument=no
4860 fi
4861 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4862 ac_c_werror_flag=$ac_save_c_werror_flag
4863 CFLAGS="$pgac_save_CFLAGS"
4864 fi
4865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wunused_command_line_argument" >&5
4866 $as_echo "$pgac_cv_prog_cc_cflags__Wunused_command_line_argument" >&6; }
4867 if test x"$pgac_cv_prog_cc_cflags__Wunused_command_line_argument" = x"yes"; then
4868   NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
4869 fi
4870
4871   if test -n "$NOT_THE_CFLAGS"; then
4872     CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
4873   fi
4874 elif test "$ICC" = yes; then
4875   # Intel's compiler has a bug/misoptimization in checking for
4876   # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
4877   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mp1" >&5
4878 $as_echo_n "checking whether $CC supports -mp1... " >&6; }
4879 if ${pgac_cv_prog_cc_cflags__mp1+:} false; then :
4880   $as_echo_n "(cached) " >&6
4881 else
4882   pgac_save_CFLAGS=$CFLAGS
4883 CFLAGS="$pgac_save_CFLAGS -mp1"
4884 ac_save_c_werror_flag=$ac_c_werror_flag
4885 ac_c_werror_flag=yes
4886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4887 /* end confdefs.h.  */
4888
4889 int
4890 main ()
4891 {
4892
4893   ;
4894   return 0;
4895 }
4896 _ACEOF
4897 if ac_fn_c_try_compile "$LINENO"; then :
4898   pgac_cv_prog_cc_cflags__mp1=yes
4899 else
4900   pgac_cv_prog_cc_cflags__mp1=no
4901 fi
4902 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4903 ac_c_werror_flag=$ac_save_c_werror_flag
4904 CFLAGS="$pgac_save_CFLAGS"
4905 fi
4906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__mp1" >&5
4907 $as_echo "$pgac_cv_prog_cc_cflags__mp1" >&6; }
4908 if test x"$pgac_cv_prog_cc_cflags__mp1" = x"yes"; then
4909   CFLAGS="$CFLAGS -mp1"
4910 fi
4911
4912   # Make sure strict aliasing is off (though this is said to be the default)
4913   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-strict-aliasing" >&5
4914 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4915 if ${pgac_cv_prog_cc_cflags__fno_strict_aliasing+:} false; then :
4916   $as_echo_n "(cached) " >&6
4917 else
4918   pgac_save_CFLAGS=$CFLAGS
4919 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4920 ac_save_c_werror_flag=$ac_c_werror_flag
4921 ac_c_werror_flag=yes
4922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4923 /* end confdefs.h.  */
4924
4925 int
4926 main ()
4927 {
4928
4929   ;
4930   return 0;
4931 }
4932 _ACEOF
4933 if ac_fn_c_try_compile "$LINENO"; then :
4934   pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4935 else
4936   pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4937 fi
4938 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4939 ac_c_werror_flag=$ac_save_c_werror_flag
4940 CFLAGS="$pgac_save_CFLAGS"
4941 fi
4942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4943 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4944 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4945   CFLAGS="$CFLAGS -fno-strict-aliasing"
4946 fi
4947
4948 elif test "$PORTNAME" = "aix"; then
4949   # AIX's xlc has to have strict aliasing turned off too
4950   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -qnoansialias" >&5
4951 $as_echo_n "checking whether $CC supports -qnoansialias... " >&6; }
4952 if ${pgac_cv_prog_cc_cflags__qnoansialias+:} false; then :
4953   $as_echo_n "(cached) " >&6
4954 else
4955   pgac_save_CFLAGS=$CFLAGS
4956 CFLAGS="$pgac_save_CFLAGS -qnoansialias"
4957 ac_save_c_werror_flag=$ac_c_werror_flag
4958 ac_c_werror_flag=yes
4959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4960 /* end confdefs.h.  */
4961
4962 int
4963 main ()
4964 {
4965
4966   ;
4967   return 0;
4968 }
4969 _ACEOF
4970 if ac_fn_c_try_compile "$LINENO"; then :
4971   pgac_cv_prog_cc_cflags__qnoansialias=yes
4972 else
4973   pgac_cv_prog_cc_cflags__qnoansialias=no
4974 fi
4975 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4976 ac_c_werror_flag=$ac_save_c_werror_flag
4977 CFLAGS="$pgac_save_CFLAGS"
4978 fi
4979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__qnoansialias" >&5
4980 $as_echo "$pgac_cv_prog_cc_cflags__qnoansialias" >&6; }
4981 if test x"$pgac_cv_prog_cc_cflags__qnoansialias" = x"yes"; then
4982   CFLAGS="$CFLAGS -qnoansialias"
4983 fi
4984
4985   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -qlonglong" >&5
4986 $as_echo_n "checking whether $CC supports -qlonglong... " >&6; }
4987 if ${pgac_cv_prog_cc_cflags__qlonglong+:} false; then :
4988   $as_echo_n "(cached) " >&6
4989 else
4990   pgac_save_CFLAGS=$CFLAGS
4991 CFLAGS="$pgac_save_CFLAGS -qlonglong"
4992 ac_save_c_werror_flag=$ac_c_werror_flag
4993 ac_c_werror_flag=yes
4994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4995 /* end confdefs.h.  */
4996
4997 int
4998 main ()
4999 {
5000
5001   ;
5002   return 0;
5003 }
5004 _ACEOF
5005 if ac_fn_c_try_compile "$LINENO"; then :
5006   pgac_cv_prog_cc_cflags__qlonglong=yes
5007 else
5008   pgac_cv_prog_cc_cflags__qlonglong=no
5009 fi
5010 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5011 ac_c_werror_flag=$ac_save_c_werror_flag
5012 CFLAGS="$pgac_save_CFLAGS"
5013 fi
5014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__qlonglong" >&5
5015 $as_echo "$pgac_cv_prog_cc_cflags__qlonglong" >&6; }
5016 if test x"$pgac_cv_prog_cc_cflags__qlonglong" = x"yes"; then
5017   CFLAGS="$CFLAGS -qlonglong"
5018 fi
5019
5020 elif test "$PORTNAME" = "hpux"; then
5021   # On some versions of HP-UX, libm functions do not set errno by default.
5022   # Fix that by using +Olibmerrno if the compiler recognizes it.
5023   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports +Olibmerrno" >&5
5024 $as_echo_n "checking whether $CC supports +Olibmerrno... " >&6; }
5025 if ${pgac_cv_prog_cc_cflags_pOlibmerrno+:} false; then :
5026   $as_echo_n "(cached) " >&6
5027 else
5028   pgac_save_CFLAGS=$CFLAGS
5029 CFLAGS="$pgac_save_CFLAGS +Olibmerrno"
5030 ac_save_c_werror_flag=$ac_c_werror_flag
5031 ac_c_werror_flag=yes
5032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5033 /* end confdefs.h.  */
5034
5035 int
5036 main ()
5037 {
5038
5039   ;
5040   return 0;
5041 }
5042 _ACEOF
5043 if ac_fn_c_try_compile "$LINENO"; then :
5044   pgac_cv_prog_cc_cflags_pOlibmerrno=yes
5045 else
5046   pgac_cv_prog_cc_cflags_pOlibmerrno=no
5047 fi
5048 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5049 ac_c_werror_flag=$ac_save_c_werror_flag
5050 CFLAGS="$pgac_save_CFLAGS"
5051 fi
5052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags_pOlibmerrno" >&5
5053 $as_echo "$pgac_cv_prog_cc_cflags_pOlibmerrno" >&6; }
5054 if test x"$pgac_cv_prog_cc_cflags_pOlibmerrno" = x"yes"; then
5055   CFLAGS="$CFLAGS +Olibmerrno"
5056 fi
5057
5058 fi
5059
5060 CFLAGS_VECTOR=$CFLAGS_VECTOR
5061
5062
5063 # supply -g if --enable-debug
5064 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
5065   CFLAGS="$CFLAGS -g"
5066 fi
5067
5068 # enable code coverage if --enable-coverage
5069 if test "$enable_coverage" = yes; then
5070   if test "$GCC" = yes; then
5071     CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
5072   else
5073     as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
5074   fi
5075 fi
5076
5077 # enable profiling if --enable-profiling
5078 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
5079   if test "$GCC" = yes; then
5080
5081 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
5082
5083     CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
5084   else
5085     as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
5086   fi
5087 fi
5088
5089 # We already have this in Makefile.win32, but configure needs it too
5090 if test "$PORTNAME" = "win32"; then
5091   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
5092 fi
5093
5094 # Now that we're done automatically adding stuff to CFLAGS, put back the
5095 # user-specified flags (if any) at the end.  This lets users override
5096 # the automatic additions.
5097 CFLAGS="$CFLAGS $user_CFLAGS"
5098
5099 # Check if the compiler still works with the final flag settings
5100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
5101 $as_echo_n "checking whether the C compiler still works... " >&6; }
5102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5103 /* end confdefs.h.  */
5104
5105 int
5106 main ()
5107 {
5108 return 0;
5109   ;
5110   return 0;
5111 }
5112 _ACEOF
5113 if ac_fn_c_try_link "$LINENO"; then :
5114   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5115 $as_echo "yes" >&6; }
5116 else
5117   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5118 $as_echo "no" >&6; }
5119    as_fn_error $? "cannot proceed" "$LINENO" 5
5120 fi
5121 rm -f core conftest.err conftest.$ac_objext \
5122     conftest$ac_exeext conftest.$ac_ext
5123
5124 # Defend against gcc -ffast-math
5125 if test "$GCC" = yes; then
5126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5127 /* end confdefs.h.  */
5128
5129 int
5130 main ()
5131 {
5132 #ifdef __FAST_MATH__
5133 choke me
5134 #endif
5135   ;
5136   return 0;
5137 }
5138 _ACEOF
5139 if ac_fn_c_try_compile "$LINENO"; then :
5140
5141 else
5142   as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
5143 fi
5144 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5145 fi
5146
5147 ac_ext=c
5148 ac_cpp='$CPP $CPPFLAGS'
5149 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5150 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5151 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5153 $as_echo_n "checking how to run the C preprocessor... " >&6; }
5154 # On Suns, sometimes $CPP names a directory.
5155 if test -n "$CPP" && test -d "$CPP"; then
5156   CPP=
5157 fi
5158 if test -z "$CPP"; then
5159   if ${ac_cv_prog_CPP+:} false; then :
5160   $as_echo_n "(cached) " >&6
5161 else
5162       # Double quotes because CPP needs to be expanded
5163     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5164     do
5165       ac_preproc_ok=false
5166 for ac_c_preproc_warn_flag in '' yes
5167 do
5168   # Use a header file that comes with gcc, so configuring glibc
5169   # with a fresh cross-compiler works.
5170   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5171   # <limits.h> exists even on freestanding compilers.
5172   # On the NeXT, cc -E runs the code through the compiler's parser,
5173   # not just through cpp. "Syntax error" is here to catch this case.
5174   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5175 /* end confdefs.h.  */
5176 #ifdef __STDC__
5177 # include <limits.h>
5178 #else
5179 # include <assert.h>
5180 #endif
5181                      Syntax error
5182 _ACEOF
5183 if ac_fn_c_try_cpp "$LINENO"; then :
5184
5185 else
5186   # Broken: fails on valid input.
5187 continue
5188 fi
5189 rm -f conftest.err conftest.i conftest.$ac_ext
5190
5191   # OK, works on sane cases.  Now check whether nonexistent headers
5192   # can be detected and how.
5193   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5194 /* end confdefs.h.  */
5195 #include <ac_nonexistent.h>
5196 _ACEOF
5197 if ac_fn_c_try_cpp "$LINENO"; then :
5198   # Broken: success on invalid input.
5199 continue
5200 else
5201   # Passes both tests.
5202 ac_preproc_ok=:
5203 break
5204 fi
5205 rm -f conftest.err conftest.i conftest.$ac_ext
5206
5207 done
5208 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5209 rm -f conftest.i conftest.err conftest.$ac_ext
5210 if $ac_preproc_ok; then :
5211   break
5212 fi
5213
5214     done
5215     ac_cv_prog_CPP=$CPP
5216
5217 fi
5218   CPP=$ac_cv_prog_CPP
5219 else
5220   ac_cv_prog_CPP=$CPP
5221 fi
5222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5223 $as_echo "$CPP" >&6; }
5224 ac_preproc_ok=false
5225 for ac_c_preproc_warn_flag in '' yes
5226 do
5227   # Use a header file that comes with gcc, so configuring glibc
5228   # with a fresh cross-compiler works.
5229   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5230   # <limits.h> exists even on freestanding compilers.
5231   # On the NeXT, cc -E runs the code through the compiler's parser,
5232   # not just through cpp. "Syntax error" is here to catch this case.
5233   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5234 /* end confdefs.h.  */
5235 #ifdef __STDC__
5236 # include <limits.h>
5237 #else
5238 # include <assert.h>
5239 #endif
5240                      Syntax error
5241 _ACEOF
5242 if ac_fn_c_try_cpp "$LINENO"; then :
5243
5244 else
5245   # Broken: fails on valid input.
5246 continue
5247 fi
5248 rm -f conftest.err conftest.i conftest.$ac_ext
5249
5250   # OK, works on sane cases.  Now check whether nonexistent headers
5251   # can be detected and how.
5252   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5253 /* end confdefs.h.  */
5254 #include <ac_nonexistent.h>
5255 _ACEOF
5256 if ac_fn_c_try_cpp "$LINENO"; then :
5257   # Broken: success on invalid input.
5258 continue
5259 else
5260   # Passes both tests.
5261 ac_preproc_ok=:
5262 break
5263 fi
5264 rm -f conftest.err conftest.i conftest.$ac_ext
5265
5266 done
5267 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5268 rm -f conftest.i conftest.err conftest.$ac_ext
5269 if $ac_preproc_ok; then :
5270
5271 else
5272   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5273 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5274 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5275 See \`config.log' for more details" "$LINENO" 5; }
5276 fi
5277
5278 ac_ext=c
5279 ac_cpp='$CPP $CPPFLAGS'
5280 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5281 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5282 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5283
5284
5285
5286
5287 #
5288 # Set up TAS assembly code if needed; the template file has now had its
5289 # chance to request this.
5290 #
5291 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
5292
5293
5294 if test "$need_tas" = yes ; then
5295   TAS=tas.o
5296 else
5297   TAS=""
5298 fi
5299
5300
5301
5302 #
5303 # Automatic dependency tracking
5304 #
5305
5306
5307 # Check whether --enable-depend was given.
5308 if test "${enable_depend+set}" = set; then :
5309   enableval=$enable_depend;
5310   case $enableval in
5311     yes)
5312       autodepend=yes
5313       ;;
5314     no)
5315       :
5316       ;;
5317     *)
5318       as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
5319       ;;
5320   esac
5321
5322 else
5323   enable_depend=no
5324
5325 fi
5326
5327
5328
5329
5330
5331 #
5332 # Enable assert checks
5333 #
5334
5335
5336 # Check whether --enable-cassert was given.
5337 if test "${enable_cassert+set}" = set; then :
5338   enableval=$enable_cassert;
5339   case $enableval in
5340     yes)
5341
5342 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
5343
5344       ;;
5345     no)
5346       :
5347       ;;
5348     *)
5349       as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
5350       ;;
5351   esac
5352
5353 else
5354   enable_cassert=no
5355
5356 fi
5357
5358
5359
5360
5361 #
5362 # Include directories
5363 #
5364 ac_save_IFS=$IFS
5365 IFS="${IFS}${PATH_SEPARATOR}"
5366 # SRCH_INC comes from the template file
5367 for dir in $with_includes $SRCH_INC; do
5368   if test -d "$dir"; then
5369     INCLUDES="$INCLUDES -I$dir"
5370   else
5371     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
5372 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
5373   fi
5374 done
5375 IFS=$ac_save_IFS
5376
5377
5378
5379 #
5380 # Library directories
5381 #
5382 ac_save_IFS=$IFS
5383 IFS="${IFS}${PATH_SEPARATOR}"
5384 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
5385 for dir in $LIBRARY_DIRS $SRCH_LIB; do
5386   if test -d "$dir"; then
5387     LIBDIRS="$LIBDIRS -L$dir"
5388   else
5389     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
5390 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
5391   fi
5392 done
5393 IFS=$ac_save_IFS
5394
5395 #
5396 # Enable thread-safe client libraries
5397 #
5398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
5399 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
5400
5401
5402 # Check whether --enable-thread-safety was given.
5403 if test "${enable_thread_safety+set}" = set; then :
5404   enableval=$enable_thread_safety;
5405   case $enableval in
5406     yes)
5407       :
5408       ;;
5409     no)
5410       :
5411       ;;
5412     *)
5413       as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
5414       ;;
5415   esac
5416
5417 else
5418   enable_thread_safety=yes
5419
5420 fi
5421
5422
5423 if test "$enable_thread_safety" = yes; then
5424
5425 $as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
5426
5427 fi
5428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
5429 $as_echo "$enable_thread_safety" >&6; }
5430
5431
5432 #
5433 # ICU
5434 #
5435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ICU support" >&5
5436 $as_echo_n "checking whether to build with ICU support... " >&6; }
5437
5438
5439
5440 # Check whether --with-icu was given.
5441 if test "${with_icu+set}" = set; then :
5442   withval=$with_icu;
5443   case $withval in
5444     yes)
5445
5446 $as_echo "#define USE_ICU 1" >>confdefs.h
5447
5448       ;;
5449     no)
5450       :
5451       ;;
5452     *)
5453       as_fn_error $? "no argument expected for --with-icu option" "$LINENO" 5
5454       ;;
5455   esac
5456
5457 else
5458   with_icu=no
5459
5460 fi
5461
5462
5463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icu" >&5
5464 $as_echo "$with_icu" >&6; }
5465
5466
5467 if test "$with_icu" = yes; then
5468
5469
5470
5471
5472
5473
5474
5475 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
5476         if test -n "$ac_tool_prefix"; then
5477   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
5478 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
5479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5480 $as_echo_n "checking for $ac_word... " >&6; }
5481 if ${ac_cv_path_PKG_CONFIG+:} false; then :
5482   $as_echo_n "(cached) " >&6
5483 else
5484   case $PKG_CONFIG in
5485   [\\/]* | ?:[\\/]*)
5486   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
5487   ;;
5488   *)
5489   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5490 for as_dir in $PATH
5491 do
5492   IFS=$as_save_IFS
5493   test -z "$as_dir" && as_dir=.
5494     for ac_exec_ext in '' $ac_executable_extensions; do
5495   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5496     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5497     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5498     break 2
5499   fi
5500 done
5501   done
5502 IFS=$as_save_IFS
5503
5504   ;;
5505 esac
5506 fi
5507 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
5508 if test -n "$PKG_CONFIG"; then
5509   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
5510 $as_echo "$PKG_CONFIG" >&6; }
5511 else
5512   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5513 $as_echo "no" >&6; }
5514 fi
5515
5516
5517 fi
5518 if test -z "$ac_cv_path_PKG_CONFIG"; then
5519   ac_pt_PKG_CONFIG=$PKG_CONFIG
5520   # Extract the first word of "pkg-config", so it can be a program name with args.
5521 set dummy pkg-config; ac_word=$2
5522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5523 $as_echo_n "checking for $ac_word... " >&6; }
5524 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
5525   $as_echo_n "(cached) " >&6
5526 else
5527   case $ac_pt_PKG_CONFIG in
5528   [\\/]* | ?:[\\/]*)
5529   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
5530   ;;
5531   *)
5532   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5533 for as_dir in $PATH
5534 do
5535   IFS=$as_save_IFS
5536   test -z "$as_dir" && as_dir=.
5537     for ac_exec_ext in '' $ac_executable_extensions; do
5538   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5539     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5540     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5541     break 2
5542   fi
5543 done
5544   done
5545 IFS=$as_save_IFS
5546
5547   ;;
5548 esac
5549 fi
5550 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
5551 if test -n "$ac_pt_PKG_CONFIG"; then
5552   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
5553 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
5554 else
5555   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5556 $as_echo "no" >&6; }
5557 fi
5558
5559   if test "x$ac_pt_PKG_CONFIG" = x; then
5560     PKG_CONFIG=""
5561   else
5562     case $cross_compiling:$ac_tool_warned in
5563 yes:)
5564 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5565 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5566 ac_tool_warned=yes ;;
5567 esac
5568     PKG_CONFIG=$ac_pt_PKG_CONFIG
5569   fi
5570 else
5571   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
5572 fi
5573
5574 fi
5575 if test -n "$PKG_CONFIG"; then
5576         _pkg_min_version=0.9.0
5577         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
5578 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
5579         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
5580                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5581 $as_echo "yes" >&6; }
5582         else
5583                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5584 $as_echo "no" >&6; }
5585                 PKG_CONFIG=""
5586         fi
5587 fi
5588
5589 pkg_failed=no
5590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5
5591 $as_echo_n "checking for icu-uc icu-i18n... " >&6; }
5592
5593 if test -n "$ICU_CFLAGS"; then
5594     pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
5595  elif test -n "$PKG_CONFIG"; then
5596     if test -n "$PKG_CONFIG" && \
5597     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
5598   ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
5599   ac_status=$?
5600   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5601   test $ac_status = 0; }; then
5602   pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc icu-i18n" 2>/dev/null`
5603                       test "x$?" != "x0" && pkg_failed=yes
5604 else
5605   pkg_failed=yes
5606 fi
5607  else
5608     pkg_failed=untried
5609 fi
5610 if test -n "$ICU_LIBS"; then
5611     pkg_cv_ICU_LIBS="$ICU_LIBS"
5612  elif test -n "$PKG_CONFIG"; then
5613     if test -n "$PKG_CONFIG" && \
5614     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
5615   ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
5616   ac_status=$?
5617   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5618   test $ac_status = 0; }; then
5619   pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc icu-i18n" 2>/dev/null`
5620                       test "x$?" != "x0" && pkg_failed=yes
5621 else
5622   pkg_failed=yes
5623 fi
5624  else
5625     pkg_failed=untried
5626 fi
5627
5628
5629
5630 if test $pkg_failed = yes; then
5631         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5632 $as_echo "no" >&6; }
5633
5634 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
5635         _pkg_short_errors_supported=yes
5636 else
5637         _pkg_short_errors_supported=no
5638 fi
5639         if test $_pkg_short_errors_supported = yes; then
5640                 ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
5641         else
5642                 ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
5643         fi
5644         # Put the nasty error message in config.log where it belongs
5645         echo "$ICU_PKG_ERRORS" >&5
5646
5647         as_fn_error $? "Package requirements (icu-uc icu-i18n) were not met:
5648
5649 $ICU_PKG_ERRORS
5650
5651 Consider adjusting the PKG_CONFIG_PATH environment variable if you
5652 installed software in a non-standard prefix.
5653
5654 Alternatively, you may set the environment variables ICU_CFLAGS
5655 and ICU_LIBS to avoid the need to call pkg-config.
5656 See the pkg-config man page for more details." "$LINENO" 5
5657 elif test $pkg_failed = untried; then
5658         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5659 $as_echo "no" >&6; }
5660         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5661 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5662 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
5663 is in your PATH or set the PKG_CONFIG environment variable to the full
5664 path to pkg-config.
5665
5666 Alternatively, you may set the environment variables ICU_CFLAGS
5667 and ICU_LIBS to avoid the need to call pkg-config.
5668 See the pkg-config man page for more details.
5669
5670 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
5671 See \`config.log' for more details" "$LINENO" 5; }
5672 else
5673         ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
5674         ICU_LIBS=$pkg_cv_ICU_LIBS
5675         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5676 $as_echo "yes" >&6; }
5677
5678 fi
5679 fi
5680
5681 #
5682 # Optionally build Tcl modules (PL/Tcl)
5683 #
5684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
5685 $as_echo_n "checking whether to build with Tcl... " >&6; }
5686
5687
5688
5689 # Check whether --with-tcl was given.
5690 if test "${with_tcl+set}" = set; then :
5691   withval=$with_tcl;
5692   case $withval in
5693     yes)
5694       :
5695       ;;
5696     no)
5697       :
5698       ;;
5699     *)
5700       as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
5701       ;;
5702   esac
5703
5704 else
5705   with_tcl=no
5706
5707 fi
5708
5709
5710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
5711 $as_echo "$with_tcl" >&6; }
5712
5713
5714 # We see if the path to the Tcl/Tk configuration scripts is specified.
5715 # This will override the use of tclsh to find the paths to search.
5716
5717
5718
5719
5720 # Check whether --with-tclconfig was given.
5721 if test "${with_tclconfig+set}" = set; then :
5722   withval=$with_tclconfig;
5723   case $withval in
5724     yes)
5725       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
5726       ;;
5727     no)
5728       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
5729       ;;
5730     *)
5731
5732       ;;
5733   esac
5734
5735 fi
5736
5737
5738
5739 #
5740 # Optionally build Perl modules (PL/Perl)
5741 #
5742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
5743 $as_echo_n "checking whether to build Perl modules... " >&6; }
5744
5745
5746
5747 # Check whether --with-perl was given.
5748 if test "${with_perl+set}" = set; then :
5749   withval=$with_perl;
5750   case $withval in
5751     yes)
5752       :
5753       ;;
5754     no)
5755       :
5756       ;;
5757     *)
5758       as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
5759       ;;
5760   esac
5761
5762 else
5763   with_perl=no
5764
5765 fi
5766
5767
5768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
5769 $as_echo "$with_perl" >&6; }
5770
5771
5772 #
5773 # Optionally build Python modules (PL/Python)
5774 #
5775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
5776 $as_echo_n "checking whether to build Python modules... " >&6; }
5777
5778
5779
5780 # Check whether --with-python was given.
5781 if test "${with_python+set}" = set; then :
5782   withval=$with_python;
5783   case $withval in
5784     yes)
5785       :
5786       ;;
5787     no)
5788       :
5789       ;;
5790     *)
5791       as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
5792       ;;
5793   esac
5794
5795 else
5796   with_python=no
5797
5798 fi
5799
5800
5801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
5802 $as_echo "$with_python" >&6; }
5803
5804
5805 #
5806 # GSSAPI
5807 #
5808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
5809 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
5810
5811
5812
5813 # Check whether --with-gssapi was given.
5814 if test "${with_gssapi+set}" = set; then :
5815   withval=$with_gssapi;
5816   case $withval in
5817     yes)
5818
5819
5820 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
5821
5822   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
5823
5824       ;;
5825     no)
5826       :
5827       ;;
5828     *)
5829       as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
5830       ;;
5831   esac
5832
5833 else
5834   with_gssapi=no
5835
5836 fi
5837
5838
5839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
5840 $as_echo "$with_gssapi" >&6; }
5841
5842
5843
5844
5845
5846 #
5847 # Kerberos configuration parameters
5848 #
5849
5850
5851
5852 # Check whether --with-krb-srvnam was given.
5853 if test "${with_krb_srvnam+set}" = set; then :
5854   withval=$with_krb_srvnam;
5855   case $withval in
5856     yes)
5857       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
5858       ;;
5859     no)
5860       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
5861       ;;
5862     *)
5863
5864       ;;
5865   esac
5866
5867 else
5868   with_krb_srvnam="postgres"
5869 fi
5870
5871
5872
5873 cat >>confdefs.h <<_ACEOF
5874 #define PG_KRB_SRVNAM "$with_krb_srvnam"
5875 _ACEOF
5876
5877
5878
5879 #
5880 # PAM
5881 #
5882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
5883 $as_echo_n "checking whether to build with PAM support... " >&6; }
5884
5885
5886
5887 # Check whether --with-pam was given.
5888 if test "${with_pam+set}" = set; then :
5889   withval=$with_pam;
5890   case $withval in
5891     yes)
5892
5893 $as_echo "#define USE_PAM 1" >>confdefs.h
5894
5895       ;;
5896     no)
5897       :
5898       ;;
5899     *)
5900       as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
5901       ;;
5902   esac
5903
5904 else
5905   with_pam=no
5906
5907 fi
5908
5909
5910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
5911 $as_echo "$with_pam" >&6; }
5912
5913
5914 #
5915 # BSD AUTH
5916 #
5917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
5918 $as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
5919
5920
5921
5922 # Check whether --with-bsd-auth was given.
5923 if test "${with_bsd_auth+set}" = set; then :
5924   withval=$with_bsd_auth;
5925   case $withval in
5926     yes)
5927
5928 $as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
5929
5930       ;;
5931     no)
5932       :
5933       ;;
5934     *)
5935       as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
5936       ;;
5937   esac
5938
5939 else
5940   with_bsd_auth=no
5941
5942 fi
5943
5944
5945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
5946 $as_echo "$with_bsd_auth" >&6; }
5947
5948
5949 #
5950 # LDAP
5951 #
5952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
5953 $as_echo_n "checking whether to build with LDAP support... " >&6; }
5954
5955
5956
5957 # Check whether --with-ldap was given.
5958 if test "${with_ldap+set}" = set; then :
5959   withval=$with_ldap;
5960   case $withval in
5961     yes)
5962
5963 $as_echo "#define USE_LDAP 1" >>confdefs.h
5964
5965       ;;
5966     no)
5967       :
5968       ;;
5969     *)
5970       as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
5971       ;;
5972   esac
5973
5974 else
5975   with_ldap=no
5976
5977 fi
5978
5979
5980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
5981 $as_echo "$with_ldap" >&6; }
5982
5983
5984 #
5985 # Bonjour
5986 #
5987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
5988 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
5989
5990
5991
5992 # Check whether --with-bonjour was given.
5993 if test "${with_bonjour+set}" = set; then :
5994   withval=$with_bonjour;
5995   case $withval in
5996     yes)
5997
5998 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
5999
6000       ;;
6001     no)
6002       :
6003       ;;
6004     *)
6005       as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
6006       ;;
6007   esac
6008
6009 else
6010   with_bonjour=no
6011
6012 fi
6013
6014
6015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
6016 $as_echo "$with_bonjour" >&6; }
6017
6018
6019 #
6020 # OpenSSL
6021 #
6022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with OpenSSL support" >&5
6023 $as_echo_n "checking whether to build with OpenSSL support... " >&6; }
6024
6025
6026
6027 # Check whether --with-openssl was given.
6028 if test "${with_openssl+set}" = set; then :
6029   withval=$with_openssl;
6030   case $withval in
6031     yes)
6032
6033 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
6034
6035       ;;
6036     no)
6037       :
6038       ;;
6039     *)
6040       as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
6041       ;;
6042   esac
6043
6044 else
6045   with_openssl=no
6046
6047 fi
6048
6049
6050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_openssl" >&5
6051 $as_echo "$with_openssl" >&6; }
6052
6053
6054 #
6055 # SELinux
6056 #
6057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
6058 $as_echo_n "checking whether to build with SELinux support... " >&6; }
6059
6060
6061
6062 # Check whether --with-selinux was given.
6063 if test "${with_selinux+set}" = set; then :
6064   withval=$with_selinux;
6065   case $withval in
6066     yes)
6067       :
6068       ;;
6069     no)
6070       :
6071       ;;
6072     *)
6073       as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
6074       ;;
6075   esac
6076
6077 else
6078   with_selinux=no
6079
6080 fi
6081
6082
6083
6084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
6085 $as_echo "$with_selinux" >&6; }
6086
6087 #
6088 # Systemd
6089 #
6090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
6091 $as_echo_n "checking whether to build with systemd support... " >&6; }
6092
6093
6094
6095 # Check whether --with-systemd was given.
6096 if test "${with_systemd+set}" = set; then :
6097   withval=$with_systemd;
6098   case $withval in
6099     yes)
6100
6101 $as_echo "#define USE_SYSTEMD 1" >>confdefs.h
6102
6103       ;;
6104     no)
6105       :
6106       ;;
6107     *)
6108       as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
6109       ;;
6110   esac
6111
6112 else
6113   with_systemd=no
6114
6115 fi
6116
6117
6118
6119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
6120 $as_echo "$with_systemd" >&6; }
6121
6122 #
6123 # Readline
6124 #
6125
6126
6127
6128 # Check whether --with-readline was given.
6129 if test "${with_readline+set}" = set; then :
6130   withval=$with_readline;
6131   case $withval in
6132     yes)
6133       :
6134       ;;
6135     no)
6136       :
6137       ;;
6138     *)
6139       as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
6140       ;;
6141   esac
6142
6143 else
6144   with_readline=yes
6145
6146 fi
6147
6148
6149 # readline on MinGW has problems with backslashes in psql and other bugs.
6150 # This is particularly a problem with non-US code pages.
6151 # Therefore disable its use until we understand the cause. 2004-07-20
6152 if test "$PORTNAME" = "win32"; then
6153   if test "$with_readline" = yes; then
6154     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
6155 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
6156     with_readline=no
6157   fi
6158 fi
6159
6160
6161 #
6162 # Prefer libedit
6163 #
6164
6165
6166
6167 # Check whether --with-libedit-preferred was given.
6168 if test "${with_libedit_preferred+set}" = set; then :
6169   withval=$with_libedit_preferred;
6170   case $withval in
6171     yes)
6172       :
6173       ;;
6174     no)
6175       :
6176       ;;
6177     *)
6178       as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
6179       ;;
6180   esac
6181
6182 else
6183   with_libedit_preferred=no
6184
6185 fi
6186
6187
6188
6189
6190 #
6191 # UUID library
6192 #
6193 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
6194 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
6195 # UUID library.  More than one of these might be present on a given platform,
6196 # so we make the user say which one she wants.
6197 #
6198
6199
6200
6201 # Check whether --with-uuid was given.
6202 if test "${with_uuid+set}" = set; then :
6203   withval=$with_uuid;
6204   case $withval in
6205     yes)
6206       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
6207       ;;
6208     no)
6209       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
6210       ;;
6211     *)
6212
6213       ;;
6214   esac
6215
6216 fi
6217
6218
6219 if test x"$with_uuid" = x"" ; then
6220   with_uuid=no
6221 fi
6222
6223
6224
6225 # Check whether --with-ossp-uuid was given.
6226 if test "${with_ossp_uuid+set}" = set; then :
6227   withval=$with_ossp_uuid;
6228   case $withval in
6229     yes)
6230       :
6231       ;;
6232     no)
6233       :
6234       ;;
6235     *)
6236       as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
6237       ;;
6238   esac
6239
6240 else
6241   with_ossp_uuid=no
6242
6243 fi
6244
6245
6246 if test "$with_ossp_uuid" = yes ; then
6247   with_uuid=ossp
6248 fi
6249
6250 if test "$with_uuid" = bsd ; then
6251
6252 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
6253
6254   UUID_EXTRA_OBJS="md5.o sha1.o"
6255 elif test "$with_uuid" = e2fs ; then
6256
6257 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
6258
6259   UUID_EXTRA_OBJS="md5.o sha1.o"
6260 elif test "$with_uuid" = ossp ; then
6261
6262 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
6263
6264   UUID_EXTRA_OBJS=""
6265 elif test "$with_uuid" = no ; then
6266   UUID_EXTRA_OBJS=""
6267 else
6268   as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
6269 fi
6270
6271
6272
6273
6274 #
6275 # XML
6276 #
6277
6278
6279
6280 # Check whether --with-libxml was given.
6281 if test "${with_libxml+set}" = set; then :
6282   withval=$with_libxml;
6283   case $withval in
6284     yes)
6285
6286 $as_echo "#define USE_LIBXML 1" >>confdefs.h
6287
6288       ;;
6289     no)
6290       :
6291       ;;
6292     *)
6293       as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
6294       ;;
6295   esac
6296
6297 else
6298   with_libxml=no
6299
6300 fi
6301
6302
6303
6304 if test "$with_libxml" = yes ; then
6305   if test -z "$XML2_CONFIG"; then
6306   for ac_prog in xml2-config
6307 do
6308   # Extract the first word of "$ac_prog", so it can be a program name with args.
6309 set dummy $ac_prog; ac_word=$2
6310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6311 $as_echo_n "checking for $ac_word... " >&6; }
6312 if ${ac_cv_path_XML2_CONFIG+:} false; then :
6313   $as_echo_n "(cached) " >&6
6314 else
6315   case $XML2_CONFIG in
6316   [\\/]* | ?:[\\/]*)
6317   ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path.
6318   ;;
6319   *)
6320   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6321 for as_dir in $PATH
6322 do
6323   IFS=$as_save_IFS
6324   test -z "$as_dir" && as_dir=.
6325     for ac_exec_ext in '' $ac_executable_extensions; do
6326   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6327     ac_cv_path_XML2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6328     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6329     break 2
6330   fi
6331 done
6332   done
6333 IFS=$as_save_IFS
6334
6335   ;;
6336 esac
6337 fi
6338 XML2_CONFIG=$ac_cv_path_XML2_CONFIG
6339 if test -n "$XML2_CONFIG"; then
6340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
6341 $as_echo "$XML2_CONFIG" >&6; }
6342 else
6343   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6344 $as_echo "no" >&6; }
6345 fi
6346
6347
6348   test -n "$XML2_CONFIG" && break
6349 done
6350
6351 else
6352   # Report the value of XML2_CONFIG in configure's output in all cases.
6353   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML2_CONFIG" >&5
6354 $as_echo_n "checking for XML2_CONFIG... " >&6; }
6355   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
6356 $as_echo "$XML2_CONFIG" >&6; }
6357 fi
6358
6359   if test -n "$XML2_CONFIG"; then
6360     for pgac_option in `$XML2_CONFIG --cflags`; do
6361       case $pgac_option in
6362         -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
6363       esac
6364     done
6365     for pgac_option in `$XML2_CONFIG --libs`; do
6366       case $pgac_option in
6367         -L*) LDFLAGS="$LDFLAGS $pgac_option";;
6368       esac
6369     done
6370   fi
6371 fi
6372
6373
6374
6375 #
6376 # XSLT
6377 #
6378
6379
6380
6381 # Check whether --with-libxslt was given.
6382 if test "${with_libxslt+set}" = set; then :
6383   withval=$with_libxslt;
6384   case $withval in
6385     yes)
6386
6387 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
6388
6389       ;;
6390     no)
6391       :
6392       ;;
6393     *)
6394       as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
6395       ;;
6396   esac
6397
6398 else
6399   with_libxslt=no
6400
6401 fi
6402
6403
6404
6405
6406
6407
6408 #
6409 # tzdata
6410 #
6411
6412
6413
6414 # Check whether --with-system-tzdata was given.
6415 if test "${with_system_tzdata+set}" = set; then :
6416   withval=$with_system_tzdata;
6417   case $withval in
6418     yes)
6419       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
6420       ;;
6421     no)
6422       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
6423       ;;
6424     *)
6425
6426       ;;
6427   esac
6428
6429 fi
6430
6431
6432
6433
6434 #
6435 # Zlib
6436 #
6437
6438
6439
6440 # Check whether --with-zlib was given.
6441 if test "${with_zlib+set}" = set; then :
6442   withval=$with_zlib;
6443   case $withval in
6444     yes)
6445       :
6446       ;;
6447     no)
6448       :
6449       ;;
6450     *)
6451       as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
6452       ;;
6453   esac
6454
6455 else
6456   with_zlib=yes
6457
6458 fi
6459
6460
6461
6462
6463 #
6464 # Elf
6465 #
6466
6467 # Assume system is ELF if it predefines __ELF__ as 1,
6468 # otherwise believe host_os based default.
6469 case $host_os in
6470     freebsd1*|freebsd2*) elf=no;;
6471     freebsd3*|freebsd4*) elf=yes;;
6472 esac
6473
6474
6475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6476 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6477 if ${ac_cv_path_GREP+:} false; then :
6478   $as_echo_n "(cached) " >&6
6479 else
6480   if test -z "$GREP"; then
6481   ac_path_GREP_found=false
6482   # Loop through the user's path and test for each of PROGNAME-LIST
6483   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6484 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6485 do
6486   IFS=$as_save_IFS
6487   test -z "$as_dir" && as_dir=.
6488     for ac_prog in grep ggrep; do
6489     for ac_exec_ext in '' $ac_executable_extensions; do
6490       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6491       as_fn_executable_p "$ac_path_GREP" || continue
6492 # Check for GNU ac_path_GREP and select it if it is found.
6493   # Check for GNU $ac_path_GREP
6494 case `"$ac_path_GREP" --version 2>&1` in
6495 *GNU*)
6496   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6497 *)
6498   ac_count=0
6499   $as_echo_n 0123456789 >"conftest.in"
6500   while :
6501   do
6502     cat "conftest.in" "conftest.in" >"conftest.tmp"
6503     mv "conftest.tmp" "conftest.in"
6504     cp "conftest.in" "conftest.nl"
6505     $as_echo 'GREP' >> "conftest.nl"
6506     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6507     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6508     as_fn_arith $ac_count + 1 && ac_count=$as_val
6509     if test $ac_count -gt ${ac_path_GREP_max-0}; then
6510       # Best one so far, save it but keep looking for a better one
6511       ac_cv_path_GREP="$ac_path_GREP"
6512       ac_path_GREP_max=$ac_count
6513     fi
6514     # 10*(2^10) chars as input seems more than enough
6515     test $ac_count -gt 10 && break
6516   done
6517   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6518 esac
6519
6520       $ac_path_GREP_found && break 3
6521     done
6522   done
6523   done
6524 IFS=$as_save_IFS
6525   if test -z "$ac_cv_path_GREP"; then
6526     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6527   fi
6528 else
6529   ac_cv_path_GREP=$GREP
6530 fi
6531
6532 fi
6533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6534 $as_echo "$ac_cv_path_GREP" >&6; }
6535  GREP="$ac_cv_path_GREP"
6536
6537
6538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6539 $as_echo_n "checking for egrep... " >&6; }
6540 if ${ac_cv_path_EGREP+:} false; then :
6541   $as_echo_n "(cached) " >&6
6542 else
6543   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6544    then ac_cv_path_EGREP="$GREP -E"
6545    else
6546      if test -z "$EGREP"; then
6547   ac_path_EGREP_found=false
6548   # Loop through the user's path and test for each of PROGNAME-LIST
6549   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6550 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6551 do
6552   IFS=$as_save_IFS
6553   test -z "$as_dir" && as_dir=.
6554     for ac_prog in egrep; do
6555     for ac_exec_ext in '' $ac_executable_extensions; do
6556       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6557       as_fn_executable_p "$ac_path_EGREP" || continue
6558 # Check for GNU ac_path_EGREP and select it if it is found.
6559   # Check for GNU $ac_path_EGREP
6560 case `"$ac_path_EGREP" --version 2>&1` in
6561 *GNU*)
6562   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6563 *)
6564   ac_count=0
6565   $as_echo_n 0123456789 >"conftest.in"
6566   while :
6567   do
6568     cat "conftest.in" "conftest.in" >"conftest.tmp"
6569     mv "conftest.tmp" "conftest.in"
6570     cp "conftest.in" "conftest.nl"
6571     $as_echo 'EGREP' >> "conftest.nl"
6572     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6573     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6574     as_fn_arith $ac_count + 1 && ac_count=$as_val
6575     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6576       # Best one so far, save it but keep looking for a better one
6577       ac_cv_path_EGREP="$ac_path_EGREP"
6578       ac_path_EGREP_max=$ac_count
6579     fi
6580     # 10*(2^10) chars as input seems more than enough
6581     test $ac_count -gt 10 && break
6582   done
6583   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6584 esac
6585
6586       $ac_path_EGREP_found && break 3
6587     done
6588   done
6589   done
6590 IFS=$as_save_IFS
6591   if test -z "$ac_cv_path_EGREP"; then
6592     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6593   fi
6594 else
6595   ac_cv_path_EGREP=$EGREP
6596 fi
6597
6598    fi
6599 fi
6600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6601 $as_echo "$ac_cv_path_EGREP" >&6; }
6602  EGREP="$ac_cv_path_EGREP"
6603
6604
6605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6606 /* end confdefs.h.  */
6607 #if __ELF__
6608   yes
6609 #endif
6610
6611 _ACEOF
6612 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6613   $EGREP "yes" >/dev/null 2>&1; then :
6614   ELF_SYS=true
6615 else
6616   if test "X$elf" = "Xyes" ; then
6617   ELF_SYS=true
6618 else
6619   ELF_SYS=
6620 fi
6621 fi
6622 rm -f conftest*
6623
6624
6625
6626 #
6627 # Assignments
6628 #
6629
6630 CPPFLAGS="$CPPFLAGS $INCLUDES"
6631 LDFLAGS="$LDFLAGS $LIBDIRS"
6632
6633
6634
6635
6636
6637 # Check whether --with-gnu-ld was given.
6638 if test "${with_gnu_ld+set}" = set; then :
6639   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
6640 else
6641   with_gnu_ld=no
6642 fi
6643
6644 ac_prog=ld
6645 if test "$GCC" = yes; then
6646   # Check if gcc -print-prog-name=ld gives a path.
6647   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
6648 $as_echo_n "checking for ld used by GCC... " >&6; }
6649   case $host in
6650   *-*-mingw*)
6651     # gcc leaves a trailing carriage return which upsets mingw
6652     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6653   *)
6654     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6655   esac
6656   case "$ac_prog" in
6657     # Accept absolute paths.
6658     [\\/]* | [A-Za-z]:[\\/]*)
6659       re_direlt='/[^/][^/]*/\.\./'
6660       # Canonicalize the path of ld
6661       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
6662       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
6663         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
6664       done
6665       test -z "$LD" && LD="$ac_prog"
6666       ;;
6667   "")
6668     # If it fails, then pretend we aren't using GCC.
6669     ac_prog=ld
6670     ;;
6671   *)
6672     # If it is relative, then search for the first ld in PATH.
6673     with_gnu_ld=unknown
6674     ;;
6675   esac
6676 elif test "$with_gnu_ld" = yes; then
6677   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
6678 $as_echo_n "checking for GNU ld... " >&6; }
6679 else
6680   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
6681 $as_echo_n "checking for non-GNU ld... " >&6; }
6682 fi
6683 if ${ac_cv_path_LD+:} false; then :
6684   $as_echo_n "(cached) " >&6
6685 else
6686   if test -z "$LD"; then
6687   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
6688   for ac_dir in $PATH; do
6689     test -z "$ac_dir" && ac_dir=.
6690     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6691       ac_cv_path_LD="$ac_dir/$ac_prog"
6692       # Check to see if the program is GNU ld.  I'd rather use --version,
6693       # but apparently some GNU ld's only accept -v.
6694       # Break only if it was the GNU/non-GNU ld that we prefer.
6695       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
6696         test "$with_gnu_ld" != no && break
6697       else
6698         test "$with_gnu_ld" != yes && break
6699       fi
6700     fi
6701   done
6702   IFS="$ac_save_ifs"
6703 else
6704   ac_cv_path_LD="$LD" # Let the user override the test with a path.
6705 fi
6706 fi
6707
6708 LD="$ac_cv_path_LD"
6709 if test -n "$LD"; then
6710   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
6711 $as_echo "$LD" >&6; }
6712 else
6713   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6714 $as_echo "no" >&6; }
6715 fi
6716 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
6717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
6718 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
6719 if ${ac_cv_prog_gnu_ld+:} false; then :
6720   $as_echo_n "(cached) " >&6
6721 else
6722   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
6723 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
6724   ac_cv_prog_gnu_ld=yes
6725 else
6726   ac_cv_prog_gnu_ld=no
6727 fi
6728 fi
6729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
6730 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
6731 with_gnu_ld=$ac_cv_prog_gnu_ld
6732
6733
6734
6735
6736 if test -n "$ac_tool_prefix"; then
6737   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6738 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6740 $as_echo_n "checking for $ac_word... " >&6; }
6741 if ${ac_cv_prog_RANLIB+:} false; then :
6742   $as_echo_n "(cached) " >&6
6743 else
6744   if test -n "$RANLIB"; then
6745   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6746 else
6747 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6748 for as_dir in $PATH
6749 do
6750   IFS=$as_save_IFS
6751   test -z "$as_dir" && as_dir=.
6752     for ac_exec_ext in '' $ac_executable_extensions; do
6753   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6754     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6755     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6756     break 2
6757   fi
6758 done
6759   done
6760 IFS=$as_save_IFS
6761
6762 fi
6763 fi
6764 RANLIB=$ac_cv_prog_RANLIB
6765 if test -n "$RANLIB"; then
6766   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6767 $as_echo "$RANLIB" >&6; }
6768 else
6769   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6770 $as_echo "no" >&6; }
6771 fi
6772
6773
6774 fi
6775 if test -z "$ac_cv_prog_RANLIB"; then
6776   ac_ct_RANLIB=$RANLIB
6777   # Extract the first word of "ranlib", so it can be a program name with args.
6778 set dummy ranlib; ac_word=$2
6779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6780 $as_echo_n "checking for $ac_word... " >&6; }
6781 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6782   $as_echo_n "(cached) " >&6
6783 else
6784   if test -n "$ac_ct_RANLIB"; then
6785   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6786 else
6787 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6788 for as_dir in $PATH
6789 do
6790   IFS=$as_save_IFS
6791   test -z "$as_dir" && as_dir=.
6792     for ac_exec_ext in '' $ac_executable_extensions; do
6793   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6794     ac_cv_prog_ac_ct_RANLIB="ranlib"
6795     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6796     break 2
6797   fi
6798 done
6799   done
6800 IFS=$as_save_IFS
6801
6802 fi
6803 fi
6804 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6805 if test -n "$ac_ct_RANLIB"; then
6806   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6807 $as_echo "$ac_ct_RANLIB" >&6; }
6808 else
6809   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6810 $as_echo "no" >&6; }
6811 fi
6812
6813   if test "x$ac_ct_RANLIB" = x; then
6814     RANLIB=":"
6815   else
6816     case $cross_compiling:$ac_tool_warned in
6817 yes:)
6818 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6819 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6820 ac_tool_warned=yes ;;
6821 esac
6822     RANLIB=$ac_ct_RANLIB
6823   fi
6824 else
6825   RANLIB="$ac_cv_prog_RANLIB"
6826 fi
6827
6828
6829   if test -n "$ac_tool_prefix"; then
6830   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6831 set dummy ${ac_tool_prefix}strip; ac_word=$2
6832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6833 $as_echo_n "checking for $ac_word... " >&6; }
6834 if ${ac_cv_prog_STRIP+:} false; then :
6835   $as_echo_n "(cached) " >&6
6836 else
6837   if test -n "$STRIP"; then
6838   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6839 else
6840 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6841 for as_dir in $PATH
6842 do
6843   IFS=$as_save_IFS
6844   test -z "$as_dir" && as_dir=.
6845     for ac_exec_ext in '' $ac_executable_extensions; do
6846   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6847     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6848     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6849     break 2
6850   fi
6851 done
6852   done
6853 IFS=$as_save_IFS
6854
6855 fi
6856 fi
6857 STRIP=$ac_cv_prog_STRIP
6858 if test -n "$STRIP"; then
6859   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6860 $as_echo "$STRIP" >&6; }
6861 else
6862   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6863 $as_echo "no" >&6; }
6864 fi
6865
6866
6867 fi
6868 if test -z "$ac_cv_prog_STRIP"; then
6869   ac_ct_STRIP=$STRIP
6870   # Extract the first word of "strip", so it can be a program name with args.
6871 set dummy strip; ac_word=$2
6872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6873 $as_echo_n "checking for $ac_word... " >&6; }
6874 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
6875   $as_echo_n "(cached) " >&6
6876 else
6877   if test -n "$ac_ct_STRIP"; then
6878   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6879 else
6880 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6881 for as_dir in $PATH
6882 do
6883   IFS=$as_save_IFS
6884   test -z "$as_dir" && as_dir=.
6885     for ac_exec_ext in '' $ac_executable_extensions; do
6886   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6887     ac_cv_prog_ac_ct_STRIP="strip"
6888     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6889     break 2
6890   fi
6891 done
6892   done
6893 IFS=$as_save_IFS
6894
6895 fi
6896 fi
6897 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6898 if test -n "$ac_ct_STRIP"; then
6899   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6900 $as_echo "$ac_ct_STRIP" >&6; }
6901 else
6902   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6903 $as_echo "no" >&6; }
6904 fi
6905
6906   if test "x$ac_ct_STRIP" = x; then
6907     STRIP=":"
6908   else
6909     case $cross_compiling:$ac_tool_warned in
6910 yes:)
6911 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6912 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6913 ac_tool_warned=yes ;;
6914 esac
6915     STRIP=$ac_ct_STRIP
6916   fi
6917 else
6918   STRIP="$ac_cv_prog_STRIP"
6919 fi
6920
6921
6922   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
6923 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
6924   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
6925     STRIP_STATIC_LIB="$STRIP -x"
6926     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
6927     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6928 $as_echo "yes" >&6; }
6929   else
6930     case $host_os in
6931       darwin*)
6932         STRIP="$STRIP -x"
6933         STRIP_STATIC_LIB=$STRIP
6934         STRIP_SHARED_LIB=$STRIP
6935         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6936 $as_echo "yes" >&6; }
6937         ;;
6938       *)
6939         STRIP_STATIC_LIB=:
6940         STRIP_SHARED_LIB=:
6941         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6942 $as_echo "no" >&6; }
6943         ;;
6944     esac
6945   fi
6946
6947
6948
6949 if test -n "$ac_tool_prefix"; then
6950   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6951 set dummy ${ac_tool_prefix}ar; ac_word=$2
6952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6953 $as_echo_n "checking for $ac_word... " >&6; }
6954 if ${ac_cv_prog_AR+:} false; then :
6955   $as_echo_n "(cached) " >&6
6956 else
6957   if test -n "$AR"; then
6958   ac_cv_prog_AR="$AR" # Let the user override the test.
6959 else
6960 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6961 for as_dir in $PATH
6962 do
6963   IFS=$as_save_IFS
6964   test -z "$as_dir" && as_dir=.
6965     for ac_exec_ext in '' $ac_executable_extensions; do
6966   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6967     ac_cv_prog_AR="${ac_tool_prefix}ar"
6968     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6969     break 2
6970   fi
6971 done
6972   done
6973 IFS=$as_save_IFS
6974
6975 fi
6976 fi
6977 AR=$ac_cv_prog_AR
6978 if test -n "$AR"; then
6979   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6980 $as_echo "$AR" >&6; }
6981 else
6982   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6983 $as_echo "no" >&6; }
6984 fi
6985
6986
6987 fi
6988 if test -z "$ac_cv_prog_AR"; then
6989   ac_ct_AR=$AR
6990   # Extract the first word of "ar", so it can be a program name with args.
6991 set dummy ar; ac_word=$2
6992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6993 $as_echo_n "checking for $ac_word... " >&6; }
6994 if ${ac_cv_prog_ac_ct_AR+:} false; then :
6995   $as_echo_n "(cached) " >&6
6996 else
6997   if test -n "$ac_ct_AR"; then
6998   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6999 else
7000 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7001 for as_dir in $PATH
7002 do
7003   IFS=$as_save_IFS
7004   test -z "$as_dir" && as_dir=.
7005     for ac_exec_ext in '' $ac_executable_extensions; do
7006   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7007     ac_cv_prog_ac_ct_AR="ar"
7008     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7009     break 2
7010   fi
7011 done
7012   done
7013 IFS=$as_save_IFS
7014
7015 fi
7016 fi
7017 ac_ct_AR=$ac_cv_prog_ac_ct_AR
7018 if test -n "$ac_ct_AR"; then
7019   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7020 $as_echo "$ac_ct_AR" >&6; }
7021 else
7022   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7023 $as_echo "no" >&6; }
7024 fi
7025
7026   if test "x$ac_ct_AR" = x; then
7027     AR="ar"
7028   else
7029     case $cross_compiling:$ac_tool_warned in
7030 yes:)
7031 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7032 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7033 ac_tool_warned=yes ;;
7034 esac
7035     AR=$ac_ct_AR
7036   fi
7037 else
7038   AR="$ac_cv_prog_AR"
7039 fi
7040
7041 if test "$PORTNAME" = "win32"; then
7042   if test -n "$ac_tool_prefix"; then
7043   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7044 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
7045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7046 $as_echo_n "checking for $ac_word... " >&6; }
7047 if ${ac_cv_prog_DLLTOOL+:} false; then :
7048   $as_echo_n "(cached) " >&6
7049 else
7050   if test -n "$DLLTOOL"; then
7051   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7052 else
7053 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7054 for as_dir in $PATH
7055 do
7056   IFS=$as_save_IFS
7057   test -z "$as_dir" && as_dir=.
7058     for ac_exec_ext in '' $ac_executable_extensions; do
7059   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7060     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
7061     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7062     break 2
7063   fi
7064 done
7065   done
7066 IFS=$as_save_IFS
7067
7068 fi
7069 fi
7070 DLLTOOL=$ac_cv_prog_DLLTOOL
7071 if test -n "$DLLTOOL"; then
7072   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7073 $as_echo "$DLLTOOL" >&6; }
7074 else
7075   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7076 $as_echo "no" >&6; }
7077 fi
7078
7079
7080 fi
7081 if test -z "$ac_cv_prog_DLLTOOL"; then
7082   ac_ct_DLLTOOL=$DLLTOOL
7083   # Extract the first word of "dlltool", so it can be a program name with args.
7084 set dummy dlltool; ac_word=$2
7085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7086 $as_echo_n "checking for $ac_word... " >&6; }
7087 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
7088   $as_echo_n "(cached) " >&6
7089 else
7090   if test -n "$ac_ct_DLLTOOL"; then
7091   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7092 else
7093 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7094 for as_dir in $PATH
7095 do
7096   IFS=$as_save_IFS
7097   test -z "$as_dir" && as_dir=.
7098     for ac_exec_ext in '' $ac_executable_extensions; do
7099   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7100     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
7101     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7102     break 2
7103   fi
7104 done
7105   done
7106 IFS=$as_save_IFS
7107
7108 fi
7109 fi
7110 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7111 if test -n "$ac_ct_DLLTOOL"; then
7112   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7113 $as_echo "$ac_ct_DLLTOOL" >&6; }
7114 else
7115   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7116 $as_echo "no" >&6; }
7117 fi
7118
7119   if test "x$ac_ct_DLLTOOL" = x; then
7120     DLLTOOL="dlltool"
7121   else
7122     case $cross_compiling:$ac_tool_warned in
7123 yes:)
7124 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7125 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7126 ac_tool_warned=yes ;;
7127 esac
7128     DLLTOOL=$ac_ct_DLLTOOL
7129   fi
7130 else
7131   DLLTOOL="$ac_cv_prog_DLLTOOL"
7132 fi
7133
7134   if test -n "$ac_tool_prefix"; then
7135   # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
7136 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
7137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7138 $as_echo_n "checking for $ac_word... " >&6; }
7139 if ${ac_cv_prog_DLLWRAP+:} false; then :
7140   $as_echo_n "(cached) " >&6
7141 else
7142   if test -n "$DLLWRAP"; then
7143   ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
7144 else
7145 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7146 for as_dir in $PATH
7147 do
7148   IFS=$as_save_IFS
7149   test -z "$as_dir" && as_dir=.
7150     for ac_exec_ext in '' $ac_executable_extensions; do
7151   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7152     ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
7153     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7154     break 2
7155   fi
7156 done
7157   done
7158 IFS=$as_save_IFS
7159
7160 fi
7161 fi
7162 DLLWRAP=$ac_cv_prog_DLLWRAP
7163 if test -n "$DLLWRAP"; then
7164   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5
7165 $as_echo "$DLLWRAP" >&6; }
7166 else
7167   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7168 $as_echo "no" >&6; }
7169 fi
7170
7171
7172 fi
7173 if test -z "$ac_cv_prog_DLLWRAP"; then
7174   ac_ct_DLLWRAP=$DLLWRAP
7175   # Extract the first word of "dllwrap", so it can be a program name with args.
7176 set dummy dllwrap; ac_word=$2
7177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7178 $as_echo_n "checking for $ac_word... " >&6; }
7179 if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then :
7180   $as_echo_n "(cached) " >&6
7181 else
7182   if test -n "$ac_ct_DLLWRAP"; then
7183   ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
7184 else
7185 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7186 for as_dir in $PATH
7187 do
7188   IFS=$as_save_IFS
7189   test -z "$as_dir" && as_dir=.
7190     for ac_exec_ext in '' $ac_executable_extensions; do
7191   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7192     ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
7193     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7194     break 2
7195   fi
7196 done
7197   done
7198 IFS=$as_save_IFS
7199
7200 fi
7201 fi
7202 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
7203 if test -n "$ac_ct_DLLWRAP"; then
7204   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5
7205 $as_echo "$ac_ct_DLLWRAP" >&6; }
7206 else
7207   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7208 $as_echo "no" >&6; }
7209 fi
7210
7211   if test "x$ac_ct_DLLWRAP" = x; then
7212     DLLWRAP="dllwrap"
7213   else
7214     case $cross_compiling:$ac_tool_warned in
7215 yes:)
7216 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7217 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7218 ac_tool_warned=yes ;;
7219 esac
7220     DLLWRAP=$ac_ct_DLLWRAP
7221   fi
7222 else
7223   DLLWRAP="$ac_cv_prog_DLLWRAP"
7224 fi
7225
7226   if test -n "$ac_tool_prefix"; then
7227   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7228 set dummy ${ac_tool_prefix}windres; ac_word=$2
7229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7230 $as_echo_n "checking for $ac_word... " >&6; }
7231 if ${ac_cv_prog_WINDRES+:} false; then :
7232   $as_echo_n "(cached) " >&6
7233 else
7234   if test -n "$WINDRES"; then
7235   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7236 else
7237 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7238 for as_dir in $PATH
7239 do
7240   IFS=$as_save_IFS
7241   test -z "$as_dir" && as_dir=.
7242     for ac_exec_ext in '' $ac_executable_extensions; do
7243   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7244     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
7245     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7246     break 2
7247   fi
7248 done
7249   done
7250 IFS=$as_save_IFS
7251
7252 fi
7253 fi
7254 WINDRES=$ac_cv_prog_WINDRES
7255 if test -n "$WINDRES"; then
7256   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7257 $as_echo "$WINDRES" >&6; }
7258 else
7259   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7260 $as_echo "no" >&6; }
7261 fi
7262
7263
7264 fi
7265 if test -z "$ac_cv_prog_WINDRES"; then
7266   ac_ct_WINDRES=$WINDRES
7267   # Extract the first word of "windres", so it can be a program name with args.
7268 set dummy windres; ac_word=$2
7269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7270 $as_echo_n "checking for $ac_word... " >&6; }
7271 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
7272   $as_echo_n "(cached) " >&6
7273 else
7274   if test -n "$ac_ct_WINDRES"; then
7275   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7276 else
7277 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7278 for as_dir in $PATH
7279 do
7280   IFS=$as_save_IFS
7281   test -z "$as_dir" && as_dir=.
7282     for ac_exec_ext in '' $ac_executable_extensions; do
7283   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7284     ac_cv_prog_ac_ct_WINDRES="windres"
7285     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7286     break 2
7287   fi
7288 done
7289   done
7290 IFS=$as_save_IFS
7291
7292 fi
7293 fi
7294 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7295 if test -n "$ac_ct_WINDRES"; then
7296   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7297 $as_echo "$ac_ct_WINDRES" >&6; }
7298 else
7299   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7300 $as_echo "no" >&6; }
7301 fi
7302
7303   if test "x$ac_ct_WINDRES" = x; then
7304     WINDRES="windres"
7305   else
7306     case $cross_compiling:$ac_tool_warned in
7307 yes:)
7308 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7309 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7310 ac_tool_warned=yes ;;
7311 esac
7312     WINDRES=$ac_ct_WINDRES
7313   fi
7314 else
7315   WINDRES="$ac_cv_prog_WINDRES"
7316 fi
7317
7318 fi
7319
7320 # Find a good install program.  We prefer a C program (faster),
7321 # so one script is as good as another.  But avoid the broken or
7322 # incompatible versions:
7323 # SysV /etc/install, /usr/sbin/install
7324 # SunOS /usr/etc/install
7325 # IRIX /sbin/install
7326 # AIX /bin/install
7327 # AmigaOS /C/install, which installs bootblocks on floppy discs
7328 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7329 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
7330 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7331 # OS/2's system install, which has a completely different semantic
7332 # ./install, which can be erroneously created by make from ./install.sh.
7333 # Reject install programs that cannot install multiple files.
7334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7335 $as_echo_n "checking for a BSD-compatible install... " >&6; }
7336 if test -z "$INSTALL"; then
7337 if ${ac_cv_path_install+:} false; then :
7338   $as_echo_n "(cached) " >&6
7339 else
7340   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7341 for as_dir in $PATH
7342 do
7343   IFS=$as_save_IFS
7344   test -z "$as_dir" && as_dir=.
7345     # Account for people who put trailing slashes in PATH elements.
7346 case $as_dir/ in #((
7347   ./ | .// | /[cC]/* | \
7348   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7349   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7350   /usr/ucb/* ) ;;
7351   *)
7352     # OSF1 and SCO ODT 3.0 have their own names for install.
7353     # Don't use installbsd from OSF since it installs stuff as root
7354     # by default.
7355     for ac_prog in ginstall scoinst install; do
7356       for ac_exec_ext in '' $ac_executable_extensions; do
7357         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
7358           if test $ac_prog = install &&
7359             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7360             # AIX install.  It has an incompatible calling convention.
7361             :
7362           elif test $ac_prog = install &&
7363             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7364             # program-specific install script used by HP pwplus--don't use.
7365             :
7366           else
7367             rm -rf conftest.one conftest.two conftest.dir
7368             echo one > conftest.one
7369             echo two > conftest.two
7370             mkdir conftest.dir
7371             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7372               test -s conftest.one && test -s conftest.two &&
7373               test -s conftest.dir/conftest.one &&
7374               test -s conftest.dir/conftest.two
7375             then
7376               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7377               break 3
7378             fi
7379           fi
7380         fi
7381       done
7382     done
7383     ;;
7384 esac
7385
7386   done
7387 IFS=$as_save_IFS
7388
7389 rm -rf conftest.one conftest.two conftest.dir
7390
7391 fi
7392   if test "${ac_cv_path_install+set}" = set; then
7393     INSTALL=$ac_cv_path_install
7394   else
7395     # As a last resort, use the slow shell script.  Don't cache a
7396     # value for INSTALL within a source directory, because that will
7397     # break other packages using the cache if that directory is
7398     # removed, or if the value is a relative name.
7399     INSTALL=$ac_install_sh
7400   fi
7401 fi
7402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7403 $as_echo "$INSTALL" >&6; }
7404
7405 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7406 # It thinks the first close brace ends the variable substitution.
7407 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7408
7409 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7410
7411 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7412
7413 # When Autoconf chooses install-sh as install program it tries to generate
7414 # a relative path to it in each makefile where it substitutes it. This clashes
7415 # with our Makefile.global concept. This workaround helps.
7416 case $INSTALL in
7417   *install-sh*) install_bin='';;
7418   *) install_bin=$INSTALL;;
7419 esac
7420
7421
7422 if test -z "$TAR"; then
7423   for ac_prog in tar
7424 do
7425   # Extract the first word of "$ac_prog", so it can be a program name with args.
7426 set dummy $ac_prog; ac_word=$2
7427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7428 $as_echo_n "checking for $ac_word... " >&6; }
7429 if ${ac_cv_path_TAR+:} false; then :
7430   $as_echo_n "(cached) " >&6
7431 else
7432   case $TAR in
7433   [\\/]* | ?:[\\/]*)
7434   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
7435   ;;
7436   *)
7437   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7438 for as_dir in $PATH
7439 do
7440   IFS=$as_save_IFS
7441   test -z "$as_dir" && as_dir=.
7442     for ac_exec_ext in '' $ac_executable_extensions; do
7443   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7444     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
7445     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7446     break 2
7447   fi
7448 done
7449   done
7450 IFS=$as_save_IFS
7451
7452   ;;
7453 esac
7454 fi
7455 TAR=$ac_cv_path_TAR
7456 if test -n "$TAR"; then
7457   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
7458 $as_echo "$TAR" >&6; }
7459 else
7460   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7461 $as_echo "no" >&6; }
7462 fi
7463
7464
7465   test -n "$TAR" && break
7466 done
7467
7468 else
7469   # Report the value of TAR in configure's output in all cases.
7470   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
7471 $as_echo_n "checking for TAR... " >&6; }
7472   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
7473 $as_echo "$TAR" >&6; }
7474 fi
7475
7476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7477 $as_echo_n "checking whether ln -s works... " >&6; }
7478 LN_S=$as_ln_s
7479 if test "$LN_S" = "ln -s"; then
7480   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7481 $as_echo "yes" >&6; }
7482 else
7483   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7484 $as_echo "no, using $LN_S" >&6; }
7485 fi
7486
7487 for ac_prog in gawk mawk nawk awk
7488 do
7489   # Extract the first word of "$ac_prog", so it can be a program name with args.
7490 set dummy $ac_prog; ac_word=$2
7491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7492 $as_echo_n "checking for $ac_word... " >&6; }
7493 if ${ac_cv_prog_AWK+:} false; then :
7494   $as_echo_n "(cached) " >&6
7495 else
7496   if test -n "$AWK"; then
7497   ac_cv_prog_AWK="$AWK" # Let the user override the test.
7498 else
7499 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7500 for as_dir in $PATH
7501 do
7502   IFS=$as_save_IFS
7503   test -z "$as_dir" && as_dir=.
7504     for ac_exec_ext in '' $ac_executable_extensions; do
7505   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7506     ac_cv_prog_AWK="$ac_prog"
7507     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7508     break 2
7509   fi
7510 done
7511   done
7512 IFS=$as_save_IFS
7513
7514 fi
7515 fi
7516 AWK=$ac_cv_prog_AWK
7517 if test -n "$AWK"; then
7518   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7519 $as_echo "$AWK" >&6; }
7520 else
7521   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7522 $as_echo "no" >&6; }
7523 fi
7524
7525
7526   test -n "$AWK" && break
7527 done
7528
7529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
7530 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
7531 if test -z "$MKDIR_P"; then
7532   if ${ac_cv_path_mkdir+:} false; then :
7533   $as_echo_n "(cached) " >&6
7534 else
7535   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7536 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
7537 do
7538   IFS=$as_save_IFS
7539   test -z "$as_dir" && as_dir=.
7540     for ac_prog in mkdir gmkdir; do
7541          for ac_exec_ext in '' $ac_executable_extensions; do
7542            as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
7543            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
7544              'mkdir (GNU coreutils) '* | \
7545              'mkdir (coreutils) '* | \
7546              'mkdir (fileutils) '4.1*)
7547                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
7548                break 3;;
7549            esac
7550          done
7551        done
7552   done
7553 IFS=$as_save_IFS
7554
7555 fi
7556
7557   test -d ./--version && rmdir ./--version
7558   if test "${ac_cv_path_mkdir+set}" = set; then
7559     MKDIR_P="$ac_cv_path_mkdir -p"
7560   else
7561     # As a last resort, use the slow shell script.  Don't cache a
7562     # value for MKDIR_P within a source directory, because that will
7563     # break other packages using the cache if that directory is
7564     # removed, or if the value is a relative name.
7565     MKDIR_P="$ac_install_sh -d"
7566   fi
7567 fi
7568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
7569 $as_echo "$MKDIR_P" >&6; }
7570
7571 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
7572 # a relative path to it in each makefile where it substitutes it. This clashes
7573 # with our Makefile.global concept. This workaround helps.
7574 case $MKDIR_P in
7575   *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
7576 esac
7577
7578 if test -z "$BISON"; then
7579   for ac_prog in bison
7580 do
7581   # Extract the first word of "$ac_prog", so it can be a program name with args.
7582 set dummy $ac_prog; ac_word=$2
7583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7584 $as_echo_n "checking for $ac_word... " >&6; }
7585 if ${ac_cv_path_BISON+:} false; then :
7586   $as_echo_n "(cached) " >&6
7587 else
7588   case $BISON in
7589   [\\/]* | ?:[\\/]*)
7590   ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
7591   ;;
7592   *)
7593   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7594 for as_dir in $PATH
7595 do
7596   IFS=$as_save_IFS
7597   test -z "$as_dir" && as_dir=.
7598     for ac_exec_ext in '' $ac_executable_extensions; do
7599   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7600     ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
7601     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7602     break 2
7603   fi
7604 done
7605   done
7606 IFS=$as_save_IFS
7607
7608   ;;
7609 esac
7610 fi
7611 BISON=$ac_cv_path_BISON
7612 if test -n "$BISON"; then
7613   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
7614 $as_echo "$BISON" >&6; }
7615 else
7616   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7617 $as_echo "no" >&6; }
7618 fi
7619
7620
7621   test -n "$BISON" && break
7622 done
7623
7624 else
7625   # Report the value of BISON in configure's output in all cases.
7626   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BISON" >&5
7627 $as_echo_n "checking for BISON... " >&6; }
7628   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
7629 $as_echo "$BISON" >&6; }
7630 fi
7631
7632
7633 if test "$BISON"; then
7634   pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
7635   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
7636 $as_echo "$as_me: using $pgac_bison_version" >&6;}
7637   if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
7638   then
7639     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7640 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
7641 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
7642 $as_echo "$as_me: WARNING:
7643 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
7644 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
7645     BISON=""
7646   fi
7647   # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
7648   # of the now preferred %name-prefix "base_yy", but the latter
7649   # doesn't work with Bison 2.3 or less.  So for now we silence the
7650   # deprecation warnings.
7651   if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
7652   then
7653     BISONFLAGS="$BISONFLAGS -Wno-deprecated"
7654   fi
7655 fi
7656
7657 if test -z "$BISON"; then
7658   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7659 *** Without Bison you will not be able to build PostgreSQL from Git nor
7660 *** change any of the parser definition files.  You can obtain Bison from
7661 *** a GNU mirror site.  (If you are using the official distribution of
7662 *** PostgreSQL then you do not need to worry about this, because the Bison
7663 *** output is pre-generated.)" >&5
7664 $as_echo "$as_me: WARNING:
7665 *** Without Bison you will not be able to build PostgreSQL from Git nor
7666 *** change any of the parser definition files.  You can obtain Bison from
7667 *** a GNU mirror site.  (If you are using the official distribution of
7668 *** PostgreSQL then you do not need to worry about this, because the Bison
7669 *** output is pre-generated.)" >&2;}
7670 fi
7671 # We don't need AC_SUBST(BISON) because PGAC_PATH_PROGS did it
7672
7673
7674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
7675 $as_echo_n "checking for flex... " >&6; }
7676 if ${pgac_cv_path_flex+:} false; then :
7677   $as_echo_n "(cached) " >&6
7678 else
7679   # Let the user override the test
7680 if test -n "$FLEX"; then
7681   pgac_cv_path_flex=$FLEX
7682 else
7683   pgac_save_IFS=$IFS
7684   IFS=$PATH_SEPARATOR
7685   for pgac_dir in $PATH; do
7686     IFS=$pgac_save_IFS
7687     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
7688       pgac_dir=`pwd`
7689     fi
7690     for pgac_prog in flex lex; do
7691       pgac_candidate="$pgac_dir/$pgac_prog"
7692       if test -f "$pgac_candidate" \
7693         && $pgac_candidate --version </dev/null >/dev/null 2>&1
7694       then
7695         echo '%%'  > conftest.l
7696         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
7697           pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
7698           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;}'
7699           then
7700             pgac_cv_path_flex=$pgac_candidate
7701             break 2
7702           else
7703             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7704 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
7705 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
7706 $as_echo "$as_me: WARNING:
7707 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
7708 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
7709           fi
7710         fi
7711       fi
7712     done
7713   done
7714   rm -f conftest.l lex.yy.c
7715   : ${pgac_cv_path_flex=no}
7716 fi
7717
7718 fi
7719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
7720 $as_echo "$pgac_cv_path_flex" >&6; }
7721 if test x"$pgac_cv_path_flex" = x"no"; then
7722   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7723 *** Without Flex you will not be able to build PostgreSQL from Git nor
7724 *** change any of the scanner definition files.  You can obtain Flex from
7725 *** a GNU mirror site.  (If you are using the official distribution of
7726 *** PostgreSQL then you do not need to worry about this because the Flex
7727 *** output is pre-generated.)" >&5
7728 $as_echo "$as_me: WARNING:
7729 *** Without Flex you will not be able to build PostgreSQL from Git nor
7730 *** change any of the scanner definition files.  You can obtain Flex from
7731 *** a GNU mirror site.  (If you are using the official distribution of
7732 *** PostgreSQL then you do not need to worry about this because the Flex
7733 *** output is pre-generated.)" >&2;}
7734
7735   FLEX=
7736 else
7737   FLEX=$pgac_cv_path_flex
7738   pgac_flex_version=`$FLEX --version 2>/dev/null`
7739   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
7740 $as_echo "$as_me: using $pgac_flex_version" >&6;}
7741 fi
7742
7743
7744
7745
7746
7747 if test -z "$PERL"; then
7748   for ac_prog in perl
7749 do
7750   # Extract the first word of "$ac_prog", so it can be a program name with args.
7751 set dummy $ac_prog; ac_word=$2
7752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7753 $as_echo_n "checking for $ac_word... " >&6; }
7754 if ${ac_cv_path_PERL+:} false; then :
7755   $as_echo_n "(cached) " >&6
7756 else
7757   case $PERL in
7758   [\\/]* | ?:[\\/]*)
7759   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
7760   ;;
7761   *)
7762   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7763 for as_dir in $PATH
7764 do
7765   IFS=$as_save_IFS
7766   test -z "$as_dir" && as_dir=.
7767     for ac_exec_ext in '' $ac_executable_extensions; do
7768   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7769     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
7770     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7771     break 2
7772   fi
7773 done
7774   done
7775 IFS=$as_save_IFS
7776
7777   ;;
7778 esac
7779 fi
7780 PERL=$ac_cv_path_PERL
7781 if test -n "$PERL"; then
7782   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
7783 $as_echo "$PERL" >&6; }
7784 else
7785   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7786 $as_echo "no" >&6; }
7787 fi
7788
7789
7790   test -n "$PERL" && break
7791 done
7792
7793 else
7794   # Report the value of PERL in configure's output in all cases.
7795   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PERL" >&5
7796 $as_echo_n "checking for PERL... " >&6; }
7797   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
7798 $as_echo "$PERL" >&6; }
7799 fi
7800
7801
7802 if test "$PERL"; then
7803   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'`
7804   { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
7805 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
7806   if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
7807     $AWK '{ if ($1 == 5 && $2 >= 8) exit 1; else exit 0;}'
7808   then
7809     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7810 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7811 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
7812 $as_echo "$as_me: WARNING:
7813 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7814 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
7815     PERL=""
7816   fi
7817 fi
7818
7819 if test -z "$PERL"; then
7820   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7821 *** Without Perl you will not be able to build PostgreSQL from Git.
7822 *** You can obtain Perl from any CPAN mirror site.
7823 *** (If you are using the official distribution of PostgreSQL then you do not
7824 *** need to worry about this, because the Perl output is pre-generated.)" >&5
7825 $as_echo "$as_me: WARNING:
7826 *** Without Perl you will not be able to build PostgreSQL from Git.
7827 *** You can obtain Perl from any CPAN mirror site.
7828 *** (If you are using the official distribution of PostgreSQL then you do not
7829 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
7830 fi
7831
7832 if test "$with_perl" = yes; then
7833   if test -z "$PERL"; then
7834     as_fn_error $? "Perl not found" "$LINENO" 5
7835   fi
7836
7837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
7838 $as_echo_n "checking for Perl archlibexp... " >&6; }
7839 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
7840 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
7841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
7842 $as_echo "$perl_archlibexp" >&6; }
7843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
7844 $as_echo_n "checking for Perl privlibexp... " >&6; }
7845 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
7846 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
7847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
7848 $as_echo "$perl_privlibexp" >&6; }
7849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
7850 $as_echo_n "checking for Perl useshrplib... " >&6; }
7851 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
7852 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
7853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
7854 $as_echo "$perl_useshrplib" >&6; }
7855   if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
7856     as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
7857 You might have to rebuild your Perl installation.  Refer to the
7858 documentation for details.  Use --without-perl to disable building
7859 PL/Perl." "$LINENO" 5
7860   fi
7861
7862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS recommended by Perl" >&5
7863 $as_echo_n "checking for CFLAGS recommended by Perl... " >&6; }
7864 perl_ccflags=`$PERL -MConfig -e 'print $Config{ccflags}'`
7865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_ccflags" >&5
7866 $as_echo "$perl_ccflags" >&6; }
7867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS to compile embedded Perl" >&5
7868 $as_echo_n "checking for CFLAGS to compile embedded Perl... " >&6; }
7869 perl_embed_ccflags=`$PERL -MConfig -e 'foreach $f (split(" ",$Config{ccflags})) {print $f, " " if ($f =~ /^-D[^_]/ || $f =~ /^-D_USE_32BIT_TIME_T/)}'`
7870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ccflags" >&5
7871 $as_echo "$perl_embed_ccflags" >&6; }
7872
7873
7874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
7875 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
7876 if test "$PORTNAME" = "win32" ; then
7877 perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
7878 test -e "$perl_archlibexp/CORE/$perl_lib.lib" && perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
7879 else
7880 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
7881 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
7882 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
7883 fi
7884 if test -z "$perl_embed_ldflags" ; then
7885         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7886 $as_echo "no" >&6; }
7887         as_fn_error $? "could not determine flags for linking embedded Perl.
7888 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
7889 installed." "$LINENO" 5
7890 else
7891         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
7892 $as_echo "$perl_embed_ldflags" >&6; }
7893 fi
7894
7895 fi
7896
7897 if test "$with_python" = yes; then
7898   if test -z "$PYTHON"; then
7899   for ac_prog in python
7900 do
7901   # Extract the first word of "$ac_prog", so it can be a program name with args.
7902 set dummy $ac_prog; ac_word=$2
7903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7904 $as_echo_n "checking for $ac_word... " >&6; }
7905 if ${ac_cv_path_PYTHON+:} false; then :
7906   $as_echo_n "(cached) " >&6
7907 else
7908   case $PYTHON in
7909   [\\/]* | ?:[\\/]*)
7910   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
7911   ;;
7912   *)
7913   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7914 for as_dir in $PATH
7915 do
7916   IFS=$as_save_IFS
7917   test -z "$as_dir" && as_dir=.
7918     for ac_exec_ext in '' $ac_executable_extensions; do
7919   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7920     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
7921     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7922     break 2
7923   fi
7924 done
7925   done
7926 IFS=$as_save_IFS
7927
7928   ;;
7929 esac
7930 fi
7931 PYTHON=$ac_cv_path_PYTHON
7932 if test -n "$PYTHON"; then
7933   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
7934 $as_echo "$PYTHON" >&6; }
7935 else
7936   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7937 $as_echo "no" >&6; }
7938 fi
7939
7940
7941   test -n "$PYTHON" && break
7942 done
7943
7944 else
7945   # Report the value of PYTHON in configure's output in all cases.
7946   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHON" >&5
7947 $as_echo_n "checking for PYTHON... " >&6; }
7948   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
7949 $as_echo "$PYTHON" >&6; }
7950 fi
7951
7952 if test x"$PYTHON" = x""; then
7953   as_fn_error $? "Python not found" "$LINENO" 5
7954 fi
7955
7956
7957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python distutils module" >&5
7958 $as_echo_n "checking for Python distutils module... " >&6; }
7959 if "${PYTHON}" -c 'import distutils' 2>&5
7960 then
7961     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7962 $as_echo "yes" >&6; }
7963 else
7964     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7965 $as_echo "no" >&6; }
7966     as_fn_error $? "distutils module not found" "$LINENO" 5
7967 fi
7968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
7969 $as_echo_n "checking Python configuration directory... " >&6; }
7970 python_majorversion=`${PYTHON} -c "import sys; print(sys.version[0])"`
7971 python_minorversion=`${PYTHON} -c "import sys; print(sys.version[2])"`
7972 python_version=`${PYTHON} -c "import sys; print(sys.version[:3])"`
7973 python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
7974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
7975 $as_echo "$python_configdir" >&6; }
7976
7977 # Reject unsupported Python versions as soon as practical.
7978 if test "$python_majorversion" -lt 3 -a "$python_minorversion" -lt 4; then
7979   as_fn_error $? "Python version $python_version is too old (version 2.4 or later is required)" "$LINENO" 5
7980 fi
7981
7982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directories" >&5
7983 $as_echo_n "checking Python include directories... " >&6; }
7984 python_includespec=`${PYTHON} -c "
7985 import distutils.sysconfig
7986 a = '-I' + distutils.sysconfig.get_python_inc(False)
7987 b = '-I' + distutils.sysconfig.get_python_inc(True)
7988 if a == b:
7989     print(a)
7990 else:
7991     print(a + ' ' + b)"`
7992 if test "$PORTNAME" = win32 ; then
7993     python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
7994 fi
7995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
7996 $as_echo "$python_includespec" >&6; }
7997
7998
7999
8000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
8001 $as_echo_n "checking how to link an embedded Python application... " >&6; }
8002
8003 python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
8004 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
8005
8006 # If LDLIBRARY exists and has a shlib extension, use it verbatim.
8007 ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
8008 if test -e "${python_libdir}/${python_ldlibrary}" -a x"${python_ldlibrary}" != x"${ldlibrary}"
8009 then
8010         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
8011         found_shlib=1
8012 else
8013         # Otherwise, guess the base name of the shlib.
8014         # LDVERSION was added in Python 3.2, before that use VERSION,
8015         # or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS.
8016         python_ldversion=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDVERSION'))))"`
8017         if test x"${python_ldversion}" != x""; then
8018                 ldlibrary="python${python_ldversion}"
8019         else
8020                 python_version_var=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('VERSION'))))"`
8021                 if test x"${python_version_var}" != x""; then
8022                         ldlibrary="python${python_version_var}"
8023                 else
8024                         ldlibrary="python${python_version}"
8025                 fi
8026         fi
8027         # Search for a likely-looking file.
8028         found_shlib=0
8029         for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
8030         do
8031                 # We don't know the platform DLSUFFIX here, so check 'em all.
8032                 for e in .so .dll .dylib .sl; do
8033                         if test -e "$d/lib${ldlibrary}$e"; then
8034                                 python_libdir="$d"
8035                                 found_shlib=1
8036                                 break 2
8037                         fi
8038                 done
8039         done
8040         # Some platforms (OpenBSD) require us to accept a bare versioned shlib
8041         # (".so.n.n") as well. However, check this only after failing to find
8042         # ".so" anywhere, because yet other platforms (Debian) put the .so
8043         # symlink in a different directory from the underlying versioned shlib.
8044         if test "$found_shlib" != 1; then
8045                 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
8046                 do
8047                         for f in "$d/lib${ldlibrary}.so."* ; do
8048                                 if test -e "$f"; then
8049                                         python_libdir="$d"
8050                                         found_shlib=1
8051                                         break 2
8052                                 fi
8053                         done
8054                 done
8055         fi
8056         # As usual, Windows has its own ideas.  Possible default library
8057         # locations include c:/Windows/System32 and (for Cygwin) /usr/bin,
8058         # and the "lib" prefix might not be there.
8059         if test "$found_shlib" != 1 -a \( "$PORTNAME" = win32 -o "$PORTNAME" = cygwin \); then
8060                 for d in "${python_libdir}" "${python_configdir}" c:/Windows/System32 /usr/bin
8061                 do
8062                         for f in "$d/lib${ldlibrary}.dll" "$d/${ldlibrary}.dll" ; do
8063                                 if test -e "$f"; then
8064                                         python_libdir="$d"
8065                                         found_shlib=1
8066                                         break 2
8067                                 fi
8068                         done
8069                 done
8070         fi
8071 fi
8072 if test "$found_shlib" != 1; then
8073         as_fn_error $? "could not find shared library for Python
8074 You might have to rebuild your Python installation.  Refer to the
8075 documentation for details.  Use --without-python to disable building
8076 PL/Python." "$LINENO" 5
8077 fi
8078 python_libspec="-L${python_libdir} -l${ldlibrary}"
8079
8080 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
8081
8082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
8083 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
8084
8085
8086
8087 fi
8088
8089 if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
8090   if test -z "$ZIC"; then
8091   for ac_prog in zic
8092 do
8093   # Extract the first word of "$ac_prog", so it can be a program name with args.
8094 set dummy $ac_prog; ac_word=$2
8095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8096 $as_echo_n "checking for $ac_word... " >&6; }
8097 if ${ac_cv_path_ZIC+:} false; then :
8098   $as_echo_n "(cached) " >&6
8099 else
8100   case $ZIC in
8101   [\\/]* | ?:[\\/]*)
8102   ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
8103   ;;
8104   *)
8105   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8106 for as_dir in $PATH
8107 do
8108   IFS=$as_save_IFS
8109   test -z "$as_dir" && as_dir=.
8110     for ac_exec_ext in '' $ac_executable_extensions; do
8111   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8112     ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
8113     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8114     break 2
8115   fi
8116 done
8117   done
8118 IFS=$as_save_IFS
8119
8120   ;;
8121 esac
8122 fi
8123 ZIC=$ac_cv_path_ZIC
8124 if test -n "$ZIC"; then
8125   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
8126 $as_echo "$ZIC" >&6; }
8127 else
8128   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8129 $as_echo "no" >&6; }
8130 fi
8131
8132
8133   test -n "$ZIC" && break
8134 done
8135
8136 else
8137   # Report the value of ZIC in configure's output in all cases.
8138   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIC" >&5
8139 $as_echo_n "checking for ZIC... " >&6; }
8140   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
8141 $as_echo "$ZIC" >&6; }
8142 fi
8143
8144   if test -z "$ZIC"; then
8145     as_fn_error $? "
8146 When cross-compiling, either use the option --with-system-tzdata to use
8147 existing time-zone data, or set the environment variable ZIC to a zic
8148 program to use during the build." "$LINENO" 5
8149   fi
8150 fi
8151
8152 #
8153 # Pthreads
8154 #
8155 # For each platform, we need to know about any special compile and link
8156 # libraries, and whether the normal C function names are thread-safe.
8157 # See the comment at the top of src/port/thread.c for more information.
8158 # WIN32 doesn't need the pthread tests;  it always uses threads
8159 #
8160 # These tests are run before the library-tests, because linking with the
8161 # other libraries can pull in the pthread functions as a side-effect.  We
8162 # want to use the -pthread or similar flags directly, and not rely on
8163 # the side-effects of linking with some other library.
8164 #
8165 # note: We have to use AS_IF here rather than plain if. The AC_CHECK_HEADER
8166 # invocation below is the first one in the script, and autoconf generates
8167 # additional code for that, which must not be inside the if-block. AS_IF
8168 # knows how to do that.
8169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
8170 $as_echo_n "checking for ANSI C header files... " >&6; }
8171 if ${ac_cv_header_stdc+:} false; then :
8172   $as_echo_n "(cached) " >&6
8173 else
8174   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8175 /* end confdefs.h.  */
8176 #include <stdlib.h>
8177 #include <stdarg.h>
8178 #include <string.h>
8179 #include <float.h>
8180
8181 int
8182 main ()
8183 {
8184
8185   ;
8186   return 0;
8187 }
8188 _ACEOF
8189 if ac_fn_c_try_compile "$LINENO"; then :
8190   ac_cv_header_stdc=yes
8191 else
8192   ac_cv_header_stdc=no
8193 fi
8194 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8195
8196 if test $ac_cv_header_stdc = yes; then
8197   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8198   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8199 /* end confdefs.h.  */
8200 #include <string.h>
8201
8202 _ACEOF
8203 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8204   $EGREP "memchr" >/dev/null 2>&1; then :
8205
8206 else
8207   ac_cv_header_stdc=no
8208 fi
8209 rm -f conftest*
8210
8211 fi
8212
8213 if test $ac_cv_header_stdc = yes; then
8214   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8215   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8216 /* end confdefs.h.  */
8217 #include <stdlib.h>
8218
8219 _ACEOF
8220 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8221   $EGREP "free" >/dev/null 2>&1; then :
8222
8223 else
8224   ac_cv_header_stdc=no
8225 fi
8226 rm -f conftest*
8227
8228 fi
8229
8230 if test $ac_cv_header_stdc = yes; then
8231   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8232   if test "$cross_compiling" = yes; then :
8233   :
8234 else
8235   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8236 /* end confdefs.h.  */
8237 #include <ctype.h>
8238 #include <stdlib.h>
8239 #if ((' ' & 0x0FF) == 0x020)
8240 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8241 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8242 #else
8243 # define ISLOWER(c) \
8244                    (('a' <= (c) && (c) <= 'i') \
8245                      || ('j' <= (c) && (c) <= 'r') \
8246                      || ('s' <= (c) && (c) <= 'z'))
8247 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8248 #endif
8249
8250 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8251 int
8252 main ()
8253 {
8254   int i;
8255   for (i = 0; i < 256; i++)
8256     if (XOR (islower (i), ISLOWER (i))
8257         || toupper (i) != TOUPPER (i))
8258       return 2;
8259   return 0;
8260 }
8261 _ACEOF
8262 if ac_fn_c_try_run "$LINENO"; then :
8263
8264 else
8265   ac_cv_header_stdc=no
8266 fi
8267 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8268   conftest.$ac_objext conftest.beam conftest.$ac_ext
8269 fi
8270
8271 fi
8272 fi
8273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
8274 $as_echo "$ac_cv_header_stdc" >&6; }
8275 if test $ac_cv_header_stdc = yes; then
8276
8277 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
8278
8279 fi
8280
8281 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
8282 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
8283                   inttypes.h stdint.h unistd.h
8284 do :
8285   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8286 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
8287 "
8288 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8289   cat >>confdefs.h <<_ACEOF
8290 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8291 _ACEOF
8292
8293 fi
8294
8295 done
8296
8297
8298 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then :
8299    # then
8300
8301
8302
8303 ac_ext=c
8304 ac_cpp='$CPP $CPPFLAGS'
8305 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8306 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8307 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8308
8309 ax_pthread_ok=no
8310
8311 # We used to check for pthread.h first, but this fails if pthread.h
8312 # requires special compiler flags (e.g. on Tru64 or Sequent).
8313 # It gets checked for in the link test anyway.
8314
8315 # First of all, check if the user has set any of the PTHREAD_LIBS,
8316 # etcetera environment variables, and if threads linking works using
8317 # them:
8318 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
8319         save_CFLAGS="$CFLAGS"
8320         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
8321         save_LIBS="$LIBS"
8322         LIBS="$PTHREAD_LIBS $LIBS"
8323         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
8324 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
8325         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8326 /* end confdefs.h.  */
8327
8328 /* Override any GCC internal prototype to avoid an error.
8329    Use char because int might match the return type of a GCC
8330    builtin and then its argument prototype would still apply.  */
8331 #ifdef __cplusplus
8332 extern "C"
8333 #endif
8334 char pthread_join ();
8335 int
8336 main ()
8337 {
8338 return pthread_join ();
8339   ;
8340   return 0;
8341 }
8342 _ACEOF
8343 if ac_fn_c_try_link "$LINENO"; then :
8344   ax_pthread_ok=yes
8345 fi
8346 rm -f core conftest.err conftest.$ac_objext \
8347     conftest$ac_exeext conftest.$ac_ext
8348         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
8349 $as_echo "$ax_pthread_ok" >&6; }
8350         if test x"$ax_pthread_ok" = xno; then
8351                 PTHREAD_LIBS=""
8352                 PTHREAD_CFLAGS=""
8353         fi
8354         LIBS="$save_LIBS"
8355         CFLAGS="$save_CFLAGS"
8356 fi
8357
8358 # We must check for the threads library under a number of different
8359 # names; the ordering is very important because some systems
8360 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
8361 # libraries is broken (non-POSIX).
8362
8363 # Create a list of thread flags to try.  Items starting with a "-" are
8364 # C compiler flags, and other items are library names, except for "none"
8365 # which indicates that we try without any flags at all, and "pthread-config"
8366 # which is a program returning the flags for the Pth emulation library.
8367
8368 ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mt -mthreads pthread --thread-safe pthread-config"
8369
8370 # The ordering *is* (sometimes) important.  Some notes on the
8371 # individual items follow:
8372
8373 # pthreads: AIX (must check this before -lpthread)
8374 # none: in case threads are in libc; should be tried before -Kthread and
8375 #       other compiler flags to prevent continual compiler warnings
8376 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
8377 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
8378 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
8379 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
8380 # -pthreads: Solaris/gcc
8381 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
8382 #      doesn't hurt to check since this sometimes defines pthreads and
8383 #      -D_REENTRANT too), HP C (must be checked before -lpthread, which
8384 #      is present but should not be used directly)
8385 # -mthreads: Mingw32/gcc, Lynx/gcc
8386 # pthread: Linux, etcetera
8387 # --thread-safe: KAI C++
8388 # pthread-config: use pthread-config program (for GNU Pth library)
8389
8390 case $host_os in
8391
8392         hpux*)
8393
8394         # From the cc(1) man page: "[-mt] Sets various -D flags to enable
8395         # multi-threading and also sets -lpthread."
8396
8397         ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
8398         ;;
8399
8400         openedition*)
8401
8402         # IBM z/OS requires a feature-test macro to be defined in order to
8403         # enable POSIX threads at all, so give the user a hint if this is
8404         # not set. (We don't define these ourselves, as they can affect
8405         # other portions of the system API in unpredictable ways.)
8406
8407         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8408 /* end confdefs.h.  */
8409
8410 #            if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
8411              AX_PTHREAD_ZOS_MISSING
8412 #            endif
8413
8414 _ACEOF
8415 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8416   $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
8417   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
8418 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
8419 fi
8420 rm -f conftest*
8421
8422         ;;
8423
8424         solaris*)
8425
8426         # Newer versions of Solaris require the "-mt -lpthread" pair, and we
8427         # check that first.  On some older versions, libc contains stubbed
8428         # (non-functional) versions of the pthreads routines, so link-based
8429         # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
8430         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
8431         # a function called by this macro, so we could check for that, but
8432         # who knows whether they'll stub that too in a future libc.)  So
8433         # we'll look for -pthreads and -lpthread shortly thereafter.
8434
8435         ax_pthread_flags="-mt,pthread -pthreads -pthread pthread $ax_pthread_flags"
8436         ;;
8437 esac
8438
8439 # Older versions of Clang only give a warning instead of an error for an
8440 # unrecognized option, unless we specify -Werror. (We throw in some extra
8441 # Clang warning flags for good measure.)
8442
8443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler needs certain flags to reject unknown flags" >&5
8444 $as_echo_n "checking if compiler needs certain flags to reject unknown flags... " >&6; }
8445 if ${ax_cv_PTHREAD_REJECT_UNKNOWN+:} false; then :
8446   $as_echo_n "(cached) " >&6
8447 else
8448   ax_cv_PTHREAD_REJECT_UNKNOWN=unknown
8449      save_CFLAGS="$CFLAGS"
8450      ax_pthread_extra_flags="-Wunknown-warning-option -Wunused-command-line-argument"
8451      CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wfoobaz -foobaz"
8452      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8453 /* end confdefs.h.  */
8454 int foo(void);
8455 int
8456 main ()
8457 {
8458 foo()
8459   ;
8460   return 0;
8461 }
8462 _ACEOF
8463 if ac_fn_c_try_compile "$LINENO"; then :
8464   ax_cv_PTHREAD_REJECT_UNKNOWN="-Werror $ax_pthread_extra_flags"
8465 else
8466   ax_cv_PTHREAD_REJECT_UNKNOWN=no
8467 fi
8468 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8469      CFLAGS="$save_CFLAGS"
8470
8471 fi
8472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_REJECT_UNKNOWN" >&5
8473 $as_echo "$ax_cv_PTHREAD_REJECT_UNKNOWN" >&6; }
8474 ax_pthread_extra_flags=
8475 if test "x$ax_cv_PTHREAD_REJECT_UNKNOWN" != "xno"; then :
8476   ax_pthread_extra_flags="$ax_cv_PTHREAD_REJECT_UNKNOWN"
8477 fi
8478
8479 if test x"$ax_pthread_ok" = xno; then
8480 for flag in $ax_pthread_flags; do
8481
8482         case $flag in
8483                 none)
8484                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
8485 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
8486                 ;;
8487
8488                 -mt,pthread)
8489                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
8490 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
8491                 PTHREAD_CFLAGS="-mt"
8492                 PTHREAD_LIBS="-lpthread"
8493                 ;;
8494
8495                 -*)
8496                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
8497 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
8498                 PTHREAD_CFLAGS="$flag"
8499                 ;;
8500
8501                 pthread-config)
8502                 # Extract the first word of "pthread-config", so it can be a program name with args.
8503 set dummy pthread-config; ac_word=$2
8504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8505 $as_echo_n "checking for $ac_word... " >&6; }
8506 if ${ac_cv_prog_ax_pthread_config+:} false; then :
8507   $as_echo_n "(cached) " >&6
8508 else
8509   if test -n "$ax_pthread_config"; then
8510   ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
8511 else
8512 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8513 for as_dir in $PATH
8514 do
8515   IFS=$as_save_IFS
8516   test -z "$as_dir" && as_dir=.
8517     for ac_exec_ext in '' $ac_executable_extensions; do
8518   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8519     ac_cv_prog_ax_pthread_config="yes"
8520     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8521     break 2
8522   fi
8523 done
8524   done
8525 IFS=$as_save_IFS
8526
8527   test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
8528 fi
8529 fi
8530 ax_pthread_config=$ac_cv_prog_ax_pthread_config
8531 if test -n "$ax_pthread_config"; then
8532   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
8533 $as_echo "$ax_pthread_config" >&6; }
8534 else
8535   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8536 $as_echo "no" >&6; }
8537 fi
8538
8539
8540                 if test x"$ax_pthread_config" = xno; then continue; fi
8541                 PTHREAD_CFLAGS="`pthread-config --cflags`"
8542                 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
8543                 ;;
8544
8545                 *)
8546                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
8547 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
8548                 PTHREAD_LIBS="-l$flag"
8549                 ;;
8550         esac
8551
8552         save_LIBS="$LIBS"
8553         save_CFLAGS="$CFLAGS"
8554         LIBS="$PTHREAD_LIBS $LIBS"
8555         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
8556
8557         # Check for various functions.  We must include pthread.h,
8558         # since some functions may be macros.  (On the Sequent, we
8559         # need a special flag -Kthread to make this header compile.)
8560         # We check for pthread_join because it is in -lpthread on IRIX
8561         # while pthread_create is in libc.  We check for pthread_attr_init
8562         # due to DEC craziness with -lpthreads.  We check for
8563         # pthread_cleanup_push because it is one of the few pthread
8564         # functions on Solaris that doesn't have a non-functional libc stub.
8565         # We try pthread_create on general principles.
8566         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8567 /* end confdefs.h.  */
8568 #include <pthread.h>
8569                         static void routine(void *a) { a = 0; }
8570                         static void *start_routine(void *a) { return a; }
8571 int
8572 main ()
8573 {
8574 pthread_t th; pthread_attr_t attr;
8575                         pthread_create(&th, 0, start_routine, 0);
8576                         pthread_join(th, 0);
8577                         pthread_attr_init(&attr);
8578                         pthread_cleanup_push(routine, 0);
8579                         pthread_cleanup_pop(0) /* ; */
8580   ;
8581   return 0;
8582 }
8583 _ACEOF
8584 if ac_fn_c_try_link "$LINENO"; then :
8585   ax_pthread_ok=yes
8586 fi
8587 rm -f core conftest.err conftest.$ac_objext \
8588     conftest$ac_exeext conftest.$ac_ext
8589
8590         LIBS="$save_LIBS"
8591         CFLAGS="$save_CFLAGS"
8592
8593         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
8594 $as_echo "$ax_pthread_ok" >&6; }
8595         if test "x$ax_pthread_ok" = xyes; then
8596                 break;
8597         fi
8598
8599         PTHREAD_LIBS=""
8600         PTHREAD_CFLAGS=""
8601 done
8602 fi
8603
8604 # Various other checks:
8605 if test "x$ax_pthread_ok" = xyes; then
8606         save_LIBS="$LIBS"
8607         LIBS="$PTHREAD_LIBS $LIBS"
8608         save_CFLAGS="$CFLAGS"
8609         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
8610
8611         # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
8612         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
8613 $as_echo_n "checking for joinable pthread attribute... " >&6; }
8614 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
8615   $as_echo_n "(cached) " >&6
8616 else
8617   ax_cv_PTHREAD_JOINABLE_ATTR=unknown
8618              for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
8619                  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8620 /* end confdefs.h.  */
8621 #include <pthread.h>
8622 int
8623 main ()
8624 {
8625 int attr = $attr; return attr /* ; */
8626   ;
8627   return 0;
8628 }
8629 _ACEOF
8630 if ac_fn_c_try_link "$LINENO"; then :
8631   ax_cv_PTHREAD_JOINABLE_ATTR=$attr; break
8632 fi
8633 rm -f core conftest.err conftest.$ac_objext \
8634     conftest$ac_exeext conftest.$ac_ext
8635              done
8636
8637 fi
8638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
8639 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
8640         if test "$ax_cv_PTHREAD_JOINABLE_ATTR" != unknown && \
8641                test "$ax_cv_PTHREAD_JOINABLE_ATTR" != PTHREAD_CREATE_JOINABLE; then :
8642
8643 cat >>confdefs.h <<_ACEOF
8644 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
8645 _ACEOF
8646
8647 fi
8648
8649         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
8650 $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
8651 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
8652   $as_echo_n "(cached) " >&6
8653 else
8654   ax_cv_PTHREAD_SPECIAL_FLAGS=no
8655              ax_pthread_special_flags_added=no
8656              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8657 /* end confdefs.h.  */
8658
8659 #                 if !defined(_REENTRANT) && !defined(_THREAD_SAFE)
8660                   AX_PTHREAD_NEED_SPECIAL_FLAG
8661 #                 endif
8662
8663 _ACEOF
8664 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8665   $EGREP "AX_PTHREAD_NEED_SPECIAL_FLAG" >/dev/null 2>&1; then :
8666   case $host_os in
8667                   aix* | freebsd*)
8668                   ax_cv_PTHREAD_SPECIAL_FLAGS="-D_THREAD_SAFE"
8669                   ;;
8670                   darwin* | hpux* | osf* | solaris*)
8671                   ax_cv_PTHREAD_SPECIAL_FLAGS="-D_REENTRANT"
8672                   ;;
8673                   esac
8674
8675 fi
8676 rm -f conftest*
8677
8678
8679 fi
8680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
8681 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
8682         if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
8683                test "x$ax_pthread_special_flags_added" != "xyes"; then :
8684   PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
8685                ax_pthread_special_flags_added=yes
8686 fi
8687
8688         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
8689 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
8690 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
8691   $as_echo_n "(cached) " >&6
8692 else
8693   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8694 /* end confdefs.h.  */
8695 #include <pthread.h>
8696 int
8697 main ()
8698 {
8699 int i = PTHREAD_PRIO_INHERIT;
8700   ;
8701   return 0;
8702 }
8703 _ACEOF
8704 if ac_fn_c_try_link "$LINENO"; then :
8705   ax_cv_PTHREAD_PRIO_INHERIT=yes
8706 else
8707   ax_cv_PTHREAD_PRIO_INHERIT=no
8708 fi
8709 rm -f core conftest.err conftest.$ac_objext \
8710     conftest$ac_exeext conftest.$ac_ext
8711
8712 fi
8713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
8714 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
8715         if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
8716
8717 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
8718
8719 fi
8720
8721         LIBS="$save_LIBS"
8722         CFLAGS="$save_CFLAGS"
8723
8724         # More AIX lossage: compile with *_r variant
8725         if test "x$GCC" != xyes; then
8726             case $host_os in
8727                 aix*)
8728                 case "x/$CC" in #(
8729   x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
8730     #handle absolute path differently from PATH based program lookup
8731                    case "x$CC" in #(
8732   x/*) :
8733     if as_fn_executable_p ${CC}_r; then :
8734   PTHREAD_CC="${CC}_r"
8735 fi ;; #(
8736   *) :
8737     for ac_prog in ${CC}_r
8738 do
8739   # Extract the first word of "$ac_prog", so it can be a program name with args.
8740 set dummy $ac_prog; ac_word=$2
8741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8742 $as_echo_n "checking for $ac_word... " >&6; }
8743 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
8744   $as_echo_n "(cached) " >&6
8745 else
8746   if test -n "$PTHREAD_CC"; then
8747   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
8748 else
8749 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8750 for as_dir in $PATH
8751 do
8752   IFS=$as_save_IFS
8753   test -z "$as_dir" && as_dir=.
8754     for ac_exec_ext in '' $ac_executable_extensions; do
8755   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8756     ac_cv_prog_PTHREAD_CC="$ac_prog"
8757     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8758     break 2
8759   fi
8760 done
8761   done
8762 IFS=$as_save_IFS
8763
8764 fi
8765 fi
8766 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
8767 if test -n "$PTHREAD_CC"; then
8768   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
8769 $as_echo "$PTHREAD_CC" >&6; }
8770 else
8771   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8772 $as_echo "no" >&6; }
8773 fi
8774
8775
8776   test -n "$PTHREAD_CC" && break
8777 done
8778 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
8779  ;;
8780 esac ;; #(
8781   *) :
8782      ;;
8783 esac
8784                 ;;
8785             esac
8786         fi
8787 fi
8788
8789 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
8790
8791
8792
8793
8794
8795 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
8796 if test x"$ax_pthread_ok" = xyes; then
8797
8798 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
8799
8800         :
8801 else
8802         ax_pthread_ok=no
8803
8804 fi
8805 ac_ext=c
8806 ac_cpp='$CPP $CPPFLAGS'
8807 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8808 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8809 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8810
8811         # set thread flags
8812
8813 # Some platforms use these, so just define them.  They can't hurt if they
8814 # are not supported.  For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
8815 # enables 5-arg getpwuid_r, among other things.
8816 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
8817
8818 # Check for *_r functions
8819 _CFLAGS="$CFLAGS"
8820 _LIBS="$LIBS"
8821 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
8822 LIBS="$LIBS $PTHREAD_LIBS"
8823
8824 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
8825 if test "x$ac_cv_header_pthread_h" = xyes; then :
8826
8827 else
8828   as_fn_error $? "
8829 pthread.h not found;  use --disable-thread-safety to disable thread safety" "$LINENO" 5
8830 fi
8831
8832
8833
8834 for ac_func in strerror_r getpwuid_r gethostbyname_r
8835 do :
8836   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8837 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8838 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8839   cat >>confdefs.h <<_ACEOF
8840 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8841 _ACEOF
8842
8843 fi
8844 done
8845
8846
8847 # Do test here with the proper thread flags
8848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
8849 $as_echo_n "checking whether strerror_r returns int... " >&6; }
8850 if ${pgac_cv_func_strerror_r_int+:} false; then :
8851   $as_echo_n "(cached) " >&6
8852 else
8853   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8854 /* end confdefs.h.  */
8855 #include <string.h>
8856 int
8857 main ()
8858 {
8859 #ifndef _AIX
8860 int strerror_r(int, char *, size_t);
8861 #else
8862 /* Older AIX has 'int' for the third argument so we don't test the args. */
8863 int strerror_r();
8864 #endif
8865   ;
8866   return 0;
8867 }
8868 _ACEOF
8869 if ac_fn_c_try_compile "$LINENO"; then :
8870   pgac_cv_func_strerror_r_int=yes
8871 else
8872   pgac_cv_func_strerror_r_int=no
8873 fi
8874 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8875 fi
8876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
8877 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
8878 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
8879
8880 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
8881
8882 fi
8883
8884
8885 CFLAGS="$_CFLAGS"
8886 LIBS="$_LIBS"
8887
8888
8889 else
8890    # else
8891 # do not use values from template file
8892 PTHREAD_CFLAGS=
8893 PTHREAD_LIBS=
8894
8895 fi # fi
8896
8897
8898
8899
8900
8901 ##
8902 ## Libraries
8903 ##
8904 ## Most libraries are included only if they demonstrably provide a function
8905 ## we need, but libm is an exception: always include it, because there are
8906 ## too many compilers that play cute optimization games that will break
8907 ## probes for standard functions such as pow().
8908 ##
8909
8910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
8911 $as_echo_n "checking for main in -lm... " >&6; }
8912 if ${ac_cv_lib_m_main+:} false; then :
8913   $as_echo_n "(cached) " >&6
8914 else
8915   ac_check_lib_save_LIBS=$LIBS
8916 LIBS="-lm  $LIBS"
8917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8918 /* end confdefs.h.  */
8919
8920
8921 int
8922 main ()
8923 {
8924 return main ();
8925   ;
8926   return 0;
8927 }
8928 _ACEOF
8929 if ac_fn_c_try_link "$LINENO"; then :
8930   ac_cv_lib_m_main=yes
8931 else
8932   ac_cv_lib_m_main=no
8933 fi
8934 rm -f core conftest.err conftest.$ac_objext \
8935     conftest$ac_exeext conftest.$ac_ext
8936 LIBS=$ac_check_lib_save_LIBS
8937 fi
8938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
8939 $as_echo "$ac_cv_lib_m_main" >&6; }
8940 if test "x$ac_cv_lib_m_main" = xyes; then :
8941   cat >>confdefs.h <<_ACEOF
8942 #define HAVE_LIBM 1
8943 _ACEOF
8944
8945   LIBS="-lm $LIBS"
8946
8947 fi
8948
8949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
8950 $as_echo_n "checking for library containing setproctitle... " >&6; }
8951 if ${ac_cv_search_setproctitle+:} false; then :
8952   $as_echo_n "(cached) " >&6
8953 else
8954   ac_func_search_save_LIBS=$LIBS
8955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8956 /* end confdefs.h.  */
8957
8958 /* Override any GCC internal prototype to avoid an error.
8959    Use char because int might match the return type of a GCC
8960    builtin and then its argument prototype would still apply.  */
8961 #ifdef __cplusplus
8962 extern "C"
8963 #endif
8964 char setproctitle ();
8965 int
8966 main ()
8967 {
8968 return setproctitle ();
8969   ;
8970   return 0;
8971 }
8972 _ACEOF
8973 for ac_lib in '' util; do
8974   if test -z "$ac_lib"; then
8975     ac_res="none required"
8976   else
8977     ac_res=-l$ac_lib
8978     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8979   fi
8980   if ac_fn_c_try_link "$LINENO"; then :
8981   ac_cv_search_setproctitle=$ac_res
8982 fi
8983 rm -f core conftest.err conftest.$ac_objext \
8984     conftest$ac_exeext
8985   if ${ac_cv_search_setproctitle+:} false; then :
8986   break
8987 fi
8988 done
8989 if ${ac_cv_search_setproctitle+:} false; then :
8990
8991 else
8992   ac_cv_search_setproctitle=no
8993 fi
8994 rm conftest.$ac_ext
8995 LIBS=$ac_func_search_save_LIBS
8996 fi
8997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
8998 $as_echo "$ac_cv_search_setproctitle" >&6; }
8999 ac_res=$ac_cv_search_setproctitle
9000 if test "$ac_res" != no; then :
9001   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9002
9003 fi
9004
9005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9006 $as_echo_n "checking for library containing dlopen... " >&6; }
9007 if ${ac_cv_search_dlopen+:} false; then :
9008   $as_echo_n "(cached) " >&6
9009 else
9010   ac_func_search_save_LIBS=$LIBS
9011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9012 /* end confdefs.h.  */
9013
9014 /* Override any GCC internal prototype to avoid an error.
9015    Use char because int might match the return type of a GCC
9016    builtin and then its argument prototype would still apply.  */
9017 #ifdef __cplusplus
9018 extern "C"
9019 #endif
9020 char dlopen ();
9021 int
9022 main ()
9023 {
9024 return dlopen ();
9025   ;
9026   return 0;
9027 }
9028 _ACEOF
9029 for ac_lib in '' dl; do
9030   if test -z "$ac_lib"; then
9031     ac_res="none required"
9032   else
9033     ac_res=-l$ac_lib
9034     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9035   fi
9036   if ac_fn_c_try_link "$LINENO"; then :
9037   ac_cv_search_dlopen=$ac_res
9038 fi
9039 rm -f core conftest.err conftest.$ac_objext \
9040     conftest$ac_exeext
9041   if ${ac_cv_search_dlopen+:} false; then :
9042   break
9043 fi
9044 done
9045 if ${ac_cv_search_dlopen+:} false; then :
9046
9047 else
9048   ac_cv_search_dlopen=no
9049 fi
9050 rm conftest.$ac_ext
9051 LIBS=$ac_func_search_save_LIBS
9052 fi
9053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9054 $as_echo "$ac_cv_search_dlopen" >&6; }
9055 ac_res=$ac_cv_search_dlopen
9056 if test "$ac_res" != no; then :
9057   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9058
9059 fi
9060
9061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
9062 $as_echo_n "checking for library containing socket... " >&6; }
9063 if ${ac_cv_search_socket+:} false; then :
9064   $as_echo_n "(cached) " >&6
9065 else
9066   ac_func_search_save_LIBS=$LIBS
9067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9068 /* end confdefs.h.  */
9069
9070 /* Override any GCC internal prototype to avoid an error.
9071    Use char because int might match the return type of a GCC
9072    builtin and then its argument prototype would still apply.  */
9073 #ifdef __cplusplus
9074 extern "C"
9075 #endif
9076 char socket ();
9077 int
9078 main ()
9079 {
9080 return socket ();
9081   ;
9082   return 0;
9083 }
9084 _ACEOF
9085 for ac_lib in '' socket ws2_32; do
9086   if test -z "$ac_lib"; then
9087     ac_res="none required"
9088   else
9089     ac_res=-l$ac_lib
9090     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9091   fi
9092   if ac_fn_c_try_link "$LINENO"; then :
9093   ac_cv_search_socket=$ac_res
9094 fi
9095 rm -f core conftest.err conftest.$ac_objext \
9096     conftest$ac_exeext
9097   if ${ac_cv_search_socket+:} false; then :
9098   break
9099 fi
9100 done
9101 if ${ac_cv_search_socket+:} false; then :
9102
9103 else
9104   ac_cv_search_socket=no
9105 fi
9106 rm conftest.$ac_ext
9107 LIBS=$ac_func_search_save_LIBS
9108 fi
9109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
9110 $as_echo "$ac_cv_search_socket" >&6; }
9111 ac_res=$ac_cv_search_socket
9112 if test "$ac_res" != no; then :
9113   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9114
9115 fi
9116
9117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
9118 $as_echo_n "checking for library containing shl_load... " >&6; }
9119 if ${ac_cv_search_shl_load+:} false; then :
9120   $as_echo_n "(cached) " >&6
9121 else
9122   ac_func_search_save_LIBS=$LIBS
9123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9124 /* end confdefs.h.  */
9125
9126 /* Override any GCC internal prototype to avoid an error.
9127    Use char because int might match the return type of a GCC
9128    builtin and then its argument prototype would still apply.  */
9129 #ifdef __cplusplus
9130 extern "C"
9131 #endif
9132 char shl_load ();
9133 int
9134 main ()
9135 {
9136 return shl_load ();
9137   ;
9138   return 0;
9139 }
9140 _ACEOF
9141 for ac_lib in '' dld; do
9142   if test -z "$ac_lib"; then
9143     ac_res="none required"
9144   else
9145     ac_res=-l$ac_lib
9146     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9147   fi
9148   if ac_fn_c_try_link "$LINENO"; then :
9149   ac_cv_search_shl_load=$ac_res
9150 fi
9151 rm -f core conftest.err conftest.$ac_objext \
9152     conftest$ac_exeext
9153   if ${ac_cv_search_shl_load+:} false; then :
9154   break
9155 fi
9156 done
9157 if ${ac_cv_search_shl_load+:} false; then :
9158
9159 else
9160   ac_cv_search_shl_load=no
9161 fi
9162 rm conftest.$ac_ext
9163 LIBS=$ac_func_search_save_LIBS
9164 fi
9165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
9166 $as_echo "$ac_cv_search_shl_load" >&6; }
9167 ac_res=$ac_cv_search_shl_load
9168 if test "$ac_res" != no; then :
9169   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9170
9171 fi
9172
9173 # We only use libld in port/dynloader/aix.c
9174 case $host_os in
9175      aix*)
9176         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ldopen" >&5
9177 $as_echo_n "checking for library containing ldopen... " >&6; }
9178 if ${ac_cv_search_ldopen+:} false; then :
9179   $as_echo_n "(cached) " >&6
9180 else
9181   ac_func_search_save_LIBS=$LIBS
9182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9183 /* end confdefs.h.  */
9184
9185 /* Override any GCC internal prototype to avoid an error.
9186    Use char because int might match the return type of a GCC
9187    builtin and then its argument prototype would still apply.  */
9188 #ifdef __cplusplus
9189 extern "C"
9190 #endif
9191 char ldopen ();
9192 int
9193 main ()
9194 {
9195 return ldopen ();
9196   ;
9197   return 0;
9198 }
9199 _ACEOF
9200 for ac_lib in '' ld; do
9201   if test -z "$ac_lib"; then
9202     ac_res="none required"
9203   else
9204     ac_res=-l$ac_lib
9205     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9206   fi
9207   if ac_fn_c_try_link "$LINENO"; then :
9208   ac_cv_search_ldopen=$ac_res
9209 fi
9210 rm -f core conftest.err conftest.$ac_objext \
9211     conftest$ac_exeext
9212   if ${ac_cv_search_ldopen+:} false; then :
9213   break
9214 fi
9215 done
9216 if ${ac_cv_search_ldopen+:} false; then :
9217
9218 else
9219   ac_cv_search_ldopen=no
9220 fi
9221 rm conftest.$ac_ext
9222 LIBS=$ac_func_search_save_LIBS
9223 fi
9224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ldopen" >&5
9225 $as_echo "$ac_cv_search_ldopen" >&6; }
9226 ac_res=$ac_cv_search_ldopen
9227 if test "$ac_res" != no; then :
9228   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9229
9230 fi
9231
9232         ;;
9233 esac
9234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
9235 $as_echo_n "checking for library containing getopt_long... " >&6; }
9236 if ${ac_cv_search_getopt_long+:} false; then :
9237   $as_echo_n "(cached) " >&6
9238 else
9239   ac_func_search_save_LIBS=$LIBS
9240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9241 /* end confdefs.h.  */
9242
9243 /* Override any GCC internal prototype to avoid an error.
9244    Use char because int might match the return type of a GCC
9245    builtin and then its argument prototype would still apply.  */
9246 #ifdef __cplusplus
9247 extern "C"
9248 #endif
9249 char getopt_long ();
9250 int
9251 main ()
9252 {
9253 return getopt_long ();
9254   ;
9255   return 0;
9256 }
9257 _ACEOF
9258 for ac_lib in '' getopt gnugetopt; do
9259   if test -z "$ac_lib"; then
9260     ac_res="none required"
9261   else
9262     ac_res=-l$ac_lib
9263     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9264   fi
9265   if ac_fn_c_try_link "$LINENO"; then :
9266   ac_cv_search_getopt_long=$ac_res
9267 fi
9268 rm -f core conftest.err conftest.$ac_objext \
9269     conftest$ac_exeext
9270   if ${ac_cv_search_getopt_long+:} false; then :
9271   break
9272 fi
9273 done
9274 if ${ac_cv_search_getopt_long+:} false; then :
9275
9276 else
9277   ac_cv_search_getopt_long=no
9278 fi
9279 rm conftest.$ac_ext
9280 LIBS=$ac_func_search_save_LIBS
9281 fi
9282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
9283 $as_echo "$ac_cv_search_getopt_long" >&6; }
9284 ac_res=$ac_cv_search_getopt_long
9285 if test "$ac_res" != no; then :
9286   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9287
9288 fi
9289
9290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
9291 $as_echo_n "checking for library containing crypt... " >&6; }
9292 if ${ac_cv_search_crypt+:} false; then :
9293   $as_echo_n "(cached) " >&6
9294 else
9295   ac_func_search_save_LIBS=$LIBS
9296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9297 /* end confdefs.h.  */
9298
9299 /* Override any GCC internal prototype to avoid an error.
9300    Use char because int might match the return type of a GCC
9301    builtin and then its argument prototype would still apply.  */
9302 #ifdef __cplusplus
9303 extern "C"
9304 #endif
9305 char crypt ();
9306 int
9307 main ()
9308 {
9309 return crypt ();
9310   ;
9311   return 0;
9312 }
9313 _ACEOF
9314 for ac_lib in '' crypt; do
9315   if test -z "$ac_lib"; then
9316     ac_res="none required"
9317   else
9318     ac_res=-l$ac_lib
9319     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9320   fi
9321   if ac_fn_c_try_link "$LINENO"; then :
9322   ac_cv_search_crypt=$ac_res
9323 fi
9324 rm -f core conftest.err conftest.$ac_objext \
9325     conftest$ac_exeext
9326   if ${ac_cv_search_crypt+:} false; then :
9327   break
9328 fi
9329 done
9330 if ${ac_cv_search_crypt+:} false; then :
9331
9332 else
9333   ac_cv_search_crypt=no
9334 fi
9335 rm conftest.$ac_ext
9336 LIBS=$ac_func_search_save_LIBS
9337 fi
9338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
9339 $as_echo "$ac_cv_search_crypt" >&6; }
9340 ac_res=$ac_cv_search_crypt
9341 if test "$ac_res" != no; then :
9342   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9343
9344 fi
9345
9346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
9347 $as_echo_n "checking for library containing shm_open... " >&6; }
9348 if ${ac_cv_search_shm_open+:} false; then :
9349   $as_echo_n "(cached) " >&6
9350 else
9351   ac_func_search_save_LIBS=$LIBS
9352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9353 /* end confdefs.h.  */
9354
9355 /* Override any GCC internal prototype to avoid an error.
9356    Use char because int might match the return type of a GCC
9357    builtin and then its argument prototype would still apply.  */
9358 #ifdef __cplusplus
9359 extern "C"
9360 #endif
9361 char shm_open ();
9362 int
9363 main ()
9364 {
9365 return shm_open ();
9366   ;
9367   return 0;
9368 }
9369 _ACEOF
9370 for ac_lib in '' rt; do
9371   if test -z "$ac_lib"; then
9372     ac_res="none required"
9373   else
9374     ac_res=-l$ac_lib
9375     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9376   fi
9377   if ac_fn_c_try_link "$LINENO"; then :
9378   ac_cv_search_shm_open=$ac_res
9379 fi
9380 rm -f core conftest.err conftest.$ac_objext \
9381     conftest$ac_exeext
9382   if ${ac_cv_search_shm_open+:} false; then :
9383   break
9384 fi
9385 done
9386 if ${ac_cv_search_shm_open+:} false; then :
9387
9388 else
9389   ac_cv_search_shm_open=no
9390 fi
9391 rm conftest.$ac_ext
9392 LIBS=$ac_func_search_save_LIBS
9393 fi
9394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
9395 $as_echo "$ac_cv_search_shm_open" >&6; }
9396 ac_res=$ac_cv_search_shm_open
9397 if test "$ac_res" != no; then :
9398   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9399
9400 fi
9401
9402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
9403 $as_echo_n "checking for library containing shm_unlink... " >&6; }
9404 if ${ac_cv_search_shm_unlink+:} false; then :
9405   $as_echo_n "(cached) " >&6
9406 else
9407   ac_func_search_save_LIBS=$LIBS
9408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9409 /* end confdefs.h.  */
9410
9411 /* Override any GCC internal prototype to avoid an error.
9412    Use char because int might match the return type of a GCC
9413    builtin and then its argument prototype would still apply.  */
9414 #ifdef __cplusplus
9415 extern "C"
9416 #endif
9417 char shm_unlink ();
9418 int
9419 main ()
9420 {
9421 return shm_unlink ();
9422   ;
9423   return 0;
9424 }
9425 _ACEOF
9426 for ac_lib in '' rt; do
9427   if test -z "$ac_lib"; then
9428     ac_res="none required"
9429   else
9430     ac_res=-l$ac_lib
9431     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9432   fi
9433   if ac_fn_c_try_link "$LINENO"; then :
9434   ac_cv_search_shm_unlink=$ac_res
9435 fi
9436 rm -f core conftest.err conftest.$ac_objext \
9437     conftest$ac_exeext
9438   if ${ac_cv_search_shm_unlink+:} false; then :
9439   break
9440 fi
9441 done
9442 if ${ac_cv_search_shm_unlink+:} false; then :
9443
9444 else
9445   ac_cv_search_shm_unlink=no
9446 fi
9447 rm conftest.$ac_ext
9448 LIBS=$ac_func_search_save_LIBS
9449 fi
9450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
9451 $as_echo "$ac_cv_search_shm_unlink" >&6; }
9452 ac_res=$ac_cv_search_shm_unlink
9453 if test "$ac_res" != no; then :
9454   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9455
9456 fi
9457
9458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
9459 $as_echo_n "checking for library containing clock_gettime... " >&6; }
9460 if ${ac_cv_search_clock_gettime+:} false; then :
9461   $as_echo_n "(cached) " >&6
9462 else
9463   ac_func_search_save_LIBS=$LIBS
9464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9465 /* end confdefs.h.  */
9466
9467 /* Override any GCC internal prototype to avoid an error.
9468    Use char because int might match the return type of a GCC
9469    builtin and then its argument prototype would still apply.  */
9470 #ifdef __cplusplus
9471 extern "C"
9472 #endif
9473 char clock_gettime ();
9474 int
9475 main ()
9476 {
9477 return clock_gettime ();
9478   ;
9479   return 0;
9480 }
9481 _ACEOF
9482 for ac_lib in '' rt posix4; do
9483   if test -z "$ac_lib"; then
9484     ac_res="none required"
9485   else
9486     ac_res=-l$ac_lib
9487     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9488   fi
9489   if ac_fn_c_try_link "$LINENO"; then :
9490   ac_cv_search_clock_gettime=$ac_res
9491 fi
9492 rm -f core conftest.err conftest.$ac_objext \
9493     conftest$ac_exeext
9494   if ${ac_cv_search_clock_gettime+:} false; then :
9495   break
9496 fi
9497 done
9498 if ${ac_cv_search_clock_gettime+:} false; then :
9499
9500 else
9501   ac_cv_search_clock_gettime=no
9502 fi
9503 rm conftest.$ac_ext
9504 LIBS=$ac_func_search_save_LIBS
9505 fi
9506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
9507 $as_echo "$ac_cv_search_clock_gettime" >&6; }
9508 ac_res=$ac_cv_search_clock_gettime
9509 if test "$ac_res" != no; then :
9510   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9511
9512 fi
9513
9514 # Solaris:
9515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
9516 $as_echo_n "checking for library containing fdatasync... " >&6; }
9517 if ${ac_cv_search_fdatasync+:} false; then :
9518   $as_echo_n "(cached) " >&6
9519 else
9520   ac_func_search_save_LIBS=$LIBS
9521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9522 /* end confdefs.h.  */
9523
9524 /* Override any GCC internal prototype to avoid an error.
9525    Use char because int might match the return type of a GCC
9526    builtin and then its argument prototype would still apply.  */
9527 #ifdef __cplusplus
9528 extern "C"
9529 #endif
9530 char fdatasync ();
9531 int
9532 main ()
9533 {
9534 return fdatasync ();
9535   ;
9536   return 0;
9537 }
9538 _ACEOF
9539 for ac_lib in '' rt posix4; do
9540   if test -z "$ac_lib"; then
9541     ac_res="none required"
9542   else
9543     ac_res=-l$ac_lib
9544     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9545   fi
9546   if ac_fn_c_try_link "$LINENO"; then :
9547   ac_cv_search_fdatasync=$ac_res
9548 fi
9549 rm -f core conftest.err conftest.$ac_objext \
9550     conftest$ac_exeext
9551   if ${ac_cv_search_fdatasync+:} false; then :
9552   break
9553 fi
9554 done
9555 if ${ac_cv_search_fdatasync+:} false; then :
9556
9557 else
9558   ac_cv_search_fdatasync=no
9559 fi
9560 rm conftest.$ac_ext
9561 LIBS=$ac_func_search_save_LIBS
9562 fi
9563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
9564 $as_echo "$ac_cv_search_fdatasync" >&6; }
9565 ac_res=$ac_cv_search_fdatasync
9566 if test "$ac_res" != no; then :
9567   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9568
9569 fi
9570
9571 # Required for thread_test.c on Solaris
9572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sched_yield" >&5
9573 $as_echo_n "checking for library containing sched_yield... " >&6; }
9574 if ${ac_cv_search_sched_yield+:} false; then :
9575   $as_echo_n "(cached) " >&6
9576 else
9577   ac_func_search_save_LIBS=$LIBS
9578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9579 /* end confdefs.h.  */
9580
9581 /* Override any GCC internal prototype to avoid an error.
9582    Use char because int might match the return type of a GCC
9583    builtin and then its argument prototype would still apply.  */
9584 #ifdef __cplusplus
9585 extern "C"
9586 #endif
9587 char sched_yield ();
9588 int
9589 main ()
9590 {
9591 return sched_yield ();
9592   ;
9593   return 0;
9594 }
9595 _ACEOF
9596 for ac_lib in '' rt; do
9597   if test -z "$ac_lib"; then
9598     ac_res="none required"
9599   else
9600     ac_res=-l$ac_lib
9601     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9602   fi
9603   if ac_fn_c_try_link "$LINENO"; then :
9604   ac_cv_search_sched_yield=$ac_res
9605 fi
9606 rm -f core conftest.err conftest.$ac_objext \
9607     conftest$ac_exeext
9608   if ${ac_cv_search_sched_yield+:} false; then :
9609   break
9610 fi
9611 done
9612 if ${ac_cv_search_sched_yield+:} false; then :
9613
9614 else
9615   ac_cv_search_sched_yield=no
9616 fi
9617 rm conftest.$ac_ext
9618 LIBS=$ac_func_search_save_LIBS
9619 fi
9620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sched_yield" >&5
9621 $as_echo "$ac_cv_search_sched_yield" >&6; }
9622 ac_res=$ac_cv_search_sched_yield
9623 if test "$ac_res" != no; then :
9624   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9625
9626 fi
9627
9628 # Required for thread_test.c on Solaris 2.5:
9629 # Other ports use it too (HP-UX) so test unconditionally
9630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
9631 $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
9632 if ${ac_cv_search_gethostbyname_r+:} false; then :
9633   $as_echo_n "(cached) " >&6
9634 else
9635   ac_func_search_save_LIBS=$LIBS
9636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9637 /* end confdefs.h.  */
9638
9639 /* Override any GCC internal prototype to avoid an error.
9640    Use char because int might match the return type of a GCC
9641    builtin and then its argument prototype would still apply.  */
9642 #ifdef __cplusplus
9643 extern "C"
9644 #endif
9645 char gethostbyname_r ();
9646 int
9647 main ()
9648 {
9649 return gethostbyname_r ();
9650   ;
9651   return 0;
9652 }
9653 _ACEOF
9654 for ac_lib in '' nsl; do
9655   if test -z "$ac_lib"; then
9656     ac_res="none required"
9657   else
9658     ac_res=-l$ac_lib
9659     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9660   fi
9661   if ac_fn_c_try_link "$LINENO"; then :
9662   ac_cv_search_gethostbyname_r=$ac_res
9663 fi
9664 rm -f core conftest.err conftest.$ac_objext \
9665     conftest$ac_exeext
9666   if ${ac_cv_search_gethostbyname_r+:} false; then :
9667   break
9668 fi
9669 done
9670 if ${ac_cv_search_gethostbyname_r+:} false; then :
9671
9672 else
9673   ac_cv_search_gethostbyname_r=no
9674 fi
9675 rm conftest.$ac_ext
9676 LIBS=$ac_func_search_save_LIBS
9677 fi
9678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
9679 $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
9680 ac_res=$ac_cv_search_gethostbyname_r
9681 if test "$ac_res" != no; then :
9682   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9683
9684 fi
9685
9686 # Cygwin:
9687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
9688 $as_echo_n "checking for library containing shmget... " >&6; }
9689 if ${ac_cv_search_shmget+:} false; then :
9690   $as_echo_n "(cached) " >&6
9691 else
9692   ac_func_search_save_LIBS=$LIBS
9693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9694 /* end confdefs.h.  */
9695
9696 /* Override any GCC internal prototype to avoid an error.
9697    Use char because int might match the return type of a GCC
9698    builtin and then its argument prototype would still apply.  */
9699 #ifdef __cplusplus
9700 extern "C"
9701 #endif
9702 char shmget ();
9703 int
9704 main ()
9705 {
9706 return shmget ();
9707   ;
9708   return 0;
9709 }
9710 _ACEOF
9711 for ac_lib in '' cygipc; do
9712   if test -z "$ac_lib"; then
9713     ac_res="none required"
9714   else
9715     ac_res=-l$ac_lib
9716     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9717   fi
9718   if ac_fn_c_try_link "$LINENO"; then :
9719   ac_cv_search_shmget=$ac_res
9720 fi
9721 rm -f core conftest.err conftest.$ac_objext \
9722     conftest$ac_exeext
9723   if ${ac_cv_search_shmget+:} false; then :
9724   break
9725 fi
9726 done
9727 if ${ac_cv_search_shmget+:} false; then :
9728
9729 else
9730   ac_cv_search_shmget=no
9731 fi
9732 rm conftest.$ac_ext
9733 LIBS=$ac_func_search_save_LIBS
9734 fi
9735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
9736 $as_echo "$ac_cv_search_shmget" >&6; }
9737 ac_res=$ac_cv_search_shmget
9738 if test "$ac_res" != no; then :
9739   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9740
9741 fi
9742
9743
9744 if test "$with_readline" = yes; then
9745
9746
9747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
9748 $as_echo_n "checking for library containing readline... " >&6; }
9749 if ${pgac_cv_check_readline+:} false; then :
9750   $as_echo_n "(cached) " >&6
9751 else
9752   pgac_cv_check_readline=no
9753 pgac_save_LIBS=$LIBS
9754 if test x"$with_libedit_preferred" != x"yes"
9755 then    READLINE_ORDER="-lreadline -ledit"
9756 else    READLINE_ORDER="-ledit -lreadline"
9757 fi
9758 for pgac_rllib in $READLINE_ORDER ; do
9759   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
9760     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
9761     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9762 /* end confdefs.h.  */
9763
9764 /* Override any GCC internal prototype to avoid an error.
9765    Use char because int might match the return type of a GCC
9766    builtin and then its argument prototype would still apply.  */
9767 #ifdef __cplusplus
9768 extern "C"
9769 #endif
9770 char readline ();
9771 int
9772 main ()
9773 {
9774 return readline ();
9775   ;
9776   return 0;
9777 }
9778 _ACEOF
9779 if ac_fn_c_try_link "$LINENO"; then :
9780
9781       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
9782       # recognize dependent libraries; assume curses is needed if we didn't
9783       # find any dependency.
9784       case $host_os in
9785         netbsd* | openbsd* | irix*)
9786           if test x"$pgac_lib" = x"" ; then
9787             pgac_lib=" -lcurses"
9788           fi ;;
9789       esac
9790
9791       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
9792       break
9793
9794 fi
9795 rm -f core conftest.err conftest.$ac_objext \
9796     conftest$ac_exeext conftest.$ac_ext
9797   done
9798   if test "$pgac_cv_check_readline" != no ; then
9799     break
9800   fi
9801 done
9802 LIBS=$pgac_save_LIBS
9803
9804 fi
9805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
9806 $as_echo "$pgac_cv_check_readline" >&6; }
9807 if test "$pgac_cv_check_readline" != no ; then
9808   LIBS="$pgac_cv_check_readline $LIBS"
9809
9810 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
9811
9812 fi
9813
9814
9815   if test x"$pgac_cv_check_readline" = x"no"; then
9816     as_fn_error $? "readline library not found
9817 If you have readline already installed, see config.log for details on the
9818 failure.  It is possible the compiler isn't looking in the proper directory.
9819 Use --without-readline to disable readline support." "$LINENO" 5
9820   fi
9821 fi
9822
9823 if test "$with_zlib" = yes; then
9824   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
9825 $as_echo_n "checking for inflate in -lz... " >&6; }
9826 if ${ac_cv_lib_z_inflate+:} false; then :
9827   $as_echo_n "(cached) " >&6
9828 else
9829   ac_check_lib_save_LIBS=$LIBS
9830 LIBS="-lz  $LIBS"
9831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9832 /* end confdefs.h.  */
9833
9834 /* Override any GCC internal prototype to avoid an error.
9835    Use char because int might match the return type of a GCC
9836    builtin and then its argument prototype would still apply.  */
9837 #ifdef __cplusplus
9838 extern "C"
9839 #endif
9840 char inflate ();
9841 int
9842 main ()
9843 {
9844 return inflate ();
9845   ;
9846   return 0;
9847 }
9848 _ACEOF
9849 if ac_fn_c_try_link "$LINENO"; then :
9850   ac_cv_lib_z_inflate=yes
9851 else
9852   ac_cv_lib_z_inflate=no
9853 fi
9854 rm -f core conftest.err conftest.$ac_objext \
9855     conftest$ac_exeext conftest.$ac_ext
9856 LIBS=$ac_check_lib_save_LIBS
9857 fi
9858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
9859 $as_echo "$ac_cv_lib_z_inflate" >&6; }
9860 if test "x$ac_cv_lib_z_inflate" = xyes; then :
9861   cat >>confdefs.h <<_ACEOF
9862 #define HAVE_LIBZ 1
9863 _ACEOF
9864
9865   LIBS="-lz $LIBS"
9866
9867 else
9868   as_fn_error $? "zlib library not found
9869 If you have zlib already installed, see config.log for details on the
9870 failure.  It is possible the compiler isn't looking in the proper directory.
9871 Use --without-zlib to disable zlib support." "$LINENO" 5
9872 fi
9873
9874 fi
9875
9876 if test "$enable_spinlocks" = yes; then
9877
9878 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
9879
9880 else
9881   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9882 *** Not using spinlocks will cause poor performance." >&5
9883 $as_echo "$as_me: WARNING:
9884 *** Not using spinlocks will cause poor performance." >&2;}
9885 fi
9886
9887 if test "$enable_atomics" = yes; then
9888
9889 $as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
9890
9891 else
9892   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9893 *** Not using atomic operations will cause poor performance." >&5
9894 $as_echo "$as_me: WARNING:
9895 *** Not using atomic operations will cause poor performance." >&2;}
9896 fi
9897
9898 if test "$with_gssapi" = yes ; then
9899   if test "$PORTNAME" != "win32"; then
9900     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
9901 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
9902 if ${ac_cv_search_gss_init_sec_context+:} false; then :
9903   $as_echo_n "(cached) " >&6
9904 else
9905   ac_func_search_save_LIBS=$LIBS
9906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9907 /* end confdefs.h.  */
9908
9909 /* Override any GCC internal prototype to avoid an error.
9910    Use char because int might match the return type of a GCC
9911    builtin and then its argument prototype would still apply.  */
9912 #ifdef __cplusplus
9913 extern "C"
9914 #endif
9915 char gss_init_sec_context ();
9916 int
9917 main ()
9918 {
9919 return gss_init_sec_context ();
9920   ;
9921   return 0;
9922 }
9923 _ACEOF
9924 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
9925   if test -z "$ac_lib"; then
9926     ac_res="none required"
9927   else
9928     ac_res=-l$ac_lib
9929     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9930   fi
9931   if ac_fn_c_try_link "$LINENO"; then :
9932   ac_cv_search_gss_init_sec_context=$ac_res
9933 fi
9934 rm -f core conftest.err conftest.$ac_objext \
9935     conftest$ac_exeext
9936   if ${ac_cv_search_gss_init_sec_context+:} false; then :
9937   break
9938 fi
9939 done
9940 if ${ac_cv_search_gss_init_sec_context+:} false; then :
9941
9942 else
9943   ac_cv_search_gss_init_sec_context=no
9944 fi
9945 rm conftest.$ac_ext
9946 LIBS=$ac_func_search_save_LIBS
9947 fi
9948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
9949 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
9950 ac_res=$ac_cv_search_gss_init_sec_context
9951 if test "$ac_res" != no; then :
9952   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9953
9954 else
9955   as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
9956 fi
9957
9958   else
9959     LIBS="$LIBS -lgssapi32"
9960   fi
9961 fi
9962
9963 if test "$with_openssl" = yes ; then
9964     if test "$PORTNAME" != "win32"; then
9965      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
9966 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
9967 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
9968   $as_echo_n "(cached) " >&6
9969 else
9970   ac_check_lib_save_LIBS=$LIBS
9971 LIBS="-lcrypto  $LIBS"
9972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9973 /* end confdefs.h.  */
9974
9975 /* Override any GCC internal prototype to avoid an error.
9976    Use char because int might match the return type of a GCC
9977    builtin and then its argument prototype would still apply.  */
9978 #ifdef __cplusplus
9979 extern "C"
9980 #endif
9981 char CRYPTO_new_ex_data ();
9982 int
9983 main ()
9984 {
9985 return CRYPTO_new_ex_data ();
9986   ;
9987   return 0;
9988 }
9989 _ACEOF
9990 if ac_fn_c_try_link "$LINENO"; then :
9991   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
9992 else
9993   ac_cv_lib_crypto_CRYPTO_new_ex_data=no
9994 fi
9995 rm -f core conftest.err conftest.$ac_objext \
9996     conftest$ac_exeext conftest.$ac_ext
9997 LIBS=$ac_check_lib_save_LIBS
9998 fi
9999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
10000 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
10001 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
10002   cat >>confdefs.h <<_ACEOF
10003 #define HAVE_LIBCRYPTO 1
10004 _ACEOF
10005
10006   LIBS="-lcrypto $LIBS"
10007
10008 else
10009   as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
10010 fi
10011
10012      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
10013 $as_echo_n "checking for SSL_new in -lssl... " >&6; }
10014 if ${ac_cv_lib_ssl_SSL_new+:} false; then :
10015   $as_echo_n "(cached) " >&6
10016 else
10017   ac_check_lib_save_LIBS=$LIBS
10018 LIBS="-lssl  $LIBS"
10019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10020 /* end confdefs.h.  */
10021
10022 /* Override any GCC internal prototype to avoid an error.
10023    Use char because int might match the return type of a GCC
10024    builtin and then its argument prototype would still apply.  */
10025 #ifdef __cplusplus
10026 extern "C"
10027 #endif
10028 char SSL_new ();
10029 int
10030 main ()
10031 {
10032 return SSL_new ();
10033   ;
10034   return 0;
10035 }
10036 _ACEOF
10037 if ac_fn_c_try_link "$LINENO"; then :
10038   ac_cv_lib_ssl_SSL_new=yes
10039 else
10040   ac_cv_lib_ssl_SSL_new=no
10041 fi
10042 rm -f core conftest.err conftest.$ac_objext \
10043     conftest$ac_exeext conftest.$ac_ext
10044 LIBS=$ac_check_lib_save_LIBS
10045 fi
10046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
10047 $as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
10048 if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
10049   cat >>confdefs.h <<_ACEOF
10050 #define HAVE_LIBSSL 1
10051 _ACEOF
10052
10053   LIBS="-lssl $LIBS"
10054
10055 else
10056   as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
10057 fi
10058
10059   else
10060      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
10061 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
10062 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
10063   $as_echo_n "(cached) " >&6
10064 else
10065   ac_func_search_save_LIBS=$LIBS
10066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10067 /* end confdefs.h.  */
10068
10069 /* Override any GCC internal prototype to avoid an error.
10070    Use char because int might match the return type of a GCC
10071    builtin and then its argument prototype would still apply.  */
10072 #ifdef __cplusplus
10073 extern "C"
10074 #endif
10075 char CRYPTO_new_ex_data ();
10076 int
10077 main ()
10078 {
10079 return CRYPTO_new_ex_data ();
10080   ;
10081   return 0;
10082 }
10083 _ACEOF
10084 for ac_lib in '' eay32 crypto; do
10085   if test -z "$ac_lib"; then
10086     ac_res="none required"
10087   else
10088     ac_res=-l$ac_lib
10089     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10090   fi
10091   if ac_fn_c_try_link "$LINENO"; then :
10092   ac_cv_search_CRYPTO_new_ex_data=$ac_res
10093 fi
10094 rm -f core conftest.err conftest.$ac_objext \
10095     conftest$ac_exeext
10096   if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
10097   break
10098 fi
10099 done
10100 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
10101
10102 else
10103   ac_cv_search_CRYPTO_new_ex_data=no
10104 fi
10105 rm conftest.$ac_ext
10106 LIBS=$ac_func_search_save_LIBS
10107 fi
10108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
10109 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
10110 ac_res=$ac_cv_search_CRYPTO_new_ex_data
10111 if test "$ac_res" != no; then :
10112   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10113
10114 else
10115   as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
10116 fi
10117
10118      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
10119 $as_echo_n "checking for library containing SSL_new... " >&6; }
10120 if ${ac_cv_search_SSL_new+:} false; then :
10121   $as_echo_n "(cached) " >&6
10122 else
10123   ac_func_search_save_LIBS=$LIBS
10124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10125 /* end confdefs.h.  */
10126
10127 /* Override any GCC internal prototype to avoid an error.
10128    Use char because int might match the return type of a GCC
10129    builtin and then its argument prototype would still apply.  */
10130 #ifdef __cplusplus
10131 extern "C"
10132 #endif
10133 char SSL_new ();
10134 int
10135 main ()
10136 {
10137 return SSL_new ();
10138   ;
10139   return 0;
10140 }
10141 _ACEOF
10142 for ac_lib in '' ssleay32 ssl; do
10143   if test -z "$ac_lib"; then
10144     ac_res="none required"
10145   else
10146     ac_res=-l$ac_lib
10147     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10148   fi
10149   if ac_fn_c_try_link "$LINENO"; then :
10150   ac_cv_search_SSL_new=$ac_res
10151 fi
10152 rm -f core conftest.err conftest.$ac_objext \
10153     conftest$ac_exeext
10154   if ${ac_cv_search_SSL_new+:} false; then :
10155   break
10156 fi
10157 done
10158 if ${ac_cv_search_SSL_new+:} false; then :
10159
10160 else
10161   ac_cv_search_SSL_new=no
10162 fi
10163 rm conftest.$ac_ext
10164 LIBS=$ac_func_search_save_LIBS
10165 fi
10166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
10167 $as_echo "$ac_cv_search_SSL_new" >&6; }
10168 ac_res=$ac_cv_search_SSL_new
10169 if test "$ac_res" != no; then :
10170   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10171
10172 else
10173   as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
10174 fi
10175
10176   fi
10177   for ac_func in SSL_get_current_compression
10178 do :
10179   ac_fn_c_check_func "$LINENO" "SSL_get_current_compression" "ac_cv_func_SSL_get_current_compression"
10180 if test "x$ac_cv_func_SSL_get_current_compression" = xyes; then :
10181   cat >>confdefs.h <<_ACEOF
10182 #define HAVE_SSL_GET_CURRENT_COMPRESSION 1
10183 _ACEOF
10184
10185 fi
10186 done
10187
10188   # Functions introduced in OpenSSL 1.1.0. We used to check for
10189   # OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
10190   # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
10191   # doesn't have these OpenSSL 1.1.0 functions. So check for individual
10192   # functions.
10193   for ac_func in OPENSSL_init_ssl BIO_get_data BIO_meth_new ASN1_STRING_get0_data RAND_OpenSSL
10194 do :
10195   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10196 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10197 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10198   cat >>confdefs.h <<_ACEOF
10199 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10200 _ACEOF
10201
10202 fi
10203 done
10204
10205   # OpenSSL versions before 1.1.0 required setting callback functions, for
10206   # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
10207   # function was removed.
10208   for ac_func in CRYPTO_lock
10209 do :
10210   ac_fn_c_check_func "$LINENO" "CRYPTO_lock" "ac_cv_func_CRYPTO_lock"
10211 if test "x$ac_cv_func_CRYPTO_lock" = xyes; then :
10212   cat >>confdefs.h <<_ACEOF
10213 #define HAVE_CRYPTO_LOCK 1
10214 _ACEOF
10215
10216 fi
10217 done
10218
10219 fi
10220
10221 if test "$with_pam" = yes ; then
10222   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
10223 $as_echo_n "checking for pam_start in -lpam... " >&6; }
10224 if ${ac_cv_lib_pam_pam_start+:} false; then :
10225   $as_echo_n "(cached) " >&6
10226 else
10227   ac_check_lib_save_LIBS=$LIBS
10228 LIBS="-lpam  $LIBS"
10229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10230 /* end confdefs.h.  */
10231
10232 /* Override any GCC internal prototype to avoid an error.
10233    Use char because int might match the return type of a GCC
10234    builtin and then its argument prototype would still apply.  */
10235 #ifdef __cplusplus
10236 extern "C"
10237 #endif
10238 char pam_start ();
10239 int
10240 main ()
10241 {
10242 return pam_start ();
10243   ;
10244   return 0;
10245 }
10246 _ACEOF
10247 if ac_fn_c_try_link "$LINENO"; then :
10248   ac_cv_lib_pam_pam_start=yes
10249 else
10250   ac_cv_lib_pam_pam_start=no
10251 fi
10252 rm -f core conftest.err conftest.$ac_objext \
10253     conftest$ac_exeext conftest.$ac_ext
10254 LIBS=$ac_check_lib_save_LIBS
10255 fi
10256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
10257 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
10258 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
10259   cat >>confdefs.h <<_ACEOF
10260 #define HAVE_LIBPAM 1
10261 _ACEOF
10262
10263   LIBS="-lpam $LIBS"
10264
10265 else
10266   as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
10267 fi
10268
10269 fi
10270
10271 if test "$with_libxml" = yes ; then
10272   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
10273 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
10274 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
10275   $as_echo_n "(cached) " >&6
10276 else
10277   ac_check_lib_save_LIBS=$LIBS
10278 LIBS="-lxml2  $LIBS"
10279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10280 /* end confdefs.h.  */
10281
10282 /* Override any GCC internal prototype to avoid an error.
10283    Use char because int might match the return type of a GCC
10284    builtin and then its argument prototype would still apply.  */
10285 #ifdef __cplusplus
10286 extern "C"
10287 #endif
10288 char xmlSaveToBuffer ();
10289 int
10290 main ()
10291 {
10292 return xmlSaveToBuffer ();
10293   ;
10294   return 0;
10295 }
10296 _ACEOF
10297 if ac_fn_c_try_link "$LINENO"; then :
10298   ac_cv_lib_xml2_xmlSaveToBuffer=yes
10299 else
10300   ac_cv_lib_xml2_xmlSaveToBuffer=no
10301 fi
10302 rm -f core conftest.err conftest.$ac_objext \
10303     conftest$ac_exeext conftest.$ac_ext
10304 LIBS=$ac_check_lib_save_LIBS
10305 fi
10306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
10307 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
10308 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
10309   cat >>confdefs.h <<_ACEOF
10310 #define HAVE_LIBXML2 1
10311 _ACEOF
10312
10313   LIBS="-lxml2 $LIBS"
10314
10315 else
10316   as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
10317 fi
10318
10319 fi
10320
10321 if test "$with_libxslt" = yes ; then
10322   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
10323 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
10324 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
10325   $as_echo_n "(cached) " >&6
10326 else
10327   ac_check_lib_save_LIBS=$LIBS
10328 LIBS="-lxslt  $LIBS"
10329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10330 /* end confdefs.h.  */
10331
10332 /* Override any GCC internal prototype to avoid an error.
10333    Use char because int might match the return type of a GCC
10334    builtin and then its argument prototype would still apply.  */
10335 #ifdef __cplusplus
10336 extern "C"
10337 #endif
10338 char xsltCleanupGlobals ();
10339 int
10340 main ()
10341 {
10342 return xsltCleanupGlobals ();
10343   ;
10344   return 0;
10345 }
10346 _ACEOF
10347 if ac_fn_c_try_link "$LINENO"; then :
10348   ac_cv_lib_xslt_xsltCleanupGlobals=yes
10349 else
10350   ac_cv_lib_xslt_xsltCleanupGlobals=no
10351 fi
10352 rm -f core conftest.err conftest.$ac_objext \
10353     conftest$ac_exeext conftest.$ac_ext
10354 LIBS=$ac_check_lib_save_LIBS
10355 fi
10356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
10357 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
10358 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
10359   cat >>confdefs.h <<_ACEOF
10360 #define HAVE_LIBXSLT 1
10361 _ACEOF
10362
10363   LIBS="-lxslt $LIBS"
10364
10365 else
10366   as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
10367 fi
10368
10369 fi
10370
10371 # Note: We can test for libldap_r only after we know PTHREAD_LIBS
10372 if test "$with_ldap" = yes ; then
10373   _LIBS="$LIBS"
10374   if test "$PORTNAME" != "win32"; then
10375     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
10376 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
10377 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
10378   $as_echo_n "(cached) " >&6
10379 else
10380   ac_check_lib_save_LIBS=$LIBS
10381 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
10382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10383 /* end confdefs.h.  */
10384
10385 /* Override any GCC internal prototype to avoid an error.
10386    Use char because int might match the return type of a GCC
10387    builtin and then its argument prototype would still apply.  */
10388 #ifdef __cplusplus
10389 extern "C"
10390 #endif
10391 char ldap_bind ();
10392 int
10393 main ()
10394 {
10395 return ldap_bind ();
10396   ;
10397   return 0;
10398 }
10399 _ACEOF
10400 if ac_fn_c_try_link "$LINENO"; then :
10401   ac_cv_lib_ldap_ldap_bind=yes
10402 else
10403   ac_cv_lib_ldap_ldap_bind=no
10404 fi
10405 rm -f core conftest.err conftest.$ac_objext \
10406     conftest$ac_exeext conftest.$ac_ext
10407 LIBS=$ac_check_lib_save_LIBS
10408 fi
10409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
10410 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
10411 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
10412   cat >>confdefs.h <<_ACEOF
10413 #define HAVE_LIBLDAP 1
10414 _ACEOF
10415
10416   LIBS="-lldap $LIBS"
10417
10418 else
10419   as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
10420 fi
10421
10422     LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
10423     if test "$enable_thread_safety" = yes; then
10424       # on some platforms ldap_r fails to link without PTHREAD_LIBS
10425       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_simple_bind in -lldap_r" >&5
10426 $as_echo_n "checking for ldap_simple_bind in -lldap_r... " >&6; }
10427 if ${ac_cv_lib_ldap_r_ldap_simple_bind+:} false; then :
10428   $as_echo_n "(cached) " >&6
10429 else
10430   ac_check_lib_save_LIBS=$LIBS
10431 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
10432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10433 /* end confdefs.h.  */
10434
10435 /* Override any GCC internal prototype to avoid an error.
10436    Use char because int might match the return type of a GCC
10437    builtin and then its argument prototype would still apply.  */
10438 #ifdef __cplusplus
10439 extern "C"
10440 #endif
10441 char ldap_simple_bind ();
10442 int
10443 main ()
10444 {
10445 return ldap_simple_bind ();
10446   ;
10447   return 0;
10448 }
10449 _ACEOF
10450 if ac_fn_c_try_link "$LINENO"; then :
10451   ac_cv_lib_ldap_r_ldap_simple_bind=yes
10452 else
10453   ac_cv_lib_ldap_r_ldap_simple_bind=no
10454 fi
10455 rm -f core conftest.err conftest.$ac_objext \
10456     conftest$ac_exeext conftest.$ac_ext
10457 LIBS=$ac_check_lib_save_LIBS
10458 fi
10459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
10460 $as_echo "$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
10461 if test "x$ac_cv_lib_ldap_r_ldap_simple_bind" = xyes; then :
10462   cat >>confdefs.h <<_ACEOF
10463 #define HAVE_LIBLDAP_R 1
10464 _ACEOF
10465
10466   LIBS="-lldap_r $LIBS"
10467
10468 else
10469   as_fn_error $? "library 'ldap_r' is required for LDAP" "$LINENO" 5
10470 fi
10471
10472       LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
10473     else
10474       LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
10475     fi
10476   else
10477     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
10478 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
10479 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
10480   $as_echo_n "(cached) " >&6
10481 else
10482   ac_check_lib_save_LIBS=$LIBS
10483 LIBS="-lwldap32  $LIBS"
10484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10485 /* end confdefs.h.  */
10486
10487 /* Override any GCC internal prototype to avoid an error.
10488    Use char because int might match the return type of a GCC
10489    builtin and then its argument prototype would still apply.  */
10490 #ifdef __cplusplus
10491 extern "C"
10492 #endif
10493 char ldap_bind ();
10494 int
10495 main ()
10496 {
10497 return ldap_bind ();
10498   ;
10499   return 0;
10500 }
10501 _ACEOF
10502 if ac_fn_c_try_link "$LINENO"; then :
10503   ac_cv_lib_wldap32_ldap_bind=yes
10504 else
10505   ac_cv_lib_wldap32_ldap_bind=no
10506 fi
10507 rm -f core conftest.err conftest.$ac_objext \
10508     conftest$ac_exeext conftest.$ac_ext
10509 LIBS=$ac_check_lib_save_LIBS
10510 fi
10511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
10512 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
10513 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
10514   cat >>confdefs.h <<_ACEOF
10515 #define HAVE_LIBWLDAP32 1
10516 _ACEOF
10517
10518   LIBS="-lwldap32 $LIBS"
10519
10520 else
10521   as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
10522 fi
10523
10524     LDAP_LIBS_FE="-lwldap32"
10525     LDAP_LIBS_BE="-lwldap32"
10526   fi
10527   LIBS="$_LIBS"
10528 fi
10529
10530
10531
10532 # for contrib/sepgsql
10533 if test "$with_selinux" = yes; then
10534   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
10535 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
10536 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
10537   $as_echo_n "(cached) " >&6
10538 else
10539   ac_check_lib_save_LIBS=$LIBS
10540 LIBS="-lselinux  $LIBS"
10541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10542 /* end confdefs.h.  */
10543
10544 /* Override any GCC internal prototype to avoid an error.
10545    Use char because int might match the return type of a GCC
10546    builtin and then its argument prototype would still apply.  */
10547 #ifdef __cplusplus
10548 extern "C"
10549 #endif
10550 char security_compute_create_name ();
10551 int
10552 main ()
10553 {
10554 return security_compute_create_name ();
10555   ;
10556   return 0;
10557 }
10558 _ACEOF
10559 if ac_fn_c_try_link "$LINENO"; then :
10560   ac_cv_lib_selinux_security_compute_create_name=yes
10561 else
10562   ac_cv_lib_selinux_security_compute_create_name=no
10563 fi
10564 rm -f core conftest.err conftest.$ac_objext \
10565     conftest$ac_exeext conftest.$ac_ext
10566 LIBS=$ac_check_lib_save_LIBS
10567 fi
10568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
10569 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
10570 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
10571   cat >>confdefs.h <<_ACEOF
10572 #define HAVE_LIBSELINUX 1
10573 _ACEOF
10574
10575   LIBS="-lselinux $LIBS"
10576
10577 else
10578   as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
10579 fi
10580
10581 fi
10582
10583 # for contrib/uuid-ossp
10584 if test "$with_uuid" = bsd ; then
10585   # On BSD, the UUID functions are in libc
10586   ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
10587 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
10588   UUID_LIBS=""
10589 else
10590   as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
10591 fi
10592
10593 elif test "$with_uuid" = e2fs ; then
10594   # On macOS, the UUID functions are in libc
10595   ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
10596 if test "x$ac_cv_func_uuid_generate" = xyes; then :
10597   UUID_LIBS=""
10598 else
10599   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
10600 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
10601 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
10602   $as_echo_n "(cached) " >&6
10603 else
10604   ac_check_lib_save_LIBS=$LIBS
10605 LIBS="-luuid  $LIBS"
10606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10607 /* end confdefs.h.  */
10608
10609 /* Override any GCC internal prototype to avoid an error.
10610    Use char because int might match the return type of a GCC
10611    builtin and then its argument prototype would still apply.  */
10612 #ifdef __cplusplus
10613 extern "C"
10614 #endif
10615 char uuid_generate ();
10616 int
10617 main ()
10618 {
10619 return uuid_generate ();
10620   ;
10621   return 0;
10622 }
10623 _ACEOF
10624 if ac_fn_c_try_link "$LINENO"; then :
10625   ac_cv_lib_uuid_uuid_generate=yes
10626 else
10627   ac_cv_lib_uuid_uuid_generate=no
10628 fi
10629 rm -f core conftest.err conftest.$ac_objext \
10630     conftest$ac_exeext conftest.$ac_ext
10631 LIBS=$ac_check_lib_save_LIBS
10632 fi
10633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
10634 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
10635 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
10636   UUID_LIBS="-luuid"
10637 else
10638   as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
10639 fi
10640
10641 fi
10642
10643 elif test "$with_uuid" = ossp ; then
10644   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
10645 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
10646 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
10647   $as_echo_n "(cached) " >&6
10648 else
10649   ac_check_lib_save_LIBS=$LIBS
10650 LIBS="-lossp-uuid  $LIBS"
10651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10652 /* end confdefs.h.  */
10653
10654 /* Override any GCC internal prototype to avoid an error.
10655    Use char because int might match the return type of a GCC
10656    builtin and then its argument prototype would still apply.  */
10657 #ifdef __cplusplus
10658 extern "C"
10659 #endif
10660 char uuid_export ();
10661 int
10662 main ()
10663 {
10664 return uuid_export ();
10665   ;
10666   return 0;
10667 }
10668 _ACEOF
10669 if ac_fn_c_try_link "$LINENO"; then :
10670   ac_cv_lib_ossp_uuid_uuid_export=yes
10671 else
10672   ac_cv_lib_ossp_uuid_uuid_export=no
10673 fi
10674 rm -f core conftest.err conftest.$ac_objext \
10675     conftest$ac_exeext conftest.$ac_ext
10676 LIBS=$ac_check_lib_save_LIBS
10677 fi
10678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
10679 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
10680 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
10681   UUID_LIBS="-lossp-uuid"
10682 else
10683   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
10684 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
10685 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
10686   $as_echo_n "(cached) " >&6
10687 else
10688   ac_check_lib_save_LIBS=$LIBS
10689 LIBS="-luuid  $LIBS"
10690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10691 /* end confdefs.h.  */
10692
10693 /* Override any GCC internal prototype to avoid an error.
10694    Use char because int might match the return type of a GCC
10695    builtin and then its argument prototype would still apply.  */
10696 #ifdef __cplusplus
10697 extern "C"
10698 #endif
10699 char uuid_export ();
10700 int
10701 main ()
10702 {
10703 return uuid_export ();
10704   ;
10705   return 0;
10706 }
10707 _ACEOF
10708 if ac_fn_c_try_link "$LINENO"; then :
10709   ac_cv_lib_uuid_uuid_export=yes
10710 else
10711   ac_cv_lib_uuid_uuid_export=no
10712 fi
10713 rm -f core conftest.err conftest.$ac_objext \
10714     conftest$ac_exeext conftest.$ac_ext
10715 LIBS=$ac_check_lib_save_LIBS
10716 fi
10717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
10718 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
10719 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
10720   UUID_LIBS="-luuid"
10721 else
10722   as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
10723 fi
10724
10725 fi
10726
10727 fi
10728
10729
10730
10731 ##
10732 ## Header files
10733 ##
10734
10735 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
10736 do :
10737   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10738 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10739 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10740   cat >>confdefs.h <<_ACEOF
10741 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10742 _ACEOF
10743
10744 fi
10745
10746 done
10747
10748
10749 # On BSD, test for net/if.h will fail unless sys/socket.h
10750 # is included first.
10751 for ac_header in net/if.h
10752 do :
10753   ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
10754 #include <sys/socket.h>
10755
10756 "
10757 if test "x$ac_cv_header_net_if_h" = xyes; then :
10758   cat >>confdefs.h <<_ACEOF
10759 #define HAVE_NET_IF_H 1
10760 _ACEOF
10761
10762 fi
10763
10764 done
10765
10766
10767 # On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
10768 # is included first.
10769 for ac_header in sys/ucred.h
10770 do :
10771   ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
10772 #include <sys/param.h>
10773
10774 "
10775 if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
10776   cat >>confdefs.h <<_ACEOF
10777 #define HAVE_SYS_UCRED_H 1
10778 _ACEOF
10779
10780 fi
10781
10782 done
10783
10784
10785 # At least on IRIX, test for netinet/tcp.h will fail unless
10786 # netinet/in.h is included first.
10787 for ac_header in netinet/tcp.h
10788 do :
10789   ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
10790 #include <netinet/in.h>
10791
10792 "
10793 if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
10794   cat >>confdefs.h <<_ACEOF
10795 #define HAVE_NETINET_TCP_H 1
10796 _ACEOF
10797
10798 fi
10799
10800 done
10801
10802
10803 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
10804   for ac_header in readline/readline.h
10805 do :
10806   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
10807 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
10808   cat >>confdefs.h <<_ACEOF
10809 #define HAVE_READLINE_READLINE_H 1
10810 _ACEOF
10811
10812 else
10813   for ac_header in readline.h
10814 do :
10815   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
10816 if test "x$ac_cv_header_readline_h" = xyes; then :
10817   cat >>confdefs.h <<_ACEOF
10818 #define HAVE_READLINE_H 1
10819 _ACEOF
10820
10821 else
10822   as_fn_error $? "readline header not found
10823 If you have readline already installed, see config.log for details on the
10824 failure.  It is possible the compiler isn't looking in the proper directory.
10825 Use --without-readline to disable readline support." "$LINENO" 5
10826 fi
10827
10828 done
10829
10830 fi
10831
10832 done
10833
10834   for ac_header in readline/history.h
10835 do :
10836   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
10837 if test "x$ac_cv_header_readline_history_h" = xyes; then :
10838   cat >>confdefs.h <<_ACEOF
10839 #define HAVE_READLINE_HISTORY_H 1
10840 _ACEOF
10841
10842 else
10843   for ac_header in history.h
10844 do :
10845   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
10846 if test "x$ac_cv_header_history_h" = xyes; then :
10847   cat >>confdefs.h <<_ACEOF
10848 #define HAVE_HISTORY_H 1
10849 _ACEOF
10850
10851 else
10852   as_fn_error $? "history header not found
10853 If you have readline already installed, see config.log for details on the
10854 failure.  It is possible the compiler isn't looking in the proper directory.
10855 Use --without-readline to disable readline support." "$LINENO" 5
10856 fi
10857
10858 done
10859
10860 fi
10861
10862 done
10863
10864 fi
10865
10866 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
10867 # Some installations of libedit usurp /usr/include/readline/, which seems
10868 # bad practice, since in combined installations readline will have its headers
10869 # there.  We might have to resort to AC_EGREP checks to make sure we found
10870 # the proper header...
10871   for ac_header in editline/readline.h
10872 do :
10873   ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
10874 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
10875   cat >>confdefs.h <<_ACEOF
10876 #define HAVE_EDITLINE_READLINE_H 1
10877 _ACEOF
10878
10879 else
10880   for ac_header in readline.h
10881 do :
10882   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
10883 if test "x$ac_cv_header_readline_h" = xyes; then :
10884   cat >>confdefs.h <<_ACEOF
10885 #define HAVE_READLINE_H 1
10886 _ACEOF
10887
10888 else
10889   for ac_header in readline/readline.h
10890 do :
10891   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
10892 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
10893   cat >>confdefs.h <<_ACEOF
10894 #define HAVE_READLINE_READLINE_H 1
10895 _ACEOF
10896
10897 else
10898   as_fn_error $? "readline header not found
10899 If you have libedit already installed, see config.log for details on the
10900 failure.  It is possible the compiler isn't looking in the proper directory.
10901 Use --without-readline to disable libedit support." "$LINENO" 5
10902 fi
10903
10904 done
10905
10906 fi
10907
10908 done
10909
10910 fi
10911
10912 done
10913
10914 # Note: in a libedit installation, history.h is sometimes a dummy, and may
10915 # not be there at all.  Hence, don't complain if not found.  We must check
10916 # though, since in yet other versions it is an independent header.
10917   for ac_header in editline/history.h
10918 do :
10919   ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
10920 if test "x$ac_cv_header_editline_history_h" = xyes; then :
10921   cat >>confdefs.h <<_ACEOF
10922 #define HAVE_EDITLINE_HISTORY_H 1
10923 _ACEOF
10924
10925 else
10926   for ac_header in history.h
10927 do :
10928   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
10929 if test "x$ac_cv_header_history_h" = xyes; then :
10930   cat >>confdefs.h <<_ACEOF
10931 #define HAVE_HISTORY_H 1
10932 _ACEOF
10933
10934 else
10935   for ac_header in readline/history.h
10936 do :
10937   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
10938 if test "x$ac_cv_header_readline_history_h" = xyes; then :
10939   cat >>confdefs.h <<_ACEOF
10940 #define HAVE_READLINE_HISTORY_H 1
10941 _ACEOF
10942
10943 fi
10944
10945 done
10946
10947 fi
10948
10949 done
10950
10951 fi
10952
10953 done
10954
10955 fi
10956
10957 if test "$with_zlib" = yes; then
10958   ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
10959 if test "x$ac_cv_header_zlib_h" = xyes; then :
10960
10961 else
10962   as_fn_error $? "zlib header not found
10963 If you have zlib already installed, see config.log for details on the
10964 failure.  It is possible the compiler isn't looking in the proper directory.
10965 Use --without-zlib to disable zlib support." "$LINENO" 5
10966 fi
10967
10968
10969 fi
10970
10971 if test "$with_gssapi" = yes ; then
10972   for ac_header in gssapi/gssapi.h
10973 do :
10974   ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
10975 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
10976   cat >>confdefs.h <<_ACEOF
10977 #define HAVE_GSSAPI_GSSAPI_H 1
10978 _ACEOF
10979
10980 else
10981   for ac_header in gssapi.h
10982 do :
10983   ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
10984 if test "x$ac_cv_header_gssapi_h" = xyes; then :
10985   cat >>confdefs.h <<_ACEOF
10986 #define HAVE_GSSAPI_H 1
10987 _ACEOF
10988
10989 else
10990   as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
10991 fi
10992
10993 done
10994
10995 fi
10996
10997 done
10998
10999 fi
11000
11001 if test "$with_openssl" = yes ; then
11002   ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
11003 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
11004
11005 else
11006   as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
11007 fi
11008
11009
11010   ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
11011 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
11012
11013 else
11014   as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
11015 fi
11016
11017
11018 fi
11019
11020 if test "$with_pam" = yes ; then
11021   for ac_header in security/pam_appl.h
11022 do :
11023   ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
11024 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
11025   cat >>confdefs.h <<_ACEOF
11026 #define HAVE_SECURITY_PAM_APPL_H 1
11027 _ACEOF
11028
11029 else
11030   for ac_header in pam/pam_appl.h
11031 do :
11032   ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
11033 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
11034   cat >>confdefs.h <<_ACEOF
11035 #define HAVE_PAM_PAM_APPL_H 1
11036 _ACEOF
11037
11038 else
11039   as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
11040 fi
11041
11042 done
11043
11044 fi
11045
11046 done
11047
11048 fi
11049
11050 if test "$with_bsd_auth" = yes ; then
11051   ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
11052 if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
11053
11054 else
11055   as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
11056 fi
11057
11058
11059 fi
11060
11061 if test "$with_systemd" = yes ; then
11062   ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
11063 if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
11064
11065 else
11066   as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
11067 fi
11068
11069
11070 fi
11071
11072 if test "$with_libxml" = yes ; then
11073   ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
11074 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
11075
11076 else
11077   as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
11078 fi
11079
11080
11081 fi
11082
11083 if test "$with_libxslt" = yes ; then
11084   ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
11085 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
11086
11087 else
11088   as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
11089 fi
11090
11091
11092 fi
11093
11094 if test "$with_ldap" = yes ; then
11095   if test "$PORTNAME" != "win32"; then
11096      for ac_header in ldap.h
11097 do :
11098   ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
11099 if test "x$ac_cv_header_ldap_h" = xyes; then :
11100   cat >>confdefs.h <<_ACEOF
11101 #define HAVE_LDAP_H 1
11102 _ACEOF
11103
11104 else
11105   as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
11106 fi
11107
11108 done
11109
11110      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
11111 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
11112 if ${pgac_cv_ldap_safe+:} false; then :
11113   $as_echo_n "(cached) " >&6
11114 else
11115   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11116 /* end confdefs.h.  */
11117 #include <ldap.h>
11118 #if !defined(LDAP_VENDOR_VERSION) || \
11119      (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
11120       LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
11121 choke me
11122 #endif
11123 int
11124 main ()
11125 {
11126
11127   ;
11128   return 0;
11129 }
11130 _ACEOF
11131 if ac_fn_c_try_compile "$LINENO"; then :
11132   pgac_cv_ldap_safe=yes
11133 else
11134   pgac_cv_ldap_safe=no
11135 fi
11136 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11137 fi
11138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
11139 $as_echo "$pgac_cv_ldap_safe" >&6; }
11140
11141 if test "$pgac_cv_ldap_safe" != yes; then
11142   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
11143 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
11144 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
11145 *** also uses LDAP will crash on exit." >&5
11146 $as_echo "$as_me: WARNING:
11147 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
11148 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
11149 *** also uses LDAP will crash on exit." >&2;}
11150 fi
11151   else
11152      for ac_header in winldap.h
11153 do :
11154   ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
11155 #include <windows.h>
11156
11157 "
11158 if test "x$ac_cv_header_winldap_h" = xyes; then :
11159   cat >>confdefs.h <<_ACEOF
11160 #define HAVE_WINLDAP_H 1
11161 _ACEOF
11162
11163 else
11164   as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
11165 fi
11166
11167 done
11168
11169   fi
11170 fi
11171
11172 if test "$with_bonjour" = yes ; then
11173   ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
11174 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
11175
11176 else
11177   as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
11178 fi
11179
11180
11181 fi
11182
11183 # for contrib/uuid-ossp
11184 if test "$with_uuid" = bsd ; then
11185   for ac_header in uuid.h
11186 do :
11187   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
11188 if test "x$ac_cv_header_uuid_h" = xyes; then :
11189   cat >>confdefs.h <<_ACEOF
11190 #define HAVE_UUID_H 1
11191 _ACEOF
11192  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11193 /* end confdefs.h.  */
11194 #include <uuid.h>
11195
11196 _ACEOF
11197 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11198   $EGREP "uuid_to_string" >/dev/null 2>&1; then :
11199
11200 else
11201   as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
11202 fi
11203 rm -f conftest*
11204
11205 else
11206   as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
11207 fi
11208
11209 done
11210
11211 elif test "$with_uuid" = e2fs ; then
11212   for ac_header in uuid/uuid.h
11213 do :
11214   ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
11215 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
11216   cat >>confdefs.h <<_ACEOF
11217 #define HAVE_UUID_UUID_H 1
11218 _ACEOF
11219  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11220 /* end confdefs.h.  */
11221 #include <uuid/uuid.h>
11222
11223 _ACEOF
11224 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11225   $EGREP "uuid_generate" >/dev/null 2>&1; then :
11226
11227 else
11228   as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
11229 fi
11230 rm -f conftest*
11231
11232 else
11233   for ac_header in uuid.h
11234 do :
11235   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
11236 if test "x$ac_cv_header_uuid_h" = xyes; then :
11237   cat >>confdefs.h <<_ACEOF
11238 #define HAVE_UUID_H 1
11239 _ACEOF
11240  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11241 /* end confdefs.h.  */
11242 #include <uuid.h>
11243
11244 _ACEOF
11245 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11246   $EGREP "uuid_generate" >/dev/null 2>&1; then :
11247
11248 else
11249   as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
11250 fi
11251 rm -f conftest*
11252
11253 else
11254   as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
11255 fi
11256
11257 done
11258
11259 fi
11260
11261 done
11262
11263 elif test "$with_uuid" = ossp ; then
11264   for ac_header in ossp/uuid.h
11265 do :
11266   ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
11267 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
11268   cat >>confdefs.h <<_ACEOF
11269 #define HAVE_OSSP_UUID_H 1
11270 _ACEOF
11271  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11272 /* end confdefs.h.  */
11273 #include <ossp/uuid.h>
11274
11275 _ACEOF
11276 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11277   $EGREP "uuid_export" >/dev/null 2>&1; then :
11278
11279 else
11280   as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
11281 fi
11282 rm -f conftest*
11283
11284 else
11285   for ac_header in uuid.h
11286 do :
11287   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
11288 if test "x$ac_cv_header_uuid_h" = xyes; then :
11289   cat >>confdefs.h <<_ACEOF
11290 #define HAVE_UUID_H 1
11291 _ACEOF
11292  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11293 /* end confdefs.h.  */
11294 #include <uuid.h>
11295
11296 _ACEOF
11297 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11298   $EGREP "uuid_export" >/dev/null 2>&1; then :
11299
11300 else
11301   as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
11302 fi
11303 rm -f conftest*
11304
11305 else
11306   as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
11307 fi
11308
11309 done
11310
11311 fi
11312
11313 done
11314
11315 fi
11316
11317 if test "$PORTNAME" = "win32" ; then
11318    for ac_header in crtdefs.h
11319 do :
11320   ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
11321 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
11322   cat >>confdefs.h <<_ACEOF
11323 #define HAVE_CRTDEFS_H 1
11324 _ACEOF
11325
11326 fi
11327
11328 done
11329
11330 fi
11331
11332 ##
11333 ## Types, structures, compiler characteristics
11334 ##
11335
11336   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
11337 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
11338 if ${ac_cv_c_bigendian+:} false; then :
11339   $as_echo_n "(cached) " >&6
11340 else
11341   ac_cv_c_bigendian=unknown
11342     # See if we're dealing with a universal compiler.
11343     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11344 /* end confdefs.h.  */
11345 #ifndef __APPLE_CC__
11346                not a universal capable compiler
11347              #endif
11348              typedef int dummy;
11349
11350 _ACEOF
11351 if ac_fn_c_try_compile "$LINENO"; then :
11352
11353         # Check for potential -arch flags.  It is not universal unless
11354         # there are at least two -arch flags with different values.
11355         ac_arch=
11356         ac_prev=
11357         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11358          if test -n "$ac_prev"; then
11359            case $ac_word in
11360              i?86 | x86_64 | ppc | ppc64)
11361                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11362                  ac_arch=$ac_word
11363                else
11364                  ac_cv_c_bigendian=universal
11365                  break
11366                fi
11367                ;;
11368            esac
11369            ac_prev=
11370          elif test "x$ac_word" = "x-arch"; then
11371            ac_prev=arch
11372          fi
11373        done
11374 fi
11375 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11376     if test $ac_cv_c_bigendian = unknown; then
11377       # See if sys/param.h defines the BYTE_ORDER macro.
11378       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11379 /* end confdefs.h.  */
11380 #include <sys/types.h>
11381              #include <sys/param.h>
11382
11383 int
11384 main ()
11385 {
11386 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11387                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11388                      && LITTLE_ENDIAN)
11389               bogus endian macros
11390              #endif
11391
11392   ;
11393   return 0;
11394 }
11395 _ACEOF
11396 if ac_fn_c_try_compile "$LINENO"; then :
11397   # It does; now see whether it defined to BIG_ENDIAN or not.
11398          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11399 /* end confdefs.h.  */
11400 #include <sys/types.h>
11401                 #include <sys/param.h>
11402
11403 int
11404 main ()
11405 {
11406 #if BYTE_ORDER != BIG_ENDIAN
11407                  not big endian
11408                 #endif
11409
11410   ;
11411   return 0;
11412 }
11413 _ACEOF
11414 if ac_fn_c_try_compile "$LINENO"; then :
11415   ac_cv_c_bigendian=yes
11416 else
11417   ac_cv_c_bigendian=no
11418 fi
11419 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11420 fi
11421 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11422     fi
11423     if test $ac_cv_c_bigendian = unknown; then
11424       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11425       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11426 /* end confdefs.h.  */
11427 #include <limits.h>
11428
11429 int
11430 main ()
11431 {
11432 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11433               bogus endian macros
11434              #endif
11435
11436   ;
11437   return 0;
11438 }
11439 _ACEOF
11440 if ac_fn_c_try_compile "$LINENO"; then :
11441   # It does; now see whether it defined to _BIG_ENDIAN or not.
11442          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11443 /* end confdefs.h.  */
11444 #include <limits.h>
11445
11446 int
11447 main ()
11448 {
11449 #ifndef _BIG_ENDIAN
11450                  not big endian
11451                 #endif
11452
11453   ;
11454   return 0;
11455 }
11456 _ACEOF
11457 if ac_fn_c_try_compile "$LINENO"; then :
11458   ac_cv_c_bigendian=yes
11459 else
11460   ac_cv_c_bigendian=no
11461 fi
11462 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11463 fi
11464 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11465     fi
11466     if test $ac_cv_c_bigendian = unknown; then
11467       # Compile a test program.
11468       if test "$cross_compiling" = yes; then :
11469   # Try to guess by grepping values from an object file.
11470          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11471 /* end confdefs.h.  */
11472 short int ascii_mm[] =
11473                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
11474                 short int ascii_ii[] =
11475                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
11476                 int use_ascii (int i) {
11477                   return ascii_mm[i] + ascii_ii[i];
11478                 }
11479                 short int ebcdic_ii[] =
11480                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
11481                 short int ebcdic_mm[] =
11482                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
11483                 int use_ebcdic (int i) {
11484                   return ebcdic_mm[i] + ebcdic_ii[i];
11485                 }
11486                 extern int foo;
11487
11488 int
11489 main ()
11490 {
11491 return use_ascii (foo) == use_ebcdic (foo);
11492   ;
11493   return 0;
11494 }
11495 _ACEOF
11496 if ac_fn_c_try_compile "$LINENO"; then :
11497   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
11498               ac_cv_c_bigendian=yes
11499             fi
11500             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
11501               if test "$ac_cv_c_bigendian" = unknown; then
11502                 ac_cv_c_bigendian=no
11503               else
11504                 # finding both strings is unlikely to happen, but who knows?
11505                 ac_cv_c_bigendian=unknown
11506               fi
11507             fi
11508 fi
11509 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11510 else
11511   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11512 /* end confdefs.h.  */
11513 $ac_includes_default
11514 int
11515 main ()
11516 {
11517
11518              /* Are we little or big endian?  From Harbison&Steele.  */
11519              union
11520              {
11521                long int l;
11522                char c[sizeof (long int)];
11523              } u;
11524              u.l = 1;
11525              return u.c[sizeof (long int) - 1] == 1;
11526
11527   ;
11528   return 0;
11529 }
11530 _ACEOF
11531 if ac_fn_c_try_run "$LINENO"; then :
11532   ac_cv_c_bigendian=no
11533 else
11534   ac_cv_c_bigendian=yes
11535 fi
11536 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11537   conftest.$ac_objext conftest.beam conftest.$ac_ext
11538 fi
11539
11540     fi
11541 fi
11542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
11543 $as_echo "$ac_cv_c_bigendian" >&6; }
11544  case $ac_cv_c_bigendian in #(
11545    yes)
11546      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
11547 ;; #(
11548    no)
11549       ;; #(
11550    universal)
11551
11552 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
11553
11554      ;; #(
11555    *)
11556      as_fn_error $? "unknown endianness
11557  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
11558  esac
11559
11560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
11561 $as_echo_n "checking for inline... " >&6; }
11562 if ${ac_cv_c_inline+:} false; then :
11563   $as_echo_n "(cached) " >&6
11564 else
11565   ac_cv_c_inline=no
11566 for ac_kw in inline __inline__ __inline; do
11567   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11568 /* end confdefs.h.  */
11569 #ifndef __cplusplus
11570 typedef int foo_t;
11571 static $ac_kw foo_t static_foo () {return 0; }
11572 $ac_kw foo_t foo () {return 0; }
11573 #endif
11574
11575 _ACEOF
11576 if ac_fn_c_try_compile "$LINENO"; then :
11577   ac_cv_c_inline=$ac_kw
11578 fi
11579 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11580   test "$ac_cv_c_inline" != no && break
11581 done
11582
11583 fi
11584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
11585 $as_echo "$ac_cv_c_inline" >&6; }
11586
11587 case $ac_cv_c_inline in
11588   inline | yes) ;;
11589   *)
11590     case $ac_cv_c_inline in
11591       no) ac_val=;;
11592       *) ac_val=$ac_cv_c_inline;;
11593     esac
11594     cat >>confdefs.h <<_ACEOF
11595 #ifndef __cplusplus
11596 #define inline $ac_val
11597 #endif
11598 _ACEOF
11599     ;;
11600 esac
11601
11602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
11603 $as_echo_n "checking for printf format archetype... " >&6; }
11604 if ${pgac_cv_printf_archetype+:} false; then :
11605   $as_echo_n "(cached) " >&6
11606 else
11607   ac_save_c_werror_flag=$ac_c_werror_flag
11608 ac_c_werror_flag=yes
11609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11610 /* end confdefs.h.  */
11611 extern int
11612 pgac_write(int ignore, const char *fmt,...)
11613 __attribute__((format(gnu_printf, 2, 3)));
11614 int
11615 main ()
11616 {
11617
11618   ;
11619   return 0;
11620 }
11621 _ACEOF
11622 if ac_fn_c_try_compile "$LINENO"; then :
11623   pgac_cv_printf_archetype=gnu_printf
11624 else
11625   pgac_cv_printf_archetype=printf
11626 fi
11627 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11628 ac_c_werror_flag=$ac_save_c_werror_flag
11629 fi
11630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
11631 $as_echo "$pgac_cv_printf_archetype" >&6; }
11632
11633 cat >>confdefs.h <<_ACEOF
11634 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
11635 _ACEOF
11636
11637
11638
11639   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array members" >&5
11640 $as_echo_n "checking for flexible array members... " >&6; }
11641 if ${ac_cv_c_flexmember+:} false; then :
11642   $as_echo_n "(cached) " >&6
11643 else
11644   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11645 /* end confdefs.h.  */
11646 #include <stdlib.h>
11647             #include <stdio.h>
11648             #include <stddef.h>
11649             struct s { int n; double d[]; };
11650 int
11651 main ()
11652 {
11653 int m = getchar ();
11654             struct s *p = malloc (offsetof (struct s, d)
11655                                   + m * sizeof (double));
11656             p->d[0] = 0.0;
11657             return p->d != (double *) NULL;
11658   ;
11659   return 0;
11660 }
11661 _ACEOF
11662 if ac_fn_c_try_compile "$LINENO"; then :
11663   ac_cv_c_flexmember=yes
11664 else
11665   ac_cv_c_flexmember=no
11666 fi
11667 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11668 fi
11669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
11670 $as_echo "$ac_cv_c_flexmember" >&6; }
11671   if test $ac_cv_c_flexmember = yes; then
11672
11673 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
11674
11675   else
11676     $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
11677
11678   fi
11679
11680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed types" >&5
11681 $as_echo_n "checking for signed types... " >&6; }
11682 if ${pgac_cv_c_signed+:} false; then :
11683   $as_echo_n "(cached) " >&6
11684 else
11685   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11686 /* end confdefs.h.  */
11687
11688 int
11689 main ()
11690 {
11691 signed char c; signed short s; signed int i;
11692   ;
11693   return 0;
11694 }
11695 _ACEOF
11696 if ac_fn_c_try_compile "$LINENO"; then :
11697   pgac_cv_c_signed=yes
11698 else
11699   pgac_cv_c_signed=no
11700 fi
11701 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11702 fi
11703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_signed" >&5
11704 $as_echo "$pgac_cv_c_signed" >&6; }
11705 if test x"$pgac_cv_c_signed" = xno ; then
11706
11707 $as_echo "#define signed /**/" >>confdefs.h
11708
11709 fi
11710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5
11711 $as_echo_n "checking for __func__... " >&6; }
11712 if ${pgac_cv_funcname_func_support+:} false; then :
11713   $as_echo_n "(cached) " >&6
11714 else
11715   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11716 /* end confdefs.h.  */
11717 #include <stdio.h>
11718 int
11719 main ()
11720 {
11721 printf("%s\n", __func__);
11722   ;
11723   return 0;
11724 }
11725 _ACEOF
11726 if ac_fn_c_try_compile "$LINENO"; then :
11727   pgac_cv_funcname_func_support=yes
11728 else
11729   pgac_cv_funcname_func_support=no
11730 fi
11731 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11732 fi
11733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_func_support" >&5
11734 $as_echo "$pgac_cv_funcname_func_support" >&6; }
11735 if test x"$pgac_cv_funcname_func_support" = xyes ; then
11736
11737 $as_echo "#define HAVE_FUNCNAME__FUNC 1" >>confdefs.h
11738
11739 else
11740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__" >&5
11741 $as_echo_n "checking for __FUNCTION__... " >&6; }
11742 if ${pgac_cv_funcname_function_support+:} false; then :
11743   $as_echo_n "(cached) " >&6
11744 else
11745   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11746 /* end confdefs.h.  */
11747 #include <stdio.h>
11748 int
11749 main ()
11750 {
11751 printf("%s\n", __FUNCTION__);
11752   ;
11753   return 0;
11754 }
11755 _ACEOF
11756 if ac_fn_c_try_compile "$LINENO"; then :
11757   pgac_cv_funcname_function_support=yes
11758 else
11759   pgac_cv_funcname_function_support=no
11760 fi
11761 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11762 fi
11763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_function_support" >&5
11764 $as_echo "$pgac_cv_funcname_function_support" >&6; }
11765 if test x"$pgac_cv_funcname_function_support" = xyes ; then
11766
11767 $as_echo "#define HAVE_FUNCNAME__FUNCTION 1" >>confdefs.h
11768
11769 fi
11770 fi
11771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
11772 $as_echo_n "checking for _Static_assert... " >&6; }
11773 if ${pgac_cv__static_assert+:} false; then :
11774   $as_echo_n "(cached) " >&6
11775 else
11776   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11777 /* end confdefs.h.  */
11778
11779 int
11780 main ()
11781 {
11782 ({ _Static_assert(1, "foo"); })
11783   ;
11784   return 0;
11785 }
11786 _ACEOF
11787 if ac_fn_c_try_link "$LINENO"; then :
11788   pgac_cv__static_assert=yes
11789 else
11790   pgac_cv__static_assert=no
11791 fi
11792 rm -f core conftest.err conftest.$ac_objext \
11793     conftest$ac_exeext conftest.$ac_ext
11794 fi
11795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
11796 $as_echo "$pgac_cv__static_assert" >&6; }
11797 if test x"$pgac_cv__static_assert" = xyes ; then
11798
11799 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
11800
11801 fi
11802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5
11803 $as_echo_n "checking for typeof... " >&6; }
11804 if ${pgac_cv_c_typeof+:} false; then :
11805   $as_echo_n "(cached) " >&6
11806 else
11807   pgac_cv_c_typeof=no
11808 for pgac_kw in typeof __typeof__ decltype; do
11809   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11810 /* end confdefs.h.  */
11811
11812 int
11813 main ()
11814 {
11815 int x = 0;
11816 $pgac_kw(x) y;
11817 y = x;
11818 return y;
11819   ;
11820   return 0;
11821 }
11822 _ACEOF
11823 if ac_fn_c_try_compile "$LINENO"; then :
11824   pgac_cv_c_typeof=$pgac_kw
11825 fi
11826 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11827   test "$pgac_cv_c_typeof" != no && break
11828 done
11829 fi
11830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_typeof" >&5
11831 $as_echo "$pgac_cv_c_typeof" >&6; }
11832 if test "$pgac_cv_c_typeof" != no; then
11833
11834 $as_echo "#define HAVE_TYPEOF 1" >>confdefs.h
11835
11836   if test "$pgac_cv_c_typeof" != typeof; then
11837
11838 cat >>confdefs.h <<_ACEOF
11839 #define typeof $pgac_cv_c_typeof
11840 _ACEOF
11841
11842   fi
11843 fi
11844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
11845 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
11846 if ${pgac_cv__types_compatible+:} false; then :
11847   $as_echo_n "(cached) " >&6
11848 else
11849   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11850 /* end confdefs.h.  */
11851
11852 int
11853 main ()
11854 {
11855  int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
11856   ;
11857   return 0;
11858 }
11859 _ACEOF
11860 if ac_fn_c_try_compile "$LINENO"; then :
11861   pgac_cv__types_compatible=yes
11862 else
11863   pgac_cv__types_compatible=no
11864 fi
11865 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11866 fi
11867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
11868 $as_echo "$pgac_cv__types_compatible" >&6; }
11869 if test x"$pgac_cv__types_compatible" = xyes ; then
11870
11871 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
11872
11873 fi
11874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
11875 $as_echo_n "checking for __builtin_bswap32... " >&6; }
11876 if ${pgac_cv__builtin_bswap32+:} false; then :
11877   $as_echo_n "(cached) " >&6
11878 else
11879   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11880 /* end confdefs.h.  */
11881 static unsigned long int x = __builtin_bswap32(0xaabbccdd);
11882
11883 _ACEOF
11884 if ac_fn_c_try_compile "$LINENO"; then :
11885   pgac_cv__builtin_bswap32=yes
11886 else
11887   pgac_cv__builtin_bswap32=no
11888 fi
11889 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11890 fi
11891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
11892 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
11893 if test x"$pgac_cv__builtin_bswap32" = xyes ; then
11894
11895 $as_echo "#define HAVE__BUILTIN_BSWAP32 1" >>confdefs.h
11896
11897 fi
11898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
11899 $as_echo_n "checking for __builtin_bswap64... " >&6; }
11900 if ${pgac_cv__builtin_bswap64+:} false; then :
11901   $as_echo_n "(cached) " >&6
11902 else
11903   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11904 /* end confdefs.h.  */
11905 static unsigned long int x = __builtin_bswap64(0xaabbccddeeff0011);
11906
11907 _ACEOF
11908 if ac_fn_c_try_compile "$LINENO"; then :
11909   pgac_cv__builtin_bswap64=yes
11910 else
11911   pgac_cv__builtin_bswap64=no
11912 fi
11913 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11914 fi
11915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
11916 $as_echo "$pgac_cv__builtin_bswap64" >&6; }
11917 if test x"$pgac_cv__builtin_bswap64" = xyes ; then
11918
11919 $as_echo "#define HAVE__BUILTIN_BSWAP64 1" >>confdefs.h
11920
11921 fi
11922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
11923 $as_echo_n "checking for __builtin_constant_p... " >&6; }
11924 if ${pgac_cv__builtin_constant_p+:} false; then :
11925   $as_echo_n "(cached) " >&6
11926 else
11927   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11928 /* end confdefs.h.  */
11929 static int x; static int y[__builtin_constant_p(x) ? x : 1];
11930
11931 _ACEOF
11932 if ac_fn_c_try_compile "$LINENO"; then :
11933   pgac_cv__builtin_constant_p=yes
11934 else
11935   pgac_cv__builtin_constant_p=no
11936 fi
11937 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11938 fi
11939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
11940 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
11941 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
11942
11943 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
11944
11945 fi
11946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
11947 $as_echo_n "checking for __builtin_unreachable... " >&6; }
11948 if ${pgac_cv__builtin_unreachable+:} false; then :
11949   $as_echo_n "(cached) " >&6
11950 else
11951   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11952 /* end confdefs.h.  */
11953
11954 int
11955 main ()
11956 {
11957 __builtin_unreachable();
11958   ;
11959   return 0;
11960 }
11961 _ACEOF
11962 if ac_fn_c_try_link "$LINENO"; then :
11963   pgac_cv__builtin_unreachable=yes
11964 else
11965   pgac_cv__builtin_unreachable=no
11966 fi
11967 rm -f core conftest.err conftest.$ac_objext \
11968     conftest$ac_exeext conftest.$ac_ext
11969 fi
11970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
11971 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
11972 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
11973
11974 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
11975
11976 fi
11977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for computed goto support" >&5
11978 $as_echo_n "checking for computed goto support... " >&6; }
11979 if ${pgac_cv_computed_goto+:} false; then :
11980   $as_echo_n "(cached) " >&6
11981 else
11982   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11983 /* end confdefs.h.  */
11984
11985 int
11986 main ()
11987 {
11988 void *labeladdrs[] = {&&my_label};
11989   goto *labeladdrs[0];
11990   my_label:
11991   return 1;
11992
11993   ;
11994   return 0;
11995 }
11996 _ACEOF
11997 if ac_fn_c_try_compile "$LINENO"; then :
11998   pgac_cv_computed_goto=yes
11999 else
12000   pgac_cv_computed_goto=no
12001 fi
12002 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12003 fi
12004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_computed_goto" >&5
12005 $as_echo "$pgac_cv_computed_goto" >&6; }
12006 if test x"$pgac_cv_computed_goto" = xyes ; then
12007
12008 $as_echo "#define HAVE_COMPUTED_GOTO 1" >>confdefs.h
12009
12010 fi
12011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __VA_ARGS__" >&5
12012 $as_echo_n "checking for __VA_ARGS__... " >&6; }
12013 if ${pgac_cv__va_args+:} false; then :
12014   $as_echo_n "(cached) " >&6
12015 else
12016   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12017 /* end confdefs.h.  */
12018 #include <stdio.h>
12019 int
12020 main ()
12021 {
12022 #define debug(...) fprintf(stderr, __VA_ARGS__)
12023 debug("%s", "blarg");
12024
12025   ;
12026   return 0;
12027 }
12028 _ACEOF
12029 if ac_fn_c_try_compile "$LINENO"; then :
12030   pgac_cv__va_args=yes
12031 else
12032   pgac_cv__va_args=no
12033 fi
12034 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12035 fi
12036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__va_args" >&5
12037 $as_echo "$pgac_cv__va_args" >&6; }
12038 if test x"$pgac_cv__va_args" = xyes ; then
12039
12040 $as_echo "#define HAVE__VA_ARGS 1" >>confdefs.h
12041
12042 fi
12043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12044 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
12045 if ${ac_cv_struct_tm+:} false; then :
12046   $as_echo_n "(cached) " >&6
12047 else
12048   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12049 /* end confdefs.h.  */
12050 #include <sys/types.h>
12051 #include <time.h>
12052
12053 int
12054 main ()
12055 {
12056 struct tm tm;
12057                                      int *p = &tm.tm_sec;
12058                                      return !p;
12059   ;
12060   return 0;
12061 }
12062 _ACEOF
12063 if ac_fn_c_try_compile "$LINENO"; then :
12064   ac_cv_struct_tm=time.h
12065 else
12066   ac_cv_struct_tm=sys/time.h
12067 fi
12068 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12069 fi
12070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12071 $as_echo "$ac_cv_struct_tm" >&6; }
12072 if test $ac_cv_struct_tm = sys/time.h; then
12073
12074 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
12075
12076 fi
12077
12078 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
12079 #include <$ac_cv_struct_tm>
12080
12081 "
12082 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
12083
12084 cat >>confdefs.h <<_ACEOF
12085 #define HAVE_STRUCT_TM_TM_ZONE 1
12086 _ACEOF
12087
12088
12089 fi
12090
12091 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12092
12093 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
12094
12095 fi
12096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12097 $as_echo_n "checking for tzname... " >&6; }
12098 if ${ac_cv_var_tzname+:} false; then :
12099   $as_echo_n "(cached) " >&6
12100 else
12101   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12102 /* end confdefs.h.  */
12103 #include <stdlib.h>
12104 #include <time.h>
12105 #ifndef tzname /* For SGI.  */
12106 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
12107 #endif
12108
12109 int
12110 main ()
12111 {
12112 atoi(*tzname);
12113   ;
12114   return 0;
12115 }
12116 _ACEOF
12117 if ac_fn_c_try_link "$LINENO"; then :
12118   ac_cv_var_tzname=yes
12119 else
12120   ac_cv_var_tzname=no
12121 fi
12122 rm -f core conftest.err conftest.$ac_objext \
12123     conftest$ac_exeext conftest.$ac_ext
12124 fi
12125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12126 $as_echo "$ac_cv_var_tzname" >&6; }
12127 if test $ac_cv_var_tzname = yes; then
12128
12129 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
12130
12131 fi
12132
12133 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
12134 #ifdef HAVE_SYS_IPC_H
12135 #include <sys/ipc.h>
12136 #endif
12137 #ifdef HAVE_SYS_SEM_H
12138 #include <sys/sem.h>
12139 #endif
12140 "
12141 if test "x$ac_cv_type_union_semun" = xyes; then :
12142
12143 cat >>confdefs.h <<_ACEOF
12144 #define HAVE_UNION_SEMUN 1
12145 _ACEOF
12146
12147
12148 fi
12149
12150 ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
12151 #ifdef HAVE_SYS_UN_H
12152 #include <sys/un.h>
12153 #endif
12154
12155 "
12156 if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
12157
12158 $as_echo "#define HAVE_UNIX_SOCKETS 1" >>confdefs.h
12159
12160 fi
12161
12162 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
12163 #include <sys/socket.h>
12164
12165 "
12166 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
12167
12168 cat >>confdefs.h <<_ACEOF
12169 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
12170 _ACEOF
12171
12172
12173 fi
12174
12175 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
12176 #include <sys/socket.h>
12177
12178 "
12179 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
12180
12181 cat >>confdefs.h <<_ACEOF
12182 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
12183 _ACEOF
12184
12185
12186 fi
12187 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
12188 #include <sys/socket.h>
12189
12190 "
12191 if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
12192
12193 cat >>confdefs.h <<_ACEOF
12194 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
12195 _ACEOF
12196
12197
12198 fi
12199 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
12200 #include <sys/socket.h>
12201
12202 "
12203 if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
12204
12205 cat >>confdefs.h <<_ACEOF
12206 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
12207 _ACEOF
12208
12209
12210 fi
12211 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
12212 #include <sys/socket.h>
12213
12214 "
12215 if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
12216
12217 cat >>confdefs.h <<_ACEOF
12218 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
12219 _ACEOF
12220
12221
12222 fi
12223 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
12224 #include <sys/socket.h>
12225
12226 "
12227 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
12228
12229 cat >>confdefs.h <<_ACEOF
12230 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
12231 _ACEOF
12232
12233
12234 fi
12235
12236 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include <sys/types.h>
12237 #include <sys/socket.h>
12238 #include <netdb.h>
12239
12240 "
12241 if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
12242
12243 cat >>confdefs.h <<_ACEOF
12244 #define HAVE_STRUCT_ADDRINFO 1
12245 _ACEOF
12246
12247
12248 fi
12249
12250
12251   ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
12252 if test "x$ac_cv_type_intptr_t" = xyes; then :
12253
12254 $as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
12255
12256 else
12257   for ac_type in 'int' 'long int' 'long long int'; do
12258        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12259 /* end confdefs.h.  */
12260 $ac_includes_default
12261 int
12262 main ()
12263 {
12264 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
12265 test_array [0] = 0;
12266 return test_array [0];
12267
12268   ;
12269   return 0;
12270 }
12271 _ACEOF
12272 if ac_fn_c_try_compile "$LINENO"; then :
12273
12274 cat >>confdefs.h <<_ACEOF
12275 #define intptr_t $ac_type
12276 _ACEOF
12277
12278           ac_type=
12279 fi
12280 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12281        test -z "$ac_type" && break
12282      done
12283 fi
12284
12285
12286
12287   ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
12288 if test "x$ac_cv_type_uintptr_t" = xyes; then :
12289
12290 $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
12291
12292 else
12293   for ac_type in 'unsigned int' 'unsigned long int' \
12294         'unsigned long long int'; do
12295        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12296 /* end confdefs.h.  */
12297 $ac_includes_default
12298 int
12299 main ()
12300 {
12301 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
12302 test_array [0] = 0;
12303 return test_array [0];
12304
12305   ;
12306   return 0;
12307 }
12308 _ACEOF
12309 if ac_fn_c_try_compile "$LINENO"; then :
12310
12311 cat >>confdefs.h <<_ACEOF
12312 #define uintptr_t $ac_type
12313 _ACEOF
12314
12315           ac_type=
12316 fi
12317 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12318        test -z "$ac_type" && break
12319      done
12320 fi
12321
12322
12323
12324   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
12325 $as_echo_n "checking for unsigned long long int... " >&6; }
12326 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
12327   $as_echo_n "(cached) " >&6
12328 else
12329   ac_cv_type_unsigned_long_long_int=yes
12330      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
12331        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12332 /* end confdefs.h.  */
12333
12334   /* For now, do not test the preprocessor; as of 2007 there are too many
12335          implementations with broken preprocessors.  Perhaps this can
12336          be revisited in 2012.  In the meantime, code should not expect
12337          #if to work with literals wider than 32 bits.  */
12338       /* Test literals.  */
12339       long long int ll = 9223372036854775807ll;
12340       long long int nll = -9223372036854775807LL;
12341       unsigned long long int ull = 18446744073709551615ULL;
12342       /* Test constant expressions.   */
12343       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
12344                      ? 1 : -1)];
12345       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
12346                      ? 1 : -1)];
12347       int i = 63;
12348 int
12349 main ()
12350 {
12351 /* Test availability of runtime routines for shift and division.  */
12352       long long int llmax = 9223372036854775807ll;
12353       unsigned long long int ullmax = 18446744073709551615ull;
12354       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
12355               | (llmax / ll) | (llmax % ll)
12356               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
12357               | (ullmax / ull) | (ullmax % ull));
12358   ;
12359   return 0;
12360 }
12361
12362 _ACEOF
12363 if ac_fn_c_try_link "$LINENO"; then :
12364
12365 else
12366   ac_cv_type_unsigned_long_long_int=no
12367 fi
12368 rm -f core conftest.err conftest.$ac_objext \
12369     conftest$ac_exeext conftest.$ac_ext
12370      fi
12371 fi
12372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
12373 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
12374   if test $ac_cv_type_unsigned_long_long_int = yes; then
12375
12376 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
12377
12378   fi
12379
12380
12381
12382   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
12383 $as_echo_n "checking for long long int... " >&6; }
12384 if ${ac_cv_type_long_long_int+:} false; then :
12385   $as_echo_n "(cached) " >&6
12386 else
12387   ac_cv_type_long_long_int=yes
12388       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
12389         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
12390         if test $ac_cv_type_long_long_int = yes; then
12391                                   if test "$cross_compiling" = yes; then :
12392   :
12393 else
12394   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12395 /* end confdefs.h.  */
12396 #include <limits.h>
12397                  #ifndef LLONG_MAX
12398                  # define HALF \
12399                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
12400                  # define LLONG_MAX (HALF - 1 + HALF)
12401                  #endif
12402 int
12403 main ()
12404 {
12405 long long int n = 1;
12406                  int i;
12407                  for (i = 0; ; i++)
12408                    {
12409                      long long int m = n << i;
12410                      if (m >> i != n)
12411                        return 1;
12412                      if (LLONG_MAX / 2 < m)
12413                        break;
12414                    }
12415                  return 0;
12416   ;
12417   return 0;
12418 }
12419 _ACEOF
12420 if ac_fn_c_try_run "$LINENO"; then :
12421
12422 else
12423   ac_cv_type_long_long_int=no
12424 fi
12425 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12426   conftest.$ac_objext conftest.beam conftest.$ac_ext
12427 fi
12428
12429         fi
12430       fi
12431 fi
12432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
12433 $as_echo "$ac_cv_type_long_long_int" >&6; }
12434   if test $ac_cv_type_long_long_int = yes; then
12435
12436 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
12437
12438   fi
12439
12440
12441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
12442 $as_echo_n "checking for locale_t... " >&6; }
12443 if ${pgac_cv_type_locale_t+:} false; then :
12444   $as_echo_n "(cached) " >&6
12445 else
12446   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12447 /* end confdefs.h.  */
12448 #include <locale.h>
12449 locale_t x;
12450 int
12451 main ()
12452 {
12453
12454   ;
12455   return 0;
12456 }
12457 _ACEOF
12458 if ac_fn_c_try_compile "$LINENO"; then :
12459   pgac_cv_type_locale_t=yes
12460 else
12461   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12462 /* end confdefs.h.  */
12463 #include <xlocale.h>
12464 locale_t x;
12465 int
12466 main ()
12467 {
12468
12469   ;
12470   return 0;
12471 }
12472 _ACEOF
12473 if ac_fn_c_try_compile "$LINENO"; then :
12474   pgac_cv_type_locale_t='yes (in xlocale.h)'
12475 else
12476   pgac_cv_type_locale_t=no
12477 fi
12478 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12479 fi
12480 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12481 fi
12482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
12483 $as_echo "$pgac_cv_type_locale_t" >&6; }
12484 if test "$pgac_cv_type_locale_t" != no; then
12485
12486 $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
12487
12488 fi
12489 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
12490
12491 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
12492
12493 fi
12494
12495 ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
12496 #include <sys/param.h>
12497 #ifdef HAVE_SYS_UCRED_H
12498 #include <sys/ucred.h>
12499 #endif
12500 "
12501 if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
12502
12503 cat >>confdefs.h <<_ACEOF
12504 #define HAVE_STRUCT_CMSGCRED 1
12505 _ACEOF
12506
12507
12508 fi
12509
12510
12511 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
12512 #include <getopt.h>
12513 #endif
12514 "
12515 if test "x$ac_cv_type_struct_option" = xyes; then :
12516
12517 cat >>confdefs.h <<_ACEOF
12518 #define HAVE_STRUCT_OPTION 1
12519 _ACEOF
12520
12521
12522 fi
12523
12524
12525 if test "$with_zlib" = yes; then
12526   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
12527   # did not).  While we could work around the lack of z_streamp, it
12528   # seems unwise to encourage people to use such old zlib versions...
12529   ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
12530 "
12531 if test "x$ac_cv_type_z_streamp" = xyes; then :
12532
12533 else
12534   as_fn_error $? "zlib version is too old
12535 Use --without-zlib to disable zlib support." "$LINENO" 5
12536 fi
12537
12538 fi
12539
12540 # On PPC, check if assembler supports LWARX instruction's mutex hint bit
12541 case $host_cpu in
12542   ppc*|powerpc*)
12543     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports lwarx hint bit" >&5
12544 $as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
12545     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12546 /* end confdefs.h.  */
12547
12548 int
12549 main ()
12550 {
12551 int a = 0; int *p = &a; int r;
12552          __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
12553   ;
12554   return 0;
12555 }
12556 _ACEOF
12557 if ac_fn_c_try_compile "$LINENO"; then :
12558   pgac_cv_have_ppc_mutex_hint=yes
12559 else
12560   pgac_cv_have_ppc_mutex_hint=no
12561 fi
12562 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12563     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_ppc_mutex_hint" >&5
12564 $as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
12565     if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
12566
12567 $as_echo "#define HAVE_PPC_LWARX_MUTEX_HINT 1" >>confdefs.h
12568
12569     fi
12570   ;;
12571 esac
12572
12573 # Check largefile support.  You might think this is a system service not a
12574 # compiler characteristic, but you'd be wrong.  We must check this before
12575 # probing existence of related functions such as fseeko, since the largefile
12576 # defines can affect what is generated for that.
12577 if test "$PORTNAME" != "win32"; then
12578    # Check whether --enable-largefile was given.
12579 if test "${enable_largefile+set}" = set; then :
12580   enableval=$enable_largefile;
12581 fi
12582
12583 if test "$enable_largefile" != no; then
12584
12585   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
12586 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
12587 if ${ac_cv_sys_largefile_CC+:} false; then :
12588   $as_echo_n "(cached) " >&6
12589 else
12590   ac_cv_sys_largefile_CC=no
12591      if test "$GCC" != yes; then
12592        ac_save_CC=$CC
12593        while :; do
12594          # IRIX 6.2 and later do not support large files by default,
12595          # so use the C compiler's -n32 option if that helps.
12596          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12597 /* end confdefs.h.  */
12598 #include <sys/types.h>
12599  /* Check that off_t can represent 2**63 - 1 correctly.
12600     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12601     since some C++ compilers masquerading as C compilers
12602     incorrectly reject 9223372036854775807.  */
12603 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12604   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12605                        && LARGE_OFF_T % 2147483647 == 1)
12606                       ? 1 : -1];
12607 int
12608 main ()
12609 {
12610
12611   ;
12612   return 0;
12613 }
12614 _ACEOF
12615          if ac_fn_c_try_compile "$LINENO"; then :
12616   break
12617 fi
12618 rm -f core conftest.err conftest.$ac_objext
12619          CC="$CC -n32"
12620          if ac_fn_c_try_compile "$LINENO"; then :
12621   ac_cv_sys_largefile_CC=' -n32'; break
12622 fi
12623 rm -f core conftest.err conftest.$ac_objext
12624          break
12625        done
12626        CC=$ac_save_CC
12627        rm -f conftest.$ac_ext
12628     fi
12629 fi
12630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
12631 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
12632   if test "$ac_cv_sys_largefile_CC" != no; then
12633     CC=$CC$ac_cv_sys_largefile_CC
12634   fi
12635
12636   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12637 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
12638 if ${ac_cv_sys_file_offset_bits+:} false; then :
12639   $as_echo_n "(cached) " >&6
12640 else
12641   while :; do
12642   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12643 /* end confdefs.h.  */
12644 #include <sys/types.h>
12645  /* Check that off_t can represent 2**63 - 1 correctly.
12646     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12647     since some C++ compilers masquerading as C compilers
12648     incorrectly reject 9223372036854775807.  */
12649 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12650   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12651                        && LARGE_OFF_T % 2147483647 == 1)
12652                       ? 1 : -1];
12653 int
12654 main ()
12655 {
12656
12657   ;
12658   return 0;
12659 }
12660 _ACEOF
12661 if ac_fn_c_try_compile "$LINENO"; then :
12662   ac_cv_sys_file_offset_bits=no; break
12663 fi
12664 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12665   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12666 /* end confdefs.h.  */
12667 #define _FILE_OFFSET_BITS 64
12668 #include <sys/types.h>
12669  /* Check that off_t can represent 2**63 - 1 correctly.
12670     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12671     since some C++ compilers masquerading as C compilers
12672     incorrectly reject 9223372036854775807.  */
12673 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12674   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12675                        && LARGE_OFF_T % 2147483647 == 1)
12676                       ? 1 : -1];
12677 int
12678 main ()
12679 {
12680
12681   ;
12682   return 0;
12683 }
12684 _ACEOF
12685 if ac_fn_c_try_compile "$LINENO"; then :
12686   ac_cv_sys_file_offset_bits=64; break
12687 fi
12688 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12689   ac_cv_sys_file_offset_bits=unknown
12690   break
12691 done
12692 fi
12693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
12694 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
12695 case $ac_cv_sys_file_offset_bits in #(
12696   no | unknown) ;;
12697   *)
12698 cat >>confdefs.h <<_ACEOF
12699 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
12700 _ACEOF
12701 ;;
12702 esac
12703 rm -rf conftest*
12704   if test $ac_cv_sys_file_offset_bits = unknown; then
12705     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
12706 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
12707 if ${ac_cv_sys_large_files+:} false; then :
12708   $as_echo_n "(cached) " >&6
12709 else
12710   while :; do
12711   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12712 /* end confdefs.h.  */
12713 #include <sys/types.h>
12714  /* Check that off_t can represent 2**63 - 1 correctly.
12715     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12716     since some C++ compilers masquerading as C compilers
12717     incorrectly reject 9223372036854775807.  */
12718 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12719   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12720                        && LARGE_OFF_T % 2147483647 == 1)
12721                       ? 1 : -1];
12722 int
12723 main ()
12724 {
12725
12726   ;
12727   return 0;
12728 }
12729 _ACEOF
12730 if ac_fn_c_try_compile "$LINENO"; then :
12731   ac_cv_sys_large_files=no; break
12732 fi
12733 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12734   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12735 /* end confdefs.h.  */
12736 #define _LARGE_FILES 1
12737 #include <sys/types.h>
12738  /* Check that off_t can represent 2**63 - 1 correctly.
12739     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12740     since some C++ compilers masquerading as C compilers
12741     incorrectly reject 9223372036854775807.  */
12742 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12743   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12744                        && LARGE_OFF_T % 2147483647 == 1)
12745                       ? 1 : -1];
12746 int
12747 main ()
12748 {
12749
12750   ;
12751   return 0;
12752 }
12753 _ACEOF
12754 if ac_fn_c_try_compile "$LINENO"; then :
12755   ac_cv_sys_large_files=1; break
12756 fi
12757 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12758   ac_cv_sys_large_files=unknown
12759   break
12760 done
12761 fi
12762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
12763 $as_echo "$ac_cv_sys_large_files" >&6; }
12764 case $ac_cv_sys_large_files in #(
12765   no | unknown) ;;
12766   *)
12767 cat >>confdefs.h <<_ACEOF
12768 #define _LARGE_FILES $ac_cv_sys_large_files
12769 _ACEOF
12770 ;;
12771 esac
12772 rm -rf conftest*
12773   fi
12774
12775
12776 fi
12777
12778
12779 fi
12780
12781 # Check for largefile support (must be after AC_SYS_LARGEFILE)
12782 # The cast to long int works around a bug in the HP C Compiler
12783 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12784 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12785 # This bug is HP SR number 8606223364.
12786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
12787 $as_echo_n "checking size of off_t... " >&6; }
12788 if ${ac_cv_sizeof_off_t+:} false; then :
12789   $as_echo_n "(cached) " >&6
12790 else
12791   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :
12792
12793 else
12794   if test "$ac_cv_type_off_t" = yes; then
12795      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12796 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12797 as_fn_error 77 "cannot compute sizeof (off_t)
12798 See \`config.log' for more details" "$LINENO" 5; }
12799    else
12800      ac_cv_sizeof_off_t=0
12801    fi
12802 fi
12803
12804 fi
12805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
12806 $as_echo "$ac_cv_sizeof_off_t" >&6; }
12807
12808
12809
12810 cat >>confdefs.h <<_ACEOF
12811 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
12812 _ACEOF
12813
12814
12815
12816 # If we don't have largefile support, can't handle segsize >= 2GB.
12817 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
12818    as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
12819 fi
12820
12821
12822 ##
12823 ## Functions, global variables
12824 ##
12825
12826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
12827 $as_echo_n "checking for int timezone... " >&6; }
12828 if ${pgac_cv_var_int_timezone+:} false; then :
12829   $as_echo_n "(cached) " >&6
12830 else
12831   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12832 /* end confdefs.h.  */
12833 #include <time.h>
12834 int res;
12835 int
12836 main ()
12837 {
12838 #ifndef __CYGWIN__
12839 res = timezone / 60;
12840 #else
12841 res = _timezone / 60;
12842 #endif
12843   ;
12844   return 0;
12845 }
12846 _ACEOF
12847 if ac_fn_c_try_link "$LINENO"; then :
12848   pgac_cv_var_int_timezone=yes
12849 else
12850   pgac_cv_var_int_timezone=no
12851 fi
12852 rm -f core conftest.err conftest.$ac_objext \
12853     conftest$ac_exeext conftest.$ac_ext
12854 fi
12855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
12856 $as_echo "$pgac_cv_var_int_timezone" >&6; }
12857 if test x"$pgac_cv_var_int_timezone" = xyes ; then
12858
12859 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
12860
12861 fi
12862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for accept()" >&5
12863 $as_echo_n "checking types of arguments for accept()... " >&6; }
12864  if ${ac_cv_func_accept_return+:} false; then :
12865   $as_echo_n "(cached) " >&6
12866 else
12867    if ${ac_cv_func_accept_arg1+:} false; then :
12868   $as_echo_n "(cached) " >&6
12869 else
12870     if ${ac_cv_func_accept_arg2+:} false; then :
12871   $as_echo_n "(cached) " >&6
12872 else
12873      if ${ac_cv_func_accept_arg3+:} false; then :
12874   $as_echo_n "(cached) " >&6
12875 else
12876       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL' 'SOCKET WSAAPI'; do
12877       for ac_cv_func_accept_arg1 in 'int' 'unsigned int' 'SOCKET'; do
12878        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
12879         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
12880          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12881 /* end confdefs.h.  */
12882 #include <sys/types.h>
12883 #include <sys/socket.h>
12884 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
12885 _ACEOF
12886 if ac_fn_c_try_compile "$LINENO"; then :
12887   ac_not_found=no; break 4
12888 else
12889   ac_not_found=yes
12890 fi
12891 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12892        done
12893       done
12894      done
12895     done
12896     if test "$ac_not_found" = yes; then
12897       as_fn_error $? "could not determine argument types" "$LINENO" 5
12898     fi
12899     if test "$ac_cv_func_accept_arg3" = "void"; then
12900       ac_cv_func_accept_arg3=int
12901     fi
12902
12903 fi
12904
12905 fi
12906
12907 fi
12908
12909 fi
12910  { $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
12911 $as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
12912
12913 cat >>confdefs.h <<_ACEOF
12914 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
12915 _ACEOF
12916
12917
12918 cat >>confdefs.h <<_ACEOF
12919 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
12920 _ACEOF
12921
12922
12923 cat >>confdefs.h <<_ACEOF
12924 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
12925 _ACEOF
12926
12927
12928 cat >>confdefs.h <<_ACEOF
12929 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
12930 _ACEOF
12931
12932
12933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
12934 $as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
12935 if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
12936   $as_echo_n "(cached) " >&6
12937 else
12938   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12939 /* end confdefs.h.  */
12940 #include <sys/time.h>
12941 int
12942 main ()
12943 {
12944 struct timeval *tp;
12945 struct timezone *tzp;
12946 gettimeofday(tp,tzp);
12947   ;
12948   return 0;
12949 }
12950 _ACEOF
12951 if ac_fn_c_try_compile "$LINENO"; then :
12952   pgac_cv_func_gettimeofday_1arg=no
12953 else
12954   pgac_cv_func_gettimeofday_1arg=yes
12955 fi
12956 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12957 fi
12958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5
12959 $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
12960 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
12961
12962 $as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
12963
12964 fi
12965
12966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcstombs_l declaration" >&5
12967 $as_echo_n "checking for wcstombs_l declaration... " >&6; }
12968 if ${pgac_cv_func_wcstombs_l+:} false; then :
12969   $as_echo_n "(cached) " >&6
12970 else
12971   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12972 /* end confdefs.h.  */
12973 #include <stdlib.h>
12974 #include <locale.h>
12975 int
12976 main ()
12977 {
12978 #ifndef wcstombs_l
12979 (void) wcstombs_l;
12980 #endif
12981   ;
12982   return 0;
12983 }
12984 _ACEOF
12985 if ac_fn_c_try_compile "$LINENO"; then :
12986   pgac_cv_func_wcstombs_l='yes'
12987 else
12988   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12989 /* end confdefs.h.  */
12990 #include <stdlib.h>
12991 #include <locale.h>
12992 #include <xlocale.h>
12993 int
12994 main ()
12995 {
12996 #ifndef wcstombs_l
12997 (void) wcstombs_l;
12998 #endif
12999   ;
13000   return 0;
13001 }
13002 _ACEOF
13003 if ac_fn_c_try_compile "$LINENO"; then :
13004   pgac_cv_func_wcstombs_l='yes (in xlocale.h)'
13005 else
13006   pgac_cv_func_wcstombs_l='no'
13007 fi
13008 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13009 fi
13010 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13011 fi
13012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_wcstombs_l" >&5
13013 $as_echo "$pgac_cv_func_wcstombs_l" >&6; }
13014 if test "$pgac_cv_func_wcstombs_l" = 'yes (in xlocale.h)'; then
13015
13016 $as_echo "#define WCSTOMBS_L_IN_XLOCALE 1" >>confdefs.h
13017
13018 fi
13019
13020 # Some versions of libedit contain strlcpy(), setproctitle(), and other
13021 # symbols that that library has no business exposing to the world.  Pending
13022 # acquisition of a clue by those developers, ignore libedit (including its
13023 # possible alias of libreadline) while checking for everything else.
13024 LIBS_including_readline="$LIBS"
13025 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
13026
13027 for ac_func in cbrt clock_gettime dlopen fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memmove poll pstat pthread_is_threaded_np readlink setproctitle setsid shm_open symlink sync_file_range towlower utime utimes wcstombs wcstombs_l
13028 do :
13029   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13030 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13031 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13032   cat >>confdefs.h <<_ACEOF
13033 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13034 _ACEOF
13035
13036 fi
13037 done
13038
13039
13040 ac_fn_c_check_func "$LINENO" "fseeko" "ac_cv_func_fseeko"
13041 if test "x$ac_cv_func_fseeko" = xyes; then :
13042   $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
13043
13044 else
13045   case " $LIBOBJS " in
13046   *" fseeko.$ac_objext "* ) ;;
13047   *) LIBOBJS="$LIBOBJS fseeko.$ac_objext"
13048  ;;
13049 esac
13050
13051 fi
13052
13053
13054 case $host_os in
13055         # NetBSD uses a custom fseeko/ftello built on fsetpos/fgetpos
13056         # Mingw uses macros to access Win32 API calls
13057         netbsd*|mingw*)
13058
13059 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
13060
13061                 ac_cv_func_fseeko=yes;;
13062         *)
13063                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13064 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
13065 if ${ac_cv_sys_largefile_source+:} false; then :
13066   $as_echo_n "(cached) " >&6
13067 else
13068   while :; do
13069   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13070 /* end confdefs.h.  */
13071 #include <sys/types.h> /* for off_t */
13072      #include <stdio.h>
13073 int
13074 main ()
13075 {
13076 int (*fp) (FILE *, off_t, int) = fseeko;
13077      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
13078   ;
13079   return 0;
13080 }
13081 _ACEOF
13082 if ac_fn_c_try_link "$LINENO"; then :
13083   ac_cv_sys_largefile_source=no; break
13084 fi
13085 rm -f core conftest.err conftest.$ac_objext \
13086     conftest$ac_exeext conftest.$ac_ext
13087   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13088 /* end confdefs.h.  */
13089 #define _LARGEFILE_SOURCE 1
13090 #include <sys/types.h> /* for off_t */
13091      #include <stdio.h>
13092 int
13093 main ()
13094 {
13095 int (*fp) (FILE *, off_t, int) = fseeko;
13096      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
13097   ;
13098   return 0;
13099 }
13100 _ACEOF
13101 if ac_fn_c_try_link "$LINENO"; then :
13102   ac_cv_sys_largefile_source=1; break
13103 fi
13104 rm -f core conftest.err conftest.$ac_objext \
13105     conftest$ac_exeext conftest.$ac_ext
13106   ac_cv_sys_largefile_source=unknown
13107   break
13108 done
13109 fi
13110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
13111 $as_echo "$ac_cv_sys_largefile_source" >&6; }
13112 case $ac_cv_sys_largefile_source in #(
13113   no | unknown) ;;
13114   *)
13115 cat >>confdefs.h <<_ACEOF
13116 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13117 _ACEOF
13118 ;;
13119 esac
13120 rm -rf conftest*
13121
13122 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13123 # in glibc 2.1.3, but that breaks too many other things.
13124 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13125 if test $ac_cv_sys_largefile_source != unknown; then
13126
13127 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
13128
13129 fi
13130 ;;
13131 esac
13132
13133 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
13134 # by calling it, 2009-04-02
13135 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
13136 if test "$PORTNAME" != "solaris"; then
13137 for ac_func in posix_fadvise
13138 do :
13139   ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
13140 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
13141   cat >>confdefs.h <<_ACEOF
13142 #define HAVE_POSIX_FADVISE 1
13143 _ACEOF
13144
13145 fi
13146 done
13147
13148 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
13149 "
13150 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
13151   ac_have_decl=1
13152 else
13153   ac_have_decl=0
13154 fi
13155
13156 cat >>confdefs.h <<_ACEOF
13157 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
13158 _ACEOF
13159
13160 fi
13161
13162 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
13163 "
13164 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
13165   ac_have_decl=1
13166 else
13167   ac_have_decl=0
13168 fi
13169
13170 cat >>confdefs.h <<_ACEOF
13171 #define HAVE_DECL_FDATASYNC $ac_have_decl
13172 _ACEOF
13173
13174 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
13175 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
13176   ac_have_decl=1
13177 else
13178   ac_have_decl=0
13179 fi
13180
13181 cat >>confdefs.h <<_ACEOF
13182 #define HAVE_DECL_STRLCAT $ac_have_decl
13183 _ACEOF
13184 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
13185 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
13186   ac_have_decl=1
13187 else
13188   ac_have_decl=0
13189 fi
13190
13191 cat >>confdefs.h <<_ACEOF
13192 #define HAVE_DECL_STRLCPY $ac_have_decl
13193 _ACEOF
13194
13195 # This is probably only present on macOS, but may as well check always
13196 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
13197 "
13198 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
13199   ac_have_decl=1
13200 else
13201   ac_have_decl=0
13202 fi
13203
13204 cat >>confdefs.h <<_ACEOF
13205 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
13206 _ACEOF
13207
13208
13209 HAVE_IPV6=no
13210 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default
13211 #include <netinet/in.h>
13212 "
13213 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
13214
13215 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
13216
13217          HAVE_IPV6=yes
13218 fi
13219
13220
13221
13222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
13223 $as_echo_n "checking for PS_STRINGS... " >&6; }
13224 if ${pgac_cv_var_PS_STRINGS+:} false; then :
13225   $as_echo_n "(cached) " >&6
13226 else
13227   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13228 /* end confdefs.h.  */
13229 #include <machine/vmparam.h>
13230 #include <sys/exec.h>
13231
13232 int
13233 main ()
13234 {
13235 PS_STRINGS->ps_nargvstr = 1;
13236 PS_STRINGS->ps_argvstr = "foo";
13237   ;
13238   return 0;
13239 }
13240 _ACEOF
13241 if ac_fn_c_try_link "$LINENO"; then :
13242   pgac_cv_var_PS_STRINGS=yes
13243 else
13244   pgac_cv_var_PS_STRINGS=no
13245 fi
13246 rm -f core conftest.err conftest.$ac_objext \
13247     conftest$ac_exeext conftest.$ac_ext
13248 fi
13249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
13250 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
13251 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
13252
13253 $as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
13254
13255 fi
13256
13257
13258 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
13259 # is missing.  Yes, there are machines that have only one.  We may
13260 # also decide to use snprintf.c if snprintf() is present but does not
13261 # have all the features we need --- see below.
13262
13263 if test "$PORTNAME" = "win32"; then
13264   # Win32 gets snprintf.c built unconditionally.
13265   #
13266   # To properly translate all NLS languages strings, we must support the
13267   # *printf() %$ format, which allows *printf() arguments to be selected
13268   # by position in the translated string.
13269   #
13270   # libintl versions < 0.13 use the native *printf() functions, and Win32
13271   # *printf() doesn't understand %$, so we must use our /port versions,
13272   # which do understand %$. libintl versions >= 0.13 include their own
13273   # *printf versions on Win32.  The libintl 0.13 release note text is:
13274   #
13275   #   C format strings with positions, as they arise when a translator
13276   #   needs to reorder a sentence, are now supported on all platforms.
13277   #   On those few platforms (NetBSD and Woe32) for which the native
13278   #   printf()/fprintf()/... functions don't support such format
13279   #   strings, replacements are provided through <libintl.h>.
13280   #
13281   # We could use libintl >= 0.13's *printf() if we were sure that we had
13282   # a litint >= 0.13 at runtime, but seeing that there is no clean way
13283   # to guarantee that, it is best to just use our own, so we are sure to
13284   # get %$ support. In include/port.h we disable the *printf() macros
13285   # that might have been defined by libintl.
13286   #
13287   # We do this unconditionally whether NLS is used or not so we are sure
13288   # that all Win32 libraries and binaries behave the same.
13289   pgac_need_repl_snprintf=yes
13290 else
13291   pgac_need_repl_snprintf=no
13292   for ac_func in snprintf
13293 do :
13294   ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
13295 if test "x$ac_cv_func_snprintf" = xyes; then :
13296   cat >>confdefs.h <<_ACEOF
13297 #define HAVE_SNPRINTF 1
13298 _ACEOF
13299
13300 else
13301   pgac_need_repl_snprintf=yes
13302 fi
13303 done
13304
13305   for ac_func in vsnprintf
13306 do :
13307   ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
13308 if test "x$ac_cv_func_vsnprintf" = xyes; then :
13309   cat >>confdefs.h <<_ACEOF
13310 #define HAVE_VSNPRINTF 1
13311 _ACEOF
13312
13313 else
13314   pgac_need_repl_snprintf=yes
13315 fi
13316 done
13317
13318 fi
13319
13320
13321 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
13322 # include/c.h will provide declarations.  Note this is a separate test
13323 # from whether the functions exist in the C library --- there are
13324 # systems that have the functions but don't bother to declare them :-(
13325
13326 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
13327 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
13328   ac_have_decl=1
13329 else
13330   ac_have_decl=0
13331 fi
13332
13333 cat >>confdefs.h <<_ACEOF
13334 #define HAVE_DECL_SNPRINTF $ac_have_decl
13335 _ACEOF
13336 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
13337 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
13338   ac_have_decl=1
13339 else
13340   ac_have_decl=0
13341 fi
13342
13343 cat >>confdefs.h <<_ACEOF
13344 #define HAVE_DECL_VSNPRINTF $ac_have_decl
13345 _ACEOF
13346
13347
13348
13349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf" >&5
13350 $as_echo_n "checking for isinf... " >&6; }
13351 if ${ac_cv_func_isinf+:} false; then :
13352   $as_echo_n "(cached) " >&6
13353 else
13354   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13355 /* end confdefs.h.  */
13356
13357 #include <math.h>
13358 double glob_double;
13359
13360 int
13361 main ()
13362 {
13363 return isinf(glob_double) ? 0 : 1;
13364   ;
13365   return 0;
13366 }
13367 _ACEOF
13368 if ac_fn_c_try_link "$LINENO"; then :
13369   ac_cv_func_isinf=yes
13370 else
13371   ac_cv_func_isinf=no
13372 fi
13373 rm -f core conftest.err conftest.$ac_objext \
13374     conftest$ac_exeext conftest.$ac_ext
13375 fi
13376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_isinf" >&5
13377 $as_echo "$ac_cv_func_isinf" >&6; }
13378
13379 if test $ac_cv_func_isinf = yes ; then
13380
13381 $as_echo "#define HAVE_ISINF 1" >>confdefs.h
13382
13383 else
13384   case " $LIBOBJS " in
13385   *" isinf.$ac_objext "* ) ;;
13386   *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
13387  ;;
13388 esac
13389
13390   # Look for a way to implement a substitute for isinf()
13391   for ac_func in fpclass fp_class fp_class_d class
13392 do :
13393   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13394 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13395 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13396   cat >>confdefs.h <<_ACEOF
13397 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13398 _ACEOF
13399  break
13400 fi
13401 done
13402
13403 fi
13404
13405 ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
13406 if test "x$ac_cv_func_crypt" = xyes; then :
13407   $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
13408
13409 else
13410   case " $LIBOBJS " in
13411   *" crypt.$ac_objext "* ) ;;
13412   *) LIBOBJS="$LIBOBJS crypt.$ac_objext"
13413  ;;
13414 esac
13415
13416 fi
13417
13418 ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
13419 if test "x$ac_cv_func_fls" = xyes; then :
13420   $as_echo "#define HAVE_FLS 1" >>confdefs.h
13421
13422 else
13423   case " $LIBOBJS " in
13424   *" fls.$ac_objext "* ) ;;
13425   *) LIBOBJS="$LIBOBJS fls.$ac_objext"
13426  ;;
13427 esac
13428
13429 fi
13430
13431 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
13432 if test "x$ac_cv_func_getopt" = xyes; then :
13433   $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
13434
13435 else
13436   case " $LIBOBJS " in
13437   *" getopt.$ac_objext "* ) ;;
13438   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
13439  ;;
13440 esac
13441
13442 fi
13443
13444 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
13445 if test "x$ac_cv_func_getrusage" = xyes; then :
13446   $as_echo "#define HAVE_GETRUSAGE 1" >>confdefs.h
13447
13448 else
13449   case " $LIBOBJS " in
13450   *" getrusage.$ac_objext "* ) ;;
13451   *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
13452  ;;
13453 esac
13454
13455 fi
13456
13457 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
13458 if test "x$ac_cv_func_inet_aton" = xyes; then :
13459   $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
13460
13461 else
13462   case " $LIBOBJS " in
13463   *" inet_aton.$ac_objext "* ) ;;
13464   *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
13465  ;;
13466 esac
13467
13468 fi
13469
13470 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
13471 if test "x$ac_cv_func_mkdtemp" = xyes; then :
13472   $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
13473
13474 else
13475   case " $LIBOBJS " in
13476   *" mkdtemp.$ac_objext "* ) ;;
13477   *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
13478  ;;
13479 esac
13480
13481 fi
13482
13483 ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
13484 if test "x$ac_cv_func_random" = xyes; then :
13485   $as_echo "#define HAVE_RANDOM 1" >>confdefs.h
13486
13487 else
13488   case " $LIBOBJS " in
13489   *" random.$ac_objext "* ) ;;
13490   *) LIBOBJS="$LIBOBJS random.$ac_objext"
13491  ;;
13492 esac
13493
13494 fi
13495
13496 ac_fn_c_check_func "$LINENO" "rint" "ac_cv_func_rint"
13497 if test "x$ac_cv_func_rint" = xyes; then :
13498   $as_echo "#define HAVE_RINT 1" >>confdefs.h
13499
13500 else
13501   case " $LIBOBJS " in
13502   *" rint.$ac_objext "* ) ;;
13503   *) LIBOBJS="$LIBOBJS rint.$ac_objext"
13504  ;;
13505 esac
13506
13507 fi
13508
13509 ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
13510 if test "x$ac_cv_func_srandom" = xyes; then :
13511   $as_echo "#define HAVE_SRANDOM 1" >>confdefs.h
13512
13513 else
13514   case " $LIBOBJS " in
13515   *" srandom.$ac_objext "* ) ;;
13516   *) LIBOBJS="$LIBOBJS srandom.$ac_objext"
13517  ;;
13518 esac
13519
13520 fi
13521
13522 ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
13523 if test "x$ac_cv_func_strerror" = xyes; then :
13524   $as_echo "#define HAVE_STRERROR 1" >>confdefs.h
13525
13526 else
13527   case " $LIBOBJS " in
13528   *" strerror.$ac_objext "* ) ;;
13529   *) LIBOBJS="$LIBOBJS strerror.$ac_objext"
13530  ;;
13531 esac
13532
13533 fi
13534
13535 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
13536 if test "x$ac_cv_func_strlcat" = xyes; then :
13537   $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
13538
13539 else
13540   case " $LIBOBJS " in
13541   *" strlcat.$ac_objext "* ) ;;
13542   *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
13543  ;;
13544 esac
13545
13546 fi
13547
13548 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
13549 if test "x$ac_cv_func_strlcpy" = xyes; then :
13550   $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
13551
13552 else
13553   case " $LIBOBJS " in
13554   *" strlcpy.$ac_objext "* ) ;;
13555   *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
13556  ;;
13557 esac
13558
13559 fi
13560
13561
13562
13563 case $host_os in
13564
13565         # Windows uses a specialised env handler
13566         # and doesn't need a replacement getpeereid because it doesn't use
13567         # Unix sockets.
13568         mingw*)
13569
13570 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
13571
13572
13573 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
13574
13575                 ac_cv_func_unsetenv=yes
13576                 ac_cv_func_getpeereid=yes;;
13577         *)
13578                 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
13579 if test "x$ac_cv_func_unsetenv" = xyes; then :
13580   $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
13581
13582 else
13583   case " $LIBOBJS " in
13584   *" unsetenv.$ac_objext "* ) ;;
13585   *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext"
13586  ;;
13587 esac
13588
13589 fi
13590
13591 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
13592 if test "x$ac_cv_func_getpeereid" = xyes; then :
13593   $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
13594
13595 else
13596   case " $LIBOBJS " in
13597   *" getpeereid.$ac_objext "* ) ;;
13598   *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
13599  ;;
13600 esac
13601
13602 fi
13603
13604
13605                 ;;
13606 esac
13607
13608 # System's version of getaddrinfo(), if any, may be used only if we found
13609 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
13610 # We use only our own getaddrinfo.c on Windows, but it's time to revisit that.
13611 if test x"$ac_cv_type_struct_addrinfo" = xyes && \
13612    test "$PORTNAME" != "win32"; then
13613   ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
13614 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
13615   $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
13616
13617 else
13618   case " $LIBOBJS " in
13619   *" getaddrinfo.$ac_objext "* ) ;;
13620   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
13621  ;;
13622 esac
13623
13624 fi
13625
13626
13627 else
13628   case " $LIBOBJS " in
13629   *" getaddrinfo.$ac_objext "* ) ;;
13630   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
13631  ;;
13632 esac
13633
13634 fi
13635
13636 # Similarly, use system's getopt_long() only if system provides struct option.
13637 if test x"$ac_cv_type_struct_option" = xyes ; then
13638   ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
13639 if test "x$ac_cv_func_getopt_long" = xyes; then :
13640   $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
13641
13642 else
13643   case " $LIBOBJS " in
13644   *" getopt_long.$ac_objext "* ) ;;
13645   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
13646  ;;
13647 esac
13648
13649 fi
13650
13651
13652 else
13653   case " $LIBOBJS " in
13654   *" getopt_long.$ac_objext "* ) ;;
13655   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
13656  ;;
13657 esac
13658
13659 fi
13660
13661 # Solaris' getopt() doesn't do what we want for long options, so always use
13662 # our version on that platform.
13663 if test "$PORTNAME" = "solaris"; then
13664   case " $LIBOBJS " in
13665   *" getopt.$ac_objext "* ) ;;
13666   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
13667  ;;
13668 esac
13669
13670 fi
13671
13672 # mingw has adopted a GNU-centric interpretation of optind/optreset,
13673 # so always use our version on Windows.
13674 if test "$PORTNAME" = "win32"; then
13675   case " $LIBOBJS " in
13676   *" getopt.$ac_objext "* ) ;;
13677   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
13678  ;;
13679 esac
13680
13681   case " $LIBOBJS " in
13682   *" getopt_long.$ac_objext "* ) ;;
13683   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
13684  ;;
13685 esac
13686
13687 fi
13688
13689 # Win32 (really MinGW) support
13690 if test "$PORTNAME" = "win32"; then
13691   ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
13692 if test "x$ac_cv_func_gettimeofday" = xyes; then :
13693   $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
13694
13695 else
13696   case " $LIBOBJS " in
13697   *" gettimeofday.$ac_objext "* ) ;;
13698   *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
13699  ;;
13700 esac
13701
13702 fi
13703
13704
13705   case " $LIBOBJS " in
13706   *" dirmod.$ac_objext "* ) ;;
13707   *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
13708  ;;
13709 esac
13710
13711   case " $LIBOBJS " in
13712   *" kill.$ac_objext "* ) ;;
13713   *) LIBOBJS="$LIBOBJS kill.$ac_objext"
13714  ;;
13715 esac
13716
13717   case " $LIBOBJS " in
13718   *" open.$ac_objext "* ) ;;
13719   *) LIBOBJS="$LIBOBJS open.$ac_objext"
13720  ;;
13721 esac
13722
13723   case " $LIBOBJS " in
13724   *" system.$ac_objext "* ) ;;
13725   *) LIBOBJS="$LIBOBJS system.$ac_objext"
13726  ;;
13727 esac
13728
13729   case " $LIBOBJS " in
13730   *" win32env.$ac_objext "* ) ;;
13731   *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
13732  ;;
13733 esac
13734
13735   case " $LIBOBJS " in
13736   *" win32error.$ac_objext "* ) ;;
13737   *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
13738  ;;
13739 esac
13740
13741   case " $LIBOBJS " in
13742   *" win32security.$ac_objext "* ) ;;
13743   *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
13744  ;;
13745 esac
13746
13747   case " $LIBOBJS " in
13748   *" win32setlocale.$ac_objext "* ) ;;
13749   *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
13750  ;;
13751 esac
13752
13753
13754 $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
13755
13756   ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
13757 #define WIN32_LEAN_AND_MEAN
13758 #include <windows.h>
13759 #include <string.h>
13760 #include <dbghelp.h>
13761 "
13762 if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
13763
13764 cat >>confdefs.h <<_ACEOF
13765 #define HAVE_MINIDUMP_TYPE 1
13766 _ACEOF
13767
13768 pgac_minidump_type=yes
13769 else
13770   pgac_minidump_type=no
13771 fi
13772
13773 fi
13774 if test x"$pgac_minidump_type" = x"yes" ; then
13775   have_win32_dbghelp=yes
13776
13777 else
13778   have_win32_dbghelp=no
13779
13780 fi
13781
13782 # Cygwin needs only a bit of that
13783 if test "$PORTNAME" = "cygwin"; then
13784   case " $LIBOBJS " in
13785   *" dirmod.$ac_objext "* ) ;;
13786   *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
13787  ;;
13788 esac
13789
13790 fi
13791
13792 ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
13793 /* NetBSD declares sys_siglist in unistd.h.  */
13794 #ifdef HAVE_UNISTD_H
13795 # include <unistd.h>
13796 #endif
13797
13798 "
13799 if test "x$ac_cv_have_decl_sys_siglist" = xyes; then :
13800   ac_have_decl=1
13801 else
13802   ac_have_decl=0
13803 fi
13804
13805 cat >>confdefs.h <<_ACEOF
13806 #define HAVE_DECL_SYS_SIGLIST $ac_have_decl
13807 _ACEOF
13808
13809
13810 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
13811 if test "x$ac_cv_func_syslog" = xyes; then :
13812   ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
13813 if test "x$ac_cv_header_syslog_h" = xyes; then :
13814
13815 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
13816
13817 fi
13818
13819
13820 fi
13821
13822
13823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
13824 $as_echo_n "checking for opterr... " >&6; }
13825 if ${pgac_cv_var_int_opterr+:} false; then :
13826   $as_echo_n "(cached) " >&6
13827 else
13828   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13829 /* end confdefs.h.  */
13830 #include <unistd.h>
13831 int
13832 main ()
13833 {
13834 extern int opterr; opterr = 1;
13835   ;
13836   return 0;
13837 }
13838 _ACEOF
13839 if ac_fn_c_try_link "$LINENO"; then :
13840   pgac_cv_var_int_opterr=yes
13841 else
13842   pgac_cv_var_int_opterr=no
13843 fi
13844 rm -f core conftest.err conftest.$ac_objext \
13845     conftest$ac_exeext conftest.$ac_ext
13846 fi
13847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
13848 $as_echo "$pgac_cv_var_int_opterr" >&6; }
13849 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
13850
13851 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
13852
13853 fi
13854
13855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
13856 $as_echo_n "checking for optreset... " >&6; }
13857 if ${pgac_cv_var_int_optreset+:} false; then :
13858   $as_echo_n "(cached) " >&6
13859 else
13860   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13861 /* end confdefs.h.  */
13862 #include <unistd.h>
13863 int
13864 main ()
13865 {
13866 extern int optreset; optreset = 1;
13867   ;
13868   return 0;
13869 }
13870 _ACEOF
13871 if ac_fn_c_try_link "$LINENO"; then :
13872   pgac_cv_var_int_optreset=yes
13873 else
13874   pgac_cv_var_int_optreset=no
13875 fi
13876 rm -f core conftest.err conftest.$ac_objext \
13877     conftest$ac_exeext conftest.$ac_ext
13878 fi
13879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
13880 $as_echo "$pgac_cv_var_int_optreset" >&6; }
13881 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
13882
13883 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
13884
13885 fi
13886
13887 for ac_func in strtoll strtoq
13888 do :
13889   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13890 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13891 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13892   cat >>confdefs.h <<_ACEOF
13893 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13894 _ACEOF
13895  break
13896 fi
13897 done
13898
13899 for ac_func in strtoull strtouq
13900 do :
13901   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13902 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13903 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13904   cat >>confdefs.h <<_ACEOF
13905 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13906 _ACEOF
13907  break
13908 fi
13909 done
13910
13911
13912 if test "$with_icu" = yes; then
13913   ac_save_CPPFLAGS=$CPPFLAGS
13914   CPPFLAGS="$ICU_CFLAGS $CPPFLAGS"
13915
13916   # Verify we have ICU's header files
13917   ac_fn_c_check_header_mongrel "$LINENO" "unicode/ucol.h" "ac_cv_header_unicode_ucol_h" "$ac_includes_default"
13918 if test "x$ac_cv_header_unicode_ucol_h" = xyes; then :
13919
13920 else
13921   as_fn_error $? "header file <unicode/ucol.h> is required for ICU" "$LINENO" 5
13922 fi
13923
13924
13925
13926   CPPFLAGS=$ac_save_CPPFLAGS
13927 fi
13928
13929 # Lastly, restore full LIBS list and check for readline/libedit symbols
13930 LIBS="$LIBS_including_readline"
13931
13932 if test "$with_readline" = yes; then
13933   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_append_character" >&5
13934 $as_echo_n "checking for rl_completion_append_character... " >&6; }
13935 if ${pgac_cv_var_rl_completion_append_character+:} false; then :
13936   $as_echo_n "(cached) " >&6
13937 else
13938   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13939 /* end confdefs.h.  */
13940 #include <stdio.h>
13941 #ifdef HAVE_READLINE_READLINE_H
13942 # include <readline/readline.h>
13943 #elif defined(HAVE_READLINE_H)
13944 # include <readline.h>
13945 #endif
13946
13947 int
13948 main ()
13949 {
13950 rl_completion_append_character = 'x';
13951   ;
13952   return 0;
13953 }
13954 _ACEOF
13955 if ac_fn_c_try_link "$LINENO"; then :
13956   pgac_cv_var_rl_completion_append_character=yes
13957 else
13958   pgac_cv_var_rl_completion_append_character=no
13959 fi
13960 rm -f core conftest.err conftest.$ac_objext \
13961     conftest$ac_exeext conftest.$ac_ext
13962 fi
13963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_append_character" >&5
13964 $as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
13965 if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
13966
13967 $as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
13968
13969 fi
13970   for ac_func in rl_completion_matches rl_filename_completion_function rl_reset_screen_size
13971 do :
13972   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13973 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13974 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13975   cat >>confdefs.h <<_ACEOF
13976 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13977 _ACEOF
13978
13979 fi
13980 done
13981
13982   for ac_func in append_history history_truncate_file
13983 do :
13984   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13985 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13986 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13987   cat >>confdefs.h <<_ACEOF
13988 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13989 _ACEOF
13990
13991 fi
13992 done
13993
13994 fi
13995
13996
13997 # This test makes sure that run tests work at all.  Sometimes a shared
13998 # library is found by the linker, but the runtime linker can't find it.
13999 # This check should come after all modifications of compiler or linker
14000 # variables, and before any other run tests.
14001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
14002 $as_echo_n "checking test program... " >&6; }
14003 if test "$cross_compiling" = yes; then :
14004   { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
14005 $as_echo "cross-compiling" >&6; }
14006 else
14007   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14008 /* end confdefs.h.  */
14009 int main() { return 0; }
14010 _ACEOF
14011 if ac_fn_c_try_run "$LINENO"; then :
14012   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
14013 $as_echo "ok" >&6; }
14014 else
14015   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
14016 $as_echo "failed" >&6; }
14017 as_fn_error $? "
14018 Could not execute a simple test program.  This may be a problem
14019 related to locating shared libraries.  Check the file 'config.log'
14020 for the exact reason." "$LINENO" 5
14021 fi
14022 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14023   conftest.$ac_objext conftest.beam conftest.$ac_ext
14024 fi
14025
14026
14027 # --------------------
14028 # Run tests below here
14029 # --------------------
14030
14031 # Force use of our snprintf if system's doesn't do arg control
14032 # See comment above at snprintf test for details.
14033 if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
14034   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports argument control" >&5
14035 $as_echo_n "checking whether snprintf supports argument control... " >&6; }
14036 if ${pgac_cv_snprintf_arg_control+:} false; then :
14037   $as_echo_n "(cached) " >&6
14038 else
14039   if test "$cross_compiling" = yes; then :
14040   pgac_cv_snprintf_arg_control=cross
14041 else
14042   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14043 /* end confdefs.h.  */
14044 #include <stdio.h>
14045 #include <string.h>
14046
14047 int main()
14048 {
14049   char buf[100];
14050
14051   /* can it swap arguments? */
14052   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
14053   if (strcmp(buf, "4 3") != 0)
14054     return 1;
14055   return 0;
14056 }
14057 _ACEOF
14058 if ac_fn_c_try_run "$LINENO"; then :
14059   pgac_cv_snprintf_arg_control=yes
14060 else
14061   pgac_cv_snprintf_arg_control=no
14062 fi
14063 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14064   conftest.$ac_objext conftest.beam conftest.$ac_ext
14065 fi
14066
14067
14068 fi
14069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_arg_control" >&5
14070 $as_echo "$pgac_cv_snprintf_arg_control" >&6; }
14071
14072   if test $pgac_cv_snprintf_arg_control != yes ; then
14073     pgac_need_repl_snprintf=yes
14074   fi
14075 fi
14076
14077
14078
14079
14080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
14081 $as_echo_n "checking whether long int is 64 bits... " >&6; }
14082 if ${pgac_cv_type_long_int_64+:} false; then :
14083   $as_echo_n "(cached) " >&6
14084 else
14085   if test "$cross_compiling" = yes; then :
14086   # If cross-compiling, check the size reported by the compiler and
14087 # trust that the arithmetic works.
14088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14089 /* end confdefs.h.  */
14090
14091 int
14092 main ()
14093 {
14094 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
14095 test_array [0] = 0;
14096 return test_array [0];
14097
14098   ;
14099   return 0;
14100 }
14101 _ACEOF
14102 if ac_fn_c_try_compile "$LINENO"; then :
14103   pgac_cv_type_long_int_64=yes
14104 else
14105   pgac_cv_type_long_int_64=no
14106 fi
14107 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14108 else
14109   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14110 /* end confdefs.h.  */
14111 typedef long int ac_int64;
14112
14113 /*
14114  * These are globals to discourage the compiler from folding all the
14115  * arithmetic tests down to compile-time constants.
14116  */
14117 ac_int64 a = 20000001;
14118 ac_int64 b = 40000005;
14119
14120 int does_int64_work()
14121 {
14122   ac_int64 c,d;
14123
14124   if (sizeof(ac_int64) != 8)
14125     return 0;                   /* definitely not the right size */
14126
14127   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
14128   c = a * b;
14129   d = (c + b) / b;
14130   if (d != a+1)
14131     return 0;
14132   return 1;
14133 }
14134
14135 int
14136 main() {
14137   return (! does_int64_work());
14138 }
14139 _ACEOF
14140 if ac_fn_c_try_run "$LINENO"; then :
14141   pgac_cv_type_long_int_64=yes
14142 else
14143   pgac_cv_type_long_int_64=no
14144 fi
14145 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14146   conftest.$ac_objext conftest.beam conftest.$ac_ext
14147 fi
14148
14149 fi
14150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
14151 $as_echo "$pgac_cv_type_long_int_64" >&6; }
14152
14153 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
14154 if test x"$pgac_cv_type_long_int_64" = xyes ; then
14155
14156 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
14157
14158 fi
14159
14160
14161 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
14162   pg_int64_type="long int"
14163 else
14164   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
14165 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
14166 if ${pgac_cv_type_long_long_int_64+:} false; then :
14167   $as_echo_n "(cached) " >&6
14168 else
14169   if test "$cross_compiling" = yes; then :
14170   # If cross-compiling, check the size reported by the compiler and
14171 # trust that the arithmetic works.
14172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14173 /* end confdefs.h.  */
14174
14175 int
14176 main ()
14177 {
14178 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
14179 test_array [0] = 0;
14180 return test_array [0];
14181
14182   ;
14183   return 0;
14184 }
14185 _ACEOF
14186 if ac_fn_c_try_compile "$LINENO"; then :
14187   pgac_cv_type_long_long_int_64=yes
14188 else
14189   pgac_cv_type_long_long_int_64=no
14190 fi
14191 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14192 else
14193   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14194 /* end confdefs.h.  */
14195 typedef long long int ac_int64;
14196
14197 /*
14198  * These are globals to discourage the compiler from folding all the
14199  * arithmetic tests down to compile-time constants.
14200  */
14201 ac_int64 a = 20000001;
14202 ac_int64 b = 40000005;
14203
14204 int does_int64_work()
14205 {
14206   ac_int64 c,d;
14207
14208   if (sizeof(ac_int64) != 8)
14209     return 0;                   /* definitely not the right size */
14210
14211   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
14212   c = a * b;
14213   d = (c + b) / b;
14214   if (d != a+1)
14215     return 0;
14216   return 1;
14217 }
14218
14219 int
14220 main() {
14221   return (! does_int64_work());
14222 }
14223 _ACEOF
14224 if ac_fn_c_try_run "$LINENO"; then :
14225   pgac_cv_type_long_long_int_64=yes
14226 else
14227   pgac_cv_type_long_long_int_64=no
14228 fi
14229 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14230   conftest.$ac_objext conftest.beam conftest.$ac_ext
14231 fi
14232
14233 fi
14234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
14235 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
14236
14237 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
14238 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
14239
14240 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
14241
14242 fi
14243
14244   if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
14245     pg_int64_type="long long int"
14246   else
14247     as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
14248   fi
14249 fi
14250
14251
14252 cat >>confdefs.h <<_ACEOF
14253 #define PG_INT64_TYPE $pg_int64_type
14254 _ACEOF
14255
14256
14257
14258 if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
14259   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14260 /* end confdefs.h.  */
14261
14262 #define INT64CONST(x)  x##LL
14263 long long int foo = INT64CONST(0x1234567890123456);
14264
14265 _ACEOF
14266 if ac_fn_c_try_compile "$LINENO"; then :
14267
14268 $as_echo "#define HAVE_LL_CONSTANTS 1" >>confdefs.h
14269
14270 fi
14271 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14272 fi
14273
14274
14275 # If we found "long int" is 64 bits, assume snprintf handles it.  If
14276 # we found we need to use "long long int", better check.  We cope with
14277 # snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
14278 # work, fall back to our own snprintf emulation (which we know uses %lld).
14279
14280 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
14281   if test $pgac_need_repl_snprintf = no; then
14282     { $as_echo "$as_me:${as_lineno-$LINENO}: checking snprintf length modifier for long long int" >&5
14283 $as_echo_n "checking snprintf length modifier for long long int... " >&6; }
14284 if ${pgac_cv_snprintf_long_long_int_modifier+:} false; then :
14285   $as_echo_n "(cached) " >&6
14286 else
14287   for pgac_modifier in 'll' 'q' 'I64'; do
14288 if test "$cross_compiling" = yes; then :
14289   pgac_cv_snprintf_long_long_int_modifier=cross; break
14290 else
14291   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14292 /* end confdefs.h.  */
14293 #include <stdio.h>
14294 #include <string.h>
14295 typedef long long int ac_int64;
14296 #define INT64_FORMAT "%${pgac_modifier}d"
14297
14298 ac_int64 a = 20000001;
14299 ac_int64 b = 40000005;
14300
14301 int does_int64_snprintf_work()
14302 {
14303   ac_int64 c;
14304   char buf[100];
14305
14306   if (sizeof(ac_int64) != 8)
14307     return 0;                   /* doesn't look like the right size */
14308
14309   c = a * b;
14310   snprintf(buf, 100, INT64_FORMAT, c);
14311   if (strcmp(buf, "800000140000005") != 0)
14312     return 0;                   /* either multiply or snprintf is busted */
14313   return 1;
14314 }
14315
14316 int
14317 main() {
14318   return (! does_int64_snprintf_work());
14319 }
14320 _ACEOF
14321 if ac_fn_c_try_run "$LINENO"; then :
14322   pgac_cv_snprintf_long_long_int_modifier=$pgac_modifier; break
14323 fi
14324 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14325   conftest.$ac_objext conftest.beam conftest.$ac_ext
14326 fi
14327
14328 done
14329 fi
14330
14331 LONG_LONG_INT_MODIFIER=''
14332
14333 case $pgac_cv_snprintf_long_long_int_modifier in
14334   cross) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot test (not on host machine)" >&5
14335 $as_echo "cannot test (not on host machine)" >&6; };;
14336   ?*)    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_long_long_int_modifier" >&5
14337 $as_echo "$pgac_cv_snprintf_long_long_int_modifier" >&6; }
14338          LONG_LONG_INT_MODIFIER=$pgac_cv_snprintf_long_long_int_modifier;;
14339   *)     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14340 $as_echo "none" >&6; };;
14341 esac
14342     if test "$LONG_LONG_INT_MODIFIER" = ""; then
14343       # Force usage of our own snprintf, since system snprintf is broken
14344       pgac_need_repl_snprintf=yes
14345       LONG_LONG_INT_MODIFIER='ll'
14346     fi
14347   else
14348     # Here if we previously decided we needed to use our own snprintf
14349     LONG_LONG_INT_MODIFIER='ll'
14350   fi
14351 else
14352   # Here if we are not using 'long long int' at all
14353   LONG_LONG_INT_MODIFIER='l'
14354 fi
14355
14356 INT64_MODIFIER="\"$LONG_LONG_INT_MODIFIER\""
14357
14358
14359 cat >>confdefs.h <<_ACEOF
14360 #define INT64_MODIFIER $INT64_MODIFIER
14361 _ACEOF
14362
14363
14364 # Also force use of our snprintf if the system's doesn't support the %z flag.
14365 if test "$pgac_need_repl_snprintf" = no; then
14366   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports the %z modifier" >&5
14367 $as_echo_n "checking whether snprintf supports the %z modifier... " >&6; }
14368 if ${pgac_cv_snprintf_size_t_support+:} false; then :
14369   $as_echo_n "(cached) " >&6
14370 else
14371   if test "$cross_compiling" = yes; then :
14372   pgac_cv_snprintf_size_t_support=cross
14373 else
14374   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14375 /* end confdefs.h.  */
14376 #include <stdio.h>
14377 #include <string.h>
14378
14379 int main()
14380 {
14381   char bufz[100];
14382   char buf64[100];
14383
14384   /*
14385    * Print the largest unsigned number fitting in a size_t using both %zu
14386    * and the previously-determined format for 64-bit integers.  Note that
14387    * we don't run this code unless we know snprintf handles 64-bit ints.
14388    */
14389   bufz[0] = '\0';  /* in case snprintf fails to emit anything */
14390   snprintf(bufz, sizeof(bufz), "%zu", ~((size_t) 0));
14391   snprintf(buf64, sizeof(buf64), "%" INT64_MODIFIER "u",
14392     (unsigned PG_INT64_TYPE) ~((size_t) 0));
14393   if (strcmp(bufz, buf64) != 0)
14394     return 1;
14395   return 0;
14396 }
14397 _ACEOF
14398 if ac_fn_c_try_run "$LINENO"; then :
14399   pgac_cv_snprintf_size_t_support=yes
14400 else
14401   pgac_cv_snprintf_size_t_support=no
14402 fi
14403 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14404   conftest.$ac_objext conftest.beam conftest.$ac_ext
14405 fi
14406
14407
14408 fi
14409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_size_t_support" >&5
14410 $as_echo "$pgac_cv_snprintf_size_t_support" >&6; }
14411
14412   if test "$pgac_cv_snprintf_size_t_support" != yes; then
14413     pgac_need_repl_snprintf=yes
14414   fi
14415 fi
14416
14417 # Now we have checked all the reasons to replace snprintf
14418 if test $pgac_need_repl_snprintf = yes; then
14419
14420 $as_echo "#define USE_REPL_SNPRINTF 1" >>confdefs.h
14421
14422   case " $LIBOBJS " in
14423   *" snprintf.$ac_objext "* ) ;;
14424   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
14425  ;;
14426 esac
14427
14428 fi
14429
14430 # Check size of void *, size_t (enables tweaks for > 32bit address space)
14431 # The cast to long int works around a bug in the HP C Compiler
14432 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14433 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14434 # This bug is HP SR number 8606223364.
14435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
14436 $as_echo_n "checking size of void *... " >&6; }
14437 if ${ac_cv_sizeof_void_p+:} false; then :
14438   $as_echo_n "(cached) " >&6
14439 else
14440   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
14441
14442 else
14443   if test "$ac_cv_type_void_p" = yes; then
14444      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14445 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14446 as_fn_error 77 "cannot compute sizeof (void *)
14447 See \`config.log' for more details" "$LINENO" 5; }
14448    else
14449      ac_cv_sizeof_void_p=0
14450    fi
14451 fi
14452
14453 fi
14454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
14455 $as_echo "$ac_cv_sizeof_void_p" >&6; }
14456
14457
14458
14459 cat >>confdefs.h <<_ACEOF
14460 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
14461 _ACEOF
14462
14463
14464 # The cast to long int works around a bug in the HP C Compiler
14465 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14466 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14467 # This bug is HP SR number 8606223364.
14468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
14469 $as_echo_n "checking size of size_t... " >&6; }
14470 if ${ac_cv_sizeof_size_t+:} false; then :
14471   $as_echo_n "(cached) " >&6
14472 else
14473   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
14474
14475 else
14476   if test "$ac_cv_type_size_t" = yes; then
14477      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14478 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14479 as_fn_error 77 "cannot compute sizeof (size_t)
14480 See \`config.log' for more details" "$LINENO" 5; }
14481    else
14482      ac_cv_sizeof_size_t=0
14483    fi
14484 fi
14485
14486 fi
14487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
14488 $as_echo "$ac_cv_sizeof_size_t" >&6; }
14489
14490
14491
14492 cat >>confdefs.h <<_ACEOF
14493 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
14494 _ACEOF
14495
14496
14497 # The cast to long int works around a bug in the HP C Compiler
14498 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14499 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14500 # This bug is HP SR number 8606223364.
14501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
14502 $as_echo_n "checking size of long... " >&6; }
14503 if ${ac_cv_sizeof_long+:} false; then :
14504   $as_echo_n "(cached) " >&6
14505 else
14506   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
14507
14508 else
14509   if test "$ac_cv_type_long" = yes; then
14510      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14511 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14512 as_fn_error 77 "cannot compute sizeof (long)
14513 See \`config.log' for more details" "$LINENO" 5; }
14514    else
14515      ac_cv_sizeof_long=0
14516    fi
14517 fi
14518
14519 fi
14520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
14521 $as_echo "$ac_cv_sizeof_long" >&6; }
14522
14523
14524
14525 cat >>confdefs.h <<_ACEOF
14526 #define SIZEOF_LONG $ac_cv_sizeof_long
14527 _ACEOF
14528
14529
14530
14531 # Decide whether float4 is passed by value: user-selectable, enabled by default
14532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float4 passed by value" >&5
14533 $as_echo_n "checking whether to build with float4 passed by value... " >&6; }
14534
14535
14536 # Check whether --enable-float4-byval was given.
14537 if test "${enable_float4_byval+set}" = set; then :
14538   enableval=$enable_float4_byval;
14539   case $enableval in
14540     yes)
14541
14542 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
14543
14544                float4passbyval=true
14545       ;;
14546     no)
14547       float4passbyval=false
14548       ;;
14549     *)
14550       as_fn_error $? "no argument expected for --enable-float4-byval option" "$LINENO" 5
14551       ;;
14552   esac
14553
14554 else
14555   enable_float4_byval=yes
14556
14557 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
14558
14559                float4passbyval=true
14560 fi
14561
14562
14563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float4_byval" >&5
14564 $as_echo "$enable_float4_byval" >&6; }
14565
14566 cat >>confdefs.h <<_ACEOF
14567 #define FLOAT4PASSBYVAL $float4passbyval
14568 _ACEOF
14569
14570
14571 # Decide whether float8 is passed by value.
14572 # Note: this setting also controls int8 and related types such as timestamp.
14573 # If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
14574 # If not, trying to select it is an error.
14575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float8 passed by value" >&5
14576 $as_echo_n "checking whether to build with float8 passed by value... " >&6; }
14577 if test $ac_cv_sizeof_void_p -ge 8 ; then
14578
14579
14580 # Check whether --enable-float8-byval was given.
14581 if test "${enable_float8_byval+set}" = set; then :
14582   enableval=$enable_float8_byval;
14583   case $enableval in
14584     yes)
14585       :
14586       ;;
14587     no)
14588       :
14589       ;;
14590     *)
14591       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
14592       ;;
14593   esac
14594
14595 else
14596   enable_float8_byval=yes
14597
14598 fi
14599
14600
14601 else
14602
14603
14604 # Check whether --enable-float8-byval was given.
14605 if test "${enable_float8_byval+set}" = set; then :
14606   enableval=$enable_float8_byval;
14607   case $enableval in
14608     yes)
14609       :
14610       ;;
14611     no)
14612       :
14613       ;;
14614     *)
14615       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
14616       ;;
14617   esac
14618
14619 else
14620   enable_float8_byval=no
14621
14622 fi
14623
14624
14625   if test "$enable_float8_byval" = yes ; then
14626     as_fn_error $? "--enable-float8-byval is not supported on 32-bit platforms." "$LINENO" 5
14627   fi
14628 fi
14629 if test "$enable_float8_byval" = yes ; then
14630
14631 $as_echo "#define USE_FLOAT8_BYVAL 1" >>confdefs.h
14632
14633   float8passbyval=true
14634 else
14635   float8passbyval=false
14636 fi
14637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float8_byval" >&5
14638 $as_echo "$enable_float8_byval" >&6; }
14639
14640 cat >>confdefs.h <<_ACEOF
14641 #define FLOAT8PASSBYVAL $float8passbyval
14642 _ACEOF
14643
14644
14645 # Determine memory alignment requirements for the basic C data types.
14646
14647 # The cast to long int works around a bug in the HP C Compiler,
14648 # see AC_CHECK_SIZEOF for more information.
14649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
14650 $as_echo_n "checking alignment of short... " >&6; }
14651 if ${ac_cv_alignof_short+:} false; then :
14652   $as_echo_n "(cached) " >&6
14653 else
14654   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short"        "$ac_includes_default
14655 #ifndef offsetof
14656 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14657 #endif
14658 typedef struct { char x; short y; } ac__type_alignof_;"; then :
14659
14660 else
14661   if test "$ac_cv_type_short" = yes; then
14662      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14663 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14664 as_fn_error 77 "cannot compute alignment of short
14665 See \`config.log' for more details" "$LINENO" 5; }
14666    else
14667      ac_cv_alignof_short=0
14668    fi
14669 fi
14670
14671 fi
14672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
14673 $as_echo "$ac_cv_alignof_short" >&6; }
14674
14675
14676
14677 cat >>confdefs.h <<_ACEOF
14678 #define ALIGNOF_SHORT $ac_cv_alignof_short
14679 _ACEOF
14680
14681
14682 # The cast to long int works around a bug in the HP C Compiler,
14683 # see AC_CHECK_SIZEOF for more information.
14684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
14685 $as_echo_n "checking alignment of int... " >&6; }
14686 if ${ac_cv_alignof_int+:} false; then :
14687   $as_echo_n "(cached) " >&6
14688 else
14689   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int"        "$ac_includes_default
14690 #ifndef offsetof
14691 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14692 #endif
14693 typedef struct { char x; int y; } ac__type_alignof_;"; then :
14694
14695 else
14696   if test "$ac_cv_type_int" = yes; then
14697      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14698 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14699 as_fn_error 77 "cannot compute alignment of int
14700 See \`config.log' for more details" "$LINENO" 5; }
14701    else
14702      ac_cv_alignof_int=0
14703    fi
14704 fi
14705
14706 fi
14707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
14708 $as_echo "$ac_cv_alignof_int" >&6; }
14709
14710
14711
14712 cat >>confdefs.h <<_ACEOF
14713 #define ALIGNOF_INT $ac_cv_alignof_int
14714 _ACEOF
14715
14716
14717 # The cast to long int works around a bug in the HP C Compiler,
14718 # see AC_CHECK_SIZEOF for more information.
14719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
14720 $as_echo_n "checking alignment of long... " >&6; }
14721 if ${ac_cv_alignof_long+:} false; then :
14722   $as_echo_n "(cached) " >&6
14723 else
14724   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long"        "$ac_includes_default
14725 #ifndef offsetof
14726 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14727 #endif
14728 typedef struct { char x; long y; } ac__type_alignof_;"; then :
14729
14730 else
14731   if test "$ac_cv_type_long" = yes; then
14732      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14733 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14734 as_fn_error 77 "cannot compute alignment of long
14735 See \`config.log' for more details" "$LINENO" 5; }
14736    else
14737      ac_cv_alignof_long=0
14738    fi
14739 fi
14740
14741 fi
14742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
14743 $as_echo "$ac_cv_alignof_long" >&6; }
14744
14745
14746
14747 cat >>confdefs.h <<_ACEOF
14748 #define ALIGNOF_LONG $ac_cv_alignof_long
14749 _ACEOF
14750
14751
14752 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
14753   # The cast to long int works around a bug in the HP C Compiler,
14754 # see AC_CHECK_SIZEOF for more information.
14755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
14756 $as_echo_n "checking alignment of long long int... " >&6; }
14757 if ${ac_cv_alignof_long_long_int+:} false; then :
14758   $as_echo_n "(cached) " >&6
14759 else
14760   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int"        "$ac_includes_default
14761 #ifndef offsetof
14762 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14763 #endif
14764 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
14765
14766 else
14767   if test "$ac_cv_type_long_long_int" = yes; then
14768      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14769 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14770 as_fn_error 77 "cannot compute alignment of long long int
14771 See \`config.log' for more details" "$LINENO" 5; }
14772    else
14773      ac_cv_alignof_long_long_int=0
14774    fi
14775 fi
14776
14777 fi
14778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
14779 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
14780
14781
14782
14783 cat >>confdefs.h <<_ACEOF
14784 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
14785 _ACEOF
14786
14787
14788 fi
14789 # The cast to long int works around a bug in the HP C Compiler,
14790 # see AC_CHECK_SIZEOF for more information.
14791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
14792 $as_echo_n "checking alignment of double... " >&6; }
14793 if ${ac_cv_alignof_double+:} false; then :
14794   $as_echo_n "(cached) " >&6
14795 else
14796   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double"        "$ac_includes_default
14797 #ifndef offsetof
14798 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14799 #endif
14800 typedef struct { char x; double y; } ac__type_alignof_;"; then :
14801
14802 else
14803   if test "$ac_cv_type_double" = yes; then
14804      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14805 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14806 as_fn_error 77 "cannot compute alignment of double
14807 See \`config.log' for more details" "$LINENO" 5; }
14808    else
14809      ac_cv_alignof_double=0
14810    fi
14811 fi
14812
14813 fi
14814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
14815 $as_echo "$ac_cv_alignof_double" >&6; }
14816
14817
14818
14819 cat >>confdefs.h <<_ACEOF
14820 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
14821 _ACEOF
14822
14823
14824
14825 # Compute maximum alignment of any basic type.
14826 # We assume long's alignment is at least as strong as char, short, or int;
14827 # but we must check long long (if it exists) and double.
14828
14829 MAX_ALIGNOF=$ac_cv_alignof_long
14830 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
14831   MAX_ALIGNOF=$ac_cv_alignof_double
14832 fi
14833 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
14834   MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
14835 fi
14836
14837 cat >>confdefs.h <<_ACEOF
14838 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
14839 _ACEOF
14840
14841
14842
14843 # Some platforms predefine the types int8, int16, etc.  Only check
14844 # a (hopefully) representative subset.
14845 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
14846 "
14847 if test "x$ac_cv_type_int8" = xyes; then :
14848
14849 cat >>confdefs.h <<_ACEOF
14850 #define HAVE_INT8 1
14851 _ACEOF
14852
14853
14854 fi
14855 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
14856 "
14857 if test "x$ac_cv_type_uint8" = xyes; then :
14858
14859 cat >>confdefs.h <<_ACEOF
14860 #define HAVE_UINT8 1
14861 _ACEOF
14862
14863
14864 fi
14865 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
14866 "
14867 if test "x$ac_cv_type_int64" = xyes; then :
14868
14869 cat >>confdefs.h <<_ACEOF
14870 #define HAVE_INT64 1
14871 _ACEOF
14872
14873
14874 fi
14875 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
14876 "
14877 if test "x$ac_cv_type_uint64" = xyes; then :
14878
14879 cat >>confdefs.h <<_ACEOF
14880 #define HAVE_UINT64 1
14881 _ACEOF
14882
14883
14884 fi
14885
14886
14887 # Check for extensions offering the integer scalar type __int128.
14888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
14889 $as_echo_n "checking for __int128... " >&6; }
14890 if ${pgac_cv__128bit_int+:} false; then :
14891   $as_echo_n "(cached) " >&6
14892 else
14893   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14894 /* end confdefs.h.  */
14895
14896 /*
14897  * These are globals to discourage the compiler from folding all the
14898  * arithmetic tests down to compile-time constants.  We do not have
14899  * convenient support for 64bit literals at this point...
14900  */
14901 __int128 a = 48828125;
14902 __int128 b = 97656255;
14903
14904 int
14905 main ()
14906 {
14907
14908 __int128 c,d;
14909 a = (a << 12) + 1; /* 200000000001 */
14910 b = (b << 12) + 5; /* 400000000005 */
14911 /* use the most relevant arithmetic ops */
14912 c = a * b;
14913 d = (c + b) / b;
14914 /* return different values, to prevent optimizations */
14915 if (d != a+1)
14916   return 0;
14917 return 1;
14918
14919   ;
14920   return 0;
14921 }
14922 _ACEOF
14923 if ac_fn_c_try_link "$LINENO"; then :
14924   pgac_cv__128bit_int=yes
14925 else
14926   pgac_cv__128bit_int=no
14927 fi
14928 rm -f core conftest.err conftest.$ac_objext \
14929     conftest$ac_exeext conftest.$ac_ext
14930 fi
14931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
14932 $as_echo "$pgac_cv__128bit_int" >&6; }
14933 if test x"$pgac_cv__128bit_int" = xyes ; then
14934
14935 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
14936
14937 fi
14938
14939 # Check for various atomic operations now that we have checked how to declare
14940 # 64bit integers.
14941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
14942 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
14943 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
14944   $as_echo_n "(cached) " >&6
14945 else
14946   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14947 /* end confdefs.h.  */
14948
14949 int
14950 main ()
14951 {
14952 char lock = 0;
14953    __sync_lock_test_and_set(&lock, 1);
14954    __sync_lock_release(&lock);
14955   ;
14956   return 0;
14957 }
14958 _ACEOF
14959 if ac_fn_c_try_link "$LINENO"; then :
14960   pgac_cv_gcc_sync_char_tas="yes"
14961 else
14962   pgac_cv_gcc_sync_char_tas="no"
14963 fi
14964 rm -f core conftest.err conftest.$ac_objext \
14965     conftest$ac_exeext conftest.$ac_ext
14966 fi
14967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
14968 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
14969 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
14970
14971 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
14972
14973 fi
14974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
14975 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
14976 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
14977   $as_echo_n "(cached) " >&6
14978 else
14979   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14980 /* end confdefs.h.  */
14981
14982 int
14983 main ()
14984 {
14985 int lock = 0;
14986    __sync_lock_test_and_set(&lock, 1);
14987    __sync_lock_release(&lock);
14988   ;
14989   return 0;
14990 }
14991 _ACEOF
14992 if ac_fn_c_try_link "$LINENO"; then :
14993   pgac_cv_gcc_sync_int32_tas="yes"
14994 else
14995   pgac_cv_gcc_sync_int32_tas="no"
14996 fi
14997 rm -f core conftest.err conftest.$ac_objext \
14998     conftest$ac_exeext conftest.$ac_ext
14999 fi
15000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
15001 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
15002 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
15003
15004 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
15005
15006 fi
15007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
15008 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
15009 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
15010   $as_echo_n "(cached) " >&6
15011 else
15012   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15013 /* end confdefs.h.  */
15014
15015 int
15016 main ()
15017 {
15018 int val = 0;
15019    __sync_val_compare_and_swap(&val, 0, 37);
15020   ;
15021   return 0;
15022 }
15023 _ACEOF
15024 if ac_fn_c_try_link "$LINENO"; then :
15025   pgac_cv_gcc_sync_int32_cas="yes"
15026 else
15027   pgac_cv_gcc_sync_int32_cas="no"
15028 fi
15029 rm -f core conftest.err conftest.$ac_objext \
15030     conftest$ac_exeext conftest.$ac_ext
15031 fi
15032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
15033 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
15034 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
15035
15036 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
15037
15038 fi
15039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
15040 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
15041 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
15042   $as_echo_n "(cached) " >&6
15043 else
15044   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15045 /* end confdefs.h.  */
15046
15047 int
15048 main ()
15049 {
15050 PG_INT64_TYPE lock = 0;
15051    __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
15052   ;
15053   return 0;
15054 }
15055 _ACEOF
15056 if ac_fn_c_try_link "$LINENO"; then :
15057   pgac_cv_gcc_sync_int64_cas="yes"
15058 else
15059   pgac_cv_gcc_sync_int64_cas="no"
15060 fi
15061 rm -f core conftest.err conftest.$ac_objext \
15062     conftest$ac_exeext conftest.$ac_ext
15063 fi
15064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
15065 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
15066 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
15067
15068 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
15069
15070 fi
15071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
15072 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
15073 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
15074   $as_echo_n "(cached) " >&6
15075 else
15076   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15077 /* end confdefs.h.  */
15078
15079 int
15080 main ()
15081 {
15082 int val = 0;
15083    int expect = 0;
15084    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
15085   ;
15086   return 0;
15087 }
15088 _ACEOF
15089 if ac_fn_c_try_link "$LINENO"; then :
15090   pgac_cv_gcc_atomic_int32_cas="yes"
15091 else
15092   pgac_cv_gcc_atomic_int32_cas="no"
15093 fi
15094 rm -f core conftest.err conftest.$ac_objext \
15095     conftest$ac_exeext conftest.$ac_ext
15096 fi
15097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
15098 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
15099 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
15100
15101 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
15102
15103 fi
15104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
15105 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
15106 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
15107   $as_echo_n "(cached) " >&6
15108 else
15109   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15110 /* end confdefs.h.  */
15111
15112 int
15113 main ()
15114 {
15115 PG_INT64_TYPE val = 0;
15116    PG_INT64_TYPE expect = 0;
15117    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
15118   ;
15119   return 0;
15120 }
15121 _ACEOF
15122 if ac_fn_c_try_link "$LINENO"; then :
15123   pgac_cv_gcc_atomic_int64_cas="yes"
15124 else
15125   pgac_cv_gcc_atomic_int64_cas="no"
15126 fi
15127 rm -f core conftest.err conftest.$ac_objext \
15128     conftest$ac_exeext conftest.$ac_ext
15129 fi
15130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
15131 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
15132 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
15133
15134 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
15135
15136 fi
15137
15138
15139 # Check for x86 cpuid instruction
15140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
15141 $as_echo_n "checking for __get_cpuid... " >&6; }
15142 if ${pgac_cv__get_cpuid+:} false; then :
15143   $as_echo_n "(cached) " >&6
15144 else
15145   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15146 /* end confdefs.h.  */
15147 #include <cpuid.h>
15148 int
15149 main ()
15150 {
15151 unsigned int exx[4] = {0, 0, 0, 0};
15152   __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
15153
15154   ;
15155   return 0;
15156 }
15157 _ACEOF
15158 if ac_fn_c_try_link "$LINENO"; then :
15159   pgac_cv__get_cpuid="yes"
15160 else
15161   pgac_cv__get_cpuid="no"
15162 fi
15163 rm -f core conftest.err conftest.$ac_objext \
15164     conftest$ac_exeext conftest.$ac_ext
15165 fi
15166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
15167 $as_echo "$pgac_cv__get_cpuid" >&6; }
15168 if test x"$pgac_cv__get_cpuid" = x"yes"; then
15169
15170 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
15171
15172 fi
15173
15174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
15175 $as_echo_n "checking for __cpuid... " >&6; }
15176 if ${pgac_cv__cpuid+:} false; then :
15177   $as_echo_n "(cached) " >&6
15178 else
15179   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15180 /* end confdefs.h.  */
15181 #include <intrin.h>
15182 int
15183 main ()
15184 {
15185 unsigned int exx[4] = {0, 0, 0, 0};
15186   __get_cpuid(exx[0], 1);
15187
15188   ;
15189   return 0;
15190 }
15191 _ACEOF
15192 if ac_fn_c_try_link "$LINENO"; then :
15193   pgac_cv__cpuid="yes"
15194 else
15195   pgac_cv__cpuid="no"
15196 fi
15197 rm -f core conftest.err conftest.$ac_objext \
15198     conftest$ac_exeext conftest.$ac_ext
15199 fi
15200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
15201 $as_echo "$pgac_cv__cpuid" >&6; }
15202 if test x"$pgac_cv__cpuid" = x"yes"; then
15203
15204 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
15205
15206 fi
15207
15208 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
15209 #
15210 # First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
15211 # with the default compiler flags. If not, check if adding the -msse4.2
15212 # flag helps. CFLAGS_SSE42 is set to -msse4.2 if that's required.
15213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
15214 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
15215 if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
15216   $as_echo_n "(cached) " >&6
15217 else
15218   pgac_save_CFLAGS=$CFLAGS
15219 CFLAGS="$pgac_save_CFLAGS "
15220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15221 /* end confdefs.h.  */
15222 #include <nmmintrin.h>
15223 int
15224 main ()
15225 {
15226 unsigned int crc = 0;
15227    crc = _mm_crc32_u8(crc, 0);
15228    crc = _mm_crc32_u32(crc, 0);
15229    /* return computed value, to prevent the above being optimized away */
15230    return crc == 0;
15231   ;
15232   return 0;
15233 }
15234 _ACEOF
15235 if ac_fn_c_try_link "$LINENO"; then :
15236   pgac_cv_sse42_crc32_intrinsics_=yes
15237 else
15238   pgac_cv_sse42_crc32_intrinsics_=no
15239 fi
15240 rm -f core conftest.err conftest.$ac_objext \
15241     conftest$ac_exeext conftest.$ac_ext
15242 CFLAGS="$pgac_save_CFLAGS"
15243 fi
15244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
15245 $as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
15246 if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
15247   CFLAGS_SSE42=""
15248   pgac_sse42_crc32_intrinsics=yes
15249 fi
15250
15251 if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
15252   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
15253 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
15254 if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
15255   $as_echo_n "(cached) " >&6
15256 else
15257   pgac_save_CFLAGS=$CFLAGS
15258 CFLAGS="$pgac_save_CFLAGS -msse4.2"
15259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15260 /* end confdefs.h.  */
15261 #include <nmmintrin.h>
15262 int
15263 main ()
15264 {
15265 unsigned int crc = 0;
15266    crc = _mm_crc32_u8(crc, 0);
15267    crc = _mm_crc32_u32(crc, 0);
15268    /* return computed value, to prevent the above being optimized away */
15269    return crc == 0;
15270   ;
15271   return 0;
15272 }
15273 _ACEOF
15274 if ac_fn_c_try_link "$LINENO"; then :
15275   pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
15276 else
15277   pgac_cv_sse42_crc32_intrinsics__msse4_2=no
15278 fi
15279 rm -f core conftest.err conftest.$ac_objext \
15280     conftest$ac_exeext conftest.$ac_ext
15281 CFLAGS="$pgac_save_CFLAGS"
15282 fi
15283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
15284 $as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
15285 if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
15286   CFLAGS_SSE42="-msse4.2"
15287   pgac_sse42_crc32_intrinsics=yes
15288 fi
15289
15290 fi
15291
15292
15293 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
15294 # define __SSE4_2__ in that case.
15295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15296 /* end confdefs.h.  */
15297
15298 int
15299 main ()
15300 {
15301
15302 #ifndef __SSE4_2__
15303 #error __SSE4_2__ not defined
15304 #endif
15305
15306   ;
15307   return 0;
15308 }
15309 _ACEOF
15310 if ac_fn_c_try_compile "$LINENO"; then :
15311   SSE4_2_TARGETED=1
15312 fi
15313 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15314
15315 # Select CRC-32C implementation.
15316 #
15317 # If we are targeting a processor that has SSE 4.2 instructions, we can use the
15318 # special CRC instructions for calculating CRC-32C. If we're not targeting such
15319 # a processor, but we can nevertheless produce code that uses the SSE
15320 # intrinsics, perhaps with some extra CFLAGS, compile both implementations and
15321 # select which one to use at runtime, depending on whether SSE 4.2 is supported
15322 # by the processor we're running on.
15323 #
15324 # You can override this logic by setting the appropriate USE_*_CRC32 flag to 1
15325 # in the template or configure command line.
15326 if test x"$USE_SSE42_CRC32C" = x"" && test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"" && test x"$USE_SLICING_BY_8_CRC32C" = x""; then
15327   if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
15328     USE_SSE42_CRC32C=1
15329   else
15330     # the CPUID instruction is needed for the runtime check.
15331     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
15332       USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
15333     else
15334       # fall back to slicing-by-8 algorithm which doesn't require any special
15335       # CPU support.
15336       USE_SLICING_BY_8_CRC32C=1
15337     fi
15338   fi
15339 fi
15340
15341 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
15342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
15343 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
15344 if test x"$USE_SSE42_CRC32C" = x"1"; then
15345
15346 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
15347
15348   PG_CRC32C_OBJS="pg_crc32c_sse42.o"
15349   { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
15350 $as_echo "SSE 4.2" >&6; }
15351 else
15352   if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
15353
15354 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
15355
15356     PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_choose.o"
15357     { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
15358 $as_echo "SSE 4.2 with runtime check" >&6; }
15359   else
15360
15361 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
15362
15363     PG_CRC32C_OBJS="pg_crc32c_sb8.o"
15364     { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
15365 $as_echo "slicing-by-8" >&6; }
15366   fi
15367 fi
15368
15369
15370
15371 # Select semaphore implementation type.
15372 if test "$PORTNAME" != "win32"; then
15373   if test x"$PREFERRED_SEMAPHORES" = x"NAMED_POSIX" ; then
15374     # Need sem_open for this
15375     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5
15376 $as_echo_n "checking for library containing sem_open... " >&6; }
15377 if ${ac_cv_search_sem_open+:} false; then :
15378   $as_echo_n "(cached) " >&6
15379 else
15380   ac_func_search_save_LIBS=$LIBS
15381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15382 /* end confdefs.h.  */
15383
15384 /* Override any GCC internal prototype to avoid an error.
15385    Use char because int might match the return type of a GCC
15386    builtin and then its argument prototype would still apply.  */
15387 #ifdef __cplusplus
15388 extern "C"
15389 #endif
15390 char sem_open ();
15391 int
15392 main ()
15393 {
15394 return sem_open ();
15395   ;
15396   return 0;
15397 }
15398 _ACEOF
15399 for ac_lib in '' rt pthread; do
15400   if test -z "$ac_lib"; then
15401     ac_res="none required"
15402   else
15403     ac_res=-l$ac_lib
15404     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15405   fi
15406   if ac_fn_c_try_link "$LINENO"; then :
15407   ac_cv_search_sem_open=$ac_res
15408 fi
15409 rm -f core conftest.err conftest.$ac_objext \
15410     conftest$ac_exeext
15411   if ${ac_cv_search_sem_open+:} false; then :
15412   break
15413 fi
15414 done
15415 if ${ac_cv_search_sem_open+:} false; then :
15416
15417 else
15418   ac_cv_search_sem_open=no
15419 fi
15420 rm conftest.$ac_ext
15421 LIBS=$ac_func_search_save_LIBS
15422 fi
15423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5
15424 $as_echo "$ac_cv_search_sem_open" >&6; }
15425 ac_res=$ac_cv_search_sem_open
15426 if test "$ac_res" != no; then :
15427   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15428   USE_NAMED_POSIX_SEMAPHORES=1
15429 fi
15430
15431   fi
15432   if test x"$PREFERRED_SEMAPHORES" = x"UNNAMED_POSIX" ; then
15433     # Need sem_init for this
15434     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
15435 $as_echo_n "checking for library containing sem_init... " >&6; }
15436 if ${ac_cv_search_sem_init+:} false; then :
15437   $as_echo_n "(cached) " >&6
15438 else
15439   ac_func_search_save_LIBS=$LIBS
15440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15441 /* end confdefs.h.  */
15442
15443 /* Override any GCC internal prototype to avoid an error.
15444    Use char because int might match the return type of a GCC
15445    builtin and then its argument prototype would still apply.  */
15446 #ifdef __cplusplus
15447 extern "C"
15448 #endif
15449 char sem_init ();
15450 int
15451 main ()
15452 {
15453 return sem_init ();
15454   ;
15455   return 0;
15456 }
15457 _ACEOF
15458 for ac_lib in '' rt pthread; do
15459   if test -z "$ac_lib"; then
15460     ac_res="none required"
15461   else
15462     ac_res=-l$ac_lib
15463     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15464   fi
15465   if ac_fn_c_try_link "$LINENO"; then :
15466   ac_cv_search_sem_init=$ac_res
15467 fi
15468 rm -f core conftest.err conftest.$ac_objext \
15469     conftest$ac_exeext
15470   if ${ac_cv_search_sem_init+:} false; then :
15471   break
15472 fi
15473 done
15474 if ${ac_cv_search_sem_init+:} false; then :
15475
15476 else
15477   ac_cv_search_sem_init=no
15478 fi
15479 rm conftest.$ac_ext
15480 LIBS=$ac_func_search_save_LIBS
15481 fi
15482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
15483 $as_echo "$ac_cv_search_sem_init" >&6; }
15484 ac_res=$ac_cv_search_sem_init
15485 if test "$ac_res" != no; then :
15486   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15487   USE_UNNAMED_POSIX_SEMAPHORES=1
15488 fi
15489
15490   fi
15491   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which semaphore API to use" >&5
15492 $as_echo_n "checking which semaphore API to use... " >&6; }
15493   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
15494
15495 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
15496
15497     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
15498     sematype="named POSIX"
15499   else
15500     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
15501
15502 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
15503
15504       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
15505       sematype="unnamed POSIX"
15506     else
15507
15508 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
15509
15510       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
15511       sematype="System V"
15512     fi
15513   fi
15514   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sematype" >&5
15515 $as_echo "$sematype" >&6; }
15516 else
15517
15518 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
15519
15520   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
15521 fi
15522
15523
15524 # Select shared-memory implementation type.
15525 if test "$PORTNAME" != "win32"; then
15526
15527 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
15528
15529   SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
15530 else
15531
15532 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
15533
15534   SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
15535 fi
15536
15537 # Select random number source
15538 #
15539 # You can override this logic by setting the appropriate USE_*RANDOM flag to 1
15540 # in the template or configure command line.
15541
15542 # If not selected manually, try to select a source automatically.
15543 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
15544   if test x"$with_openssl" = x"yes" ; then
15545     USE_OPENSSL_RANDOM=1
15546   elif test "$PORTNAME" = "win32" ; then
15547     USE_WIN32_RANDOM=1
15548   else
15549     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5
15550 $as_echo_n "checking for /dev/urandom... " >&6; }
15551 if ${ac_cv_file__dev_urandom+:} false; then :
15552   $as_echo_n "(cached) " >&6
15553 else
15554   test "$cross_compiling" = yes &&
15555   as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15556 if test -r "/dev/urandom"; then
15557   ac_cv_file__dev_urandom=yes
15558 else
15559   ac_cv_file__dev_urandom=no
15560 fi
15561 fi
15562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5
15563 $as_echo "$ac_cv_file__dev_urandom" >&6; }
15564 if test "x$ac_cv_file__dev_urandom" = xyes; then :
15565
15566 fi
15567
15568
15569     if test x"$ac_cv_file__dev_urandom" = x"yes" ; then
15570       USE_DEV_URANDOM=1
15571     fi
15572   fi
15573 fi
15574
15575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which random number source to use" >&5
15576 $as_echo_n "checking which random number source to use... " >&6; }
15577 if test "$enable_strong_random" = yes ; then
15578   if test x"$USE_OPENSSL_RANDOM" = x"1" ; then
15579
15580 $as_echo "#define USE_OPENSSL_RANDOM 1" >>confdefs.h
15581
15582     { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5
15583 $as_echo "OpenSSL" >&6; }
15584   elif test x"$USE_WIN32_RANDOM" = x"1" ; then
15585
15586 $as_echo "#define USE_WIN32_RANDOM 1" >>confdefs.h
15587
15588     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
15589 $as_echo "Windows native" >&6; }
15590   elif test x"$USE_DEV_URANDOM" = x"1" ; then
15591
15592 $as_echo "#define USE_DEV_URANDOM 1" >>confdefs.h
15593
15594     { $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
15595 $as_echo "/dev/urandom" >&6; }
15596   else
15597     as_fn_error $? "
15598 no source of strong random numbers was found
15599 PostgreSQL can use OpenSSL or /dev/urandom as a source of random numbers,
15600 for authentication protocols. You can use --disable-strong-random to use a
15601 built-in pseudo random number generator, but that may be insecure." "$LINENO" 5
15602   fi
15603
15604 $as_echo "#define HAVE_STRONG_RANDOM 1" >>confdefs.h
15605
15606 else
15607     { $as_echo "$as_me:${as_lineno-$LINENO}: result: weak builtin PRNG" >&5
15608 $as_echo "weak builtin PRNG" >&6; }
15609     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
15610 *** Not using a strong random number source may be insecure." >&5
15611 $as_echo "$as_me: WARNING:
15612 *** Not using a strong random number source may be insecure." >&2;}
15613 fi
15614
15615 # If not set in template file, set bytes to use libc memset()
15616 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
15617   MEMSET_LOOP_LIMIT=1024
15618 fi
15619
15620 cat >>confdefs.h <<_ACEOF
15621 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
15622 _ACEOF
15623
15624
15625
15626 if test "$enable_nls" = yes ; then
15627
15628   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
15629 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
15630 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
15631   $as_echo_n "(cached) " >&6
15632 else
15633   ac_func_search_save_LIBS=$LIBS
15634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15635 /* end confdefs.h.  */
15636
15637 /* Override any GCC internal prototype to avoid an error.
15638    Use char because int might match the return type of a GCC
15639    builtin and then its argument prototype would still apply.  */
15640 #ifdef __cplusplus
15641 extern "C"
15642 #endif
15643 char bind_textdomain_codeset ();
15644 int
15645 main ()
15646 {
15647 return bind_textdomain_codeset ();
15648   ;
15649   return 0;
15650 }
15651 _ACEOF
15652 for ac_lib in '' intl; do
15653   if test -z "$ac_lib"; then
15654     ac_res="none required"
15655   else
15656     ac_res=-l$ac_lib
15657     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15658   fi
15659   if ac_fn_c_try_link "$LINENO"; then :
15660   ac_cv_search_bind_textdomain_codeset=$ac_res
15661 fi
15662 rm -f core conftest.err conftest.$ac_objext \
15663     conftest$ac_exeext
15664   if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
15665   break
15666 fi
15667 done
15668 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
15669
15670 else
15671   ac_cv_search_bind_textdomain_codeset=no
15672 fi
15673 rm conftest.$ac_ext
15674 LIBS=$ac_func_search_save_LIBS
15675 fi
15676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
15677 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
15678 ac_res=$ac_cv_search_bind_textdomain_codeset
15679 if test "$ac_res" != no; then :
15680   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15681
15682 else
15683   as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
15684 fi
15685
15686   ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
15687 if test "x$ac_cv_header_libintl_h" = xyes; then :
15688
15689 else
15690   as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
15691 fi
15692
15693
15694   if test -z "$MSGFMT"; then
15695   for ac_prog in msgfmt
15696 do
15697   # Extract the first word of "$ac_prog", so it can be a program name with args.
15698 set dummy $ac_prog; ac_word=$2
15699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15700 $as_echo_n "checking for $ac_word... " >&6; }
15701 if ${ac_cv_path_MSGFMT+:} false; then :
15702   $as_echo_n "(cached) " >&6
15703 else
15704   case $MSGFMT in
15705   [\\/]* | ?:[\\/]*)
15706   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
15707   ;;
15708   *)
15709   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15710 for as_dir in $PATH
15711 do
15712   IFS=$as_save_IFS
15713   test -z "$as_dir" && as_dir=.
15714     for ac_exec_ext in '' $ac_executable_extensions; do
15715   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15716     ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
15717     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15718     break 2
15719   fi
15720 done
15721   done
15722 IFS=$as_save_IFS
15723
15724   ;;
15725 esac
15726 fi
15727 MSGFMT=$ac_cv_path_MSGFMT
15728 if test -n "$MSGFMT"; then
15729   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
15730 $as_echo "$MSGFMT" >&6; }
15731 else
15732   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15733 $as_echo "no" >&6; }
15734 fi
15735
15736
15737   test -n "$MSGFMT" && break
15738 done
15739
15740 else
15741   # Report the value of MSGFMT in configure's output in all cases.
15742   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGFMT" >&5
15743 $as_echo_n "checking for MSGFMT... " >&6; }
15744   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
15745 $as_echo "$MSGFMT" >&6; }
15746 fi
15747
15748   if test -z "$MSGFMT"; then
15749     as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
15750   fi
15751   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
15752 $as_echo_n "checking for msgfmt flags... " >&6; }
15753 if ${pgac_cv_msgfmt_flags+:} false; then :
15754   $as_echo_n "(cached) " >&6
15755 else
15756   if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
15757     pgac_cv_msgfmt_flags=-c
15758 fi
15759 fi
15760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
15761 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
15762   MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
15763
15764   if test -z "$MSGMERGE"; then
15765   for ac_prog in msgmerge
15766 do
15767   # Extract the first word of "$ac_prog", so it can be a program name with args.
15768 set dummy $ac_prog; ac_word=$2
15769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15770 $as_echo_n "checking for $ac_word... " >&6; }
15771 if ${ac_cv_path_MSGMERGE+:} false; then :
15772   $as_echo_n "(cached) " >&6
15773 else
15774   case $MSGMERGE in
15775   [\\/]* | ?:[\\/]*)
15776   ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
15777   ;;
15778   *)
15779   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15780 for as_dir in $PATH
15781 do
15782   IFS=$as_save_IFS
15783   test -z "$as_dir" && as_dir=.
15784     for ac_exec_ext in '' $ac_executable_extensions; do
15785   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15786     ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
15787     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15788     break 2
15789   fi
15790 done
15791   done
15792 IFS=$as_save_IFS
15793
15794   ;;
15795 esac
15796 fi
15797 MSGMERGE=$ac_cv_path_MSGMERGE
15798 if test -n "$MSGMERGE"; then
15799   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
15800 $as_echo "$MSGMERGE" >&6; }
15801 else
15802   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15803 $as_echo "no" >&6; }
15804 fi
15805
15806
15807   test -n "$MSGMERGE" && break
15808 done
15809
15810 else
15811   # Report the value of MSGMERGE in configure's output in all cases.
15812   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGMERGE" >&5
15813 $as_echo_n "checking for MSGMERGE... " >&6; }
15814   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
15815 $as_echo "$MSGMERGE" >&6; }
15816 fi
15817
15818   if test -z "$XGETTEXT"; then
15819   for ac_prog in xgettext
15820 do
15821   # Extract the first word of "$ac_prog", so it can be a program name with args.
15822 set dummy $ac_prog; ac_word=$2
15823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15824 $as_echo_n "checking for $ac_word... " >&6; }
15825 if ${ac_cv_path_XGETTEXT+:} false; then :
15826   $as_echo_n "(cached) " >&6
15827 else
15828   case $XGETTEXT in
15829   [\\/]* | ?:[\\/]*)
15830   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
15831   ;;
15832   *)
15833   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15834 for as_dir in $PATH
15835 do
15836   IFS=$as_save_IFS
15837   test -z "$as_dir" && as_dir=.
15838     for ac_exec_ext in '' $ac_executable_extensions; do
15839   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15840     ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
15841     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15842     break 2
15843   fi
15844 done
15845   done
15846 IFS=$as_save_IFS
15847
15848   ;;
15849 esac
15850 fi
15851 XGETTEXT=$ac_cv_path_XGETTEXT
15852 if test -n "$XGETTEXT"; then
15853   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
15854 $as_echo "$XGETTEXT" >&6; }
15855 else
15856   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15857 $as_echo "no" >&6; }
15858 fi
15859
15860
15861   test -n "$XGETTEXT" && break
15862 done
15863
15864 else
15865   # Report the value of XGETTEXT in configure's output in all cases.
15866   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XGETTEXT" >&5
15867 $as_echo_n "checking for XGETTEXT... " >&6; }
15868   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
15869 $as_echo "$XGETTEXT" >&6; }
15870 fi
15871
15872
15873 fi
15874
15875 # Check for Tcl configuration script tclConfig.sh
15876 if test "$with_tcl" = yes; then
15877     if test -z "$TCLSH"; then
15878   for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
15879 do
15880   # Extract the first word of "$ac_prog", so it can be a program name with args.
15881 set dummy $ac_prog; ac_word=$2
15882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15883 $as_echo_n "checking for $ac_word... " >&6; }
15884 if ${ac_cv_path_TCLSH+:} false; then :
15885   $as_echo_n "(cached) " >&6
15886 else
15887   case $TCLSH in
15888   [\\/]* | ?:[\\/]*)
15889   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
15890   ;;
15891   *)
15892   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15893 for as_dir in $PATH
15894 do
15895   IFS=$as_save_IFS
15896   test -z "$as_dir" && as_dir=.
15897     for ac_exec_ext in '' $ac_executable_extensions; do
15898   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15899     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
15900     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15901     break 2
15902   fi
15903 done
15904   done
15905 IFS=$as_save_IFS
15906
15907   ;;
15908 esac
15909 fi
15910 TCLSH=$ac_cv_path_TCLSH
15911 if test -n "$TCLSH"; then
15912   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
15913 $as_echo "$TCLSH" >&6; }
15914 else
15915   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15916 $as_echo "no" >&6; }
15917 fi
15918
15919
15920   test -n "$TCLSH" && break
15921 done
15922
15923 else
15924   # Report the value of TCLSH in configure's output in all cases.
15925   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCLSH" >&5
15926 $as_echo_n "checking for TCLSH... " >&6; }
15927   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
15928 $as_echo "$TCLSH" >&6; }
15929 fi
15930
15931 if test x"$TCLSH" = x""; then
15932   as_fn_error $? "Tcl shell not found" "$LINENO" 5
15933 fi
15934
15935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
15936 $as_echo_n "checking for tclConfig.sh... " >&6; }
15937 # Let user override test
15938 if test -z "$TCL_CONFIG_SH"; then
15939     pgac_test_dirs="$with_tclconfig"
15940
15941     set X $pgac_test_dirs; shift
15942     if test $# -eq 0; then
15943         test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
15944         set X `echo 'puts $auto_path' | $TCLSH`; shift
15945     fi
15946
15947     for pgac_dir do
15948         if test -r "$pgac_dir/tclConfig.sh"; then
15949             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
15950             break
15951         fi
15952     done
15953 fi
15954
15955 if test -z "$TCL_CONFIG_SH"; then
15956     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15957 $as_echo "no" >&6; }
15958     as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
15959 else
15960     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
15961 $as_echo "$TCL_CONFIG_SH" >&6; }
15962 fi
15963
15964
15965
15966     . "$TCL_CONFIG_SH"
15967 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
15968 eval TCL_LIBS=\"$TCL_LIBS\"
15969 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
15970 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
15971
15972         if test "$TCL_SHARED_BUILD" != 1; then
15973       as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
15974 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
15975     fi
15976     # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
15977     ac_save_CPPFLAGS=$CPPFLAGS
15978     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
15979     ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
15980 if test "x$ac_cv_header_tcl_h" = xyes; then :
15981
15982 else
15983   as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
15984 fi
15985
15986
15987     CPPFLAGS=$ac_save_CPPFLAGS
15988 fi
15989
15990 # check for <perl.h>
15991 if test "$with_perl" = yes; then
15992   ac_save_CPPFLAGS=$CPPFLAGS
15993   CPPFLAGS="$CPPFLAGS -I$perl_archlibexp/CORE"
15994   ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
15995 "
15996 if test "x$ac_cv_header_perl_h" = xyes; then :
15997
15998 else
15999   as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
16000 fi
16001
16002
16003   # While we're at it, check that we can link to libperl.
16004   # On most platforms, if perl.h is there then libperl.so will be too, but at
16005   # this writing Debian packages them separately.  There is no known reason to
16006   # waste cycles on separate probes for the Tcl or Python libraries, though.
16007   pgac_save_LIBS=$LIBS
16008   LIBS="$perl_embed_ldflags"
16009   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
16010 $as_echo_n "checking for libperl... " >&6; }
16011   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16012 /* end confdefs.h.  */
16013
16014 #include <EXTERN.h>
16015 #include <perl.h>
16016
16017 int
16018 main ()
16019 {
16020 perl_alloc();
16021   ;
16022   return 0;
16023 }
16024 _ACEOF
16025 if ac_fn_c_try_link "$LINENO"; then :
16026   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16027 $as_echo "yes" >&6; }
16028 else
16029   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16030 $as_echo "no" >&6; }
16031      as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
16032 fi
16033 rm -f core conftest.err conftest.$ac_objext \
16034     conftest$ac_exeext conftest.$ac_ext
16035   LIBS=$pgac_save_LIBS
16036   CPPFLAGS=$ac_save_CPPFLAGS
16037 fi
16038
16039 # check for <Python.h>
16040 if test "$with_python" = yes; then
16041   ac_save_CPPFLAGS=$CPPFLAGS
16042   CPPFLAGS="$python_includespec $CPPFLAGS"
16043   ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
16044 if test "x$ac_cv_header_Python_h" = xyes; then :
16045
16046 else
16047   as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
16048 fi
16049
16050
16051   CPPFLAGS=$ac_save_CPPFLAGS
16052 fi
16053
16054 #
16055 # Check for DocBook and tools
16056 #
16057 if test -z "$NSGMLS"; then
16058   for ac_prog in onsgmls nsgmls
16059 do
16060   # Extract the first word of "$ac_prog", so it can be a program name with args.
16061 set dummy $ac_prog; ac_word=$2
16062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16063 $as_echo_n "checking for $ac_word... " >&6; }
16064 if ${ac_cv_path_NSGMLS+:} false; then :
16065   $as_echo_n "(cached) " >&6
16066 else
16067   case $NSGMLS in
16068   [\\/]* | ?:[\\/]*)
16069   ac_cv_path_NSGMLS="$NSGMLS" # Let the user override the test with a path.
16070   ;;
16071   *)
16072   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16073 for as_dir in $PATH
16074 do
16075   IFS=$as_save_IFS
16076   test -z "$as_dir" && as_dir=.
16077     for ac_exec_ext in '' $ac_executable_extensions; do
16078   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16079     ac_cv_path_NSGMLS="$as_dir/$ac_word$ac_exec_ext"
16080     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16081     break 2
16082   fi
16083 done
16084   done
16085 IFS=$as_save_IFS
16086
16087   ;;
16088 esac
16089 fi
16090 NSGMLS=$ac_cv_path_NSGMLS
16091 if test -n "$NSGMLS"; then
16092   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NSGMLS" >&5
16093 $as_echo "$NSGMLS" >&6; }
16094 else
16095   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16096 $as_echo "no" >&6; }
16097 fi
16098
16099
16100   test -n "$NSGMLS" && break
16101 done
16102
16103 else
16104   # Report the value of NSGMLS in configure's output in all cases.
16105   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NSGMLS" >&5
16106 $as_echo_n "checking for NSGMLS... " >&6; }
16107   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NSGMLS" >&5
16108 $as_echo "$NSGMLS" >&6; }
16109 fi
16110
16111
16112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook V4.2" >&5
16113 $as_echo_n "checking for DocBook V4.2... " >&6; }
16114 if ${pgac_cv_check_docbook+:} false; then :
16115   $as_echo_n "(cached) " >&6
16116 else
16117   cat >conftest.sgml <<EOF
16118 <!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
16119 <book>
16120  <title>test</title>
16121  <chapter>
16122   <title>random</title>
16123    <sect1>
16124     <title>testsect</title>
16125     <para>text</para>
16126   </sect1>
16127  </chapter>
16128 </book>
16129 EOF
16130
16131 pgac_cv_check_docbook=no
16132
16133 if test -n "$NSGMLS"; then
16134   $NSGMLS -s conftest.sgml 1>&5 2>&1
16135   if test $? -eq 0; then
16136     pgac_cv_check_docbook=yes
16137   fi
16138 fi
16139 rm -f conftest.sgml
16140 fi
16141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_docbook" >&5
16142 $as_echo "$pgac_cv_check_docbook" >&6; }
16143
16144 have_docbook=$pgac_cv_check_docbook
16145
16146
16147 if test -z "$DBTOEPUB"; then
16148   for ac_prog in dbtoepub
16149 do
16150   # Extract the first word of "$ac_prog", so it can be a program name with args.
16151 set dummy $ac_prog; ac_word=$2
16152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16153 $as_echo_n "checking for $ac_word... " >&6; }
16154 if ${ac_cv_path_DBTOEPUB+:} false; then :
16155   $as_echo_n "(cached) " >&6
16156 else
16157   case $DBTOEPUB in
16158   [\\/]* | ?:[\\/]*)
16159   ac_cv_path_DBTOEPUB="$DBTOEPUB" # Let the user override the test with a path.
16160   ;;
16161   *)
16162   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16163 for as_dir in $PATH
16164 do
16165   IFS=$as_save_IFS
16166   test -z "$as_dir" && as_dir=.
16167     for ac_exec_ext in '' $ac_executable_extensions; do
16168   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16169     ac_cv_path_DBTOEPUB="$as_dir/$ac_word$ac_exec_ext"
16170     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16171     break 2
16172   fi
16173 done
16174   done
16175 IFS=$as_save_IFS
16176
16177   ;;
16178 esac
16179 fi
16180 DBTOEPUB=$ac_cv_path_DBTOEPUB
16181 if test -n "$DBTOEPUB"; then
16182   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
16183 $as_echo "$DBTOEPUB" >&6; }
16184 else
16185   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16186 $as_echo "no" >&6; }
16187 fi
16188
16189
16190   test -n "$DBTOEPUB" && break
16191 done
16192
16193 else
16194   # Report the value of DBTOEPUB in configure's output in all cases.
16195   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBTOEPUB" >&5
16196 $as_echo_n "checking for DBTOEPUB... " >&6; }
16197   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
16198 $as_echo "$DBTOEPUB" >&6; }
16199 fi
16200
16201 if test -z "$XMLLINT"; then
16202   for ac_prog in xmllint
16203 do
16204   # Extract the first word of "$ac_prog", so it can be a program name with args.
16205 set dummy $ac_prog; ac_word=$2
16206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16207 $as_echo_n "checking for $ac_word... " >&6; }
16208 if ${ac_cv_path_XMLLINT+:} false; then :
16209   $as_echo_n "(cached) " >&6
16210 else
16211   case $XMLLINT in
16212   [\\/]* | ?:[\\/]*)
16213   ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path.
16214   ;;
16215   *)
16216   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16217 for as_dir in $PATH
16218 do
16219   IFS=$as_save_IFS
16220   test -z "$as_dir" && as_dir=.
16221     for ac_exec_ext in '' $ac_executable_extensions; do
16222   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16223     ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext"
16224     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16225     break 2
16226   fi
16227 done
16228   done
16229 IFS=$as_save_IFS
16230
16231   ;;
16232 esac
16233 fi
16234 XMLLINT=$ac_cv_path_XMLLINT
16235 if test -n "$XMLLINT"; then
16236   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
16237 $as_echo "$XMLLINT" >&6; }
16238 else
16239   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16240 $as_echo "no" >&6; }
16241 fi
16242
16243
16244   test -n "$XMLLINT" && break
16245 done
16246
16247 else
16248   # Report the value of XMLLINT in configure's output in all cases.
16249   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMLLINT" >&5
16250 $as_echo_n "checking for XMLLINT... " >&6; }
16251   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
16252 $as_echo "$XMLLINT" >&6; }
16253 fi
16254
16255 if test -z "$XSLTPROC"; then
16256   for ac_prog in xsltproc
16257 do
16258   # Extract the first word of "$ac_prog", so it can be a program name with args.
16259 set dummy $ac_prog; ac_word=$2
16260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16261 $as_echo_n "checking for $ac_word... " >&6; }
16262 if ${ac_cv_path_XSLTPROC+:} false; then :
16263   $as_echo_n "(cached) " >&6
16264 else
16265   case $XSLTPROC in
16266   [\\/]* | ?:[\\/]*)
16267   ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
16268   ;;
16269   *)
16270   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16271 for as_dir in $PATH
16272 do
16273   IFS=$as_save_IFS
16274   test -z "$as_dir" && as_dir=.
16275     for ac_exec_ext in '' $ac_executable_extensions; do
16276   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16277     ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
16278     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16279     break 2
16280   fi
16281 done
16282   done
16283 IFS=$as_save_IFS
16284
16285   ;;
16286 esac
16287 fi
16288 XSLTPROC=$ac_cv_path_XSLTPROC
16289 if test -n "$XSLTPROC"; then
16290   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
16291 $as_echo "$XSLTPROC" >&6; }
16292 else
16293   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16294 $as_echo "no" >&6; }
16295 fi
16296
16297
16298   test -n "$XSLTPROC" && break
16299 done
16300
16301 else
16302   # Report the value of XSLTPROC in configure's output in all cases.
16303   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSLTPROC" >&5
16304 $as_echo_n "checking for XSLTPROC... " >&6; }
16305   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
16306 $as_echo "$XSLTPROC" >&6; }
16307 fi
16308
16309 if test -z "$OSX"; then
16310   for ac_prog in osx sgml2xml sx
16311 do
16312   # Extract the first word of "$ac_prog", so it can be a program name with args.
16313 set dummy $ac_prog; ac_word=$2
16314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16315 $as_echo_n "checking for $ac_word... " >&6; }
16316 if ${ac_cv_path_OSX+:} false; then :
16317   $as_echo_n "(cached) " >&6
16318 else
16319   case $OSX in
16320   [\\/]* | ?:[\\/]*)
16321   ac_cv_path_OSX="$OSX" # Let the user override the test with a path.
16322   ;;
16323   *)
16324   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16325 for as_dir in $PATH
16326 do
16327   IFS=$as_save_IFS
16328   test -z "$as_dir" && as_dir=.
16329     for ac_exec_ext in '' $ac_executable_extensions; do
16330   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16331     ac_cv_path_OSX="$as_dir/$ac_word$ac_exec_ext"
16332     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16333     break 2
16334   fi
16335 done
16336   done
16337 IFS=$as_save_IFS
16338
16339   ;;
16340 esac
16341 fi
16342 OSX=$ac_cv_path_OSX
16343 if test -n "$OSX"; then
16344   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OSX" >&5
16345 $as_echo "$OSX" >&6; }
16346 else
16347   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16348 $as_echo "no" >&6; }
16349 fi
16350
16351
16352   test -n "$OSX" && break
16353 done
16354
16355 else
16356   # Report the value of OSX in configure's output in all cases.
16357   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX" >&5
16358 $as_echo_n "checking for OSX... " >&6; }
16359   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OSX" >&5
16360 $as_echo "$OSX" >&6; }
16361 fi
16362
16363 if test -z "$FOP"; then
16364   for ac_prog in fop
16365 do
16366   # Extract the first word of "$ac_prog", so it can be a program name with args.
16367 set dummy $ac_prog; ac_word=$2
16368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16369 $as_echo_n "checking for $ac_word... " >&6; }
16370 if ${ac_cv_path_FOP+:} false; then :
16371   $as_echo_n "(cached) " >&6
16372 else
16373   case $FOP in
16374   [\\/]* | ?:[\\/]*)
16375   ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
16376   ;;
16377   *)
16378   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16379 for as_dir in $PATH
16380 do
16381   IFS=$as_save_IFS
16382   test -z "$as_dir" && as_dir=.
16383     for ac_exec_ext in '' $ac_executable_extensions; do
16384   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16385     ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
16386     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16387     break 2
16388   fi
16389 done
16390   done
16391 IFS=$as_save_IFS
16392
16393   ;;
16394 esac
16395 fi
16396 FOP=$ac_cv_path_FOP
16397 if test -n "$FOP"; then
16398   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
16399 $as_echo "$FOP" >&6; }
16400 else
16401   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16402 $as_echo "no" >&6; }
16403 fi
16404
16405
16406   test -n "$FOP" && break
16407 done
16408
16409 else
16410   # Report the value of FOP in configure's output in all cases.
16411   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FOP" >&5
16412 $as_echo_n "checking for FOP... " >&6; }
16413   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
16414 $as_echo "$FOP" >&6; }
16415 fi
16416
16417
16418 #
16419 # Check for test tools
16420 #
16421 if test "$enable_tap_tests" = yes; then
16422   # Check for necessary modules, unless user has specified the "prove" to use;
16423   # in that case it's her responsibility to have a working configuration.
16424   # (prove might be part of a different Perl installation than perl, eg on
16425   # MSys, so the result of AX_PROG_PERL_MODULES could be irrelevant anyway.)
16426   if test -z "$PROVE"; then
16427
16428
16429
16430
16431
16432
16433 # Make sure we have perl
16434 if test -z "$PERL"; then
16435 # Extract the first word of "perl", so it can be a program name with args.
16436 set dummy perl; ac_word=$2
16437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16438 $as_echo_n "checking for $ac_word... " >&6; }
16439 if ${ac_cv_prog_PERL+:} false; then :
16440   $as_echo_n "(cached) " >&6
16441 else
16442   if test -n "$PERL"; then
16443   ac_cv_prog_PERL="$PERL" # Let the user override the test.
16444 else
16445 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16446 for as_dir in $PATH
16447 do
16448   IFS=$as_save_IFS
16449   test -z "$as_dir" && as_dir=.
16450     for ac_exec_ext in '' $ac_executable_extensions; do
16451   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16452     ac_cv_prog_PERL="perl"
16453     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16454     break 2
16455   fi
16456 done
16457   done
16458 IFS=$as_save_IFS
16459
16460 fi
16461 fi
16462 PERL=$ac_cv_prog_PERL
16463 if test -n "$PERL"; then
16464   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
16465 $as_echo "$PERL" >&6; }
16466 else
16467   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16468 $as_echo "no" >&6; }
16469 fi
16470
16471
16472 fi
16473
16474 if test "x$PERL" != x; then
16475   ax_perl_modules_failed=0
16476   for ax_perl_module in 'IPC::Run' ; do
16477     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl module $ax_perl_module" >&5
16478 $as_echo_n "checking for perl module $ax_perl_module... " >&6; }
16479
16480     # Would be nice to log result here, but can't rely on autoconf internals
16481     $PERL -e "use $ax_perl_module; exit" > /dev/null 2>&1
16482     if test $? -ne 0; then
16483       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16484 $as_echo "no" >&6; };
16485       ax_perl_modules_failed=1
16486    else
16487       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16488 $as_echo "ok" >&6; };
16489     fi
16490   done
16491
16492   # Run optional shell commands
16493   if test "$ax_perl_modules_failed" = 0; then
16494     :
16495
16496   else
16497     :
16498     as_fn_error $? "Perl module IPC::Run is required to run TAP tests" "$LINENO" 5
16499   fi
16500 else
16501   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find perl" >&5
16502 $as_echo "$as_me: WARNING: could not find perl" >&2;}
16503 fi
16504   fi
16505   # Now make sure we know where prove is
16506   if test -z "$PROVE"; then
16507   for ac_prog in prove
16508 do
16509   # Extract the first word of "$ac_prog", so it can be a program name with args.
16510 set dummy $ac_prog; ac_word=$2
16511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16512 $as_echo_n "checking for $ac_word... " >&6; }
16513 if ${ac_cv_path_PROVE+:} false; then :
16514   $as_echo_n "(cached) " >&6
16515 else
16516   case $PROVE in
16517   [\\/]* | ?:[\\/]*)
16518   ac_cv_path_PROVE="$PROVE" # Let the user override the test with a path.
16519   ;;
16520   *)
16521   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16522 for as_dir in $PATH
16523 do
16524   IFS=$as_save_IFS
16525   test -z "$as_dir" && as_dir=.
16526     for ac_exec_ext in '' $ac_executable_extensions; do
16527   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16528     ac_cv_path_PROVE="$as_dir/$ac_word$ac_exec_ext"
16529     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16530     break 2
16531   fi
16532 done
16533   done
16534 IFS=$as_save_IFS
16535
16536   ;;
16537 esac
16538 fi
16539 PROVE=$ac_cv_path_PROVE
16540 if test -n "$PROVE"; then
16541   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
16542 $as_echo "$PROVE" >&6; }
16543 else
16544   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16545 $as_echo "no" >&6; }
16546 fi
16547
16548
16549   test -n "$PROVE" && break
16550 done
16551
16552 else
16553   # Report the value of PROVE in configure's output in all cases.
16554   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROVE" >&5
16555 $as_echo_n "checking for PROVE... " >&6; }
16556   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
16557 $as_echo "$PROVE" >&6; }
16558 fi
16559
16560   if test -z "$PROVE"; then
16561     as_fn_error $? "prove not found" "$LINENO" 5
16562   fi
16563 fi
16564
16565 # Thread testing
16566
16567 # We have to run the thread test near the end so we have all our symbols
16568 # defined.  Cross compiling throws a warning.
16569 #
16570 if test "$enable_thread_safety" = yes; then
16571 if test "$PORTNAME" != "win32"
16572 then
16573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking thread safety of required library functions" >&5
16574 $as_echo_n "checking thread safety of required library functions... " >&6; }
16575
16576 _CFLAGS="$CFLAGS"
16577 _LIBS="$LIBS"
16578 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
16579 LIBS="$LIBS $PTHREAD_LIBS"
16580 if test "$cross_compiling" = yes; then :
16581   { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
16582 $as_echo "maybe" >&6; }
16583   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
16584 *** Skipping thread test program because of cross-compile build.
16585 *** Run the program in src/test/thread on the target machine.
16586 " >&5
16587 $as_echo "$as_me: WARNING:
16588 *** Skipping thread test program because of cross-compile build.
16589 *** Run the program in src/test/thread on the target machine.
16590 " >&2;}
16591 else
16592   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16593 /* end confdefs.h.  */
16594 #include "$srcdir/src/test/thread/thread_test.c"
16595 _ACEOF
16596 if ac_fn_c_try_run "$LINENO"; then :
16597   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16598 $as_echo "yes" >&6; }
16599 else
16600   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16601 $as_echo "no" >&6; }
16602   as_fn_error $? "thread test program failed
16603 This platform is not thread-safe.  Check the file 'config.log' or compile
16604 and run src/test/thread/thread_test for the exact reason.
16605 Use --disable-thread-safety to disable thread safety." "$LINENO" 5
16606 fi
16607 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16608   conftest.$ac_objext conftest.beam conftest.$ac_ext
16609 fi
16610
16611 CFLAGS="$_CFLAGS"
16612 LIBS="$_LIBS"
16613 else
16614 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** skipping thread test on Win32" >&5
16615 $as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
16616 fi
16617 fi
16618
16619 # If compiler will take -Wl,--as-needed (or various platform-specific
16620 # spellings thereof) then add that to LDFLAGS.  This is much easier than
16621 # trying to filter LIBS to the minimum for each executable.
16622 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
16623 # libreadline; therefore we postpone testing it until we know what library
16624 # dependencies readline has.  The test code will try to link with $LIBS.
16625 if test "$with_readline" = yes; then
16626   link_test_func=readline
16627 else
16628   link_test_func=exit
16629 fi
16630
16631 if test "$PORTNAME" = "darwin"; then
16632   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
16633 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
16634 if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
16635   $as_echo_n "(cached) " >&6
16636 else
16637   pgac_save_LDFLAGS=$LDFLAGS
16638 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
16639 if test "$cross_compiling" = yes; then :
16640   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
16641 else
16642   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16643 /* end confdefs.h.  */
16644 extern void $link_test_func (); void (*fptr) () = $link_test_func;
16645 int
16646 main ()
16647 {
16648
16649   ;
16650   return 0;
16651 }
16652 _ACEOF
16653 if ac_fn_c_try_run "$LINENO"; then :
16654   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
16655 else
16656   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
16657 fi
16658 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16659   conftest.$ac_objext conftest.beam conftest.$ac_ext
16660 fi
16661
16662 LDFLAGS="$pgac_save_LDFLAGS"
16663 fi
16664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
16665 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
16666 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
16667   LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
16668 fi
16669
16670 elif test "$PORTNAME" = "openbsd"; then
16671   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
16672 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
16673 if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
16674   $as_echo_n "(cached) " >&6
16675 else
16676   pgac_save_LDFLAGS=$LDFLAGS
16677 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
16678 if test "$cross_compiling" = yes; then :
16679   pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
16680 else
16681   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16682 /* end confdefs.h.  */
16683 extern void $link_test_func (); void (*fptr) () = $link_test_func;
16684 int
16685 main ()
16686 {
16687
16688   ;
16689   return 0;
16690 }
16691 _ACEOF
16692 if ac_fn_c_try_run "$LINENO"; then :
16693   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
16694 else
16695   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
16696 fi
16697 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16698   conftest.$ac_objext conftest.beam conftest.$ac_ext
16699 fi
16700
16701 LDFLAGS="$pgac_save_LDFLAGS"
16702 fi
16703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
16704 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
16705 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
16706   LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
16707 fi
16708
16709 else
16710   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
16711 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
16712 if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
16713   $as_echo_n "(cached) " >&6
16714 else
16715   pgac_save_LDFLAGS=$LDFLAGS
16716 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
16717 if test "$cross_compiling" = yes; then :
16718   pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
16719 else
16720   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16721 /* end confdefs.h.  */
16722 extern void $link_test_func (); void (*fptr) () = $link_test_func;
16723 int
16724 main ()
16725 {
16726
16727   ;
16728   return 0;
16729 }
16730 _ACEOF
16731 if ac_fn_c_try_run "$LINENO"; then :
16732   pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
16733 else
16734   pgac_cv_prog_cc_ldflags__Wl___as_needed=no
16735 fi
16736 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16737   conftest.$ac_objext conftest.beam conftest.$ac_ext
16738 fi
16739
16740 LDFLAGS="$pgac_save_LDFLAGS"
16741 fi
16742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
16743 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
16744 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
16745   LDFLAGS="$LDFLAGS -Wl,--as-needed"
16746 fi
16747
16748 fi
16749
16750 # Create compiler version string
16751 if test x"$GCC" = x"yes" ; then
16752   cc_string=`${CC} --version | sed q`
16753   case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
16754 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
16755   cc_string=`${CC} -V 2>&1 | sed q`
16756 else
16757   cc_string=$CC
16758 fi
16759
16760
16761 cat >>confdefs.h <<_ACEOF
16762 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
16763 _ACEOF
16764
16765
16766 # Supply a numeric version string for use by 3rd party add-ons
16767 # awk -F is a regex on some platforms, and not on others, so make "." a tab
16768 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
16769 tr '.' '        ' |
16770 $AWK '{printf "%d%02d%02d", $1, $2, (NF >= 3) ? $3 : 0}'`"
16771
16772 cat >>confdefs.h <<_ACEOF
16773 #define PG_VERSION_NUM $PG_VERSION_NUM
16774 _ACEOF
16775
16776
16777
16778
16779 # Begin output steps
16780
16781 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
16782 $as_echo "$as_me: using compiler=$cc_string" >&6;}
16783 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
16784 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
16785 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
16786 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
16787 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
16788 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
16789
16790 # prepare build tree if outside source tree
16791 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
16792 # Note 2: /bin/pwd might be better than shell's built-in at getting
16793 #         a symlink-free name.
16794 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
16795   vpath_build=no
16796 else
16797   vpath_build=yes
16798   if test "$no_create" != yes; then
16799     $as_echo_n "preparing build tree... " >&6
16800     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
16801     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
16802       || as_fn_error $? "failed" "$LINENO" 5
16803     { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16804 $as_echo "done" >&6; }
16805   fi
16806 fi
16807
16808
16809
16810 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
16811
16812
16813 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}"
16814
16815
16816 if test "$PORTNAME" = "win32"; then
16817 ac_config_commands="$ac_config_commands check_win32_symlinks"
16818
16819 fi
16820
16821 ac_config_headers="$ac_config_headers src/include/pg_config.h"
16822
16823
16824 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
16825
16826
16827 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
16828
16829
16830 cat >confcache <<\_ACEOF
16831 # This file is a shell script that caches the results of configure
16832 # tests run on this system so they can be shared between configure
16833 # scripts and configure runs, see configure's option --config-cache.
16834 # It is not useful on other systems.  If it contains results you don't
16835 # want to keep, you may remove or edit it.
16836 #
16837 # config.status only pays attention to the cache file if you give it
16838 # the --recheck option to rerun configure.
16839 #
16840 # `ac_cv_env_foo' variables (set or unset) will be overridden when
16841 # loading this file, other *unset* `ac_cv_foo' will be assigned the
16842 # following values.
16843
16844 _ACEOF
16845
16846 # The following way of writing the cache mishandles newlines in values,
16847 # but we know of no workaround that is simple, portable, and efficient.
16848 # So, we kill variables containing newlines.
16849 # Ultrix sh set writes to stderr and can't be redirected directly,
16850 # and sets the high bit in the cache file unless we assign to the vars.
16851 (
16852   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16853     eval ac_val=\$$ac_var
16854     case $ac_val in #(
16855     *${as_nl}*)
16856       case $ac_var in #(
16857       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16858 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
16859       esac
16860       case $ac_var in #(
16861       _ | IFS | as_nl) ;; #(
16862       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16863       *) { eval $ac_var=; unset $ac_var;} ;;
16864       esac ;;
16865     esac
16866   done
16867
16868   (set) 2>&1 |
16869     case $as_nl`(ac_space=' '; set) 2>&1` in #(
16870     *${as_nl}ac_space=\ *)
16871       # `set' does not quote correctly, so add quotes: double-quote
16872       # substitution turns \\\\ into \\, and sed turns \\ into \.
16873       sed -n \
16874         "s/'/'\\\\''/g;
16875           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16876       ;; #(
16877     *)
16878       # `set' quotes correctly as required by POSIX, so do not add quotes.
16879       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
16880       ;;
16881     esac |
16882     sort
16883 ) |
16884   sed '
16885      /^ac_cv_env_/b end
16886      t clear
16887      :clear
16888      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16889      t end
16890      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16891      :end' >>confcache
16892 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16893   if test -w "$cache_file"; then
16894     if test "x$cache_file" != "x/dev/null"; then
16895       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16896 $as_echo "$as_me: updating cache $cache_file" >&6;}
16897       if test ! -f "$cache_file" || test -h "$cache_file"; then
16898         cat confcache >"$cache_file"
16899       else
16900         case $cache_file in #(
16901         */* | ?:*)
16902           mv -f confcache "$cache_file"$$ &&
16903           mv -f "$cache_file"$$ "$cache_file" ;; #(
16904         *)
16905           mv -f confcache "$cache_file" ;;
16906         esac
16907       fi
16908     fi
16909   else
16910     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16911 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
16912   fi
16913 fi
16914 rm -f confcache
16915
16916 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16917 # Let make expand exec_prefix.
16918 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16919
16920 DEFS=-DHAVE_CONFIG_H
16921
16922 ac_libobjs=
16923 ac_ltlibobjs=
16924 U=
16925 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16926   # 1. Remove the extension, and $U if already installed.
16927   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
16928   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
16929   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
16930   #    will be set to the directory where LIBOBJS objects are built.
16931   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16932   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
16933 done
16934 LIBOBJS=$ac_libobjs
16935
16936 LTLIBOBJS=$ac_ltlibobjs
16937
16938
16939
16940
16941 : "${CONFIG_STATUS=./config.status}"
16942 ac_write_fail=0
16943 ac_clean_files_save=$ac_clean_files
16944 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16945 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16946 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16947 as_write_fail=0
16948 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
16949 #! $SHELL
16950 # Generated by $as_me.
16951 # Run this file to recreate the current configuration.
16952 # Compiler output produced by configure, useful for debugging
16953 # configure, is in config.log if it exists.
16954
16955 debug=false
16956 ac_cs_recheck=false
16957 ac_cs_silent=false
16958
16959 SHELL=\${CONFIG_SHELL-$SHELL}
16960 export SHELL
16961 _ASEOF
16962 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16963 ## -------------------- ##
16964 ## M4sh Initialization. ##
16965 ## -------------------- ##
16966
16967 # Be more Bourne compatible
16968 DUALCASE=1; export DUALCASE # for MKS sh
16969 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
16970   emulate sh
16971   NULLCMD=:
16972   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
16973   # is contrary to our usage.  Disable this feature.
16974   alias -g '${1+"$@"}'='"$@"'
16975   setopt NO_GLOB_SUBST
16976 else
16977   case `(set -o) 2>/dev/null` in #(
16978   *posix*) :
16979     set -o posix ;; #(
16980   *) :
16981      ;;
16982 esac
16983 fi
16984
16985
16986 as_nl='
16987 '
16988 export as_nl
16989 # Printing a long string crashes Solaris 7 /usr/bin/printf.
16990 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16991 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16992 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16993 # Prefer a ksh shell builtin over an external printf program on Solaris,
16994 # but without wasting forks for bash or zsh.
16995 if test -z "$BASH_VERSION$ZSH_VERSION" \
16996     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16997   as_echo='print -r --'
16998   as_echo_n='print -rn --'
16999 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17000   as_echo='printf %s\n'
17001   as_echo_n='printf %s'
17002 else
17003   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17004     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17005     as_echo_n='/usr/ucb/echo -n'
17006   else
17007     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17008     as_echo_n_body='eval
17009       arg=$1;
17010       case $arg in #(
17011       *"$as_nl"*)
17012         expr "X$arg" : "X\\(.*\\)$as_nl";
17013         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17014       esac;
17015       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17016     '
17017     export as_echo_n_body
17018     as_echo_n='sh -c $as_echo_n_body as_echo'
17019   fi
17020   export as_echo_body
17021   as_echo='sh -c $as_echo_body as_echo'
17022 fi
17023
17024 # The user is always right.
17025 if test "${PATH_SEPARATOR+set}" != set; then
17026   PATH_SEPARATOR=:
17027   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17028     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17029       PATH_SEPARATOR=';'
17030   }
17031 fi
17032
17033
17034 # IFS
17035 # We need space, tab and new line, in precisely that order.  Quoting is
17036 # there to prevent editors from complaining about space-tab.
17037 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
17038 # splitting by setting IFS to empty value.)
17039 IFS=" ""        $as_nl"
17040
17041 # Find who we are.  Look in the path if we contain no directory separator.
17042 as_myself=
17043 case $0 in #((
17044   *[\\/]* ) as_myself=$0 ;;
17045   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17046 for as_dir in $PATH
17047 do
17048   IFS=$as_save_IFS
17049   test -z "$as_dir" && as_dir=.
17050     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17051   done
17052 IFS=$as_save_IFS
17053
17054      ;;
17055 esac
17056 # We did not find ourselves, most probably we were run as `sh COMMAND'
17057 # in which case we are not to be found in the path.
17058 if test "x$as_myself" = x; then
17059   as_myself=$0
17060 fi
17061 if test ! -f "$as_myself"; then
17062   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17063   exit 1
17064 fi
17065
17066 # Unset variables that we do not need and which cause bugs (e.g. in
17067 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
17068 # suppresses any "Segmentation fault" message there.  '((' could
17069 # trigger a bug in pdksh 5.2.14.
17070 for as_var in BASH_ENV ENV MAIL MAILPATH
17071 do eval test x\${$as_var+set} = xset \
17072   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
17073 done
17074 PS1='$ '
17075 PS2='> '
17076 PS4='+ '
17077
17078 # NLS nuisances.
17079 LC_ALL=C
17080 export LC_ALL
17081 LANGUAGE=C
17082 export LANGUAGE
17083
17084 # CDPATH.
17085 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17086
17087
17088 # as_fn_error STATUS ERROR [LINENO LOG_FD]
17089 # ----------------------------------------
17090 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17091 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
17092 # script with STATUS, using 1 if that was 0.
17093 as_fn_error ()
17094 {
17095   as_status=$1; test $as_status -eq 0 && as_status=1
17096   if test "$4"; then
17097     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17098     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
17099   fi
17100   $as_echo "$as_me: error: $2" >&2
17101   as_fn_exit $as_status
17102 } # as_fn_error
17103
17104
17105 # as_fn_set_status STATUS
17106 # -----------------------
17107 # Set $? to STATUS, without forking.
17108 as_fn_set_status ()
17109 {
17110   return $1
17111 } # as_fn_set_status
17112
17113 # as_fn_exit STATUS
17114 # -----------------
17115 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17116 as_fn_exit ()
17117 {
17118   set +e
17119   as_fn_set_status $1
17120   exit $1
17121 } # as_fn_exit
17122
17123 # as_fn_unset VAR
17124 # ---------------
17125 # Portably unset VAR.
17126 as_fn_unset ()
17127 {
17128   { eval $1=; unset $1;}
17129 }
17130 as_unset=as_fn_unset
17131 # as_fn_append VAR VALUE
17132 # ----------------------
17133 # Append the text in VALUE to the end of the definition contained in VAR. Take
17134 # advantage of any shell optimizations that allow amortized linear growth over
17135 # repeated appends, instead of the typical quadratic growth present in naive
17136 # implementations.
17137 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17138   eval 'as_fn_append ()
17139   {
17140     eval $1+=\$2
17141   }'
17142 else
17143   as_fn_append ()
17144   {
17145     eval $1=\$$1\$2
17146   }
17147 fi # as_fn_append
17148
17149 # as_fn_arith ARG...
17150 # ------------------
17151 # Perform arithmetic evaluation on the ARGs, and store the result in the
17152 # global $as_val. Take advantage of shells that can avoid forks. The arguments
17153 # must be portable across $(()) and expr.
17154 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17155   eval 'as_fn_arith ()
17156   {
17157     as_val=$(( $* ))
17158   }'
17159 else
17160   as_fn_arith ()
17161   {
17162     as_val=`expr "$@" || test $? -eq 1`
17163   }
17164 fi # as_fn_arith
17165
17166
17167 if expr a : '\(a\)' >/dev/null 2>&1 &&
17168    test "X`expr 00001 : '.*\(...\)'`" = X001; then
17169   as_expr=expr
17170 else
17171   as_expr=false
17172 fi
17173
17174 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17175   as_basename=basename
17176 else
17177   as_basename=false
17178 fi
17179
17180 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17181   as_dirname=dirname
17182 else
17183   as_dirname=false
17184 fi
17185
17186 as_me=`$as_basename -- "$0" ||
17187 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17188          X"$0" : 'X\(//\)$' \| \
17189          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
17190 $as_echo X/"$0" |
17191     sed '/^.*\/\([^/][^/]*\)\/*$/{
17192             s//\1/
17193             q
17194           }
17195           /^X\/\(\/\/\)$/{
17196             s//\1/
17197             q
17198           }
17199           /^X\/\(\/\).*/{
17200             s//\1/
17201             q
17202           }
17203           s/.*/./; q'`
17204
17205 # Avoid depending upon Character Ranges.
17206 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17207 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17208 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17209 as_cr_digits='0123456789'
17210 as_cr_alnum=$as_cr_Letters$as_cr_digits
17211
17212 ECHO_C= ECHO_N= ECHO_T=
17213 case `echo -n x` in #(((((
17214 -n*)
17215   case `echo 'xy\c'` in
17216   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
17217   xy)  ECHO_C='\c';;
17218   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
17219        ECHO_T=' ';;
17220   esac;;
17221 *)
17222   ECHO_N='-n';;
17223 esac
17224
17225 rm -f conf$$ conf$$.exe conf$$.file
17226 if test -d conf$$.dir; then
17227   rm -f conf$$.dir/conf$$.file
17228 else
17229   rm -f conf$$.dir
17230   mkdir conf$$.dir 2>/dev/null
17231 fi
17232 if (echo >conf$$.file) 2>/dev/null; then
17233   if ln -s conf$$.file conf$$ 2>/dev/null; then
17234     as_ln_s='ln -s'
17235     # ... but there are two gotchas:
17236     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17237     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
17238     # In both cases, we have to default to `cp -pR'.
17239     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
17240       as_ln_s='cp -pR'
17241   elif ln conf$$.file conf$$ 2>/dev/null; then
17242     as_ln_s=ln
17243   else
17244     as_ln_s='cp -pR'
17245   fi
17246 else
17247   as_ln_s='cp -pR'
17248 fi
17249 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17250 rmdir conf$$.dir 2>/dev/null
17251
17252
17253 # as_fn_mkdir_p
17254 # -------------
17255 # Create "$as_dir" as a directory, including parents if necessary.
17256 as_fn_mkdir_p ()
17257 {
17258
17259   case $as_dir in #(
17260   -*) as_dir=./$as_dir;;
17261   esac
17262   test -d "$as_dir" || eval $as_mkdir_p || {
17263     as_dirs=
17264     while :; do
17265       case $as_dir in #(
17266       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17267       *) as_qdir=$as_dir;;
17268       esac
17269       as_dirs="'$as_qdir' $as_dirs"
17270       as_dir=`$as_dirname -- "$as_dir" ||
17271 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17272          X"$as_dir" : 'X\(//\)[^/]' \| \
17273          X"$as_dir" : 'X\(//\)$' \| \
17274          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17275 $as_echo X"$as_dir" |
17276     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17277             s//\1/
17278             q
17279           }
17280           /^X\(\/\/\)[^/].*/{
17281             s//\1/
17282             q
17283           }
17284           /^X\(\/\/\)$/{
17285             s//\1/
17286             q
17287           }
17288           /^X\(\/\).*/{
17289             s//\1/
17290             q
17291           }
17292           s/.*/./; q'`
17293       test -d "$as_dir" && break
17294     done
17295     test -z "$as_dirs" || eval "mkdir $as_dirs"
17296   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
17297
17298
17299 } # as_fn_mkdir_p
17300 if mkdir -p . 2>/dev/null; then
17301   as_mkdir_p='mkdir -p "$as_dir"'
17302 else
17303   test -d ./-p && rmdir ./-p
17304   as_mkdir_p=false
17305 fi
17306
17307
17308 # as_fn_executable_p FILE
17309 # -----------------------
17310 # Test if FILE is an executable regular file.
17311 as_fn_executable_p ()
17312 {
17313   test -f "$1" && test -x "$1"
17314 } # as_fn_executable_p
17315 as_test_x='test -x'
17316 as_executable_p=as_fn_executable_p
17317
17318 # Sed expression to map a string onto a valid CPP name.
17319 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
17320
17321 # Sed expression to map a string onto a valid variable name.
17322 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
17323
17324
17325 exec 6>&1
17326 ## ----------------------------------- ##
17327 ## Main body of $CONFIG_STATUS script. ##
17328 ## ----------------------------------- ##
17329 _ASEOF
17330 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
17331
17332 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17333 # Save the log message, to keep $0 and so on meaningful, and to
17334 # report actual input values of CONFIG_FILES etc. instead of their
17335 # values after options handling.
17336 ac_log="
17337 This file was extended by PostgreSQL $as_me 11devel, which was
17338 generated by GNU Autoconf 2.69.  Invocation command line was
17339
17340   CONFIG_FILES    = $CONFIG_FILES
17341   CONFIG_HEADERS  = $CONFIG_HEADERS
17342   CONFIG_LINKS    = $CONFIG_LINKS
17343   CONFIG_COMMANDS = $CONFIG_COMMANDS
17344   $ $0 $@
17345
17346 on `(hostname || uname -n) 2>/dev/null | sed 1q`
17347 "
17348
17349 _ACEOF
17350
17351 case $ac_config_files in *"
17352 "*) set x $ac_config_files; shift; ac_config_files=$*;;
17353 esac
17354
17355 case $ac_config_headers in *"
17356 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17357 esac
17358
17359
17360 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17361 # Files that config.status was made for.
17362 config_files="$ac_config_files"
17363 config_headers="$ac_config_headers"
17364 config_links="$ac_config_links"
17365 config_commands="$ac_config_commands"
17366
17367 _ACEOF
17368
17369 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17370 ac_cs_usage="\
17371 \`$as_me' instantiates files and other configuration actions
17372 from templates according to the current configuration.  Unless the files
17373 and actions are specified as TAGs, all are instantiated by default.
17374
17375 Usage: $0 [OPTION]... [TAG]...
17376
17377   -h, --help       print this help, then exit
17378   -V, --version    print version number and configuration settings, then exit
17379       --config     print configuration, then exit
17380   -q, --quiet, --silent
17381                    do not print progress messages
17382   -d, --debug      don't remove temporary files
17383       --recheck    update $as_me by reconfiguring in the same conditions
17384       --file=FILE[:TEMPLATE]
17385                    instantiate the configuration file FILE
17386       --header=FILE[:TEMPLATE]
17387                    instantiate the configuration header FILE
17388
17389 Configuration files:
17390 $config_files
17391
17392 Configuration headers:
17393 $config_headers
17394
17395 Configuration links:
17396 $config_links
17397
17398 Configuration commands:
17399 $config_commands
17400
17401 Report bugs to <pgsql-bugs@postgresql.org>."
17402
17403 _ACEOF
17404 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17405 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
17406 ac_cs_version="\\
17407 PostgreSQL config.status 11devel
17408 configured by $0, generated by GNU Autoconf 2.69,
17409   with options \\"\$ac_cs_config\\"
17410
17411 Copyright (C) 2012 Free Software Foundation, Inc.
17412 This config.status script is free software; the Free Software Foundation
17413 gives unlimited permission to copy, distribute and modify it."
17414
17415 ac_pwd='$ac_pwd'
17416 srcdir='$srcdir'
17417 INSTALL='$INSTALL'
17418 MKDIR_P='$MKDIR_P'
17419 AWK='$AWK'
17420 test -n "\$AWK" || AWK=awk
17421 _ACEOF
17422
17423 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17424 # The default lists apply if the user does not specify any file.
17425 ac_need_defaults=:
17426 while test $# != 0
17427 do
17428   case $1 in
17429   --*=?*)
17430     ac_option=`expr "X$1" : 'X\([^=]*\)='`
17431     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
17432     ac_shift=:
17433     ;;
17434   --*=)
17435     ac_option=`expr "X$1" : 'X\([^=]*\)='`
17436     ac_optarg=
17437     ac_shift=:
17438     ;;
17439   *)
17440     ac_option=$1
17441     ac_optarg=$2
17442     ac_shift=shift
17443     ;;
17444   esac
17445
17446   case $ac_option in
17447   # Handling of the options.
17448   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17449     ac_cs_recheck=: ;;
17450   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
17451     $as_echo "$ac_cs_version"; exit ;;
17452   --config | --confi | --conf | --con | --co | --c )
17453     $as_echo "$ac_cs_config"; exit ;;
17454   --debug | --debu | --deb | --de | --d | -d )
17455     debug=: ;;
17456   --file | --fil | --fi | --f )
17457     $ac_shift
17458     case $ac_optarg in
17459     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17460     '') as_fn_error $? "missing file argument" ;;
17461     esac
17462     as_fn_append CONFIG_FILES " '$ac_optarg'"
17463     ac_need_defaults=false;;
17464   --header | --heade | --head | --hea )
17465     $ac_shift
17466     case $ac_optarg in
17467     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17468     esac
17469     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
17470     ac_need_defaults=false;;
17471   --he | --h)
17472     # Conflict between --help and --header
17473     as_fn_error $? "ambiguous option: \`$1'
17474 Try \`$0 --help' for more information.";;
17475   --help | --hel | -h )
17476     $as_echo "$ac_cs_usage"; exit ;;
17477   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17478   | -silent | --silent | --silen | --sile | --sil | --si | --s)
17479     ac_cs_silent=: ;;
17480
17481   # This is an error.
17482   -*) as_fn_error $? "unrecognized option: \`$1'
17483 Try \`$0 --help' for more information." ;;
17484
17485   *) as_fn_append ac_config_targets " $1"
17486      ac_need_defaults=false ;;
17487
17488   esac
17489   shift
17490 done
17491
17492 ac_configure_extra_args=
17493
17494 if $ac_cs_silent; then
17495   exec 6>/dev/null
17496   ac_configure_extra_args="$ac_configure_extra_args --silent"
17497 fi
17498
17499 _ACEOF
17500 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17501 if \$ac_cs_recheck; then
17502   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
17503   shift
17504   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17505   CONFIG_SHELL='$SHELL'
17506   export CONFIG_SHELL
17507   exec "\$@"
17508 fi
17509
17510 _ACEOF
17511 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17512 exec 5>>config.log
17513 {
17514   echo
17515   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17516 ## Running $as_me. ##
17517 _ASBOX
17518   $as_echo "$ac_log"
17519 } >&5
17520
17521 _ACEOF
17522 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17523 _ACEOF
17524
17525 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17526
17527 # Handling of arguments.
17528 for ac_config_target in $ac_config_targets
17529 do
17530   case $ac_config_target in
17531     "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
17532     "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
17533     "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
17534     "src/backend/port/dynloader.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
17535     "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
17536     "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
17537     "src/include/dynloader.h") CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
17538     "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
17539     "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
17540     "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
17541     "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
17542     "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
17543     "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
17544
17545   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
17546   esac
17547 done
17548
17549
17550 # If the user did not use the arguments to specify the items to instantiate,
17551 # then the envvar interface is used.  Set only those that are not.
17552 # We use the long form for the default assignment because of an extremely
17553 # bizarre bug on SunOS 4.1.3.
17554 if $ac_need_defaults; then
17555   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17556   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17557   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
17558   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17559 fi
17560
17561 # Have a temporary directory for convenience.  Make it in the build tree
17562 # simply because there is no reason against having it here, and in addition,
17563 # creating and moving files from /tmp can sometimes cause problems.
17564 # Hook for its removal unless debugging.
17565 # Note that there is a small window in which the directory will not be cleaned:
17566 # after its creation but before its name has been assigned to `$tmp'.
17567 $debug ||
17568 {
17569   tmp= ac_tmp=
17570   trap 'exit_status=$?
17571   : "${ac_tmp:=$tmp}"
17572   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
17573 ' 0
17574   trap 'as_fn_exit 1' 1 2 13 15
17575 }
17576 # Create a (secure) tmp directory for tmp files.
17577
17578 {
17579   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
17580   test -d "$tmp"
17581 }  ||
17582 {
17583   tmp=./conf$$-$RANDOM
17584   (umask 077 && mkdir "$tmp")
17585 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
17586 ac_tmp=$tmp
17587
17588 # Set up the scripts for CONFIG_FILES section.
17589 # No need to generate them if there are no CONFIG_FILES.
17590 # This happens for instance with `./config.status config.h'.
17591 if test -n "$CONFIG_FILES"; then
17592
17593
17594 ac_cr=`echo X | tr X '\015'`
17595 # On cygwin, bash can eat \r inside `` if the user requested igncr.
17596 # But we know of no other shell where ac_cr would be empty at this
17597 # point, so we can use a bashism as a fallback.
17598 if test "x$ac_cr" = x; then
17599   eval ac_cr=\$\'\\r\'
17600 fi
17601 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17602 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
17603   ac_cs_awk_cr='\\r'
17604 else
17605   ac_cs_awk_cr=$ac_cr
17606 fi
17607
17608 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
17609 _ACEOF
17610
17611
17612 {
17613   echo "cat >conf$$subs.awk <<_ACEOF" &&
17614   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17615   echo "_ACEOF"
17616 } >conf$$subs.sh ||
17617   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17618 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
17619 ac_delim='%!_!# '
17620 for ac_last_try in false false false false false :; do
17621   . ./conf$$subs.sh ||
17622     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17623
17624   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17625   if test $ac_delim_n = $ac_delim_num; then
17626     break
17627   elif $ac_last_try; then
17628     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17629   else
17630     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17631   fi
17632 done
17633 rm -f conf$$subs.sh
17634
17635 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17636 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
17637 _ACEOF
17638 sed -n '
17639 h
17640 s/^/S["/; s/!.*/"]=/
17641 p
17642 g
17643 s/^[^!]*!//
17644 :repl
17645 t repl
17646 s/'"$ac_delim"'$//
17647 t delim
17648 :nl
17649 h
17650 s/\(.\{148\}\)..*/\1/
17651 t more1
17652 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17653 p
17654 n
17655 b repl
17656 :more1
17657 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17658 p
17659 g
17660 s/.\{148\}//
17661 t nl
17662 :delim
17663 h
17664 s/\(.\{148\}\)..*/\1/
17665 t more2
17666 s/["\\]/\\&/g; s/^/"/; s/$/"/
17667 p
17668 b
17669 :more2
17670 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17671 p
17672 g
17673 s/.\{148\}//
17674 t delim
17675 ' <conf$$subs.awk | sed '
17676 /^[^""]/{
17677   N
17678   s/\n//
17679 }
17680 ' >>$CONFIG_STATUS || ac_write_fail=1
17681 rm -f conf$$subs.awk
17682 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17683 _ACAWK
17684 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
17685   for (key in S) S_is_set[key] = 1
17686   FS = "\a"
17687
17688 }
17689 {
17690   line = $ 0
17691   nfields = split(line, field, "@")
17692   substed = 0
17693   len = length(field[1])
17694   for (i = 2; i < nfields; i++) {
17695     key = field[i]
17696     keylen = length(key)
17697     if (S_is_set[key]) {
17698       value = S[key]
17699       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17700       len += length(value) + length(field[++i])
17701       substed = 1
17702     } else
17703       len += 1 + keylen
17704   }
17705
17706   print line
17707 }
17708
17709 _ACAWK
17710 _ACEOF
17711 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17712 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17713   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17714 else
17715   cat
17716 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
17717   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
17718 _ACEOF
17719
17720 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17721 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
17722 # trailing colons and then remove the whole line if VPATH becomes empty
17723 # (actually we leave an empty line to preserve line numbers).
17724 if test "x$srcdir" = x.; then
17725   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
17726 h
17727 s///
17728 s/^/:/
17729 s/[      ]*$/:/
17730 s/:\$(srcdir):/:/g
17731 s/:\${srcdir}:/:/g
17732 s/:@srcdir@:/:/g
17733 s/^:*//
17734 s/:*$//
17735 x
17736 s/\(=[   ]*\).*/\1/
17737 G
17738 s/\n//
17739 s/^[^=]*=[       ]*$//
17740 }'
17741 fi
17742
17743 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17744 fi # test -n "$CONFIG_FILES"
17745
17746 # Set up the scripts for CONFIG_HEADERS section.
17747 # No need to generate them if there are no CONFIG_HEADERS.
17748 # This happens for instance with `./config.status Makefile'.
17749 if test -n "$CONFIG_HEADERS"; then
17750 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
17751 BEGIN {
17752 _ACEOF
17753
17754 # Transform confdefs.h into an awk script `defines.awk', embedded as
17755 # here-document in config.status, that substitutes the proper values into
17756 # config.h.in to produce config.h.
17757
17758 # Create a delimiter string that does not exist in confdefs.h, to ease
17759 # handling of long lines.
17760 ac_delim='%!_!# '
17761 for ac_last_try in false false :; do
17762   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17763   if test -z "$ac_tt"; then
17764     break
17765   elif $ac_last_try; then
17766     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
17767   else
17768     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17769   fi
17770 done
17771
17772 # For the awk script, D is an array of macro values keyed by name,
17773 # likewise P contains macro parameters if any.  Preserve backslash
17774 # newline sequences.
17775
17776 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17777 sed -n '
17778 s/.\{148\}/&'"$ac_delim"'/g
17779 t rset
17780 :rset
17781 s/^[     ]*#[    ]*define[       ][      ]*/ /
17782 t def
17783 d
17784 :def
17785 s/\\$//
17786 t bsnl
17787 s/["\\]/\\&/g
17788 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
17789 D["\1"]=" \3"/p
17790 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
17791 d
17792 :bsnl
17793 s/["\\]/\\&/g
17794 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
17795 D["\1"]=" \3\\\\\\n"\\/p
17796 t cont
17797 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17798 t cont
17799 d
17800 :cont
17801 n
17802 s/.\{148\}/&'"$ac_delim"'/g
17803 t clear
17804 :clear
17805 s/\\$//
17806 t bsnlc
17807 s/["\\]/\\&/g; s/^/"/; s/$/"/p
17808 d
17809 :bsnlc
17810 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17811 b cont
17812 ' <confdefs.h | sed '
17813 s/'"$ac_delim"'/"\\\
17814 "/g' >>$CONFIG_STATUS || ac_write_fail=1
17815
17816 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17817   for (key in D) D_is_set[key] = 1
17818   FS = "\a"
17819 }
17820 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17821   line = \$ 0
17822   split(line, arg, " ")
17823   if (arg[1] == "#") {
17824     defundef = arg[2]
17825     mac1 = arg[3]
17826   } else {
17827     defundef = substr(arg[1], 2)
17828     mac1 = arg[2]
17829   }
17830   split(mac1, mac2, "(") #)
17831   macro = mac2[1]
17832   prefix = substr(line, 1, index(line, defundef) - 1)
17833   if (D_is_set[macro]) {
17834     # Preserve the white space surrounding the "#".
17835     print prefix "define", macro P[macro] D[macro]
17836     next
17837   } else {
17838     # Replace #undef with comments.  This is necessary, for example,
17839     # in the case of _POSIX_SOURCE, which is predefined and required
17840     # on some systems where configure will not decide to define it.
17841     if (defundef == "undef") {
17842       print "/*", prefix defundef, macro, "*/"
17843       next
17844     }
17845   }
17846 }
17847 { print }
17848 _ACAWK
17849 _ACEOF
17850 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17851   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
17852 fi # test -n "$CONFIG_HEADERS"
17853
17854
17855 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
17856 shift
17857 for ac_tag
17858 do
17859   case $ac_tag in
17860   :[FHLC]) ac_mode=$ac_tag; continue;;
17861   esac
17862   case $ac_mode$ac_tag in
17863   :[FHL]*:*);;
17864   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
17865   :[FH]-) ac_tag=-:-;;
17866   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17867   esac
17868   ac_save_IFS=$IFS
17869   IFS=:
17870   set x $ac_tag
17871   IFS=$ac_save_IFS
17872   shift
17873   ac_file=$1
17874   shift
17875
17876   case $ac_mode in
17877   :L) ac_source=$1;;
17878   :[FH])
17879     ac_file_inputs=
17880     for ac_f
17881     do
17882       case $ac_f in
17883       -) ac_f="$ac_tmp/stdin";;
17884       *) # Look for the file first in the build tree, then in the source tree
17885          # (if the path is not absolute).  The absolute path cannot be DOS-style,
17886          # because $ac_f cannot contain `:'.
17887          test -f "$ac_f" ||
17888            case $ac_f in
17889            [\\/$]*) false;;
17890            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17891            esac ||
17892            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
17893       esac
17894       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17895       as_fn_append ac_file_inputs " '$ac_f'"
17896     done
17897
17898     # Let's still pretend it is `configure' which instantiates (i.e., don't
17899     # use $as_me), people would be surprised to read:
17900     #    /* config.h.  Generated by config.status.  */
17901     configure_input='Generated from '`
17902           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17903         `' by configure.'
17904     if test x"$ac_file" != x-; then
17905       configure_input="$ac_file.  $configure_input"
17906       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17907 $as_echo "$as_me: creating $ac_file" >&6;}
17908     fi
17909     # Neutralize special characters interpreted by sed in replacement strings.
17910     case $configure_input in #(
17911     *\&* | *\|* | *\\* )
17912        ac_sed_conf_input=`$as_echo "$configure_input" |
17913        sed 's/[\\\\&|]/\\\\&/g'`;; #(
17914     *) ac_sed_conf_input=$configure_input;;
17915     esac
17916
17917     case $ac_tag in
17918     *:-:* | *:-) cat >"$ac_tmp/stdin" \
17919       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
17920     esac
17921     ;;
17922   esac
17923
17924   ac_dir=`$as_dirname -- "$ac_file" ||
17925 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17926          X"$ac_file" : 'X\(//\)[^/]' \| \
17927          X"$ac_file" : 'X\(//\)$' \| \
17928          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
17929 $as_echo X"$ac_file" |
17930     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17931             s//\1/
17932             q
17933           }
17934           /^X\(\/\/\)[^/].*/{
17935             s//\1/
17936             q
17937           }
17938           /^X\(\/\/\)$/{
17939             s//\1/
17940             q
17941           }
17942           /^X\(\/\).*/{
17943             s//\1/
17944             q
17945           }
17946           s/.*/./; q'`
17947   as_dir="$ac_dir"; as_fn_mkdir_p
17948   ac_builddir=.
17949
17950 case "$ac_dir" in
17951 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17952 *)
17953   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
17954   # A ".." for each directory in $ac_dir_suffix.
17955   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
17956   case $ac_top_builddir_sub in
17957   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17958   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17959   esac ;;
17960 esac
17961 ac_abs_top_builddir=$ac_pwd
17962 ac_abs_builddir=$ac_pwd$ac_dir_suffix
17963 # for backward compatibility:
17964 ac_top_builddir=$ac_top_build_prefix
17965
17966 case $srcdir in
17967   .)  # We are building in place.
17968     ac_srcdir=.
17969     ac_top_srcdir=$ac_top_builddir_sub
17970     ac_abs_top_srcdir=$ac_pwd ;;
17971   [\\/]* | ?:[\\/]* )  # Absolute name.
17972     ac_srcdir=$srcdir$ac_dir_suffix;
17973     ac_top_srcdir=$srcdir
17974     ac_abs_top_srcdir=$srcdir ;;
17975   *) # Relative name.
17976     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17977     ac_top_srcdir=$ac_top_build_prefix$srcdir
17978     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
17979 esac
17980 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
17981
17982
17983   case $ac_mode in
17984   :F)
17985   #
17986   # CONFIG_FILE
17987   #
17988
17989   case $INSTALL in
17990   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
17991   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
17992   esac
17993   ac_MKDIR_P=$MKDIR_P
17994   case $MKDIR_P in
17995   [\\/$]* | ?:[\\/]* ) ;;
17996   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17997   esac
17998 _ACEOF
17999
18000 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18001 # If the template does not know about datarootdir, expand it.
18002 # FIXME: This hack should be removed a few years after 2.60.
18003 ac_datarootdir_hack=; ac_datarootdir_seen=
18004 ac_sed_dataroot='
18005 /datarootdir/ {
18006   p
18007   q
18008 }
18009 /@datadir@/p
18010 /@docdir@/p
18011 /@infodir@/p
18012 /@localedir@/p
18013 /@mandir@/p'
18014 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
18015 *datarootdir*) ac_datarootdir_seen=yes;;
18016 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
18017   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18018 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
18019 _ACEOF
18020 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18021   ac_datarootdir_hack='
18022   s&@datadir@&$datadir&g
18023   s&@docdir@&$docdir&g
18024   s&@infodir@&$infodir&g
18025   s&@localedir@&$localedir&g
18026   s&@mandir@&$mandir&g
18027   s&\\\${datarootdir}&$datarootdir&g' ;;
18028 esac
18029 _ACEOF
18030
18031 # Neutralize VPATH when `$srcdir' = `.'.
18032 # Shell code in configure.ac might set extrasub.
18033 # FIXME: do we really want to maintain this feature?
18034 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18035 ac_sed_extra="$ac_vpsub
18036 $extrasub
18037 _ACEOF
18038 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18039 :t
18040 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18041 s|@configure_input@|$ac_sed_conf_input|;t t
18042 s&@top_builddir@&$ac_top_builddir_sub&;t t
18043 s&@top_build_prefix@&$ac_top_build_prefix&;t t
18044 s&@srcdir@&$ac_srcdir&;t t
18045 s&@abs_srcdir@&$ac_abs_srcdir&;t t
18046 s&@top_srcdir@&$ac_top_srcdir&;t t
18047 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18048 s&@builddir@&$ac_builddir&;t t
18049 s&@abs_builddir@&$ac_abs_builddir&;t t
18050 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18051 s&@INSTALL@&$ac_INSTALL&;t t
18052 s&@MKDIR_P@&$ac_MKDIR_P&;t t
18053 $ac_datarootdir_hack
18054 "
18055 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18056   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
18057
18058 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
18059   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18060   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
18061       "$ac_tmp/out"`; test -z "$ac_out"; } &&
18062   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
18063 which seems to be undefined.  Please make sure it is defined" >&5
18064 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
18065 which seems to be undefined.  Please make sure it is defined" >&2;}
18066
18067   rm -f "$ac_tmp/stdin"
18068   case $ac_file in
18069   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18070   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
18071   esac \
18072   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
18073  ;;
18074   :H)
18075   #
18076   # CONFIG_HEADER
18077   #
18078   if test x"$ac_file" != x-; then
18079     {
18080       $as_echo "/* $configure_input  */" \
18081       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18082     } >"$ac_tmp/config.h" \
18083       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
18084     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
18085       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18086 $as_echo "$as_me: $ac_file is unchanged" >&6;}
18087     else
18088       rm -f "$ac_file"
18089       mv "$ac_tmp/config.h" "$ac_file" \
18090         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
18091     fi
18092   else
18093     $as_echo "/* $configure_input  */" \
18094       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
18095       || as_fn_error $? "could not create -" "$LINENO" 5
18096   fi
18097  ;;
18098   :L)
18099   #
18100   # CONFIG_LINK
18101   #
18102
18103   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
18104     :
18105   else
18106     # Prefer the file from the source tree if names are identical.
18107     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
18108       ac_source=$srcdir/$ac_source
18109     fi
18110
18111     { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
18112 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
18113
18114     if test ! -r "$ac_source"; then
18115       as_fn_error $? "$ac_source: file not found" "$LINENO" 5
18116     fi
18117     rm -f "$ac_file"
18118
18119     # Try a relative symlink, then a hard link, then a copy.
18120     case $ac_source in
18121     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
18122         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
18123     esac
18124     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
18125       ln "$ac_source" "$ac_file" 2>/dev/null ||
18126       cp -p "$ac_source" "$ac_file" ||
18127       as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
18128   fi
18129  ;;
18130   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
18131 $as_echo "$as_me: executing $ac_file commands" >&6;}
18132  ;;
18133   esac
18134
18135
18136   case $ac_file$ac_mode in
18137     "check_win32_symlinks":C)
18138 # Links sometimes fail undetected on Mingw -
18139 # so here we detect it and warn the user
18140 for FILE in $CONFIG_LINKS
18141  do
18142         # test -e works for symlinks in the MinGW console
18143         test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
18144 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
18145  done
18146  ;;
18147     "src/include/pg_config.h":H)
18148 # Update timestamp for pg_config.h (see Makefile.global)
18149 echo >src/include/stamp-h
18150  ;;
18151     "src/include/pg_config_ext.h":H)
18152 # Update timestamp for pg_config_ext.h (see Makefile.global)
18153 echo >src/include/stamp-ext-h
18154  ;;
18155     "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
18156
18157   esac
18158 done # for ac_tag
18159
18160
18161 as_fn_exit 0
18162 _ACEOF
18163 ac_clean_files=$ac_clean_files_save
18164
18165 test $ac_write_fail = 0 ||
18166   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
18167
18168
18169 # configure is writing to config.log, and then calls config.status.
18170 # config.status does its own redirection, appending to config.log.
18171 # Unfortunately, on DOS this fails, as config.log is still kept open
18172 # by configure, so config.status won't be able to write to it; its
18173 # output is simply discarded.  So we exec the FD to /dev/null,
18174 # effectively closing config.log, so it can be properly (re)opened and
18175 # appended to by config.status.  When coming back to configure, we
18176 # need to make the FD available again.
18177 if test "$no_create" != yes; then
18178   ac_cs_success=:
18179   ac_config_status_args=
18180   test "$silent" = yes &&
18181     ac_config_status_args="$ac_config_status_args --quiet"
18182   exec 5>/dev/null
18183   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
18184   exec 5>>config.log
18185   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18186   # would make configure fail if this is the last instruction.
18187   $ac_cs_success || as_fn_exit 1
18188 fi
18189 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18190   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18191 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
18192 fi
18193