]> granicus.if.org Git - postgresql/blob - configure
Move ALTER ... ALL IN to ProcessUtilitySlow
[postgresql] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for PostgreSQL 9.5devel.
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-2014, 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='9.5devel'
586 PACKAGE_STRING='PostgreSQL 9.5devel'
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 PROVE
631 OSX
632 XSLTPROC
633 COLLATEINDEX
634 DOCBOOKSTYLE
635 have_docbook
636 JADE
637 NSGMLS
638 TCL_SHLIB_LD_LIBS
639 TCL_SHARED_BUILD
640 TCL_LIB_SPEC
641 TCL_LIBS
642 TCL_LIB_FILE
643 TCL_INCLUDE_SPEC
644 TCL_CONFIG_SH
645 TCLSH
646 XGETTEXT
647 MSGMERGE
648 MSGFMT_FLAGS
649 MSGFMT
650 HAVE_POSIX_SIGNALS
651 LDAP_LIBS_BE
652 LDAP_LIBS_FE
653 PTHREAD_CFLAGS
654 PTHREAD_LIBS
655 acx_pthread_config
656 have_win32_dbghelp
657 HAVE_IPV6
658 LIBOBJS
659 UUID_LIBS
660 ZIC
661 python_enable_shared
662 python_additional_libs
663 python_libspec
664 python_libdir
665 python_includespec
666 python_version
667 python_majorversion
668 PYTHON
669 perl_embed_ldflags
670 perl_useshrplib
671 perl_privlibexp
672 perl_archlibexp
673 PERL
674 FLEXFLAGS
675 FLEX
676 BISONFLAGS
677 BISON
678 MKDIR_P
679 AWK
680 LN_S
681 TAR
682 install_bin
683 INSTALL_DATA
684 INSTALL_SCRIPT
685 INSTALL_PROGRAM
686 WINDRES
687 DLLWRAP
688 DLLTOOL
689 AR
690 STRIP_SHARED_LIB
691 STRIP_STATIC_LIB
692 STRIP
693 RANLIB
694 ld_R_works
695 with_gnu_ld
696 LD
697 LDFLAGS_SL
698 LDFLAGS_EX
699 ELF_SYS
700 EGREP
701 GREP
702 with_zlib
703 with_system_tzdata
704 with_libxslt
705 with_libxml
706 XML2_CONFIG
707 UUID_EXTRA_OBJS
708 with_uuid
709 with_selinux
710 with_openssl
711 krb_srvtab
712 with_python
713 with_perl
714 with_tcl
715 enable_thread_safety
716 INCLUDES
717 autodepend
718 TAS
719 GCC
720 CPP
721 CFLAGS_VECTOR
722 SUN_STUDIO_CC
723 OBJEXT
724 EXEEXT
725 ac_ct_CC
726 CPPFLAGS
727 LDFLAGS
728 CFLAGS
729 CC
730 enable_dtrace
731 DTRACEFLAGS
732 DTRACE
733 enable_coverage
734 GENHTML
735 LCOV
736 GCOV
737 enable_debug
738 enable_rpath
739 default_port
740 WANTED_LANGUAGES
741 enable_nls
742 PORTNAME
743 host_os
744 host_vendor
745 host_cpu
746 host
747 build_os
748 build_vendor
749 build_cpu
750 build
751 PG_MAJORVERSION
752 configure_args
753 target_alias
754 host_alias
755 build_alias
756 LIBS
757 ECHO_T
758 ECHO_N
759 ECHO_C
760 DEFS
761 mandir
762 localedir
763 libdir
764 psdir
765 pdfdir
766 dvidir
767 htmldir
768 infodir
769 docdir
770 oldincludedir
771 includedir
772 localstatedir
773 sharedstatedir
774 sysconfdir
775 datadir
776 datarootdir
777 libexecdir
778 sbindir
779 bindir
780 program_transform_name
781 prefix
782 exec_prefix
783 PACKAGE_URL
784 PACKAGE_BUGREPORT
785 PACKAGE_STRING
786 PACKAGE_VERSION
787 PACKAGE_TARNAME
788 PACKAGE_NAME
789 PATH_SEPARATOR
790 SHELL'
791 ac_subst_files=''
792 ac_user_opts='
793 enable_option_checking
794 with_extra_version
795 with_template
796 with_includes
797 with_libraries
798 with_libs
799 enable_integer_datetimes
800 enable_nls
801 with_pgport
802 enable_rpath
803 enable_spinlocks
804 enable_debug
805 enable_profiling
806 enable_coverage
807 enable_dtrace
808 with_blocksize
809 with_segsize
810 with_wal_blocksize
811 with_wal_segsize
812 with_CC
813 enable_depend
814 enable_cassert
815 enable_thread_safety
816 with_tcl
817 with_tclconfig
818 with_perl
819 with_python
820 with_gssapi
821 with_krb_srvnam
822 with_pam
823 with_ldap
824 with_bonjour
825 with_openssl
826 with_selinux
827 with_readline
828 with_libedit_preferred
829 with_uuid
830 with_ossp_uuid
831 with_libxml
832 with_libxslt
833 with_system_tzdata
834 with_zlib
835 with_gnu_ld
836 enable_largefile
837 enable_float4_byval
838 enable_float8_byval
839 '
840       ac_precious_vars='build_alias
841 host_alias
842 target_alias
843 CC
844 CFLAGS
845 LDFLAGS
846 LIBS
847 CPPFLAGS
848 CPP
849 LDFLAGS_EX
850 LDFLAGS_SL
851 DOCBOOKSTYLE'
852
853
854 # Initialize some variables set by options.
855 ac_init_help=
856 ac_init_version=false
857 ac_unrecognized_opts=
858 ac_unrecognized_sep=
859 # The variables have the same names as the options, with
860 # dashes changed to underlines.
861 cache_file=/dev/null
862 exec_prefix=NONE
863 no_create=
864 no_recursion=
865 prefix=NONE
866 program_prefix=NONE
867 program_suffix=NONE
868 program_transform_name=s,x,x,
869 silent=
870 site=
871 srcdir=
872 verbose=
873 x_includes=NONE
874 x_libraries=NONE
875
876 # Installation directory options.
877 # These are left unexpanded so users can "make install exec_prefix=/foo"
878 # and all the variables that are supposed to be based on exec_prefix
879 # by default will actually change.
880 # Use braces instead of parens because sh, perl, etc. also accept them.
881 # (The list follows the same order as the GNU Coding Standards.)
882 bindir='${exec_prefix}/bin'
883 sbindir='${exec_prefix}/sbin'
884 libexecdir='${exec_prefix}/libexec'
885 datarootdir='${prefix}/share'
886 datadir='${datarootdir}'
887 sysconfdir='${prefix}/etc'
888 sharedstatedir='${prefix}/com'
889 localstatedir='${prefix}/var'
890 includedir='${prefix}/include'
891 oldincludedir='/usr/include'
892 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
893 infodir='${datarootdir}/info'
894 htmldir='${docdir}'
895 dvidir='${docdir}'
896 pdfdir='${docdir}'
897 psdir='${docdir}'
898 libdir='${exec_prefix}/lib'
899 localedir='${datarootdir}/locale'
900 mandir='${datarootdir}/man'
901
902 ac_prev=
903 ac_dashdash=
904 for ac_option
905 do
906   # If the previous option needs an argument, assign it.
907   if test -n "$ac_prev"; then
908     eval $ac_prev=\$ac_option
909     ac_prev=
910     continue
911   fi
912
913   case $ac_option in
914   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
915   *=)   ac_optarg= ;;
916   *)    ac_optarg=yes ;;
917   esac
918
919   # Accept the important Cygnus configure options, so we can diagnose typos.
920
921   case $ac_dashdash$ac_option in
922   --)
923     ac_dashdash=yes ;;
924
925   -bindir | --bindir | --bindi | --bind | --bin | --bi)
926     ac_prev=bindir ;;
927   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
928     bindir=$ac_optarg ;;
929
930   -build | --build | --buil | --bui | --bu)
931     ac_prev=build_alias ;;
932   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
933     build_alias=$ac_optarg ;;
934
935   -cache-file | --cache-file | --cache-fil | --cache-fi \
936   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
937     ac_prev=cache_file ;;
938   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
939   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
940     cache_file=$ac_optarg ;;
941
942   --config-cache | -C)
943     cache_file=config.cache ;;
944
945   -datadir | --datadir | --datadi | --datad)
946     ac_prev=datadir ;;
947   -datadir=* | --datadir=* | --datadi=* | --datad=*)
948     datadir=$ac_optarg ;;
949
950   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
951   | --dataroo | --dataro | --datar)
952     ac_prev=datarootdir ;;
953   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
954   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
955     datarootdir=$ac_optarg ;;
956
957   -disable-* | --disable-*)
958     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
959     # Reject names that are not valid shell variable names.
960     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
961       as_fn_error $? "invalid feature name: $ac_useropt"
962     ac_useropt_orig=$ac_useropt
963     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
964     case $ac_user_opts in
965       *"
966 "enable_$ac_useropt"
967 "*) ;;
968       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
969          ac_unrecognized_sep=', ';;
970     esac
971     eval enable_$ac_useropt=no ;;
972
973   -docdir | --docdir | --docdi | --doc | --do)
974     ac_prev=docdir ;;
975   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
976     docdir=$ac_optarg ;;
977
978   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
979     ac_prev=dvidir ;;
980   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
981     dvidir=$ac_optarg ;;
982
983   -enable-* | --enable-*)
984     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
985     # Reject names that are not valid shell variable names.
986     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
987       as_fn_error $? "invalid feature name: $ac_useropt"
988     ac_useropt_orig=$ac_useropt
989     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
990     case $ac_user_opts in
991       *"
992 "enable_$ac_useropt"
993 "*) ;;
994       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
995          ac_unrecognized_sep=', ';;
996     esac
997     eval enable_$ac_useropt=\$ac_optarg ;;
998
999   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1000   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1001   | --exec | --exe | --ex)
1002     ac_prev=exec_prefix ;;
1003   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1004   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1005   | --exec=* | --exe=* | --ex=*)
1006     exec_prefix=$ac_optarg ;;
1007
1008   -gas | --gas | --ga | --g)
1009     # Obsolete; use --with-gas.
1010     with_gas=yes ;;
1011
1012   -help | --help | --hel | --he | -h)
1013     ac_init_help=long ;;
1014   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1015     ac_init_help=recursive ;;
1016   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1017     ac_init_help=short ;;
1018
1019   -host | --host | --hos | --ho)
1020     ac_prev=host_alias ;;
1021   -host=* | --host=* | --hos=* | --ho=*)
1022     host_alias=$ac_optarg ;;
1023
1024   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1025     ac_prev=htmldir ;;
1026   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1027   | --ht=*)
1028     htmldir=$ac_optarg ;;
1029
1030   -includedir | --includedir | --includedi | --included | --include \
1031   | --includ | --inclu | --incl | --inc)
1032     ac_prev=includedir ;;
1033   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1034   | --includ=* | --inclu=* | --incl=* | --inc=*)
1035     includedir=$ac_optarg ;;
1036
1037   -infodir | --infodir | --infodi | --infod | --info | --inf)
1038     ac_prev=infodir ;;
1039   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1040     infodir=$ac_optarg ;;
1041
1042   -libdir | --libdir | --libdi | --libd)
1043     ac_prev=libdir ;;
1044   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1045     libdir=$ac_optarg ;;
1046
1047   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1048   | --libexe | --libex | --libe)
1049     ac_prev=libexecdir ;;
1050   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1051   | --libexe=* | --libex=* | --libe=*)
1052     libexecdir=$ac_optarg ;;
1053
1054   -localedir | --localedir | --localedi | --localed | --locale)
1055     ac_prev=localedir ;;
1056   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1057     localedir=$ac_optarg ;;
1058
1059   -localstatedir | --localstatedir | --localstatedi | --localstated \
1060   | --localstate | --localstat | --localsta | --localst | --locals)
1061     ac_prev=localstatedir ;;
1062   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1063   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1064     localstatedir=$ac_optarg ;;
1065
1066   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1067     ac_prev=mandir ;;
1068   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1069     mandir=$ac_optarg ;;
1070
1071   -nfp | --nfp | --nf)
1072     # Obsolete; use --without-fp.
1073     with_fp=no ;;
1074
1075   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1076   | --no-cr | --no-c | -n)
1077     no_create=yes ;;
1078
1079   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1080   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1081     no_recursion=yes ;;
1082
1083   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1084   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1085   | --oldin | --oldi | --old | --ol | --o)
1086     ac_prev=oldincludedir ;;
1087   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1088   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1089   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1090     oldincludedir=$ac_optarg ;;
1091
1092   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1093     ac_prev=prefix ;;
1094   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1095     prefix=$ac_optarg ;;
1096
1097   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1098   | --program-pre | --program-pr | --program-p)
1099     ac_prev=program_prefix ;;
1100   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1101   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1102     program_prefix=$ac_optarg ;;
1103
1104   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1105   | --program-suf | --program-su | --program-s)
1106     ac_prev=program_suffix ;;
1107   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1108   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1109     program_suffix=$ac_optarg ;;
1110
1111   -program-transform-name | --program-transform-name \
1112   | --program-transform-nam | --program-transform-na \
1113   | --program-transform-n | --program-transform- \
1114   | --program-transform | --program-transfor \
1115   | --program-transfo | --program-transf \
1116   | --program-trans | --program-tran \
1117   | --progr-tra | --program-tr | --program-t)
1118     ac_prev=program_transform_name ;;
1119   -program-transform-name=* | --program-transform-name=* \
1120   | --program-transform-nam=* | --program-transform-na=* \
1121   | --program-transform-n=* | --program-transform-=* \
1122   | --program-transform=* | --program-transfor=* \
1123   | --program-transfo=* | --program-transf=* \
1124   | --program-trans=* | --program-tran=* \
1125   | --progr-tra=* | --program-tr=* | --program-t=*)
1126     program_transform_name=$ac_optarg ;;
1127
1128   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1129     ac_prev=pdfdir ;;
1130   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1131     pdfdir=$ac_optarg ;;
1132
1133   -psdir | --psdir | --psdi | --psd | --ps)
1134     ac_prev=psdir ;;
1135   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1136     psdir=$ac_optarg ;;
1137
1138   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1139   | -silent | --silent | --silen | --sile | --sil)
1140     silent=yes ;;
1141
1142   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1143     ac_prev=sbindir ;;
1144   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1145   | --sbi=* | --sb=*)
1146     sbindir=$ac_optarg ;;
1147
1148   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1149   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1150   | --sharedst | --shareds | --shared | --share | --shar \
1151   | --sha | --sh)
1152     ac_prev=sharedstatedir ;;
1153   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1154   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1155   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1156   | --sha=* | --sh=*)
1157     sharedstatedir=$ac_optarg ;;
1158
1159   -site | --site | --sit)
1160     ac_prev=site ;;
1161   -site=* | --site=* | --sit=*)
1162     site=$ac_optarg ;;
1163
1164   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1165     ac_prev=srcdir ;;
1166   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1167     srcdir=$ac_optarg ;;
1168
1169   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1170   | --syscon | --sysco | --sysc | --sys | --sy)
1171     ac_prev=sysconfdir ;;
1172   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1173   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1174     sysconfdir=$ac_optarg ;;
1175
1176   -target | --target | --targe | --targ | --tar | --ta | --t)
1177     ac_prev=target_alias ;;
1178   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1179     target_alias=$ac_optarg ;;
1180
1181   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1182     verbose=yes ;;
1183
1184   -version | --version | --versio | --versi | --vers | -V)
1185     ac_init_version=: ;;
1186
1187   -with-* | --with-*)
1188     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1189     # Reject names that are not valid shell variable names.
1190     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1191       as_fn_error $? "invalid package name: $ac_useropt"
1192     ac_useropt_orig=$ac_useropt
1193     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1194     case $ac_user_opts in
1195       *"
1196 "with_$ac_useropt"
1197 "*) ;;
1198       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1199          ac_unrecognized_sep=', ';;
1200     esac
1201     eval with_$ac_useropt=\$ac_optarg ;;
1202
1203   -without-* | --without-*)
1204     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1205     # Reject names that are not valid shell variable names.
1206     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1207       as_fn_error $? "invalid package name: $ac_useropt"
1208     ac_useropt_orig=$ac_useropt
1209     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1210     case $ac_user_opts in
1211       *"
1212 "with_$ac_useropt"
1213 "*) ;;
1214       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1215          ac_unrecognized_sep=', ';;
1216     esac
1217     eval with_$ac_useropt=no ;;
1218
1219   --x)
1220     # Obsolete; use --with-x.
1221     with_x=yes ;;
1222
1223   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1224   | --x-incl | --x-inc | --x-in | --x-i)
1225     ac_prev=x_includes ;;
1226   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1227   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1228     x_includes=$ac_optarg ;;
1229
1230   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1231   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1232     ac_prev=x_libraries ;;
1233   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1234   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1235     x_libraries=$ac_optarg ;;
1236
1237   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1238 Try \`$0 --help' for more information"
1239     ;;
1240
1241   *=*)
1242     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1243     # Reject names that are not valid shell variable names.
1244     case $ac_envvar in #(
1245       '' | [0-9]* | *[!_$as_cr_alnum]* )
1246       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1247     esac
1248     eval $ac_envvar=\$ac_optarg
1249     export $ac_envvar ;;
1250
1251   *)
1252     # FIXME: should be removed in autoconf 3.0.
1253     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1254     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1255       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1256     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1257     ;;
1258
1259   esac
1260 done
1261
1262 if test -n "$ac_prev"; then
1263   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1264   as_fn_error $? "missing argument to $ac_option"
1265 fi
1266
1267 if test -n "$ac_unrecognized_opts"; then
1268   case $enable_option_checking in
1269     no) ;;
1270     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1271     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1272   esac
1273 fi
1274
1275 # Check all directory arguments for consistency.
1276 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1277                 datadir sysconfdir sharedstatedir localstatedir includedir \
1278                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1279                 libdir localedir mandir
1280 do
1281   eval ac_val=\$$ac_var
1282   # Remove trailing slashes.
1283   case $ac_val in
1284     */ )
1285       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1286       eval $ac_var=\$ac_val;;
1287   esac
1288   # Be sure to have absolute directory names.
1289   case $ac_val in
1290     [\\/$]* | ?:[\\/]* )  continue;;
1291     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1292   esac
1293   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1294 done
1295
1296 # There might be people who depend on the old broken behavior: `$host'
1297 # used to hold the argument of --host etc.
1298 # FIXME: To remove some day.
1299 build=$build_alias
1300 host=$host_alias
1301 target=$target_alias
1302
1303 # FIXME: To remove some day.
1304 if test "x$host_alias" != x; then
1305   if test "x$build_alias" = x; then
1306     cross_compiling=maybe
1307   elif test "x$build_alias" != "x$host_alias"; then
1308     cross_compiling=yes
1309   fi
1310 fi
1311
1312 ac_tool_prefix=
1313 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1314
1315 test "$silent" = yes && exec 6>/dev/null
1316
1317
1318 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1319 ac_ls_di=`ls -di .` &&
1320 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1321   as_fn_error $? "working directory cannot be determined"
1322 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1323   as_fn_error $? "pwd does not report name of working directory"
1324
1325
1326 # Find the source files, if location was not specified.
1327 if test -z "$srcdir"; then
1328   ac_srcdir_defaulted=yes
1329   # Try the directory containing this script, then the parent directory.
1330   ac_confdir=`$as_dirname -- "$as_myself" ||
1331 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1332          X"$as_myself" : 'X\(//\)[^/]' \| \
1333          X"$as_myself" : 'X\(//\)$' \| \
1334          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1335 $as_echo X"$as_myself" |
1336     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1337             s//\1/
1338             q
1339           }
1340           /^X\(\/\/\)[^/].*/{
1341             s//\1/
1342             q
1343           }
1344           /^X\(\/\/\)$/{
1345             s//\1/
1346             q
1347           }
1348           /^X\(\/\).*/{
1349             s//\1/
1350             q
1351           }
1352           s/.*/./; q'`
1353   srcdir=$ac_confdir
1354   if test ! -r "$srcdir/$ac_unique_file"; then
1355     srcdir=..
1356   fi
1357 else
1358   ac_srcdir_defaulted=no
1359 fi
1360 if test ! -r "$srcdir/$ac_unique_file"; then
1361   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1362   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1363 fi
1364 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1365 ac_abs_confdir=`(
1366         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1367         pwd)`
1368 # When building in place, set srcdir=.
1369 if test "$ac_abs_confdir" = "$ac_pwd"; then
1370   srcdir=.
1371 fi
1372 # Remove unnecessary trailing slashes from srcdir.
1373 # Double slashes in file names in object file debugging info
1374 # mess up M-x gdb in Emacs.
1375 case $srcdir in
1376 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1377 esac
1378 for ac_var in $ac_precious_vars; do
1379   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1380   eval ac_env_${ac_var}_value=\$${ac_var}
1381   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1382   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1383 done
1384
1385 #
1386 # Report the --help message.
1387 #
1388 if test "$ac_init_help" = "long"; then
1389   # Omit some internal or obsolete options to make the list less imposing.
1390   # This message is too long to be a string in the A/UX 3.1 sh.
1391   cat <<_ACEOF
1392 \`configure' configures PostgreSQL 9.5devel to adapt to many kinds of systems.
1393
1394 Usage: $0 [OPTION]... [VAR=VALUE]...
1395
1396 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1397 VAR=VALUE.  See below for descriptions of some of the useful variables.
1398
1399 Defaults for the options are specified in brackets.
1400
1401 Configuration:
1402   -h, --help              display this help and exit
1403       --help=short        display options specific to this package
1404       --help=recursive    display the short help of all the included packages
1405   -V, --version           display version information and exit
1406   -q, --quiet, --silent   do not print \`checking ...' messages
1407       --cache-file=FILE   cache test results in FILE [disabled]
1408   -C, --config-cache      alias for \`--cache-file=config.cache'
1409   -n, --no-create         do not create output files
1410       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1411
1412 Installation directories:
1413   --prefix=PREFIX         install architecture-independent files in PREFIX
1414                           [$ac_default_prefix]
1415   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1416                           [PREFIX]
1417
1418 By default, \`make install' will install all the files in
1419 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1420 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1421 for instance \`--prefix=\$HOME'.
1422
1423 For better control, use the options below.
1424
1425 Fine tuning of the installation directories:
1426   --bindir=DIR            user executables [EPREFIX/bin]
1427   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1428   --libexecdir=DIR        program executables [EPREFIX/libexec]
1429   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1430   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1431   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1432   --libdir=DIR            object code libraries [EPREFIX/lib]
1433   --includedir=DIR        C header files [PREFIX/include]
1434   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1435   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1436   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1437   --infodir=DIR           info documentation [DATAROOTDIR/info]
1438   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1439   --mandir=DIR            man documentation [DATAROOTDIR/man]
1440   --docdir=DIR            documentation root [DATAROOTDIR/doc/postgresql]
1441   --htmldir=DIR           html documentation [DOCDIR]
1442   --dvidir=DIR            dvi documentation [DOCDIR]
1443   --pdfdir=DIR            pdf documentation [DOCDIR]
1444   --psdir=DIR             ps documentation [DOCDIR]
1445 _ACEOF
1446
1447   cat <<\_ACEOF
1448
1449 System types:
1450   --build=BUILD     configure for building on BUILD [guessed]
1451   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1452 _ACEOF
1453 fi
1454
1455 if test -n "$ac_init_help"; then
1456   case $ac_init_help in
1457      short | recursive ) echo "Configuration of PostgreSQL 9.5devel:";;
1458    esac
1459   cat <<\_ACEOF
1460
1461 Optional Features:
1462   --disable-option-checking  ignore unrecognized --enable/--with options
1463   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1464   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1465   --disable-integer-datetimes
1466                           disable 64-bit integer date/time support
1467   --enable-nls[=LANGUAGES]
1468                           enable Native Language Support
1469   --disable-rpath         do not embed shared library search path in
1470                           executables
1471   --disable-spinlocks     do not use spinlocks
1472   --enable-debug          build with debugging symbols (-g)
1473   --enable-profiling      build with profiling enabled
1474   --enable-coverage       build with coverage testing instrumentation
1475   --enable-dtrace         build with DTrace support
1476   --enable-depend         turn on automatic dependency tracking
1477   --enable-cassert        enable assertion checks (for debugging)
1478   --disable-thread-safety disable thread-safety in client libraries
1479   --disable-largefile     omit support for large files
1480   --disable-float4-byval  disable float4 passed by value
1481   --disable-float8-byval  disable float8 passed by value
1482
1483 Optional Packages:
1484   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1485   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1486   --with-extra-version=STRING
1487                           append STRING to version
1488   --with-template=NAME    override operating system template
1489   --with-includes=DIRS    look for additional header files in DIRS
1490   --with-libraries=DIRS   look for additional libraries in DIRS
1491   --with-libs=DIRS        alternative spelling of --with-libraries
1492   --with-pgport=PORTNUM   set default port number [5432]
1493   --with-blocksize=BLOCKSIZE
1494                           set table block size in kB [8]
1495   --with-segsize=SEGSIZE  set table segment size in GB [1]
1496   --with-wal-blocksize=BLOCKSIZE
1497                           set WAL block size in kB [8]
1498   --with-wal-segsize=SEGSIZE
1499                           set WAL segment size in MB [16]
1500   --with-CC=CMD           set compiler (deprecated)
1501   --with-tcl              build Tcl modules (PL/Tcl)
1502   --with-tclconfig=DIR    tclConfig.sh is in DIR
1503   --with-perl             build Perl modules (PL/Perl)
1504   --with-python           build Python modules (PL/Python)
1505   --with-gssapi           build with GSSAPI support
1506   --with-krb-srvnam=NAME  default service principal name in Kerberos (GSSAPI)
1507                           [postgres]
1508   --with-pam              build with PAM support
1509   --with-ldap             build with LDAP support
1510   --with-bonjour          build with Bonjour support
1511   --with-openssl          build with OpenSSL support
1512   --with-selinux          build with SELinux support
1513   --without-readline      do not use GNU Readline nor BSD Libedit for editing
1514   --with-libedit-preferred
1515                           prefer BSD Libedit over GNU Readline
1516   --with-uuid=LIB         build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1517   --with-ossp-uuid        obsolete spelling of --with-uuid=ossp
1518   --with-libxml           build with XML support
1519   --with-libxslt          use XSLT support when building contrib/xml2
1520   --with-system-tzdata=DIR
1521                           use system time zone data in DIR
1522   --without-zlib          do not use Zlib
1523   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1524
1525 Some influential environment variables:
1526   CC          C compiler command
1527   CFLAGS      C compiler flags
1528   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1529               nonstandard directory <lib dir>
1530   LIBS        libraries to pass to the linker, e.g. -l<library>
1531   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1532               you have headers in a nonstandard directory <include dir>
1533   CPP         C preprocessor
1534   LDFLAGS_EX  extra linker flags for linking executables only
1535   LDFLAGS_SL  extra linker flags for linking shared libraries only
1536   DOCBOOKSTYLE
1537               location of DocBook stylesheets
1538
1539 Use these variables to override the choices made by `configure' or to help
1540 it to find libraries and programs with nonstandard names/locations.
1541
1542 Report bugs to <pgsql-bugs@postgresql.org>.
1543 _ACEOF
1544 ac_status=$?
1545 fi
1546
1547 if test "$ac_init_help" = "recursive"; then
1548   # If there are subdirs, report their specific --help.
1549   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1550     test -d "$ac_dir" ||
1551       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1552       continue
1553     ac_builddir=.
1554
1555 case "$ac_dir" in
1556 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1557 *)
1558   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1559   # A ".." for each directory in $ac_dir_suffix.
1560   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1561   case $ac_top_builddir_sub in
1562   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1563   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1564   esac ;;
1565 esac
1566 ac_abs_top_builddir=$ac_pwd
1567 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1568 # for backward compatibility:
1569 ac_top_builddir=$ac_top_build_prefix
1570
1571 case $srcdir in
1572   .)  # We are building in place.
1573     ac_srcdir=.
1574     ac_top_srcdir=$ac_top_builddir_sub
1575     ac_abs_top_srcdir=$ac_pwd ;;
1576   [\\/]* | ?:[\\/]* )  # Absolute name.
1577     ac_srcdir=$srcdir$ac_dir_suffix;
1578     ac_top_srcdir=$srcdir
1579     ac_abs_top_srcdir=$srcdir ;;
1580   *) # Relative name.
1581     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1582     ac_top_srcdir=$ac_top_build_prefix$srcdir
1583     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1584 esac
1585 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1586
1587     cd "$ac_dir" || { ac_status=$?; continue; }
1588     # Check for guested configure.
1589     if test -f "$ac_srcdir/configure.gnu"; then
1590       echo &&
1591       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1592     elif test -f "$ac_srcdir/configure"; then
1593       echo &&
1594       $SHELL "$ac_srcdir/configure" --help=recursive
1595     else
1596       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1597     fi || ac_status=$?
1598     cd "$ac_pwd" || { ac_status=$?; break; }
1599   done
1600 fi
1601
1602 test -n "$ac_init_help" && exit $ac_status
1603 if $ac_init_version; then
1604   cat <<\_ACEOF
1605 PostgreSQL configure 9.5devel
1606 generated by GNU Autoconf 2.69
1607
1608 Copyright (C) 2012 Free Software Foundation, Inc.
1609 This configure script is free software; the Free Software Foundation
1610 gives unlimited permission to copy, distribute and modify it.
1611
1612 Copyright (c) 1996-2014, PostgreSQL Global Development Group
1613 _ACEOF
1614   exit
1615 fi
1616
1617 ## ------------------------ ##
1618 ## Autoconf initialization. ##
1619 ## ------------------------ ##
1620
1621 # ac_fn_c_try_compile LINENO
1622 # --------------------------
1623 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1624 ac_fn_c_try_compile ()
1625 {
1626   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1627   rm -f conftest.$ac_objext
1628   if { { ac_try="$ac_compile"
1629 case "(($ac_try" in
1630   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1631   *) ac_try_echo=$ac_try;;
1632 esac
1633 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1634 $as_echo "$ac_try_echo"; } >&5
1635   (eval "$ac_compile") 2>conftest.err
1636   ac_status=$?
1637   if test -s conftest.err; then
1638     grep -v '^ *+' conftest.err >conftest.er1
1639     cat conftest.er1 >&5
1640     mv -f conftest.er1 conftest.err
1641   fi
1642   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1643   test $ac_status = 0; } && {
1644          test -z "$ac_c_werror_flag" ||
1645          test ! -s conftest.err
1646        } && test -s conftest.$ac_objext; then :
1647   ac_retval=0
1648 else
1649   $as_echo "$as_me: failed program was:" >&5
1650 sed 's/^/| /' conftest.$ac_ext >&5
1651
1652         ac_retval=1
1653 fi
1654   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1655   as_fn_set_status $ac_retval
1656
1657 } # ac_fn_c_try_compile
1658
1659 # ac_fn_c_try_link LINENO
1660 # -----------------------
1661 # Try to link conftest.$ac_ext, and return whether this succeeded.
1662 ac_fn_c_try_link ()
1663 {
1664   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1665   rm -f conftest.$ac_objext conftest$ac_exeext
1666   if { { ac_try="$ac_link"
1667 case "(($ac_try" in
1668   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1669   *) ac_try_echo=$ac_try;;
1670 esac
1671 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1672 $as_echo "$ac_try_echo"; } >&5
1673   (eval "$ac_link") 2>conftest.err
1674   ac_status=$?
1675   if test -s conftest.err; then
1676     grep -v '^ *+' conftest.err >conftest.er1
1677     cat conftest.er1 >&5
1678     mv -f conftest.er1 conftest.err
1679   fi
1680   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1681   test $ac_status = 0; } && {
1682          test -z "$ac_c_werror_flag" ||
1683          test ! -s conftest.err
1684        } && test -s conftest$ac_exeext && {
1685          test "$cross_compiling" = yes ||
1686          test -x conftest$ac_exeext
1687        }; then :
1688   ac_retval=0
1689 else
1690   $as_echo "$as_me: failed program was:" >&5
1691 sed 's/^/| /' conftest.$ac_ext >&5
1692
1693         ac_retval=1
1694 fi
1695   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1696   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1697   # interfere with the next link command; also delete a directory that is
1698   # left behind by Apple's compiler.  We do this before executing the actions.
1699   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1700   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1701   as_fn_set_status $ac_retval
1702
1703 } # ac_fn_c_try_link
1704
1705 # ac_fn_c_try_cpp LINENO
1706 # ----------------------
1707 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1708 ac_fn_c_try_cpp ()
1709 {
1710   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1711   if { { ac_try="$ac_cpp conftest.$ac_ext"
1712 case "(($ac_try" in
1713   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1714   *) ac_try_echo=$ac_try;;
1715 esac
1716 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1717 $as_echo "$ac_try_echo"; } >&5
1718   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1719   ac_status=$?
1720   if test -s conftest.err; then
1721     grep -v '^ *+' conftest.err >conftest.er1
1722     cat conftest.er1 >&5
1723     mv -f conftest.er1 conftest.err
1724   fi
1725   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1726   test $ac_status = 0; } > conftest.i && {
1727          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1728          test ! -s conftest.err
1729        }; then :
1730   ac_retval=0
1731 else
1732   $as_echo "$as_me: failed program was:" >&5
1733 sed 's/^/| /' conftest.$ac_ext >&5
1734
1735     ac_retval=1
1736 fi
1737   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1738   as_fn_set_status $ac_retval
1739
1740 } # ac_fn_c_try_cpp
1741
1742 # ac_fn_c_check_func LINENO FUNC VAR
1743 # ----------------------------------
1744 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1745 ac_fn_c_check_func ()
1746 {
1747   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1748   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1749 $as_echo_n "checking for $2... " >&6; }
1750 if eval \${$3+:} false; then :
1751   $as_echo_n "(cached) " >&6
1752 else
1753   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1754 /* end confdefs.h.  */
1755 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1756    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1757 #define $2 innocuous_$2
1758
1759 /* System header to define __stub macros and hopefully few prototypes,
1760     which can conflict with char $2 (); below.
1761     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1762     <limits.h> exists even on freestanding compilers.  */
1763
1764 #ifdef __STDC__
1765 # include <limits.h>
1766 #else
1767 # include <assert.h>
1768 #endif
1769
1770 #undef $2
1771
1772 /* Override any GCC internal prototype to avoid an error.
1773    Use char because int might match the return type of a GCC
1774    builtin and then its argument prototype would still apply.  */
1775 #ifdef __cplusplus
1776 extern "C"
1777 #endif
1778 char $2 ();
1779 /* The GNU C library defines this for functions which it implements
1780     to always fail with ENOSYS.  Some functions are actually named
1781     something starting with __ and the normal name is an alias.  */
1782 #if defined __stub_$2 || defined __stub___$2
1783 choke me
1784 #endif
1785
1786 int
1787 main ()
1788 {
1789 return $2 ();
1790   ;
1791   return 0;
1792 }
1793 _ACEOF
1794 if ac_fn_c_try_link "$LINENO"; then :
1795   eval "$3=yes"
1796 else
1797   eval "$3=no"
1798 fi
1799 rm -f core conftest.err conftest.$ac_objext \
1800     conftest$ac_exeext conftest.$ac_ext
1801 fi
1802 eval ac_res=\$$3
1803                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1804 $as_echo "$ac_res" >&6; }
1805   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1806
1807 } # ac_fn_c_check_func
1808
1809 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1810 # -------------------------------------------------------
1811 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1812 # the include files in INCLUDES and setting the cache variable VAR
1813 # accordingly.
1814 ac_fn_c_check_header_mongrel ()
1815 {
1816   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1817   if eval \${$3+:} false; then :
1818   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1819 $as_echo_n "checking for $2... " >&6; }
1820 if eval \${$3+:} false; then :
1821   $as_echo_n "(cached) " >&6
1822 fi
1823 eval ac_res=\$$3
1824                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1825 $as_echo "$ac_res" >&6; }
1826 else
1827   # Is the header compilable?
1828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1829 $as_echo_n "checking $2 usability... " >&6; }
1830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1831 /* end confdefs.h.  */
1832 $4
1833 #include <$2>
1834 _ACEOF
1835 if ac_fn_c_try_compile "$LINENO"; then :
1836   ac_header_compiler=yes
1837 else
1838   ac_header_compiler=no
1839 fi
1840 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1842 $as_echo "$ac_header_compiler" >&6; }
1843
1844 # Is the header present?
1845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1846 $as_echo_n "checking $2 presence... " >&6; }
1847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1848 /* end confdefs.h.  */
1849 #include <$2>
1850 _ACEOF
1851 if ac_fn_c_try_cpp "$LINENO"; then :
1852   ac_header_preproc=yes
1853 else
1854   ac_header_preproc=no
1855 fi
1856 rm -f conftest.err conftest.i conftest.$ac_ext
1857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1858 $as_echo "$ac_header_preproc" >&6; }
1859
1860 # So?  What about this header?
1861 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1862   yes:no: )
1863     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1864 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1865     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1866 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1867     ;;
1868   no:yes:* )
1869     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1870 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1871     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1872 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1873     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1874 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1875     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1876 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1877     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1878 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1879 ( $as_echo "## ---------------------------------------- ##
1880 ## Report this to pgsql-bugs@postgresql.org ##
1881 ## ---------------------------------------- ##"
1882      ) | sed "s/^/$as_me: WARNING:     /" >&2
1883     ;;
1884 esac
1885   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1886 $as_echo_n "checking for $2... " >&6; }
1887 if eval \${$3+:} false; then :
1888   $as_echo_n "(cached) " >&6
1889 else
1890   eval "$3=\$ac_header_compiler"
1891 fi
1892 eval ac_res=\$$3
1893                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1894 $as_echo "$ac_res" >&6; }
1895 fi
1896   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1897
1898 } # ac_fn_c_check_header_mongrel
1899
1900 # ac_fn_c_try_run LINENO
1901 # ----------------------
1902 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1903 # that executables *can* be run.
1904 ac_fn_c_try_run ()
1905 {
1906   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1907   if { { ac_try="$ac_link"
1908 case "(($ac_try" in
1909   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1910   *) ac_try_echo=$ac_try;;
1911 esac
1912 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1913 $as_echo "$ac_try_echo"; } >&5
1914   (eval "$ac_link") 2>&5
1915   ac_status=$?
1916   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1917   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1918   { { case "(($ac_try" in
1919   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1920   *) ac_try_echo=$ac_try;;
1921 esac
1922 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1923 $as_echo "$ac_try_echo"; } >&5
1924   (eval "$ac_try") 2>&5
1925   ac_status=$?
1926   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1927   test $ac_status = 0; }; }; then :
1928   ac_retval=0
1929 else
1930   $as_echo "$as_me: program exited with status $ac_status" >&5
1931        $as_echo "$as_me: failed program was:" >&5
1932 sed 's/^/| /' conftest.$ac_ext >&5
1933
1934        ac_retval=$ac_status
1935 fi
1936   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1937   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1938   as_fn_set_status $ac_retval
1939
1940 } # ac_fn_c_try_run
1941
1942 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1943 # -------------------------------------------------------
1944 # Tests whether HEADER exists and can be compiled using the include files in
1945 # INCLUDES, setting the cache variable VAR accordingly.
1946 ac_fn_c_check_header_compile ()
1947 {
1948   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1949   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1950 $as_echo_n "checking for $2... " >&6; }
1951 if eval \${$3+:} false; then :
1952   $as_echo_n "(cached) " >&6
1953 else
1954   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1955 /* end confdefs.h.  */
1956 $4
1957 #include <$2>
1958 _ACEOF
1959 if ac_fn_c_try_compile "$LINENO"; then :
1960   eval "$3=yes"
1961 else
1962   eval "$3=no"
1963 fi
1964 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1965 fi
1966 eval ac_res=\$$3
1967                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1968 $as_echo "$ac_res" >&6; }
1969   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1970
1971 } # ac_fn_c_check_header_compile
1972
1973 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
1974 # ----------------------------------------------------
1975 # Tries to find if the field MEMBER exists in type AGGR, after including
1976 # INCLUDES, setting cache variable VAR accordingly.
1977 ac_fn_c_check_member ()
1978 {
1979   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1980   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
1981 $as_echo_n "checking for $2.$3... " >&6; }
1982 if eval \${$4+:} false; then :
1983   $as_echo_n "(cached) " >&6
1984 else
1985   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1986 /* end confdefs.h.  */
1987 $5
1988 int
1989 main ()
1990 {
1991 static $2 ac_aggr;
1992 if (ac_aggr.$3)
1993 return 0;
1994   ;
1995   return 0;
1996 }
1997 _ACEOF
1998 if ac_fn_c_try_compile "$LINENO"; then :
1999   eval "$4=yes"
2000 else
2001   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2002 /* end confdefs.h.  */
2003 $5
2004 int
2005 main ()
2006 {
2007 static $2 ac_aggr;
2008 if (sizeof ac_aggr.$3)
2009 return 0;
2010   ;
2011   return 0;
2012 }
2013 _ACEOF
2014 if ac_fn_c_try_compile "$LINENO"; then :
2015   eval "$4=yes"
2016 else
2017   eval "$4=no"
2018 fi
2019 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2020 fi
2021 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2022 fi
2023 eval ac_res=\$$4
2024                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2025 $as_echo "$ac_res" >&6; }
2026   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2027
2028 } # ac_fn_c_check_member
2029
2030 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2031 # -------------------------------------------
2032 # Tests whether TYPE exists after having included INCLUDES, setting cache
2033 # variable VAR accordingly.
2034 ac_fn_c_check_type ()
2035 {
2036   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2037   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2038 $as_echo_n "checking for $2... " >&6; }
2039 if eval \${$3+:} false; then :
2040   $as_echo_n "(cached) " >&6
2041 else
2042   eval "$3=no"
2043   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2044 /* end confdefs.h.  */
2045 $4
2046 int
2047 main ()
2048 {
2049 if (sizeof ($2))
2050          return 0;
2051   ;
2052   return 0;
2053 }
2054 _ACEOF
2055 if ac_fn_c_try_compile "$LINENO"; then :
2056   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2057 /* end confdefs.h.  */
2058 $4
2059 int
2060 main ()
2061 {
2062 if (sizeof (($2)))
2063             return 0;
2064   ;
2065   return 0;
2066 }
2067 _ACEOF
2068 if ac_fn_c_try_compile "$LINENO"; then :
2069
2070 else
2071   eval "$3=yes"
2072 fi
2073 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2074 fi
2075 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2076 fi
2077 eval ac_res=\$$3
2078                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2079 $as_echo "$ac_res" >&6; }
2080   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2081
2082 } # ac_fn_c_check_type
2083
2084 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2085 # --------------------------------------------
2086 # Tries to find the compile-time value of EXPR in a program that includes
2087 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2088 # computed
2089 ac_fn_c_compute_int ()
2090 {
2091   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2092   if test "$cross_compiling" = yes; then
2093     # Depending upon the size, compute the lo and hi bounds.
2094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2095 /* end confdefs.h.  */
2096 $4
2097 int
2098 main ()
2099 {
2100 static int test_array [1 - 2 * !(($2) >= 0)];
2101 test_array [0] = 0;
2102 return test_array [0];
2103
2104   ;
2105   return 0;
2106 }
2107 _ACEOF
2108 if ac_fn_c_try_compile "$LINENO"; then :
2109   ac_lo=0 ac_mid=0
2110   while :; do
2111     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2112 /* end confdefs.h.  */
2113 $4
2114 int
2115 main ()
2116 {
2117 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2118 test_array [0] = 0;
2119 return test_array [0];
2120
2121   ;
2122   return 0;
2123 }
2124 _ACEOF
2125 if ac_fn_c_try_compile "$LINENO"; then :
2126   ac_hi=$ac_mid; break
2127 else
2128   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2129                         if test $ac_lo -le $ac_mid; then
2130                           ac_lo= ac_hi=
2131                           break
2132                         fi
2133                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2134 fi
2135 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2136   done
2137 else
2138   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2139 /* end confdefs.h.  */
2140 $4
2141 int
2142 main ()
2143 {
2144 static int test_array [1 - 2 * !(($2) < 0)];
2145 test_array [0] = 0;
2146 return test_array [0];
2147
2148   ;
2149   return 0;
2150 }
2151 _ACEOF
2152 if ac_fn_c_try_compile "$LINENO"; then :
2153   ac_hi=-1 ac_mid=-1
2154   while :; do
2155     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2156 /* end confdefs.h.  */
2157 $4
2158 int
2159 main ()
2160 {
2161 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2162 test_array [0] = 0;
2163 return test_array [0];
2164
2165   ;
2166   return 0;
2167 }
2168 _ACEOF
2169 if ac_fn_c_try_compile "$LINENO"; then :
2170   ac_lo=$ac_mid; break
2171 else
2172   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2173                         if test $ac_mid -le $ac_hi; then
2174                           ac_lo= ac_hi=
2175                           break
2176                         fi
2177                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2178 fi
2179 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2180   done
2181 else
2182   ac_lo= ac_hi=
2183 fi
2184 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2185 fi
2186 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2187 # Binary search between lo and hi bounds.
2188 while test "x$ac_lo" != "x$ac_hi"; do
2189   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2190   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2191 /* end confdefs.h.  */
2192 $4
2193 int
2194 main ()
2195 {
2196 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2197 test_array [0] = 0;
2198 return test_array [0];
2199
2200   ;
2201   return 0;
2202 }
2203 _ACEOF
2204 if ac_fn_c_try_compile "$LINENO"; then :
2205   ac_hi=$ac_mid
2206 else
2207   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2208 fi
2209 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2210 done
2211 case $ac_lo in #((
2212 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2213 '') ac_retval=1 ;;
2214 esac
2215   else
2216     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2217 /* end confdefs.h.  */
2218 $4
2219 static long int longval () { return $2; }
2220 static unsigned long int ulongval () { return $2; }
2221 #include <stdio.h>
2222 #include <stdlib.h>
2223 int
2224 main ()
2225 {
2226
2227   FILE *f = fopen ("conftest.val", "w");
2228   if (! f)
2229     return 1;
2230   if (($2) < 0)
2231     {
2232       long int i = longval ();
2233       if (i != ($2))
2234         return 1;
2235       fprintf (f, "%ld", i);
2236     }
2237   else
2238     {
2239       unsigned long int i = ulongval ();
2240       if (i != ($2))
2241         return 1;
2242       fprintf (f, "%lu", i);
2243     }
2244   /* Do not output a trailing newline, as this causes \r\n confusion
2245      on some platforms.  */
2246   return ferror (f) || fclose (f) != 0;
2247
2248   ;
2249   return 0;
2250 }
2251 _ACEOF
2252 if ac_fn_c_try_run "$LINENO"; then :
2253   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2254 else
2255   ac_retval=1
2256 fi
2257 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2258   conftest.$ac_objext conftest.beam conftest.$ac_ext
2259 rm -f conftest.val
2260
2261   fi
2262   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2263   as_fn_set_status $ac_retval
2264
2265 } # ac_fn_c_compute_int
2266
2267 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2268 # ---------------------------------------------
2269 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2270 # accordingly.
2271 ac_fn_c_check_decl ()
2272 {
2273   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2274   as_decl_name=`echo $2|sed 's/ *(.*//'`
2275   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2276   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2277 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2278 if eval \${$3+:} false; then :
2279   $as_echo_n "(cached) " >&6
2280 else
2281   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2282 /* end confdefs.h.  */
2283 $4
2284 int
2285 main ()
2286 {
2287 #ifndef $as_decl_name
2288 #ifdef __cplusplus
2289   (void) $as_decl_use;
2290 #else
2291   (void) $as_decl_name;
2292 #endif
2293 #endif
2294
2295   ;
2296   return 0;
2297 }
2298 _ACEOF
2299 if ac_fn_c_try_compile "$LINENO"; then :
2300   eval "$3=yes"
2301 else
2302   eval "$3=no"
2303 fi
2304 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2305 fi
2306 eval ac_res=\$$3
2307                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2308 $as_echo "$ac_res" >&6; }
2309   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2310
2311 } # ac_fn_c_check_decl
2312 cat >config.log <<_ACEOF
2313 This file contains any messages produced by compilers while
2314 running configure, to aid debugging if configure makes a mistake.
2315
2316 It was created by PostgreSQL $as_me 9.5devel, which was
2317 generated by GNU Autoconf 2.69.  Invocation command line was
2318
2319   $ $0 $@
2320
2321 _ACEOF
2322 exec 5>>config.log
2323 {
2324 cat <<_ASUNAME
2325 ## --------- ##
2326 ## Platform. ##
2327 ## --------- ##
2328
2329 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2330 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2331 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2332 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2333 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2334
2335 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2336 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2337
2338 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2339 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2340 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2341 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2342 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2343 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2344 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2345
2346 _ASUNAME
2347
2348 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2349 for as_dir in $PATH
2350 do
2351   IFS=$as_save_IFS
2352   test -z "$as_dir" && as_dir=.
2353     $as_echo "PATH: $as_dir"
2354   done
2355 IFS=$as_save_IFS
2356
2357 } >&5
2358
2359 cat >&5 <<_ACEOF
2360
2361
2362 ## ----------- ##
2363 ## Core tests. ##
2364 ## ----------- ##
2365
2366 _ACEOF
2367
2368
2369 # Keep a trace of the command line.
2370 # Strip out --no-create and --no-recursion so they do not pile up.
2371 # Strip out --silent because we don't want to record it for future runs.
2372 # Also quote any args containing shell meta-characters.
2373 # Make two passes to allow for proper duplicate-argument suppression.
2374 ac_configure_args=
2375 ac_configure_args0=
2376 ac_configure_args1=
2377 ac_must_keep_next=false
2378 for ac_pass in 1 2
2379 do
2380   for ac_arg
2381   do
2382     case $ac_arg in
2383     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2384     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2385     | -silent | --silent | --silen | --sile | --sil)
2386       continue ;;
2387     *\'*)
2388       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2389     esac
2390     case $ac_pass in
2391     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2392     2)
2393       as_fn_append ac_configure_args1 " '$ac_arg'"
2394       if test $ac_must_keep_next = true; then
2395         ac_must_keep_next=false # Got value, back to normal.
2396       else
2397         case $ac_arg in
2398           *=* | --config-cache | -C | -disable-* | --disable-* \
2399           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2400           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2401           | -with-* | --with-* | -without-* | --without-* | --x)
2402             case "$ac_configure_args0 " in
2403               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2404             esac
2405             ;;
2406           -* ) ac_must_keep_next=true ;;
2407         esac
2408       fi
2409       as_fn_append ac_configure_args " '$ac_arg'"
2410       ;;
2411     esac
2412   done
2413 done
2414 { ac_configure_args0=; unset ac_configure_args0;}
2415 { ac_configure_args1=; unset ac_configure_args1;}
2416
2417 # When interrupted or exit'd, cleanup temporary files, and complete
2418 # config.log.  We remove comments because anyway the quotes in there
2419 # would cause problems or look ugly.
2420 # WARNING: Use '\'' to represent an apostrophe within the trap.
2421 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2422 trap 'exit_status=$?
2423   # Save into config.log some information that might help in debugging.
2424   {
2425     echo
2426
2427     $as_echo "## ---------------- ##
2428 ## Cache variables. ##
2429 ## ---------------- ##"
2430     echo
2431     # The following way of writing the cache mishandles newlines in values,
2432 (
2433   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2434     eval ac_val=\$$ac_var
2435     case $ac_val in #(
2436     *${as_nl}*)
2437       case $ac_var in #(
2438       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2439 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2440       esac
2441       case $ac_var in #(
2442       _ | IFS | as_nl) ;; #(
2443       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2444       *) { eval $ac_var=; unset $ac_var;} ;;
2445       esac ;;
2446     esac
2447   done
2448   (set) 2>&1 |
2449     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2450     *${as_nl}ac_space=\ *)
2451       sed -n \
2452         "s/'\''/'\''\\\\'\'''\''/g;
2453           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2454       ;; #(
2455     *)
2456       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2457       ;;
2458     esac |
2459     sort
2460 )
2461     echo
2462
2463     $as_echo "## ----------------- ##
2464 ## Output variables. ##
2465 ## ----------------- ##"
2466     echo
2467     for ac_var in $ac_subst_vars
2468     do
2469       eval ac_val=\$$ac_var
2470       case $ac_val in
2471       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2472       esac
2473       $as_echo "$ac_var='\''$ac_val'\''"
2474     done | sort
2475     echo
2476
2477     if test -n "$ac_subst_files"; then
2478       $as_echo "## ------------------- ##
2479 ## File substitutions. ##
2480 ## ------------------- ##"
2481       echo
2482       for ac_var in $ac_subst_files
2483       do
2484         eval ac_val=\$$ac_var
2485         case $ac_val in
2486         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2487         esac
2488         $as_echo "$ac_var='\''$ac_val'\''"
2489       done | sort
2490       echo
2491     fi
2492
2493     if test -s confdefs.h; then
2494       $as_echo "## ----------- ##
2495 ## confdefs.h. ##
2496 ## ----------- ##"
2497       echo
2498       cat confdefs.h
2499       echo
2500     fi
2501     test "$ac_signal" != 0 &&
2502       $as_echo "$as_me: caught signal $ac_signal"
2503     $as_echo "$as_me: exit $exit_status"
2504   } >&5
2505   rm -f core *.core core.conftest.* &&
2506     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2507     exit $exit_status
2508 ' 0
2509 for ac_signal in 1 2 13 15; do
2510   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2511 done
2512 ac_signal=0
2513
2514 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2515 rm -f -r conftest* confdefs.h
2516
2517 $as_echo "/* confdefs.h */" > confdefs.h
2518
2519 # Predefined preprocessor variables.
2520
2521 cat >>confdefs.h <<_ACEOF
2522 #define PACKAGE_NAME "$PACKAGE_NAME"
2523 _ACEOF
2524
2525 cat >>confdefs.h <<_ACEOF
2526 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2527 _ACEOF
2528
2529 cat >>confdefs.h <<_ACEOF
2530 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2531 _ACEOF
2532
2533 cat >>confdefs.h <<_ACEOF
2534 #define PACKAGE_STRING "$PACKAGE_STRING"
2535 _ACEOF
2536
2537 cat >>confdefs.h <<_ACEOF
2538 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2539 _ACEOF
2540
2541 cat >>confdefs.h <<_ACEOF
2542 #define PACKAGE_URL "$PACKAGE_URL"
2543 _ACEOF
2544
2545
2546 # Let the site file select an alternate cache file if it wants to.
2547 # Prefer an explicitly selected file to automatically selected ones.
2548 ac_site_file1=NONE
2549 ac_site_file2=NONE
2550 if test -n "$CONFIG_SITE"; then
2551   # We do not want a PATH search for config.site.
2552   case $CONFIG_SITE in #((
2553     -*)  ac_site_file1=./$CONFIG_SITE;;
2554     */*) ac_site_file1=$CONFIG_SITE;;
2555     *)   ac_site_file1=./$CONFIG_SITE;;
2556   esac
2557 elif test "x$prefix" != xNONE; then
2558   ac_site_file1=$prefix/share/config.site
2559   ac_site_file2=$prefix/etc/config.site
2560 else
2561   ac_site_file1=$ac_default_prefix/share/config.site
2562   ac_site_file2=$ac_default_prefix/etc/config.site
2563 fi
2564 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2565 do
2566   test "x$ac_site_file" = xNONE && continue
2567   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2568     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2569 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2570     sed 's/^/| /' "$ac_site_file" >&5
2571     . "$ac_site_file" \
2572       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2573 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2574 as_fn_error $? "failed to load site script $ac_site_file
2575 See \`config.log' for more details" "$LINENO" 5; }
2576   fi
2577 done
2578
2579 if test -r "$cache_file"; then
2580   # Some versions of bash will fail to source /dev/null (special files
2581   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2582   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2583     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2584 $as_echo "$as_me: loading cache $cache_file" >&6;}
2585     case $cache_file in
2586       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2587       *)                      . "./$cache_file";;
2588     esac
2589   fi
2590 else
2591   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2592 $as_echo "$as_me: creating cache $cache_file" >&6;}
2593   >$cache_file
2594 fi
2595
2596 # Check that the precious variables saved in the cache have kept the same
2597 # value.
2598 ac_cache_corrupted=false
2599 for ac_var in $ac_precious_vars; do
2600   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2601   eval ac_new_set=\$ac_env_${ac_var}_set
2602   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2603   eval ac_new_val=\$ac_env_${ac_var}_value
2604   case $ac_old_set,$ac_new_set in
2605     set,)
2606       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2607 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2608       ac_cache_corrupted=: ;;
2609     ,set)
2610       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2611 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2612       ac_cache_corrupted=: ;;
2613     ,);;
2614     *)
2615       if test "x$ac_old_val" != "x$ac_new_val"; then
2616         # differences in whitespace do not lead to failure.
2617         ac_old_val_w=`echo x $ac_old_val`
2618         ac_new_val_w=`echo x $ac_new_val`
2619         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2620           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2621 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2622           ac_cache_corrupted=:
2623         else
2624           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2625 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2626           eval $ac_var=\$ac_old_val
2627         fi
2628         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2629 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2630         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2631 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2632       fi;;
2633   esac
2634   # Pass precious variables to config.status.
2635   if test "$ac_new_set" = set; then
2636     case $ac_new_val in
2637     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2638     *) ac_arg=$ac_var=$ac_new_val ;;
2639     esac
2640     case " $ac_configure_args " in
2641       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2642       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2643     esac
2644   fi
2645 done
2646 if $ac_cache_corrupted; then
2647   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2648 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2649   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2650 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2651   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2652 fi
2653 ## -------------------- ##
2654 ## Main body of script. ##
2655 ## -------------------- ##
2656
2657 ac_ext=c
2658 ac_cpp='$CPP $CPPFLAGS'
2659 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2660 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2661 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2662
2663
2664
2665
2666
2667
2668 ac_aux_dir=
2669 for ac_dir in config "$srcdir"/config; do
2670   if test -f "$ac_dir/install-sh"; then
2671     ac_aux_dir=$ac_dir
2672     ac_install_sh="$ac_aux_dir/install-sh -c"
2673     break
2674   elif test -f "$ac_dir/install.sh"; then
2675     ac_aux_dir=$ac_dir
2676     ac_install_sh="$ac_aux_dir/install.sh -c"
2677     break
2678   elif test -f "$ac_dir/shtool"; then
2679     ac_aux_dir=$ac_dir
2680     ac_install_sh="$ac_aux_dir/shtool install -c"
2681     break
2682   fi
2683 done
2684 if test -z "$ac_aux_dir"; then
2685   as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2686 fi
2687
2688 # These three variables are undocumented and unsupported,
2689 # and are intended to be withdrawn in a future Autoconf release.
2690 # They can cause serious problems if a builder's source tree is in a directory
2691 # whose full name contains unusual characters.
2692 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2693 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2694 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2695
2696
2697
2698 configure_args=$ac_configure_args
2699
2700
2701 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\.[0-9][0-9]*\)'`
2702
2703
2704 cat >>confdefs.h <<_ACEOF
2705 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2706 _ACEOF
2707
2708
2709
2710
2711
2712 # Check whether --with-extra-version was given.
2713 if test "${with_extra_version+set}" = set; then :
2714   withval=$with_extra_version;
2715   case $withval in
2716     yes)
2717       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2718       ;;
2719     no)
2720       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2721       ;;
2722     *)
2723       PG_VERSION="$PACKAGE_VERSION$withval"
2724       ;;
2725   esac
2726
2727 else
2728   PG_VERSION="$PACKAGE_VERSION"
2729 fi
2730
2731
2732
2733 cat >>confdefs.h <<_ACEOF
2734 #define PG_VERSION "$PG_VERSION"
2735 _ACEOF
2736
2737
2738 # Make sure we can run config.sub.
2739 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2740   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2741
2742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2743 $as_echo_n "checking build system type... " >&6; }
2744 if ${ac_cv_build+:} false; then :
2745   $as_echo_n "(cached) " >&6
2746 else
2747   ac_build_alias=$build_alias
2748 test "x$ac_build_alias" = x &&
2749   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2750 test "x$ac_build_alias" = x &&
2751   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2752 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2753   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2754
2755 fi
2756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2757 $as_echo "$ac_cv_build" >&6; }
2758 case $ac_cv_build in
2759 *-*-*) ;;
2760 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2761 esac
2762 build=$ac_cv_build
2763 ac_save_IFS=$IFS; IFS='-'
2764 set x $ac_cv_build
2765 shift
2766 build_cpu=$1
2767 build_vendor=$2
2768 shift; shift
2769 # Remember, the first character of IFS is used to create $*,
2770 # except with old shells:
2771 build_os=$*
2772 IFS=$ac_save_IFS
2773 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2774
2775
2776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2777 $as_echo_n "checking host system type... " >&6; }
2778 if ${ac_cv_host+:} false; then :
2779   $as_echo_n "(cached) " >&6
2780 else
2781   if test "x$host_alias" = x; then
2782   ac_cv_host=$ac_cv_build
2783 else
2784   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2785     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2786 fi
2787
2788 fi
2789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2790 $as_echo "$ac_cv_host" >&6; }
2791 case $ac_cv_host in
2792 *-*-*) ;;
2793 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2794 esac
2795 host=$ac_cv_host
2796 ac_save_IFS=$IFS; IFS='-'
2797 set x $ac_cv_host
2798 shift
2799 host_cpu=$1
2800 host_vendor=$2
2801 shift; shift
2802 # Remember, the first character of IFS is used to create $*,
2803 # except with old shells:
2804 host_os=$*
2805 IFS=$ac_save_IFS
2806 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2807
2808
2809
2810 template=
2811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2812 $as_echo_n "checking which template to use... " >&6; }
2813
2814
2815
2816
2817 # Check whether --with-template was given.
2818 if test "${with_template+set}" = set; then :
2819   withval=$with_template;
2820   case $withval in
2821     yes)
2822       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2823       ;;
2824     no)
2825       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2826       ;;
2827     *)
2828
2829   case $withval in
2830     list)   echo; ls "$srcdir/src/template"; exit;;
2831     *)      if test -f "$srcdir/src/template/$with_template" ; then
2832               template=$withval
2833             else
2834               as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2835             fi;;
2836   esac
2837
2838       ;;
2839   esac
2840
2841 else
2842
2843 # --with-template not given
2844
2845 case $host_os in
2846      aix*) template=aix ;;
2847   cygwin*) template=cygwin ;;
2848   darwin*) template=darwin ;;
2849 dragonfly*) template=netbsd ;;
2850  freebsd*) template=freebsd ;;
2851     hpux*) template=hpux ;;
2852  linux*|gnu*|k*bsd*-gnu)
2853            template=linux ;;
2854    mingw*) template=win32 ;;
2855   netbsd*) template=netbsd ;;
2856  openbsd*) template=openbsd ;;
2857      sco*) template=sco ;;
2858  solaris*) template=solaris ;;
2859    sysv5*) template=unixware ;;
2860 esac
2861
2862   if test x"$template" = x"" ; then
2863     as_fn_error $? "
2864 *******************************************************************
2865 PostgreSQL has apparently not been ported to your platform yet.
2866 To try a manual configuration, look into the src/template directory
2867 for a similar platform and use the '--with-template=' option.
2868
2869 Please also contact <pgsql-bugs@postgresql.org> to see about
2870 rectifying this.  Include the above 'checking host system type...'
2871 line.
2872 *******************************************************************
2873 " "$LINENO" 5
2874   fi
2875
2876
2877 fi
2878
2879
2880
2881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
2882 $as_echo "$template" >&6; }
2883
2884 PORTNAME=$template
2885
2886
2887 # Initialize default assumption that we do not need separate assembly code
2888 # for TAS (test-and-set).  This can be overridden by the template file
2889 # when it's executed.
2890 need_tas=no
2891 tas_file=dummy.s
2892
2893
2894
2895 ##
2896 ## Command line options
2897 ##
2898
2899 #
2900 # Add non-standard directories to the include path
2901 #
2902
2903
2904
2905 # Check whether --with-includes was given.
2906 if test "${with_includes+set}" = set; then :
2907   withval=$with_includes;
2908   case $withval in
2909     yes)
2910       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
2911       ;;
2912     no)
2913       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
2914       ;;
2915     *)
2916
2917       ;;
2918   esac
2919
2920 fi
2921
2922
2923
2924
2925 #
2926 # Add non-standard directories to the library search path
2927 #
2928
2929
2930
2931 # Check whether --with-libraries was given.
2932 if test "${with_libraries+set}" = set; then :
2933   withval=$with_libraries;
2934   case $withval in
2935     yes)
2936       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
2937       ;;
2938     no)
2939       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
2940       ;;
2941     *)
2942       LIBRARY_DIRS=$withval
2943       ;;
2944   esac
2945
2946 fi
2947
2948
2949
2950
2951
2952
2953 # Check whether --with-libs was given.
2954 if test "${with_libs+set}" = set; then :
2955   withval=$with_libs;
2956   case $withval in
2957     yes)
2958       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
2959       ;;
2960     no)
2961       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
2962       ;;
2963     *)
2964       LIBRARY_DIRS=$withval
2965       ;;
2966   esac
2967
2968 fi
2969
2970
2971
2972
2973 #
2974 # 64-bit integer date/time storage: enabled by default.
2975 #
2976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with 64-bit integer date/time support" >&5
2977 $as_echo_n "checking whether to build with 64-bit integer date/time support... " >&6; }
2978
2979
2980 # Check whether --enable-integer-datetimes was given.
2981 if test "${enable_integer_datetimes+set}" = set; then :
2982   enableval=$enable_integer_datetimes;
2983   case $enableval in
2984     yes)
2985
2986 $as_echo "#define USE_INTEGER_DATETIMES 1" >>confdefs.h
2987
2988       ;;
2989     no)
2990       :
2991       ;;
2992     *)
2993       as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
2994       ;;
2995   esac
2996
2997 else
2998   enable_integer_datetimes=yes
2999
3000 $as_echo "#define USE_INTEGER_DATETIMES 1" >>confdefs.h
3001
3002 fi
3003
3004
3005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_integer_datetimes" >&5
3006 $as_echo "$enable_integer_datetimes" >&6; }
3007
3008
3009 #
3010 # NLS
3011 #
3012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3013 $as_echo_n "checking whether NLS is wanted... " >&6; }
3014
3015
3016 # Check whether --enable-nls was given.
3017 if test "${enable_nls+set}" = set; then :
3018   enableval=$enable_nls;
3019   case $enableval in
3020     yes)
3021       :
3022       ;;
3023     no)
3024       :
3025       ;;
3026     *)
3027       enable_nls=yes
3028 WANTED_LANGUAGES=$enableval
3029       ;;
3030   esac
3031
3032 else
3033   enable_nls=no
3034 fi
3035
3036
3037
3038 if test "$enable_nls" = yes; then
3039
3040 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3041
3042 fi
3043
3044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3045 $as_echo "$enable_nls" >&6; }
3046
3047
3048
3049 #
3050 # Default port number (--with-pgport), default 5432
3051 #
3052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3053 $as_echo_n "checking for default port number... " >&6; }
3054
3055
3056
3057 # Check whether --with-pgport was given.
3058 if test "${with_pgport+set}" = set; then :
3059   withval=$with_pgport;
3060   case $withval in
3061     yes)
3062       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3063       ;;
3064     no)
3065       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3066       ;;
3067     *)
3068       default_port=$withval
3069       ;;
3070   esac
3071
3072 else
3073   default_port=5432
3074 fi
3075
3076
3077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3078 $as_echo "$default_port" >&6; }
3079 # Need both of these because some places want an integer and some a string
3080
3081 cat >>confdefs.h <<_ACEOF
3082 #define DEF_PGPORT ${default_port}
3083 _ACEOF
3084
3085
3086 cat >>confdefs.h <<_ACEOF
3087 #define DEF_PGPORT_STR "${default_port}"
3088 _ACEOF
3089
3090
3091
3092 #
3093 # '-rpath'-like feature can be disabled
3094 #
3095
3096
3097 # Check whether --enable-rpath was given.
3098 if test "${enable_rpath+set}" = set; then :
3099   enableval=$enable_rpath;
3100   case $enableval in
3101     yes)
3102       :
3103       ;;
3104     no)
3105       :
3106       ;;
3107     *)
3108       as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3109       ;;
3110   esac
3111
3112 else
3113   enable_rpath=yes
3114
3115 fi
3116
3117
3118
3119
3120 #
3121 # Spinlocks
3122 #
3123
3124
3125 # Check whether --enable-spinlocks was given.
3126 if test "${enable_spinlocks+set}" = set; then :
3127   enableval=$enable_spinlocks;
3128   case $enableval in
3129     yes)
3130       :
3131       ;;
3132     no)
3133       :
3134       ;;
3135     *)
3136       as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3137       ;;
3138   esac
3139
3140 else
3141   enable_spinlocks=yes
3142
3143 fi
3144
3145
3146
3147 #
3148 # --enable-debug adds -g to compiler flags
3149 #
3150
3151
3152 # Check whether --enable-debug was given.
3153 if test "${enable_debug+set}" = set; then :
3154   enableval=$enable_debug;
3155   case $enableval in
3156     yes)
3157       :
3158       ;;
3159     no)
3160       :
3161       ;;
3162     *)
3163       as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3164       ;;
3165   esac
3166
3167 else
3168   enable_debug=no
3169
3170 fi
3171
3172
3173
3174
3175 #
3176 # --enable-profiling enables gcc profiling
3177 #
3178
3179
3180 # Check whether --enable-profiling was given.
3181 if test "${enable_profiling+set}" = set; then :
3182   enableval=$enable_profiling;
3183   case $enableval in
3184     yes)
3185       :
3186       ;;
3187     no)
3188       :
3189       ;;
3190     *)
3191       as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3192       ;;
3193   esac
3194
3195 else
3196   enable_profiling=no
3197
3198 fi
3199
3200
3201
3202 #
3203 # --enable-coverage enables generation of code coverage metrics with gcov
3204 #
3205
3206
3207 # Check whether --enable-coverage was given.
3208 if test "${enable_coverage+set}" = set; then :
3209   enableval=$enable_coverage;
3210   case $enableval in
3211     yes)
3212       for ac_prog in gcov
3213 do
3214   # Extract the first word of "$ac_prog", so it can be a program name with args.
3215 set dummy $ac_prog; ac_word=$2
3216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3217 $as_echo_n "checking for $ac_word... " >&6; }
3218 if ${ac_cv_prog_GCOV+:} false; then :
3219   $as_echo_n "(cached) " >&6
3220 else
3221   if test -n "$GCOV"; then
3222   ac_cv_prog_GCOV="$GCOV" # Let the user override the test.
3223 else
3224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3225 for as_dir in $PATH
3226 do
3227   IFS=$as_save_IFS
3228   test -z "$as_dir" && as_dir=.
3229     for ac_exec_ext in '' $ac_executable_extensions; do
3230   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3231     ac_cv_prog_GCOV="$ac_prog"
3232     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3233     break 2
3234   fi
3235 done
3236   done
3237 IFS=$as_save_IFS
3238
3239 fi
3240 fi
3241 GCOV=$ac_cv_prog_GCOV
3242 if test -n "$GCOV"; then
3243   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3244 $as_echo "$GCOV" >&6; }
3245 else
3246   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3247 $as_echo "no" >&6; }
3248 fi
3249
3250
3251   test -n "$GCOV" && break
3252 done
3253
3254 if test -z "$GCOV"; then
3255   as_fn_error $? "gcov not found" "$LINENO" 5
3256 fi
3257 for ac_prog in lcov
3258 do
3259   # Extract the first word of "$ac_prog", so it can be a program name with args.
3260 set dummy $ac_prog; ac_word=$2
3261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3262 $as_echo_n "checking for $ac_word... " >&6; }
3263 if ${ac_cv_prog_LCOV+:} false; then :
3264   $as_echo_n "(cached) " >&6
3265 else
3266   if test -n "$LCOV"; then
3267   ac_cv_prog_LCOV="$LCOV" # Let the user override the test.
3268 else
3269 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3270 for as_dir in $PATH
3271 do
3272   IFS=$as_save_IFS
3273   test -z "$as_dir" && as_dir=.
3274     for ac_exec_ext in '' $ac_executable_extensions; do
3275   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3276     ac_cv_prog_LCOV="$ac_prog"
3277     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3278     break 2
3279   fi
3280 done
3281   done
3282 IFS=$as_save_IFS
3283
3284 fi
3285 fi
3286 LCOV=$ac_cv_prog_LCOV
3287 if test -n "$LCOV"; then
3288   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3289 $as_echo "$LCOV" >&6; }
3290 else
3291   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3292 $as_echo "no" >&6; }
3293 fi
3294
3295
3296   test -n "$LCOV" && break
3297 done
3298
3299 if test -z "$LCOV"; then
3300   as_fn_error $? "lcov not found" "$LINENO" 5
3301 fi
3302 for ac_prog in genhtml
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_prog_GENHTML+:} false; then :
3309   $as_echo_n "(cached) " >&6
3310 else
3311   if test -n "$GENHTML"; then
3312   ac_cv_prog_GENHTML="$GENHTML" # Let the user override the test.
3313 else
3314 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3315 for as_dir in $PATH
3316 do
3317   IFS=$as_save_IFS
3318   test -z "$as_dir" && as_dir=.
3319     for ac_exec_ext in '' $ac_executable_extensions; do
3320   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3321     ac_cv_prog_GENHTML="$ac_prog"
3322     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3323     break 2
3324   fi
3325 done
3326   done
3327 IFS=$as_save_IFS
3328
3329 fi
3330 fi
3331 GENHTML=$ac_cv_prog_GENHTML
3332 if test -n "$GENHTML"; then
3333   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3334 $as_echo "$GENHTML" >&6; }
3335 else
3336   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3337 $as_echo "no" >&6; }
3338 fi
3339
3340
3341   test -n "$GENHTML" && break
3342 done
3343
3344 if test -z "$GENHTML"; then
3345   as_fn_error $? "genhtml not found" "$LINENO" 5
3346 fi
3347       ;;
3348     no)
3349       :
3350       ;;
3351     *)
3352       as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3353       ;;
3354   esac
3355
3356 else
3357   enable_coverage=no
3358
3359 fi
3360
3361
3362
3363
3364 #
3365 # DTrace
3366 #
3367
3368
3369 # Check whether --enable-dtrace was given.
3370 if test "${enable_dtrace+set}" = set; then :
3371   enableval=$enable_dtrace;
3372   case $enableval in
3373     yes)
3374       for ac_prog in dtrace
3375 do
3376   # Extract the first word of "$ac_prog", so it can be a program name with args.
3377 set dummy $ac_prog; ac_word=$2
3378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3379 $as_echo_n "checking for $ac_word... " >&6; }
3380 if ${ac_cv_prog_DTRACE+:} false; then :
3381   $as_echo_n "(cached) " >&6
3382 else
3383   if test -n "$DTRACE"; then
3384   ac_cv_prog_DTRACE="$DTRACE" # Let the user override the test.
3385 else
3386 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3387 for as_dir in $PATH
3388 do
3389   IFS=$as_save_IFS
3390   test -z "$as_dir" && as_dir=.
3391     for ac_exec_ext in '' $ac_executable_extensions; do
3392   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3393     ac_cv_prog_DTRACE="$ac_prog"
3394     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3395     break 2
3396   fi
3397 done
3398   done
3399 IFS=$as_save_IFS
3400
3401 fi
3402 fi
3403 DTRACE=$ac_cv_prog_DTRACE
3404 if test -n "$DTRACE"; then
3405   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3406 $as_echo "$DTRACE" >&6; }
3407 else
3408   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3409 $as_echo "no" >&6; }
3410 fi
3411
3412
3413   test -n "$DTRACE" && break
3414 done
3415
3416 if test -z "$DTRACE"; then
3417   as_fn_error $? "dtrace not found" "$LINENO" 5
3418 fi
3419
3420       ;;
3421     no)
3422       :
3423       ;;
3424     *)
3425       as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3426       ;;
3427   esac
3428
3429 else
3430   enable_dtrace=no
3431
3432 fi
3433
3434
3435
3436
3437 #
3438 # Block size
3439 #
3440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3441 $as_echo_n "checking for block size... " >&6; }
3442
3443
3444
3445 # Check whether --with-blocksize was given.
3446 if test "${with_blocksize+set}" = set; then :
3447   withval=$with_blocksize;
3448   case $withval in
3449     yes)
3450       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3451       ;;
3452     no)
3453       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3454       ;;
3455     *)
3456       blocksize=$withval
3457       ;;
3458   esac
3459
3460 else
3461   blocksize=8
3462 fi
3463
3464
3465 case ${blocksize} in
3466   1) BLCKSZ=1024;;
3467   2) BLCKSZ=2048;;
3468   4) BLCKSZ=4096;;
3469   8) BLCKSZ=8192;;
3470  16) BLCKSZ=16384;;
3471  32) BLCKSZ=32768;;
3472   *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3473 esac
3474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3475 $as_echo "${blocksize}kB" >&6; }
3476
3477
3478 cat >>confdefs.h <<_ACEOF
3479 #define BLCKSZ ${BLCKSZ}
3480 _ACEOF
3481
3482
3483 #
3484 # Relation segment size
3485 #
3486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3487 $as_echo_n "checking for segment size... " >&6; }
3488
3489
3490
3491 # Check whether --with-segsize was given.
3492 if test "${with_segsize+set}" = set; then :
3493   withval=$with_segsize;
3494   case $withval in
3495     yes)
3496       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3497       ;;
3498     no)
3499       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3500       ;;
3501     *)
3502       segsize=$withval
3503       ;;
3504   esac
3505
3506 else
3507   segsize=1
3508 fi
3509
3510
3511 # this expression is set up to avoid unnecessary integer overflow
3512 # blocksize is already guaranteed to be a factor of 1024
3513 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3514 test $? -eq 0 || exit 1
3515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3516 $as_echo "${segsize}GB" >&6; }
3517
3518
3519 cat >>confdefs.h <<_ACEOF
3520 #define RELSEG_SIZE ${RELSEG_SIZE}
3521 _ACEOF
3522
3523
3524 #
3525 # WAL block size
3526 #
3527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3528 $as_echo_n "checking for WAL block size... " >&6; }
3529
3530
3531
3532 # Check whether --with-wal-blocksize was given.
3533 if test "${with_wal_blocksize+set}" = set; then :
3534   withval=$with_wal_blocksize;
3535   case $withval in
3536     yes)
3537       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3538       ;;
3539     no)
3540       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3541       ;;
3542     *)
3543       wal_blocksize=$withval
3544       ;;
3545   esac
3546
3547 else
3548   wal_blocksize=8
3549 fi
3550
3551
3552 case ${wal_blocksize} in
3553   1) XLOG_BLCKSZ=1024;;
3554   2) XLOG_BLCKSZ=2048;;
3555   4) XLOG_BLCKSZ=4096;;
3556   8) XLOG_BLCKSZ=8192;;
3557  16) XLOG_BLCKSZ=16384;;
3558  32) XLOG_BLCKSZ=32768;;
3559  64) XLOG_BLCKSZ=65536;;
3560   *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3561 esac
3562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3563 $as_echo "${wal_blocksize}kB" >&6; }
3564
3565
3566 cat >>confdefs.h <<_ACEOF
3567 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3568 _ACEOF
3569
3570
3571 #
3572 # WAL segment size
3573 #
3574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL segment size" >&5
3575 $as_echo_n "checking for WAL segment size... " >&6; }
3576
3577
3578
3579 # Check whether --with-wal-segsize was given.
3580 if test "${with_wal_segsize+set}" = set; then :
3581   withval=$with_wal_segsize;
3582   case $withval in
3583     yes)
3584       as_fn_error $? "argument required for --with-wal-segsize option" "$LINENO" 5
3585       ;;
3586     no)
3587       as_fn_error $? "argument required for --with-wal-segsize option" "$LINENO" 5
3588       ;;
3589     *)
3590       wal_segsize=$withval
3591       ;;
3592   esac
3593
3594 else
3595   wal_segsize=16
3596 fi
3597
3598
3599 case ${wal_segsize} in
3600   1) ;;
3601   2) ;;
3602   4) ;;
3603   8) ;;
3604  16) ;;
3605  32) ;;
3606  64) ;;
3607   *) as_fn_error $? "Invalid WAL segment size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3608 esac
3609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_segsize}MB" >&5
3610 $as_echo "${wal_segsize}MB" >&6; }
3611
3612
3613 cat >>confdefs.h <<_ACEOF
3614 #define XLOG_SEG_SIZE (${wal_segsize} * 1024 * 1024)
3615 _ACEOF
3616
3617
3618 #
3619 # C compiler
3620 #
3621
3622 # For historical reasons you can also use --with-CC to specify the C compiler
3623 # to use, although the standard way to do this is to set the CC environment
3624 # variable.
3625
3626
3627
3628 # Check whether --with-CC was given.
3629 if test "${with_CC+set}" = set; then :
3630   withval=$with_CC;
3631   case $withval in
3632     yes)
3633       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3634       ;;
3635     no)
3636       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3637       ;;
3638     *)
3639       CC=$with_CC
3640       ;;
3641   esac
3642
3643 fi
3644
3645
3646
3647 case $template in
3648   aix) pgac_cc_list="gcc xlc";;
3649     *) pgac_cc_list="gcc cc";;
3650 esac
3651
3652 ac_ext=c
3653 ac_cpp='$CPP $CPPFLAGS'
3654 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3655 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3656 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3657 if test -n "$ac_tool_prefix"; then
3658   for ac_prog in $pgac_cc_list
3659   do
3660     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3661 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3663 $as_echo_n "checking for $ac_word... " >&6; }
3664 if ${ac_cv_prog_CC+:} false; then :
3665   $as_echo_n "(cached) " >&6
3666 else
3667   if test -n "$CC"; then
3668   ac_cv_prog_CC="$CC" # Let the user override the test.
3669 else
3670 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3671 for as_dir in $PATH
3672 do
3673   IFS=$as_save_IFS
3674   test -z "$as_dir" && as_dir=.
3675     for ac_exec_ext in '' $ac_executable_extensions; do
3676   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3677     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3678     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3679     break 2
3680   fi
3681 done
3682   done
3683 IFS=$as_save_IFS
3684
3685 fi
3686 fi
3687 CC=$ac_cv_prog_CC
3688 if test -n "$CC"; then
3689   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3690 $as_echo "$CC" >&6; }
3691 else
3692   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3693 $as_echo "no" >&6; }
3694 fi
3695
3696
3697     test -n "$CC" && break
3698   done
3699 fi
3700 if test -z "$CC"; then
3701   ac_ct_CC=$CC
3702   for ac_prog in $pgac_cc_list
3703 do
3704   # Extract the first word of "$ac_prog", so it can be a program name with args.
3705 set dummy $ac_prog; ac_word=$2
3706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3707 $as_echo_n "checking for $ac_word... " >&6; }
3708 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3709   $as_echo_n "(cached) " >&6
3710 else
3711   if test -n "$ac_ct_CC"; then
3712   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3713 else
3714 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3715 for as_dir in $PATH
3716 do
3717   IFS=$as_save_IFS
3718   test -z "$as_dir" && as_dir=.
3719     for ac_exec_ext in '' $ac_executable_extensions; do
3720   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3721     ac_cv_prog_ac_ct_CC="$ac_prog"
3722     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3723     break 2
3724   fi
3725 done
3726   done
3727 IFS=$as_save_IFS
3728
3729 fi
3730 fi
3731 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3732 if test -n "$ac_ct_CC"; then
3733   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3734 $as_echo "$ac_ct_CC" >&6; }
3735 else
3736   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3737 $as_echo "no" >&6; }
3738 fi
3739
3740
3741   test -n "$ac_ct_CC" && break
3742 done
3743
3744   if test "x$ac_ct_CC" = x; then
3745     CC=""
3746   else
3747     case $cross_compiling:$ac_tool_warned in
3748 yes:)
3749 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3750 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3751 ac_tool_warned=yes ;;
3752 esac
3753     CC=$ac_ct_CC
3754   fi
3755 fi
3756
3757
3758 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3759 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3760 as_fn_error $? "no acceptable C compiler found in \$PATH
3761 See \`config.log' for more details" "$LINENO" 5; }
3762
3763 # Provide some information about the compiler.
3764 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3765 set X $ac_compile
3766 ac_compiler=$2
3767 for ac_option in --version -v -V -qversion; do
3768   { { ac_try="$ac_compiler $ac_option >&5"
3769 case "(($ac_try" in
3770   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3771   *) ac_try_echo=$ac_try;;
3772 esac
3773 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3774 $as_echo "$ac_try_echo"; } >&5
3775   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3776   ac_status=$?
3777   if test -s conftest.err; then
3778     sed '10a\
3779 ... rest of stderr output deleted ...
3780          10q' conftest.err >conftest.er1
3781     cat conftest.er1 >&5
3782   fi
3783   rm -f conftest.er1 conftest.err
3784   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3785   test $ac_status = 0; }
3786 done
3787
3788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3789 /* end confdefs.h.  */
3790
3791 int
3792 main ()
3793 {
3794
3795   ;
3796   return 0;
3797 }
3798 _ACEOF
3799 ac_clean_files_save=$ac_clean_files
3800 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3801 # Try to create an executable without -o first, disregard a.out.
3802 # It will help us diagnose broken compilers, and finding out an intuition
3803 # of exeext.
3804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3805 $as_echo_n "checking whether the C compiler works... " >&6; }
3806 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3807
3808 # The possible output files:
3809 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3810
3811 ac_rmfiles=
3812 for ac_file in $ac_files
3813 do
3814   case $ac_file in
3815     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3816     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3817   esac
3818 done
3819 rm -f $ac_rmfiles
3820
3821 if { { ac_try="$ac_link_default"
3822 case "(($ac_try" in
3823   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3824   *) ac_try_echo=$ac_try;;
3825 esac
3826 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3827 $as_echo "$ac_try_echo"; } >&5
3828   (eval "$ac_link_default") 2>&5
3829   ac_status=$?
3830   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3831   test $ac_status = 0; }; then :
3832   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3833 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3834 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3835 # so that the user can short-circuit this test for compilers unknown to
3836 # Autoconf.
3837 for ac_file in $ac_files ''
3838 do
3839   test -f "$ac_file" || continue
3840   case $ac_file in
3841     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3842         ;;
3843     [ab].out )
3844         # We found the default executable, but exeext='' is most
3845         # certainly right.
3846         break;;
3847     *.* )
3848         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3849         then :; else
3850            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3851         fi
3852         # We set ac_cv_exeext here because the later test for it is not
3853         # safe: cross compilers may not add the suffix if given an `-o'
3854         # argument, so we may need to know it at that point already.
3855         # Even if this section looks crufty: it has the advantage of
3856         # actually working.
3857         break;;
3858     * )
3859         break;;
3860   esac
3861 done
3862 test "$ac_cv_exeext" = no && ac_cv_exeext=
3863
3864 else
3865   ac_file=''
3866 fi
3867 if test -z "$ac_file"; then :
3868   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3869 $as_echo "no" >&6; }
3870 $as_echo "$as_me: failed program was:" >&5
3871 sed 's/^/| /' conftest.$ac_ext >&5
3872
3873 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3874 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3875 as_fn_error 77 "C compiler cannot create executables
3876 See \`config.log' for more details" "$LINENO" 5; }
3877 else
3878   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3879 $as_echo "yes" >&6; }
3880 fi
3881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3882 $as_echo_n "checking for C compiler default output file name... " >&6; }
3883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3884 $as_echo "$ac_file" >&6; }
3885 ac_exeext=$ac_cv_exeext
3886
3887 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3888 ac_clean_files=$ac_clean_files_save
3889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3890 $as_echo_n "checking for suffix of executables... " >&6; }
3891 if { { ac_try="$ac_link"
3892 case "(($ac_try" in
3893   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3894   *) ac_try_echo=$ac_try;;
3895 esac
3896 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3897 $as_echo "$ac_try_echo"; } >&5
3898   (eval "$ac_link") 2>&5
3899   ac_status=$?
3900   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3901   test $ac_status = 0; }; then :
3902   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3903 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3904 # work properly (i.e., refer to `conftest.exe'), while it won't with
3905 # `rm'.
3906 for ac_file in conftest.exe conftest conftest.*; do
3907   test -f "$ac_file" || continue
3908   case $ac_file in
3909     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3910     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3911           break;;
3912     * ) break;;
3913   esac
3914 done
3915 else
3916   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3917 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3918 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3919 See \`config.log' for more details" "$LINENO" 5; }
3920 fi
3921 rm -f conftest conftest$ac_cv_exeext
3922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3923 $as_echo "$ac_cv_exeext" >&6; }
3924
3925 rm -f conftest.$ac_ext
3926 EXEEXT=$ac_cv_exeext
3927 ac_exeext=$EXEEXT
3928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3929 /* end confdefs.h.  */
3930 #include <stdio.h>
3931 int
3932 main ()
3933 {
3934 FILE *f = fopen ("conftest.out", "w");
3935  return ferror (f) || fclose (f) != 0;
3936
3937   ;
3938   return 0;
3939 }
3940 _ACEOF
3941 ac_clean_files="$ac_clean_files conftest.out"
3942 # Check that the compiler produces executables we can run.  If not, either
3943 # the compiler is broken, or we cross compile.
3944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3945 $as_echo_n "checking whether we are cross compiling... " >&6; }
3946 if test "$cross_compiling" != yes; then
3947   { { ac_try="$ac_link"
3948 case "(($ac_try" in
3949   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3950   *) ac_try_echo=$ac_try;;
3951 esac
3952 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3953 $as_echo "$ac_try_echo"; } >&5
3954   (eval "$ac_link") 2>&5
3955   ac_status=$?
3956   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3957   test $ac_status = 0; }
3958   if { ac_try='./conftest$ac_cv_exeext'
3959   { { case "(($ac_try" in
3960   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3961   *) ac_try_echo=$ac_try;;
3962 esac
3963 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3964 $as_echo "$ac_try_echo"; } >&5
3965   (eval "$ac_try") 2>&5
3966   ac_status=$?
3967   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3968   test $ac_status = 0; }; }; then
3969     cross_compiling=no
3970   else
3971     if test "$cross_compiling" = maybe; then
3972         cross_compiling=yes
3973     else
3974         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3975 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3976 as_fn_error $? "cannot run C compiled programs.
3977 If you meant to cross compile, use \`--host'.
3978 See \`config.log' for more details" "$LINENO" 5; }
3979     fi
3980   fi
3981 fi
3982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3983 $as_echo "$cross_compiling" >&6; }
3984
3985 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3986 ac_clean_files=$ac_clean_files_save
3987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3988 $as_echo_n "checking for suffix of object files... " >&6; }
3989 if ${ac_cv_objext+:} false; then :
3990   $as_echo_n "(cached) " >&6
3991 else
3992   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3993 /* end confdefs.h.  */
3994
3995 int
3996 main ()
3997 {
3998
3999   ;
4000   return 0;
4001 }
4002 _ACEOF
4003 rm -f conftest.o conftest.obj
4004 if { { ac_try="$ac_compile"
4005 case "(($ac_try" in
4006   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4007   *) ac_try_echo=$ac_try;;
4008 esac
4009 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4010 $as_echo "$ac_try_echo"; } >&5
4011   (eval "$ac_compile") 2>&5
4012   ac_status=$?
4013   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4014   test $ac_status = 0; }; then :
4015   for ac_file in conftest.o conftest.obj conftest.*; do
4016   test -f "$ac_file" || continue;
4017   case $ac_file in
4018     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4019     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4020        break;;
4021   esac
4022 done
4023 else
4024   $as_echo "$as_me: failed program was:" >&5
4025 sed 's/^/| /' conftest.$ac_ext >&5
4026
4027 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4028 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4029 as_fn_error $? "cannot compute suffix of object files: cannot compile
4030 See \`config.log' for more details" "$LINENO" 5; }
4031 fi
4032 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4033 fi
4034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4035 $as_echo "$ac_cv_objext" >&6; }
4036 OBJEXT=$ac_cv_objext
4037 ac_objext=$OBJEXT
4038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4039 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4040 if ${ac_cv_c_compiler_gnu+:} false; then :
4041   $as_echo_n "(cached) " >&6
4042 else
4043   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4044 /* end confdefs.h.  */
4045
4046 int
4047 main ()
4048 {
4049 #ifndef __GNUC__
4050        choke me
4051 #endif
4052
4053   ;
4054   return 0;
4055 }
4056 _ACEOF
4057 if ac_fn_c_try_compile "$LINENO"; then :
4058   ac_compiler_gnu=yes
4059 else
4060   ac_compiler_gnu=no
4061 fi
4062 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4063 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4064
4065 fi
4066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4067 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4068 if test $ac_compiler_gnu = yes; then
4069   GCC=yes
4070 else
4071   GCC=
4072 fi
4073 ac_test_CFLAGS=${CFLAGS+set}
4074 ac_save_CFLAGS=$CFLAGS
4075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4076 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4077 if ${ac_cv_prog_cc_g+:} false; then :
4078   $as_echo_n "(cached) " >&6
4079 else
4080   ac_save_c_werror_flag=$ac_c_werror_flag
4081    ac_c_werror_flag=yes
4082    ac_cv_prog_cc_g=no
4083    CFLAGS="-g"
4084    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4085 /* end confdefs.h.  */
4086
4087 int
4088 main ()
4089 {
4090
4091   ;
4092   return 0;
4093 }
4094 _ACEOF
4095 if ac_fn_c_try_compile "$LINENO"; then :
4096   ac_cv_prog_cc_g=yes
4097 else
4098   CFLAGS=""
4099       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4100 /* end confdefs.h.  */
4101
4102 int
4103 main ()
4104 {
4105
4106   ;
4107   return 0;
4108 }
4109 _ACEOF
4110 if ac_fn_c_try_compile "$LINENO"; then :
4111
4112 else
4113   ac_c_werror_flag=$ac_save_c_werror_flag
4114          CFLAGS="-g"
4115          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4116 /* end confdefs.h.  */
4117
4118 int
4119 main ()
4120 {
4121
4122   ;
4123   return 0;
4124 }
4125 _ACEOF
4126 if ac_fn_c_try_compile "$LINENO"; then :
4127   ac_cv_prog_cc_g=yes
4128 fi
4129 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4130 fi
4131 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4132 fi
4133 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4134    ac_c_werror_flag=$ac_save_c_werror_flag
4135 fi
4136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4137 $as_echo "$ac_cv_prog_cc_g" >&6; }
4138 if test "$ac_test_CFLAGS" = set; then
4139   CFLAGS=$ac_save_CFLAGS
4140 elif test $ac_cv_prog_cc_g = yes; then
4141   if test "$GCC" = yes; then
4142     CFLAGS="-g -O2"
4143   else
4144     CFLAGS="-g"
4145   fi
4146 else
4147   if test "$GCC" = yes; then
4148     CFLAGS="-O2"
4149   else
4150     CFLAGS=
4151   fi
4152 fi
4153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4154 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4155 if ${ac_cv_prog_cc_c89+:} false; then :
4156   $as_echo_n "(cached) " >&6
4157 else
4158   ac_cv_prog_cc_c89=no
4159 ac_save_CC=$CC
4160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4161 /* end confdefs.h.  */
4162 #include <stdarg.h>
4163 #include <stdio.h>
4164 struct stat;
4165 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4166 struct buf { int x; };
4167 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4168 static char *e (p, i)
4169      char **p;
4170      int i;
4171 {
4172   return p[i];
4173 }
4174 static char *f (char * (*g) (char **, int), char **p, ...)
4175 {
4176   char *s;
4177   va_list v;
4178   va_start (v,p);
4179   s = g (p, va_arg (v,int));
4180   va_end (v);
4181   return s;
4182 }
4183
4184 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4185    function prototypes and stuff, but not '\xHH' hex character constants.
4186    These don't provoke an error unfortunately, instead are silently treated
4187    as 'x'.  The following induces an error, until -std is added to get
4188    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4189    array size at least.  It's necessary to write '\x00'==0 to get something
4190    that's true only with -std.  */
4191 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4192
4193 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4194    inside strings and character constants.  */
4195 #define FOO(x) 'x'
4196 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4197
4198 int test (int i, double x);
4199 struct s1 {int (*f) (int a);};
4200 struct s2 {int (*f) (double a);};
4201 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4202 int argc;
4203 char **argv;
4204 int
4205 main ()
4206 {
4207 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4208   ;
4209   return 0;
4210 }
4211 _ACEOF
4212 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4213         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4214 do
4215   CC="$ac_save_CC $ac_arg"
4216   if ac_fn_c_try_compile "$LINENO"; then :
4217   ac_cv_prog_cc_c89=$ac_arg
4218 fi
4219 rm -f core conftest.err conftest.$ac_objext
4220   test "x$ac_cv_prog_cc_c89" != "xno" && break
4221 done
4222 rm -f conftest.$ac_ext
4223 CC=$ac_save_CC
4224
4225 fi
4226 # AC_CACHE_VAL
4227 case "x$ac_cv_prog_cc_c89" in
4228   x)
4229     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4230 $as_echo "none needed" >&6; } ;;
4231   xno)
4232     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4233 $as_echo "unsupported" >&6; } ;;
4234   *)
4235     CC="$CC $ac_cv_prog_cc_c89"
4236     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4237 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4238 esac
4239 if test "x$ac_cv_prog_cc_c89" != xno; then :
4240
4241 fi
4242
4243 ac_ext=c
4244 ac_cpp='$CPP $CPPFLAGS'
4245 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4246 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4247 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4248
4249
4250 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4251 # but has idiosyncrasies of its own.  We assume icc will define
4252 # __INTEL_COMPILER regardless of CFLAGS.
4253
4254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4255 /* end confdefs.h.  */
4256
4257 int
4258 main ()
4259 {
4260 #ifndef __INTEL_COMPILER
4261 choke me
4262 #endif
4263   ;
4264   return 0;
4265 }
4266 _ACEOF
4267 if ac_fn_c_try_compile "$LINENO"; then :
4268   ICC=yes
4269 else
4270   ICC=no
4271 fi
4272 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4273
4274 # Check if it's Sun Studio compiler. We assume that
4275 # __SUNPRO_C will be defined for Sun Studio compilers
4276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4277 /* end confdefs.h.  */
4278
4279 int
4280 main ()
4281 {
4282 #ifndef __SUNPRO_C
4283 choke me
4284 #endif
4285   ;
4286   return 0;
4287 }
4288 _ACEOF
4289 if ac_fn_c_try_compile "$LINENO"; then :
4290   SUN_STUDIO_CC=yes
4291 else
4292   SUN_STUDIO_CC=no
4293 fi
4294 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4295
4296
4297
4298 unset CFLAGS
4299
4300 #
4301 # Read the template
4302 #
4303 . "$srcdir/src/template/$template" || exit
4304
4305 # CFLAGS are selected so:
4306 # If the user specifies something in the environment, that is used.
4307 # else:  If the template file set something, that is used.
4308 # else:  If coverage was enabled, don't set anything.
4309 # else:  If the compiler is GCC, then we use -O2.
4310 # else:  If the compiler is something else, then we use -O, unless debugging.
4311
4312 if test "$ac_env_CFLAGS_set" = set; then
4313   CFLAGS=$ac_env_CFLAGS_value
4314 elif test "${CFLAGS+set}" = set; then
4315   : # (keep what template set)
4316 elif test "$enable_coverage" = yes; then
4317   : # no optimization by default
4318 elif test "$GCC" = yes; then
4319   CFLAGS="-O2"
4320 else
4321   # if the user selected debug mode, don't use -O
4322   if test "$enable_debug" != yes; then
4323     CFLAGS="-O"
4324   fi
4325 fi
4326
4327 # set CFLAGS_VECTOR from the environment, if available
4328 if test "$ac_env_CFLAGS_VECTOR_set" = set; then
4329   CFLAGS_VECTOR=$ac_env_CFLAGS_VECTOR_value
4330 fi
4331
4332 # Some versions of GCC support some additional useful warning flags.
4333 # Check whether they are supported, and add them to CFLAGS if so.
4334 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
4335 # but has its own.  Also check other compiler-specific flags here.
4336
4337 if test "$GCC" = yes -a "$ICC" = no; then
4338   CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wpointer-arith"
4339   # These work in some but not all gcc versions
4340   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5
4341 $as_echo_n "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
4342 if ${pgac_cv_prog_cc_cflags__Wdeclaration_after_statement+:} false; then :
4343   $as_echo_n "(cached) " >&6
4344 else
4345   pgac_save_CFLAGS=$CFLAGS
4346 CFLAGS="$pgac_save_CFLAGS -Wdeclaration-after-statement"
4347 ac_save_c_werror_flag=$ac_c_werror_flag
4348 ac_c_werror_flag=yes
4349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4350 /* end confdefs.h.  */
4351
4352 int
4353 main ()
4354 {
4355
4356   ;
4357   return 0;
4358 }
4359 _ACEOF
4360 if ac_fn_c_try_compile "$LINENO"; then :
4361   pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=yes
4362 else
4363   pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=no
4364 fi
4365 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4366 ac_c_werror_flag=$ac_save_c_werror_flag
4367 CFLAGS="$pgac_save_CFLAGS"
4368 fi
4369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&5
4370 $as_echo "$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&6; }
4371 if test x"$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" = x"yes"; then
4372   CFLAGS="$CFLAGS -Wdeclaration-after-statement"
4373 fi
4374
4375   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wendif-labels" >&5
4376 $as_echo_n "checking whether $CC supports -Wendif-labels... " >&6; }
4377 if ${pgac_cv_prog_cc_cflags__Wendif_labels+:} false; then :
4378   $as_echo_n "(cached) " >&6
4379 else
4380   pgac_save_CFLAGS=$CFLAGS
4381 CFLAGS="$pgac_save_CFLAGS -Wendif-labels"
4382 ac_save_c_werror_flag=$ac_c_werror_flag
4383 ac_c_werror_flag=yes
4384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4385 /* end confdefs.h.  */
4386
4387 int
4388 main ()
4389 {
4390
4391   ;
4392   return 0;
4393 }
4394 _ACEOF
4395 if ac_fn_c_try_compile "$LINENO"; then :
4396   pgac_cv_prog_cc_cflags__Wendif_labels=yes
4397 else
4398   pgac_cv_prog_cc_cflags__Wendif_labels=no
4399 fi
4400 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4401 ac_c_werror_flag=$ac_save_c_werror_flag
4402 CFLAGS="$pgac_save_CFLAGS"
4403 fi
4404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wendif_labels" >&5
4405 $as_echo "$pgac_cv_prog_cc_cflags__Wendif_labels" >&6; }
4406 if test x"$pgac_cv_prog_cc_cflags__Wendif_labels" = x"yes"; then
4407   CFLAGS="$CFLAGS -Wendif-labels"
4408 fi
4409
4410   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wmissing-format-attribute" >&5
4411 $as_echo_n "checking whether $CC supports -Wmissing-format-attribute... " >&6; }
4412 if ${pgac_cv_prog_cc_cflags__Wmissing_format_attribute+:} false; then :
4413   $as_echo_n "(cached) " >&6
4414 else
4415   pgac_save_CFLAGS=$CFLAGS
4416 CFLAGS="$pgac_save_CFLAGS -Wmissing-format-attribute"
4417 ac_save_c_werror_flag=$ac_c_werror_flag
4418 ac_c_werror_flag=yes
4419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4420 /* end confdefs.h.  */
4421
4422 int
4423 main ()
4424 {
4425
4426   ;
4427   return 0;
4428 }
4429 _ACEOF
4430 if ac_fn_c_try_compile "$LINENO"; then :
4431   pgac_cv_prog_cc_cflags__Wmissing_format_attribute=yes
4432 else
4433   pgac_cv_prog_cc_cflags__Wmissing_format_attribute=no
4434 fi
4435 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4436 ac_c_werror_flag=$ac_save_c_werror_flag
4437 CFLAGS="$pgac_save_CFLAGS"
4438 fi
4439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wmissing_format_attribute" >&5
4440 $as_echo "$pgac_cv_prog_cc_cflags__Wmissing_format_attribute" >&6; }
4441 if test x"$pgac_cv_prog_cc_cflags__Wmissing_format_attribute" = x"yes"; then
4442   CFLAGS="$CFLAGS -Wmissing-format-attribute"
4443 fi
4444
4445   # This was included in -Wall/-Wformat in older GCC versions
4446   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wformat-security" >&5
4447 $as_echo_n "checking whether $CC supports -Wformat-security... " >&6; }
4448 if ${pgac_cv_prog_cc_cflags__Wformat_security+:} false; then :
4449   $as_echo_n "(cached) " >&6
4450 else
4451   pgac_save_CFLAGS=$CFLAGS
4452 CFLAGS="$pgac_save_CFLAGS -Wformat-security"
4453 ac_save_c_werror_flag=$ac_c_werror_flag
4454 ac_c_werror_flag=yes
4455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4456 /* end confdefs.h.  */
4457
4458 int
4459 main ()
4460 {
4461
4462   ;
4463   return 0;
4464 }
4465 _ACEOF
4466 if ac_fn_c_try_compile "$LINENO"; then :
4467   pgac_cv_prog_cc_cflags__Wformat_security=yes
4468 else
4469   pgac_cv_prog_cc_cflags__Wformat_security=no
4470 fi
4471 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4472 ac_c_werror_flag=$ac_save_c_werror_flag
4473 CFLAGS="$pgac_save_CFLAGS"
4474 fi
4475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wformat_security" >&5
4476 $as_echo "$pgac_cv_prog_cc_cflags__Wformat_security" >&6; }
4477 if test x"$pgac_cv_prog_cc_cflags__Wformat_security" = x"yes"; then
4478   CFLAGS="$CFLAGS -Wformat-security"
4479 fi
4480
4481   # Disable strict-aliasing rules; needed for gcc 3.3+
4482   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-strict-aliasing" >&5
4483 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4484 if ${pgac_cv_prog_cc_cflags__fno_strict_aliasing+:} false; then :
4485   $as_echo_n "(cached) " >&6
4486 else
4487   pgac_save_CFLAGS=$CFLAGS
4488 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4489 ac_save_c_werror_flag=$ac_c_werror_flag
4490 ac_c_werror_flag=yes
4491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4492 /* end confdefs.h.  */
4493
4494 int
4495 main ()
4496 {
4497
4498   ;
4499   return 0;
4500 }
4501 _ACEOF
4502 if ac_fn_c_try_compile "$LINENO"; then :
4503   pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4504 else
4505   pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4506 fi
4507 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4508 ac_c_werror_flag=$ac_save_c_werror_flag
4509 CFLAGS="$pgac_save_CFLAGS"
4510 fi
4511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4512 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4513 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4514   CFLAGS="$CFLAGS -fno-strict-aliasing"
4515 fi
4516
4517   # Disable optimizations that assume no overflow; needed for gcc 4.3+
4518   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fwrapv" >&5
4519 $as_echo_n "checking whether $CC supports -fwrapv... " >&6; }
4520 if ${pgac_cv_prog_cc_cflags__fwrapv+:} false; then :
4521   $as_echo_n "(cached) " >&6
4522 else
4523   pgac_save_CFLAGS=$CFLAGS
4524 CFLAGS="$pgac_save_CFLAGS -fwrapv"
4525 ac_save_c_werror_flag=$ac_c_werror_flag
4526 ac_c_werror_flag=yes
4527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4528 /* end confdefs.h.  */
4529
4530 int
4531 main ()
4532 {
4533
4534   ;
4535   return 0;
4536 }
4537 _ACEOF
4538 if ac_fn_c_try_compile "$LINENO"; then :
4539   pgac_cv_prog_cc_cflags__fwrapv=yes
4540 else
4541   pgac_cv_prog_cc_cflags__fwrapv=no
4542 fi
4543 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4544 ac_c_werror_flag=$ac_save_c_werror_flag
4545 CFLAGS="$pgac_save_CFLAGS"
4546 fi
4547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fwrapv" >&5
4548 $as_echo "$pgac_cv_prog_cc_cflags__fwrapv" >&6; }
4549 if test x"$pgac_cv_prog_cc_cflags__fwrapv" = x"yes"; then
4550   CFLAGS="$CFLAGS -fwrapv"
4551 fi
4552
4553   # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
4554   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fexcess-precision=standard" >&5
4555 $as_echo_n "checking whether $CC supports -fexcess-precision=standard... " >&6; }
4556 if ${pgac_cv_prog_cc_cflags__fexcess_precision_standard+:} false; then :
4557   $as_echo_n "(cached) " >&6
4558 else
4559   pgac_save_CFLAGS=$CFLAGS
4560 CFLAGS="$pgac_save_CFLAGS -fexcess-precision=standard"
4561 ac_save_c_werror_flag=$ac_c_werror_flag
4562 ac_c_werror_flag=yes
4563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4564 /* end confdefs.h.  */
4565
4566 int
4567 main ()
4568 {
4569
4570   ;
4571   return 0;
4572 }
4573 _ACEOF
4574 if ac_fn_c_try_compile "$LINENO"; then :
4575   pgac_cv_prog_cc_cflags__fexcess_precision_standard=yes
4576 else
4577   pgac_cv_prog_cc_cflags__fexcess_precision_standard=no
4578 fi
4579 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4580 ac_c_werror_flag=$ac_save_c_werror_flag
4581 CFLAGS="$pgac_save_CFLAGS"
4582 fi
4583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fexcess_precision_standard" >&5
4584 $as_echo "$pgac_cv_prog_cc_cflags__fexcess_precision_standard" >&6; }
4585 if test x"$pgac_cv_prog_cc_cflags__fexcess_precision_standard" = x"yes"; then
4586   CFLAGS="$CFLAGS -fexcess-precision=standard"
4587 fi
4588
4589   # Optimization flags for specific files that benefit from vectorization
4590   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -funroll-loops" >&5
4591 $as_echo_n "checking whether $CC supports -funroll-loops... " >&6; }
4592 if ${pgac_cv_prog_cc_cflags__funroll_loops+:} false; then :
4593   $as_echo_n "(cached) " >&6
4594 else
4595   pgac_save_CFLAGS=$CFLAGS
4596 CFLAGS="$pgac_save_CFLAGS -funroll-loops"
4597 ac_save_c_werror_flag=$ac_c_werror_flag
4598 ac_c_werror_flag=yes
4599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4600 /* end confdefs.h.  */
4601
4602 int
4603 main ()
4604 {
4605
4606   ;
4607   return 0;
4608 }
4609 _ACEOF
4610 if ac_fn_c_try_compile "$LINENO"; then :
4611   pgac_cv_prog_cc_cflags__funroll_loops=yes
4612 else
4613   pgac_cv_prog_cc_cflags__funroll_loops=no
4614 fi
4615 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4616 ac_c_werror_flag=$ac_save_c_werror_flag
4617 CFLAGS="$pgac_save_CFLAGS"
4618 fi
4619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__funroll_loops" >&5
4620 $as_echo "$pgac_cv_prog_cc_cflags__funroll_loops" >&6; }
4621 if test x"$pgac_cv_prog_cc_cflags__funroll_loops" = x"yes"; then
4622   CFLAGS_VECTOR="${CFLAGS_VECTOR} -funroll-loops"
4623 fi
4624
4625   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -ftree-vectorize" >&5
4626 $as_echo_n "checking whether $CC supports -ftree-vectorize... " >&6; }
4627 if ${pgac_cv_prog_cc_cflags__ftree_vectorize+:} false; then :
4628   $as_echo_n "(cached) " >&6
4629 else
4630   pgac_save_CFLAGS=$CFLAGS
4631 CFLAGS="$pgac_save_CFLAGS -ftree-vectorize"
4632 ac_save_c_werror_flag=$ac_c_werror_flag
4633 ac_c_werror_flag=yes
4634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4635 /* end confdefs.h.  */
4636
4637 int
4638 main ()
4639 {
4640
4641   ;
4642   return 0;
4643 }
4644 _ACEOF
4645 if ac_fn_c_try_compile "$LINENO"; then :
4646   pgac_cv_prog_cc_cflags__ftree_vectorize=yes
4647 else
4648   pgac_cv_prog_cc_cflags__ftree_vectorize=no
4649 fi
4650 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4651 ac_c_werror_flag=$ac_save_c_werror_flag
4652 CFLAGS="$pgac_save_CFLAGS"
4653 fi
4654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__ftree_vectorize" >&5
4655 $as_echo "$pgac_cv_prog_cc_cflags__ftree_vectorize" >&6; }
4656 if test x"$pgac_cv_prog_cc_cflags__ftree_vectorize" = x"yes"; then
4657   CFLAGS_VECTOR="${CFLAGS_VECTOR} -ftree-vectorize"
4658 fi
4659
4660 elif test "$ICC" = yes; then
4661   # Intel's compiler has a bug/misoptimization in checking for
4662   # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
4663   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mp1" >&5
4664 $as_echo_n "checking whether $CC supports -mp1... " >&6; }
4665 if ${pgac_cv_prog_cc_cflags__mp1+:} false; then :
4666   $as_echo_n "(cached) " >&6
4667 else
4668   pgac_save_CFLAGS=$CFLAGS
4669 CFLAGS="$pgac_save_CFLAGS -mp1"
4670 ac_save_c_werror_flag=$ac_c_werror_flag
4671 ac_c_werror_flag=yes
4672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4673 /* end confdefs.h.  */
4674
4675 int
4676 main ()
4677 {
4678
4679   ;
4680   return 0;
4681 }
4682 _ACEOF
4683 if ac_fn_c_try_compile "$LINENO"; then :
4684   pgac_cv_prog_cc_cflags__mp1=yes
4685 else
4686   pgac_cv_prog_cc_cflags__mp1=no
4687 fi
4688 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4689 ac_c_werror_flag=$ac_save_c_werror_flag
4690 CFLAGS="$pgac_save_CFLAGS"
4691 fi
4692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__mp1" >&5
4693 $as_echo "$pgac_cv_prog_cc_cflags__mp1" >&6; }
4694 if test x"$pgac_cv_prog_cc_cflags__mp1" = x"yes"; then
4695   CFLAGS="$CFLAGS -mp1"
4696 fi
4697
4698   # Make sure strict aliasing is off (though this is said to be the default)
4699   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-strict-aliasing" >&5
4700 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4701 if ${pgac_cv_prog_cc_cflags__fno_strict_aliasing+:} false; then :
4702   $as_echo_n "(cached) " >&6
4703 else
4704   pgac_save_CFLAGS=$CFLAGS
4705 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4706 ac_save_c_werror_flag=$ac_c_werror_flag
4707 ac_c_werror_flag=yes
4708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4709 /* end confdefs.h.  */
4710
4711 int
4712 main ()
4713 {
4714
4715   ;
4716   return 0;
4717 }
4718 _ACEOF
4719 if ac_fn_c_try_compile "$LINENO"; then :
4720   pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4721 else
4722   pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4723 fi
4724 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4725 ac_c_werror_flag=$ac_save_c_werror_flag
4726 CFLAGS="$pgac_save_CFLAGS"
4727 fi
4728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4729 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4730 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4731   CFLAGS="$CFLAGS -fno-strict-aliasing"
4732 fi
4733
4734 elif test "$PORTNAME" = "aix"; then
4735   # AIX's xlc has to have strict aliasing turned off too
4736   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -qnoansialias" >&5
4737 $as_echo_n "checking whether $CC supports -qnoansialias... " >&6; }
4738 if ${pgac_cv_prog_cc_cflags__qnoansialias+:} false; then :
4739   $as_echo_n "(cached) " >&6
4740 else
4741   pgac_save_CFLAGS=$CFLAGS
4742 CFLAGS="$pgac_save_CFLAGS -qnoansialias"
4743 ac_save_c_werror_flag=$ac_c_werror_flag
4744 ac_c_werror_flag=yes
4745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4746 /* end confdefs.h.  */
4747
4748 int
4749 main ()
4750 {
4751
4752   ;
4753   return 0;
4754 }
4755 _ACEOF
4756 if ac_fn_c_try_compile "$LINENO"; then :
4757   pgac_cv_prog_cc_cflags__qnoansialias=yes
4758 else
4759   pgac_cv_prog_cc_cflags__qnoansialias=no
4760 fi
4761 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4762 ac_c_werror_flag=$ac_save_c_werror_flag
4763 CFLAGS="$pgac_save_CFLAGS"
4764 fi
4765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__qnoansialias" >&5
4766 $as_echo "$pgac_cv_prog_cc_cflags__qnoansialias" >&6; }
4767 if test x"$pgac_cv_prog_cc_cflags__qnoansialias" = x"yes"; then
4768   CFLAGS="$CFLAGS -qnoansialias"
4769 fi
4770
4771 elif test "$PORTNAME" = "hpux"; then
4772   # On some versions of HP-UX, libm functions do not set errno by default.
4773   # Fix that by using +Olibmerrno if the compiler recognizes it.
4774   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports +Olibmerrno" >&5
4775 $as_echo_n "checking whether $CC supports +Olibmerrno... " >&6; }
4776 if ${pgac_cv_prog_cc_cflags_pOlibmerrno+:} false; then :
4777   $as_echo_n "(cached) " >&6
4778 else
4779   pgac_save_CFLAGS=$CFLAGS
4780 CFLAGS="$pgac_save_CFLAGS +Olibmerrno"
4781 ac_save_c_werror_flag=$ac_c_werror_flag
4782 ac_c_werror_flag=yes
4783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4784 /* end confdefs.h.  */
4785
4786 int
4787 main ()
4788 {
4789
4790   ;
4791   return 0;
4792 }
4793 _ACEOF
4794 if ac_fn_c_try_compile "$LINENO"; then :
4795   pgac_cv_prog_cc_cflags_pOlibmerrno=yes
4796 else
4797   pgac_cv_prog_cc_cflags_pOlibmerrno=no
4798 fi
4799 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4800 ac_c_werror_flag=$ac_save_c_werror_flag
4801 CFLAGS="$pgac_save_CFLAGS"
4802 fi
4803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags_pOlibmerrno" >&5
4804 $as_echo "$pgac_cv_prog_cc_cflags_pOlibmerrno" >&6; }
4805 if test x"$pgac_cv_prog_cc_cflags_pOlibmerrno" = x"yes"; then
4806   CFLAGS="$CFLAGS +Olibmerrno"
4807 fi
4808
4809 fi
4810
4811 CFLAGS_VECTOR=$CFLAGS_VECTOR
4812
4813
4814 # supply -g if --enable-debug
4815 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
4816   CFLAGS="$CFLAGS -g"
4817 fi
4818
4819 # enable code coverage if --enable-coverage
4820 if test "$enable_coverage" = yes; then
4821   if test "$GCC" = yes; then
4822     CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
4823   else
4824     as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
4825   fi
4826 fi
4827
4828 # enable profiling if --enable-profiling
4829 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
4830   if test "$GCC" = yes; then
4831
4832 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
4833
4834     CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
4835   else
4836     as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
4837   fi
4838 fi
4839
4840 # We already have this in Makefile.win32, but configure needs it too
4841 if test "$PORTNAME" = "win32"; then
4842   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
4843 fi
4844
4845 # Check if the compiler still works with the template settings
4846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
4847 $as_echo_n "checking whether the C compiler still works... " >&6; }
4848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4849 /* end confdefs.h.  */
4850
4851 int
4852 main ()
4853 {
4854 return 0;
4855   ;
4856   return 0;
4857 }
4858 _ACEOF
4859 if ac_fn_c_try_link "$LINENO"; then :
4860   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4861 $as_echo "yes" >&6; }
4862 else
4863   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4864 $as_echo "no" >&6; }
4865    as_fn_error $? "cannot proceed" "$LINENO" 5
4866 fi
4867 rm -f core conftest.err conftest.$ac_objext \
4868     conftest$ac_exeext conftest.$ac_ext
4869
4870 # Defend against gcc -ffast-math
4871 if test "$GCC" = yes; then
4872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4873 /* end confdefs.h.  */
4874
4875 int
4876 main ()
4877 {
4878 #ifdef __FAST_MATH__
4879 choke me
4880 #endif
4881   ;
4882   return 0;
4883 }
4884 _ACEOF
4885 if ac_fn_c_try_compile "$LINENO"; then :
4886
4887 else
4888   as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
4889 fi
4890 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4891 fi
4892
4893 ac_ext=c
4894 ac_cpp='$CPP $CPPFLAGS'
4895 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4896 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4897 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4899 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4900 # On Suns, sometimes $CPP names a directory.
4901 if test -n "$CPP" && test -d "$CPP"; then
4902   CPP=
4903 fi
4904 if test -z "$CPP"; then
4905   if ${ac_cv_prog_CPP+:} false; then :
4906   $as_echo_n "(cached) " >&6
4907 else
4908       # Double quotes because CPP needs to be expanded
4909     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4910     do
4911       ac_preproc_ok=false
4912 for ac_c_preproc_warn_flag in '' yes
4913 do
4914   # Use a header file that comes with gcc, so configuring glibc
4915   # with a fresh cross-compiler works.
4916   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4917   # <limits.h> exists even on freestanding compilers.
4918   # On the NeXT, cc -E runs the code through the compiler's parser,
4919   # not just through cpp. "Syntax error" is here to catch this case.
4920   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4921 /* end confdefs.h.  */
4922 #ifdef __STDC__
4923 # include <limits.h>
4924 #else
4925 # include <assert.h>
4926 #endif
4927                      Syntax error
4928 _ACEOF
4929 if ac_fn_c_try_cpp "$LINENO"; then :
4930
4931 else
4932   # Broken: fails on valid input.
4933 continue
4934 fi
4935 rm -f conftest.err conftest.i conftest.$ac_ext
4936
4937   # OK, works on sane cases.  Now check whether nonexistent headers
4938   # can be detected and how.
4939   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4940 /* end confdefs.h.  */
4941 #include <ac_nonexistent.h>
4942 _ACEOF
4943 if ac_fn_c_try_cpp "$LINENO"; then :
4944   # Broken: success on invalid input.
4945 continue
4946 else
4947   # Passes both tests.
4948 ac_preproc_ok=:
4949 break
4950 fi
4951 rm -f conftest.err conftest.i conftest.$ac_ext
4952
4953 done
4954 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4955 rm -f conftest.i conftest.err conftest.$ac_ext
4956 if $ac_preproc_ok; then :
4957   break
4958 fi
4959
4960     done
4961     ac_cv_prog_CPP=$CPP
4962
4963 fi
4964   CPP=$ac_cv_prog_CPP
4965 else
4966   ac_cv_prog_CPP=$CPP
4967 fi
4968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4969 $as_echo "$CPP" >&6; }
4970 ac_preproc_ok=false
4971 for ac_c_preproc_warn_flag in '' yes
4972 do
4973   # Use a header file that comes with gcc, so configuring glibc
4974   # with a fresh cross-compiler works.
4975   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4976   # <limits.h> exists even on freestanding compilers.
4977   # On the NeXT, cc -E runs the code through the compiler's parser,
4978   # not just through cpp. "Syntax error" is here to catch this case.
4979   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4980 /* end confdefs.h.  */
4981 #ifdef __STDC__
4982 # include <limits.h>
4983 #else
4984 # include <assert.h>
4985 #endif
4986                      Syntax error
4987 _ACEOF
4988 if ac_fn_c_try_cpp "$LINENO"; then :
4989
4990 else
4991   # Broken: fails on valid input.
4992 continue
4993 fi
4994 rm -f conftest.err conftest.i conftest.$ac_ext
4995
4996   # OK, works on sane cases.  Now check whether nonexistent headers
4997   # can be detected and how.
4998   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4999 /* end confdefs.h.  */
5000 #include <ac_nonexistent.h>
5001 _ACEOF
5002 if ac_fn_c_try_cpp "$LINENO"; then :
5003   # Broken: success on invalid input.
5004 continue
5005 else
5006   # Passes both tests.
5007 ac_preproc_ok=:
5008 break
5009 fi
5010 rm -f conftest.err conftest.i conftest.$ac_ext
5011
5012 done
5013 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5014 rm -f conftest.i conftest.err conftest.$ac_ext
5015 if $ac_preproc_ok; then :
5016
5017 else
5018   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5019 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5020 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5021 See \`config.log' for more details" "$LINENO" 5; }
5022 fi
5023
5024 ac_ext=c
5025 ac_cpp='$CPP $CPPFLAGS'
5026 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5027 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5028 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5029
5030
5031
5032
5033 #
5034 # Set up TAS assembly code if needed; the template file has now had its
5035 # chance to request this.
5036 #
5037 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
5038
5039
5040 if test "$need_tas" = yes ; then
5041   TAS=tas.o
5042 else
5043   TAS=""
5044 fi
5045
5046
5047
5048 #
5049 # Automatic dependency tracking
5050 #
5051
5052
5053 # Check whether --enable-depend was given.
5054 if test "${enable_depend+set}" = set; then :
5055   enableval=$enable_depend;
5056   case $enableval in
5057     yes)
5058       autodepend=yes
5059       ;;
5060     no)
5061       :
5062       ;;
5063     *)
5064       as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
5065       ;;
5066   esac
5067
5068 else
5069   enable_depend=no
5070
5071 fi
5072
5073
5074
5075
5076
5077 #
5078 # Enable assert checks
5079 #
5080
5081
5082 # Check whether --enable-cassert was given.
5083 if test "${enable_cassert+set}" = set; then :
5084   enableval=$enable_cassert;
5085   case $enableval in
5086     yes)
5087
5088 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
5089
5090       ;;
5091     no)
5092       :
5093       ;;
5094     *)
5095       as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
5096       ;;
5097   esac
5098
5099 else
5100   enable_cassert=no
5101
5102 fi
5103
5104
5105
5106
5107 #
5108 # Include directories
5109 #
5110 ac_save_IFS=$IFS
5111 IFS="${IFS}${PATH_SEPARATOR}"
5112 # SRCH_INC comes from the template file
5113 for dir in $with_includes $SRCH_INC; do
5114   if test -d "$dir"; then
5115     INCLUDES="$INCLUDES -I$dir"
5116   else
5117     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
5118 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
5119   fi
5120 done
5121 IFS=$ac_save_IFS
5122
5123
5124
5125 #
5126 # Library directories
5127 #
5128 ac_save_IFS=$IFS
5129 IFS="${IFS}${PATH_SEPARATOR}"
5130 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
5131 for dir in $LIBRARY_DIRS $SRCH_LIB; do
5132   if test -d "$dir"; then
5133     LIBDIRS="$LIBDIRS -L$dir"
5134   else
5135     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
5136 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
5137   fi
5138 done
5139 IFS=$ac_save_IFS
5140
5141 #
5142 # Enable thread-safe client libraries
5143 #
5144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
5145 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
5146
5147
5148 # Check whether --enable-thread-safety was given.
5149 if test "${enable_thread_safety+set}" = set; then :
5150   enableval=$enable_thread_safety;
5151   case $enableval in
5152     yes)
5153       :
5154       ;;
5155     no)
5156       :
5157       ;;
5158     *)
5159       as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
5160       ;;
5161   esac
5162
5163 else
5164   enable_thread_safety=yes
5165
5166 fi
5167
5168
5169 if test "$enable_thread_safety" = yes; then
5170
5171 $as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
5172
5173 fi
5174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
5175 $as_echo "$enable_thread_safety" >&6; }
5176
5177
5178 #
5179 # Optionally build Tcl modules (PL/Tcl)
5180 #
5181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
5182 $as_echo_n "checking whether to build with Tcl... " >&6; }
5183
5184
5185
5186 # Check whether --with-tcl was given.
5187 if test "${with_tcl+set}" = set; then :
5188   withval=$with_tcl;
5189   case $withval in
5190     yes)
5191       :
5192       ;;
5193     no)
5194       :
5195       ;;
5196     *)
5197       as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
5198       ;;
5199   esac
5200
5201 else
5202   with_tcl=no
5203
5204 fi
5205
5206
5207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
5208 $as_echo "$with_tcl" >&6; }
5209
5210
5211 # We see if the path to the Tcl/Tk configuration scripts is specified.
5212 # This will override the use of tclsh to find the paths to search.
5213
5214
5215
5216
5217 # Check whether --with-tclconfig was given.
5218 if test "${with_tclconfig+set}" = set; then :
5219   withval=$with_tclconfig;
5220   case $withval in
5221     yes)
5222       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
5223       ;;
5224     no)
5225       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
5226       ;;
5227     *)
5228
5229       ;;
5230   esac
5231
5232 fi
5233
5234
5235
5236 #
5237 # Optionally build Perl modules (PL/Perl)
5238 #
5239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
5240 $as_echo_n "checking whether to build Perl modules... " >&6; }
5241
5242
5243
5244 # Check whether --with-perl was given.
5245 if test "${with_perl+set}" = set; then :
5246   withval=$with_perl;
5247   case $withval in
5248     yes)
5249       :
5250       ;;
5251     no)
5252       :
5253       ;;
5254     *)
5255       as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
5256       ;;
5257   esac
5258
5259 else
5260   with_perl=no
5261
5262 fi
5263
5264
5265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
5266 $as_echo "$with_perl" >&6; }
5267
5268
5269 #
5270 # Optionally build Python modules (PL/Python)
5271 #
5272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
5273 $as_echo_n "checking whether to build Python modules... " >&6; }
5274
5275
5276
5277 # Check whether --with-python was given.
5278 if test "${with_python+set}" = set; then :
5279   withval=$with_python;
5280   case $withval in
5281     yes)
5282       :
5283       ;;
5284     no)
5285       :
5286       ;;
5287     *)
5288       as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
5289       ;;
5290   esac
5291
5292 else
5293   with_python=no
5294
5295 fi
5296
5297
5298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
5299 $as_echo "$with_python" >&6; }
5300
5301
5302 #
5303 # GSSAPI
5304 #
5305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
5306 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
5307
5308
5309
5310 # Check whether --with-gssapi was given.
5311 if test "${with_gssapi+set}" = set; then :
5312   withval=$with_gssapi;
5313   case $withval in
5314     yes)
5315
5316
5317 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
5318
5319   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
5320
5321       ;;
5322     no)
5323       :
5324       ;;
5325     *)
5326       as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
5327       ;;
5328   esac
5329
5330 else
5331   with_gssapi=no
5332
5333 fi
5334
5335
5336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
5337 $as_echo "$with_gssapi" >&6; }
5338
5339
5340
5341
5342
5343 #
5344 # Kerberos configuration parameters
5345 #
5346
5347
5348
5349 # Check whether --with-krb-srvnam was given.
5350 if test "${with_krb_srvnam+set}" = set; then :
5351   withval=$with_krb_srvnam;
5352   case $withval in
5353     yes)
5354       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
5355       ;;
5356     no)
5357       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
5358       ;;
5359     *)
5360
5361       ;;
5362   esac
5363
5364 else
5365   with_krb_srvnam="postgres"
5366 fi
5367
5368
5369
5370 cat >>confdefs.h <<_ACEOF
5371 #define PG_KRB_SRVNAM "$with_krb_srvnam"
5372 _ACEOF
5373
5374
5375
5376 #
5377 # PAM
5378 #
5379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
5380 $as_echo_n "checking whether to build with PAM support... " >&6; }
5381
5382
5383
5384 # Check whether --with-pam was given.
5385 if test "${with_pam+set}" = set; then :
5386   withval=$with_pam;
5387   case $withval in
5388     yes)
5389
5390 $as_echo "#define USE_PAM 1" >>confdefs.h
5391
5392       ;;
5393     no)
5394       :
5395       ;;
5396     *)
5397       as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
5398       ;;
5399   esac
5400
5401 else
5402   with_pam=no
5403
5404 fi
5405
5406
5407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
5408 $as_echo "$with_pam" >&6; }
5409
5410
5411 #
5412 # LDAP
5413 #
5414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
5415 $as_echo_n "checking whether to build with LDAP support... " >&6; }
5416
5417
5418
5419 # Check whether --with-ldap was given.
5420 if test "${with_ldap+set}" = set; then :
5421   withval=$with_ldap;
5422   case $withval in
5423     yes)
5424
5425 $as_echo "#define USE_LDAP 1" >>confdefs.h
5426
5427       ;;
5428     no)
5429       :
5430       ;;
5431     *)
5432       as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
5433       ;;
5434   esac
5435
5436 else
5437   with_ldap=no
5438
5439 fi
5440
5441
5442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
5443 $as_echo "$with_ldap" >&6; }
5444
5445
5446 #
5447 # Bonjour
5448 #
5449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
5450 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
5451
5452
5453
5454 # Check whether --with-bonjour was given.
5455 if test "${with_bonjour+set}" = set; then :
5456   withval=$with_bonjour;
5457   case $withval in
5458     yes)
5459
5460 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
5461
5462       ;;
5463     no)
5464       :
5465       ;;
5466     *)
5467       as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
5468       ;;
5469   esac
5470
5471 else
5472   with_bonjour=no
5473
5474 fi
5475
5476
5477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
5478 $as_echo "$with_bonjour" >&6; }
5479
5480
5481 #
5482 # OpenSSL
5483 #
5484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with OpenSSL support" >&5
5485 $as_echo_n "checking whether to build with OpenSSL support... " >&6; }
5486
5487
5488
5489 # Check whether --with-openssl was given.
5490 if test "${with_openssl+set}" = set; then :
5491   withval=$with_openssl;
5492   case $withval in
5493     yes)
5494
5495 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
5496
5497       ;;
5498     no)
5499       :
5500       ;;
5501     *)
5502       as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
5503       ;;
5504   esac
5505
5506 else
5507   with_openssl=no
5508
5509 fi
5510
5511
5512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_openssl" >&5
5513 $as_echo "$with_openssl" >&6; }
5514
5515
5516 #
5517 # SELinux
5518 #
5519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
5520 $as_echo_n "checking whether to build with SELinux support... " >&6; }
5521
5522
5523
5524 # Check whether --with-selinux was given.
5525 if test "${with_selinux+set}" = set; then :
5526   withval=$with_selinux;
5527   case $withval in
5528     yes)
5529       :
5530       ;;
5531     no)
5532       :
5533       ;;
5534     *)
5535       as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
5536       ;;
5537   esac
5538
5539 else
5540   with_selinux=no
5541
5542 fi
5543
5544
5545
5546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
5547 $as_echo "$with_selinux" >&6; }
5548
5549 #
5550 # Readline
5551 #
5552
5553
5554
5555 # Check whether --with-readline was given.
5556 if test "${with_readline+set}" = set; then :
5557   withval=$with_readline;
5558   case $withval in
5559     yes)
5560       :
5561       ;;
5562     no)
5563       :
5564       ;;
5565     *)
5566       as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
5567       ;;
5568   esac
5569
5570 else
5571   with_readline=yes
5572
5573 fi
5574
5575
5576 # readline on MinGW has problems with backslashes in psql and other bugs.
5577 # This is particularly a problem with non-US code pages.
5578 # Therefore disable its use until we understand the cause. 2004-07-20
5579 if test "$PORTNAME" = "win32"; then
5580   if test "$with_readline" = yes; then
5581     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
5582 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
5583     with_readline=no
5584   fi
5585 fi
5586
5587
5588 #
5589 # Prefer libedit
5590 #
5591
5592
5593
5594 # Check whether --with-libedit-preferred was given.
5595 if test "${with_libedit_preferred+set}" = set; then :
5596   withval=$with_libedit_preferred;
5597   case $withval in
5598     yes)
5599       :
5600       ;;
5601     no)
5602       :
5603       ;;
5604     *)
5605       as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
5606       ;;
5607   esac
5608
5609 else
5610   with_libedit_preferred=no
5611
5612 fi
5613
5614
5615
5616
5617 #
5618 # UUID library
5619 #
5620 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
5621 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
5622 # UUID library.  More than one of these might be present on a given platform,
5623 # so we make the user say which one she wants.
5624 #
5625
5626
5627
5628 # Check whether --with-uuid was given.
5629 if test "${with_uuid+set}" = set; then :
5630   withval=$with_uuid;
5631   case $withval in
5632     yes)
5633       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
5634       ;;
5635     no)
5636       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
5637       ;;
5638     *)
5639
5640       ;;
5641   esac
5642
5643 fi
5644
5645
5646 if test x"$with_uuid" = x"" ; then
5647   with_uuid=no
5648 fi
5649
5650
5651
5652 # Check whether --with-ossp-uuid was given.
5653 if test "${with_ossp_uuid+set}" = set; then :
5654   withval=$with_ossp_uuid;
5655   case $withval in
5656     yes)
5657       :
5658       ;;
5659     no)
5660       :
5661       ;;
5662     *)
5663       as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
5664       ;;
5665   esac
5666
5667 else
5668   with_ossp_uuid=no
5669
5670 fi
5671
5672
5673 if test "$with_ossp_uuid" = yes ; then
5674   with_uuid=ossp
5675 fi
5676
5677 if test "$with_uuid" = bsd ; then
5678
5679 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
5680
5681   UUID_EXTRA_OBJS="md5.o sha1.o"
5682 elif test "$with_uuid" = e2fs ; then
5683
5684 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
5685
5686   UUID_EXTRA_OBJS="md5.o sha1.o"
5687 elif test "$with_uuid" = ossp ; then
5688
5689 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
5690
5691   UUID_EXTRA_OBJS=""
5692 elif test "$with_uuid" = no ; then
5693   UUID_EXTRA_OBJS=""
5694 else
5695   as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
5696 fi
5697
5698
5699
5700
5701 #
5702 # XML
5703 #
5704
5705
5706
5707 # Check whether --with-libxml was given.
5708 if test "${with_libxml+set}" = set; then :
5709   withval=$with_libxml;
5710   case $withval in
5711     yes)
5712
5713 $as_echo "#define USE_LIBXML 1" >>confdefs.h
5714
5715       ;;
5716     no)
5717       :
5718       ;;
5719     *)
5720       as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
5721       ;;
5722   esac
5723
5724 else
5725   with_libxml=no
5726
5727 fi
5728
5729
5730
5731 if test "$with_libxml" = yes ; then
5732   for ac_prog in xml2-config
5733 do
5734   # Extract the first word of "$ac_prog", so it can be a program name with args.
5735 set dummy $ac_prog; ac_word=$2
5736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5737 $as_echo_n "checking for $ac_word... " >&6; }
5738 if ${ac_cv_prog_XML2_CONFIG+:} false; then :
5739   $as_echo_n "(cached) " >&6
5740 else
5741   if test -n "$XML2_CONFIG"; then
5742   ac_cv_prog_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test.
5743 else
5744 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5745 for as_dir in $PATH
5746 do
5747   IFS=$as_save_IFS
5748   test -z "$as_dir" && as_dir=.
5749     for ac_exec_ext in '' $ac_executable_extensions; do
5750   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5751     ac_cv_prog_XML2_CONFIG="$ac_prog"
5752     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5753     break 2
5754   fi
5755 done
5756   done
5757 IFS=$as_save_IFS
5758
5759 fi
5760 fi
5761 XML2_CONFIG=$ac_cv_prog_XML2_CONFIG
5762 if test -n "$XML2_CONFIG"; then
5763   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
5764 $as_echo "$XML2_CONFIG" >&6; }
5765 else
5766   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5767 $as_echo "no" >&6; }
5768 fi
5769
5770
5771   test -n "$XML2_CONFIG" && break
5772 done
5773
5774   if test -n "$XML2_CONFIG"; then
5775     for pgac_option in `$XML2_CONFIG --cflags`; do
5776       case $pgac_option in
5777         -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
5778       esac
5779     done
5780     for pgac_option in `$XML2_CONFIG --libs`; do
5781       case $pgac_option in
5782         -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5783       esac
5784     done
5785   fi
5786 fi
5787
5788
5789
5790 #
5791 # XSLT
5792 #
5793
5794
5795
5796 # Check whether --with-libxslt was given.
5797 if test "${with_libxslt+set}" = set; then :
5798   withval=$with_libxslt;
5799   case $withval in
5800     yes)
5801
5802 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
5803
5804       ;;
5805     no)
5806       :
5807       ;;
5808     *)
5809       as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
5810       ;;
5811   esac
5812
5813 else
5814   with_libxslt=no
5815
5816 fi
5817
5818
5819
5820
5821
5822
5823 #
5824 # tzdata
5825 #
5826
5827
5828
5829 # Check whether --with-system-tzdata was given.
5830 if test "${with_system_tzdata+set}" = set; then :
5831   withval=$with_system_tzdata;
5832   case $withval in
5833     yes)
5834       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
5835       ;;
5836     no)
5837       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
5838       ;;
5839     *)
5840
5841       ;;
5842   esac
5843
5844 fi
5845
5846
5847
5848
5849 #
5850 # Zlib
5851 #
5852
5853
5854
5855 # Check whether --with-zlib was given.
5856 if test "${with_zlib+set}" = set; then :
5857   withval=$with_zlib;
5858   case $withval in
5859     yes)
5860       :
5861       ;;
5862     no)
5863       :
5864       ;;
5865     *)
5866       as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
5867       ;;
5868   esac
5869
5870 else
5871   with_zlib=yes
5872
5873 fi
5874
5875
5876
5877
5878 #
5879 # Elf
5880 #
5881
5882 # Assume system is ELF if it predefines __ELF__ as 1,
5883 # otherwise believe host_os based default.
5884 case $host_os in
5885     freebsd1*|freebsd2*) elf=no;;
5886     freebsd3*|freebsd4*) elf=yes;;
5887 esac
5888
5889
5890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5891 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5892 if ${ac_cv_path_GREP+:} false; then :
5893   $as_echo_n "(cached) " >&6
5894 else
5895   if test -z "$GREP"; then
5896   ac_path_GREP_found=false
5897   # Loop through the user's path and test for each of PROGNAME-LIST
5898   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5899 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5900 do
5901   IFS=$as_save_IFS
5902   test -z "$as_dir" && as_dir=.
5903     for ac_prog in grep ggrep; do
5904     for ac_exec_ext in '' $ac_executable_extensions; do
5905       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5906       as_fn_executable_p "$ac_path_GREP" || continue
5907 # Check for GNU ac_path_GREP and select it if it is found.
5908   # Check for GNU $ac_path_GREP
5909 case `"$ac_path_GREP" --version 2>&1` in
5910 *GNU*)
5911   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5912 *)
5913   ac_count=0
5914   $as_echo_n 0123456789 >"conftest.in"
5915   while :
5916   do
5917     cat "conftest.in" "conftest.in" >"conftest.tmp"
5918     mv "conftest.tmp" "conftest.in"
5919     cp "conftest.in" "conftest.nl"
5920     $as_echo 'GREP' >> "conftest.nl"
5921     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5922     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5923     as_fn_arith $ac_count + 1 && ac_count=$as_val
5924     if test $ac_count -gt ${ac_path_GREP_max-0}; then
5925       # Best one so far, save it but keep looking for a better one
5926       ac_cv_path_GREP="$ac_path_GREP"
5927       ac_path_GREP_max=$ac_count
5928     fi
5929     # 10*(2^10) chars as input seems more than enough
5930     test $ac_count -gt 10 && break
5931   done
5932   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5933 esac
5934
5935       $ac_path_GREP_found && break 3
5936     done
5937   done
5938   done
5939 IFS=$as_save_IFS
5940   if test -z "$ac_cv_path_GREP"; then
5941     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5942   fi
5943 else
5944   ac_cv_path_GREP=$GREP
5945 fi
5946
5947 fi
5948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5949 $as_echo "$ac_cv_path_GREP" >&6; }
5950  GREP="$ac_cv_path_GREP"
5951
5952
5953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5954 $as_echo_n "checking for egrep... " >&6; }
5955 if ${ac_cv_path_EGREP+:} false; then :
5956   $as_echo_n "(cached) " >&6
5957 else
5958   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5959    then ac_cv_path_EGREP="$GREP -E"
5960    else
5961      if test -z "$EGREP"; then
5962   ac_path_EGREP_found=false
5963   # Loop through the user's path and test for each of PROGNAME-LIST
5964   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5965 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5966 do
5967   IFS=$as_save_IFS
5968   test -z "$as_dir" && as_dir=.
5969     for ac_prog in egrep; do
5970     for ac_exec_ext in '' $ac_executable_extensions; do
5971       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5972       as_fn_executable_p "$ac_path_EGREP" || continue
5973 # Check for GNU ac_path_EGREP and select it if it is found.
5974   # Check for GNU $ac_path_EGREP
5975 case `"$ac_path_EGREP" --version 2>&1` in
5976 *GNU*)
5977   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5978 *)
5979   ac_count=0
5980   $as_echo_n 0123456789 >"conftest.in"
5981   while :
5982   do
5983     cat "conftest.in" "conftest.in" >"conftest.tmp"
5984     mv "conftest.tmp" "conftest.in"
5985     cp "conftest.in" "conftest.nl"
5986     $as_echo 'EGREP' >> "conftest.nl"
5987     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5988     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5989     as_fn_arith $ac_count + 1 && ac_count=$as_val
5990     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5991       # Best one so far, save it but keep looking for a better one
5992       ac_cv_path_EGREP="$ac_path_EGREP"
5993       ac_path_EGREP_max=$ac_count
5994     fi
5995     # 10*(2^10) chars as input seems more than enough
5996     test $ac_count -gt 10 && break
5997   done
5998   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5999 esac
6000
6001       $ac_path_EGREP_found && break 3
6002     done
6003   done
6004   done
6005 IFS=$as_save_IFS
6006   if test -z "$ac_cv_path_EGREP"; then
6007     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6008   fi
6009 else
6010   ac_cv_path_EGREP=$EGREP
6011 fi
6012
6013    fi
6014 fi
6015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6016 $as_echo "$ac_cv_path_EGREP" >&6; }
6017  EGREP="$ac_cv_path_EGREP"
6018
6019
6020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6021 /* end confdefs.h.  */
6022 #if __ELF__
6023   yes
6024 #endif
6025
6026 _ACEOF
6027 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6028   $EGREP "yes" >/dev/null 2>&1; then :
6029   ELF_SYS=true
6030 else
6031   if test "X$elf" = "Xyes" ; then
6032   ELF_SYS=true
6033 else
6034   ELF_SYS=
6035 fi
6036 fi
6037 rm -f conftest*
6038
6039
6040
6041 #
6042 # Assignments
6043 #
6044
6045 CPPFLAGS="$CPPFLAGS $INCLUDES"
6046 LDFLAGS="$LDFLAGS $LIBDIRS"
6047
6048
6049
6050
6051
6052 # Check whether --with-gnu-ld was given.
6053 if test "${with_gnu_ld+set}" = set; then :
6054   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
6055 else
6056   with_gnu_ld=no
6057 fi
6058
6059 ac_prog=ld
6060 if test "$GCC" = yes; then
6061   # Check if gcc -print-prog-name=ld gives a path.
6062   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
6063 $as_echo_n "checking for ld used by GCC... " >&6; }
6064   case $host in
6065   *-*-mingw*)
6066     # gcc leaves a trailing carriage return which upsets mingw
6067     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6068   *)
6069     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6070   esac
6071   case "$ac_prog" in
6072     # Accept absolute paths.
6073     [\\/]* | [A-Za-z]:[\\/]*)
6074       re_direlt='/[^/][^/]*/\.\./'
6075       # Canonicalize the path of ld
6076       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
6077       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
6078         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
6079       done
6080       test -z "$LD" && LD="$ac_prog"
6081       ;;
6082   "")
6083     # If it fails, then pretend we aren't using GCC.
6084     ac_prog=ld
6085     ;;
6086   *)
6087     # If it is relative, then search for the first ld in PATH.
6088     with_gnu_ld=unknown
6089     ;;
6090   esac
6091 elif test "$with_gnu_ld" = yes; then
6092   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
6093 $as_echo_n "checking for GNU ld... " >&6; }
6094 else
6095   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
6096 $as_echo_n "checking for non-GNU ld... " >&6; }
6097 fi
6098 if ${ac_cv_path_LD+:} false; then :
6099   $as_echo_n "(cached) " >&6
6100 else
6101   if test -z "$LD"; then
6102   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
6103   for ac_dir in $PATH; do
6104     test -z "$ac_dir" && ac_dir=.
6105     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6106       ac_cv_path_LD="$ac_dir/$ac_prog"
6107       # Check to see if the program is GNU ld.  I'd rather use --version,
6108       # but apparently some GNU ld's only accept -v.
6109       # Break only if it was the GNU/non-GNU ld that we prefer.
6110       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
6111         test "$with_gnu_ld" != no && break
6112       else
6113         test "$with_gnu_ld" != yes && break
6114       fi
6115     fi
6116   done
6117   IFS="$ac_save_ifs"
6118 else
6119   ac_cv_path_LD="$LD" # Let the user override the test with a path.
6120 fi
6121 fi
6122
6123 LD="$ac_cv_path_LD"
6124 if test -n "$LD"; then
6125   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
6126 $as_echo "$LD" >&6; }
6127 else
6128   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6129 $as_echo "no" >&6; }
6130 fi
6131 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
6132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
6133 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
6134 if ${ac_cv_prog_gnu_ld+:} false; then :
6135   $as_echo_n "(cached) " >&6
6136 else
6137   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
6138 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
6139   ac_cv_prog_gnu_ld=yes
6140 else
6141   ac_cv_prog_gnu_ld=no
6142 fi
6143 fi
6144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
6145 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
6146 with_gnu_ld=$ac_cv_prog_gnu_ld
6147
6148
6149
6150
6151 case $host_os in sysv5*)
6152   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ld -R works" >&5
6153 $as_echo_n "checking whether ld -R works... " >&6; }
6154 if ${pgac_cv_prog_ld_R+:} false; then :
6155   $as_echo_n "(cached) " >&6
6156 else
6157
6158     pgac_save_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -Wl,-R/usr/lib"
6159     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6160 /* end confdefs.h.  */
6161
6162 int
6163 main ()
6164 {
6165
6166   ;
6167   return 0;
6168 }
6169 _ACEOF
6170 if ac_fn_c_try_link "$LINENO"; then :
6171   pgac_cv_prog_ld_R=yes
6172 else
6173   pgac_cv_prog_ld_R=no
6174 fi
6175 rm -f core conftest.err conftest.$ac_objext \
6176     conftest$ac_exeext conftest.$ac_ext
6177     LDFLAGS=$pgac_save_LDFLAGS
6178
6179 fi
6180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_ld_R" >&5
6181 $as_echo "$pgac_cv_prog_ld_R" >&6; }
6182   ld_R_works=$pgac_cv_prog_ld_R
6183
6184 esac
6185 if test -n "$ac_tool_prefix"; then
6186   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6187 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6189 $as_echo_n "checking for $ac_word... " >&6; }
6190 if ${ac_cv_prog_RANLIB+:} false; then :
6191   $as_echo_n "(cached) " >&6
6192 else
6193   if test -n "$RANLIB"; then
6194   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6195 else
6196 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6197 for as_dir in $PATH
6198 do
6199   IFS=$as_save_IFS
6200   test -z "$as_dir" && as_dir=.
6201     for ac_exec_ext in '' $ac_executable_extensions; do
6202   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6203     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6204     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6205     break 2
6206   fi
6207 done
6208   done
6209 IFS=$as_save_IFS
6210
6211 fi
6212 fi
6213 RANLIB=$ac_cv_prog_RANLIB
6214 if test -n "$RANLIB"; then
6215   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6216 $as_echo "$RANLIB" >&6; }
6217 else
6218   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6219 $as_echo "no" >&6; }
6220 fi
6221
6222
6223 fi
6224 if test -z "$ac_cv_prog_RANLIB"; then
6225   ac_ct_RANLIB=$RANLIB
6226   # Extract the first word of "ranlib", so it can be a program name with args.
6227 set dummy ranlib; ac_word=$2
6228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6229 $as_echo_n "checking for $ac_word... " >&6; }
6230 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6231   $as_echo_n "(cached) " >&6
6232 else
6233   if test -n "$ac_ct_RANLIB"; then
6234   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6235 else
6236 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6237 for as_dir in $PATH
6238 do
6239   IFS=$as_save_IFS
6240   test -z "$as_dir" && as_dir=.
6241     for ac_exec_ext in '' $ac_executable_extensions; do
6242   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6243     ac_cv_prog_ac_ct_RANLIB="ranlib"
6244     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6245     break 2
6246   fi
6247 done
6248   done
6249 IFS=$as_save_IFS
6250
6251 fi
6252 fi
6253 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6254 if test -n "$ac_ct_RANLIB"; then
6255   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6256 $as_echo "$ac_ct_RANLIB" >&6; }
6257 else
6258   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6259 $as_echo "no" >&6; }
6260 fi
6261
6262   if test "x$ac_ct_RANLIB" = x; then
6263     RANLIB=":"
6264   else
6265     case $cross_compiling:$ac_tool_warned in
6266 yes:)
6267 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6268 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6269 ac_tool_warned=yes ;;
6270 esac
6271     RANLIB=$ac_ct_RANLIB
6272   fi
6273 else
6274   RANLIB="$ac_cv_prog_RANLIB"
6275 fi
6276
6277
6278   if test -n "$ac_tool_prefix"; then
6279   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6280 set dummy ${ac_tool_prefix}strip; ac_word=$2
6281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6282 $as_echo_n "checking for $ac_word... " >&6; }
6283 if ${ac_cv_prog_STRIP+:} false; then :
6284   $as_echo_n "(cached) " >&6
6285 else
6286   if test -n "$STRIP"; then
6287   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6288 else
6289 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6290 for as_dir in $PATH
6291 do
6292   IFS=$as_save_IFS
6293   test -z "$as_dir" && as_dir=.
6294     for ac_exec_ext in '' $ac_executable_extensions; do
6295   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6296     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6297     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6298     break 2
6299   fi
6300 done
6301   done
6302 IFS=$as_save_IFS
6303
6304 fi
6305 fi
6306 STRIP=$ac_cv_prog_STRIP
6307 if test -n "$STRIP"; then
6308   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6309 $as_echo "$STRIP" >&6; }
6310 else
6311   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6312 $as_echo "no" >&6; }
6313 fi
6314
6315
6316 fi
6317 if test -z "$ac_cv_prog_STRIP"; then
6318   ac_ct_STRIP=$STRIP
6319   # Extract the first word of "strip", so it can be a program name with args.
6320 set dummy strip; ac_word=$2
6321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6322 $as_echo_n "checking for $ac_word... " >&6; }
6323 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
6324   $as_echo_n "(cached) " >&6
6325 else
6326   if test -n "$ac_ct_STRIP"; then
6327   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6328 else
6329 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6330 for as_dir in $PATH
6331 do
6332   IFS=$as_save_IFS
6333   test -z "$as_dir" && as_dir=.
6334     for ac_exec_ext in '' $ac_executable_extensions; do
6335   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6336     ac_cv_prog_ac_ct_STRIP="strip"
6337     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6338     break 2
6339   fi
6340 done
6341   done
6342 IFS=$as_save_IFS
6343
6344 fi
6345 fi
6346 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6347 if test -n "$ac_ct_STRIP"; then
6348   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6349 $as_echo "$ac_ct_STRIP" >&6; }
6350 else
6351   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6352 $as_echo "no" >&6; }
6353 fi
6354
6355   if test "x$ac_ct_STRIP" = x; then
6356     STRIP=":"
6357   else
6358     case $cross_compiling:$ac_tool_warned in
6359 yes:)
6360 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6361 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6362 ac_tool_warned=yes ;;
6363 esac
6364     STRIP=$ac_ct_STRIP
6365   fi
6366 else
6367   STRIP="$ac_cv_prog_STRIP"
6368 fi
6369
6370
6371   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
6372 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
6373   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
6374     STRIP_STATIC_LIB="$STRIP -x"
6375     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
6376     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6377 $as_echo "yes" >&6; }
6378   else
6379     case $host_os in
6380       darwin*)
6381         STRIP="$STRIP -x"
6382         STRIP_STATIC_LIB=$STRIP
6383         STRIP_SHARED_LIB=$STRIP
6384         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6385 $as_echo "yes" >&6; }
6386         ;;
6387       *)
6388         STRIP_STATIC_LIB=:
6389         STRIP_SHARED_LIB=:
6390         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6391 $as_echo "no" >&6; }
6392         ;;
6393     esac
6394   fi
6395
6396
6397
6398 if test -n "$ac_tool_prefix"; then
6399   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6400 set dummy ${ac_tool_prefix}ar; ac_word=$2
6401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6402 $as_echo_n "checking for $ac_word... " >&6; }
6403 if ${ac_cv_prog_AR+:} false; then :
6404   $as_echo_n "(cached) " >&6
6405 else
6406   if test -n "$AR"; then
6407   ac_cv_prog_AR="$AR" # Let the user override the test.
6408 else
6409 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6410 for as_dir in $PATH
6411 do
6412   IFS=$as_save_IFS
6413   test -z "$as_dir" && as_dir=.
6414     for ac_exec_ext in '' $ac_executable_extensions; do
6415   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6416     ac_cv_prog_AR="${ac_tool_prefix}ar"
6417     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6418     break 2
6419   fi
6420 done
6421   done
6422 IFS=$as_save_IFS
6423
6424 fi
6425 fi
6426 AR=$ac_cv_prog_AR
6427 if test -n "$AR"; then
6428   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6429 $as_echo "$AR" >&6; }
6430 else
6431   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6432 $as_echo "no" >&6; }
6433 fi
6434
6435
6436 fi
6437 if test -z "$ac_cv_prog_AR"; then
6438   ac_ct_AR=$AR
6439   # Extract the first word of "ar", so it can be a program name with args.
6440 set dummy ar; ac_word=$2
6441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6442 $as_echo_n "checking for $ac_word... " >&6; }
6443 if ${ac_cv_prog_ac_ct_AR+:} false; then :
6444   $as_echo_n "(cached) " >&6
6445 else
6446   if test -n "$ac_ct_AR"; then
6447   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6448 else
6449 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6450 for as_dir in $PATH
6451 do
6452   IFS=$as_save_IFS
6453   test -z "$as_dir" && as_dir=.
6454     for ac_exec_ext in '' $ac_executable_extensions; do
6455   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6456     ac_cv_prog_ac_ct_AR="ar"
6457     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6458     break 2
6459   fi
6460 done
6461   done
6462 IFS=$as_save_IFS
6463
6464 fi
6465 fi
6466 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6467 if test -n "$ac_ct_AR"; then
6468   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6469 $as_echo "$ac_ct_AR" >&6; }
6470 else
6471   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6472 $as_echo "no" >&6; }
6473 fi
6474
6475   if test "x$ac_ct_AR" = x; then
6476     AR="ar"
6477   else
6478     case $cross_compiling:$ac_tool_warned in
6479 yes:)
6480 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6481 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6482 ac_tool_warned=yes ;;
6483 esac
6484     AR=$ac_ct_AR
6485   fi
6486 else
6487   AR="$ac_cv_prog_AR"
6488 fi
6489
6490 if test "$PORTNAME" = "win32"; then
6491   if test -n "$ac_tool_prefix"; then
6492   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6493 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
6494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6495 $as_echo_n "checking for $ac_word... " >&6; }
6496 if ${ac_cv_prog_DLLTOOL+:} false; then :
6497   $as_echo_n "(cached) " >&6
6498 else
6499   if test -n "$DLLTOOL"; then
6500   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6501 else
6502 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6503 for as_dir in $PATH
6504 do
6505   IFS=$as_save_IFS
6506   test -z "$as_dir" && as_dir=.
6507     for ac_exec_ext in '' $ac_executable_extensions; do
6508   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6509     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
6510     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6511     break 2
6512   fi
6513 done
6514   done
6515 IFS=$as_save_IFS
6516
6517 fi
6518 fi
6519 DLLTOOL=$ac_cv_prog_DLLTOOL
6520 if test -n "$DLLTOOL"; then
6521   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
6522 $as_echo "$DLLTOOL" >&6; }
6523 else
6524   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6525 $as_echo "no" >&6; }
6526 fi
6527
6528
6529 fi
6530 if test -z "$ac_cv_prog_DLLTOOL"; then
6531   ac_ct_DLLTOOL=$DLLTOOL
6532   # Extract the first word of "dlltool", so it can be a program name with args.
6533 set dummy dlltool; ac_word=$2
6534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6535 $as_echo_n "checking for $ac_word... " >&6; }
6536 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
6537   $as_echo_n "(cached) " >&6
6538 else
6539   if test -n "$ac_ct_DLLTOOL"; then
6540   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6541 else
6542 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6543 for as_dir in $PATH
6544 do
6545   IFS=$as_save_IFS
6546   test -z "$as_dir" && as_dir=.
6547     for ac_exec_ext in '' $ac_executable_extensions; do
6548   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6549     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
6550     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6551     break 2
6552   fi
6553 done
6554   done
6555 IFS=$as_save_IFS
6556
6557 fi
6558 fi
6559 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6560 if test -n "$ac_ct_DLLTOOL"; then
6561   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
6562 $as_echo "$ac_ct_DLLTOOL" >&6; }
6563 else
6564   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6565 $as_echo "no" >&6; }
6566 fi
6567
6568   if test "x$ac_ct_DLLTOOL" = x; then
6569     DLLTOOL="dlltool"
6570   else
6571     case $cross_compiling:$ac_tool_warned in
6572 yes:)
6573 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6574 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6575 ac_tool_warned=yes ;;
6576 esac
6577     DLLTOOL=$ac_ct_DLLTOOL
6578   fi
6579 else
6580   DLLTOOL="$ac_cv_prog_DLLTOOL"
6581 fi
6582
6583   if test -n "$ac_tool_prefix"; then
6584   # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
6585 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
6586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6587 $as_echo_n "checking for $ac_word... " >&6; }
6588 if ${ac_cv_prog_DLLWRAP+:} false; then :
6589   $as_echo_n "(cached) " >&6
6590 else
6591   if test -n "$DLLWRAP"; then
6592   ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
6593 else
6594 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6595 for as_dir in $PATH
6596 do
6597   IFS=$as_save_IFS
6598   test -z "$as_dir" && as_dir=.
6599     for ac_exec_ext in '' $ac_executable_extensions; do
6600   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6601     ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
6602     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6603     break 2
6604   fi
6605 done
6606   done
6607 IFS=$as_save_IFS
6608
6609 fi
6610 fi
6611 DLLWRAP=$ac_cv_prog_DLLWRAP
6612 if test -n "$DLLWRAP"; then
6613   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5
6614 $as_echo "$DLLWRAP" >&6; }
6615 else
6616   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6617 $as_echo "no" >&6; }
6618 fi
6619
6620
6621 fi
6622 if test -z "$ac_cv_prog_DLLWRAP"; then
6623   ac_ct_DLLWRAP=$DLLWRAP
6624   # Extract the first word of "dllwrap", so it can be a program name with args.
6625 set dummy dllwrap; ac_word=$2
6626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6627 $as_echo_n "checking for $ac_word... " >&6; }
6628 if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then :
6629   $as_echo_n "(cached) " >&6
6630 else
6631   if test -n "$ac_ct_DLLWRAP"; then
6632   ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
6633 else
6634 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6635 for as_dir in $PATH
6636 do
6637   IFS=$as_save_IFS
6638   test -z "$as_dir" && as_dir=.
6639     for ac_exec_ext in '' $ac_executable_extensions; do
6640   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6641     ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
6642     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6643     break 2
6644   fi
6645 done
6646   done
6647 IFS=$as_save_IFS
6648
6649 fi
6650 fi
6651 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
6652 if test -n "$ac_ct_DLLWRAP"; then
6653   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5
6654 $as_echo "$ac_ct_DLLWRAP" >&6; }
6655 else
6656   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6657 $as_echo "no" >&6; }
6658 fi
6659
6660   if test "x$ac_ct_DLLWRAP" = x; then
6661     DLLWRAP="dllwrap"
6662   else
6663     case $cross_compiling:$ac_tool_warned in
6664 yes:)
6665 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6666 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6667 ac_tool_warned=yes ;;
6668 esac
6669     DLLWRAP=$ac_ct_DLLWRAP
6670   fi
6671 else
6672   DLLWRAP="$ac_cv_prog_DLLWRAP"
6673 fi
6674
6675   if test -n "$ac_tool_prefix"; then
6676   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6677 set dummy ${ac_tool_prefix}windres; ac_word=$2
6678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6679 $as_echo_n "checking for $ac_word... " >&6; }
6680 if ${ac_cv_prog_WINDRES+:} false; then :
6681   $as_echo_n "(cached) " >&6
6682 else
6683   if test -n "$WINDRES"; then
6684   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
6685 else
6686 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6687 for as_dir in $PATH
6688 do
6689   IFS=$as_save_IFS
6690   test -z "$as_dir" && as_dir=.
6691     for ac_exec_ext in '' $ac_executable_extensions; do
6692   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6693     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
6694     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6695     break 2
6696   fi
6697 done
6698   done
6699 IFS=$as_save_IFS
6700
6701 fi
6702 fi
6703 WINDRES=$ac_cv_prog_WINDRES
6704 if test -n "$WINDRES"; then
6705   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
6706 $as_echo "$WINDRES" >&6; }
6707 else
6708   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6709 $as_echo "no" >&6; }
6710 fi
6711
6712
6713 fi
6714 if test -z "$ac_cv_prog_WINDRES"; then
6715   ac_ct_WINDRES=$WINDRES
6716   # Extract the first word of "windres", so it can be a program name with args.
6717 set dummy windres; ac_word=$2
6718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6719 $as_echo_n "checking for $ac_word... " >&6; }
6720 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
6721   $as_echo_n "(cached) " >&6
6722 else
6723   if test -n "$ac_ct_WINDRES"; then
6724   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
6725 else
6726 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6727 for as_dir in $PATH
6728 do
6729   IFS=$as_save_IFS
6730   test -z "$as_dir" && as_dir=.
6731     for ac_exec_ext in '' $ac_executable_extensions; do
6732   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6733     ac_cv_prog_ac_ct_WINDRES="windres"
6734     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6735     break 2
6736   fi
6737 done
6738   done
6739 IFS=$as_save_IFS
6740
6741 fi
6742 fi
6743 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6744 if test -n "$ac_ct_WINDRES"; then
6745   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
6746 $as_echo "$ac_ct_WINDRES" >&6; }
6747 else
6748   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6749 $as_echo "no" >&6; }
6750 fi
6751
6752   if test "x$ac_ct_WINDRES" = x; then
6753     WINDRES="windres"
6754   else
6755     case $cross_compiling:$ac_tool_warned in
6756 yes:)
6757 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6758 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6759 ac_tool_warned=yes ;;
6760 esac
6761     WINDRES=$ac_ct_WINDRES
6762   fi
6763 else
6764   WINDRES="$ac_cv_prog_WINDRES"
6765 fi
6766
6767 fi
6768
6769 # Find a good install program.  We prefer a C program (faster),
6770 # so one script is as good as another.  But avoid the broken or
6771 # incompatible versions:
6772 # SysV /etc/install, /usr/sbin/install
6773 # SunOS /usr/etc/install
6774 # IRIX /sbin/install
6775 # AIX /bin/install
6776 # AmigaOS /C/install, which installs bootblocks on floppy discs
6777 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6778 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
6779 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6780 # OS/2's system install, which has a completely different semantic
6781 # ./install, which can be erroneously created by make from ./install.sh.
6782 # Reject install programs that cannot install multiple files.
6783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6784 $as_echo_n "checking for a BSD-compatible install... " >&6; }
6785 if test -z "$INSTALL"; then
6786 if ${ac_cv_path_install+:} false; then :
6787   $as_echo_n "(cached) " >&6
6788 else
6789   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6790 for as_dir in $PATH
6791 do
6792   IFS=$as_save_IFS
6793   test -z "$as_dir" && as_dir=.
6794     # Account for people who put trailing slashes in PATH elements.
6795 case $as_dir/ in #((
6796   ./ | .// | /[cC]/* | \
6797   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
6798   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
6799   /usr/ucb/* ) ;;
6800   *)
6801     # OSF1 and SCO ODT 3.0 have their own names for install.
6802     # Don't use installbsd from OSF since it installs stuff as root
6803     # by default.
6804     for ac_prog in ginstall scoinst install; do
6805       for ac_exec_ext in '' $ac_executable_extensions; do
6806         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
6807           if test $ac_prog = install &&
6808             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6809             # AIX install.  It has an incompatible calling convention.
6810             :
6811           elif test $ac_prog = install &&
6812             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6813             # program-specific install script used by HP pwplus--don't use.
6814             :
6815           else
6816             rm -rf conftest.one conftest.two conftest.dir
6817             echo one > conftest.one
6818             echo two > conftest.two
6819             mkdir conftest.dir
6820             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6821               test -s conftest.one && test -s conftest.two &&
6822               test -s conftest.dir/conftest.one &&
6823               test -s conftest.dir/conftest.two
6824             then
6825               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6826               break 3
6827             fi
6828           fi
6829         fi
6830       done
6831     done
6832     ;;
6833 esac
6834
6835   done
6836 IFS=$as_save_IFS
6837
6838 rm -rf conftest.one conftest.two conftest.dir
6839
6840 fi
6841   if test "${ac_cv_path_install+set}" = set; then
6842     INSTALL=$ac_cv_path_install
6843   else
6844     # As a last resort, use the slow shell script.  Don't cache a
6845     # value for INSTALL within a source directory, because that will
6846     # break other packages using the cache if that directory is
6847     # removed, or if the value is a relative name.
6848     INSTALL=$ac_install_sh
6849   fi
6850 fi
6851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6852 $as_echo "$INSTALL" >&6; }
6853
6854 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6855 # It thinks the first close brace ends the variable substitution.
6856 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6857
6858 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6859
6860 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6861
6862 # When Autoconf chooses install-sh as install program it tries to generate
6863 # a relative path to it in each makefile where it subsitutes it. This clashes
6864 # with our Makefile.global concept. This workaround helps.
6865 case $INSTALL in
6866   *install-sh*) install_bin='';;
6867   *) install_bin=$INSTALL;;
6868 esac
6869
6870
6871 # Extract the first word of "tar", so it can be a program name with args.
6872 set dummy tar; ac_word=$2
6873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6874 $as_echo_n "checking for $ac_word... " >&6; }
6875 if ${ac_cv_path_TAR+:} false; then :
6876   $as_echo_n "(cached) " >&6
6877 else
6878   case $TAR in
6879   [\\/]* | ?:[\\/]*)
6880   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
6881   ;;
6882   *)
6883   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6884 for as_dir in $PATH
6885 do
6886   IFS=$as_save_IFS
6887   test -z "$as_dir" && as_dir=.
6888     for ac_exec_ext in '' $ac_executable_extensions; do
6889   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6890     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
6891     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6892     break 2
6893   fi
6894 done
6895   done
6896 IFS=$as_save_IFS
6897
6898   ;;
6899 esac
6900 fi
6901 TAR=$ac_cv_path_TAR
6902 if test -n "$TAR"; then
6903   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
6904 $as_echo "$TAR" >&6; }
6905 else
6906   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6907 $as_echo "no" >&6; }
6908 fi
6909
6910
6911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
6912 $as_echo_n "checking whether ln -s works... " >&6; }
6913 LN_S=$as_ln_s
6914 if test "$LN_S" = "ln -s"; then
6915   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6916 $as_echo "yes" >&6; }
6917 else
6918   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
6919 $as_echo "no, using $LN_S" >&6; }
6920 fi
6921
6922 for ac_prog in gawk mawk nawk awk
6923 do
6924   # Extract the first word of "$ac_prog", so it can be a program name with args.
6925 set dummy $ac_prog; ac_word=$2
6926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6927 $as_echo_n "checking for $ac_word... " >&6; }
6928 if ${ac_cv_prog_AWK+:} false; then :
6929   $as_echo_n "(cached) " >&6
6930 else
6931   if test -n "$AWK"; then
6932   ac_cv_prog_AWK="$AWK" # Let the user override the test.
6933 else
6934 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6935 for as_dir in $PATH
6936 do
6937   IFS=$as_save_IFS
6938   test -z "$as_dir" && as_dir=.
6939     for ac_exec_ext in '' $ac_executable_extensions; do
6940   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6941     ac_cv_prog_AWK="$ac_prog"
6942     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6943     break 2
6944   fi
6945 done
6946   done
6947 IFS=$as_save_IFS
6948
6949 fi
6950 fi
6951 AWK=$ac_cv_prog_AWK
6952 if test -n "$AWK"; then
6953   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6954 $as_echo "$AWK" >&6; }
6955 else
6956   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6957 $as_echo "no" >&6; }
6958 fi
6959
6960
6961   test -n "$AWK" && break
6962 done
6963
6964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6965 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6966 if test -z "$MKDIR_P"; then
6967   if ${ac_cv_path_mkdir+:} false; then :
6968   $as_echo_n "(cached) " >&6
6969 else
6970   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6971 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6972 do
6973   IFS=$as_save_IFS
6974   test -z "$as_dir" && as_dir=.
6975     for ac_prog in mkdir gmkdir; do
6976          for ac_exec_ext in '' $ac_executable_extensions; do
6977            as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
6978            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6979              'mkdir (GNU coreutils) '* | \
6980              'mkdir (coreutils) '* | \
6981              'mkdir (fileutils) '4.1*)
6982                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6983                break 3;;
6984            esac
6985          done
6986        done
6987   done
6988 IFS=$as_save_IFS
6989
6990 fi
6991
6992   test -d ./--version && rmdir ./--version
6993   if test "${ac_cv_path_mkdir+set}" = set; then
6994     MKDIR_P="$ac_cv_path_mkdir -p"
6995   else
6996     # As a last resort, use the slow shell script.  Don't cache a
6997     # value for MKDIR_P within a source directory, because that will
6998     # break other packages using the cache if that directory is
6999     # removed, or if the value is a relative name.
7000     MKDIR_P="$ac_install_sh -d"
7001   fi
7002 fi
7003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
7004 $as_echo "$MKDIR_P" >&6; }
7005
7006 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
7007 # a relative path to it in each makefile where it subsitutes it. This clashes
7008 # with our Makefile.global concept. This workaround helps.
7009 case $MKDIR_P in
7010   *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
7011 esac
7012
7013 # Let the user override the search
7014 if test -z "$BISON"; then
7015   for ac_prog in bison
7016 do
7017   # Extract the first word of "$ac_prog", so it can be a program name with args.
7018 set dummy $ac_prog; ac_word=$2
7019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7020 $as_echo_n "checking for $ac_word... " >&6; }
7021 if ${ac_cv_path_BISON+:} false; then :
7022   $as_echo_n "(cached) " >&6
7023 else
7024   case $BISON in
7025   [\\/]* | ?:[\\/]*)
7026   ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
7027   ;;
7028   *)
7029   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7030 for as_dir in $PATH
7031 do
7032   IFS=$as_save_IFS
7033   test -z "$as_dir" && as_dir=.
7034     for ac_exec_ext in '' $ac_executable_extensions; do
7035   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7036     ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
7037     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7038     break 2
7039   fi
7040 done
7041   done
7042 IFS=$as_save_IFS
7043
7044   ;;
7045 esac
7046 fi
7047 BISON=$ac_cv_path_BISON
7048 if test -n "$BISON"; then
7049   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
7050 $as_echo "$BISON" >&6; }
7051 else
7052   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7053 $as_echo "no" >&6; }
7054 fi
7055
7056
7057   test -n "$BISON" && break
7058 done
7059
7060 fi
7061
7062 if test "$BISON"; then
7063   pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
7064   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
7065 $as_echo "$as_me: using $pgac_bison_version" >&6;}
7066   if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
7067   then
7068     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7069 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
7070 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
7071 $as_echo "$as_me: WARNING:
7072 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
7073 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
7074     BISON=""
7075   fi
7076   # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
7077   # of the now preferred %name-prefix "base_yy", but the latter
7078   # doesn't work with Bison 2.3 or less.  So for now we silence the
7079   # deprecation warnings.
7080   if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
7081   then
7082     BISONFLAGS="$BISONFLAGS -Wno-deprecated"
7083   fi
7084 fi
7085
7086 if test -z "$BISON"; then
7087   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7088 *** Without Bison you will not be able to build PostgreSQL from Git nor
7089 *** change any of the parser definition files.  You can obtain Bison from
7090 *** a GNU mirror site.  (If you are using the official distribution of
7091 *** PostgreSQL then you do not need to worry about this, because the Bison
7092 *** output is pre-generated.)" >&5
7093 $as_echo "$as_me: WARNING:
7094 *** Without Bison you will not be able to build PostgreSQL from Git nor
7095 *** change any of the parser definition files.  You can obtain Bison from
7096 *** a GNU mirror site.  (If you are using the official distribution of
7097 *** PostgreSQL then you do not need to worry about this, because the Bison
7098 *** output is pre-generated.)" >&2;}
7099 fi
7100 # We don't need AC_SUBST(BISON) because AC_PATH_PROG did it
7101
7102
7103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
7104 $as_echo_n "checking for flex... " >&6; }
7105 if ${pgac_cv_path_flex+:} false; then :
7106   $as_echo_n "(cached) " >&6
7107 else
7108   # Let the user override the test
7109 if test -n "$FLEX"; then
7110   pgac_cv_path_flex=$FLEX
7111 else
7112   pgac_save_IFS=$IFS
7113   IFS=$PATH_SEPARATOR
7114   for pgac_dir in $PATH; do
7115     IFS=$pgac_save_IFS
7116     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
7117       pgac_dir=`pwd`
7118     fi
7119     for pgac_prog in flex lex; do
7120       pgac_candidate="$pgac_dir/$pgac_prog"
7121       if test -f "$pgac_candidate" \
7122         && $pgac_candidate --version </dev/null >/dev/null 2>&1
7123       then
7124         echo '%%'  > conftest.l
7125         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
7126           pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
7127           if echo "$pgac_flex_version" | sed 's/[.a-z]/ /g' | $AWK '{ if ($1 = 2 && $2 = 5 && $3 >= 31) exit 0; else exit 1;}'
7128           then
7129             pgac_cv_path_flex=$pgac_candidate
7130             break 2
7131           else
7132             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7133 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
7134 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
7135 $as_echo "$as_me: WARNING:
7136 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
7137 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
7138           fi
7139         fi
7140       fi
7141     done
7142   done
7143   rm -f conftest.l lex.yy.c
7144   : ${pgac_cv_path_flex=no}
7145 fi
7146
7147 fi
7148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
7149 $as_echo "$pgac_cv_path_flex" >&6; }
7150 if test x"$pgac_cv_path_flex" = x"no"; then
7151   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7152 *** Without Flex you will not be able to build PostgreSQL from Git nor
7153 *** change any of the scanner definition files.  You can obtain Flex from
7154 *** a GNU mirror site.  (If you are using the official distribution of
7155 *** PostgreSQL then you do not need to worry about this because the Flex
7156 *** output is pre-generated.)" >&5
7157 $as_echo "$as_me: WARNING:
7158 *** Without Flex you will not be able to build PostgreSQL from Git nor
7159 *** change any of the scanner definition files.  You can obtain Flex from
7160 *** a GNU mirror site.  (If you are using the official distribution of
7161 *** PostgreSQL then you do not need to worry about this because the Flex
7162 *** output is pre-generated.)" >&2;}
7163
7164   FLEX=
7165 else
7166   FLEX=$pgac_cv_path_flex
7167   pgac_flex_version=`$FLEX --version 2>/dev/null`
7168   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
7169 $as_echo "$as_me: using $pgac_flex_version" >&6;}
7170 fi
7171
7172
7173
7174
7175
7176 # Let the user override the search
7177 if test -z "$PERL"; then
7178   # Extract the first word of "perl", so it can be a program name with args.
7179 set dummy perl; ac_word=$2
7180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7181 $as_echo_n "checking for $ac_word... " >&6; }
7182 if ${ac_cv_path_PERL+:} false; then :
7183   $as_echo_n "(cached) " >&6
7184 else
7185   case $PERL in
7186   [\\/]* | ?:[\\/]*)
7187   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
7188   ;;
7189   *)
7190   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7191 for as_dir in $PATH
7192 do
7193   IFS=$as_save_IFS
7194   test -z "$as_dir" && as_dir=.
7195     for ac_exec_ext in '' $ac_executable_extensions; do
7196   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7197     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
7198     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7199     break 2
7200   fi
7201 done
7202   done
7203 IFS=$as_save_IFS
7204
7205   ;;
7206 esac
7207 fi
7208 PERL=$ac_cv_path_PERL
7209 if test -n "$PERL"; then
7210   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
7211 $as_echo "$PERL" >&6; }
7212 else
7213   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7214 $as_echo "no" >&6; }
7215 fi
7216
7217
7218 fi
7219
7220 if test "$PERL"; then
7221   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'`
7222   { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
7223 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
7224   if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
7225     $AWK '{ if ($1 = 5 && $2 >= 8) exit 1; else exit 0;}'
7226   then
7227     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7228 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7229 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
7230 $as_echo "$as_me: WARNING:
7231 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7232 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
7233     PERL=""
7234   fi
7235 fi
7236
7237 if test -z "$PERL"; then
7238   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7239 *** Without Perl you will not be able to build PostgreSQL from Git.
7240 *** You can obtain Perl from any CPAN mirror site.
7241 *** (If you are using the official distribution of PostgreSQL then you do not
7242 *** need to worry about this, because the Perl output is pre-generated.)" >&5
7243 $as_echo "$as_me: WARNING:
7244 *** Without Perl you will not be able to build PostgreSQL from Git.
7245 *** You can obtain Perl from any CPAN mirror site.
7246 *** (If you are using the official distribution of PostgreSQL then you do not
7247 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
7248 fi
7249
7250 if test "$with_perl" = yes; then
7251   if test -z "$PERL"; then
7252     as_fn_error $? "Perl not found" "$LINENO" 5
7253   fi
7254
7255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
7256 $as_echo_n "checking for Perl archlibexp... " >&6; }
7257 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
7258 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
7259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
7260 $as_echo "$perl_archlibexp" >&6; }
7261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
7262 $as_echo_n "checking for Perl privlibexp... " >&6; }
7263 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
7264 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
7265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
7266 $as_echo "$perl_privlibexp" >&6; }
7267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
7268 $as_echo_n "checking for Perl useshrplib... " >&6; }
7269 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
7270 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
7271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
7272 $as_echo "$perl_useshrplib" >&6; }
7273
7274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
7275 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
7276 if test "$PORTNAME" = "win32" ; then
7277 perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
7278 test -e "$perl_archlibexp/CORE/$perl_lib.lib" && perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
7279 else
7280 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
7281 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
7282 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
7283 fi
7284 if test -z "$perl_embed_ldflags" ; then
7285         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7286 $as_echo "no" >&6; }
7287         as_fn_error $? "could not determine flags for linking embedded Perl.
7288 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
7289 installed." "$LINENO" 5
7290 else
7291         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
7292 $as_echo "$perl_embed_ldflags" >&6; }
7293 fi
7294
7295 fi
7296
7297 if test "$with_python" = yes; then
7298   # Extract the first word of "python", so it can be a program name with args.
7299 set dummy python; ac_word=$2
7300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7301 $as_echo_n "checking for $ac_word... " >&6; }
7302 if ${ac_cv_path_PYTHON+:} false; then :
7303   $as_echo_n "(cached) " >&6
7304 else
7305   case $PYTHON in
7306   [\\/]* | ?:[\\/]*)
7307   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
7308   ;;
7309   *)
7310   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7311 for as_dir in $PATH
7312 do
7313   IFS=$as_save_IFS
7314   test -z "$as_dir" && as_dir=.
7315     for ac_exec_ext in '' $ac_executable_extensions; do
7316   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7317     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
7318     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7319     break 2
7320   fi
7321 done
7322   done
7323 IFS=$as_save_IFS
7324
7325   ;;
7326 esac
7327 fi
7328 PYTHON=$ac_cv_path_PYTHON
7329 if test -n "$PYTHON"; then
7330   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
7331 $as_echo "$PYTHON" >&6; }
7332 else
7333   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7334 $as_echo "no" >&6; }
7335 fi
7336
7337
7338 if test x"$PYTHON" = x""; then
7339   as_fn_error $? "Python not found" "$LINENO" 5
7340 fi
7341
7342
7343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python distutils module" >&5
7344 $as_echo_n "checking for Python distutils module... " >&6; }
7345 if "${PYTHON}" -c 'import distutils' 2>&5
7346 then
7347     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7348 $as_echo "yes" >&6; }
7349 else
7350     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7351 $as_echo "no" >&6; }
7352     as_fn_error $? "distutils module not found" "$LINENO" 5
7353 fi
7354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
7355 $as_echo_n "checking Python configuration directory... " >&6; }
7356 python_majorversion=`${PYTHON} -c "import sys; print(sys.version[0])"`
7357 python_version=`${PYTHON} -c "import sys; print(sys.version[:3])"`
7358 python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
7359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
7360 $as_echo "$python_configdir" >&6; }
7361
7362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directories" >&5
7363 $as_echo_n "checking Python include directories... " >&6; }
7364 python_includespec=`${PYTHON} -c "
7365 import distutils.sysconfig
7366 a = '-I' + distutils.sysconfig.get_python_inc(False)
7367 b = '-I' + distutils.sysconfig.get_python_inc(True)
7368 if a == b:
7369     print(a)
7370 else:
7371     print(a + ' ' + b)"`
7372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
7373 $as_echo "$python_includespec" >&6; }
7374
7375
7376
7377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
7378 $as_echo_n "checking how to link an embedded Python application... " >&6; }
7379
7380 python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
7381 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
7382 python_so=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('SO'))))"`
7383 ldlibrary=`echo "${python_ldlibrary}" | sed "s/${python_so}$//"`
7384 python_enable_shared=`${PYTHON} -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_vars().get('Py_ENABLE_SHARED',0))"`
7385
7386 if test x"${python_libdir}" != x"" -a x"${python_ldlibrary}" != x"" -a x"${python_ldlibrary}" != x"${ldlibrary}"
7387 then
7388         # New way: use the official shared library
7389         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
7390         python_libspec="-L${python_libdir} -l${ldlibrary}"
7391 else
7392         # Old way: use libpython from python_configdir
7393         python_libdir="${python_configdir}"
7394         # LDVERSION was introduced in Python 3.2.
7395         python_ldversion=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDVERSION'))))"`
7396         if test x"${python_ldversion}" = x""; then
7397                 python_ldversion=$python_version
7398         fi
7399         python_libspec="-L${python_libdir} -lpython${python_ldversion}"
7400 fi
7401
7402 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
7403
7404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
7405 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
7406
7407
7408 # threaded python is not supported on OpenBSD
7409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Python is compiled with thread support" >&5
7410 $as_echo_n "checking whether Python is compiled with thread support... " >&6; }
7411 pythreads=`${PYTHON} -c "import sys; print(int('thread' in sys.builtin_module_names))"`
7412 if test "$pythreads" = "1"; then
7413   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7414 $as_echo "yes" >&6; }
7415   case $host_os in
7416   openbsd*)
7417     as_fn_error $? "threaded Python not supported on this platform" "$LINENO" 5
7418     ;;
7419   esac
7420 else
7421   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7422 $as_echo "no" >&6; }
7423 fi
7424
7425
7426 fi
7427
7428 if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
7429   # Extract the first word of "zic", so it can be a program name with args.
7430 set dummy zic; ac_word=$2
7431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7432 $as_echo_n "checking for $ac_word... " >&6; }
7433 if ${ac_cv_path_ZIC+:} false; then :
7434   $as_echo_n "(cached) " >&6
7435 else
7436   case $ZIC in
7437   [\\/]* | ?:[\\/]*)
7438   ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
7439   ;;
7440   *)
7441   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7442 for as_dir in $PATH
7443 do
7444   IFS=$as_save_IFS
7445   test -z "$as_dir" && as_dir=.
7446     for ac_exec_ext in '' $ac_executable_extensions; do
7447   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7448     ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
7449     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7450     break 2
7451   fi
7452 done
7453   done
7454 IFS=$as_save_IFS
7455
7456   ;;
7457 esac
7458 fi
7459 ZIC=$ac_cv_path_ZIC
7460 if test -n "$ZIC"; then
7461   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
7462 $as_echo "$ZIC" >&6; }
7463 else
7464   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7465 $as_echo "no" >&6; }
7466 fi
7467
7468
7469   if test -z "$ZIC"; then
7470     as_fn_error $? "
7471 When cross-compiling, either use the option --with-system-tzdata to use
7472 existing time-zone data, or set the environment variable ZIC to a zic
7473 program to use during the build." "$LINENO" 5
7474   fi
7475 fi
7476
7477
7478 ##
7479 ## Libraries
7480 ##
7481 ## Most libraries are included only if they demonstrably provide a function
7482 ## we need, but libm is an exception: always include it, because there are
7483 ## too many compilers that play cute optimization games that will break
7484 ## probes for standard functions such as pow().
7485 ##
7486
7487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
7488 $as_echo_n "checking for main in -lm... " >&6; }
7489 if ${ac_cv_lib_m_main+:} false; then :
7490   $as_echo_n "(cached) " >&6
7491 else
7492   ac_check_lib_save_LIBS=$LIBS
7493 LIBS="-lm  $LIBS"
7494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7495 /* end confdefs.h.  */
7496
7497
7498 int
7499 main ()
7500 {
7501 return main ();
7502   ;
7503   return 0;
7504 }
7505 _ACEOF
7506 if ac_fn_c_try_link "$LINENO"; then :
7507   ac_cv_lib_m_main=yes
7508 else
7509   ac_cv_lib_m_main=no
7510 fi
7511 rm -f core conftest.err conftest.$ac_objext \
7512     conftest$ac_exeext conftest.$ac_ext
7513 LIBS=$ac_check_lib_save_LIBS
7514 fi
7515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
7516 $as_echo "$ac_cv_lib_m_main" >&6; }
7517 if test "x$ac_cv_lib_m_main" = xyes; then :
7518   cat >>confdefs.h <<_ACEOF
7519 #define HAVE_LIBM 1
7520 _ACEOF
7521
7522   LIBS="-lm $LIBS"
7523
7524 fi
7525
7526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
7527 $as_echo_n "checking for library containing setproctitle... " >&6; }
7528 if ${ac_cv_search_setproctitle+:} false; then :
7529   $as_echo_n "(cached) " >&6
7530 else
7531   ac_func_search_save_LIBS=$LIBS
7532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7533 /* end confdefs.h.  */
7534
7535 /* Override any GCC internal prototype to avoid an error.
7536    Use char because int might match the return type of a GCC
7537    builtin and then its argument prototype would still apply.  */
7538 #ifdef __cplusplus
7539 extern "C"
7540 #endif
7541 char setproctitle ();
7542 int
7543 main ()
7544 {
7545 return setproctitle ();
7546   ;
7547   return 0;
7548 }
7549 _ACEOF
7550 for ac_lib in '' util; do
7551   if test -z "$ac_lib"; then
7552     ac_res="none required"
7553   else
7554     ac_res=-l$ac_lib
7555     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7556   fi
7557   if ac_fn_c_try_link "$LINENO"; then :
7558   ac_cv_search_setproctitle=$ac_res
7559 fi
7560 rm -f core conftest.err conftest.$ac_objext \
7561     conftest$ac_exeext
7562   if ${ac_cv_search_setproctitle+:} false; then :
7563   break
7564 fi
7565 done
7566 if ${ac_cv_search_setproctitle+:} false; then :
7567
7568 else
7569   ac_cv_search_setproctitle=no
7570 fi
7571 rm conftest.$ac_ext
7572 LIBS=$ac_func_search_save_LIBS
7573 fi
7574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
7575 $as_echo "$ac_cv_search_setproctitle" >&6; }
7576 ac_res=$ac_cv_search_setproctitle
7577 if test "$ac_res" != no; then :
7578   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7579
7580 fi
7581
7582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
7583 $as_echo_n "checking for library containing dlopen... " >&6; }
7584 if ${ac_cv_search_dlopen+:} false; then :
7585   $as_echo_n "(cached) " >&6
7586 else
7587   ac_func_search_save_LIBS=$LIBS
7588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7589 /* end confdefs.h.  */
7590
7591 /* Override any GCC internal prototype to avoid an error.
7592    Use char because int might match the return type of a GCC
7593    builtin and then its argument prototype would still apply.  */
7594 #ifdef __cplusplus
7595 extern "C"
7596 #endif
7597 char dlopen ();
7598 int
7599 main ()
7600 {
7601 return dlopen ();
7602   ;
7603   return 0;
7604 }
7605 _ACEOF
7606 for ac_lib in '' dl; do
7607   if test -z "$ac_lib"; then
7608     ac_res="none required"
7609   else
7610     ac_res=-l$ac_lib
7611     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7612   fi
7613   if ac_fn_c_try_link "$LINENO"; then :
7614   ac_cv_search_dlopen=$ac_res
7615 fi
7616 rm -f core conftest.err conftest.$ac_objext \
7617     conftest$ac_exeext
7618   if ${ac_cv_search_dlopen+:} false; then :
7619   break
7620 fi
7621 done
7622 if ${ac_cv_search_dlopen+:} false; then :
7623
7624 else
7625   ac_cv_search_dlopen=no
7626 fi
7627 rm conftest.$ac_ext
7628 LIBS=$ac_func_search_save_LIBS
7629 fi
7630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
7631 $as_echo "$ac_cv_search_dlopen" >&6; }
7632 ac_res=$ac_cv_search_dlopen
7633 if test "$ac_res" != no; then :
7634   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7635
7636 fi
7637
7638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
7639 $as_echo_n "checking for library containing socket... " >&6; }
7640 if ${ac_cv_search_socket+:} false; then :
7641   $as_echo_n "(cached) " >&6
7642 else
7643   ac_func_search_save_LIBS=$LIBS
7644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7645 /* end confdefs.h.  */
7646
7647 /* Override any GCC internal prototype to avoid an error.
7648    Use char because int might match the return type of a GCC
7649    builtin and then its argument prototype would still apply.  */
7650 #ifdef __cplusplus
7651 extern "C"
7652 #endif
7653 char socket ();
7654 int
7655 main ()
7656 {
7657 return socket ();
7658   ;
7659   return 0;
7660 }
7661 _ACEOF
7662 for ac_lib in '' socket ws2_32; do
7663   if test -z "$ac_lib"; then
7664     ac_res="none required"
7665   else
7666     ac_res=-l$ac_lib
7667     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7668   fi
7669   if ac_fn_c_try_link "$LINENO"; then :
7670   ac_cv_search_socket=$ac_res
7671 fi
7672 rm -f core conftest.err conftest.$ac_objext \
7673     conftest$ac_exeext
7674   if ${ac_cv_search_socket+:} false; then :
7675   break
7676 fi
7677 done
7678 if ${ac_cv_search_socket+:} false; then :
7679
7680 else
7681   ac_cv_search_socket=no
7682 fi
7683 rm conftest.$ac_ext
7684 LIBS=$ac_func_search_save_LIBS
7685 fi
7686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
7687 $as_echo "$ac_cv_search_socket" >&6; }
7688 ac_res=$ac_cv_search_socket
7689 if test "$ac_res" != no; then :
7690   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7691
7692 fi
7693
7694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
7695 $as_echo_n "checking for library containing shl_load... " >&6; }
7696 if ${ac_cv_search_shl_load+:} false; then :
7697   $as_echo_n "(cached) " >&6
7698 else
7699   ac_func_search_save_LIBS=$LIBS
7700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7701 /* end confdefs.h.  */
7702
7703 /* Override any GCC internal prototype to avoid an error.
7704    Use char because int might match the return type of a GCC
7705    builtin and then its argument prototype would still apply.  */
7706 #ifdef __cplusplus
7707 extern "C"
7708 #endif
7709 char shl_load ();
7710 int
7711 main ()
7712 {
7713 return shl_load ();
7714   ;
7715   return 0;
7716 }
7717 _ACEOF
7718 for ac_lib in '' dld; do
7719   if test -z "$ac_lib"; then
7720     ac_res="none required"
7721   else
7722     ac_res=-l$ac_lib
7723     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7724   fi
7725   if ac_fn_c_try_link "$LINENO"; then :
7726   ac_cv_search_shl_load=$ac_res
7727 fi
7728 rm -f core conftest.err conftest.$ac_objext \
7729     conftest$ac_exeext
7730   if ${ac_cv_search_shl_load+:} false; then :
7731   break
7732 fi
7733 done
7734 if ${ac_cv_search_shl_load+:} false; then :
7735
7736 else
7737   ac_cv_search_shl_load=no
7738 fi
7739 rm conftest.$ac_ext
7740 LIBS=$ac_func_search_save_LIBS
7741 fi
7742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
7743 $as_echo "$ac_cv_search_shl_load" >&6; }
7744 ac_res=$ac_cv_search_shl_load
7745 if test "$ac_res" != no; then :
7746   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7747
7748 fi
7749
7750 # We only use libld in port/dynloader/aix.c
7751 case $host_os in
7752      aix*)
7753         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ldopen" >&5
7754 $as_echo_n "checking for library containing ldopen... " >&6; }
7755 if ${ac_cv_search_ldopen+:} false; then :
7756   $as_echo_n "(cached) " >&6
7757 else
7758   ac_func_search_save_LIBS=$LIBS
7759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7760 /* end confdefs.h.  */
7761
7762 /* Override any GCC internal prototype to avoid an error.
7763    Use char because int might match the return type of a GCC
7764    builtin and then its argument prototype would still apply.  */
7765 #ifdef __cplusplus
7766 extern "C"
7767 #endif
7768 char ldopen ();
7769 int
7770 main ()
7771 {
7772 return ldopen ();
7773   ;
7774   return 0;
7775 }
7776 _ACEOF
7777 for ac_lib in '' ld; do
7778   if test -z "$ac_lib"; then
7779     ac_res="none required"
7780   else
7781     ac_res=-l$ac_lib
7782     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7783   fi
7784   if ac_fn_c_try_link "$LINENO"; then :
7785   ac_cv_search_ldopen=$ac_res
7786 fi
7787 rm -f core conftest.err conftest.$ac_objext \
7788     conftest$ac_exeext
7789   if ${ac_cv_search_ldopen+:} false; then :
7790   break
7791 fi
7792 done
7793 if ${ac_cv_search_ldopen+:} false; then :
7794
7795 else
7796   ac_cv_search_ldopen=no
7797 fi
7798 rm conftest.$ac_ext
7799 LIBS=$ac_func_search_save_LIBS
7800 fi
7801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ldopen" >&5
7802 $as_echo "$ac_cv_search_ldopen" >&6; }
7803 ac_res=$ac_cv_search_ldopen
7804 if test "$ac_res" != no; then :
7805   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7806
7807 fi
7808
7809         ;;
7810 esac
7811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
7812 $as_echo_n "checking for library containing getopt_long... " >&6; }
7813 if ${ac_cv_search_getopt_long+:} false; then :
7814   $as_echo_n "(cached) " >&6
7815 else
7816   ac_func_search_save_LIBS=$LIBS
7817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7818 /* end confdefs.h.  */
7819
7820 /* Override any GCC internal prototype to avoid an error.
7821    Use char because int might match the return type of a GCC
7822    builtin and then its argument prototype would still apply.  */
7823 #ifdef __cplusplus
7824 extern "C"
7825 #endif
7826 char getopt_long ();
7827 int
7828 main ()
7829 {
7830 return getopt_long ();
7831   ;
7832   return 0;
7833 }
7834 _ACEOF
7835 for ac_lib in '' getopt gnugetopt; do
7836   if test -z "$ac_lib"; then
7837     ac_res="none required"
7838   else
7839     ac_res=-l$ac_lib
7840     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7841   fi
7842   if ac_fn_c_try_link "$LINENO"; then :
7843   ac_cv_search_getopt_long=$ac_res
7844 fi
7845 rm -f core conftest.err conftest.$ac_objext \
7846     conftest$ac_exeext
7847   if ${ac_cv_search_getopt_long+:} false; then :
7848   break
7849 fi
7850 done
7851 if ${ac_cv_search_getopt_long+:} false; then :
7852
7853 else
7854   ac_cv_search_getopt_long=no
7855 fi
7856 rm conftest.$ac_ext
7857 LIBS=$ac_func_search_save_LIBS
7858 fi
7859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
7860 $as_echo "$ac_cv_search_getopt_long" >&6; }
7861 ac_res=$ac_cv_search_getopt_long
7862 if test "$ac_res" != no; then :
7863   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7864
7865 fi
7866
7867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
7868 $as_echo_n "checking for library containing crypt... " >&6; }
7869 if ${ac_cv_search_crypt+:} false; then :
7870   $as_echo_n "(cached) " >&6
7871 else
7872   ac_func_search_save_LIBS=$LIBS
7873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7874 /* end confdefs.h.  */
7875
7876 /* Override any GCC internal prototype to avoid an error.
7877    Use char because int might match the return type of a GCC
7878    builtin and then its argument prototype would still apply.  */
7879 #ifdef __cplusplus
7880 extern "C"
7881 #endif
7882 char crypt ();
7883 int
7884 main ()
7885 {
7886 return crypt ();
7887   ;
7888   return 0;
7889 }
7890 _ACEOF
7891 for ac_lib in '' crypt; do
7892   if test -z "$ac_lib"; then
7893     ac_res="none required"
7894   else
7895     ac_res=-l$ac_lib
7896     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7897   fi
7898   if ac_fn_c_try_link "$LINENO"; then :
7899   ac_cv_search_crypt=$ac_res
7900 fi
7901 rm -f core conftest.err conftest.$ac_objext \
7902     conftest$ac_exeext
7903   if ${ac_cv_search_crypt+:} false; then :
7904   break
7905 fi
7906 done
7907 if ${ac_cv_search_crypt+:} false; then :
7908
7909 else
7910   ac_cv_search_crypt=no
7911 fi
7912 rm conftest.$ac_ext
7913 LIBS=$ac_func_search_save_LIBS
7914 fi
7915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
7916 $as_echo "$ac_cv_search_crypt" >&6; }
7917 ac_res=$ac_cv_search_crypt
7918 if test "$ac_res" != no; then :
7919   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7920
7921 fi
7922
7923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
7924 $as_echo_n "checking for library containing shm_open... " >&6; }
7925 if ${ac_cv_search_shm_open+:} false; then :
7926   $as_echo_n "(cached) " >&6
7927 else
7928   ac_func_search_save_LIBS=$LIBS
7929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7930 /* end confdefs.h.  */
7931
7932 /* Override any GCC internal prototype to avoid an error.
7933    Use char because int might match the return type of a GCC
7934    builtin and then its argument prototype would still apply.  */
7935 #ifdef __cplusplus
7936 extern "C"
7937 #endif
7938 char shm_open ();
7939 int
7940 main ()
7941 {
7942 return shm_open ();
7943   ;
7944   return 0;
7945 }
7946 _ACEOF
7947 for ac_lib in '' rt; do
7948   if test -z "$ac_lib"; then
7949     ac_res="none required"
7950   else
7951     ac_res=-l$ac_lib
7952     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7953   fi
7954   if ac_fn_c_try_link "$LINENO"; then :
7955   ac_cv_search_shm_open=$ac_res
7956 fi
7957 rm -f core conftest.err conftest.$ac_objext \
7958     conftest$ac_exeext
7959   if ${ac_cv_search_shm_open+:} false; then :
7960   break
7961 fi
7962 done
7963 if ${ac_cv_search_shm_open+:} false; then :
7964
7965 else
7966   ac_cv_search_shm_open=no
7967 fi
7968 rm conftest.$ac_ext
7969 LIBS=$ac_func_search_save_LIBS
7970 fi
7971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
7972 $as_echo "$ac_cv_search_shm_open" >&6; }
7973 ac_res=$ac_cv_search_shm_open
7974 if test "$ac_res" != no; then :
7975   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7976
7977 fi
7978
7979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
7980 $as_echo_n "checking for library containing shm_unlink... " >&6; }
7981 if ${ac_cv_search_shm_unlink+:} false; then :
7982   $as_echo_n "(cached) " >&6
7983 else
7984   ac_func_search_save_LIBS=$LIBS
7985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7986 /* end confdefs.h.  */
7987
7988 /* Override any GCC internal prototype to avoid an error.
7989    Use char because int might match the return type of a GCC
7990    builtin and then its argument prototype would still apply.  */
7991 #ifdef __cplusplus
7992 extern "C"
7993 #endif
7994 char shm_unlink ();
7995 int
7996 main ()
7997 {
7998 return shm_unlink ();
7999   ;
8000   return 0;
8001 }
8002 _ACEOF
8003 for ac_lib in '' rt; do
8004   if test -z "$ac_lib"; then
8005     ac_res="none required"
8006   else
8007     ac_res=-l$ac_lib
8008     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8009   fi
8010   if ac_fn_c_try_link "$LINENO"; then :
8011   ac_cv_search_shm_unlink=$ac_res
8012 fi
8013 rm -f core conftest.err conftest.$ac_objext \
8014     conftest$ac_exeext
8015   if ${ac_cv_search_shm_unlink+:} false; then :
8016   break
8017 fi
8018 done
8019 if ${ac_cv_search_shm_unlink+:} false; then :
8020
8021 else
8022   ac_cv_search_shm_unlink=no
8023 fi
8024 rm conftest.$ac_ext
8025 LIBS=$ac_func_search_save_LIBS
8026 fi
8027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
8028 $as_echo "$ac_cv_search_shm_unlink" >&6; }
8029 ac_res=$ac_cv_search_shm_unlink
8030 if test "$ac_res" != no; then :
8031   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8032
8033 fi
8034
8035 # Solaris:
8036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
8037 $as_echo_n "checking for library containing fdatasync... " >&6; }
8038 if ${ac_cv_search_fdatasync+:} false; then :
8039   $as_echo_n "(cached) " >&6
8040 else
8041   ac_func_search_save_LIBS=$LIBS
8042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8043 /* end confdefs.h.  */
8044
8045 /* Override any GCC internal prototype to avoid an error.
8046    Use char because int might match the return type of a GCC
8047    builtin and then its argument prototype would still apply.  */
8048 #ifdef __cplusplus
8049 extern "C"
8050 #endif
8051 char fdatasync ();
8052 int
8053 main ()
8054 {
8055 return fdatasync ();
8056   ;
8057   return 0;
8058 }
8059 _ACEOF
8060 for ac_lib in '' rt posix4; do
8061   if test -z "$ac_lib"; then
8062     ac_res="none required"
8063   else
8064     ac_res=-l$ac_lib
8065     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8066   fi
8067   if ac_fn_c_try_link "$LINENO"; then :
8068   ac_cv_search_fdatasync=$ac_res
8069 fi
8070 rm -f core conftest.err conftest.$ac_objext \
8071     conftest$ac_exeext
8072   if ${ac_cv_search_fdatasync+:} false; then :
8073   break
8074 fi
8075 done
8076 if ${ac_cv_search_fdatasync+:} false; then :
8077
8078 else
8079   ac_cv_search_fdatasync=no
8080 fi
8081 rm conftest.$ac_ext
8082 LIBS=$ac_func_search_save_LIBS
8083 fi
8084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
8085 $as_echo "$ac_cv_search_fdatasync" >&6; }
8086 ac_res=$ac_cv_search_fdatasync
8087 if test "$ac_res" != no; then :
8088   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8089
8090 fi
8091
8092 # Required for thread_test.c on Solaris 2.5:
8093 # Other ports use it too (HP-UX) so test unconditionally
8094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
8095 $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
8096 if ${ac_cv_search_gethostbyname_r+:} false; then :
8097   $as_echo_n "(cached) " >&6
8098 else
8099   ac_func_search_save_LIBS=$LIBS
8100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8101 /* end confdefs.h.  */
8102
8103 /* Override any GCC internal prototype to avoid an error.
8104    Use char because int might match the return type of a GCC
8105    builtin and then its argument prototype would still apply.  */
8106 #ifdef __cplusplus
8107 extern "C"
8108 #endif
8109 char gethostbyname_r ();
8110 int
8111 main ()
8112 {
8113 return gethostbyname_r ();
8114   ;
8115   return 0;
8116 }
8117 _ACEOF
8118 for ac_lib in '' nsl; do
8119   if test -z "$ac_lib"; then
8120     ac_res="none required"
8121   else
8122     ac_res=-l$ac_lib
8123     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8124   fi
8125   if ac_fn_c_try_link "$LINENO"; then :
8126   ac_cv_search_gethostbyname_r=$ac_res
8127 fi
8128 rm -f core conftest.err conftest.$ac_objext \
8129     conftest$ac_exeext
8130   if ${ac_cv_search_gethostbyname_r+:} false; then :
8131   break
8132 fi
8133 done
8134 if ${ac_cv_search_gethostbyname_r+:} false; then :
8135
8136 else
8137   ac_cv_search_gethostbyname_r=no
8138 fi
8139 rm conftest.$ac_ext
8140 LIBS=$ac_func_search_save_LIBS
8141 fi
8142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
8143 $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
8144 ac_res=$ac_cv_search_gethostbyname_r
8145 if test "$ac_res" != no; then :
8146   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8147
8148 fi
8149
8150 # Cygwin:
8151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
8152 $as_echo_n "checking for library containing shmget... " >&6; }
8153 if ${ac_cv_search_shmget+:} false; then :
8154   $as_echo_n "(cached) " >&6
8155 else
8156   ac_func_search_save_LIBS=$LIBS
8157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8158 /* end confdefs.h.  */
8159
8160 /* Override any GCC internal prototype to avoid an error.
8161    Use char because int might match the return type of a GCC
8162    builtin and then its argument prototype would still apply.  */
8163 #ifdef __cplusplus
8164 extern "C"
8165 #endif
8166 char shmget ();
8167 int
8168 main ()
8169 {
8170 return shmget ();
8171   ;
8172   return 0;
8173 }
8174 _ACEOF
8175 for ac_lib in '' cygipc; do
8176   if test -z "$ac_lib"; then
8177     ac_res="none required"
8178   else
8179     ac_res=-l$ac_lib
8180     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8181   fi
8182   if ac_fn_c_try_link "$LINENO"; then :
8183   ac_cv_search_shmget=$ac_res
8184 fi
8185 rm -f core conftest.err conftest.$ac_objext \
8186     conftest$ac_exeext
8187   if ${ac_cv_search_shmget+:} false; then :
8188   break
8189 fi
8190 done
8191 if ${ac_cv_search_shmget+:} false; then :
8192
8193 else
8194   ac_cv_search_shmget=no
8195 fi
8196 rm conftest.$ac_ext
8197 LIBS=$ac_func_search_save_LIBS
8198 fi
8199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
8200 $as_echo "$ac_cv_search_shmget" >&6; }
8201 ac_res=$ac_cv_search_shmget
8202 if test "$ac_res" != no; then :
8203   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8204
8205 fi
8206
8207
8208 if test "$with_readline" = yes; then
8209
8210
8211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
8212 $as_echo_n "checking for library containing readline... " >&6; }
8213 if ${pgac_cv_check_readline+:} false; then :
8214   $as_echo_n "(cached) " >&6
8215 else
8216   pgac_cv_check_readline=no
8217 pgac_save_LIBS=$LIBS
8218 if test x"$with_libedit_preferred" != x"yes"
8219 then    READLINE_ORDER="-lreadline -ledit"
8220 else    READLINE_ORDER="-ledit -lreadline"
8221 fi
8222 for pgac_rllib in $READLINE_ORDER ; do
8223   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
8224     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
8225     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8226 /* end confdefs.h.  */
8227
8228 /* Override any GCC internal prototype to avoid an error.
8229    Use char because int might match the return type of a GCC
8230    builtin and then its argument prototype would still apply.  */
8231 #ifdef __cplusplus
8232 extern "C"
8233 #endif
8234 char readline ();
8235 int
8236 main ()
8237 {
8238 return readline ();
8239   ;
8240   return 0;
8241 }
8242 _ACEOF
8243 if ac_fn_c_try_link "$LINENO"; then :
8244
8245       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
8246       # recognize dependent libraries; assume curses is needed if we didn't
8247       # find any dependency.
8248       case $host_os in
8249         netbsd* | openbsd* | irix*)
8250           if test x"$pgac_lib" = x"" ; then
8251             pgac_lib=" -lcurses"
8252           fi ;;
8253       esac
8254
8255       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
8256       break
8257
8258 fi
8259 rm -f core conftest.err conftest.$ac_objext \
8260     conftest$ac_exeext conftest.$ac_ext
8261   done
8262   if test "$pgac_cv_check_readline" != no ; then
8263     break
8264   fi
8265 done
8266 LIBS=$pgac_save_LIBS
8267
8268 fi
8269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
8270 $as_echo "$pgac_cv_check_readline" >&6; }
8271 if test "$pgac_cv_check_readline" != no ; then
8272   LIBS="$pgac_cv_check_readline $LIBS"
8273
8274 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
8275
8276 fi
8277
8278
8279   if test x"$pgac_cv_check_readline" = x"no"; then
8280     as_fn_error $? "readline library not found
8281 If you have readline already installed, see config.log for details on the
8282 failure.  It is possible the compiler isn't looking in the proper directory.
8283 Use --without-readline to disable readline support." "$LINENO" 5
8284   fi
8285 fi
8286
8287 if test "$with_zlib" = yes; then
8288   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
8289 $as_echo_n "checking for inflate in -lz... " >&6; }
8290 if ${ac_cv_lib_z_inflate+:} false; then :
8291   $as_echo_n "(cached) " >&6
8292 else
8293   ac_check_lib_save_LIBS=$LIBS
8294 LIBS="-lz  $LIBS"
8295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8296 /* end confdefs.h.  */
8297
8298 /* Override any GCC internal prototype to avoid an error.
8299    Use char because int might match the return type of a GCC
8300    builtin and then its argument prototype would still apply.  */
8301 #ifdef __cplusplus
8302 extern "C"
8303 #endif
8304 char inflate ();
8305 int
8306 main ()
8307 {
8308 return inflate ();
8309   ;
8310   return 0;
8311 }
8312 _ACEOF
8313 if ac_fn_c_try_link "$LINENO"; then :
8314   ac_cv_lib_z_inflate=yes
8315 else
8316   ac_cv_lib_z_inflate=no
8317 fi
8318 rm -f core conftest.err conftest.$ac_objext \
8319     conftest$ac_exeext conftest.$ac_ext
8320 LIBS=$ac_check_lib_save_LIBS
8321 fi
8322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
8323 $as_echo "$ac_cv_lib_z_inflate" >&6; }
8324 if test "x$ac_cv_lib_z_inflate" = xyes; then :
8325   cat >>confdefs.h <<_ACEOF
8326 #define HAVE_LIBZ 1
8327 _ACEOF
8328
8329   LIBS="-lz $LIBS"
8330
8331 else
8332   as_fn_error $? "zlib library not found
8333 If you have zlib already installed, see config.log for details on the
8334 failure.  It is possible the compiler isn't looking in the proper directory.
8335 Use --without-zlib to disable zlib support." "$LINENO" 5
8336 fi
8337
8338 fi
8339
8340 if test "$enable_spinlocks" = yes; then
8341
8342 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
8343
8344 else
8345   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
8346 *** Not using spinlocks will cause poor performance." >&5
8347 $as_echo "$as_me: WARNING:
8348 *** Not using spinlocks will cause poor performance." >&2;}
8349 fi
8350
8351 if test "$with_gssapi" = yes ; then
8352   if test "$PORTNAME" != "win32"; then
8353     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
8354 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
8355 if ${ac_cv_search_gss_init_sec_context+:} false; then :
8356   $as_echo_n "(cached) " >&6
8357 else
8358   ac_func_search_save_LIBS=$LIBS
8359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8360 /* end confdefs.h.  */
8361
8362 /* Override any GCC internal prototype to avoid an error.
8363    Use char because int might match the return type of a GCC
8364    builtin and then its argument prototype would still apply.  */
8365 #ifdef __cplusplus
8366 extern "C"
8367 #endif
8368 char gss_init_sec_context ();
8369 int
8370 main ()
8371 {
8372 return gss_init_sec_context ();
8373   ;
8374   return 0;
8375 }
8376 _ACEOF
8377 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
8378   if test -z "$ac_lib"; then
8379     ac_res="none required"
8380   else
8381     ac_res=-l$ac_lib
8382     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8383   fi
8384   if ac_fn_c_try_link "$LINENO"; then :
8385   ac_cv_search_gss_init_sec_context=$ac_res
8386 fi
8387 rm -f core conftest.err conftest.$ac_objext \
8388     conftest$ac_exeext
8389   if ${ac_cv_search_gss_init_sec_context+:} false; then :
8390   break
8391 fi
8392 done
8393 if ${ac_cv_search_gss_init_sec_context+:} false; then :
8394
8395 else
8396   ac_cv_search_gss_init_sec_context=no
8397 fi
8398 rm conftest.$ac_ext
8399 LIBS=$ac_func_search_save_LIBS
8400 fi
8401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
8402 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
8403 ac_res=$ac_cv_search_gss_init_sec_context
8404 if test "$ac_res" != no; then :
8405   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8406
8407 else
8408   as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
8409 fi
8410
8411   else
8412     LIBS="$LIBS -lgssapi32"
8413   fi
8414 fi
8415
8416 if test "$with_openssl" = yes ; then
8417     if test "$PORTNAME" != "win32"; then
8418      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
8419 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
8420 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
8421   $as_echo_n "(cached) " >&6
8422 else
8423   ac_check_lib_save_LIBS=$LIBS
8424 LIBS="-lcrypto  $LIBS"
8425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8426 /* end confdefs.h.  */
8427
8428 /* Override any GCC internal prototype to avoid an error.
8429    Use char because int might match the return type of a GCC
8430    builtin and then its argument prototype would still apply.  */
8431 #ifdef __cplusplus
8432 extern "C"
8433 #endif
8434 char CRYPTO_new_ex_data ();
8435 int
8436 main ()
8437 {
8438 return CRYPTO_new_ex_data ();
8439   ;
8440   return 0;
8441 }
8442 _ACEOF
8443 if ac_fn_c_try_link "$LINENO"; then :
8444   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
8445 else
8446   ac_cv_lib_crypto_CRYPTO_new_ex_data=no
8447 fi
8448 rm -f core conftest.err conftest.$ac_objext \
8449     conftest$ac_exeext conftest.$ac_ext
8450 LIBS=$ac_check_lib_save_LIBS
8451 fi
8452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
8453 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
8454 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
8455   cat >>confdefs.h <<_ACEOF
8456 #define HAVE_LIBCRYPTO 1
8457 _ACEOF
8458
8459   LIBS="-lcrypto $LIBS"
8460
8461 else
8462   as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
8463 fi
8464
8465      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5
8466 $as_echo_n "checking for SSL_library_init in -lssl... " >&6; }
8467 if ${ac_cv_lib_ssl_SSL_library_init+:} false; then :
8468   $as_echo_n "(cached) " >&6
8469 else
8470   ac_check_lib_save_LIBS=$LIBS
8471 LIBS="-lssl  $LIBS"
8472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8473 /* end confdefs.h.  */
8474
8475 /* Override any GCC internal prototype to avoid an error.
8476    Use char because int might match the return type of a GCC
8477    builtin and then its argument prototype would still apply.  */
8478 #ifdef __cplusplus
8479 extern "C"
8480 #endif
8481 char SSL_library_init ();
8482 int
8483 main ()
8484 {
8485 return SSL_library_init ();
8486   ;
8487   return 0;
8488 }
8489 _ACEOF
8490 if ac_fn_c_try_link "$LINENO"; then :
8491   ac_cv_lib_ssl_SSL_library_init=yes
8492 else
8493   ac_cv_lib_ssl_SSL_library_init=no
8494 fi
8495 rm -f core conftest.err conftest.$ac_objext \
8496     conftest$ac_exeext conftest.$ac_ext
8497 LIBS=$ac_check_lib_save_LIBS
8498 fi
8499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_library_init" >&5
8500 $as_echo "$ac_cv_lib_ssl_SSL_library_init" >&6; }
8501 if test "x$ac_cv_lib_ssl_SSL_library_init" = xyes; then :
8502   cat >>confdefs.h <<_ACEOF
8503 #define HAVE_LIBSSL 1
8504 _ACEOF
8505
8506   LIBS="-lssl $LIBS"
8507
8508 else
8509   as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
8510 fi
8511
8512   else
8513      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
8514 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
8515 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
8516   $as_echo_n "(cached) " >&6
8517 else
8518   ac_func_search_save_LIBS=$LIBS
8519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8520 /* end confdefs.h.  */
8521
8522 /* Override any GCC internal prototype to avoid an error.
8523    Use char because int might match the return type of a GCC
8524    builtin and then its argument prototype would still apply.  */
8525 #ifdef __cplusplus
8526 extern "C"
8527 #endif
8528 char CRYPTO_new_ex_data ();
8529 int
8530 main ()
8531 {
8532 return CRYPTO_new_ex_data ();
8533   ;
8534   return 0;
8535 }
8536 _ACEOF
8537 for ac_lib in '' eay32 crypto; do
8538   if test -z "$ac_lib"; then
8539     ac_res="none required"
8540   else
8541     ac_res=-l$ac_lib
8542     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8543   fi
8544   if ac_fn_c_try_link "$LINENO"; then :
8545   ac_cv_search_CRYPTO_new_ex_data=$ac_res
8546 fi
8547 rm -f core conftest.err conftest.$ac_objext \
8548     conftest$ac_exeext
8549   if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
8550   break
8551 fi
8552 done
8553 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
8554
8555 else
8556   ac_cv_search_CRYPTO_new_ex_data=no
8557 fi
8558 rm conftest.$ac_ext
8559 LIBS=$ac_func_search_save_LIBS
8560 fi
8561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
8562 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
8563 ac_res=$ac_cv_search_CRYPTO_new_ex_data
8564 if test "$ac_res" != no; then :
8565   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8566
8567 else
8568   as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
8569 fi
8570
8571      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_library_init" >&5
8572 $as_echo_n "checking for library containing SSL_library_init... " >&6; }
8573 if ${ac_cv_search_SSL_library_init+:} false; then :
8574   $as_echo_n "(cached) " >&6
8575 else
8576   ac_func_search_save_LIBS=$LIBS
8577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8578 /* end confdefs.h.  */
8579
8580 /* Override any GCC internal prototype to avoid an error.
8581    Use char because int might match the return type of a GCC
8582    builtin and then its argument prototype would still apply.  */
8583 #ifdef __cplusplus
8584 extern "C"
8585 #endif
8586 char SSL_library_init ();
8587 int
8588 main ()
8589 {
8590 return SSL_library_init ();
8591   ;
8592   return 0;
8593 }
8594 _ACEOF
8595 for ac_lib in '' ssleay32 ssl; do
8596   if test -z "$ac_lib"; then
8597     ac_res="none required"
8598   else
8599     ac_res=-l$ac_lib
8600     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8601   fi
8602   if ac_fn_c_try_link "$LINENO"; then :
8603   ac_cv_search_SSL_library_init=$ac_res
8604 fi
8605 rm -f core conftest.err conftest.$ac_objext \
8606     conftest$ac_exeext
8607   if ${ac_cv_search_SSL_library_init+:} false; then :
8608   break
8609 fi
8610 done
8611 if ${ac_cv_search_SSL_library_init+:} false; then :
8612
8613 else
8614   ac_cv_search_SSL_library_init=no
8615 fi
8616 rm conftest.$ac_ext
8617 LIBS=$ac_func_search_save_LIBS
8618 fi
8619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_library_init" >&5
8620 $as_echo "$ac_cv_search_SSL_library_init" >&6; }
8621 ac_res=$ac_cv_search_SSL_library_init
8622 if test "$ac_res" != no; then :
8623   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8624
8625 else
8626   as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
8627 fi
8628
8629   fi
8630   for ac_func in SSL_get_current_compression
8631 do :
8632   ac_fn_c_check_func "$LINENO" "SSL_get_current_compression" "ac_cv_func_SSL_get_current_compression"
8633 if test "x$ac_cv_func_SSL_get_current_compression" = xyes; then :
8634   cat >>confdefs.h <<_ACEOF
8635 #define HAVE_SSL_GET_CURRENT_COMPRESSION 1
8636 _ACEOF
8637
8638 fi
8639 done
8640
8641 fi
8642
8643 if test "$with_pam" = yes ; then
8644   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
8645 $as_echo_n "checking for pam_start in -lpam... " >&6; }
8646 if ${ac_cv_lib_pam_pam_start+:} false; then :
8647   $as_echo_n "(cached) " >&6
8648 else
8649   ac_check_lib_save_LIBS=$LIBS
8650 LIBS="-lpam  $LIBS"
8651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8652 /* end confdefs.h.  */
8653
8654 /* Override any GCC internal prototype to avoid an error.
8655    Use char because int might match the return type of a GCC
8656    builtin and then its argument prototype would still apply.  */
8657 #ifdef __cplusplus
8658 extern "C"
8659 #endif
8660 char pam_start ();
8661 int
8662 main ()
8663 {
8664 return pam_start ();
8665   ;
8666   return 0;
8667 }
8668 _ACEOF
8669 if ac_fn_c_try_link "$LINENO"; then :
8670   ac_cv_lib_pam_pam_start=yes
8671 else
8672   ac_cv_lib_pam_pam_start=no
8673 fi
8674 rm -f core conftest.err conftest.$ac_objext \
8675     conftest$ac_exeext conftest.$ac_ext
8676 LIBS=$ac_check_lib_save_LIBS
8677 fi
8678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
8679 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
8680 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
8681   cat >>confdefs.h <<_ACEOF
8682 #define HAVE_LIBPAM 1
8683 _ACEOF
8684
8685   LIBS="-lpam $LIBS"
8686
8687 else
8688   as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
8689 fi
8690
8691 fi
8692
8693 if test "$with_libxml" = yes ; then
8694   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
8695 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
8696 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
8697   $as_echo_n "(cached) " >&6
8698 else
8699   ac_check_lib_save_LIBS=$LIBS
8700 LIBS="-lxml2  $LIBS"
8701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8702 /* end confdefs.h.  */
8703
8704 /* Override any GCC internal prototype to avoid an error.
8705    Use char because int might match the return type of a GCC
8706    builtin and then its argument prototype would still apply.  */
8707 #ifdef __cplusplus
8708 extern "C"
8709 #endif
8710 char xmlSaveToBuffer ();
8711 int
8712 main ()
8713 {
8714 return xmlSaveToBuffer ();
8715   ;
8716   return 0;
8717 }
8718 _ACEOF
8719 if ac_fn_c_try_link "$LINENO"; then :
8720   ac_cv_lib_xml2_xmlSaveToBuffer=yes
8721 else
8722   ac_cv_lib_xml2_xmlSaveToBuffer=no
8723 fi
8724 rm -f core conftest.err conftest.$ac_objext \
8725     conftest$ac_exeext conftest.$ac_ext
8726 LIBS=$ac_check_lib_save_LIBS
8727 fi
8728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
8729 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
8730 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
8731   cat >>confdefs.h <<_ACEOF
8732 #define HAVE_LIBXML2 1
8733 _ACEOF
8734
8735   LIBS="-lxml2 $LIBS"
8736
8737 else
8738   as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
8739 fi
8740
8741 fi
8742
8743 if test "$with_libxslt" = yes ; then
8744   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
8745 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
8746 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
8747   $as_echo_n "(cached) " >&6
8748 else
8749   ac_check_lib_save_LIBS=$LIBS
8750 LIBS="-lxslt  $LIBS"
8751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8752 /* end confdefs.h.  */
8753
8754 /* Override any GCC internal prototype to avoid an error.
8755    Use char because int might match the return type of a GCC
8756    builtin and then its argument prototype would still apply.  */
8757 #ifdef __cplusplus
8758 extern "C"
8759 #endif
8760 char xsltCleanupGlobals ();
8761 int
8762 main ()
8763 {
8764 return xsltCleanupGlobals ();
8765   ;
8766   return 0;
8767 }
8768 _ACEOF
8769 if ac_fn_c_try_link "$LINENO"; then :
8770   ac_cv_lib_xslt_xsltCleanupGlobals=yes
8771 else
8772   ac_cv_lib_xslt_xsltCleanupGlobals=no
8773 fi
8774 rm -f core conftest.err conftest.$ac_objext \
8775     conftest$ac_exeext conftest.$ac_ext
8776 LIBS=$ac_check_lib_save_LIBS
8777 fi
8778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
8779 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
8780 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
8781   cat >>confdefs.h <<_ACEOF
8782 #define HAVE_LIBXSLT 1
8783 _ACEOF
8784
8785   LIBS="-lxslt $LIBS"
8786
8787 else
8788   as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
8789 fi
8790
8791 fi
8792
8793 # for contrib/sepgsql
8794 if test "$with_selinux" = yes; then
8795   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
8796 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
8797 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
8798   $as_echo_n "(cached) " >&6
8799 else
8800   ac_check_lib_save_LIBS=$LIBS
8801 LIBS="-lselinux  $LIBS"
8802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8803 /* end confdefs.h.  */
8804
8805 /* Override any GCC internal prototype to avoid an error.
8806    Use char because int might match the return type of a GCC
8807    builtin and then its argument prototype would still apply.  */
8808 #ifdef __cplusplus
8809 extern "C"
8810 #endif
8811 char security_compute_create_name ();
8812 int
8813 main ()
8814 {
8815 return security_compute_create_name ();
8816   ;
8817   return 0;
8818 }
8819 _ACEOF
8820 if ac_fn_c_try_link "$LINENO"; then :
8821   ac_cv_lib_selinux_security_compute_create_name=yes
8822 else
8823   ac_cv_lib_selinux_security_compute_create_name=no
8824 fi
8825 rm -f core conftest.err conftest.$ac_objext \
8826     conftest$ac_exeext conftest.$ac_ext
8827 LIBS=$ac_check_lib_save_LIBS
8828 fi
8829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
8830 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
8831 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
8832   cat >>confdefs.h <<_ACEOF
8833 #define HAVE_LIBSELINUX 1
8834 _ACEOF
8835
8836   LIBS="-lselinux $LIBS"
8837
8838 else
8839   as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
8840 fi
8841
8842 fi
8843
8844 # for contrib/uuid-ossp
8845 if test "$with_uuid" = bsd ; then
8846   # On BSD, the UUID functions are in libc
8847   ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
8848 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
8849   UUID_LIBS=""
8850 else
8851   as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
8852 fi
8853
8854 elif test "$with_uuid" = e2fs ; then
8855   # On OS X, the UUID functions are in libc
8856   ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
8857 if test "x$ac_cv_func_uuid_generate" = xyes; then :
8858   UUID_LIBS=""
8859 else
8860   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
8861 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
8862 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
8863   $as_echo_n "(cached) " >&6
8864 else
8865   ac_check_lib_save_LIBS=$LIBS
8866 LIBS="-luuid  $LIBS"
8867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8868 /* end confdefs.h.  */
8869
8870 /* Override any GCC internal prototype to avoid an error.
8871    Use char because int might match the return type of a GCC
8872    builtin and then its argument prototype would still apply.  */
8873 #ifdef __cplusplus
8874 extern "C"
8875 #endif
8876 char uuid_generate ();
8877 int
8878 main ()
8879 {
8880 return uuid_generate ();
8881   ;
8882   return 0;
8883 }
8884 _ACEOF
8885 if ac_fn_c_try_link "$LINENO"; then :
8886   ac_cv_lib_uuid_uuid_generate=yes
8887 else
8888   ac_cv_lib_uuid_uuid_generate=no
8889 fi
8890 rm -f core conftest.err conftest.$ac_objext \
8891     conftest$ac_exeext conftest.$ac_ext
8892 LIBS=$ac_check_lib_save_LIBS
8893 fi
8894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
8895 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
8896 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
8897   UUID_LIBS="-luuid"
8898 else
8899   as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
8900 fi
8901
8902 fi
8903
8904 elif test "$with_uuid" = ossp ; then
8905   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
8906 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
8907 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
8908   $as_echo_n "(cached) " >&6
8909 else
8910   ac_check_lib_save_LIBS=$LIBS
8911 LIBS="-lossp-uuid  $LIBS"
8912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8913 /* end confdefs.h.  */
8914
8915 /* Override any GCC internal prototype to avoid an error.
8916    Use char because int might match the return type of a GCC
8917    builtin and then its argument prototype would still apply.  */
8918 #ifdef __cplusplus
8919 extern "C"
8920 #endif
8921 char uuid_export ();
8922 int
8923 main ()
8924 {
8925 return uuid_export ();
8926   ;
8927   return 0;
8928 }
8929 _ACEOF
8930 if ac_fn_c_try_link "$LINENO"; then :
8931   ac_cv_lib_ossp_uuid_uuid_export=yes
8932 else
8933   ac_cv_lib_ossp_uuid_uuid_export=no
8934 fi
8935 rm -f core conftest.err conftest.$ac_objext \
8936     conftest$ac_exeext conftest.$ac_ext
8937 LIBS=$ac_check_lib_save_LIBS
8938 fi
8939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
8940 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
8941 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
8942   UUID_LIBS="-lossp-uuid"
8943 else
8944   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
8945 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
8946 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
8947   $as_echo_n "(cached) " >&6
8948 else
8949   ac_check_lib_save_LIBS=$LIBS
8950 LIBS="-luuid  $LIBS"
8951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8952 /* end confdefs.h.  */
8953
8954 /* Override any GCC internal prototype to avoid an error.
8955    Use char because int might match the return type of a GCC
8956    builtin and then its argument prototype would still apply.  */
8957 #ifdef __cplusplus
8958 extern "C"
8959 #endif
8960 char uuid_export ();
8961 int
8962 main ()
8963 {
8964 return uuid_export ();
8965   ;
8966   return 0;
8967 }
8968 _ACEOF
8969 if ac_fn_c_try_link "$LINENO"; then :
8970   ac_cv_lib_uuid_uuid_export=yes
8971 else
8972   ac_cv_lib_uuid_uuid_export=no
8973 fi
8974 rm -f core conftest.err conftest.$ac_objext \
8975     conftest$ac_exeext conftest.$ac_ext
8976 LIBS=$ac_check_lib_save_LIBS
8977 fi
8978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
8979 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
8980 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
8981   UUID_LIBS="-luuid"
8982 else
8983   as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
8984 fi
8985
8986 fi
8987
8988 fi
8989
8990
8991
8992 ##
8993 ## Header files
8994 ##
8995
8996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
8997 $as_echo_n "checking for ANSI C header files... " >&6; }
8998 if ${ac_cv_header_stdc+:} false; then :
8999   $as_echo_n "(cached) " >&6
9000 else
9001   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9002 /* end confdefs.h.  */
9003 #include <stdlib.h>
9004 #include <stdarg.h>
9005 #include <string.h>
9006 #include <float.h>
9007
9008 int
9009 main ()
9010 {
9011
9012   ;
9013   return 0;
9014 }
9015 _ACEOF
9016 if ac_fn_c_try_compile "$LINENO"; then :
9017   ac_cv_header_stdc=yes
9018 else
9019   ac_cv_header_stdc=no
9020 fi
9021 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9022
9023 if test $ac_cv_header_stdc = yes; then
9024   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9025   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9026 /* end confdefs.h.  */
9027 #include <string.h>
9028
9029 _ACEOF
9030 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9031   $EGREP "memchr" >/dev/null 2>&1; then :
9032
9033 else
9034   ac_cv_header_stdc=no
9035 fi
9036 rm -f conftest*
9037
9038 fi
9039
9040 if test $ac_cv_header_stdc = yes; then
9041   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9042   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9043 /* end confdefs.h.  */
9044 #include <stdlib.h>
9045
9046 _ACEOF
9047 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9048   $EGREP "free" >/dev/null 2>&1; then :
9049
9050 else
9051   ac_cv_header_stdc=no
9052 fi
9053 rm -f conftest*
9054
9055 fi
9056
9057 if test $ac_cv_header_stdc = yes; then
9058   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9059   if test "$cross_compiling" = yes; then :
9060   :
9061 else
9062   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9063 /* end confdefs.h.  */
9064 #include <ctype.h>
9065 #include <stdlib.h>
9066 #if ((' ' & 0x0FF) == 0x020)
9067 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9068 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9069 #else
9070 # define ISLOWER(c) \
9071                    (('a' <= (c) && (c) <= 'i') \
9072                      || ('j' <= (c) && (c) <= 'r') \
9073                      || ('s' <= (c) && (c) <= 'z'))
9074 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9075 #endif
9076
9077 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9078 int
9079 main ()
9080 {
9081   int i;
9082   for (i = 0; i < 256; i++)
9083     if (XOR (islower (i), ISLOWER (i))
9084         || toupper (i) != TOUPPER (i))
9085       return 2;
9086   return 0;
9087 }
9088 _ACEOF
9089 if ac_fn_c_try_run "$LINENO"; then :
9090
9091 else
9092   ac_cv_header_stdc=no
9093 fi
9094 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9095   conftest.$ac_objext conftest.beam conftest.$ac_ext
9096 fi
9097
9098 fi
9099 fi
9100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
9101 $as_echo "$ac_cv_header_stdc" >&6; }
9102 if test $ac_cv_header_stdc = yes; then
9103
9104 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
9105
9106 fi
9107
9108 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
9109 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
9110                   inttypes.h stdint.h unistd.h
9111 do :
9112   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9113 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
9114 "
9115 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9116   cat >>confdefs.h <<_ACEOF
9117 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9118 _ACEOF
9119
9120 fi
9121
9122 done
9123
9124
9125 for ac_header in crypt.h dld.h fp_class.h getopt.h ieeefp.h ifaddrs.h langinfo.h poll.h pwd.h sys/ioctl.h sys/ipc.h sys/poll.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/socket.h sys/sockio.h sys/tas.h sys/time.h sys/un.h termios.h ucred.h utime.h wchar.h wctype.h
9126 do :
9127   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9128 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9129 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9130   cat >>confdefs.h <<_ACEOF
9131 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9132 _ACEOF
9133
9134 fi
9135
9136 done
9137
9138
9139 # On BSD, test for net/if.h will fail unless sys/socket.h
9140 # is included first.
9141 for ac_header in net/if.h
9142 do :
9143   ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
9144 #ifdef HAVE_SYS_SOCKET_H
9145 #include <sys/socket.h>
9146 #endif
9147
9148 "
9149 if test "x$ac_cv_header_net_if_h" = xyes; then :
9150   cat >>confdefs.h <<_ACEOF
9151 #define HAVE_NET_IF_H 1
9152 _ACEOF
9153
9154 fi
9155
9156 done
9157
9158
9159 # On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
9160 # is included first.
9161 for ac_header in sys/ucred.h
9162 do :
9163   ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
9164 #include <sys/param.h>
9165
9166 "
9167 if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
9168   cat >>confdefs.h <<_ACEOF
9169 #define HAVE_SYS_UCRED_H 1
9170 _ACEOF
9171
9172 fi
9173
9174 done
9175
9176
9177 # At least on IRIX, test for netinet/tcp.h will fail unless
9178 # netinet/in.h is included first.
9179 for ac_header in netinet/in.h
9180 do :
9181   ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
9182 if test "x$ac_cv_header_netinet_in_h" = xyes; then :
9183   cat >>confdefs.h <<_ACEOF
9184 #define HAVE_NETINET_IN_H 1
9185 _ACEOF
9186
9187 fi
9188
9189 done
9190
9191 for ac_header in netinet/tcp.h
9192 do :
9193   ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
9194 #ifdef HAVE_NETINET_IN_H
9195 #include <netinet/in.h>
9196 #endif
9197
9198 "
9199 if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
9200   cat >>confdefs.h <<_ACEOF
9201 #define HAVE_NETINET_TCP_H 1
9202 _ACEOF
9203
9204 fi
9205
9206 done
9207
9208
9209 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
9210   for ac_header in readline/readline.h
9211 do :
9212   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
9213 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
9214   cat >>confdefs.h <<_ACEOF
9215 #define HAVE_READLINE_READLINE_H 1
9216 _ACEOF
9217
9218 else
9219   for ac_header in readline.h
9220 do :
9221   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
9222 if test "x$ac_cv_header_readline_h" = xyes; then :
9223   cat >>confdefs.h <<_ACEOF
9224 #define HAVE_READLINE_H 1
9225 _ACEOF
9226
9227 else
9228   as_fn_error $? "readline header not found
9229 If you have readline already installed, see config.log for details on the
9230 failure.  It is possible the compiler isn't looking in the proper directory.
9231 Use --without-readline to disable readline support." "$LINENO" 5
9232 fi
9233
9234 done
9235
9236 fi
9237
9238 done
9239
9240   for ac_header in readline/history.h
9241 do :
9242   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
9243 if test "x$ac_cv_header_readline_history_h" = xyes; then :
9244   cat >>confdefs.h <<_ACEOF
9245 #define HAVE_READLINE_HISTORY_H 1
9246 _ACEOF
9247
9248 else
9249   for ac_header in history.h
9250 do :
9251   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
9252 if test "x$ac_cv_header_history_h" = xyes; then :
9253   cat >>confdefs.h <<_ACEOF
9254 #define HAVE_HISTORY_H 1
9255 _ACEOF
9256
9257 else
9258   as_fn_error $? "history header not found
9259 If you have readline already installed, see config.log for details on the
9260 failure.  It is possible the compiler isn't looking in the proper directory.
9261 Use --without-readline to disable readline support." "$LINENO" 5
9262 fi
9263
9264 done
9265
9266 fi
9267
9268 done
9269
9270 fi
9271
9272 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
9273 # Some installations of libedit usurp /usr/include/readline/, which seems
9274 # bad practice, since in combined installations readline will have its headers
9275 # there.  We might have to resort to AC_EGREP checks to make sure we found
9276 # the proper header...
9277   for ac_header in editline/readline.h
9278 do :
9279   ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
9280 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
9281   cat >>confdefs.h <<_ACEOF
9282 #define HAVE_EDITLINE_READLINE_H 1
9283 _ACEOF
9284
9285 else
9286   for ac_header in readline.h
9287 do :
9288   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
9289 if test "x$ac_cv_header_readline_h" = xyes; then :
9290   cat >>confdefs.h <<_ACEOF
9291 #define HAVE_READLINE_H 1
9292 _ACEOF
9293
9294 else
9295   for ac_header in readline/readline.h
9296 do :
9297   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
9298 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
9299   cat >>confdefs.h <<_ACEOF
9300 #define HAVE_READLINE_READLINE_H 1
9301 _ACEOF
9302
9303 else
9304   as_fn_error $? "readline header not found
9305 If you have libedit already installed, see config.log for details on the
9306 failure.  It is possible the compiler isn't looking in the proper directory.
9307 Use --without-readline to disable libedit support." "$LINENO" 5
9308 fi
9309
9310 done
9311
9312 fi
9313
9314 done
9315
9316 fi
9317
9318 done
9319
9320 # Note: in a libedit installation, history.h is sometimes a dummy, and may
9321 # not be there at all.  Hence, don't complain if not found.  We must check
9322 # though, since in yet other versions it is an independent header.
9323   for ac_header in editline/history.h
9324 do :
9325   ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
9326 if test "x$ac_cv_header_editline_history_h" = xyes; then :
9327   cat >>confdefs.h <<_ACEOF
9328 #define HAVE_EDITLINE_HISTORY_H 1
9329 _ACEOF
9330
9331 else
9332   for ac_header in history.h
9333 do :
9334   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
9335 if test "x$ac_cv_header_history_h" = xyes; then :
9336   cat >>confdefs.h <<_ACEOF
9337 #define HAVE_HISTORY_H 1
9338 _ACEOF
9339
9340 else
9341   for ac_header in readline/history.h
9342 do :
9343   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
9344 if test "x$ac_cv_header_readline_history_h" = xyes; then :
9345   cat >>confdefs.h <<_ACEOF
9346 #define HAVE_READLINE_HISTORY_H 1
9347 _ACEOF
9348
9349 fi
9350
9351 done
9352
9353 fi
9354
9355 done
9356
9357 fi
9358
9359 done
9360
9361 fi
9362
9363 if test "$with_zlib" = yes; then
9364   ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
9365 if test "x$ac_cv_header_zlib_h" = xyes; then :
9366
9367 else
9368   as_fn_error $? "zlib header not found
9369 If you have zlib already installed, see config.log for details on the
9370 failure.  It is possible the compiler isn't looking in the proper directory.
9371 Use --without-zlib to disable zlib support." "$LINENO" 5
9372 fi
9373
9374
9375 fi
9376
9377 if test "$with_gssapi" = yes ; then
9378   for ac_header in gssapi/gssapi.h
9379 do :
9380   ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
9381 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
9382   cat >>confdefs.h <<_ACEOF
9383 #define HAVE_GSSAPI_GSSAPI_H 1
9384 _ACEOF
9385
9386 else
9387   for ac_header in gssapi.h
9388 do :
9389   ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
9390 if test "x$ac_cv_header_gssapi_h" = xyes; then :
9391   cat >>confdefs.h <<_ACEOF
9392 #define HAVE_GSSAPI_H 1
9393 _ACEOF
9394
9395 else
9396   as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
9397 fi
9398
9399 done
9400
9401 fi
9402
9403 done
9404
9405 fi
9406
9407 if test "$with_openssl" = yes ; then
9408   ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
9409 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
9410
9411 else
9412   as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
9413 fi
9414
9415
9416   ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
9417 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
9418
9419 else
9420   as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
9421 fi
9422
9423
9424 fi
9425
9426 if test "$with_pam" = yes ; then
9427   for ac_header in security/pam_appl.h
9428 do :
9429   ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
9430 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
9431   cat >>confdefs.h <<_ACEOF
9432 #define HAVE_SECURITY_PAM_APPL_H 1
9433 _ACEOF
9434
9435 else
9436   for ac_header in pam/pam_appl.h
9437 do :
9438   ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
9439 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
9440   cat >>confdefs.h <<_ACEOF
9441 #define HAVE_PAM_PAM_APPL_H 1
9442 _ACEOF
9443
9444 else
9445   as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
9446 fi
9447
9448 done
9449
9450 fi
9451
9452 done
9453
9454 fi
9455
9456 if test "$with_libxml" = yes ; then
9457   ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
9458 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
9459
9460 else
9461   as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
9462 fi
9463
9464
9465 fi
9466
9467 if test "$with_libxslt" = yes ; then
9468   ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
9469 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
9470
9471 else
9472   as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
9473 fi
9474
9475
9476 fi
9477
9478 if test "$with_ldap" = yes ; then
9479   if test "$PORTNAME" != "win32"; then
9480      for ac_header in ldap.h
9481 do :
9482   ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
9483 if test "x$ac_cv_header_ldap_h" = xyes; then :
9484   cat >>confdefs.h <<_ACEOF
9485 #define HAVE_LDAP_H 1
9486 _ACEOF
9487
9488 else
9489   as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
9490 fi
9491
9492 done
9493
9494      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
9495 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
9496 if ${pgac_cv_ldap_safe+:} false; then :
9497   $as_echo_n "(cached) " >&6
9498 else
9499   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9500 /* end confdefs.h.  */
9501 #include <ldap.h>
9502 #if !defined(LDAP_VENDOR_VERSION) || \
9503      (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
9504       LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
9505 choke me
9506 #endif
9507 int
9508 main ()
9509 {
9510
9511   ;
9512   return 0;
9513 }
9514 _ACEOF
9515 if ac_fn_c_try_compile "$LINENO"; then :
9516   pgac_cv_ldap_safe=yes
9517 else
9518   pgac_cv_ldap_safe=no
9519 fi
9520 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9521 fi
9522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
9523 $as_echo "$pgac_cv_ldap_safe" >&6; }
9524
9525 if test "$pgac_cv_ldap_safe" != yes; then
9526   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9527 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
9528 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
9529 *** also uses LDAP will crash on exit." >&5
9530 $as_echo "$as_me: WARNING:
9531 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
9532 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
9533 *** also uses LDAP will crash on exit." >&2;}
9534 fi
9535   else
9536      for ac_header in winldap.h
9537 do :
9538   ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
9539 #include <windows.h>
9540
9541 "
9542 if test "x$ac_cv_header_winldap_h" = xyes; then :
9543   cat >>confdefs.h <<_ACEOF
9544 #define HAVE_WINLDAP_H 1
9545 _ACEOF
9546
9547 else
9548   as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
9549 fi
9550
9551 done
9552
9553   fi
9554 fi
9555
9556 if test "$with_bonjour" = yes ; then
9557   ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
9558 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
9559
9560 else
9561   as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
9562 fi
9563
9564
9565 fi
9566
9567 # for contrib/uuid-ossp
9568 if test "$with_uuid" = bsd ; then
9569   for ac_header in uuid.h
9570 do :
9571   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
9572 if test "x$ac_cv_header_uuid_h" = xyes; then :
9573   cat >>confdefs.h <<_ACEOF
9574 #define HAVE_UUID_H 1
9575 _ACEOF
9576  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9577 /* end confdefs.h.  */
9578 #include <uuid.h>
9579
9580 _ACEOF
9581 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9582   $EGREP "uuid_to_string" >/dev/null 2>&1; then :
9583
9584 else
9585   as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
9586 fi
9587 rm -f conftest*
9588
9589 else
9590   as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
9591 fi
9592
9593 done
9594
9595 elif test "$with_uuid" = e2fs ; then
9596   for ac_header in uuid/uuid.h
9597 do :
9598   ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
9599 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
9600   cat >>confdefs.h <<_ACEOF
9601 #define HAVE_UUID_UUID_H 1
9602 _ACEOF
9603  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9604 /* end confdefs.h.  */
9605 #include <uuid/uuid.h>
9606
9607 _ACEOF
9608 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9609   $EGREP "uuid_generate" >/dev/null 2>&1; then :
9610
9611 else
9612   as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
9613 fi
9614 rm -f conftest*
9615
9616 else
9617   for ac_header in uuid.h
9618 do :
9619   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
9620 if test "x$ac_cv_header_uuid_h" = xyes; then :
9621   cat >>confdefs.h <<_ACEOF
9622 #define HAVE_UUID_H 1
9623 _ACEOF
9624  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9625 /* end confdefs.h.  */
9626 #include <uuid.h>
9627
9628 _ACEOF
9629 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9630   $EGREP "uuid_generate" >/dev/null 2>&1; then :
9631
9632 else
9633   as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
9634 fi
9635 rm -f conftest*
9636
9637 else
9638   as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
9639 fi
9640
9641 done
9642
9643 fi
9644
9645 done
9646
9647 elif test "$with_uuid" = ossp ; then
9648   for ac_header in ossp/uuid.h
9649 do :
9650   ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
9651 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
9652   cat >>confdefs.h <<_ACEOF
9653 #define HAVE_OSSP_UUID_H 1
9654 _ACEOF
9655  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9656 /* end confdefs.h.  */
9657 #include <ossp/uuid.h>
9658
9659 _ACEOF
9660 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9661   $EGREP "uuid_export" >/dev/null 2>&1; then :
9662
9663 else
9664   as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
9665 fi
9666 rm -f conftest*
9667
9668 else
9669   for ac_header in uuid.h
9670 do :
9671   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
9672 if test "x$ac_cv_header_uuid_h" = xyes; then :
9673   cat >>confdefs.h <<_ACEOF
9674 #define HAVE_UUID_H 1
9675 _ACEOF
9676  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9677 /* end confdefs.h.  */
9678 #include <uuid.h>
9679
9680 _ACEOF
9681 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9682   $EGREP "uuid_export" >/dev/null 2>&1; then :
9683
9684 else
9685   as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
9686 fi
9687 rm -f conftest*
9688
9689 else
9690   as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
9691 fi
9692
9693 done
9694
9695 fi
9696
9697 done
9698
9699 fi
9700
9701 if test "$PORTNAME" = "win32" ; then
9702    for ac_header in crtdefs.h
9703 do :
9704   ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
9705 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
9706   cat >>confdefs.h <<_ACEOF
9707 #define HAVE_CRTDEFS_H 1
9708 _ACEOF
9709
9710 fi
9711
9712 done
9713
9714 fi
9715
9716 ##
9717 ## Types, structures, compiler characteristics
9718 ##
9719
9720   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
9721 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
9722 if ${ac_cv_c_bigendian+:} false; then :
9723   $as_echo_n "(cached) " >&6
9724 else
9725   ac_cv_c_bigendian=unknown
9726     # See if we're dealing with a universal compiler.
9727     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9728 /* end confdefs.h.  */
9729 #ifndef __APPLE_CC__
9730                not a universal capable compiler
9731              #endif
9732              typedef int dummy;
9733
9734 _ACEOF
9735 if ac_fn_c_try_compile "$LINENO"; then :
9736
9737         # Check for potential -arch flags.  It is not universal unless
9738         # there are at least two -arch flags with different values.
9739         ac_arch=
9740         ac_prev=
9741         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
9742          if test -n "$ac_prev"; then
9743            case $ac_word in
9744              i?86 | x86_64 | ppc | ppc64)
9745                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
9746                  ac_arch=$ac_word
9747                else
9748                  ac_cv_c_bigendian=universal
9749                  break
9750                fi
9751                ;;
9752            esac
9753            ac_prev=
9754          elif test "x$ac_word" = "x-arch"; then
9755            ac_prev=arch
9756          fi
9757        done
9758 fi
9759 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9760     if test $ac_cv_c_bigendian = unknown; then
9761       # See if sys/param.h defines the BYTE_ORDER macro.
9762       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9763 /* end confdefs.h.  */
9764 #include <sys/types.h>
9765              #include <sys/param.h>
9766
9767 int
9768 main ()
9769 {
9770 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
9771                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
9772                      && LITTLE_ENDIAN)
9773               bogus endian macros
9774              #endif
9775
9776   ;
9777   return 0;
9778 }
9779 _ACEOF
9780 if ac_fn_c_try_compile "$LINENO"; then :
9781   # It does; now see whether it defined to BIG_ENDIAN or not.
9782          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9783 /* end confdefs.h.  */
9784 #include <sys/types.h>
9785                 #include <sys/param.h>
9786
9787 int
9788 main ()
9789 {
9790 #if BYTE_ORDER != BIG_ENDIAN
9791                  not big endian
9792                 #endif
9793
9794   ;
9795   return 0;
9796 }
9797 _ACEOF
9798 if ac_fn_c_try_compile "$LINENO"; then :
9799   ac_cv_c_bigendian=yes
9800 else
9801   ac_cv_c_bigendian=no
9802 fi
9803 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9804 fi
9805 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9806     fi
9807     if test $ac_cv_c_bigendian = unknown; then
9808       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
9809       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9810 /* end confdefs.h.  */
9811 #include <limits.h>
9812
9813 int
9814 main ()
9815 {
9816 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
9817               bogus endian macros
9818              #endif
9819
9820   ;
9821   return 0;
9822 }
9823 _ACEOF
9824 if ac_fn_c_try_compile "$LINENO"; then :
9825   # It does; now see whether it defined to _BIG_ENDIAN or not.
9826          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9827 /* end confdefs.h.  */
9828 #include <limits.h>
9829
9830 int
9831 main ()
9832 {
9833 #ifndef _BIG_ENDIAN
9834                  not big endian
9835                 #endif
9836
9837   ;
9838   return 0;
9839 }
9840 _ACEOF
9841 if ac_fn_c_try_compile "$LINENO"; then :
9842   ac_cv_c_bigendian=yes
9843 else
9844   ac_cv_c_bigendian=no
9845 fi
9846 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9847 fi
9848 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9849     fi
9850     if test $ac_cv_c_bigendian = unknown; then
9851       # Compile a test program.
9852       if test "$cross_compiling" = yes; then :
9853   # Try to guess by grepping values from an object file.
9854          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9855 /* end confdefs.h.  */
9856 short int ascii_mm[] =
9857                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
9858                 short int ascii_ii[] =
9859                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9860                 int use_ascii (int i) {
9861                   return ascii_mm[i] + ascii_ii[i];
9862                 }
9863                 short int ebcdic_ii[] =
9864                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
9865                 short int ebcdic_mm[] =
9866                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9867                 int use_ebcdic (int i) {
9868                   return ebcdic_mm[i] + ebcdic_ii[i];
9869                 }
9870                 extern int foo;
9871
9872 int
9873 main ()
9874 {
9875 return use_ascii (foo) == use_ebcdic (foo);
9876   ;
9877   return 0;
9878 }
9879 _ACEOF
9880 if ac_fn_c_try_compile "$LINENO"; then :
9881   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
9882               ac_cv_c_bigendian=yes
9883             fi
9884             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
9885               if test "$ac_cv_c_bigendian" = unknown; then
9886                 ac_cv_c_bigendian=no
9887               else
9888                 # finding both strings is unlikely to happen, but who knows?
9889                 ac_cv_c_bigendian=unknown
9890               fi
9891             fi
9892 fi
9893 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9894 else
9895   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9896 /* end confdefs.h.  */
9897 $ac_includes_default
9898 int
9899 main ()
9900 {
9901
9902              /* Are we little or big endian?  From Harbison&Steele.  */
9903              union
9904              {
9905                long int l;
9906                char c[sizeof (long int)];
9907              } u;
9908              u.l = 1;
9909              return u.c[sizeof (long int) - 1] == 1;
9910
9911   ;
9912   return 0;
9913 }
9914 _ACEOF
9915 if ac_fn_c_try_run "$LINENO"; then :
9916   ac_cv_c_bigendian=no
9917 else
9918   ac_cv_c_bigendian=yes
9919 fi
9920 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9921   conftest.$ac_objext conftest.beam conftest.$ac_ext
9922 fi
9923
9924     fi
9925 fi
9926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
9927 $as_echo "$ac_cv_c_bigendian" >&6; }
9928  case $ac_cv_c_bigendian in #(
9929    yes)
9930      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
9931 ;; #(
9932    no)
9933       ;; #(
9934    universal)
9935
9936 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
9937
9938      ;; #(
9939    *)
9940      as_fn_error $? "unknown endianness
9941  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
9942  esac
9943
9944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
9945 $as_echo_n "checking for inline... " >&6; }
9946 if ${ac_cv_c_inline+:} false; then :
9947   $as_echo_n "(cached) " >&6
9948 else
9949   ac_cv_c_inline=no
9950 for ac_kw in inline __inline__ __inline; do
9951   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9952 /* end confdefs.h.  */
9953 #ifndef __cplusplus
9954 typedef int foo_t;
9955 static $ac_kw foo_t static_foo () {return 0; }
9956 $ac_kw foo_t foo () {return 0; }
9957 #endif
9958
9959 _ACEOF
9960 if ac_fn_c_try_compile "$LINENO"; then :
9961   ac_cv_c_inline=$ac_kw
9962 fi
9963 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9964   test "$ac_cv_c_inline" != no && break
9965 done
9966
9967 fi
9968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
9969 $as_echo "$ac_cv_c_inline" >&6; }
9970
9971 case $ac_cv_c_inline in
9972   inline | yes) ;;
9973   *)
9974     case $ac_cv_c_inline in
9975       no) ac_val=;;
9976       *) ac_val=$ac_cv_c_inline;;
9977     esac
9978     cat >>confdefs.h <<_ACEOF
9979 #ifndef __cplusplus
9980 #define inline $ac_val
9981 #endif
9982 _ACEOF
9983     ;;
9984 esac
9985
9986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for quiet inline (no complaint if unreferenced)" >&5
9987 $as_echo_n "checking for quiet inline (no complaint if unreferenced)... " >&6; }
9988 if ${pgac_cv_c_inline_quietly+:} false; then :
9989   $as_echo_n "(cached) " >&6
9990 else
9991   pgac_cv_c_inline_quietly=no
9992   if test "$ac_cv_c_inline" != no; then
9993     pgac_c_inline_save_werror=$ac_c_werror_flag
9994     ac_c_werror_flag=yes
9995     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9996 /* end confdefs.h.  */
9997 #include "$srcdir/config/test_quiet_include.h"
9998 int
9999 main ()
10000 {
10001
10002   ;
10003   return 0;
10004 }
10005 _ACEOF
10006 if ac_fn_c_try_link "$LINENO"; then :
10007   pgac_cv_c_inline_quietly=yes
10008 fi
10009 rm -f core conftest.err conftest.$ac_objext \
10010     conftest$ac_exeext conftest.$ac_ext
10011     ac_c_werror_flag=$pgac_c_inline_save_werror
10012   fi
10013 fi
10014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_inline_quietly" >&5
10015 $as_echo "$pgac_cv_c_inline_quietly" >&6; }
10016 if test "$pgac_cv_c_inline_quietly" != no; then
10017
10018 cat >>confdefs.h <<_ACEOF
10019 #define PG_USE_INLINE 1
10020 _ACEOF
10021
10022 fi
10023
10024
10025   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array members" >&5
10026 $as_echo_n "checking for flexible array members... " >&6; }
10027 if ${ac_cv_c_flexmember+:} false; then :
10028   $as_echo_n "(cached) " >&6
10029 else
10030   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10031 /* end confdefs.h.  */
10032 #include <stdlib.h>
10033             #include <stdio.h>
10034             #include <stddef.h>
10035             struct s { int n; double d[]; };
10036 int
10037 main ()
10038 {
10039 int m = getchar ();
10040             struct s *p = malloc (offsetof (struct s, d)
10041                                   + m * sizeof (double));
10042             p->d[0] = 0.0;
10043             return p->d != (double *) NULL;
10044   ;
10045   return 0;
10046 }
10047 _ACEOF
10048 if ac_fn_c_try_compile "$LINENO"; then :
10049   ac_cv_c_flexmember=yes
10050 else
10051   ac_cv_c_flexmember=no
10052 fi
10053 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10054 fi
10055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
10056 $as_echo "$ac_cv_c_flexmember" >&6; }
10057   if test $ac_cv_c_flexmember = yes; then
10058
10059 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
10060
10061   else
10062     $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
10063
10064   fi
10065
10066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed types" >&5
10067 $as_echo_n "checking for signed types... " >&6; }
10068 if ${pgac_cv_c_signed+:} false; then :
10069   $as_echo_n "(cached) " >&6
10070 else
10071   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10072 /* end confdefs.h.  */
10073
10074 int
10075 main ()
10076 {
10077 signed char c; signed short s; signed int i;
10078   ;
10079   return 0;
10080 }
10081 _ACEOF
10082 if ac_fn_c_try_compile "$LINENO"; then :
10083   pgac_cv_c_signed=yes
10084 else
10085   pgac_cv_c_signed=no
10086 fi
10087 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10088 fi
10089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_signed" >&5
10090 $as_echo "$pgac_cv_c_signed" >&6; }
10091 if test x"$pgac_cv_c_signed" = xno ; then
10092
10093 $as_echo "#define signed /**/" >>confdefs.h
10094
10095 fi
10096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5
10097 $as_echo_n "checking for __func__... " >&6; }
10098 if ${pgac_cv_funcname_func_support+:} false; then :
10099   $as_echo_n "(cached) " >&6
10100 else
10101   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10102 /* end confdefs.h.  */
10103 #include <stdio.h>
10104 int
10105 main ()
10106 {
10107 printf("%s\n", __func__);
10108   ;
10109   return 0;
10110 }
10111 _ACEOF
10112 if ac_fn_c_try_compile "$LINENO"; then :
10113   pgac_cv_funcname_func_support=yes
10114 else
10115   pgac_cv_funcname_func_support=no
10116 fi
10117 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10118 fi
10119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_func_support" >&5
10120 $as_echo "$pgac_cv_funcname_func_support" >&6; }
10121 if test x"$pgac_cv_funcname_func_support" = xyes ; then
10122
10123 $as_echo "#define HAVE_FUNCNAME__FUNC 1" >>confdefs.h
10124
10125 else
10126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__" >&5
10127 $as_echo_n "checking for __FUNCTION__... " >&6; }
10128 if ${pgac_cv_funcname_function_support+:} false; then :
10129   $as_echo_n "(cached) " >&6
10130 else
10131   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10132 /* end confdefs.h.  */
10133 #include <stdio.h>
10134 int
10135 main ()
10136 {
10137 printf("%s\n", __FUNCTION__);
10138   ;
10139   return 0;
10140 }
10141 _ACEOF
10142 if ac_fn_c_try_compile "$LINENO"; then :
10143   pgac_cv_funcname_function_support=yes
10144 else
10145   pgac_cv_funcname_function_support=no
10146 fi
10147 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10148 fi
10149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_function_support" >&5
10150 $as_echo "$pgac_cv_funcname_function_support" >&6; }
10151 if test x"$pgac_cv_funcname_function_support" = xyes ; then
10152
10153 $as_echo "#define HAVE_FUNCNAME__FUNCTION 1" >>confdefs.h
10154
10155 fi
10156 fi
10157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
10158 $as_echo_n "checking for _Static_assert... " >&6; }
10159 if ${pgac_cv__static_assert+:} false; then :
10160   $as_echo_n "(cached) " >&6
10161 else
10162   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10163 /* end confdefs.h.  */
10164
10165 int
10166 main ()
10167 {
10168 ({ _Static_assert(1, "foo"); })
10169   ;
10170   return 0;
10171 }
10172 _ACEOF
10173 if ac_fn_c_try_link "$LINENO"; then :
10174   pgac_cv__static_assert=yes
10175 else
10176   pgac_cv__static_assert=no
10177 fi
10178 rm -f core conftest.err conftest.$ac_objext \
10179     conftest$ac_exeext conftest.$ac_ext
10180 fi
10181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
10182 $as_echo "$pgac_cv__static_assert" >&6; }
10183 if test x"$pgac_cv__static_assert" = xyes ; then
10184
10185 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
10186
10187 fi
10188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
10189 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
10190 if ${pgac_cv__types_compatible+:} false; then :
10191   $as_echo_n "(cached) " >&6
10192 else
10193   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10194 /* end confdefs.h.  */
10195
10196 int
10197 main ()
10198 {
10199  int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
10200   ;
10201   return 0;
10202 }
10203 _ACEOF
10204 if ac_fn_c_try_compile "$LINENO"; then :
10205   pgac_cv__types_compatible=yes
10206 else
10207   pgac_cv__types_compatible=no
10208 fi
10209 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10210 fi
10211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
10212 $as_echo "$pgac_cv__types_compatible" >&6; }
10213 if test x"$pgac_cv__types_compatible" = xyes ; then
10214
10215 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
10216
10217 fi
10218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
10219 $as_echo_n "checking for __builtin_constant_p... " >&6; }
10220 if ${pgac_cv__builtin_constant_p+:} false; then :
10221   $as_echo_n "(cached) " >&6
10222 else
10223   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10224 /* end confdefs.h.  */
10225 static int x; static int y[__builtin_constant_p(x) ? x : 1];
10226 int
10227 main ()
10228 {
10229
10230   ;
10231   return 0;
10232 }
10233 _ACEOF
10234 if ac_fn_c_try_compile "$LINENO"; then :
10235   pgac_cv__builtin_constant_p=yes
10236 else
10237   pgac_cv__builtin_constant_p=no
10238 fi
10239 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10240 fi
10241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
10242 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
10243 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
10244
10245 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
10246
10247 fi
10248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
10249 $as_echo_n "checking for __builtin_unreachable... " >&6; }
10250 if ${pgac_cv__builtin_unreachable+:} false; then :
10251   $as_echo_n "(cached) " >&6
10252 else
10253   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10254 /* end confdefs.h.  */
10255
10256 int
10257 main ()
10258 {
10259 __builtin_unreachable();
10260   ;
10261   return 0;
10262 }
10263 _ACEOF
10264 if ac_fn_c_try_link "$LINENO"; then :
10265   pgac_cv__builtin_unreachable=yes
10266 else
10267   pgac_cv__builtin_unreachable=no
10268 fi
10269 rm -f core conftest.err conftest.$ac_objext \
10270     conftest$ac_exeext conftest.$ac_ext
10271 fi
10272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
10273 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
10274 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
10275
10276 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
10277
10278 fi
10279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __VA_ARGS__" >&5
10280 $as_echo_n "checking for __VA_ARGS__... " >&6; }
10281 if ${pgac_cv__va_args+:} false; then :
10282   $as_echo_n "(cached) " >&6
10283 else
10284   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10285 /* end confdefs.h.  */
10286 #include <stdio.h>
10287 int
10288 main ()
10289 {
10290 #define debug(...) fprintf(stderr, __VA_ARGS__)
10291 debug("%s", "blarg");
10292
10293   ;
10294   return 0;
10295 }
10296 _ACEOF
10297 if ac_fn_c_try_compile "$LINENO"; then :
10298   pgac_cv__va_args=yes
10299 else
10300   pgac_cv__va_args=no
10301 fi
10302 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10303 fi
10304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__va_args" >&5
10305 $as_echo "$pgac_cv__va_args" >&6; }
10306 if test x"$pgac_cv__va_args" = xyes ; then
10307
10308 $as_echo "#define HAVE__VA_ARGS 1" >>confdefs.h
10309
10310 fi
10311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10312 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
10313 if ${ac_cv_struct_tm+:} false; then :
10314   $as_echo_n "(cached) " >&6
10315 else
10316   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10317 /* end confdefs.h.  */
10318 #include <sys/types.h>
10319 #include <time.h>
10320
10321 int
10322 main ()
10323 {
10324 struct tm tm;
10325                                      int *p = &tm.tm_sec;
10326                                      return !p;
10327   ;
10328   return 0;
10329 }
10330 _ACEOF
10331 if ac_fn_c_try_compile "$LINENO"; then :
10332   ac_cv_struct_tm=time.h
10333 else
10334   ac_cv_struct_tm=sys/time.h
10335 fi
10336 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10337 fi
10338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10339 $as_echo "$ac_cv_struct_tm" >&6; }
10340 if test $ac_cv_struct_tm = sys/time.h; then
10341
10342 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
10343
10344 fi
10345
10346 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
10347 #include <$ac_cv_struct_tm>
10348
10349 "
10350 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
10351
10352 cat >>confdefs.h <<_ACEOF
10353 #define HAVE_STRUCT_TM_TM_ZONE 1
10354 _ACEOF
10355
10356
10357 fi
10358
10359 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10360
10361 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
10362
10363 fi
10364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10365 $as_echo_n "checking for tzname... " >&6; }
10366 if ${ac_cv_var_tzname+:} false; then :
10367   $as_echo_n "(cached) " >&6
10368 else
10369   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10370 /* end confdefs.h.  */
10371 #include <time.h>
10372 #ifndef tzname /* For SGI.  */
10373 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
10374 #endif
10375
10376 int
10377 main ()
10378 {
10379 atoi(*tzname);
10380   ;
10381   return 0;
10382 }
10383 _ACEOF
10384 if ac_fn_c_try_link "$LINENO"; then :
10385   ac_cv_var_tzname=yes
10386 else
10387   ac_cv_var_tzname=no
10388 fi
10389 rm -f core conftest.err conftest.$ac_objext \
10390     conftest$ac_exeext conftest.$ac_ext
10391 fi
10392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10393 $as_echo "$ac_cv_var_tzname" >&6; }
10394 if test $ac_cv_var_tzname = yes; then
10395
10396 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
10397
10398 fi
10399
10400 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
10401 #include <sys/ipc.h>
10402 #include <sys/sem.h>
10403 "
10404 if test "x$ac_cv_type_union_semun" = xyes; then :
10405
10406 cat >>confdefs.h <<_ACEOF
10407 #define HAVE_UNION_SEMUN 1
10408 _ACEOF
10409
10410
10411 fi
10412
10413 ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
10414 #ifdef HAVE_SYS_UN_H
10415 #include <sys/un.h>
10416 #endif
10417
10418 "
10419 if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
10420
10421 $as_echo "#define HAVE_UNIX_SOCKETS 1" >>confdefs.h
10422
10423 fi
10424
10425 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
10426 #ifdef HAVE_SYS_SOCKET_H
10427 #include <sys/socket.h>
10428 #endif
10429
10430 "
10431 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
10432
10433 cat >>confdefs.h <<_ACEOF
10434 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
10435 _ACEOF
10436
10437
10438 fi
10439
10440 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
10441 #ifdef HAVE_SYS_SOCKET_H
10442 #include <sys/socket.h>
10443 #endif
10444
10445 "
10446 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
10447
10448 cat >>confdefs.h <<_ACEOF
10449 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
10450 _ACEOF
10451
10452
10453 fi
10454 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
10455 #ifdef HAVE_SYS_SOCKET_H
10456 #include <sys/socket.h>
10457 #endif
10458
10459 "
10460 if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
10461
10462 cat >>confdefs.h <<_ACEOF
10463 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
10464 _ACEOF
10465
10466
10467 fi
10468 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
10469 #ifdef HAVE_SYS_SOCKET_H
10470 #include <sys/socket.h>
10471 #endif
10472
10473 "
10474 if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
10475
10476 cat >>confdefs.h <<_ACEOF
10477 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
10478 _ACEOF
10479
10480
10481 fi
10482 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
10483 #ifdef HAVE_SYS_SOCKET_H
10484 #include <sys/socket.h>
10485 #endif
10486
10487 "
10488 if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
10489
10490 cat >>confdefs.h <<_ACEOF
10491 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
10492 _ACEOF
10493
10494
10495 fi
10496 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
10497 #ifdef HAVE_SYS_SOCKET_H
10498 #include <sys/socket.h>
10499 #endif
10500
10501 "
10502 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
10503
10504 cat >>confdefs.h <<_ACEOF
10505 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
10506 _ACEOF
10507
10508
10509 fi
10510
10511 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include <sys/types.h>
10512 #include <sys/socket.h>
10513 #include <netdb.h>
10514
10515 "
10516 if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
10517
10518 cat >>confdefs.h <<_ACEOF
10519 #define HAVE_STRUCT_ADDRINFO 1
10520 _ACEOF
10521
10522
10523 fi
10524
10525
10526   ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
10527 if test "x$ac_cv_type_intptr_t" = xyes; then :
10528
10529 $as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
10530
10531 else
10532   for ac_type in 'int' 'long int' 'long long int'; do
10533        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10534 /* end confdefs.h.  */
10535 $ac_includes_default
10536 int
10537 main ()
10538 {
10539 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
10540 test_array [0] = 0;
10541 return test_array [0];
10542
10543   ;
10544   return 0;
10545 }
10546 _ACEOF
10547 if ac_fn_c_try_compile "$LINENO"; then :
10548
10549 cat >>confdefs.h <<_ACEOF
10550 #define intptr_t $ac_type
10551 _ACEOF
10552
10553           ac_type=
10554 fi
10555 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10556        test -z "$ac_type" && break
10557      done
10558 fi
10559
10560
10561
10562   ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
10563 if test "x$ac_cv_type_uintptr_t" = xyes; then :
10564
10565 $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
10566
10567 else
10568   for ac_type in 'unsigned int' 'unsigned long int' \
10569         'unsigned long long int'; do
10570        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10571 /* end confdefs.h.  */
10572 $ac_includes_default
10573 int
10574 main ()
10575 {
10576 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
10577 test_array [0] = 0;
10578 return test_array [0];
10579
10580   ;
10581   return 0;
10582 }
10583 _ACEOF
10584 if ac_fn_c_try_compile "$LINENO"; then :
10585
10586 cat >>confdefs.h <<_ACEOF
10587 #define uintptr_t $ac_type
10588 _ACEOF
10589
10590           ac_type=
10591 fi
10592 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10593        test -z "$ac_type" && break
10594      done
10595 fi
10596
10597
10598
10599   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
10600 $as_echo_n "checking for unsigned long long int... " >&6; }
10601 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
10602   $as_echo_n "(cached) " >&6
10603 else
10604   ac_cv_type_unsigned_long_long_int=yes
10605      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
10606        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10607 /* end confdefs.h.  */
10608
10609   /* For now, do not test the preprocessor; as of 2007 there are too many
10610          implementations with broken preprocessors.  Perhaps this can
10611          be revisited in 2012.  In the meantime, code should not expect
10612          #if to work with literals wider than 32 bits.  */
10613       /* Test literals.  */
10614       long long int ll = 9223372036854775807ll;
10615       long long int nll = -9223372036854775807LL;
10616       unsigned long long int ull = 18446744073709551615ULL;
10617       /* Test constant expressions.   */
10618       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
10619                      ? 1 : -1)];
10620       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
10621                      ? 1 : -1)];
10622       int i = 63;
10623 int
10624 main ()
10625 {
10626 /* Test availability of runtime routines for shift and division.  */
10627       long long int llmax = 9223372036854775807ll;
10628       unsigned long long int ullmax = 18446744073709551615ull;
10629       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
10630               | (llmax / ll) | (llmax % ll)
10631               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
10632               | (ullmax / ull) | (ullmax % ull));
10633   ;
10634   return 0;
10635 }
10636
10637 _ACEOF
10638 if ac_fn_c_try_link "$LINENO"; then :
10639
10640 else
10641   ac_cv_type_unsigned_long_long_int=no
10642 fi
10643 rm -f core conftest.err conftest.$ac_objext \
10644     conftest$ac_exeext conftest.$ac_ext
10645      fi
10646 fi
10647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
10648 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
10649   if test $ac_cv_type_unsigned_long_long_int = yes; then
10650
10651 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
10652
10653   fi
10654
10655
10656
10657   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
10658 $as_echo_n "checking for long long int... " >&6; }
10659 if ${ac_cv_type_long_long_int+:} false; then :
10660   $as_echo_n "(cached) " >&6
10661 else
10662   ac_cv_type_long_long_int=yes
10663       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
10664         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
10665         if test $ac_cv_type_long_long_int = yes; then
10666                                   if test "$cross_compiling" = yes; then :
10667   :
10668 else
10669   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10670 /* end confdefs.h.  */
10671 #include <limits.h>
10672                  #ifndef LLONG_MAX
10673                  # define HALF \
10674                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
10675                  # define LLONG_MAX (HALF - 1 + HALF)
10676                  #endif
10677 int
10678 main ()
10679 {
10680 long long int n = 1;
10681                  int i;
10682                  for (i = 0; ; i++)
10683                    {
10684                      long long int m = n << i;
10685                      if (m >> i != n)
10686                        return 1;
10687                      if (LLONG_MAX / 2 < m)
10688                        break;
10689                    }
10690                  return 0;
10691   ;
10692   return 0;
10693 }
10694 _ACEOF
10695 if ac_fn_c_try_run "$LINENO"; then :
10696
10697 else
10698   ac_cv_type_long_long_int=no
10699 fi
10700 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10701   conftest.$ac_objext conftest.beam conftest.$ac_ext
10702 fi
10703
10704         fi
10705       fi
10706 fi
10707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
10708 $as_echo "$ac_cv_type_long_long_int" >&6; }
10709   if test $ac_cv_type_long_long_int = yes; then
10710
10711 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
10712
10713   fi
10714
10715
10716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
10717 $as_echo_n "checking for locale_t... " >&6; }
10718 if ${pgac_cv_type_locale_t+:} false; then :
10719   $as_echo_n "(cached) " >&6
10720 else
10721   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10722 /* end confdefs.h.  */
10723 #include <locale.h>
10724 locale_t x;
10725 int
10726 main ()
10727 {
10728
10729   ;
10730   return 0;
10731 }
10732 _ACEOF
10733 if ac_fn_c_try_compile "$LINENO"; then :
10734   pgac_cv_type_locale_t=yes
10735 else
10736   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10737 /* end confdefs.h.  */
10738 #include <xlocale.h>
10739 locale_t x;
10740 int
10741 main ()
10742 {
10743
10744   ;
10745   return 0;
10746 }
10747 _ACEOF
10748 if ac_fn_c_try_compile "$LINENO"; then :
10749   pgac_cv_type_locale_t='yes (in xlocale.h)'
10750 else
10751   pgac_cv_type_locale_t=no
10752 fi
10753 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10754 fi
10755 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10756 fi
10757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
10758 $as_echo "$pgac_cv_type_locale_t" >&6; }
10759 if test "$pgac_cv_type_locale_t" != no; then
10760
10761 $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
10762
10763 fi
10764 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
10765
10766 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
10767
10768 fi
10769
10770 ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
10771 #include <sys/param.h>
10772 #ifdef HAVE_SYS_UCRED_H
10773 #include <sys/ucred.h>
10774 #endif
10775 "
10776 if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
10777
10778 cat >>confdefs.h <<_ACEOF
10779 #define HAVE_STRUCT_CMSGCRED 1
10780 _ACEOF
10781
10782
10783 fi
10784
10785
10786 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
10787 #include <getopt.h>
10788 #endif
10789 "
10790 if test "x$ac_cv_type_struct_option" = xyes; then :
10791
10792 cat >>confdefs.h <<_ACEOF
10793 #define HAVE_STRUCT_OPTION 1
10794 _ACEOF
10795
10796
10797 fi
10798
10799
10800 if test "$with_zlib" = yes; then
10801   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
10802   # did not).  While we could work around the lack of z_streamp, it
10803   # seems unwise to encourage people to use such old zlib versions...
10804   ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
10805 "
10806 if test "x$ac_cv_type_z_streamp" = xyes; then :
10807
10808 else
10809   as_fn_error $? "zlib version is too old
10810 Use --without-zlib to disable zlib support." "$LINENO" 5
10811 fi
10812
10813 fi
10814
10815 # On PPC, check if assembler supports LWARX instruction's mutex hint bit
10816 case $host_cpu in
10817   ppc*|powerpc*)
10818     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports lwarx hint bit" >&5
10819 $as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
10820     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10821 /* end confdefs.h.  */
10822
10823 int
10824 main ()
10825 {
10826 int a = 0; int *p = &a; int r;
10827          __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
10828   ;
10829   return 0;
10830 }
10831 _ACEOF
10832 if ac_fn_c_try_compile "$LINENO"; then :
10833   pgac_cv_have_ppc_mutex_hint=yes
10834 else
10835   pgac_cv_have_ppc_mutex_hint=no
10836 fi
10837 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10838     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_ppc_mutex_hint" >&5
10839 $as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
10840     if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
10841
10842 $as_echo "#define HAVE_PPC_LWARX_MUTEX_HINT 1" >>confdefs.h
10843
10844     fi
10845   ;;
10846 esac
10847
10848 # Check largefile support.  You might think this is a system service not a
10849 # compiler characteristic, but you'd be wrong.  We must check this before
10850 # probing existence of related functions such as fseeko, since the largefile
10851 # defines can affect what is generated for that.
10852 if test "$PORTNAME" != "win32"; then
10853    # Check whether --enable-largefile was given.
10854 if test "${enable_largefile+set}" = set; then :
10855   enableval=$enable_largefile;
10856 fi
10857
10858 if test "$enable_largefile" != no; then
10859
10860   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
10861 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
10862 if ${ac_cv_sys_largefile_CC+:} false; then :
10863   $as_echo_n "(cached) " >&6
10864 else
10865   ac_cv_sys_largefile_CC=no
10866      if test "$GCC" != yes; then
10867        ac_save_CC=$CC
10868        while :; do
10869          # IRIX 6.2 and later do not support large files by default,
10870          # so use the C compiler's -n32 option if that helps.
10871          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10872 /* end confdefs.h.  */
10873 #include <sys/types.h>
10874  /* Check that off_t can represent 2**63 - 1 correctly.
10875     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10876     since some C++ compilers masquerading as C compilers
10877     incorrectly reject 9223372036854775807.  */
10878 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10879   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10880                        && LARGE_OFF_T % 2147483647 == 1)
10881                       ? 1 : -1];
10882 int
10883 main ()
10884 {
10885
10886   ;
10887   return 0;
10888 }
10889 _ACEOF
10890          if ac_fn_c_try_compile "$LINENO"; then :
10891   break
10892 fi
10893 rm -f core conftest.err conftest.$ac_objext
10894          CC="$CC -n32"
10895          if ac_fn_c_try_compile "$LINENO"; then :
10896   ac_cv_sys_largefile_CC=' -n32'; break
10897 fi
10898 rm -f core conftest.err conftest.$ac_objext
10899          break
10900        done
10901        CC=$ac_save_CC
10902        rm -f conftest.$ac_ext
10903     fi
10904 fi
10905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
10906 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
10907   if test "$ac_cv_sys_largefile_CC" != no; then
10908     CC=$CC$ac_cv_sys_largefile_CC
10909   fi
10910
10911   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
10912 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
10913 if ${ac_cv_sys_file_offset_bits+:} false; then :
10914   $as_echo_n "(cached) " >&6
10915 else
10916   while :; do
10917   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10918 /* end confdefs.h.  */
10919 #include <sys/types.h>
10920  /* Check that off_t can represent 2**63 - 1 correctly.
10921     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10922     since some C++ compilers masquerading as C compilers
10923     incorrectly reject 9223372036854775807.  */
10924 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10925   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10926                        && LARGE_OFF_T % 2147483647 == 1)
10927                       ? 1 : -1];
10928 int
10929 main ()
10930 {
10931
10932   ;
10933   return 0;
10934 }
10935 _ACEOF
10936 if ac_fn_c_try_compile "$LINENO"; then :
10937   ac_cv_sys_file_offset_bits=no; break
10938 fi
10939 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10940   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10941 /* end confdefs.h.  */
10942 #define _FILE_OFFSET_BITS 64
10943 #include <sys/types.h>
10944  /* Check that off_t can represent 2**63 - 1 correctly.
10945     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10946     since some C++ compilers masquerading as C compilers
10947     incorrectly reject 9223372036854775807.  */
10948 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10949   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10950                        && LARGE_OFF_T % 2147483647 == 1)
10951                       ? 1 : -1];
10952 int
10953 main ()
10954 {
10955
10956   ;
10957   return 0;
10958 }
10959 _ACEOF
10960 if ac_fn_c_try_compile "$LINENO"; then :
10961   ac_cv_sys_file_offset_bits=64; break
10962 fi
10963 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10964   ac_cv_sys_file_offset_bits=unknown
10965   break
10966 done
10967 fi
10968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
10969 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
10970 case $ac_cv_sys_file_offset_bits in #(
10971   no | unknown) ;;
10972   *)
10973 cat >>confdefs.h <<_ACEOF
10974 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
10975 _ACEOF
10976 ;;
10977 esac
10978 rm -rf conftest*
10979   if test $ac_cv_sys_file_offset_bits = unknown; then
10980     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
10981 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
10982 if ${ac_cv_sys_large_files+:} false; then :
10983   $as_echo_n "(cached) " >&6
10984 else
10985   while :; do
10986   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10987 /* end confdefs.h.  */
10988 #include <sys/types.h>
10989  /* Check that off_t can represent 2**63 - 1 correctly.
10990     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10991     since some C++ compilers masquerading as C compilers
10992     incorrectly reject 9223372036854775807.  */
10993 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10994   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10995                        && LARGE_OFF_T % 2147483647 == 1)
10996                       ? 1 : -1];
10997 int
10998 main ()
10999 {
11000
11001   ;
11002   return 0;
11003 }
11004 _ACEOF
11005 if ac_fn_c_try_compile "$LINENO"; then :
11006   ac_cv_sys_large_files=no; break
11007 fi
11008 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11009   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11010 /* end confdefs.h.  */
11011 #define _LARGE_FILES 1
11012 #include <sys/types.h>
11013  /* Check that off_t can represent 2**63 - 1 correctly.
11014     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11015     since some C++ compilers masquerading as C compilers
11016     incorrectly reject 9223372036854775807.  */
11017 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11018   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11019                        && LARGE_OFF_T % 2147483647 == 1)
11020                       ? 1 : -1];
11021 int
11022 main ()
11023 {
11024
11025   ;
11026   return 0;
11027 }
11028 _ACEOF
11029 if ac_fn_c_try_compile "$LINENO"; then :
11030   ac_cv_sys_large_files=1; break
11031 fi
11032 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11033   ac_cv_sys_large_files=unknown
11034   break
11035 done
11036 fi
11037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
11038 $as_echo "$ac_cv_sys_large_files" >&6; }
11039 case $ac_cv_sys_large_files in #(
11040   no | unknown) ;;
11041   *)
11042 cat >>confdefs.h <<_ACEOF
11043 #define _LARGE_FILES $ac_cv_sys_large_files
11044 _ACEOF
11045 ;;
11046 esac
11047 rm -rf conftest*
11048   fi
11049
11050
11051 fi
11052
11053
11054 fi
11055
11056 # Check for largefile support (must be after AC_SYS_LARGEFILE)
11057 # The cast to long int works around a bug in the HP C Compiler
11058 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11059 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11060 # This bug is HP SR number 8606223364.
11061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
11062 $as_echo_n "checking size of off_t... " >&6; }
11063 if ${ac_cv_sizeof_off_t+:} false; then :
11064   $as_echo_n "(cached) " >&6
11065 else
11066   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :
11067
11068 else
11069   if test "$ac_cv_type_off_t" = yes; then
11070      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11071 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11072 as_fn_error 77 "cannot compute sizeof (off_t)
11073 See \`config.log' for more details" "$LINENO" 5; }
11074    else
11075      ac_cv_sizeof_off_t=0
11076    fi
11077 fi
11078
11079 fi
11080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
11081 $as_echo "$ac_cv_sizeof_off_t" >&6; }
11082
11083
11084
11085 cat >>confdefs.h <<_ACEOF
11086 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
11087 _ACEOF
11088
11089
11090
11091 # If we don't have largefile support, can't handle segsize >= 2GB.
11092 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
11093    as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
11094 fi
11095
11096
11097 ##
11098 ## Functions, global variables
11099 ##
11100
11101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
11102 $as_echo_n "checking for int timezone... " >&6; }
11103 if ${pgac_cv_var_int_timezone+:} false; then :
11104   $as_echo_n "(cached) " >&6
11105 else
11106   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11107 /* end confdefs.h.  */
11108 #include <time.h>
11109 int res;
11110 int
11111 main ()
11112 {
11113 #ifndef __CYGWIN__
11114 res = timezone / 60;
11115 #else
11116 res = _timezone / 60;
11117 #endif
11118   ;
11119   return 0;
11120 }
11121 _ACEOF
11122 if ac_fn_c_try_link "$LINENO"; then :
11123   pgac_cv_var_int_timezone=yes
11124 else
11125   pgac_cv_var_int_timezone=no
11126 fi
11127 rm -f core conftest.err conftest.$ac_objext \
11128     conftest$ac_exeext conftest.$ac_ext
11129 fi
11130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
11131 $as_echo "$pgac_cv_var_int_timezone" >&6; }
11132 if test x"$pgac_cv_var_int_timezone" = xyes ; then
11133
11134 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
11135
11136 fi
11137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for accept()" >&5
11138 $as_echo_n "checking types of arguments for accept()... " >&6; }
11139  if ${ac_cv_func_accept_return+:} false; then :
11140   $as_echo_n "(cached) " >&6
11141 else
11142    if ${ac_cv_func_accept_arg1+:} false; then :
11143   $as_echo_n "(cached) " >&6
11144 else
11145     if ${ac_cv_func_accept_arg2+:} false; then :
11146   $as_echo_n "(cached) " >&6
11147 else
11148      if ${ac_cv_func_accept_arg3+:} false; then :
11149   $as_echo_n "(cached) " >&6
11150 else
11151       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL' 'SOCKET WSAAPI'; do
11152       for ac_cv_func_accept_arg1 in 'int' 'unsigned int' 'SOCKET'; do
11153        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
11154         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
11155          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11156 /* end confdefs.h.  */
11157 #ifdef HAVE_SYS_TYPES_H
11158 #include <sys/types.h>
11159 #endif
11160 #ifdef HAVE_SYS_SOCKET_H
11161 #include <sys/socket.h>
11162 #endif
11163 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
11164 int
11165 main ()
11166 {
11167
11168   ;
11169   return 0;
11170 }
11171 _ACEOF
11172 if ac_fn_c_try_compile "$LINENO"; then :
11173   ac_not_found=no; break 4
11174 else
11175   ac_not_found=yes
11176 fi
11177 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11178        done
11179       done
11180      done
11181     done
11182     if test "$ac_not_found" = yes; then
11183       as_fn_error $? "could not determine argument types" "$LINENO" 5
11184     fi
11185     if test "$ac_cv_func_accept_arg3" = "void"; then
11186       ac_cv_func_accept_arg3=int
11187     fi
11188
11189 fi
11190
11191 fi
11192
11193 fi
11194
11195 fi
11196  { $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
11197 $as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
11198
11199 cat >>confdefs.h <<_ACEOF
11200 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
11201 _ACEOF
11202
11203
11204 cat >>confdefs.h <<_ACEOF
11205 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
11206 _ACEOF
11207
11208
11209 cat >>confdefs.h <<_ACEOF
11210 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
11211 _ACEOF
11212
11213
11214 cat >>confdefs.h <<_ACEOF
11215 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
11216 _ACEOF
11217
11218
11219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
11220 $as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
11221 if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
11222   $as_echo_n "(cached) " >&6
11223 else
11224   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11225 /* end confdefs.h.  */
11226 #include <sys/time.h>
11227 int
11228 main ()
11229 {
11230 struct timeval *tp;
11231 struct timezone *tzp;
11232 gettimeofday(tp,tzp);
11233   ;
11234   return 0;
11235 }
11236 _ACEOF
11237 if ac_fn_c_try_compile "$LINENO"; then :
11238   pgac_cv_func_gettimeofday_1arg=no
11239 else
11240   pgac_cv_func_gettimeofday_1arg=yes
11241 fi
11242 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11243 fi
11244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5
11245 $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
11246 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
11247
11248 $as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
11249
11250 fi
11251
11252
11253 # Some versions of libedit contain strlcpy(), setproctitle(), and other
11254 # symbols that that library has no business exposing to the world.  Pending
11255 # acquisition of a clue by those developers, ignore libedit (including its
11256 # possible alias of libreadline) while checking for everything else.
11257 LIBS_including_readline="$LIBS"
11258 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
11259
11260 for ac_func in cbrt dlopen fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memmove poll pstat readlink setproctitle setsid shm_open sigprocmask symlink sync_file_range towlower utime utimes wcstombs wcstombs_l
11261 do :
11262   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11263 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11264 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11265   cat >>confdefs.h <<_ACEOF
11266 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11267 _ACEOF
11268
11269 fi
11270 done
11271
11272
11273 ac_fn_c_check_func "$LINENO" "fseeko" "ac_cv_func_fseeko"
11274 if test "x$ac_cv_func_fseeko" = xyes; then :
11275   $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
11276
11277 else
11278   case " $LIBOBJS " in
11279   *" fseeko.$ac_objext "* ) ;;
11280   *) LIBOBJS="$LIBOBJS fseeko.$ac_objext"
11281  ;;
11282 esac
11283
11284 fi
11285
11286
11287 case $host_os in
11288         # NetBSD uses a custom fseeko/ftello built on fsetpos/fgetpos
11289         # Mingw uses macros to access Win32 API calls
11290         netbsd*|mingw*)
11291
11292 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
11293
11294                 ac_cv_func_fseeko=yes;;
11295         *)
11296                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
11297 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
11298 if ${ac_cv_sys_largefile_source+:} false; then :
11299   $as_echo_n "(cached) " >&6
11300 else
11301   while :; do
11302   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11303 /* end confdefs.h.  */
11304 #include <sys/types.h> /* for off_t */
11305      #include <stdio.h>
11306 int
11307 main ()
11308 {
11309 int (*fp) (FILE *, off_t, int) = fseeko;
11310      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
11311   ;
11312   return 0;
11313 }
11314 _ACEOF
11315 if ac_fn_c_try_link "$LINENO"; then :
11316   ac_cv_sys_largefile_source=no; break
11317 fi
11318 rm -f core conftest.err conftest.$ac_objext \
11319     conftest$ac_exeext conftest.$ac_ext
11320   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11321 /* end confdefs.h.  */
11322 #define _LARGEFILE_SOURCE 1
11323 #include <sys/types.h> /* for off_t */
11324      #include <stdio.h>
11325 int
11326 main ()
11327 {
11328 int (*fp) (FILE *, off_t, int) = fseeko;
11329      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
11330   ;
11331   return 0;
11332 }
11333 _ACEOF
11334 if ac_fn_c_try_link "$LINENO"; then :
11335   ac_cv_sys_largefile_source=1; break
11336 fi
11337 rm -f core conftest.err conftest.$ac_objext \
11338     conftest$ac_exeext conftest.$ac_ext
11339   ac_cv_sys_largefile_source=unknown
11340   break
11341 done
11342 fi
11343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
11344 $as_echo "$ac_cv_sys_largefile_source" >&6; }
11345 case $ac_cv_sys_largefile_source in #(
11346   no | unknown) ;;
11347   *)
11348 cat >>confdefs.h <<_ACEOF
11349 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
11350 _ACEOF
11351 ;;
11352 esac
11353 rm -rf conftest*
11354
11355 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
11356 # in glibc 2.1.3, but that breaks too many other things.
11357 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
11358 if test $ac_cv_sys_largefile_source != unknown; then
11359
11360 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
11361
11362 fi
11363 ;;
11364 esac
11365
11366 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
11367 # by calling it, 2009-04-02
11368 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
11369 if test "$PORTNAME" != "solaris"; then
11370 for ac_func in posix_fadvise
11371 do :
11372   ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
11373 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
11374   cat >>confdefs.h <<_ACEOF
11375 #define HAVE_POSIX_FADVISE 1
11376 _ACEOF
11377
11378 fi
11379 done
11380
11381 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
11382 "
11383 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
11384   ac_have_decl=1
11385 else
11386   ac_have_decl=0
11387 fi
11388
11389 cat >>confdefs.h <<_ACEOF
11390 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
11391 _ACEOF
11392
11393 fi
11394
11395 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
11396 "
11397 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
11398   ac_have_decl=1
11399 else
11400   ac_have_decl=0
11401 fi
11402
11403 cat >>confdefs.h <<_ACEOF
11404 #define HAVE_DECL_FDATASYNC $ac_have_decl
11405 _ACEOF
11406
11407 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
11408 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
11409   ac_have_decl=1
11410 else
11411   ac_have_decl=0
11412 fi
11413
11414 cat >>confdefs.h <<_ACEOF
11415 #define HAVE_DECL_STRLCAT $ac_have_decl
11416 _ACEOF
11417 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
11418 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
11419   ac_have_decl=1
11420 else
11421   ac_have_decl=0
11422 fi
11423
11424 cat >>confdefs.h <<_ACEOF
11425 #define HAVE_DECL_STRLCPY $ac_have_decl
11426 _ACEOF
11427
11428 # This is probably only present on Darwin, but may as well check always
11429 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
11430 "
11431 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
11432   ac_have_decl=1
11433 else
11434   ac_have_decl=0
11435 fi
11436
11437 cat >>confdefs.h <<_ACEOF
11438 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
11439 _ACEOF
11440
11441
11442 HAVE_IPV6=no
11443 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default
11444 #include <netinet/in.h>
11445 "
11446 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
11447
11448 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
11449
11450          HAVE_IPV6=yes
11451 fi
11452
11453
11454
11455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
11456 $as_echo_n "checking for PS_STRINGS... " >&6; }
11457 if ${pgac_cv_var_PS_STRINGS+:} false; then :
11458   $as_echo_n "(cached) " >&6
11459 else
11460   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11461 /* end confdefs.h.  */
11462 #include <machine/vmparam.h>
11463 #include <sys/exec.h>
11464
11465 int
11466 main ()
11467 {
11468 PS_STRINGS->ps_nargvstr = 1;
11469 PS_STRINGS->ps_argvstr = "foo";
11470   ;
11471   return 0;
11472 }
11473 _ACEOF
11474 if ac_fn_c_try_link "$LINENO"; then :
11475   pgac_cv_var_PS_STRINGS=yes
11476 else
11477   pgac_cv_var_PS_STRINGS=no
11478 fi
11479 rm -f core conftest.err conftest.$ac_objext \
11480     conftest$ac_exeext conftest.$ac_ext
11481 fi
11482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
11483 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
11484 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
11485
11486 $as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
11487
11488 fi
11489
11490
11491 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
11492 # is missing.  Yes, there are machines that have only one.  We may
11493 # also decide to use snprintf.c if snprintf() is present but does not
11494 # have all the features we need --- see below.
11495
11496 if test "$PORTNAME" = "win32"; then
11497   # Win32 gets snprintf.c built unconditionally.
11498   #
11499   # To properly translate all NLS languages strings, we must support the
11500   # *printf() %$ format, which allows *printf() arguments to be selected
11501   # by position in the translated string.
11502   #
11503   # libintl versions < 0.13 use the native *printf() functions, and Win32
11504   # *printf() doesn't understand %$, so we must use our /port versions,
11505   # which do understand %$. libintl versions >= 0.13 include their own
11506   # *printf versions on Win32.  The libintl 0.13 release note text is:
11507   #
11508   #   C format strings with positions, as they arise when a translator
11509   #   needs to reorder a sentence, are now supported on all platforms.
11510   #   On those few platforms (NetBSD and Woe32) for which the native
11511   #   printf()/fprintf()/... functions don't support such format
11512   #   strings, replacements are provided through <libintl.h>.
11513   #
11514   # We could use libintl >= 0.13's *printf() if we were sure that we had
11515   # a litint >= 0.13 at runtime, but seeing that there is no clean way
11516   # to guarantee that, it is best to just use our own, so we are sure to
11517   # get %$ support. In include/port.h we disable the *printf() macros
11518   # that might have been defined by libintl.
11519   #
11520   # We do this unconditionally whether NLS is used or not so we are sure
11521   # that all Win32 libraries and binaries behave the same.
11522   pgac_need_repl_snprintf=yes
11523 else
11524   pgac_need_repl_snprintf=no
11525   for ac_func in snprintf
11526 do :
11527   ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
11528 if test "x$ac_cv_func_snprintf" = xyes; then :
11529   cat >>confdefs.h <<_ACEOF
11530 #define HAVE_SNPRINTF 1
11531 _ACEOF
11532
11533 else
11534   pgac_need_repl_snprintf=yes
11535 fi
11536 done
11537
11538   for ac_func in vsnprintf
11539 do :
11540   ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
11541 if test "x$ac_cv_func_vsnprintf" = xyes; then :
11542   cat >>confdefs.h <<_ACEOF
11543 #define HAVE_VSNPRINTF 1
11544 _ACEOF
11545
11546 else
11547   pgac_need_repl_snprintf=yes
11548 fi
11549 done
11550
11551 fi
11552
11553
11554 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
11555 # include/c.h will provide declarations.  Note this is a separate test
11556 # from whether the functions exist in the C library --- there are
11557 # systems that have the functions but don't bother to declare them :-(
11558
11559 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11560 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
11561   ac_have_decl=1
11562 else
11563   ac_have_decl=0
11564 fi
11565
11566 cat >>confdefs.h <<_ACEOF
11567 #define HAVE_DECL_SNPRINTF $ac_have_decl
11568 _ACEOF
11569 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
11570 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
11571   ac_have_decl=1
11572 else
11573   ac_have_decl=0
11574 fi
11575
11576 cat >>confdefs.h <<_ACEOF
11577 #define HAVE_DECL_VSNPRINTF $ac_have_decl
11578 _ACEOF
11579
11580
11581
11582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf" >&5
11583 $as_echo_n "checking for isinf... " >&6; }
11584 if ${ac_cv_func_isinf+:} false; then :
11585   $as_echo_n "(cached) " >&6
11586 else
11587   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11588 /* end confdefs.h.  */
11589
11590 #include <math.h>
11591 double glob_double;
11592
11593 int
11594 main ()
11595 {
11596 return isinf(glob_double) ? 0 : 1;
11597   ;
11598   return 0;
11599 }
11600 _ACEOF
11601 if ac_fn_c_try_link "$LINENO"; then :
11602   ac_cv_func_isinf=yes
11603 else
11604   ac_cv_func_isinf=no
11605 fi
11606 rm -f core conftest.err conftest.$ac_objext \
11607     conftest$ac_exeext conftest.$ac_ext
11608 fi
11609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_isinf" >&5
11610 $as_echo "$ac_cv_func_isinf" >&6; }
11611
11612 if test $ac_cv_func_isinf = yes ; then
11613
11614 $as_echo "#define HAVE_ISINF 1" >>confdefs.h
11615
11616 else
11617   case " $LIBOBJS " in
11618   *" isinf.$ac_objext "* ) ;;
11619   *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
11620  ;;
11621 esac
11622
11623   # Look for a way to implement a substitute for isinf()
11624   for ac_func in fpclass fp_class fp_class_d class
11625 do :
11626   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11627 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11628 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11629   cat >>confdefs.h <<_ACEOF
11630 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11631 _ACEOF
11632  break
11633 fi
11634 done
11635
11636 fi
11637
11638 ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
11639 if test "x$ac_cv_func_crypt" = xyes; then :
11640   $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
11641
11642 else
11643   case " $LIBOBJS " in
11644   *" crypt.$ac_objext "* ) ;;
11645   *) LIBOBJS="$LIBOBJS crypt.$ac_objext"
11646  ;;
11647 esac
11648
11649 fi
11650
11651 ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
11652 if test "x$ac_cv_func_fls" = xyes; then :
11653   $as_echo "#define HAVE_FLS 1" >>confdefs.h
11654
11655 else
11656   case " $LIBOBJS " in
11657   *" fls.$ac_objext "* ) ;;
11658   *) LIBOBJS="$LIBOBJS fls.$ac_objext"
11659  ;;
11660 esac
11661
11662 fi
11663
11664 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
11665 if test "x$ac_cv_func_getopt" = xyes; then :
11666   $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
11667
11668 else
11669   case " $LIBOBJS " in
11670   *" getopt.$ac_objext "* ) ;;
11671   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
11672  ;;
11673 esac
11674
11675 fi
11676
11677 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
11678 if test "x$ac_cv_func_getrusage" = xyes; then :
11679   $as_echo "#define HAVE_GETRUSAGE 1" >>confdefs.h
11680
11681 else
11682   case " $LIBOBJS " in
11683   *" getrusage.$ac_objext "* ) ;;
11684   *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
11685  ;;
11686 esac
11687
11688 fi
11689
11690 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
11691 if test "x$ac_cv_func_inet_aton" = xyes; then :
11692   $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
11693
11694 else
11695   case " $LIBOBJS " in
11696   *" inet_aton.$ac_objext "* ) ;;
11697   *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
11698  ;;
11699 esac
11700
11701 fi
11702
11703 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
11704 if test "x$ac_cv_func_mkdtemp" = xyes; then :
11705   $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
11706
11707 else
11708   case " $LIBOBJS " in
11709   *" mkdtemp.$ac_objext "* ) ;;
11710   *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
11711  ;;
11712 esac
11713
11714 fi
11715
11716 ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
11717 if test "x$ac_cv_func_random" = xyes; then :
11718   $as_echo "#define HAVE_RANDOM 1" >>confdefs.h
11719
11720 else
11721   case " $LIBOBJS " in
11722   *" random.$ac_objext "* ) ;;
11723   *) LIBOBJS="$LIBOBJS random.$ac_objext"
11724  ;;
11725 esac
11726
11727 fi
11728
11729 ac_fn_c_check_func "$LINENO" "rint" "ac_cv_func_rint"
11730 if test "x$ac_cv_func_rint" = xyes; then :
11731   $as_echo "#define HAVE_RINT 1" >>confdefs.h
11732
11733 else
11734   case " $LIBOBJS " in
11735   *" rint.$ac_objext "* ) ;;
11736   *) LIBOBJS="$LIBOBJS rint.$ac_objext"
11737  ;;
11738 esac
11739
11740 fi
11741
11742 ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
11743 if test "x$ac_cv_func_srandom" = xyes; then :
11744   $as_echo "#define HAVE_SRANDOM 1" >>confdefs.h
11745
11746 else
11747   case " $LIBOBJS " in
11748   *" srandom.$ac_objext "* ) ;;
11749   *) LIBOBJS="$LIBOBJS srandom.$ac_objext"
11750  ;;
11751 esac
11752
11753 fi
11754
11755 ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
11756 if test "x$ac_cv_func_strerror" = xyes; then :
11757   $as_echo "#define HAVE_STRERROR 1" >>confdefs.h
11758
11759 else
11760   case " $LIBOBJS " in
11761   *" strerror.$ac_objext "* ) ;;
11762   *) LIBOBJS="$LIBOBJS strerror.$ac_objext"
11763  ;;
11764 esac
11765
11766 fi
11767
11768 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
11769 if test "x$ac_cv_func_strlcat" = xyes; then :
11770   $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
11771
11772 else
11773   case " $LIBOBJS " in
11774   *" strlcat.$ac_objext "* ) ;;
11775   *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
11776  ;;
11777 esac
11778
11779 fi
11780
11781 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
11782 if test "x$ac_cv_func_strlcpy" = xyes; then :
11783   $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
11784
11785 else
11786   case " $LIBOBJS " in
11787   *" strlcpy.$ac_objext "* ) ;;
11788   *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
11789  ;;
11790 esac
11791
11792 fi
11793
11794
11795
11796 case $host_os in
11797
11798         # Windows uses a specialised env handler
11799         # and doesn't need a replacement getpeereid because it doesn't use
11800         # Unix sockets.
11801         mingw*)
11802
11803 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
11804
11805
11806 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
11807
11808                 ac_cv_func_unsetenv=yes
11809                 ac_cv_func_getpeereid=yes;;
11810         *)
11811                 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
11812 if test "x$ac_cv_func_unsetenv" = xyes; then :
11813   $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
11814
11815 else
11816   case " $LIBOBJS " in
11817   *" unsetenv.$ac_objext "* ) ;;
11818   *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext"
11819  ;;
11820 esac
11821
11822 fi
11823
11824 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
11825 if test "x$ac_cv_func_getpeereid" = xyes; then :
11826   $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
11827
11828 else
11829   case " $LIBOBJS " in
11830   *" getpeereid.$ac_objext "* ) ;;
11831   *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
11832  ;;
11833 esac
11834
11835 fi
11836
11837
11838                 ;;
11839 esac
11840
11841 # System's version of getaddrinfo(), if any, may be used only if we found
11842 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
11843 # We use only our own getaddrinfo.c on Windows, but it's time to revisit that.
11844 if test x"$ac_cv_type_struct_addrinfo" = xyes && \
11845    test "$PORTNAME" != "win32"; then
11846   ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
11847 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
11848   $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
11849
11850 else
11851   case " $LIBOBJS " in
11852   *" getaddrinfo.$ac_objext "* ) ;;
11853   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
11854  ;;
11855 esac
11856
11857 fi
11858
11859
11860 else
11861   case " $LIBOBJS " in
11862   *" getaddrinfo.$ac_objext "* ) ;;
11863   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
11864  ;;
11865 esac
11866
11867 fi
11868
11869 # Similarly, use system's getopt_long() only if system provides struct option.
11870 if test x"$ac_cv_type_struct_option" = xyes ; then
11871   ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
11872 if test "x$ac_cv_func_getopt_long" = xyes; then :
11873   $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
11874
11875 else
11876   case " $LIBOBJS " in
11877   *" getopt_long.$ac_objext "* ) ;;
11878   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
11879  ;;
11880 esac
11881
11882 fi
11883
11884
11885 else
11886   case " $LIBOBJS " in
11887   *" getopt_long.$ac_objext "* ) ;;
11888   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
11889  ;;
11890 esac
11891
11892 fi
11893
11894 # Solaris' getopt() doesn't do what we want for long options, so always use
11895 # our version on that platform.
11896 if test "$PORTNAME" = "solaris"; then
11897   case " $LIBOBJS " in
11898   *" getopt.$ac_objext "* ) ;;
11899   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
11900  ;;
11901 esac
11902
11903 fi
11904
11905 # mingw has adopted a GNU-centric interpretation of optind/optreset,
11906 # so always use our version on Windows.
11907 if test "$PORTNAME" = "win32"; then
11908   case " $LIBOBJS " in
11909   *" getopt.$ac_objext "* ) ;;
11910   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
11911  ;;
11912 esac
11913
11914   case " $LIBOBJS " in
11915   *" getopt_long.$ac_objext "* ) ;;
11916   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
11917  ;;
11918 esac
11919
11920 fi
11921
11922 # Win32 support
11923 if test "$PORTNAME" = "win32"; then
11924   ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
11925 if test "x$ac_cv_func_gettimeofday" = xyes; then :
11926   $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
11927
11928 else
11929   case " $LIBOBJS " in
11930   *" gettimeofday.$ac_objext "* ) ;;
11931   *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
11932  ;;
11933 esac
11934
11935 fi
11936
11937
11938   case " $LIBOBJS " in
11939   *" kill.$ac_objext "* ) ;;
11940   *) LIBOBJS="$LIBOBJS kill.$ac_objext"
11941  ;;
11942 esac
11943
11944   case " $LIBOBJS " in
11945   *" open.$ac_objext "* ) ;;
11946   *) LIBOBJS="$LIBOBJS open.$ac_objext"
11947  ;;
11948 esac
11949
11950   case " $LIBOBJS " in
11951   *" system.$ac_objext "* ) ;;
11952   *) LIBOBJS="$LIBOBJS system.$ac_objext"
11953  ;;
11954 esac
11955
11956   case " $LIBOBJS " in
11957   *" win32env.$ac_objext "* ) ;;
11958   *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
11959  ;;
11960 esac
11961
11962   case " $LIBOBJS " in
11963   *" win32error.$ac_objext "* ) ;;
11964   *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
11965  ;;
11966 esac
11967
11968   case " $LIBOBJS " in
11969   *" win32setlocale.$ac_objext "* ) ;;
11970   *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
11971  ;;
11972 esac
11973
11974
11975 $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
11976
11977   ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
11978 #define WIN32_LEAN_AND_MEAN
11979 #include <windows.h>
11980 #include <string.h>
11981 #include <dbghelp.h>
11982 "
11983 if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
11984
11985 cat >>confdefs.h <<_ACEOF
11986 #define HAVE_MINIDUMP_TYPE 1
11987 _ACEOF
11988
11989 pgac_minidump_type=yes
11990 else
11991   pgac_minidump_type=no
11992 fi
11993
11994 fi
11995 if test x"$pgac_minidump_type" = x"yes" ; then
11996   have_win32_dbghelp=yes
11997
11998 else
11999   have_win32_dbghelp=no
12000
12001 fi
12002
12003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
12004 $as_echo_n "checking for sigsetjmp... " >&6; }
12005 if ${pgac_cv_func_sigsetjmp+:} false; then :
12006   $as_echo_n "(cached) " >&6
12007 else
12008   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12009 /* end confdefs.h.  */
12010 #include <setjmp.h>
12011 int
12012 main ()
12013 {
12014 sigjmp_buf x; sigsetjmp(x, 1);
12015   ;
12016   return 0;
12017 }
12018 _ACEOF
12019 if ac_fn_c_try_link "$LINENO"; then :
12020   pgac_cv_func_sigsetjmp=yes
12021 else
12022   pgac_cv_func_sigsetjmp=no
12023 fi
12024 rm -f core conftest.err conftest.$ac_objext \
12025     conftest$ac_exeext conftest.$ac_ext
12026 fi
12027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_sigsetjmp" >&5
12028 $as_echo "$pgac_cv_func_sigsetjmp" >&6; }
12029 if test x"$pgac_cv_func_sigsetjmp" = x"yes"; then
12030
12031 $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
12032
12033 fi
12034
12035 ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
12036 /* NetBSD declares sys_siglist in unistd.h.  */
12037 #ifdef HAVE_UNISTD_H
12038 # include <unistd.h>
12039 #endif
12040
12041 "
12042 if test "x$ac_cv_have_decl_sys_siglist" = xyes; then :
12043   ac_have_decl=1
12044 else
12045   ac_have_decl=0
12046 fi
12047
12048 cat >>confdefs.h <<_ACEOF
12049 #define HAVE_DECL_SYS_SIGLIST $ac_have_decl
12050 _ACEOF
12051
12052
12053
12054 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
12055 if test "x$ac_cv_func_syslog" = xyes; then :
12056   ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
12057 if test "x$ac_cv_header_syslog_h" = xyes; then :
12058
12059 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
12060
12061 fi
12062
12063
12064 fi
12065
12066
12067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
12068 $as_echo_n "checking for opterr... " >&6; }
12069 if ${pgac_cv_var_int_opterr+:} false; then :
12070   $as_echo_n "(cached) " >&6
12071 else
12072   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12073 /* end confdefs.h.  */
12074 #include <unistd.h>
12075 int
12076 main ()
12077 {
12078 extern int opterr; opterr = 1;
12079   ;
12080   return 0;
12081 }
12082 _ACEOF
12083 if ac_fn_c_try_link "$LINENO"; then :
12084   pgac_cv_var_int_opterr=yes
12085 else
12086   pgac_cv_var_int_opterr=no
12087 fi
12088 rm -f core conftest.err conftest.$ac_objext \
12089     conftest$ac_exeext conftest.$ac_ext
12090 fi
12091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
12092 $as_echo "$pgac_cv_var_int_opterr" >&6; }
12093 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
12094
12095 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
12096
12097 fi
12098
12099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
12100 $as_echo_n "checking for optreset... " >&6; }
12101 if ${pgac_cv_var_int_optreset+:} false; then :
12102   $as_echo_n "(cached) " >&6
12103 else
12104   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12105 /* end confdefs.h.  */
12106 #include <unistd.h>
12107 int
12108 main ()
12109 {
12110 extern int optreset; optreset = 1;
12111   ;
12112   return 0;
12113 }
12114 _ACEOF
12115 if ac_fn_c_try_link "$LINENO"; then :
12116   pgac_cv_var_int_optreset=yes
12117 else
12118   pgac_cv_var_int_optreset=no
12119 fi
12120 rm -f core conftest.err conftest.$ac_objext \
12121     conftest$ac_exeext conftest.$ac_ext
12122 fi
12123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
12124 $as_echo "$pgac_cv_var_int_optreset" >&6; }
12125 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
12126
12127 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
12128
12129 fi
12130
12131 for ac_func in strtoll strtoq
12132 do :
12133   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12134 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12135 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12136   cat >>confdefs.h <<_ACEOF
12137 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12138 _ACEOF
12139  break
12140 fi
12141 done
12142
12143 for ac_func in strtoull strtouq
12144 do :
12145   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12146 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12147 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12148   cat >>confdefs.h <<_ACEOF
12149 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12150 _ACEOF
12151  break
12152 fi
12153 done
12154
12155
12156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin locking functions" >&5
12157 $as_echo_n "checking for builtin locking functions... " >&6; }
12158 if ${pgac_cv_gcc_int_atomics+:} false; then :
12159   $as_echo_n "(cached) " >&6
12160 else
12161   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12162 /* end confdefs.h.  */
12163
12164 int
12165 main ()
12166 {
12167 int lock = 0;
12168    __sync_lock_test_and_set(&lock, 1);
12169    __sync_lock_release(&lock);
12170   ;
12171   return 0;
12172 }
12173 _ACEOF
12174 if ac_fn_c_try_link "$LINENO"; then :
12175   pgac_cv_gcc_int_atomics="yes"
12176 else
12177   pgac_cv_gcc_int_atomics="no"
12178 fi
12179 rm -f core conftest.err conftest.$ac_objext \
12180     conftest$ac_exeext conftest.$ac_ext
12181 fi
12182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_int_atomics" >&5
12183 $as_echo "$pgac_cv_gcc_int_atomics" >&6; }
12184 if test x"$pgac_cv_gcc_int_atomics" = x"yes"; then
12185
12186 $as_echo "#define HAVE_GCC_INT_ATOMICS 1" >>confdefs.h
12187
12188 fi
12189
12190 # Lastly, restore full LIBS list and check for readline/libedit symbols
12191 LIBS="$LIBS_including_readline"
12192
12193 if test "$with_readline" = yes; then
12194   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_append_character" >&5
12195 $as_echo_n "checking for rl_completion_append_character... " >&6; }
12196 if ${pgac_cv_var_rl_completion_append_character+:} false; then :
12197   $as_echo_n "(cached) " >&6
12198 else
12199   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12200 /* end confdefs.h.  */
12201 #include <stdio.h>
12202 #ifdef HAVE_READLINE_READLINE_H
12203 # include <readline/readline.h>
12204 #elif defined(HAVE_READLINE_H)
12205 # include <readline.h>
12206 #endif
12207
12208 int
12209 main ()
12210 {
12211 rl_completion_append_character = 'x';
12212   ;
12213   return 0;
12214 }
12215 _ACEOF
12216 if ac_fn_c_try_link "$LINENO"; then :
12217   pgac_cv_var_rl_completion_append_character=yes
12218 else
12219   pgac_cv_var_rl_completion_append_character=no
12220 fi
12221 rm -f core conftest.err conftest.$ac_objext \
12222     conftest$ac_exeext conftest.$ac_ext
12223 fi
12224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_append_character" >&5
12225 $as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
12226 if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
12227
12228 $as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
12229
12230 fi
12231   for ac_func in rl_completion_matches rl_filename_completion_function
12232 do :
12233   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12234 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12235 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12236   cat >>confdefs.h <<_ACEOF
12237 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12238 _ACEOF
12239
12240 fi
12241 done
12242
12243   for ac_func in append_history history_truncate_file
12244 do :
12245   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12246 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12247 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12248   cat >>confdefs.h <<_ACEOF
12249 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12250 _ACEOF
12251
12252 fi
12253 done
12254
12255 fi
12256
12257
12258 #
12259 # Pthreads
12260 #
12261 # For each platform, we need to know about any special compile and link
12262 # libraries, and whether the normal C function names are thread-safe.
12263 # See the comment at the top of src/port/thread.c for more information.
12264 # WIN32 doesn't need the pthread tests;  it always uses threads
12265 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then
12266
12267
12268
12269 ac_ext=c
12270 ac_cpp='$CPP $CPPFLAGS'
12271 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12272 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12273 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12274
12275 acx_pthread_ok=no
12276
12277 # We used to check for pthread.h first, but this fails if pthread.h
12278 # requires special compiler flags (e.g. on True64 or Sequent).
12279 # It gets checked for in the link test anyway.
12280
12281 # First of all, check if the user has set any of the PTHREAD_LIBS,
12282 # etcetera environment variables, and if threads linking works using
12283 # them:
12284 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
12285         save_CFLAGS="$CFLAGS"
12286         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
12287         save_LIBS="$LIBS"
12288         LIBS="$PTHREAD_LIBS $LIBS"
12289         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
12290 $as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
12291         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12292 /* end confdefs.h.  */
12293
12294 /* Override any GCC internal prototype to avoid an error.
12295    Use char because int might match the return type of a GCC
12296    builtin and then its argument prototype would still apply.  */
12297 #ifdef __cplusplus
12298 extern "C"
12299 #endif
12300 char pthread_join ();
12301 int
12302 main ()
12303 {
12304 return pthread_join ();
12305   ;
12306   return 0;
12307 }
12308 _ACEOF
12309 if ac_fn_c_try_link "$LINENO"; then :
12310   acx_pthread_ok=yes
12311 fi
12312 rm -f core conftest.err conftest.$ac_objext \
12313     conftest$ac_exeext conftest.$ac_ext
12314         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5
12315 $as_echo "$acx_pthread_ok" >&6; }
12316         if test x"$acx_pthread_ok" = xno; then
12317                 PTHREAD_LIBS=""
12318                 PTHREAD_CFLAGS=""
12319         fi
12320         LIBS="$save_LIBS"
12321         CFLAGS="$save_CFLAGS"
12322 fi
12323
12324 # We must check for the threads library under a number of different
12325 # names; the ordering is very important because some systems
12326 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
12327 # libraries is broken (non-POSIX).
12328
12329 # Create a list of thread flags to try.  Items starting with a "-" are
12330 # C compiler flags, and other items are library names, except for "none"
12331 # which indicates that we try without any flags at all, and "pthread-config"
12332 # which is a program returning the flags for the Pth emulation library.
12333
12334 acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config pthreadGC2"
12335
12336 # The ordering *is* (sometimes) important.  Some notes on the
12337 # individual items follow:
12338
12339 # pthreads: AIX (must check this before -lpthread)
12340 # none: in case threads are in libc; should be tried before -Kthread and
12341 #       other compiler flags to prevent continual compiler warnings
12342 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
12343 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
12344 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
12345 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
12346 # -pthreads: Solaris/gcc
12347 # -mthreads: Mingw32/gcc, Lynx/gcc
12348 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
12349 #      doesn't hurt to check since this sometimes defines pthreads too;
12350 #      also defines -D_REENTRANT)
12351 # pthread: Linux, etcetera
12352 # --thread-safe: KAI C++
12353 # pthread-config: use pthread-config program (for GNU Pth library)
12354
12355 case "${host_cpu}-${host_os}" in
12356         *solaris*)
12357
12358         # On Solaris (at least, for some versions), libc contains stubbed
12359         # (non-functional) versions of the pthreads routines, so link-based
12360         # tests will erroneously succeed.  (We need to link with -pthread or
12361         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
12362         # a function called by this macro, so we could check for that, but
12363         # who knows whether they'll stub that too in a future libc.)  So,
12364         # we'll just look for -pthreads and -lpthread first:
12365
12366         acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
12367         ;;
12368 esac
12369
12370 if test x"$acx_pthread_ok" = xno; then
12371 for flag in $acx_pthread_flags; do
12372
12373         tryPTHREAD_CFLAGS=""
12374         tryPTHREAD_LIBS=""
12375         case $flag in
12376                 none)
12377                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
12378 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
12379                 ;;
12380
12381                 -*)
12382                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
12383 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
12384                 tryPTHREAD_CFLAGS="$flag"
12385                 ;;
12386
12387                 pthread-config)
12388                 # skip this if we already have flags defined, for PostgreSQL
12389                 if test x"$PTHREAD_CFLAGS" != x -o x"$PTHREAD_LIBS" != x; then continue; fi
12390                 # Extract the first word of "pthread-config", so it can be a program name with args.
12391 set dummy pthread-config; ac_word=$2
12392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12393 $as_echo_n "checking for $ac_word... " >&6; }
12394 if ${ac_cv_prog_acx_pthread_config+:} false; then :
12395   $as_echo_n "(cached) " >&6
12396 else
12397   if test -n "$acx_pthread_config"; then
12398   ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
12399 else
12400 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12401 for as_dir in $PATH
12402 do
12403   IFS=$as_save_IFS
12404   test -z "$as_dir" && as_dir=.
12405     for ac_exec_ext in '' $ac_executable_extensions; do
12406   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12407     ac_cv_prog_acx_pthread_config="yes"
12408     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12409     break 2
12410   fi
12411 done
12412   done
12413 IFS=$as_save_IFS
12414
12415   test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
12416 fi
12417 fi
12418 acx_pthread_config=$ac_cv_prog_acx_pthread_config
12419 if test -n "$acx_pthread_config"; then
12420   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_config" >&5
12421 $as_echo "$acx_pthread_config" >&6; }
12422 else
12423   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12424 $as_echo "no" >&6; }
12425 fi
12426
12427
12428                 if test x"$acx_pthread_config" = xno; then continue; fi
12429                 tryPTHREAD_CFLAGS="`pthread-config --cflags`"
12430                 tryPTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
12431                 ;;
12432
12433                 *)
12434                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
12435 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
12436                 tryPTHREAD_LIBS="-l$flag"
12437                 ;;
12438         esac
12439
12440         save_LIBS="$LIBS"
12441         save_CFLAGS="$CFLAGS"
12442         LIBS="$tryPTHREAD_LIBS $PTHREAD_LIBS $LIBS"
12443         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
12444
12445         # Check for various functions.  We must include pthread.h,
12446         # since some functions may be macros.  (On the Sequent, we
12447         # need a special flag -Kthread to make this header compile.)
12448         # We check for pthread_join because it is in -lpthread on IRIX
12449         # while pthread_create is in libc.  We check for pthread_attr_init
12450         # due to DEC craziness with -lpthreads.  We check for
12451         # pthread_cleanup_push because it is one of the few pthread
12452         # functions on Solaris that doesn't have a non-functional libc stub.
12453         # We try pthread_create on general principles.
12454         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12455 /* end confdefs.h.  */
12456 #include <pthread.h>
12457 int
12458 main ()
12459 {
12460 pthread_t th; pthread_join(th, 0);
12461                      pthread_attr_init(0); pthread_cleanup_push(0, 0);
12462                      pthread_create(0,0,0,0); pthread_cleanup_pop(0);
12463   ;
12464   return 0;
12465 }
12466 _ACEOF
12467 if ac_fn_c_try_link "$LINENO"; then :
12468   acx_pthread_ok=yes
12469 else
12470   acx_pthread_ok=no
12471 fi
12472 rm -f core conftest.err conftest.$ac_objext \
12473     conftest$ac_exeext conftest.$ac_ext
12474
12475         if test "x$acx_pthread_ok" = xyes; then
12476             # Don't use options that are ignored by the compiler.
12477             # We find them by checking stderror.
12478             cat >conftest.$ac_ext <<_ACEOF
12479 int
12480 main (int argc, char **argv)
12481 {
12482   (void) argc;
12483   (void) argv;
12484   return 0;
12485 }
12486 _ACEOF
12487             rm -f conftest.$ac_objext conftest$ac_exeext
12488             # Check both linking and compiling, because they might tolerate different options.
12489             if test "`(eval $ac_link 2>&1 1>&5)`" = "" && test "`(eval $ac_compile 2>&1 1>&5)`" = ""; then
12490                 # The original macro breaks out of the loop at this point,
12491                 # but we continue trying flags because Linux needs -lpthread
12492                 # too to build libpq successfully.  The test above only
12493                 # tests for building binaries, not shared libraries.
12494                 PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
12495                 PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
12496             else   acx_pthread_ok=no
12497             fi
12498         fi
12499
12500         LIBS="$save_LIBS"
12501         CFLAGS="$save_CFLAGS"
12502
12503         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5
12504 $as_echo "$acx_pthread_ok" >&6; }
12505 done
12506 fi
12507
12508 # The original macro has a bunch of other tests here, which we have removed
12509 # because (a) Postgres doesn't need them, and (b) $acx_pthread_ok is not
12510 # meaningful at this point.
12511
12512
12513
12514
12515 ac_ext=c
12516 ac_cpp='$CPP $CPPFLAGS'
12517 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12518 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12519 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12520
12521         # set thread flags
12522
12523 # Some platforms use these, so just define them.  They can't hurt if they
12524 # are not supported.  For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
12525 # enables 5-arg getpwuid_r, among other things.
12526 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
12527
12528 # Check for *_r functions
12529 _CFLAGS="$CFLAGS"
12530 _LIBS="$LIBS"
12531 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
12532 LIBS="$LIBS $PTHREAD_LIBS"
12533
12534 if test "$PORTNAME" != "win32"; then
12535 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
12536 if test "x$ac_cv_header_pthread_h" = xyes; then :
12537
12538 else
12539   as_fn_error $? "
12540 pthread.h not found;  use --disable-thread-safety to disable thread safety" "$LINENO" 5
12541 fi
12542
12543
12544 fi
12545
12546 for ac_func in strerror_r getpwuid_r gethostbyname_r
12547 do :
12548   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12549 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12550 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12551   cat >>confdefs.h <<_ACEOF
12552 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12553 _ACEOF
12554
12555 fi
12556 done
12557
12558
12559 # Do test here with the proper thread flags
12560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpwuid_r takes a fifth argument" >&5
12561 $as_echo_n "checking whether getpwuid_r takes a fifth argument... " >&6; }
12562 if ${pgac_cv_func_getpwuid_r_5arg+:} false; then :
12563   $as_echo_n "(cached) " >&6
12564 else
12565   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12566 /* end confdefs.h.  */
12567 #include <sys/types.h>
12568 #include <pwd.h>
12569 int
12570 main ()
12571 {
12572 uid_t uid;
12573 struct passwd *space;
12574 char *buf;
12575 size_t bufsize;
12576 struct passwd **result;
12577 getpwuid_r(uid, space, buf, bufsize, result);
12578   ;
12579   return 0;
12580 }
12581 _ACEOF
12582 if ac_fn_c_try_compile "$LINENO"; then :
12583   pgac_cv_func_getpwuid_r_5arg=yes
12584 else
12585   pgac_cv_func_getpwuid_r_5arg=no
12586 fi
12587 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12588 fi
12589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_getpwuid_r_5arg" >&5
12590 $as_echo "$pgac_cv_func_getpwuid_r_5arg" >&6; }
12591 if test x"$pgac_cv_func_getpwuid_r_5arg" = xyes ; then
12592
12593 $as_echo "#define GETPWUID_R_5ARG 1" >>confdefs.h
12594
12595 fi
12596
12597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
12598 $as_echo_n "checking whether strerror_r returns int... " >&6; }
12599 if ${pgac_cv_func_strerror_r_int+:} false; then :
12600   $as_echo_n "(cached) " >&6
12601 else
12602   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12603 /* end confdefs.h.  */
12604 #include <string.h>
12605 int
12606 main ()
12607 {
12608 #ifndef _AIX
12609 int strerror_r(int, char *, size_t);
12610 #else
12611 /* Older AIX has 'int' for the third argument so we don't test the args. */
12612 int strerror_r();
12613 #endif
12614   ;
12615   return 0;
12616 }
12617 _ACEOF
12618 if ac_fn_c_try_compile "$LINENO"; then :
12619   pgac_cv_func_strerror_r_int=yes
12620 else
12621   pgac_cv_func_strerror_r_int=no
12622 fi
12623 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12624 fi
12625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
12626 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
12627 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
12628
12629 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
12630
12631 fi
12632
12633
12634 CFLAGS="$_CFLAGS"
12635 LIBS="$_LIBS"
12636
12637 else
12638 # do not use values from template file
12639 PTHREAD_CFLAGS=
12640 PTHREAD_LIBS=
12641 fi
12642
12643
12644
12645
12646
12647 # We can test for libldap_r only after we know PTHREAD_LIBS
12648 if test "$with_ldap" = yes ; then
12649   _LIBS="$LIBS"
12650   if test "$PORTNAME" != "win32"; then
12651     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
12652 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
12653 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
12654   $as_echo_n "(cached) " >&6
12655 else
12656   ac_check_lib_save_LIBS=$LIBS
12657 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
12658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12659 /* end confdefs.h.  */
12660
12661 /* Override any GCC internal prototype to avoid an error.
12662    Use char because int might match the return type of a GCC
12663    builtin and then its argument prototype would still apply.  */
12664 #ifdef __cplusplus
12665 extern "C"
12666 #endif
12667 char ldap_bind ();
12668 int
12669 main ()
12670 {
12671 return ldap_bind ();
12672   ;
12673   return 0;
12674 }
12675 _ACEOF
12676 if ac_fn_c_try_link "$LINENO"; then :
12677   ac_cv_lib_ldap_ldap_bind=yes
12678 else
12679   ac_cv_lib_ldap_ldap_bind=no
12680 fi
12681 rm -f core conftest.err conftest.$ac_objext \
12682     conftest$ac_exeext conftest.$ac_ext
12683 LIBS=$ac_check_lib_save_LIBS
12684 fi
12685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
12686 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
12687 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
12688   cat >>confdefs.h <<_ACEOF
12689 #define HAVE_LIBLDAP 1
12690 _ACEOF
12691
12692   LIBS="-lldap $LIBS"
12693
12694 else
12695   as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
12696 fi
12697
12698     LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
12699     if test "$enable_thread_safety" = yes; then
12700       # on some platforms ldap_r fails to link without PTHREAD_LIBS
12701       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_simple_bind in -lldap_r" >&5
12702 $as_echo_n "checking for ldap_simple_bind in -lldap_r... " >&6; }
12703 if ${ac_cv_lib_ldap_r_ldap_simple_bind+:} false; then :
12704   $as_echo_n "(cached) " >&6
12705 else
12706   ac_check_lib_save_LIBS=$LIBS
12707 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
12708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12709 /* end confdefs.h.  */
12710
12711 /* Override any GCC internal prototype to avoid an error.
12712    Use char because int might match the return type of a GCC
12713    builtin and then its argument prototype would still apply.  */
12714 #ifdef __cplusplus
12715 extern "C"
12716 #endif
12717 char ldap_simple_bind ();
12718 int
12719 main ()
12720 {
12721 return ldap_simple_bind ();
12722   ;
12723   return 0;
12724 }
12725 _ACEOF
12726 if ac_fn_c_try_link "$LINENO"; then :
12727   ac_cv_lib_ldap_r_ldap_simple_bind=yes
12728 else
12729   ac_cv_lib_ldap_r_ldap_simple_bind=no
12730 fi
12731 rm -f core conftest.err conftest.$ac_objext \
12732     conftest$ac_exeext conftest.$ac_ext
12733 LIBS=$ac_check_lib_save_LIBS
12734 fi
12735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
12736 $as_echo "$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
12737 if test "x$ac_cv_lib_ldap_r_ldap_simple_bind" = xyes; then :
12738   cat >>confdefs.h <<_ACEOF
12739 #define HAVE_LIBLDAP_R 1
12740 _ACEOF
12741
12742   LIBS="-lldap_r $LIBS"
12743
12744 else
12745   as_fn_error $? "library 'ldap_r' is required for LDAP" "$LINENO" 5
12746 fi
12747
12748       LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
12749     else
12750       LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
12751     fi
12752   else
12753     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
12754 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
12755 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
12756   $as_echo_n "(cached) " >&6
12757 else
12758   ac_check_lib_save_LIBS=$LIBS
12759 LIBS="-lwldap32  $LIBS"
12760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12761 /* end confdefs.h.  */
12762
12763 /* Override any GCC internal prototype to avoid an error.
12764    Use char because int might match the return type of a GCC
12765    builtin and then its argument prototype would still apply.  */
12766 #ifdef __cplusplus
12767 extern "C"
12768 #endif
12769 char ldap_bind ();
12770 int
12771 main ()
12772 {
12773 return ldap_bind ();
12774   ;
12775   return 0;
12776 }
12777 _ACEOF
12778 if ac_fn_c_try_link "$LINENO"; then :
12779   ac_cv_lib_wldap32_ldap_bind=yes
12780 else
12781   ac_cv_lib_wldap32_ldap_bind=no
12782 fi
12783 rm -f core conftest.err conftest.$ac_objext \
12784     conftest$ac_exeext conftest.$ac_ext
12785 LIBS=$ac_check_lib_save_LIBS
12786 fi
12787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
12788 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
12789 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
12790   cat >>confdefs.h <<_ACEOF
12791 #define HAVE_LIBWLDAP32 1
12792 _ACEOF
12793
12794   LIBS="-lwldap32 $LIBS"
12795
12796 else
12797   as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
12798 fi
12799
12800     LDAP_LIBS_FE="-lwldap32"
12801     LDAP_LIBS_BE="-lwldap32"
12802   fi
12803   LIBS="$_LIBS"
12804 fi
12805
12806
12807
12808
12809 # This test makes sure that run tests work at all.  Sometimes a shared
12810 # library is found by the linker, but the runtime linker can't find it.
12811 # This check should come after all modifications of compiler or linker
12812 # variables, and before any other run tests.
12813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
12814 $as_echo_n "checking test program... " >&6; }
12815 if test "$cross_compiling" = yes; then :
12816   { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
12817 $as_echo "cross-compiling" >&6; }
12818 else
12819   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12820 /* end confdefs.h.  */
12821 int main() { return 0; }
12822 _ACEOF
12823 if ac_fn_c_try_run "$LINENO"; then :
12824   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
12825 $as_echo "ok" >&6; }
12826 else
12827   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
12828 $as_echo "failed" >&6; }
12829 as_fn_error $? "
12830 Could not execute a simple test program.  This may be a problem
12831 related to locating shared libraries.  Check the file 'config.log'
12832 for the exact reason." "$LINENO" 5
12833 fi
12834 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12835   conftest.$ac_objext conftest.beam conftest.$ac_ext
12836 fi
12837
12838
12839 # --------------------
12840 # Run tests below here
12841 # --------------------
12842
12843 # Force use of our snprintf if system's doesn't do arg control
12844 # See comment above at snprintf test for details.
12845 if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
12846   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports argument control" >&5
12847 $as_echo_n "checking whether snprintf supports argument control... " >&6; }
12848 if ${pgac_cv_snprintf_arg_control+:} false; then :
12849   $as_echo_n "(cached) " >&6
12850 else
12851   if test "$cross_compiling" = yes; then :
12852   pgac_cv_snprintf_arg_control=cross
12853 else
12854   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12855 /* end confdefs.h.  */
12856 #include <stdio.h>
12857 #include <string.h>
12858
12859 int main()
12860 {
12861   char buf[100];
12862
12863   /* can it swap arguments? */
12864   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
12865   if (strcmp(buf, "4 3") != 0)
12866     return 1;
12867   return 0;
12868 }
12869 _ACEOF
12870 if ac_fn_c_try_run "$LINENO"; then :
12871   pgac_cv_snprintf_arg_control=yes
12872 else
12873   pgac_cv_snprintf_arg_control=no
12874 fi
12875 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12876   conftest.$ac_objext conftest.beam conftest.$ac_ext
12877 fi
12878
12879
12880 fi
12881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_arg_control" >&5
12882 $as_echo "$pgac_cv_snprintf_arg_control" >&6; }
12883
12884   if test $pgac_cv_snprintf_arg_control != yes ; then
12885     pgac_need_repl_snprintf=yes
12886   fi
12887 fi
12888
12889
12890
12891
12892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
12893 $as_echo_n "checking whether long int is 64 bits... " >&6; }
12894 if ${pgac_cv_type_long_int_64+:} false; then :
12895   $as_echo_n "(cached) " >&6
12896 else
12897   if test "$cross_compiling" = yes; then :
12898   # If cross-compiling, check the size reported by the compiler and
12899 # trust that the arithmetic works.
12900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12901 /* end confdefs.h.  */
12902
12903 int
12904 main ()
12905 {
12906 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
12907 test_array [0] = 0;
12908 return test_array [0];
12909
12910   ;
12911   return 0;
12912 }
12913 _ACEOF
12914 if ac_fn_c_try_compile "$LINENO"; then :
12915   pgac_cv_type_long_int_64=yes
12916 else
12917   pgac_cv_type_long_int_64=no
12918 fi
12919 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12920 else
12921   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12922 /* end confdefs.h.  */
12923 typedef long int ac_int64;
12924
12925 /*
12926  * These are globals to discourage the compiler from folding all the
12927  * arithmetic tests down to compile-time constants.
12928  */
12929 ac_int64 a = 20000001;
12930 ac_int64 b = 40000005;
12931
12932 int does_int64_work()
12933 {
12934   ac_int64 c,d;
12935
12936   if (sizeof(ac_int64) != 8)
12937     return 0;                   /* definitely not the right size */
12938
12939   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
12940   c = a * b;
12941   d = (c + b) / b;
12942   if (d != a+1)
12943     return 0;
12944   return 1;
12945 }
12946 main() {
12947   exit(! does_int64_work());
12948 }
12949 _ACEOF
12950 if ac_fn_c_try_run "$LINENO"; then :
12951   pgac_cv_type_long_int_64=yes
12952 else
12953   pgac_cv_type_long_int_64=no
12954 fi
12955 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12956   conftest.$ac_objext conftest.beam conftest.$ac_ext
12957 fi
12958
12959 fi
12960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
12961 $as_echo "$pgac_cv_type_long_int_64" >&6; }
12962
12963 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
12964 if test x"$pgac_cv_type_long_int_64" = xyes ; then
12965
12966 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
12967
12968 fi
12969
12970
12971 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
12972   pg_int64_type="long int"
12973 else
12974   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
12975 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
12976 if ${pgac_cv_type_long_long_int_64+:} false; then :
12977   $as_echo_n "(cached) " >&6
12978 else
12979   if test "$cross_compiling" = yes; then :
12980   # If cross-compiling, check the size reported by the compiler and
12981 # trust that the arithmetic works.
12982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12983 /* end confdefs.h.  */
12984
12985 int
12986 main ()
12987 {
12988 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
12989 test_array [0] = 0;
12990 return test_array [0];
12991
12992   ;
12993   return 0;
12994 }
12995 _ACEOF
12996 if ac_fn_c_try_compile "$LINENO"; then :
12997   pgac_cv_type_long_long_int_64=yes
12998 else
12999   pgac_cv_type_long_long_int_64=no
13000 fi
13001 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13002 else
13003   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13004 /* end confdefs.h.  */
13005 typedef long long int ac_int64;
13006
13007 /*
13008  * These are globals to discourage the compiler from folding all the
13009  * arithmetic tests down to compile-time constants.
13010  */
13011 ac_int64 a = 20000001;
13012 ac_int64 b = 40000005;
13013
13014 int does_int64_work()
13015 {
13016   ac_int64 c,d;
13017
13018   if (sizeof(ac_int64) != 8)
13019     return 0;                   /* definitely not the right size */
13020
13021   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
13022   c = a * b;
13023   d = (c + b) / b;
13024   if (d != a+1)
13025     return 0;
13026   return 1;
13027 }
13028 main() {
13029   exit(! does_int64_work());
13030 }
13031 _ACEOF
13032 if ac_fn_c_try_run "$LINENO"; then :
13033   pgac_cv_type_long_long_int_64=yes
13034 else
13035   pgac_cv_type_long_long_int_64=no
13036 fi
13037 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13038   conftest.$ac_objext conftest.beam conftest.$ac_ext
13039 fi
13040
13041 fi
13042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
13043 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
13044
13045 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
13046 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
13047
13048 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
13049
13050 fi
13051
13052   if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
13053     pg_int64_type="long long int"
13054   else
13055     as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
13056   fi
13057 fi
13058
13059
13060 cat >>confdefs.h <<_ACEOF
13061 #define PG_INT64_TYPE $pg_int64_type
13062 _ACEOF
13063
13064
13065
13066 if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
13067   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13068 /* end confdefs.h.  */
13069
13070 #define INT64CONST(x)  x##LL
13071 long long int foo = INT64CONST(0x1234567890123456);
13072
13073 int
13074 main ()
13075 {
13076
13077   ;
13078   return 0;
13079 }
13080 _ACEOF
13081 if ac_fn_c_try_compile "$LINENO"; then :
13082
13083 $as_echo "#define HAVE_LL_CONSTANTS 1" >>confdefs.h
13084
13085 fi
13086 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13087 fi
13088
13089
13090 # If we found "long int" is 64 bits, assume snprintf handles it.  If
13091 # we found we need to use "long long int", better check.  We cope with
13092 # snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
13093 # work, fall back to our own snprintf emulation (which we know uses %lld).
13094
13095 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
13096   if test $pgac_need_repl_snprintf = no; then
13097     { $as_echo "$as_me:${as_lineno-$LINENO}: checking snprintf length modifier for long long int" >&5
13098 $as_echo_n "checking snprintf length modifier for long long int... " >&6; }
13099 if ${pgac_cv_snprintf_long_long_int_modifier+:} false; then :
13100   $as_echo_n "(cached) " >&6
13101 else
13102   for pgac_modifier in 'll' 'q' 'I64'; do
13103 if test "$cross_compiling" = yes; then :
13104   pgac_cv_snprintf_long_long_int_modifier=cross; break
13105 else
13106   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13107 /* end confdefs.h.  */
13108 #include <stdio.h>
13109 typedef long long int ac_int64;
13110 #define INT64_FORMAT "%${pgac_modifier}d"
13111
13112 ac_int64 a = 20000001;
13113 ac_int64 b = 40000005;
13114
13115 int does_int64_snprintf_work()
13116 {
13117   ac_int64 c;
13118   char buf[100];
13119
13120   if (sizeof(ac_int64) != 8)
13121     return 0;                   /* doesn't look like the right size */
13122
13123   c = a * b;
13124   snprintf(buf, 100, INT64_FORMAT, c);
13125   if (strcmp(buf, "800000140000005") != 0)
13126     return 0;                   /* either multiply or snprintf is busted */
13127   return 1;
13128 }
13129 main() {
13130   exit(! does_int64_snprintf_work());
13131 }
13132 _ACEOF
13133 if ac_fn_c_try_run "$LINENO"; then :
13134   pgac_cv_snprintf_long_long_int_modifier=$pgac_modifier; break
13135 fi
13136 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13137   conftest.$ac_objext conftest.beam conftest.$ac_ext
13138 fi
13139
13140 done
13141 fi
13142
13143 LONG_LONG_INT_MODIFIER=''
13144
13145 case $pgac_cv_snprintf_long_long_int_modifier in
13146   cross) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot test (not on host machine)" >&5
13147 $as_echo "cannot test (not on host machine)" >&6; };;
13148   ?*)    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_long_long_int_modifier" >&5
13149 $as_echo "$pgac_cv_snprintf_long_long_int_modifier" >&6; }
13150          LONG_LONG_INT_MODIFIER=$pgac_cv_snprintf_long_long_int_modifier;;
13151   *)     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13152 $as_echo "none" >&6; };;
13153 esac
13154     if test "$LONG_LONG_INT_MODIFIER" = ""; then
13155       # Force usage of our own snprintf, since system snprintf is broken
13156       pgac_need_repl_snprintf=yes
13157       LONG_LONG_INT_MODIFIER='ll'
13158     fi
13159   else
13160     # Here if we previously decided we needed to use our own snprintf
13161     LONG_LONG_INT_MODIFIER='ll'
13162   fi
13163 else
13164   # Here if we are not using 'long long int' at all
13165   LONG_LONG_INT_MODIFIER='l'
13166 fi
13167
13168 INT64_MODIFIER="\"$LONG_LONG_INT_MODIFIER\""
13169
13170
13171 cat >>confdefs.h <<_ACEOF
13172 #define INT64_MODIFIER $INT64_MODIFIER
13173 _ACEOF
13174
13175
13176 # Also force use of our snprintf if the system's doesn't support the %z flag.
13177 if test "$pgac_need_repl_snprintf" = no; then
13178   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports the %z modifier" >&5
13179 $as_echo_n "checking whether snprintf supports the %z modifier... " >&6; }
13180 if ${pgac_cv_snprintf_size_t_support+:} false; then :
13181   $as_echo_n "(cached) " >&6
13182 else
13183   if test "$cross_compiling" = yes; then :
13184   pgac_cv_snprintf_size_t_support=cross
13185 else
13186   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13187 /* end confdefs.h.  */
13188 #include <stdio.h>
13189 #include <string.h>
13190
13191 int main()
13192 {
13193   char bufz[100];
13194   char buf64[100];
13195
13196   /*
13197    * Print the largest unsigned number fitting in a size_t using both %zu
13198    * and the previously-determined format for 64-bit integers.  Note that
13199    * we don't run this code unless we know snprintf handles 64-bit ints.
13200    */
13201   bufz[0] = '\0';  /* in case snprintf fails to emit anything */
13202   snprintf(bufz, sizeof(bufz), "%zu", ~((size_t) 0));
13203   snprintf(buf64, sizeof(buf64), UINT64_FORMAT, (PG_INT64_TYPE) ~((size_t) 0));
13204   if (strcmp(bufz, buf64) != 0)
13205     return 1;
13206   return 0;
13207 }
13208 _ACEOF
13209 if ac_fn_c_try_run "$LINENO"; then :
13210   pgac_cv_snprintf_size_t_support=yes
13211 else
13212   pgac_cv_snprintf_size_t_support=no
13213 fi
13214 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13215   conftest.$ac_objext conftest.beam conftest.$ac_ext
13216 fi
13217
13218
13219 fi
13220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_size_t_support" >&5
13221 $as_echo "$pgac_cv_snprintf_size_t_support" >&6; }
13222
13223   if test "$pgac_cv_snprintf_size_t_support" != yes; then
13224     pgac_need_repl_snprintf=yes
13225   fi
13226 fi
13227
13228 # Now we have checked all the reasons to replace snprintf
13229 if test $pgac_need_repl_snprintf = yes; then
13230
13231 $as_echo "#define USE_REPL_SNPRINTF 1" >>confdefs.h
13232
13233   case " $LIBOBJS " in
13234   *" snprintf.$ac_objext "* ) ;;
13235   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
13236  ;;
13237 esac
13238
13239 fi
13240
13241 # Check size of void *, size_t (enables tweaks for > 32bit address space)
13242 # The cast to long int works around a bug in the HP C Compiler
13243 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13244 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13245 # This bug is HP SR number 8606223364.
13246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
13247 $as_echo_n "checking size of void *... " >&6; }
13248 if ${ac_cv_sizeof_void_p+:} false; then :
13249   $as_echo_n "(cached) " >&6
13250 else
13251   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
13252
13253 else
13254   if test "$ac_cv_type_void_p" = yes; then
13255      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13256 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13257 as_fn_error 77 "cannot compute sizeof (void *)
13258 See \`config.log' for more details" "$LINENO" 5; }
13259    else
13260      ac_cv_sizeof_void_p=0
13261    fi
13262 fi
13263
13264 fi
13265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
13266 $as_echo "$ac_cv_sizeof_void_p" >&6; }
13267
13268
13269
13270 cat >>confdefs.h <<_ACEOF
13271 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
13272 _ACEOF
13273
13274
13275 # The cast to long int works around a bug in the HP C Compiler
13276 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13277 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13278 # This bug is HP SR number 8606223364.
13279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
13280 $as_echo_n "checking size of size_t... " >&6; }
13281 if ${ac_cv_sizeof_size_t+:} false; then :
13282   $as_echo_n "(cached) " >&6
13283 else
13284   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
13285
13286 else
13287   if test "$ac_cv_type_size_t" = yes; then
13288      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13289 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13290 as_fn_error 77 "cannot compute sizeof (size_t)
13291 See \`config.log' for more details" "$LINENO" 5; }
13292    else
13293      ac_cv_sizeof_size_t=0
13294    fi
13295 fi
13296
13297 fi
13298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
13299 $as_echo "$ac_cv_sizeof_size_t" >&6; }
13300
13301
13302
13303 cat >>confdefs.h <<_ACEOF
13304 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
13305 _ACEOF
13306
13307
13308 # The cast to long int works around a bug in the HP C Compiler
13309 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13310 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13311 # This bug is HP SR number 8606223364.
13312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
13313 $as_echo_n "checking size of long... " >&6; }
13314 if ${ac_cv_sizeof_long+:} false; then :
13315   $as_echo_n "(cached) " >&6
13316 else
13317   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
13318
13319 else
13320   if test "$ac_cv_type_long" = yes; then
13321      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13322 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13323 as_fn_error 77 "cannot compute sizeof (long)
13324 See \`config.log' for more details" "$LINENO" 5; }
13325    else
13326      ac_cv_sizeof_long=0
13327    fi
13328 fi
13329
13330 fi
13331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
13332 $as_echo "$ac_cv_sizeof_long" >&6; }
13333
13334
13335
13336 cat >>confdefs.h <<_ACEOF
13337 #define SIZEOF_LONG $ac_cv_sizeof_long
13338 _ACEOF
13339
13340
13341
13342 # Decide whether float4 is passed by value: user-selectable, enabled by default
13343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float4 passed by value" >&5
13344 $as_echo_n "checking whether to build with float4 passed by value... " >&6; }
13345
13346
13347 # Check whether --enable-float4-byval was given.
13348 if test "${enable_float4_byval+set}" = set; then :
13349   enableval=$enable_float4_byval;
13350   case $enableval in
13351     yes)
13352
13353 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
13354
13355                float4passbyval=true
13356       ;;
13357     no)
13358       float4passbyval=false
13359       ;;
13360     *)
13361       as_fn_error $? "no argument expected for --enable-float4-byval option" "$LINENO" 5
13362       ;;
13363   esac
13364
13365 else
13366   enable_float4_byval=yes
13367
13368 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
13369
13370                float4passbyval=true
13371 fi
13372
13373
13374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float4_byval" >&5
13375 $as_echo "$enable_float4_byval" >&6; }
13376
13377 cat >>confdefs.h <<_ACEOF
13378 #define FLOAT4PASSBYVAL $float4passbyval
13379 _ACEOF
13380
13381
13382 # Decide whether float8 is passed by value.
13383 # Note: this setting also controls int8 and related types such as timestamp.
13384 # If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
13385 # If not, trying to select it is an error.
13386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float8 passed by value" >&5
13387 $as_echo_n "checking whether to build with float8 passed by value... " >&6; }
13388 if test $ac_cv_sizeof_void_p -ge 8 ; then
13389
13390
13391 # Check whether --enable-float8-byval was given.
13392 if test "${enable_float8_byval+set}" = set; then :
13393   enableval=$enable_float8_byval;
13394   case $enableval in
13395     yes)
13396       :
13397       ;;
13398     no)
13399       :
13400       ;;
13401     *)
13402       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
13403       ;;
13404   esac
13405
13406 else
13407   enable_float8_byval=yes
13408
13409 fi
13410
13411
13412 else
13413
13414
13415 # Check whether --enable-float8-byval was given.
13416 if test "${enable_float8_byval+set}" = set; then :
13417   enableval=$enable_float8_byval;
13418   case $enableval in
13419     yes)
13420       :
13421       ;;
13422     no)
13423       :
13424       ;;
13425     *)
13426       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
13427       ;;
13428   esac
13429
13430 else
13431   enable_float8_byval=no
13432
13433 fi
13434
13435
13436   if test "$enable_float8_byval" = yes ; then
13437     as_fn_error $? "--enable-float8-byval is not supported on 32-bit platforms." "$LINENO" 5
13438   fi
13439 fi
13440 if test "$enable_float8_byval" = yes ; then
13441
13442 $as_echo "#define USE_FLOAT8_BYVAL 1" >>confdefs.h
13443
13444   float8passbyval=true
13445 else
13446   float8passbyval=false
13447 fi
13448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float8_byval" >&5
13449 $as_echo "$enable_float8_byval" >&6; }
13450
13451 cat >>confdefs.h <<_ACEOF
13452 #define FLOAT8PASSBYVAL $float8passbyval
13453 _ACEOF
13454
13455
13456 # Determine memory alignment requirements for the basic C data types.
13457
13458 # The cast to long int works around a bug in the HP C Compiler,
13459 # see AC_CHECK_SIZEOF for more information.
13460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
13461 $as_echo_n "checking alignment of short... " >&6; }
13462 if ${ac_cv_alignof_short+:} false; then :
13463   $as_echo_n "(cached) " >&6
13464 else
13465   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short"        "$ac_includes_default
13466 #ifndef offsetof
13467 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13468 #endif
13469 typedef struct { char x; short y; } ac__type_alignof_;"; then :
13470
13471 else
13472   if test "$ac_cv_type_short" = yes; then
13473      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13474 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13475 as_fn_error 77 "cannot compute alignment of short
13476 See \`config.log' for more details" "$LINENO" 5; }
13477    else
13478      ac_cv_alignof_short=0
13479    fi
13480 fi
13481
13482 fi
13483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
13484 $as_echo "$ac_cv_alignof_short" >&6; }
13485
13486
13487
13488 cat >>confdefs.h <<_ACEOF
13489 #define ALIGNOF_SHORT $ac_cv_alignof_short
13490 _ACEOF
13491
13492
13493 # The cast to long int works around a bug in the HP C Compiler,
13494 # see AC_CHECK_SIZEOF for more information.
13495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
13496 $as_echo_n "checking alignment of int... " >&6; }
13497 if ${ac_cv_alignof_int+:} false; then :
13498   $as_echo_n "(cached) " >&6
13499 else
13500   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int"        "$ac_includes_default
13501 #ifndef offsetof
13502 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13503 #endif
13504 typedef struct { char x; int y; } ac__type_alignof_;"; then :
13505
13506 else
13507   if test "$ac_cv_type_int" = yes; then
13508      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13509 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13510 as_fn_error 77 "cannot compute alignment of int
13511 See \`config.log' for more details" "$LINENO" 5; }
13512    else
13513      ac_cv_alignof_int=0
13514    fi
13515 fi
13516
13517 fi
13518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
13519 $as_echo "$ac_cv_alignof_int" >&6; }
13520
13521
13522
13523 cat >>confdefs.h <<_ACEOF
13524 #define ALIGNOF_INT $ac_cv_alignof_int
13525 _ACEOF
13526
13527
13528 # The cast to long int works around a bug in the HP C Compiler,
13529 # see AC_CHECK_SIZEOF for more information.
13530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
13531 $as_echo_n "checking alignment of long... " >&6; }
13532 if ${ac_cv_alignof_long+:} false; then :
13533   $as_echo_n "(cached) " >&6
13534 else
13535   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long"        "$ac_includes_default
13536 #ifndef offsetof
13537 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13538 #endif
13539 typedef struct { char x; long y; } ac__type_alignof_;"; then :
13540
13541 else
13542   if test "$ac_cv_type_long" = yes; then
13543      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13544 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13545 as_fn_error 77 "cannot compute alignment of long
13546 See \`config.log' for more details" "$LINENO" 5; }
13547    else
13548      ac_cv_alignof_long=0
13549    fi
13550 fi
13551
13552 fi
13553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
13554 $as_echo "$ac_cv_alignof_long" >&6; }
13555
13556
13557
13558 cat >>confdefs.h <<_ACEOF
13559 #define ALIGNOF_LONG $ac_cv_alignof_long
13560 _ACEOF
13561
13562
13563 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
13564   # The cast to long int works around a bug in the HP C Compiler,
13565 # see AC_CHECK_SIZEOF for more information.
13566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
13567 $as_echo_n "checking alignment of long long int... " >&6; }
13568 if ${ac_cv_alignof_long_long_int+:} false; then :
13569   $as_echo_n "(cached) " >&6
13570 else
13571   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int"        "$ac_includes_default
13572 #ifndef offsetof
13573 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13574 #endif
13575 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
13576
13577 else
13578   if test "$ac_cv_type_long_long_int" = yes; then
13579      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13580 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13581 as_fn_error 77 "cannot compute alignment of long long int
13582 See \`config.log' for more details" "$LINENO" 5; }
13583    else
13584      ac_cv_alignof_long_long_int=0
13585    fi
13586 fi
13587
13588 fi
13589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
13590 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
13591
13592
13593
13594 cat >>confdefs.h <<_ACEOF
13595 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
13596 _ACEOF
13597
13598
13599 fi
13600 # The cast to long int works around a bug in the HP C Compiler,
13601 # see AC_CHECK_SIZEOF for more information.
13602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
13603 $as_echo_n "checking alignment of double... " >&6; }
13604 if ${ac_cv_alignof_double+:} false; then :
13605   $as_echo_n "(cached) " >&6
13606 else
13607   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double"        "$ac_includes_default
13608 #ifndef offsetof
13609 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13610 #endif
13611 typedef struct { char x; double y; } ac__type_alignof_;"; then :
13612
13613 else
13614   if test "$ac_cv_type_double" = yes; then
13615      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13616 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13617 as_fn_error 77 "cannot compute alignment of double
13618 See \`config.log' for more details" "$LINENO" 5; }
13619    else
13620      ac_cv_alignof_double=0
13621    fi
13622 fi
13623
13624 fi
13625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
13626 $as_echo "$ac_cv_alignof_double" >&6; }
13627
13628
13629
13630 cat >>confdefs.h <<_ACEOF
13631 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
13632 _ACEOF
13633
13634
13635
13636 # Compute maximum alignment of any basic type.
13637 # We assume long's alignment is at least as strong as char, short, or int;
13638 # but we must check long long (if it exists) and double.
13639
13640 MAX_ALIGNOF=$ac_cv_alignof_long
13641 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
13642   MAX_ALIGNOF=$ac_cv_alignof_double
13643 fi
13644 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
13645   MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
13646 fi
13647
13648 cat >>confdefs.h <<_ACEOF
13649 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
13650 _ACEOF
13651
13652
13653
13654 # Some platforms predefine the types int8, int16, etc.  Only check
13655 # a (hopefully) representative subset.
13656 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
13657 "
13658 if test "x$ac_cv_type_int8" = xyes; then :
13659
13660 cat >>confdefs.h <<_ACEOF
13661 #define HAVE_INT8 1
13662 _ACEOF
13663
13664
13665 fi
13666 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
13667 "
13668 if test "x$ac_cv_type_uint8" = xyes; then :
13669
13670 cat >>confdefs.h <<_ACEOF
13671 #define HAVE_UINT8 1
13672 _ACEOF
13673
13674
13675 fi
13676 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
13677 "
13678 if test "x$ac_cv_type_int64" = xyes; then :
13679
13680 cat >>confdefs.h <<_ACEOF
13681 #define HAVE_INT64 1
13682 _ACEOF
13683
13684
13685 fi
13686 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
13687 "
13688 if test "x$ac_cv_type_uint64" = xyes; then :
13689
13690 cat >>confdefs.h <<_ACEOF
13691 #define HAVE_UINT64 1
13692 _ACEOF
13693
13694
13695 fi
13696
13697
13698 # We also check for sig_atomic_t, which *should* be defined per ANSI
13699 # C, but is missing on some old platforms.
13700 ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "#include <signal.h>
13701 "
13702 if test "x$ac_cv_type_sig_atomic_t" = xyes; then :
13703
13704 cat >>confdefs.h <<_ACEOF
13705 #define HAVE_SIG_ATOMIC_T 1
13706 _ACEOF
13707
13708
13709 fi
13710
13711
13712
13713 if test "$PORTNAME" != "win32"
13714 then
13715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for POSIX signal interface" >&5
13716 $as_echo_n "checking for POSIX signal interface... " >&6; }
13717 if ${pgac_cv_func_posix_signals+:} false; then :
13718   $as_echo_n "(cached) " >&6
13719 else
13720   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13721 /* end confdefs.h.  */
13722 #include <signal.h>
13723
13724 int
13725 main ()
13726 {
13727 struct sigaction act, oact;
13728 sigemptyset(&act.sa_mask);
13729 act.sa_flags = SA_RESTART;
13730 sigaction(0, &act, &oact);
13731   ;
13732   return 0;
13733 }
13734 _ACEOF
13735 if ac_fn_c_try_link "$LINENO"; then :
13736   pgac_cv_func_posix_signals=yes
13737 else
13738   pgac_cv_func_posix_signals=no
13739 fi
13740 rm -f core conftest.err conftest.$ac_objext \
13741     conftest$ac_exeext conftest.$ac_ext
13742 fi
13743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_posix_signals" >&5
13744 $as_echo "$pgac_cv_func_posix_signals" >&6; }
13745 if test x"$pgac_cv_func_posix_signals" = xyes ; then
13746
13747 $as_echo "#define HAVE_POSIX_SIGNALS 1" >>confdefs.h
13748
13749 fi
13750 HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
13751
13752 if test "$pgac_cv_func_posix_signals" != yes -a "$enable_thread_safety" = yes; then
13753   as_fn_error $? "
13754 Thread-safety requires POSIX signals, which are not supported by this
13755 operating system;  use --disable-thread-safety to disable thread safety." "$LINENO" 5
13756 fi
13757 fi
13758
13759
13760 # Select semaphore implementation type.
13761 if test "$PORTNAME" != "win32"; then
13762   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
13763
13764 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
13765
13766     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
13767   else
13768     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
13769
13770 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
13771
13772       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
13773     else
13774
13775 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
13776
13777       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
13778     fi
13779   fi
13780 else
13781
13782 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
13783
13784   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
13785 fi
13786
13787
13788 # Select shared-memory implementation type.
13789 if test "$PORTNAME" != "win32"; then
13790
13791 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
13792
13793   SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
13794 else
13795
13796 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
13797
13798   SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
13799 fi
13800
13801 # Select latch implementation type.
13802 if test "$PORTNAME" != "win32"; then
13803   LATCH_IMPLEMENTATION="src/backend/port/unix_latch.c"
13804 else
13805   LATCH_IMPLEMENTATION="src/backend/port/win32_latch.c"
13806 fi
13807
13808 # If not set in template file, set bytes to use libc memset()
13809 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
13810   MEMSET_LOOP_LIMIT=1024
13811 fi
13812
13813 cat >>confdefs.h <<_ACEOF
13814 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
13815 _ACEOF
13816
13817
13818
13819 if test "$enable_nls" = yes ; then
13820
13821   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
13822 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
13823 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
13824   $as_echo_n "(cached) " >&6
13825 else
13826   ac_func_search_save_LIBS=$LIBS
13827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13828 /* end confdefs.h.  */
13829
13830 /* Override any GCC internal prototype to avoid an error.
13831    Use char because int might match the return type of a GCC
13832    builtin and then its argument prototype would still apply.  */
13833 #ifdef __cplusplus
13834 extern "C"
13835 #endif
13836 char bind_textdomain_codeset ();
13837 int
13838 main ()
13839 {
13840 return bind_textdomain_codeset ();
13841   ;
13842   return 0;
13843 }
13844 _ACEOF
13845 for ac_lib in '' intl; do
13846   if test -z "$ac_lib"; then
13847     ac_res="none required"
13848   else
13849     ac_res=-l$ac_lib
13850     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
13851   fi
13852   if ac_fn_c_try_link "$LINENO"; then :
13853   ac_cv_search_bind_textdomain_codeset=$ac_res
13854 fi
13855 rm -f core conftest.err conftest.$ac_objext \
13856     conftest$ac_exeext
13857   if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
13858   break
13859 fi
13860 done
13861 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
13862
13863 else
13864   ac_cv_search_bind_textdomain_codeset=no
13865 fi
13866 rm conftest.$ac_ext
13867 LIBS=$ac_func_search_save_LIBS
13868 fi
13869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
13870 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
13871 ac_res=$ac_cv_search_bind_textdomain_codeset
13872 if test "$ac_res" != no; then :
13873   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13874
13875 else
13876   as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
13877 fi
13878
13879   ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
13880 if test "x$ac_cv_header_libintl_h" = xyes; then :
13881
13882 else
13883   as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
13884 fi
13885
13886
13887   for ac_prog in msgfmt
13888 do
13889   # Extract the first word of "$ac_prog", so it can be a program name with args.
13890 set dummy $ac_prog; ac_word=$2
13891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13892 $as_echo_n "checking for $ac_word... " >&6; }
13893 if ${ac_cv_prog_MSGFMT+:} false; then :
13894   $as_echo_n "(cached) " >&6
13895 else
13896   if test -n "$MSGFMT"; then
13897   ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
13898 else
13899 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13900 for as_dir in $PATH
13901 do
13902   IFS=$as_save_IFS
13903   test -z "$as_dir" && as_dir=.
13904     for ac_exec_ext in '' $ac_executable_extensions; do
13905   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13906     ac_cv_prog_MSGFMT="$ac_prog"
13907     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13908     break 2
13909   fi
13910 done
13911   done
13912 IFS=$as_save_IFS
13913
13914 fi
13915 fi
13916 MSGFMT=$ac_cv_prog_MSGFMT
13917 if test -n "$MSGFMT"; then
13918   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
13919 $as_echo "$MSGFMT" >&6; }
13920 else
13921   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13922 $as_echo "no" >&6; }
13923 fi
13924
13925
13926   test -n "$MSGFMT" && break
13927 done
13928
13929   if test -z "$MSGFMT"; then
13930     as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
13931   fi
13932   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
13933 $as_echo_n "checking for msgfmt flags... " >&6; }
13934 if ${pgac_cv_msgfmt_flags+:} false; then :
13935   $as_echo_n "(cached) " >&6
13936 else
13937   if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
13938     pgac_cv_msgfmt_flags=-c
13939 fi
13940 fi
13941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
13942 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
13943   MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
13944
13945   for ac_prog in msgmerge
13946 do
13947   # Extract the first word of "$ac_prog", so it can be a program name with args.
13948 set dummy $ac_prog; ac_word=$2
13949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13950 $as_echo_n "checking for $ac_word... " >&6; }
13951 if ${ac_cv_prog_MSGMERGE+:} false; then :
13952   $as_echo_n "(cached) " >&6
13953 else
13954   if test -n "$MSGMERGE"; then
13955   ac_cv_prog_MSGMERGE="$MSGMERGE" # Let the user override the test.
13956 else
13957 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13958 for as_dir in $PATH
13959 do
13960   IFS=$as_save_IFS
13961   test -z "$as_dir" && as_dir=.
13962     for ac_exec_ext in '' $ac_executable_extensions; do
13963   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13964     ac_cv_prog_MSGMERGE="$ac_prog"
13965     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13966     break 2
13967   fi
13968 done
13969   done
13970 IFS=$as_save_IFS
13971
13972 fi
13973 fi
13974 MSGMERGE=$ac_cv_prog_MSGMERGE
13975 if test -n "$MSGMERGE"; then
13976   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
13977 $as_echo "$MSGMERGE" >&6; }
13978 else
13979   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13980 $as_echo "no" >&6; }
13981 fi
13982
13983
13984   test -n "$MSGMERGE" && break
13985 done
13986
13987   for ac_prog in xgettext
13988 do
13989   # Extract the first word of "$ac_prog", so it can be a program name with args.
13990 set dummy $ac_prog; ac_word=$2
13991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13992 $as_echo_n "checking for $ac_word... " >&6; }
13993 if ${ac_cv_prog_XGETTEXT+:} false; then :
13994   $as_echo_n "(cached) " >&6
13995 else
13996   if test -n "$XGETTEXT"; then
13997   ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test.
13998 else
13999 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14000 for as_dir in $PATH
14001 do
14002   IFS=$as_save_IFS
14003   test -z "$as_dir" && as_dir=.
14004     for ac_exec_ext in '' $ac_executable_extensions; do
14005   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14006     ac_cv_prog_XGETTEXT="$ac_prog"
14007     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14008     break 2
14009   fi
14010 done
14011   done
14012 IFS=$as_save_IFS
14013
14014 fi
14015 fi
14016 XGETTEXT=$ac_cv_prog_XGETTEXT
14017 if test -n "$XGETTEXT"; then
14018   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
14019 $as_echo "$XGETTEXT" >&6; }
14020 else
14021   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14022 $as_echo "no" >&6; }
14023 fi
14024
14025
14026   test -n "$XGETTEXT" && break
14027 done
14028
14029
14030 fi
14031
14032 # Check for Tcl configuration script tclConfig.sh
14033 if test "$with_tcl" = yes; then
14034     for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84 tclsh8.3 tclsh83
14035 do
14036   # Extract the first word of "$ac_prog", so it can be a program name with args.
14037 set dummy $ac_prog; ac_word=$2
14038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14039 $as_echo_n "checking for $ac_word... " >&6; }
14040 if ${ac_cv_path_TCLSH+:} false; then :
14041   $as_echo_n "(cached) " >&6
14042 else
14043   case $TCLSH in
14044   [\\/]* | ?:[\\/]*)
14045   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
14046   ;;
14047   *)
14048   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14049 for as_dir in $PATH
14050 do
14051   IFS=$as_save_IFS
14052   test -z "$as_dir" && as_dir=.
14053     for ac_exec_ext in '' $ac_executable_extensions; do
14054   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14055     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
14056     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14057     break 2
14058   fi
14059 done
14060   done
14061 IFS=$as_save_IFS
14062
14063   ;;
14064 esac
14065 fi
14066 TCLSH=$ac_cv_path_TCLSH
14067 if test -n "$TCLSH"; then
14068   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
14069 $as_echo "$TCLSH" >&6; }
14070 else
14071   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14072 $as_echo "no" >&6; }
14073 fi
14074
14075
14076   test -n "$TCLSH" && break
14077 done
14078
14079 if test x"$TCLSH" = x""; then
14080   as_fn_error $? "Tcl shell not found" "$LINENO" 5
14081 fi
14082
14083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
14084 $as_echo_n "checking for tclConfig.sh... " >&6; }
14085 # Let user override test
14086 if test -z "$TCL_CONFIG_SH"; then
14087     pgac_test_dirs="$with_tclconfig"
14088
14089     set X $pgac_test_dirs; shift
14090     if test $# -eq 0; then
14091         test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
14092         set X `echo 'puts $auto_path' | $TCLSH`; shift
14093     fi
14094
14095     for pgac_dir do
14096         if test -r "$pgac_dir/tclConfig.sh"; then
14097             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
14098             break
14099         fi
14100     done
14101 fi
14102
14103 if test -z "$TCL_CONFIG_SH"; then
14104     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14105 $as_echo "no" >&6; }
14106     as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
14107 else
14108     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
14109 $as_echo "$TCL_CONFIG_SH" >&6; }
14110 fi
14111
14112
14113
14114     . "$TCL_CONFIG_SH"
14115 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
14116 eval TCL_LIB_FILE=\"$TCL_LIB_FILE\"
14117 eval TCL_LIBS=\"$TCL_LIBS\"
14118 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
14119 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
14120
14121         # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
14122     ac_save_CPPFLAGS=$CPPFLAGS
14123     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
14124     ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
14125 if test "x$ac_cv_header_tcl_h" = xyes; then :
14126
14127 else
14128   as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
14129 fi
14130
14131
14132     CPPFLAGS=$ac_save_CPPFLAGS
14133 fi
14134
14135 # check for <perl.h>
14136 if test "$with_perl" = yes; then
14137   ac_save_CPPFLAGS=$CPPFLAGS
14138   CPPFLAGS="$CPPFLAGS -I$perl_archlibexp/CORE"
14139   ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
14140 "
14141 if test "x$ac_cv_header_perl_h" = xyes; then :
14142
14143 else
14144   as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
14145 fi
14146
14147
14148   # While we're at it, check that we can link to libperl.
14149   # On most platforms, if perl.h is there then libperl.so will be too, but at
14150   # this writing Debian packages them separately.  There is no known reason to
14151   # waste cycles on separate probes for the Tcl or Python libraries, though.
14152   pgac_save_LIBS=$LIBS
14153   LIBS="$perl_embed_ldflags"
14154   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
14155 $as_echo_n "checking for libperl... " >&6; }
14156   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14157 /* end confdefs.h.  */
14158
14159 #include <EXTERN.h>
14160 #include <perl.h>
14161
14162 int
14163 main ()
14164 {
14165 perl_alloc();
14166   ;
14167   return 0;
14168 }
14169 _ACEOF
14170 if ac_fn_c_try_link "$LINENO"; then :
14171   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14172 $as_echo "yes" >&6; }
14173 else
14174   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14175 $as_echo "no" >&6; }
14176      as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
14177 fi
14178 rm -f core conftest.err conftest.$ac_objext \
14179     conftest$ac_exeext conftest.$ac_ext
14180   LIBS=$pgac_save_LIBS
14181   CPPFLAGS=$ac_save_CPPFLAGS
14182 fi
14183
14184 # check for <Python.h>
14185 if test "$with_python" = yes; then
14186   ac_save_CPPFLAGS=$CPPFLAGS
14187   CPPFLAGS="$python_includespec $CPPFLAGS"
14188   ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
14189 if test "x$ac_cv_header_Python_h" = xyes; then :
14190
14191 else
14192   as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
14193 fi
14194
14195
14196   CPPFLAGS=$ac_save_CPPFLAGS
14197 fi
14198
14199 #
14200 # Check for DocBook and tools
14201 #
14202 for ac_prog in onsgmls nsgmls
14203 do
14204   # Extract the first word of "$ac_prog", so it can be a program name with args.
14205 set dummy $ac_prog; ac_word=$2
14206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14207 $as_echo_n "checking for $ac_word... " >&6; }
14208 if ${ac_cv_prog_NSGMLS+:} false; then :
14209   $as_echo_n "(cached) " >&6
14210 else
14211   if test -n "$NSGMLS"; then
14212   ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
14213 else
14214 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14215 for as_dir in $PATH
14216 do
14217   IFS=$as_save_IFS
14218   test -z "$as_dir" && as_dir=.
14219     for ac_exec_ext in '' $ac_executable_extensions; do
14220   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14221     ac_cv_prog_NSGMLS="$ac_prog"
14222     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14223     break 2
14224   fi
14225 done
14226   done
14227 IFS=$as_save_IFS
14228
14229 fi
14230 fi
14231 NSGMLS=$ac_cv_prog_NSGMLS
14232 if test -n "$NSGMLS"; then
14233   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NSGMLS" >&5
14234 $as_echo "$NSGMLS" >&6; }
14235 else
14236   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14237 $as_echo "no" >&6; }
14238 fi
14239
14240
14241   test -n "$NSGMLS" && break
14242 done
14243
14244 for ac_prog in openjade jade
14245 do
14246   # Extract the first word of "$ac_prog", so it can be a program name with args.
14247 set dummy $ac_prog; ac_word=$2
14248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14249 $as_echo_n "checking for $ac_word... " >&6; }
14250 if ${ac_cv_prog_JADE+:} false; then :
14251   $as_echo_n "(cached) " >&6
14252 else
14253   if test -n "$JADE"; then
14254   ac_cv_prog_JADE="$JADE" # Let the user override the test.
14255 else
14256 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14257 for as_dir in $PATH
14258 do
14259   IFS=$as_save_IFS
14260   test -z "$as_dir" && as_dir=.
14261     for ac_exec_ext in '' $ac_executable_extensions; do
14262   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14263     ac_cv_prog_JADE="$ac_prog"
14264     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14265     break 2
14266   fi
14267 done
14268   done
14269 IFS=$as_save_IFS
14270
14271 fi
14272 fi
14273 JADE=$ac_cv_prog_JADE
14274 if test -n "$JADE"; then
14275   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JADE" >&5
14276 $as_echo "$JADE" >&6; }
14277 else
14278   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14279 $as_echo "no" >&6; }
14280 fi
14281
14282
14283   test -n "$JADE" && break
14284 done
14285
14286
14287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook V4.2" >&5
14288 $as_echo_n "checking for DocBook V4.2... " >&6; }
14289 if ${pgac_cv_check_docbook+:} false; then :
14290   $as_echo_n "(cached) " >&6
14291 else
14292   cat >conftest.sgml <<EOF
14293 <!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
14294 <book>
14295  <title>test</title>
14296  <chapter>
14297   <title>random</title>
14298    <sect1>
14299     <title>testsect</title>
14300     <para>text</para>
14301   </sect1>
14302  </chapter>
14303 </book>
14304 EOF
14305
14306 pgac_cv_check_docbook=no
14307
14308 if test -n "$NSGMLS"; then
14309   $NSGMLS -s conftest.sgml 1>&5 2>&1
14310   if test $? -eq 0; then
14311     pgac_cv_check_docbook=yes
14312   fi
14313 fi
14314 rm -f conftest.sgml
14315 fi
14316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_docbook" >&5
14317 $as_echo "$pgac_cv_check_docbook" >&6; }
14318
14319 have_docbook=$pgac_cv_check_docbook
14320
14321
14322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook stylesheets" >&5
14323 $as_echo_n "checking for DocBook stylesheets... " >&6; }
14324 if ${pgac_cv_path_stylesheets+:} false; then :
14325   $as_echo_n "(cached) " >&6
14326 else
14327   if test -n "$DOCBOOKSTYLE"; then
14328   pgac_cv_path_stylesheets=$DOCBOOKSTYLE
14329 else
14330   for pgac_prefix in /usr /usr/local /opt /sw; do
14331     for pgac_infix in share lib; do
14332       for pgac_postfix in \
14333         sgml/stylesheets/nwalsh-modular \
14334         sgml/stylesheets/docbook \
14335         sgml/stylesheets/dsssl/docbook \
14336         sgml/docbook-dsssl \
14337         sgml/docbook/dsssl/modular \
14338         sgml/docbook/stylesheet/dsssl/modular \
14339         sgml/docbook/dsssl-stylesheets \
14340         sgml/dsssl/docbook-dsssl-nwalsh
14341       do
14342         pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
14343         if test -r "$pgac_candidate/html/docbook.dsl" \
14344            && test -r "$pgac_candidate/print/docbook.dsl"
14345         then
14346           pgac_cv_path_stylesheets=$pgac_candidate
14347           break 3
14348         fi
14349       done
14350     done
14351   done
14352 fi
14353 fi
14354
14355 DOCBOOKSTYLE=$pgac_cv_path_stylesheets
14356
14357 if test -n "$DOCBOOKSTYLE"; then
14358   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOCBOOKSTYLE" >&5
14359 $as_echo "$DOCBOOKSTYLE" >&6; }
14360 else
14361   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14362 $as_echo "no" >&6; }
14363 fi
14364 if test -n "$DOCBOOKSTYLE" -a -r "$DOCBOOKSTYLE/bin/collateindex.pl"; then
14365   COLLATEINDEX="$DOCBOOKSTYLE/bin/collateindex.pl"
14366
14367 else
14368   # Extract the first word of "collateindex.pl", so it can be a program name with args.
14369 set dummy collateindex.pl; ac_word=$2
14370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14371 $as_echo_n "checking for $ac_word... " >&6; }
14372 if ${ac_cv_path_COLLATEINDEX+:} false; then :
14373   $as_echo_n "(cached) " >&6
14374 else
14375   case $COLLATEINDEX in
14376   [\\/]* | ?:[\\/]*)
14377   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
14378   ;;
14379   *)
14380   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14381 for as_dir in $PATH
14382 do
14383   IFS=$as_save_IFS
14384   test -z "$as_dir" && as_dir=.
14385     for ac_exec_ext in '' $ac_executable_extensions; do
14386   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14387     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
14388     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14389     break 2
14390   fi
14391 done
14392   done
14393 IFS=$as_save_IFS
14394
14395   ;;
14396 esac
14397 fi
14398 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
14399 if test -n "$COLLATEINDEX"; then
14400   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COLLATEINDEX" >&5
14401 $as_echo "$COLLATEINDEX" >&6; }
14402 else
14403   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14404 $as_echo "no" >&6; }
14405 fi
14406
14407
14408 fi
14409 for ac_prog in xsltproc
14410 do
14411   # Extract the first word of "$ac_prog", so it can be a program name with args.
14412 set dummy $ac_prog; ac_word=$2
14413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14414 $as_echo_n "checking for $ac_word... " >&6; }
14415 if ${ac_cv_prog_XSLTPROC+:} false; then :
14416   $as_echo_n "(cached) " >&6
14417 else
14418   if test -n "$XSLTPROC"; then
14419   ac_cv_prog_XSLTPROC="$XSLTPROC" # Let the user override the test.
14420 else
14421 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14422 for as_dir in $PATH
14423 do
14424   IFS=$as_save_IFS
14425   test -z "$as_dir" && as_dir=.
14426     for ac_exec_ext in '' $ac_executable_extensions; do
14427   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14428     ac_cv_prog_XSLTPROC="$ac_prog"
14429     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14430     break 2
14431   fi
14432 done
14433   done
14434 IFS=$as_save_IFS
14435
14436 fi
14437 fi
14438 XSLTPROC=$ac_cv_prog_XSLTPROC
14439 if test -n "$XSLTPROC"; then
14440   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
14441 $as_echo "$XSLTPROC" >&6; }
14442 else
14443   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14444 $as_echo "no" >&6; }
14445 fi
14446
14447
14448   test -n "$XSLTPROC" && break
14449 done
14450
14451 for ac_prog in osx sgml2xml sx
14452 do
14453   # Extract the first word of "$ac_prog", so it can be a program name with args.
14454 set dummy $ac_prog; ac_word=$2
14455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14456 $as_echo_n "checking for $ac_word... " >&6; }
14457 if ${ac_cv_prog_OSX+:} false; then :
14458   $as_echo_n "(cached) " >&6
14459 else
14460   if test -n "$OSX"; then
14461   ac_cv_prog_OSX="$OSX" # Let the user override the test.
14462 else
14463 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14464 for as_dir in $PATH
14465 do
14466   IFS=$as_save_IFS
14467   test -z "$as_dir" && as_dir=.
14468     for ac_exec_ext in '' $ac_executable_extensions; do
14469   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14470     ac_cv_prog_OSX="$ac_prog"
14471     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14472     break 2
14473   fi
14474 done
14475   done
14476 IFS=$as_save_IFS
14477
14478 fi
14479 fi
14480 OSX=$ac_cv_prog_OSX
14481 if test -n "$OSX"; then
14482   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OSX" >&5
14483 $as_echo "$OSX" >&6; }
14484 else
14485   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14486 $as_echo "no" >&6; }
14487 fi
14488
14489
14490   test -n "$OSX" && break
14491 done
14492
14493
14494 #
14495 # Check for test tools
14496 #
14497 for ac_prog in prove
14498 do
14499   # Extract the first word of "$ac_prog", so it can be a program name with args.
14500 set dummy $ac_prog; ac_word=$2
14501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14502 $as_echo_n "checking for $ac_word... " >&6; }
14503 if ${ac_cv_prog_PROVE+:} false; then :
14504   $as_echo_n "(cached) " >&6
14505 else
14506   if test -n "$PROVE"; then
14507   ac_cv_prog_PROVE="$PROVE" # Let the user override the test.
14508 else
14509 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14510 for as_dir in $PATH
14511 do
14512   IFS=$as_save_IFS
14513   test -z "$as_dir" && as_dir=.
14514     for ac_exec_ext in '' $ac_executable_extensions; do
14515   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14516     ac_cv_prog_PROVE="$ac_prog"
14517     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14518     break 2
14519   fi
14520 done
14521   done
14522 IFS=$as_save_IFS
14523
14524 fi
14525 fi
14526 PROVE=$ac_cv_prog_PROVE
14527 if test -n "$PROVE"; then
14528   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
14529 $as_echo "$PROVE" >&6; }
14530 else
14531   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14532 $as_echo "no" >&6; }
14533 fi
14534
14535
14536   test -n "$PROVE" && break
14537 done
14538
14539
14540 # Thread testing
14541
14542 # We have to run the thread test near the end so we have all our symbols
14543 # defined.  Cross compiling throws a warning.
14544 #
14545 if test "$enable_thread_safety" = yes; then
14546 if test "$PORTNAME" != "win32"
14547 then
14548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking thread safety of required library functions" >&5
14549 $as_echo_n "checking thread safety of required library functions... " >&6; }
14550
14551 _CFLAGS="$CFLAGS"
14552 _LIBS="$LIBS"
14553 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
14554 LIBS="$LIBS $PTHREAD_LIBS"
14555 if test "$cross_compiling" = yes; then :
14556   { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
14557 $as_echo "maybe" >&6; }
14558   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
14559 *** Skipping thread test program because of cross-compile build.
14560 *** Run the program in src/test/thread on the target machine.
14561 " >&5
14562 $as_echo "$as_me: WARNING:
14563 *** Skipping thread test program because of cross-compile build.
14564 *** Run the program in src/test/thread on the target machine.
14565 " >&2;}
14566 else
14567   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14568 /* end confdefs.h.  */
14569 #include "$srcdir/src/test/thread/thread_test.c"
14570 _ACEOF
14571 if ac_fn_c_try_run "$LINENO"; then :
14572   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14573 $as_echo "yes" >&6; }
14574 else
14575   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14576 $as_echo "no" >&6; }
14577   as_fn_error $? "thread test program failed
14578 This platform is not thread-safe.  Check the file 'config.log' or compile
14579 and run src/test/thread/thread_test for the exact reason.
14580 Use --disable-thread-safety to disable thread safety." "$LINENO" 5
14581 fi
14582 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14583   conftest.$ac_objext conftest.beam conftest.$ac_ext
14584 fi
14585
14586 CFLAGS="$_CFLAGS"
14587 LIBS="$_LIBS"
14588 else
14589 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** skipping thread test on Win32" >&5
14590 $as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
14591 fi
14592 fi
14593
14594 # If compiler will take -Wl,--as-needed (or various platform-specific
14595 # spellings thereof) then add that to LDFLAGS.  This is much easier than
14596 # trying to filter LIBS to the minimum for each executable.
14597 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
14598 # libreadline; therefore we postpone testing it until we know what library
14599 # dependencies readline has.  The test code will try to link with $LIBS.
14600 if test "$with_readline" = yes; then
14601   link_test_func=readline
14602 else
14603   link_test_func=exit
14604 fi
14605
14606 if test "$PORTNAME" = "darwin"; then
14607   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
14608 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
14609 if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
14610   $as_echo_n "(cached) " >&6
14611 else
14612   pgac_save_LDFLAGS=$LDFLAGS
14613 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
14614 if test "$cross_compiling" = yes; then :
14615   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
14616 else
14617   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14618 /* end confdefs.h.  */
14619 extern void $link_test_func (); void (*fptr) () = $link_test_func;
14620 int
14621 main ()
14622 {
14623
14624   ;
14625   return 0;
14626 }
14627 _ACEOF
14628 if ac_fn_c_try_run "$LINENO"; then :
14629   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
14630 else
14631   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
14632 fi
14633 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14634   conftest.$ac_objext conftest.beam conftest.$ac_ext
14635 fi
14636
14637 LDFLAGS="$pgac_save_LDFLAGS"
14638 fi
14639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
14640 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
14641 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
14642   LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
14643 fi
14644
14645 elif test "$PORTNAME" = "openbsd"; then
14646   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
14647 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
14648 if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
14649   $as_echo_n "(cached) " >&6
14650 else
14651   pgac_save_LDFLAGS=$LDFLAGS
14652 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
14653 if test "$cross_compiling" = yes; then :
14654   pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
14655 else
14656   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14657 /* end confdefs.h.  */
14658 extern void $link_test_func (); void (*fptr) () = $link_test_func;
14659 int
14660 main ()
14661 {
14662
14663   ;
14664   return 0;
14665 }
14666 _ACEOF
14667 if ac_fn_c_try_run "$LINENO"; then :
14668   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
14669 else
14670   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
14671 fi
14672 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14673   conftest.$ac_objext conftest.beam conftest.$ac_ext
14674 fi
14675
14676 LDFLAGS="$pgac_save_LDFLAGS"
14677 fi
14678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
14679 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
14680 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
14681   LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
14682 fi
14683
14684 else
14685   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
14686 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
14687 if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
14688   $as_echo_n "(cached) " >&6
14689 else
14690   pgac_save_LDFLAGS=$LDFLAGS
14691 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
14692 if test "$cross_compiling" = yes; then :
14693   pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
14694 else
14695   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14696 /* end confdefs.h.  */
14697 extern void $link_test_func (); void (*fptr) () = $link_test_func;
14698 int
14699 main ()
14700 {
14701
14702   ;
14703   return 0;
14704 }
14705 _ACEOF
14706 if ac_fn_c_try_run "$LINENO"; then :
14707   pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
14708 else
14709   pgac_cv_prog_cc_ldflags__Wl___as_needed=no
14710 fi
14711 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14712   conftest.$ac_objext conftest.beam conftest.$ac_ext
14713 fi
14714
14715 LDFLAGS="$pgac_save_LDFLAGS"
14716 fi
14717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
14718 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
14719 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
14720   LDFLAGS="$LDFLAGS -Wl,--as-needed"
14721 fi
14722
14723 fi
14724
14725 # Create compiler version string
14726 if test x"$GCC" = x"yes" ; then
14727   cc_string=`${CC} --version | sed q`
14728   case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
14729 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
14730   cc_string=`${CC} -V 2>&1 | sed q`
14731 else
14732   cc_string=$CC
14733 fi
14734
14735
14736 cat >>confdefs.h <<_ACEOF
14737 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
14738 _ACEOF
14739
14740
14741 # Supply a numeric version string for use by 3rd party add-ons
14742 # awk -F is a regex on some platforms, and not on others, so make "." a tab
14743 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
14744 tr '.' '        ' |
14745 $AWK '{printf "%d%02d%02d", $1, $2, (NF >= 3) ? $3 : 0}'`"
14746
14747 cat >>confdefs.h <<_ACEOF
14748 #define PG_VERSION_NUM $PG_VERSION_NUM
14749 _ACEOF
14750
14751
14752
14753 # Begin output steps
14754
14755 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
14756 $as_echo "$as_me: using compiler=$cc_string" >&6;}
14757 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
14758 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
14759 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
14760 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
14761 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
14762 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
14763
14764 # prepare build tree if outside source tree
14765 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
14766 # Note 2: /bin/pwd might be better than shell's built-in at getting
14767 #         a symlink-free name.
14768 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
14769   vpath_build=no
14770 else
14771   vpath_build=yes
14772   if test "$no_create" != yes; then
14773     $as_echo_n "preparing build tree... " >&6
14774     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
14775     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
14776       || as_fn_error $? "failed" "$LINENO" 5
14777     { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14778 $as_echo "done" >&6; }
14779   fi
14780 fi
14781
14782
14783
14784 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
14785
14786
14787 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/backend/port/pg_latch.c:${LATCH_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}"
14788
14789
14790 if test "$PORTNAME" = "win32"; then
14791 ac_config_commands="$ac_config_commands check_win32_symlinks"
14792
14793 fi
14794
14795 ac_config_headers="$ac_config_headers src/include/pg_config.h"
14796
14797
14798 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
14799
14800
14801 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
14802
14803
14804 cat >confcache <<\_ACEOF
14805 # This file is a shell script that caches the results of configure
14806 # tests run on this system so they can be shared between configure
14807 # scripts and configure runs, see configure's option --config-cache.
14808 # It is not useful on other systems.  If it contains results you don't
14809 # want to keep, you may remove or edit it.
14810 #
14811 # config.status only pays attention to the cache file if you give it
14812 # the --recheck option to rerun configure.
14813 #
14814 # `ac_cv_env_foo' variables (set or unset) will be overridden when
14815 # loading this file, other *unset* `ac_cv_foo' will be assigned the
14816 # following values.
14817
14818 _ACEOF
14819
14820 # The following way of writing the cache mishandles newlines in values,
14821 # but we know of no workaround that is simple, portable, and efficient.
14822 # So, we kill variables containing newlines.
14823 # Ultrix sh set writes to stderr and can't be redirected directly,
14824 # and sets the high bit in the cache file unless we assign to the vars.
14825 (
14826   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14827     eval ac_val=\$$ac_var
14828     case $ac_val in #(
14829     *${as_nl}*)
14830       case $ac_var in #(
14831       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14832 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
14833       esac
14834       case $ac_var in #(
14835       _ | IFS | as_nl) ;; #(
14836       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14837       *) { eval $ac_var=; unset $ac_var;} ;;
14838       esac ;;
14839     esac
14840   done
14841
14842   (set) 2>&1 |
14843     case $as_nl`(ac_space=' '; set) 2>&1` in #(
14844     *${as_nl}ac_space=\ *)
14845       # `set' does not quote correctly, so add quotes: double-quote
14846       # substitution turns \\\\ into \\, and sed turns \\ into \.
14847       sed -n \
14848         "s/'/'\\\\''/g;
14849           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
14850       ;; #(
14851     *)
14852       # `set' quotes correctly as required by POSIX, so do not add quotes.
14853       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
14854       ;;
14855     esac |
14856     sort
14857 ) |
14858   sed '
14859      /^ac_cv_env_/b end
14860      t clear
14861      :clear
14862      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14863      t end
14864      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14865      :end' >>confcache
14866 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14867   if test -w "$cache_file"; then
14868     if test "x$cache_file" != "x/dev/null"; then
14869       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14870 $as_echo "$as_me: updating cache $cache_file" >&6;}
14871       if test ! -f "$cache_file" || test -h "$cache_file"; then
14872         cat confcache >"$cache_file"
14873       else
14874         case $cache_file in #(
14875         */* | ?:*)
14876           mv -f confcache "$cache_file"$$ &&
14877           mv -f "$cache_file"$$ "$cache_file" ;; #(
14878         *)
14879           mv -f confcache "$cache_file" ;;
14880         esac
14881       fi
14882     fi
14883   else
14884     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14885 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
14886   fi
14887 fi
14888 rm -f confcache
14889
14890 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14891 # Let make expand exec_prefix.
14892 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14893
14894 DEFS=-DHAVE_CONFIG_H
14895
14896 ac_libobjs=
14897 ac_ltlibobjs=
14898 U=
14899 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14900   # 1. Remove the extension, and $U if already installed.
14901   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
14902   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
14903   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
14904   #    will be set to the directory where LIBOBJS objects are built.
14905   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14906   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
14907 done
14908 LIBOBJS=$ac_libobjs
14909
14910 LTLIBOBJS=$ac_ltlibobjs
14911
14912
14913
14914
14915 : "${CONFIG_STATUS=./config.status}"
14916 ac_write_fail=0
14917 ac_clean_files_save=$ac_clean_files
14918 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
14919 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14920 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14921 as_write_fail=0
14922 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
14923 #! $SHELL
14924 # Generated by $as_me.
14925 # Run this file to recreate the current configuration.
14926 # Compiler output produced by configure, useful for debugging
14927 # configure, is in config.log if it exists.
14928
14929 debug=false
14930 ac_cs_recheck=false
14931 ac_cs_silent=false
14932
14933 SHELL=\${CONFIG_SHELL-$SHELL}
14934 export SHELL
14935 _ASEOF
14936 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14937 ## -------------------- ##
14938 ## M4sh Initialization. ##
14939 ## -------------------- ##
14940
14941 # Be more Bourne compatible
14942 DUALCASE=1; export DUALCASE # for MKS sh
14943 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
14944   emulate sh
14945   NULLCMD=:
14946   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
14947   # is contrary to our usage.  Disable this feature.
14948   alias -g '${1+"$@"}'='"$@"'
14949   setopt NO_GLOB_SUBST
14950 else
14951   case `(set -o) 2>/dev/null` in #(
14952   *posix*) :
14953     set -o posix ;; #(
14954   *) :
14955      ;;
14956 esac
14957 fi
14958
14959
14960 as_nl='
14961 '
14962 export as_nl
14963 # Printing a long string crashes Solaris 7 /usr/bin/printf.
14964 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14965 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14966 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14967 # Prefer a ksh shell builtin over an external printf program on Solaris,
14968 # but without wasting forks for bash or zsh.
14969 if test -z "$BASH_VERSION$ZSH_VERSION" \
14970     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14971   as_echo='print -r --'
14972   as_echo_n='print -rn --'
14973 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14974   as_echo='printf %s\n'
14975   as_echo_n='printf %s'
14976 else
14977   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14978     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14979     as_echo_n='/usr/ucb/echo -n'
14980   else
14981     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14982     as_echo_n_body='eval
14983       arg=$1;
14984       case $arg in #(
14985       *"$as_nl"*)
14986         expr "X$arg" : "X\\(.*\\)$as_nl";
14987         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14988       esac;
14989       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14990     '
14991     export as_echo_n_body
14992     as_echo_n='sh -c $as_echo_n_body as_echo'
14993   fi
14994   export as_echo_body
14995   as_echo='sh -c $as_echo_body as_echo'
14996 fi
14997
14998 # The user is always right.
14999 if test "${PATH_SEPARATOR+set}" != set; then
15000   PATH_SEPARATOR=:
15001   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15002     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15003       PATH_SEPARATOR=';'
15004   }
15005 fi
15006
15007
15008 # IFS
15009 # We need space, tab and new line, in precisely that order.  Quoting is
15010 # there to prevent editors from complaining about space-tab.
15011 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
15012 # splitting by setting IFS to empty value.)
15013 IFS=" ""        $as_nl"
15014
15015 # Find who we are.  Look in the path if we contain no directory separator.
15016 as_myself=
15017 case $0 in #((
15018   *[\\/]* ) as_myself=$0 ;;
15019   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15020 for as_dir in $PATH
15021 do
15022   IFS=$as_save_IFS
15023   test -z "$as_dir" && as_dir=.
15024     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15025   done
15026 IFS=$as_save_IFS
15027
15028      ;;
15029 esac
15030 # We did not find ourselves, most probably we were run as `sh COMMAND'
15031 # in which case we are not to be found in the path.
15032 if test "x$as_myself" = x; then
15033   as_myself=$0
15034 fi
15035 if test ! -f "$as_myself"; then
15036   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15037   exit 1
15038 fi
15039
15040 # Unset variables that we do not need and which cause bugs (e.g. in
15041 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
15042 # suppresses any "Segmentation fault" message there.  '((' could
15043 # trigger a bug in pdksh 5.2.14.
15044 for as_var in BASH_ENV ENV MAIL MAILPATH
15045 do eval test x\${$as_var+set} = xset \
15046   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
15047 done
15048 PS1='$ '
15049 PS2='> '
15050 PS4='+ '
15051
15052 # NLS nuisances.
15053 LC_ALL=C
15054 export LC_ALL
15055 LANGUAGE=C
15056 export LANGUAGE
15057
15058 # CDPATH.
15059 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15060
15061
15062 # as_fn_error STATUS ERROR [LINENO LOG_FD]
15063 # ----------------------------------------
15064 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15065 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
15066 # script with STATUS, using 1 if that was 0.
15067 as_fn_error ()
15068 {
15069   as_status=$1; test $as_status -eq 0 && as_status=1
15070   if test "$4"; then
15071     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15072     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
15073   fi
15074   $as_echo "$as_me: error: $2" >&2
15075   as_fn_exit $as_status
15076 } # as_fn_error
15077
15078
15079 # as_fn_set_status STATUS
15080 # -----------------------
15081 # Set $? to STATUS, without forking.
15082 as_fn_set_status ()
15083 {
15084   return $1
15085 } # as_fn_set_status
15086
15087 # as_fn_exit STATUS
15088 # -----------------
15089 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15090 as_fn_exit ()
15091 {
15092   set +e
15093   as_fn_set_status $1
15094   exit $1
15095 } # as_fn_exit
15096
15097 # as_fn_unset VAR
15098 # ---------------
15099 # Portably unset VAR.
15100 as_fn_unset ()
15101 {
15102   { eval $1=; unset $1;}
15103 }
15104 as_unset=as_fn_unset
15105 # as_fn_append VAR VALUE
15106 # ----------------------
15107 # Append the text in VALUE to the end of the definition contained in VAR. Take
15108 # advantage of any shell optimizations that allow amortized linear growth over
15109 # repeated appends, instead of the typical quadratic growth present in naive
15110 # implementations.
15111 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15112   eval 'as_fn_append ()
15113   {
15114     eval $1+=\$2
15115   }'
15116 else
15117   as_fn_append ()
15118   {
15119     eval $1=\$$1\$2
15120   }
15121 fi # as_fn_append
15122
15123 # as_fn_arith ARG...
15124 # ------------------
15125 # Perform arithmetic evaluation on the ARGs, and store the result in the
15126 # global $as_val. Take advantage of shells that can avoid forks. The arguments
15127 # must be portable across $(()) and expr.
15128 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15129   eval 'as_fn_arith ()
15130   {
15131     as_val=$(( $* ))
15132   }'
15133 else
15134   as_fn_arith ()
15135   {
15136     as_val=`expr "$@" || test $? -eq 1`
15137   }
15138 fi # as_fn_arith
15139
15140
15141 if expr a : '\(a\)' >/dev/null 2>&1 &&
15142    test "X`expr 00001 : '.*\(...\)'`" = X001; then
15143   as_expr=expr
15144 else
15145   as_expr=false
15146 fi
15147
15148 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15149   as_basename=basename
15150 else
15151   as_basename=false
15152 fi
15153
15154 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15155   as_dirname=dirname
15156 else
15157   as_dirname=false
15158 fi
15159
15160 as_me=`$as_basename -- "$0" ||
15161 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15162          X"$0" : 'X\(//\)$' \| \
15163          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
15164 $as_echo X/"$0" |
15165     sed '/^.*\/\([^/][^/]*\)\/*$/{
15166             s//\1/
15167             q
15168           }
15169           /^X\/\(\/\/\)$/{
15170             s//\1/
15171             q
15172           }
15173           /^X\/\(\/\).*/{
15174             s//\1/
15175             q
15176           }
15177           s/.*/./; q'`
15178
15179 # Avoid depending upon Character Ranges.
15180 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15181 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15182 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15183 as_cr_digits='0123456789'
15184 as_cr_alnum=$as_cr_Letters$as_cr_digits
15185
15186 ECHO_C= ECHO_N= ECHO_T=
15187 case `echo -n x` in #(((((
15188 -n*)
15189   case `echo 'xy\c'` in
15190   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
15191   xy)  ECHO_C='\c';;
15192   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
15193        ECHO_T=' ';;
15194   esac;;
15195 *)
15196   ECHO_N='-n';;
15197 esac
15198
15199 rm -f conf$$ conf$$.exe conf$$.file
15200 if test -d conf$$.dir; then
15201   rm -f conf$$.dir/conf$$.file
15202 else
15203   rm -f conf$$.dir
15204   mkdir conf$$.dir 2>/dev/null
15205 fi
15206 if (echo >conf$$.file) 2>/dev/null; then
15207   if ln -s conf$$.file conf$$ 2>/dev/null; then
15208     as_ln_s='ln -s'
15209     # ... but there are two gotchas:
15210     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15211     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
15212     # In both cases, we have to default to `cp -pR'.
15213     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
15214       as_ln_s='cp -pR'
15215   elif ln conf$$.file conf$$ 2>/dev/null; then
15216     as_ln_s=ln
15217   else
15218     as_ln_s='cp -pR'
15219   fi
15220 else
15221   as_ln_s='cp -pR'
15222 fi
15223 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15224 rmdir conf$$.dir 2>/dev/null
15225
15226
15227 # as_fn_mkdir_p
15228 # -------------
15229 # Create "$as_dir" as a directory, including parents if necessary.
15230 as_fn_mkdir_p ()
15231 {
15232
15233   case $as_dir in #(
15234   -*) as_dir=./$as_dir;;
15235   esac
15236   test -d "$as_dir" || eval $as_mkdir_p || {
15237     as_dirs=
15238     while :; do
15239       case $as_dir in #(
15240       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15241       *) as_qdir=$as_dir;;
15242       esac
15243       as_dirs="'$as_qdir' $as_dirs"
15244       as_dir=`$as_dirname -- "$as_dir" ||
15245 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15246          X"$as_dir" : 'X\(//\)[^/]' \| \
15247          X"$as_dir" : 'X\(//\)$' \| \
15248          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15249 $as_echo X"$as_dir" |
15250     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15251             s//\1/
15252             q
15253           }
15254           /^X\(\/\/\)[^/].*/{
15255             s//\1/
15256             q
15257           }
15258           /^X\(\/\/\)$/{
15259             s//\1/
15260             q
15261           }
15262           /^X\(\/\).*/{
15263             s//\1/
15264             q
15265           }
15266           s/.*/./; q'`
15267       test -d "$as_dir" && break
15268     done
15269     test -z "$as_dirs" || eval "mkdir $as_dirs"
15270   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
15271
15272
15273 } # as_fn_mkdir_p
15274 if mkdir -p . 2>/dev/null; then
15275   as_mkdir_p='mkdir -p "$as_dir"'
15276 else
15277   test -d ./-p && rmdir ./-p
15278   as_mkdir_p=false
15279 fi
15280
15281
15282 # as_fn_executable_p FILE
15283 # -----------------------
15284 # Test if FILE is an executable regular file.
15285 as_fn_executable_p ()
15286 {
15287   test -f "$1" && test -x "$1"
15288 } # as_fn_executable_p
15289 as_test_x='test -x'
15290 as_executable_p=as_fn_executable_p
15291
15292 # Sed expression to map a string onto a valid CPP name.
15293 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
15294
15295 # Sed expression to map a string onto a valid variable name.
15296 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
15297
15298
15299 exec 6>&1
15300 ## ----------------------------------- ##
15301 ## Main body of $CONFIG_STATUS script. ##
15302 ## ----------------------------------- ##
15303 _ASEOF
15304 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
15305
15306 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15307 # Save the log message, to keep $0 and so on meaningful, and to
15308 # report actual input values of CONFIG_FILES etc. instead of their
15309 # values after options handling.
15310 ac_log="
15311 This file was extended by PostgreSQL $as_me 9.5devel, which was
15312 generated by GNU Autoconf 2.69.  Invocation command line was
15313
15314   CONFIG_FILES    = $CONFIG_FILES
15315   CONFIG_HEADERS  = $CONFIG_HEADERS
15316   CONFIG_LINKS    = $CONFIG_LINKS
15317   CONFIG_COMMANDS = $CONFIG_COMMANDS
15318   $ $0 $@
15319
15320 on `(hostname || uname -n) 2>/dev/null | sed 1q`
15321 "
15322
15323 _ACEOF
15324
15325 case $ac_config_files in *"
15326 "*) set x $ac_config_files; shift; ac_config_files=$*;;
15327 esac
15328
15329 case $ac_config_headers in *"
15330 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15331 esac
15332
15333
15334 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15335 # Files that config.status was made for.
15336 config_files="$ac_config_files"
15337 config_headers="$ac_config_headers"
15338 config_links="$ac_config_links"
15339 config_commands="$ac_config_commands"
15340
15341 _ACEOF
15342
15343 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15344 ac_cs_usage="\
15345 \`$as_me' instantiates files and other configuration actions
15346 from templates according to the current configuration.  Unless the files
15347 and actions are specified as TAGs, all are instantiated by default.
15348
15349 Usage: $0 [OPTION]... [TAG]...
15350
15351   -h, --help       print this help, then exit
15352   -V, --version    print version number and configuration settings, then exit
15353       --config     print configuration, then exit
15354   -q, --quiet, --silent
15355                    do not print progress messages
15356   -d, --debug      don't remove temporary files
15357       --recheck    update $as_me by reconfiguring in the same conditions
15358       --file=FILE[:TEMPLATE]
15359                    instantiate the configuration file FILE
15360       --header=FILE[:TEMPLATE]
15361                    instantiate the configuration header FILE
15362
15363 Configuration files:
15364 $config_files
15365
15366 Configuration headers:
15367 $config_headers
15368
15369 Configuration links:
15370 $config_links
15371
15372 Configuration commands:
15373 $config_commands
15374
15375 Report bugs to <pgsql-bugs@postgresql.org>."
15376
15377 _ACEOF
15378 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15379 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
15380 ac_cs_version="\\
15381 PostgreSQL config.status 9.5devel
15382 configured by $0, generated by GNU Autoconf 2.69,
15383   with options \\"\$ac_cs_config\\"
15384
15385 Copyright (C) 2012 Free Software Foundation, Inc.
15386 This config.status script is free software; the Free Software Foundation
15387 gives unlimited permission to copy, distribute and modify it."
15388
15389 ac_pwd='$ac_pwd'
15390 srcdir='$srcdir'
15391 INSTALL='$INSTALL'
15392 MKDIR_P='$MKDIR_P'
15393 AWK='$AWK'
15394 test -n "\$AWK" || AWK=awk
15395 _ACEOF
15396
15397 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15398 # The default lists apply if the user does not specify any file.
15399 ac_need_defaults=:
15400 while test $# != 0
15401 do
15402   case $1 in
15403   --*=?*)
15404     ac_option=`expr "X$1" : 'X\([^=]*\)='`
15405     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
15406     ac_shift=:
15407     ;;
15408   --*=)
15409     ac_option=`expr "X$1" : 'X\([^=]*\)='`
15410     ac_optarg=
15411     ac_shift=:
15412     ;;
15413   *)
15414     ac_option=$1
15415     ac_optarg=$2
15416     ac_shift=shift
15417     ;;
15418   esac
15419
15420   case $ac_option in
15421   # Handling of the options.
15422   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15423     ac_cs_recheck=: ;;
15424   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
15425     $as_echo "$ac_cs_version"; exit ;;
15426   --config | --confi | --conf | --con | --co | --c )
15427     $as_echo "$ac_cs_config"; exit ;;
15428   --debug | --debu | --deb | --de | --d | -d )
15429     debug=: ;;
15430   --file | --fil | --fi | --f )
15431     $ac_shift
15432     case $ac_optarg in
15433     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15434     '') as_fn_error $? "missing file argument" ;;
15435     esac
15436     as_fn_append CONFIG_FILES " '$ac_optarg'"
15437     ac_need_defaults=false;;
15438   --header | --heade | --head | --hea )
15439     $ac_shift
15440     case $ac_optarg in
15441     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15442     esac
15443     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
15444     ac_need_defaults=false;;
15445   --he | --h)
15446     # Conflict between --help and --header
15447     as_fn_error $? "ambiguous option: \`$1'
15448 Try \`$0 --help' for more information.";;
15449   --help | --hel | -h )
15450     $as_echo "$ac_cs_usage"; exit ;;
15451   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15452   | -silent | --silent | --silen | --sile | --sil | --si | --s)
15453     ac_cs_silent=: ;;
15454
15455   # This is an error.
15456   -*) as_fn_error $? "unrecognized option: \`$1'
15457 Try \`$0 --help' for more information." ;;
15458
15459   *) as_fn_append ac_config_targets " $1"
15460      ac_need_defaults=false ;;
15461
15462   esac
15463   shift
15464 done
15465
15466 ac_configure_extra_args=
15467
15468 if $ac_cs_silent; then
15469   exec 6>/dev/null
15470   ac_configure_extra_args="$ac_configure_extra_args --silent"
15471 fi
15472
15473 _ACEOF
15474 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15475 if \$ac_cs_recheck; then
15476   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
15477   shift
15478   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15479   CONFIG_SHELL='$SHELL'
15480   export CONFIG_SHELL
15481   exec "\$@"
15482 fi
15483
15484 _ACEOF
15485 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15486 exec 5>>config.log
15487 {
15488   echo
15489   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15490 ## Running $as_me. ##
15491 _ASBOX
15492   $as_echo "$ac_log"
15493 } >&5
15494
15495 _ACEOF
15496 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15497 _ACEOF
15498
15499 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15500
15501 # Handling of arguments.
15502 for ac_config_target in $ac_config_targets
15503 do
15504   case $ac_config_target in
15505     "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
15506     "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
15507     "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
15508     "src/backend/port/dynloader.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
15509     "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
15510     "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
15511     "src/backend/port/pg_latch.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_latch.c:${LATCH_IMPLEMENTATION}" ;;
15512     "src/include/dynloader.h") CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
15513     "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
15514     "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
15515     "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
15516     "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
15517     "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
15518     "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
15519
15520   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
15521   esac
15522 done
15523
15524
15525 # If the user did not use the arguments to specify the items to instantiate,
15526 # then the envvar interface is used.  Set only those that are not.
15527 # We use the long form for the default assignment because of an extremely
15528 # bizarre bug on SunOS 4.1.3.
15529 if $ac_need_defaults; then
15530   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15531   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15532   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
15533   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
15534 fi
15535
15536 # Have a temporary directory for convenience.  Make it in the build tree
15537 # simply because there is no reason against having it here, and in addition,
15538 # creating and moving files from /tmp can sometimes cause problems.
15539 # Hook for its removal unless debugging.
15540 # Note that there is a small window in which the directory will not be cleaned:
15541 # after its creation but before its name has been assigned to `$tmp'.
15542 $debug ||
15543 {
15544   tmp= ac_tmp=
15545   trap 'exit_status=$?
15546   : "${ac_tmp:=$tmp}"
15547   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
15548 ' 0
15549   trap 'as_fn_exit 1' 1 2 13 15
15550 }
15551 # Create a (secure) tmp directory for tmp files.
15552
15553 {
15554   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
15555   test -d "$tmp"
15556 }  ||
15557 {
15558   tmp=./conf$$-$RANDOM
15559   (umask 077 && mkdir "$tmp")
15560 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
15561 ac_tmp=$tmp
15562
15563 # Set up the scripts for CONFIG_FILES section.
15564 # No need to generate them if there are no CONFIG_FILES.
15565 # This happens for instance with `./config.status config.h'.
15566 if test -n "$CONFIG_FILES"; then
15567
15568
15569 ac_cr=`echo X | tr X '\015'`
15570 # On cygwin, bash can eat \r inside `` if the user requested igncr.
15571 # But we know of no other shell where ac_cr would be empty at this
15572 # point, so we can use a bashism as a fallback.
15573 if test "x$ac_cr" = x; then
15574   eval ac_cr=\$\'\\r\'
15575 fi
15576 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15577 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
15578   ac_cs_awk_cr='\\r'
15579 else
15580   ac_cs_awk_cr=$ac_cr
15581 fi
15582
15583 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
15584 _ACEOF
15585
15586
15587 {
15588   echo "cat >conf$$subs.awk <<_ACEOF" &&
15589   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15590   echo "_ACEOF"
15591 } >conf$$subs.sh ||
15592   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15593 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
15594 ac_delim='%!_!# '
15595 for ac_last_try in false false false false false :; do
15596   . ./conf$$subs.sh ||
15597     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15598
15599   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15600   if test $ac_delim_n = $ac_delim_num; then
15601     break
15602   elif $ac_last_try; then
15603     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15604   else
15605     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15606   fi
15607 done
15608 rm -f conf$$subs.sh
15609
15610 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15611 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
15612 _ACEOF
15613 sed -n '
15614 h
15615 s/^/S["/; s/!.*/"]=/
15616 p
15617 g
15618 s/^[^!]*!//
15619 :repl
15620 t repl
15621 s/'"$ac_delim"'$//
15622 t delim
15623 :nl
15624 h
15625 s/\(.\{148\}\)..*/\1/
15626 t more1
15627 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15628 p
15629 n
15630 b repl
15631 :more1
15632 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15633 p
15634 g
15635 s/.\{148\}//
15636 t nl
15637 :delim
15638 h
15639 s/\(.\{148\}\)..*/\1/
15640 t more2
15641 s/["\\]/\\&/g; s/^/"/; s/$/"/
15642 p
15643 b
15644 :more2
15645 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15646 p
15647 g
15648 s/.\{148\}//
15649 t delim
15650 ' <conf$$subs.awk | sed '
15651 /^[^""]/{
15652   N
15653   s/\n//
15654 }
15655 ' >>$CONFIG_STATUS || ac_write_fail=1
15656 rm -f conf$$subs.awk
15657 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15658 _ACAWK
15659 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
15660   for (key in S) S_is_set[key] = 1
15661   FS = "\a"
15662
15663 }
15664 {
15665   line = $ 0
15666   nfields = split(line, field, "@")
15667   substed = 0
15668   len = length(field[1])
15669   for (i = 2; i < nfields; i++) {
15670     key = field[i]
15671     keylen = length(key)
15672     if (S_is_set[key]) {
15673       value = S[key]
15674       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15675       len += length(value) + length(field[++i])
15676       substed = 1
15677     } else
15678       len += 1 + keylen
15679   }
15680
15681   print line
15682 }
15683
15684 _ACAWK
15685 _ACEOF
15686 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15687 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15688   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15689 else
15690   cat
15691 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
15692   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
15693 _ACEOF
15694
15695 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15696 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
15697 # trailing colons and then remove the whole line if VPATH becomes empty
15698 # (actually we leave an empty line to preserve line numbers).
15699 if test "x$srcdir" = x.; then
15700   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
15701 h
15702 s///
15703 s/^/:/
15704 s/[      ]*$/:/
15705 s/:\$(srcdir):/:/g
15706 s/:\${srcdir}:/:/g
15707 s/:@srcdir@:/:/g
15708 s/^:*//
15709 s/:*$//
15710 x
15711 s/\(=[   ]*\).*/\1/
15712 G
15713 s/\n//
15714 s/^[^=]*=[       ]*$//
15715 }'
15716 fi
15717
15718 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15719 fi # test -n "$CONFIG_FILES"
15720
15721 # Set up the scripts for CONFIG_HEADERS section.
15722 # No need to generate them if there are no CONFIG_HEADERS.
15723 # This happens for instance with `./config.status Makefile'.
15724 if test -n "$CONFIG_HEADERS"; then
15725 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
15726 BEGIN {
15727 _ACEOF
15728
15729 # Transform confdefs.h into an awk script `defines.awk', embedded as
15730 # here-document in config.status, that substitutes the proper values into
15731 # config.h.in to produce config.h.
15732
15733 # Create a delimiter string that does not exist in confdefs.h, to ease
15734 # handling of long lines.
15735 ac_delim='%!_!# '
15736 for ac_last_try in false false :; do
15737   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15738   if test -z "$ac_tt"; then
15739     break
15740   elif $ac_last_try; then
15741     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
15742   else
15743     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15744   fi
15745 done
15746
15747 # For the awk script, D is an array of macro values keyed by name,
15748 # likewise P contains macro parameters if any.  Preserve backslash
15749 # newline sequences.
15750
15751 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15752 sed -n '
15753 s/.\{148\}/&'"$ac_delim"'/g
15754 t rset
15755 :rset
15756 s/^[     ]*#[    ]*define[       ][      ]*/ /
15757 t def
15758 d
15759 :def
15760 s/\\$//
15761 t bsnl
15762 s/["\\]/\\&/g
15763 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
15764 D["\1"]=" \3"/p
15765 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
15766 d
15767 :bsnl
15768 s/["\\]/\\&/g
15769 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
15770 D["\1"]=" \3\\\\\\n"\\/p
15771 t cont
15772 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15773 t cont
15774 d
15775 :cont
15776 n
15777 s/.\{148\}/&'"$ac_delim"'/g
15778 t clear
15779 :clear
15780 s/\\$//
15781 t bsnlc
15782 s/["\\]/\\&/g; s/^/"/; s/$/"/p
15783 d
15784 :bsnlc
15785 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15786 b cont
15787 ' <confdefs.h | sed '
15788 s/'"$ac_delim"'/"\\\
15789 "/g' >>$CONFIG_STATUS || ac_write_fail=1
15790
15791 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15792   for (key in D) D_is_set[key] = 1
15793   FS = "\a"
15794 }
15795 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15796   line = \$ 0
15797   split(line, arg, " ")
15798   if (arg[1] == "#") {
15799     defundef = arg[2]
15800     mac1 = arg[3]
15801   } else {
15802     defundef = substr(arg[1], 2)
15803     mac1 = arg[2]
15804   }
15805   split(mac1, mac2, "(") #)
15806   macro = mac2[1]
15807   prefix = substr(line, 1, index(line, defundef) - 1)
15808   if (D_is_set[macro]) {
15809     # Preserve the white space surrounding the "#".
15810     print prefix "define", macro P[macro] D[macro]
15811     next
15812   } else {
15813     # Replace #undef with comments.  This is necessary, for example,
15814     # in the case of _POSIX_SOURCE, which is predefined and required
15815     # on some systems where configure will not decide to define it.
15816     if (defundef == "undef") {
15817       print "/*", prefix defundef, macro, "*/"
15818       next
15819     }
15820   }
15821 }
15822 { print }
15823 _ACAWK
15824 _ACEOF
15825 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15826   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
15827 fi # test -n "$CONFIG_HEADERS"
15828
15829
15830 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
15831 shift
15832 for ac_tag
15833 do
15834   case $ac_tag in
15835   :[FHLC]) ac_mode=$ac_tag; continue;;
15836   esac
15837   case $ac_mode$ac_tag in
15838   :[FHL]*:*);;
15839   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
15840   :[FH]-) ac_tag=-:-;;
15841   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15842   esac
15843   ac_save_IFS=$IFS
15844   IFS=:
15845   set x $ac_tag
15846   IFS=$ac_save_IFS
15847   shift
15848   ac_file=$1
15849   shift
15850
15851   case $ac_mode in
15852   :L) ac_source=$1;;
15853   :[FH])
15854     ac_file_inputs=
15855     for ac_f
15856     do
15857       case $ac_f in
15858       -) ac_f="$ac_tmp/stdin";;
15859       *) # Look for the file first in the build tree, then in the source tree
15860          # (if the path is not absolute).  The absolute path cannot be DOS-style,
15861          # because $ac_f cannot contain `:'.
15862          test -f "$ac_f" ||
15863            case $ac_f in
15864            [\\/$]*) false;;
15865            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15866            esac ||
15867            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
15868       esac
15869       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15870       as_fn_append ac_file_inputs " '$ac_f'"
15871     done
15872
15873     # Let's still pretend it is `configure' which instantiates (i.e., don't
15874     # use $as_me), people would be surprised to read:
15875     #    /* config.h.  Generated by config.status.  */
15876     configure_input='Generated from '`
15877           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15878         `' by configure.'
15879     if test x"$ac_file" != x-; then
15880       configure_input="$ac_file.  $configure_input"
15881       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15882 $as_echo "$as_me: creating $ac_file" >&6;}
15883     fi
15884     # Neutralize special characters interpreted by sed in replacement strings.
15885     case $configure_input in #(
15886     *\&* | *\|* | *\\* )
15887        ac_sed_conf_input=`$as_echo "$configure_input" |
15888        sed 's/[\\\\&|]/\\\\&/g'`;; #(
15889     *) ac_sed_conf_input=$configure_input;;
15890     esac
15891
15892     case $ac_tag in
15893     *:-:* | *:-) cat >"$ac_tmp/stdin" \
15894       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
15895     esac
15896     ;;
15897   esac
15898
15899   ac_dir=`$as_dirname -- "$ac_file" ||
15900 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15901          X"$ac_file" : 'X\(//\)[^/]' \| \
15902          X"$ac_file" : 'X\(//\)$' \| \
15903          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
15904 $as_echo X"$ac_file" |
15905     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15906             s//\1/
15907             q
15908           }
15909           /^X\(\/\/\)[^/].*/{
15910             s//\1/
15911             q
15912           }
15913           /^X\(\/\/\)$/{
15914             s//\1/
15915             q
15916           }
15917           /^X\(\/\).*/{
15918             s//\1/
15919             q
15920           }
15921           s/.*/./; q'`
15922   as_dir="$ac_dir"; as_fn_mkdir_p
15923   ac_builddir=.
15924
15925 case "$ac_dir" in
15926 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15927 *)
15928   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
15929   # A ".." for each directory in $ac_dir_suffix.
15930   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
15931   case $ac_top_builddir_sub in
15932   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15933   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15934   esac ;;
15935 esac
15936 ac_abs_top_builddir=$ac_pwd
15937 ac_abs_builddir=$ac_pwd$ac_dir_suffix
15938 # for backward compatibility:
15939 ac_top_builddir=$ac_top_build_prefix
15940
15941 case $srcdir in
15942   .)  # We are building in place.
15943     ac_srcdir=.
15944     ac_top_srcdir=$ac_top_builddir_sub
15945     ac_abs_top_srcdir=$ac_pwd ;;
15946   [\\/]* | ?:[\\/]* )  # Absolute name.
15947     ac_srcdir=$srcdir$ac_dir_suffix;
15948     ac_top_srcdir=$srcdir
15949     ac_abs_top_srcdir=$srcdir ;;
15950   *) # Relative name.
15951     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15952     ac_top_srcdir=$ac_top_build_prefix$srcdir
15953     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
15954 esac
15955 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
15956
15957
15958   case $ac_mode in
15959   :F)
15960   #
15961   # CONFIG_FILE
15962   #
15963
15964   case $INSTALL in
15965   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
15966   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
15967   esac
15968   ac_MKDIR_P=$MKDIR_P
15969   case $MKDIR_P in
15970   [\\/$]* | ?:[\\/]* ) ;;
15971   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
15972   esac
15973 _ACEOF
15974
15975 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15976 # If the template does not know about datarootdir, expand it.
15977 # FIXME: This hack should be removed a few years after 2.60.
15978 ac_datarootdir_hack=; ac_datarootdir_seen=
15979 ac_sed_dataroot='
15980 /datarootdir/ {
15981   p
15982   q
15983 }
15984 /@datadir@/p
15985 /@docdir@/p
15986 /@infodir@/p
15987 /@localedir@/p
15988 /@mandir@/p'
15989 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
15990 *datarootdir*) ac_datarootdir_seen=yes;;
15991 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
15992   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15993 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
15994 _ACEOF
15995 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15996   ac_datarootdir_hack='
15997   s&@datadir@&$datadir&g
15998   s&@docdir@&$docdir&g
15999   s&@infodir@&$infodir&g
16000   s&@localedir@&$localedir&g
16001   s&@mandir@&$mandir&g
16002   s&\\\${datarootdir}&$datarootdir&g' ;;
16003 esac
16004 _ACEOF
16005
16006 # Neutralize VPATH when `$srcdir' = `.'.
16007 # Shell code in configure.ac might set extrasub.
16008 # FIXME: do we really want to maintain this feature?
16009 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16010 ac_sed_extra="$ac_vpsub
16011 $extrasub
16012 _ACEOF
16013 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16014 :t
16015 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16016 s|@configure_input@|$ac_sed_conf_input|;t t
16017 s&@top_builddir@&$ac_top_builddir_sub&;t t
16018 s&@top_build_prefix@&$ac_top_build_prefix&;t t
16019 s&@srcdir@&$ac_srcdir&;t t
16020 s&@abs_srcdir@&$ac_abs_srcdir&;t t
16021 s&@top_srcdir@&$ac_top_srcdir&;t t
16022 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16023 s&@builddir@&$ac_builddir&;t t
16024 s&@abs_builddir@&$ac_abs_builddir&;t t
16025 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16026 s&@INSTALL@&$ac_INSTALL&;t t
16027 s&@MKDIR_P@&$ac_MKDIR_P&;t t
16028 $ac_datarootdir_hack
16029 "
16030 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16031   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16032
16033 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
16034   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16035   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
16036       "$ac_tmp/out"`; test -z "$ac_out"; } &&
16037   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16038 which seems to be undefined.  Please make sure it is defined" >&5
16039 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16040 which seems to be undefined.  Please make sure it is defined" >&2;}
16041
16042   rm -f "$ac_tmp/stdin"
16043   case $ac_file in
16044   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16045   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
16046   esac \
16047   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16048  ;;
16049   :H)
16050   #
16051   # CONFIG_HEADER
16052   #
16053   if test x"$ac_file" != x-; then
16054     {
16055       $as_echo "/* $configure_input  */" \
16056       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16057     } >"$ac_tmp/config.h" \
16058       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16059     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
16060       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16061 $as_echo "$as_me: $ac_file is unchanged" >&6;}
16062     else
16063       rm -f "$ac_file"
16064       mv "$ac_tmp/config.h" "$ac_file" \
16065         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16066     fi
16067   else
16068     $as_echo "/* $configure_input  */" \
16069       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
16070       || as_fn_error $? "could not create -" "$LINENO" 5
16071   fi
16072  ;;
16073   :L)
16074   #
16075   # CONFIG_LINK
16076   #
16077
16078   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
16079     :
16080   else
16081     # Prefer the file from the source tree if names are identical.
16082     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
16083       ac_source=$srcdir/$ac_source
16084     fi
16085
16086     { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
16087 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
16088
16089     if test ! -r "$ac_source"; then
16090       as_fn_error $? "$ac_source: file not found" "$LINENO" 5
16091     fi
16092     rm -f "$ac_file"
16093
16094     # Try a relative symlink, then a hard link, then a copy.
16095     case $ac_source in
16096     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
16097         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
16098     esac
16099     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
16100       ln "$ac_source" "$ac_file" 2>/dev/null ||
16101       cp -p "$ac_source" "$ac_file" ||
16102       as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
16103   fi
16104  ;;
16105   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
16106 $as_echo "$as_me: executing $ac_file commands" >&6;}
16107  ;;
16108   esac
16109
16110
16111   case $ac_file$ac_mode in
16112     "check_win32_symlinks":C)
16113 # Links sometimes fail undetected on Mingw -
16114 # so here we detect it and warn the user
16115 for FILE in $CONFIG_LINKS
16116  do
16117         # test -e works for symlinks in the MinGW console
16118         test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
16119 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
16120  done
16121  ;;
16122     "src/include/pg_config.h":H)
16123 # Update timestamp for pg_config.h (see Makefile.global)
16124 echo >src/include/stamp-h
16125  ;;
16126     "src/include/pg_config_ext.h":H)
16127 # Update timestamp for pg_config_ext.h (see Makefile.global)
16128 echo >src/include/stamp-ext-h
16129  ;;
16130     "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
16131
16132   esac
16133 done # for ac_tag
16134
16135
16136 as_fn_exit 0
16137 _ACEOF
16138 ac_clean_files=$ac_clean_files_save
16139
16140 test $ac_write_fail = 0 ||
16141   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
16142
16143
16144 # configure is writing to config.log, and then calls config.status.
16145 # config.status does its own redirection, appending to config.log.
16146 # Unfortunately, on DOS this fails, as config.log is still kept open
16147 # by configure, so config.status won't be able to write to it; its
16148 # output is simply discarded.  So we exec the FD to /dev/null,
16149 # effectively closing config.log, so it can be properly (re)opened and
16150 # appended to by config.status.  When coming back to configure, we
16151 # need to make the FD available again.
16152 if test "$no_create" != yes; then
16153   ac_cs_success=:
16154   ac_config_status_args=
16155   test "$silent" = yes &&
16156     ac_config_status_args="$ac_config_status_args --quiet"
16157   exec 5>/dev/null
16158   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
16159   exec 5>>config.log
16160   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16161   # would make configure fail if this is the last instruction.
16162   $ac_cs_success || as_fn_exit 1
16163 fi
16164 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16165   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16166 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
16167 fi
16168