]> granicus.if.org Git - postgresql/blob - configure
Process withCheckOption exprs in setrefs.c
[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 DBTOEPUB
634 COLLATEINDEX
635 DOCBOOKSTYLE
636 have_docbook
637 JADE
638 NSGMLS
639 TCL_SHLIB_LD_LIBS
640 TCL_SHARED_BUILD
641 TCL_LIB_SPEC
642 TCL_LIBS
643 TCL_LIB_FILE
644 TCL_INCLUDE_SPEC
645 TCL_CONFIG_SH
646 TCLSH
647 XGETTEXT
648 MSGMERGE
649 MSGFMT_FLAGS
650 MSGFMT
651 HAVE_POSIX_SIGNALS
652 LDAP_LIBS_BE
653 LDAP_LIBS_FE
654 PTHREAD_CFLAGS
655 PTHREAD_LIBS
656 acx_pthread_config
657 have_win32_dbghelp
658 HAVE_IPV6
659 LIBOBJS
660 UUID_LIBS
661 ZIC
662 python_enable_shared
663 python_additional_libs
664 python_libspec
665 python_libdir
666 python_includespec
667 python_version
668 python_majorversion
669 PYTHON
670 perl_embed_ldflags
671 perl_useshrplib
672 perl_privlibexp
673 perl_archlibexp
674 PERL
675 FLEXFLAGS
676 FLEX
677 BISONFLAGS
678 BISON
679 MKDIR_P
680 AWK
681 LN_S
682 TAR
683 install_bin
684 INSTALL_DATA
685 INSTALL_SCRIPT
686 INSTALL_PROGRAM
687 WINDRES
688 DLLWRAP
689 DLLTOOL
690 AR
691 STRIP_SHARED_LIB
692 STRIP_STATIC_LIB
693 STRIP
694 RANLIB
695 ld_R_works
696 with_gnu_ld
697 LD
698 LDFLAGS_SL
699 LDFLAGS_EX
700 ELF_SYS
701 EGREP
702 GREP
703 with_zlib
704 with_system_tzdata
705 with_libxslt
706 with_libxml
707 XML2_CONFIG
708 UUID_EXTRA_OBJS
709 with_uuid
710 with_selinux
711 with_openssl
712 krb_srvtab
713 with_python
714 with_perl
715 with_tcl
716 enable_thread_safety
717 INCLUDES
718 autodepend
719 TAS
720 GCC
721 CPP
722 CFLAGS_VECTOR
723 SUN_STUDIO_CC
724 OBJEXT
725 EXEEXT
726 ac_ct_CC
727 CPPFLAGS
728 LDFLAGS
729 CFLAGS
730 CC
731 enable_dtrace
732 DTRACEFLAGS
733 DTRACE
734 enable_coverage
735 GENHTML
736 LCOV
737 GCOV
738 enable_debug
739 enable_rpath
740 default_port
741 WANTED_LANGUAGES
742 enable_nls
743 PORTNAME
744 host_os
745 host_vendor
746 host_cpu
747 host
748 build_os
749 build_vendor
750 build_cpu
751 build
752 PG_MAJORVERSION
753 configure_args
754 target_alias
755 host_alias
756 build_alias
757 LIBS
758 ECHO_T
759 ECHO_N
760 ECHO_C
761 DEFS
762 mandir
763 localedir
764 libdir
765 psdir
766 pdfdir
767 dvidir
768 htmldir
769 infodir
770 docdir
771 oldincludedir
772 includedir
773 localstatedir
774 sharedstatedir
775 sysconfdir
776 datadir
777 datarootdir
778 libexecdir
779 sbindir
780 bindir
781 program_transform_name
782 prefix
783 exec_prefix
784 PACKAGE_URL
785 PACKAGE_BUGREPORT
786 PACKAGE_STRING
787 PACKAGE_VERSION
788 PACKAGE_TARNAME
789 PACKAGE_NAME
790 PATH_SEPARATOR
791 SHELL'
792 ac_subst_files=''
793 ac_user_opts='
794 enable_option_checking
795 with_extra_version
796 with_template
797 with_includes
798 with_libraries
799 with_libs
800 enable_integer_datetimes
801 enable_nls
802 with_pgport
803 enable_rpath
804 enable_spinlocks
805 enable_debug
806 enable_profiling
807 enable_coverage
808 enable_dtrace
809 with_blocksize
810 with_segsize
811 with_wal_blocksize
812 with_wal_segsize
813 with_CC
814 enable_depend
815 enable_cassert
816 enable_thread_safety
817 with_tcl
818 with_tclconfig
819 with_perl
820 with_python
821 with_gssapi
822 with_krb_srvnam
823 with_pam
824 with_ldap
825 with_bonjour
826 with_openssl
827 with_selinux
828 with_readline
829 with_libedit_preferred
830 with_uuid
831 with_ossp_uuid
832 with_libxml
833 with_libxslt
834 with_system_tzdata
835 with_zlib
836 with_gnu_ld
837 enable_largefile
838 enable_float4_byval
839 enable_float8_byval
840 '
841       ac_precious_vars='build_alias
842 host_alias
843 target_alias
844 CC
845 CFLAGS
846 LDFLAGS
847 LIBS
848 CPPFLAGS
849 CPP
850 LDFLAGS_EX
851 LDFLAGS_SL
852 DOCBOOKSTYLE'
853
854
855 # Initialize some variables set by options.
856 ac_init_help=
857 ac_init_version=false
858 ac_unrecognized_opts=
859 ac_unrecognized_sep=
860 # The variables have the same names as the options, with
861 # dashes changed to underlines.
862 cache_file=/dev/null
863 exec_prefix=NONE
864 no_create=
865 no_recursion=
866 prefix=NONE
867 program_prefix=NONE
868 program_suffix=NONE
869 program_transform_name=s,x,x,
870 silent=
871 site=
872 srcdir=
873 verbose=
874 x_includes=NONE
875 x_libraries=NONE
876
877 # Installation directory options.
878 # These are left unexpanded so users can "make install exec_prefix=/foo"
879 # and all the variables that are supposed to be based on exec_prefix
880 # by default will actually change.
881 # Use braces instead of parens because sh, perl, etc. also accept them.
882 # (The list follows the same order as the GNU Coding Standards.)
883 bindir='${exec_prefix}/bin'
884 sbindir='${exec_prefix}/sbin'
885 libexecdir='${exec_prefix}/libexec'
886 datarootdir='${prefix}/share'
887 datadir='${datarootdir}'
888 sysconfdir='${prefix}/etc'
889 sharedstatedir='${prefix}/com'
890 localstatedir='${prefix}/var'
891 includedir='${prefix}/include'
892 oldincludedir='/usr/include'
893 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
894 infodir='${datarootdir}/info'
895 htmldir='${docdir}'
896 dvidir='${docdir}'
897 pdfdir='${docdir}'
898 psdir='${docdir}'
899 libdir='${exec_prefix}/lib'
900 localedir='${datarootdir}/locale'
901 mandir='${datarootdir}/man'
902
903 ac_prev=
904 ac_dashdash=
905 for ac_option
906 do
907   # If the previous option needs an argument, assign it.
908   if test -n "$ac_prev"; then
909     eval $ac_prev=\$ac_option
910     ac_prev=
911     continue
912   fi
913
914   case $ac_option in
915   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
916   *=)   ac_optarg= ;;
917   *)    ac_optarg=yes ;;
918   esac
919
920   # Accept the important Cygnus configure options, so we can diagnose typos.
921
922   case $ac_dashdash$ac_option in
923   --)
924     ac_dashdash=yes ;;
925
926   -bindir | --bindir | --bindi | --bind | --bin | --bi)
927     ac_prev=bindir ;;
928   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
929     bindir=$ac_optarg ;;
930
931   -build | --build | --buil | --bui | --bu)
932     ac_prev=build_alias ;;
933   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
934     build_alias=$ac_optarg ;;
935
936   -cache-file | --cache-file | --cache-fil | --cache-fi \
937   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
938     ac_prev=cache_file ;;
939   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
940   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
941     cache_file=$ac_optarg ;;
942
943   --config-cache | -C)
944     cache_file=config.cache ;;
945
946   -datadir | --datadir | --datadi | --datad)
947     ac_prev=datadir ;;
948   -datadir=* | --datadir=* | --datadi=* | --datad=*)
949     datadir=$ac_optarg ;;
950
951   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
952   | --dataroo | --dataro | --datar)
953     ac_prev=datarootdir ;;
954   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
955   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
956     datarootdir=$ac_optarg ;;
957
958   -disable-* | --disable-*)
959     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
960     # Reject names that are not valid shell variable names.
961     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
962       as_fn_error $? "invalid feature name: $ac_useropt"
963     ac_useropt_orig=$ac_useropt
964     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
965     case $ac_user_opts in
966       *"
967 "enable_$ac_useropt"
968 "*) ;;
969       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
970          ac_unrecognized_sep=', ';;
971     esac
972     eval enable_$ac_useropt=no ;;
973
974   -docdir | --docdir | --docdi | --doc | --do)
975     ac_prev=docdir ;;
976   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
977     docdir=$ac_optarg ;;
978
979   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
980     ac_prev=dvidir ;;
981   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
982     dvidir=$ac_optarg ;;
983
984   -enable-* | --enable-*)
985     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
986     # Reject names that are not valid shell variable names.
987     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
988       as_fn_error $? "invalid feature name: $ac_useropt"
989     ac_useropt_orig=$ac_useropt
990     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
991     case $ac_user_opts in
992       *"
993 "enable_$ac_useropt"
994 "*) ;;
995       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
996          ac_unrecognized_sep=', ';;
997     esac
998     eval enable_$ac_useropt=\$ac_optarg ;;
999
1000   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1001   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1002   | --exec | --exe | --ex)
1003     ac_prev=exec_prefix ;;
1004   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1005   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1006   | --exec=* | --exe=* | --ex=*)
1007     exec_prefix=$ac_optarg ;;
1008
1009   -gas | --gas | --ga | --g)
1010     # Obsolete; use --with-gas.
1011     with_gas=yes ;;
1012
1013   -help | --help | --hel | --he | -h)
1014     ac_init_help=long ;;
1015   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1016     ac_init_help=recursive ;;
1017   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1018     ac_init_help=short ;;
1019
1020   -host | --host | --hos | --ho)
1021     ac_prev=host_alias ;;
1022   -host=* | --host=* | --hos=* | --ho=*)
1023     host_alias=$ac_optarg ;;
1024
1025   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1026     ac_prev=htmldir ;;
1027   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1028   | --ht=*)
1029     htmldir=$ac_optarg ;;
1030
1031   -includedir | --includedir | --includedi | --included | --include \
1032   | --includ | --inclu | --incl | --inc)
1033     ac_prev=includedir ;;
1034   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1035   | --includ=* | --inclu=* | --incl=* | --inc=*)
1036     includedir=$ac_optarg ;;
1037
1038   -infodir | --infodir | --infodi | --infod | --info | --inf)
1039     ac_prev=infodir ;;
1040   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1041     infodir=$ac_optarg ;;
1042
1043   -libdir | --libdir | --libdi | --libd)
1044     ac_prev=libdir ;;
1045   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1046     libdir=$ac_optarg ;;
1047
1048   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1049   | --libexe | --libex | --libe)
1050     ac_prev=libexecdir ;;
1051   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1052   | --libexe=* | --libex=* | --libe=*)
1053     libexecdir=$ac_optarg ;;
1054
1055   -localedir | --localedir | --localedi | --localed | --locale)
1056     ac_prev=localedir ;;
1057   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1058     localedir=$ac_optarg ;;
1059
1060   -localstatedir | --localstatedir | --localstatedi | --localstated \
1061   | --localstate | --localstat | --localsta | --localst | --locals)
1062     ac_prev=localstatedir ;;
1063   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1064   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1065     localstatedir=$ac_optarg ;;
1066
1067   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1068     ac_prev=mandir ;;
1069   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1070     mandir=$ac_optarg ;;
1071
1072   -nfp | --nfp | --nf)
1073     # Obsolete; use --without-fp.
1074     with_fp=no ;;
1075
1076   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1077   | --no-cr | --no-c | -n)
1078     no_create=yes ;;
1079
1080   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1081   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1082     no_recursion=yes ;;
1083
1084   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1085   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1086   | --oldin | --oldi | --old | --ol | --o)
1087     ac_prev=oldincludedir ;;
1088   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1089   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1090   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1091     oldincludedir=$ac_optarg ;;
1092
1093   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1094     ac_prev=prefix ;;
1095   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1096     prefix=$ac_optarg ;;
1097
1098   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1099   | --program-pre | --program-pr | --program-p)
1100     ac_prev=program_prefix ;;
1101   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1102   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1103     program_prefix=$ac_optarg ;;
1104
1105   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1106   | --program-suf | --program-su | --program-s)
1107     ac_prev=program_suffix ;;
1108   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1109   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1110     program_suffix=$ac_optarg ;;
1111
1112   -program-transform-name | --program-transform-name \
1113   | --program-transform-nam | --program-transform-na \
1114   | --program-transform-n | --program-transform- \
1115   | --program-transform | --program-transfor \
1116   | --program-transfo | --program-transf \
1117   | --program-trans | --program-tran \
1118   | --progr-tra | --program-tr | --program-t)
1119     ac_prev=program_transform_name ;;
1120   -program-transform-name=* | --program-transform-name=* \
1121   | --program-transform-nam=* | --program-transform-na=* \
1122   | --program-transform-n=* | --program-transform-=* \
1123   | --program-transform=* | --program-transfor=* \
1124   | --program-transfo=* | --program-transf=* \
1125   | --program-trans=* | --program-tran=* \
1126   | --progr-tra=* | --program-tr=* | --program-t=*)
1127     program_transform_name=$ac_optarg ;;
1128
1129   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1130     ac_prev=pdfdir ;;
1131   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1132     pdfdir=$ac_optarg ;;
1133
1134   -psdir | --psdir | --psdi | --psd | --ps)
1135     ac_prev=psdir ;;
1136   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1137     psdir=$ac_optarg ;;
1138
1139   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1140   | -silent | --silent | --silen | --sile | --sil)
1141     silent=yes ;;
1142
1143   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1144     ac_prev=sbindir ;;
1145   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1146   | --sbi=* | --sb=*)
1147     sbindir=$ac_optarg ;;
1148
1149   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1150   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1151   | --sharedst | --shareds | --shared | --share | --shar \
1152   | --sha | --sh)
1153     ac_prev=sharedstatedir ;;
1154   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1155   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1156   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1157   | --sha=* | --sh=*)
1158     sharedstatedir=$ac_optarg ;;
1159
1160   -site | --site | --sit)
1161     ac_prev=site ;;
1162   -site=* | --site=* | --sit=*)
1163     site=$ac_optarg ;;
1164
1165   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1166     ac_prev=srcdir ;;
1167   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1168     srcdir=$ac_optarg ;;
1169
1170   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1171   | --syscon | --sysco | --sysc | --sys | --sy)
1172     ac_prev=sysconfdir ;;
1173   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1174   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1175     sysconfdir=$ac_optarg ;;
1176
1177   -target | --target | --targe | --targ | --tar | --ta | --t)
1178     ac_prev=target_alias ;;
1179   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1180     target_alias=$ac_optarg ;;
1181
1182   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1183     verbose=yes ;;
1184
1185   -version | --version | --versio | --versi | --vers | -V)
1186     ac_init_version=: ;;
1187
1188   -with-* | --with-*)
1189     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1190     # Reject names that are not valid shell variable names.
1191     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1192       as_fn_error $? "invalid package name: $ac_useropt"
1193     ac_useropt_orig=$ac_useropt
1194     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1195     case $ac_user_opts in
1196       *"
1197 "with_$ac_useropt"
1198 "*) ;;
1199       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1200          ac_unrecognized_sep=', ';;
1201     esac
1202     eval with_$ac_useropt=\$ac_optarg ;;
1203
1204   -without-* | --without-*)
1205     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1206     # Reject names that are not valid shell variable names.
1207     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1208       as_fn_error $? "invalid package name: $ac_useropt"
1209     ac_useropt_orig=$ac_useropt
1210     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1211     case $ac_user_opts in
1212       *"
1213 "with_$ac_useropt"
1214 "*) ;;
1215       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1216          ac_unrecognized_sep=', ';;
1217     esac
1218     eval with_$ac_useropt=no ;;
1219
1220   --x)
1221     # Obsolete; use --with-x.
1222     with_x=yes ;;
1223
1224   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1225   | --x-incl | --x-inc | --x-in | --x-i)
1226     ac_prev=x_includes ;;
1227   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1228   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1229     x_includes=$ac_optarg ;;
1230
1231   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1232   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1233     ac_prev=x_libraries ;;
1234   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1235   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1236     x_libraries=$ac_optarg ;;
1237
1238   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1239 Try \`$0 --help' for more information"
1240     ;;
1241
1242   *=*)
1243     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1244     # Reject names that are not valid shell variable names.
1245     case $ac_envvar in #(
1246       '' | [0-9]* | *[!_$as_cr_alnum]* )
1247       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1248     esac
1249     eval $ac_envvar=\$ac_optarg
1250     export $ac_envvar ;;
1251
1252   *)
1253     # FIXME: should be removed in autoconf 3.0.
1254     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1255     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1256       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1257     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1258     ;;
1259
1260   esac
1261 done
1262
1263 if test -n "$ac_prev"; then
1264   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1265   as_fn_error $? "missing argument to $ac_option"
1266 fi
1267
1268 if test -n "$ac_unrecognized_opts"; then
1269   case $enable_option_checking in
1270     no) ;;
1271     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1272     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1273   esac
1274 fi
1275
1276 # Check all directory arguments for consistency.
1277 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1278                 datadir sysconfdir sharedstatedir localstatedir includedir \
1279                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1280                 libdir localedir mandir
1281 do
1282   eval ac_val=\$$ac_var
1283   # Remove trailing slashes.
1284   case $ac_val in
1285     */ )
1286       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1287       eval $ac_var=\$ac_val;;
1288   esac
1289   # Be sure to have absolute directory names.
1290   case $ac_val in
1291     [\\/$]* | ?:[\\/]* )  continue;;
1292     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1293   esac
1294   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1295 done
1296
1297 # There might be people who depend on the old broken behavior: `$host'
1298 # used to hold the argument of --host etc.
1299 # FIXME: To remove some day.
1300 build=$build_alias
1301 host=$host_alias
1302 target=$target_alias
1303
1304 # FIXME: To remove some day.
1305 if test "x$host_alias" != x; then
1306   if test "x$build_alias" = x; then
1307     cross_compiling=maybe
1308   elif test "x$build_alias" != "x$host_alias"; then
1309     cross_compiling=yes
1310   fi
1311 fi
1312
1313 ac_tool_prefix=
1314 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1315
1316 test "$silent" = yes && exec 6>/dev/null
1317
1318
1319 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1320 ac_ls_di=`ls -di .` &&
1321 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1322   as_fn_error $? "working directory cannot be determined"
1323 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1324   as_fn_error $? "pwd does not report name of working directory"
1325
1326
1327 # Find the source files, if location was not specified.
1328 if test -z "$srcdir"; then
1329   ac_srcdir_defaulted=yes
1330   # Try the directory containing this script, then the parent directory.
1331   ac_confdir=`$as_dirname -- "$as_myself" ||
1332 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1333          X"$as_myself" : 'X\(//\)[^/]' \| \
1334          X"$as_myself" : 'X\(//\)$' \| \
1335          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1336 $as_echo X"$as_myself" |
1337     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1338             s//\1/
1339             q
1340           }
1341           /^X\(\/\/\)[^/].*/{
1342             s//\1/
1343             q
1344           }
1345           /^X\(\/\/\)$/{
1346             s//\1/
1347             q
1348           }
1349           /^X\(\/\).*/{
1350             s//\1/
1351             q
1352           }
1353           s/.*/./; q'`
1354   srcdir=$ac_confdir
1355   if test ! -r "$srcdir/$ac_unique_file"; then
1356     srcdir=..
1357   fi
1358 else
1359   ac_srcdir_defaulted=no
1360 fi
1361 if test ! -r "$srcdir/$ac_unique_file"; then
1362   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1363   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1364 fi
1365 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1366 ac_abs_confdir=`(
1367         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1368         pwd)`
1369 # When building in place, set srcdir=.
1370 if test "$ac_abs_confdir" = "$ac_pwd"; then
1371   srcdir=.
1372 fi
1373 # Remove unnecessary trailing slashes from srcdir.
1374 # Double slashes in file names in object file debugging info
1375 # mess up M-x gdb in Emacs.
1376 case $srcdir in
1377 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1378 esac
1379 for ac_var in $ac_precious_vars; do
1380   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1381   eval ac_env_${ac_var}_value=\$${ac_var}
1382   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1383   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1384 done
1385
1386 #
1387 # Report the --help message.
1388 #
1389 if test "$ac_init_help" = "long"; then
1390   # Omit some internal or obsolete options to make the list less imposing.
1391   # This message is too long to be a string in the A/UX 3.1 sh.
1392   cat <<_ACEOF
1393 \`configure' configures PostgreSQL 9.5devel to adapt to many kinds of systems.
1394
1395 Usage: $0 [OPTION]... [VAR=VALUE]...
1396
1397 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1398 VAR=VALUE.  See below for descriptions of some of the useful variables.
1399
1400 Defaults for the options are specified in brackets.
1401
1402 Configuration:
1403   -h, --help              display this help and exit
1404       --help=short        display options specific to this package
1405       --help=recursive    display the short help of all the included packages
1406   -V, --version           display version information and exit
1407   -q, --quiet, --silent   do not print \`checking ...' messages
1408       --cache-file=FILE   cache test results in FILE [disabled]
1409   -C, --config-cache      alias for \`--cache-file=config.cache'
1410   -n, --no-create         do not create output files
1411       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1412
1413 Installation directories:
1414   --prefix=PREFIX         install architecture-independent files in PREFIX
1415                           [$ac_default_prefix]
1416   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1417                           [PREFIX]
1418
1419 By default, \`make install' will install all the files in
1420 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1421 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1422 for instance \`--prefix=\$HOME'.
1423
1424 For better control, use the options below.
1425
1426 Fine tuning of the installation directories:
1427   --bindir=DIR            user executables [EPREFIX/bin]
1428   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1429   --libexecdir=DIR        program executables [EPREFIX/libexec]
1430   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1431   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1432   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1433   --libdir=DIR            object code libraries [EPREFIX/lib]
1434   --includedir=DIR        C header files [PREFIX/include]
1435   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1436   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1437   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1438   --infodir=DIR           info documentation [DATAROOTDIR/info]
1439   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1440   --mandir=DIR            man documentation [DATAROOTDIR/man]
1441   --docdir=DIR            documentation root [DATAROOTDIR/doc/postgresql]
1442   --htmldir=DIR           html documentation [DOCDIR]
1443   --dvidir=DIR            dvi documentation [DOCDIR]
1444   --pdfdir=DIR            pdf documentation [DOCDIR]
1445   --psdir=DIR             ps documentation [DOCDIR]
1446 _ACEOF
1447
1448   cat <<\_ACEOF
1449
1450 System types:
1451   --build=BUILD     configure for building on BUILD [guessed]
1452   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1453 _ACEOF
1454 fi
1455
1456 if test -n "$ac_init_help"; then
1457   case $ac_init_help in
1458      short | recursive ) echo "Configuration of PostgreSQL 9.5devel:";;
1459    esac
1460   cat <<\_ACEOF
1461
1462 Optional Features:
1463   --disable-option-checking  ignore unrecognized --enable/--with options
1464   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1465   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1466   --disable-integer-datetimes
1467                           disable 64-bit integer date/time support
1468   --enable-nls[=LANGUAGES]
1469                           enable Native Language Support
1470   --disable-rpath         do not embed shared library search path in
1471                           executables
1472   --disable-spinlocks     do not use spinlocks
1473   --enable-debug          build with debugging symbols (-g)
1474   --enable-profiling      build with profiling enabled
1475   --enable-coverage       build with coverage testing instrumentation
1476   --enable-dtrace         build with DTrace support
1477   --enable-depend         turn on automatic dependency tracking
1478   --enable-cassert        enable assertion checks (for debugging)
1479   --disable-thread-safety disable thread-safety in client libraries
1480   --disable-largefile     omit support for large files
1481   --disable-float4-byval  disable float4 passed by value
1482   --disable-float8-byval  disable float8 passed by value
1483
1484 Optional Packages:
1485   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1486   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1487   --with-extra-version=STRING
1488                           append STRING to version
1489   --with-template=NAME    override operating system template
1490   --with-includes=DIRS    look for additional header files in DIRS
1491   --with-libraries=DIRS   look for additional libraries in DIRS
1492   --with-libs=DIRS        alternative spelling of --with-libraries
1493   --with-pgport=PORTNUM   set default port number [5432]
1494   --with-blocksize=BLOCKSIZE
1495                           set table block size in kB [8]
1496   --with-segsize=SEGSIZE  set table segment size in GB [1]
1497   --with-wal-blocksize=BLOCKSIZE
1498                           set WAL block size in kB [8]
1499   --with-wal-segsize=SEGSIZE
1500                           set WAL segment size in MB [16]
1501   --with-CC=CMD           set compiler (deprecated)
1502   --with-tcl              build Tcl modules (PL/Tcl)
1503   --with-tclconfig=DIR    tclConfig.sh is in DIR
1504   --with-perl             build Perl modules (PL/Perl)
1505   --with-python           build Python modules (PL/Python)
1506   --with-gssapi           build with GSSAPI support
1507   --with-krb-srvnam=NAME  default service principal name in Kerberos (GSSAPI)
1508                           [postgres]
1509   --with-pam              build with PAM support
1510   --with-ldap             build with LDAP support
1511   --with-bonjour          build with Bonjour support
1512   --with-openssl          build with OpenSSL support
1513   --with-selinux          build with SELinux support
1514   --without-readline      do not use GNU Readline nor BSD Libedit for editing
1515   --with-libedit-preferred
1516                           prefer BSD Libedit over GNU Readline
1517   --with-uuid=LIB         build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1518   --with-ossp-uuid        obsolete spelling of --with-uuid=ossp
1519   --with-libxml           build with XML support
1520   --with-libxslt          use XSLT support when building contrib/xml2
1521   --with-system-tzdata=DIR
1522                           use system time zone data in DIR
1523   --without-zlib          do not use Zlib
1524   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1525
1526 Some influential environment variables:
1527   CC          C compiler command
1528   CFLAGS      C compiler flags
1529   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1530               nonstandard directory <lib dir>
1531   LIBS        libraries to pass to the linker, e.g. -l<library>
1532   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1533               you have headers in a nonstandard directory <include dir>
1534   CPP         C preprocessor
1535   LDFLAGS_EX  extra linker flags for linking executables only
1536   LDFLAGS_SL  extra linker flags for linking shared libraries only
1537   DOCBOOKSTYLE
1538               location of DocBook stylesheets
1539
1540 Use these variables to override the choices made by `configure' or to help
1541 it to find libraries and programs with nonstandard names/locations.
1542
1543 Report bugs to <pgsql-bugs@postgresql.org>.
1544 _ACEOF
1545 ac_status=$?
1546 fi
1547
1548 if test "$ac_init_help" = "recursive"; then
1549   # If there are subdirs, report their specific --help.
1550   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1551     test -d "$ac_dir" ||
1552       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1553       continue
1554     ac_builddir=.
1555
1556 case "$ac_dir" in
1557 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1558 *)
1559   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1560   # A ".." for each directory in $ac_dir_suffix.
1561   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1562   case $ac_top_builddir_sub in
1563   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1564   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1565   esac ;;
1566 esac
1567 ac_abs_top_builddir=$ac_pwd
1568 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1569 # for backward compatibility:
1570 ac_top_builddir=$ac_top_build_prefix
1571
1572 case $srcdir in
1573   .)  # We are building in place.
1574     ac_srcdir=.
1575     ac_top_srcdir=$ac_top_builddir_sub
1576     ac_abs_top_srcdir=$ac_pwd ;;
1577   [\\/]* | ?:[\\/]* )  # Absolute name.
1578     ac_srcdir=$srcdir$ac_dir_suffix;
1579     ac_top_srcdir=$srcdir
1580     ac_abs_top_srcdir=$srcdir ;;
1581   *) # Relative name.
1582     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1583     ac_top_srcdir=$ac_top_build_prefix$srcdir
1584     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1585 esac
1586 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1587
1588     cd "$ac_dir" || { ac_status=$?; continue; }
1589     # Check for guested configure.
1590     if test -f "$ac_srcdir/configure.gnu"; then
1591       echo &&
1592       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1593     elif test -f "$ac_srcdir/configure"; then
1594       echo &&
1595       $SHELL "$ac_srcdir/configure" --help=recursive
1596     else
1597       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1598     fi || ac_status=$?
1599     cd "$ac_pwd" || { ac_status=$?; break; }
1600   done
1601 fi
1602
1603 test -n "$ac_init_help" && exit $ac_status
1604 if $ac_init_version; then
1605   cat <<\_ACEOF
1606 PostgreSQL configure 9.5devel
1607 generated by GNU Autoconf 2.69
1608
1609 Copyright (C) 2012 Free Software Foundation, Inc.
1610 This configure script is free software; the Free Software Foundation
1611 gives unlimited permission to copy, distribute and modify it.
1612
1613 Copyright (c) 1996-2014, PostgreSQL Global Development Group
1614 _ACEOF
1615   exit
1616 fi
1617
1618 ## ------------------------ ##
1619 ## Autoconf initialization. ##
1620 ## ------------------------ ##
1621
1622 # ac_fn_c_try_compile LINENO
1623 # --------------------------
1624 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1625 ac_fn_c_try_compile ()
1626 {
1627   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1628   rm -f conftest.$ac_objext
1629   if { { ac_try="$ac_compile"
1630 case "(($ac_try" in
1631   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1632   *) ac_try_echo=$ac_try;;
1633 esac
1634 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1635 $as_echo "$ac_try_echo"; } >&5
1636   (eval "$ac_compile") 2>conftest.err
1637   ac_status=$?
1638   if test -s conftest.err; then
1639     grep -v '^ *+' conftest.err >conftest.er1
1640     cat conftest.er1 >&5
1641     mv -f conftest.er1 conftest.err
1642   fi
1643   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1644   test $ac_status = 0; } && {
1645          test -z "$ac_c_werror_flag" ||
1646          test ! -s conftest.err
1647        } && test -s conftest.$ac_objext; then :
1648   ac_retval=0
1649 else
1650   $as_echo "$as_me: failed program was:" >&5
1651 sed 's/^/| /' conftest.$ac_ext >&5
1652
1653         ac_retval=1
1654 fi
1655   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1656   as_fn_set_status $ac_retval
1657
1658 } # ac_fn_c_try_compile
1659
1660 # ac_fn_c_try_link LINENO
1661 # -----------------------
1662 # Try to link conftest.$ac_ext, and return whether this succeeded.
1663 ac_fn_c_try_link ()
1664 {
1665   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1666   rm -f conftest.$ac_objext conftest$ac_exeext
1667   if { { ac_try="$ac_link"
1668 case "(($ac_try" in
1669   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1670   *) ac_try_echo=$ac_try;;
1671 esac
1672 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1673 $as_echo "$ac_try_echo"; } >&5
1674   (eval "$ac_link") 2>conftest.err
1675   ac_status=$?
1676   if test -s conftest.err; then
1677     grep -v '^ *+' conftest.err >conftest.er1
1678     cat conftest.er1 >&5
1679     mv -f conftest.er1 conftest.err
1680   fi
1681   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1682   test $ac_status = 0; } && {
1683          test -z "$ac_c_werror_flag" ||
1684          test ! -s conftest.err
1685        } && test -s conftest$ac_exeext && {
1686          test "$cross_compiling" = yes ||
1687          test -x conftest$ac_exeext
1688        }; then :
1689   ac_retval=0
1690 else
1691   $as_echo "$as_me: failed program was:" >&5
1692 sed 's/^/| /' conftest.$ac_ext >&5
1693
1694         ac_retval=1
1695 fi
1696   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1697   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1698   # interfere with the next link command; also delete a directory that is
1699   # left behind by Apple's compiler.  We do this before executing the actions.
1700   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1701   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1702   as_fn_set_status $ac_retval
1703
1704 } # ac_fn_c_try_link
1705
1706 # ac_fn_c_try_cpp LINENO
1707 # ----------------------
1708 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1709 ac_fn_c_try_cpp ()
1710 {
1711   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1712   if { { ac_try="$ac_cpp conftest.$ac_ext"
1713 case "(($ac_try" in
1714   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1715   *) ac_try_echo=$ac_try;;
1716 esac
1717 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1718 $as_echo "$ac_try_echo"; } >&5
1719   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1720   ac_status=$?
1721   if test -s conftest.err; then
1722     grep -v '^ *+' conftest.err >conftest.er1
1723     cat conftest.er1 >&5
1724     mv -f conftest.er1 conftest.err
1725   fi
1726   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1727   test $ac_status = 0; } > conftest.i && {
1728          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1729          test ! -s conftest.err
1730        }; then :
1731   ac_retval=0
1732 else
1733   $as_echo "$as_me: failed program was:" >&5
1734 sed 's/^/| /' conftest.$ac_ext >&5
1735
1736     ac_retval=1
1737 fi
1738   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1739   as_fn_set_status $ac_retval
1740
1741 } # ac_fn_c_try_cpp
1742
1743 # ac_fn_c_check_func LINENO FUNC VAR
1744 # ----------------------------------
1745 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1746 ac_fn_c_check_func ()
1747 {
1748   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1749   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1750 $as_echo_n "checking for $2... " >&6; }
1751 if eval \${$3+:} false; then :
1752   $as_echo_n "(cached) " >&6
1753 else
1754   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1755 /* end confdefs.h.  */
1756 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1757    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1758 #define $2 innocuous_$2
1759
1760 /* System header to define __stub macros and hopefully few prototypes,
1761     which can conflict with char $2 (); below.
1762     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1763     <limits.h> exists even on freestanding compilers.  */
1764
1765 #ifdef __STDC__
1766 # include <limits.h>
1767 #else
1768 # include <assert.h>
1769 #endif
1770
1771 #undef $2
1772
1773 /* Override any GCC internal prototype to avoid an error.
1774    Use char because int might match the return type of a GCC
1775    builtin and then its argument prototype would still apply.  */
1776 #ifdef __cplusplus
1777 extern "C"
1778 #endif
1779 char $2 ();
1780 /* The GNU C library defines this for functions which it implements
1781     to always fail with ENOSYS.  Some functions are actually named
1782     something starting with __ and the normal name is an alias.  */
1783 #if defined __stub_$2 || defined __stub___$2
1784 choke me
1785 #endif
1786
1787 int
1788 main ()
1789 {
1790 return $2 ();
1791   ;
1792   return 0;
1793 }
1794 _ACEOF
1795 if ac_fn_c_try_link "$LINENO"; then :
1796   eval "$3=yes"
1797 else
1798   eval "$3=no"
1799 fi
1800 rm -f core conftest.err conftest.$ac_objext \
1801     conftest$ac_exeext conftest.$ac_ext
1802 fi
1803 eval ac_res=\$$3
1804                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1805 $as_echo "$ac_res" >&6; }
1806   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1807
1808 } # ac_fn_c_check_func
1809
1810 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1811 # -------------------------------------------------------
1812 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1813 # the include files in INCLUDES and setting the cache variable VAR
1814 # accordingly.
1815 ac_fn_c_check_header_mongrel ()
1816 {
1817   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1818   if eval \${$3+:} false; then :
1819   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1820 $as_echo_n "checking for $2... " >&6; }
1821 if eval \${$3+:} false; then :
1822   $as_echo_n "(cached) " >&6
1823 fi
1824 eval ac_res=\$$3
1825                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1826 $as_echo "$ac_res" >&6; }
1827 else
1828   # Is the header compilable?
1829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1830 $as_echo_n "checking $2 usability... " >&6; }
1831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1832 /* end confdefs.h.  */
1833 $4
1834 #include <$2>
1835 _ACEOF
1836 if ac_fn_c_try_compile "$LINENO"; then :
1837   ac_header_compiler=yes
1838 else
1839   ac_header_compiler=no
1840 fi
1841 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1843 $as_echo "$ac_header_compiler" >&6; }
1844
1845 # Is the header present?
1846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1847 $as_echo_n "checking $2 presence... " >&6; }
1848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1849 /* end confdefs.h.  */
1850 #include <$2>
1851 _ACEOF
1852 if ac_fn_c_try_cpp "$LINENO"; then :
1853   ac_header_preproc=yes
1854 else
1855   ac_header_preproc=no
1856 fi
1857 rm -f conftest.err conftest.i conftest.$ac_ext
1858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1859 $as_echo "$ac_header_preproc" >&6; }
1860
1861 # So?  What about this header?
1862 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1863   yes:no: )
1864     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1865 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1866     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1867 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1868     ;;
1869   no:yes:* )
1870     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1871 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1872     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1873 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1874     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1875 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1876     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1877 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1878     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1879 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1880 ( $as_echo "## ---------------------------------------- ##
1881 ## Report this to pgsql-bugs@postgresql.org ##
1882 ## ---------------------------------------- ##"
1883      ) | sed "s/^/$as_me: WARNING:     /" >&2
1884     ;;
1885 esac
1886   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1887 $as_echo_n "checking for $2... " >&6; }
1888 if eval \${$3+:} false; then :
1889   $as_echo_n "(cached) " >&6
1890 else
1891   eval "$3=\$ac_header_compiler"
1892 fi
1893 eval ac_res=\$$3
1894                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1895 $as_echo "$ac_res" >&6; }
1896 fi
1897   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1898
1899 } # ac_fn_c_check_header_mongrel
1900
1901 # ac_fn_c_try_run LINENO
1902 # ----------------------
1903 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1904 # that executables *can* be run.
1905 ac_fn_c_try_run ()
1906 {
1907   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1908   if { { ac_try="$ac_link"
1909 case "(($ac_try" in
1910   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1911   *) ac_try_echo=$ac_try;;
1912 esac
1913 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1914 $as_echo "$ac_try_echo"; } >&5
1915   (eval "$ac_link") 2>&5
1916   ac_status=$?
1917   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1918   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1919   { { case "(($ac_try" in
1920   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1921   *) ac_try_echo=$ac_try;;
1922 esac
1923 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1924 $as_echo "$ac_try_echo"; } >&5
1925   (eval "$ac_try") 2>&5
1926   ac_status=$?
1927   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1928   test $ac_status = 0; }; }; then :
1929   ac_retval=0
1930 else
1931   $as_echo "$as_me: program exited with status $ac_status" >&5
1932        $as_echo "$as_me: failed program was:" >&5
1933 sed 's/^/| /' conftest.$ac_ext >&5
1934
1935        ac_retval=$ac_status
1936 fi
1937   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1938   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1939   as_fn_set_status $ac_retval
1940
1941 } # ac_fn_c_try_run
1942
1943 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1944 # -------------------------------------------------------
1945 # Tests whether HEADER exists and can be compiled using the include files in
1946 # INCLUDES, setting the cache variable VAR accordingly.
1947 ac_fn_c_check_header_compile ()
1948 {
1949   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1950   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1951 $as_echo_n "checking for $2... " >&6; }
1952 if eval \${$3+:} false; then :
1953   $as_echo_n "(cached) " >&6
1954 else
1955   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1956 /* end confdefs.h.  */
1957 $4
1958 #include <$2>
1959 _ACEOF
1960 if ac_fn_c_try_compile "$LINENO"; then :
1961   eval "$3=yes"
1962 else
1963   eval "$3=no"
1964 fi
1965 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1966 fi
1967 eval ac_res=\$$3
1968                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1969 $as_echo "$ac_res" >&6; }
1970   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1971
1972 } # ac_fn_c_check_header_compile
1973
1974 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
1975 # ----------------------------------------------------
1976 # Tries to find if the field MEMBER exists in type AGGR, after including
1977 # INCLUDES, setting cache variable VAR accordingly.
1978 ac_fn_c_check_member ()
1979 {
1980   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1981   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
1982 $as_echo_n "checking for $2.$3... " >&6; }
1983 if eval \${$4+:} false; then :
1984   $as_echo_n "(cached) " >&6
1985 else
1986   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1987 /* end confdefs.h.  */
1988 $5
1989 int
1990 main ()
1991 {
1992 static $2 ac_aggr;
1993 if (ac_aggr.$3)
1994 return 0;
1995   ;
1996   return 0;
1997 }
1998 _ACEOF
1999 if ac_fn_c_try_compile "$LINENO"; then :
2000   eval "$4=yes"
2001 else
2002   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2003 /* end confdefs.h.  */
2004 $5
2005 int
2006 main ()
2007 {
2008 static $2 ac_aggr;
2009 if (sizeof ac_aggr.$3)
2010 return 0;
2011   ;
2012   return 0;
2013 }
2014 _ACEOF
2015 if ac_fn_c_try_compile "$LINENO"; then :
2016   eval "$4=yes"
2017 else
2018   eval "$4=no"
2019 fi
2020 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2021 fi
2022 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2023 fi
2024 eval ac_res=\$$4
2025                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2026 $as_echo "$ac_res" >&6; }
2027   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2028
2029 } # ac_fn_c_check_member
2030
2031 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2032 # -------------------------------------------
2033 # Tests whether TYPE exists after having included INCLUDES, setting cache
2034 # variable VAR accordingly.
2035 ac_fn_c_check_type ()
2036 {
2037   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2038   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2039 $as_echo_n "checking for $2... " >&6; }
2040 if eval \${$3+:} false; then :
2041   $as_echo_n "(cached) " >&6
2042 else
2043   eval "$3=no"
2044   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2045 /* end confdefs.h.  */
2046 $4
2047 int
2048 main ()
2049 {
2050 if (sizeof ($2))
2051          return 0;
2052   ;
2053   return 0;
2054 }
2055 _ACEOF
2056 if ac_fn_c_try_compile "$LINENO"; then :
2057   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2058 /* end confdefs.h.  */
2059 $4
2060 int
2061 main ()
2062 {
2063 if (sizeof (($2)))
2064             return 0;
2065   ;
2066   return 0;
2067 }
2068 _ACEOF
2069 if ac_fn_c_try_compile "$LINENO"; then :
2070
2071 else
2072   eval "$3=yes"
2073 fi
2074 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2075 fi
2076 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2077 fi
2078 eval ac_res=\$$3
2079                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2080 $as_echo "$ac_res" >&6; }
2081   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2082
2083 } # ac_fn_c_check_type
2084
2085 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2086 # --------------------------------------------
2087 # Tries to find the compile-time value of EXPR in a program that includes
2088 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2089 # computed
2090 ac_fn_c_compute_int ()
2091 {
2092   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2093   if test "$cross_compiling" = yes; then
2094     # Depending upon the size, compute the lo and hi bounds.
2095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2096 /* end confdefs.h.  */
2097 $4
2098 int
2099 main ()
2100 {
2101 static int test_array [1 - 2 * !(($2) >= 0)];
2102 test_array [0] = 0;
2103 return test_array [0];
2104
2105   ;
2106   return 0;
2107 }
2108 _ACEOF
2109 if ac_fn_c_try_compile "$LINENO"; then :
2110   ac_lo=0 ac_mid=0
2111   while :; do
2112     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2113 /* end confdefs.h.  */
2114 $4
2115 int
2116 main ()
2117 {
2118 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2119 test_array [0] = 0;
2120 return test_array [0];
2121
2122   ;
2123   return 0;
2124 }
2125 _ACEOF
2126 if ac_fn_c_try_compile "$LINENO"; then :
2127   ac_hi=$ac_mid; break
2128 else
2129   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2130                         if test $ac_lo -le $ac_mid; then
2131                           ac_lo= ac_hi=
2132                           break
2133                         fi
2134                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2135 fi
2136 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2137   done
2138 else
2139   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2140 /* end confdefs.h.  */
2141 $4
2142 int
2143 main ()
2144 {
2145 static int test_array [1 - 2 * !(($2) < 0)];
2146 test_array [0] = 0;
2147 return test_array [0];
2148
2149   ;
2150   return 0;
2151 }
2152 _ACEOF
2153 if ac_fn_c_try_compile "$LINENO"; then :
2154   ac_hi=-1 ac_mid=-1
2155   while :; do
2156     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2157 /* end confdefs.h.  */
2158 $4
2159 int
2160 main ()
2161 {
2162 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2163 test_array [0] = 0;
2164 return test_array [0];
2165
2166   ;
2167   return 0;
2168 }
2169 _ACEOF
2170 if ac_fn_c_try_compile "$LINENO"; then :
2171   ac_lo=$ac_mid; break
2172 else
2173   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2174                         if test $ac_mid -le $ac_hi; then
2175                           ac_lo= ac_hi=
2176                           break
2177                         fi
2178                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2179 fi
2180 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2181   done
2182 else
2183   ac_lo= ac_hi=
2184 fi
2185 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2186 fi
2187 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2188 # Binary search between lo and hi bounds.
2189 while test "x$ac_lo" != "x$ac_hi"; do
2190   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2191   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2192 /* end confdefs.h.  */
2193 $4
2194 int
2195 main ()
2196 {
2197 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2198 test_array [0] = 0;
2199 return test_array [0];
2200
2201   ;
2202   return 0;
2203 }
2204 _ACEOF
2205 if ac_fn_c_try_compile "$LINENO"; then :
2206   ac_hi=$ac_mid
2207 else
2208   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2209 fi
2210 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2211 done
2212 case $ac_lo in #((
2213 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2214 '') ac_retval=1 ;;
2215 esac
2216   else
2217     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2218 /* end confdefs.h.  */
2219 $4
2220 static long int longval () { return $2; }
2221 static unsigned long int ulongval () { return $2; }
2222 #include <stdio.h>
2223 #include <stdlib.h>
2224 int
2225 main ()
2226 {
2227
2228   FILE *f = fopen ("conftest.val", "w");
2229   if (! f)
2230     return 1;
2231   if (($2) < 0)
2232     {
2233       long int i = longval ();
2234       if (i != ($2))
2235         return 1;
2236       fprintf (f, "%ld", i);
2237     }
2238   else
2239     {
2240       unsigned long int i = ulongval ();
2241       if (i != ($2))
2242         return 1;
2243       fprintf (f, "%lu", i);
2244     }
2245   /* Do not output a trailing newline, as this causes \r\n confusion
2246      on some platforms.  */
2247   return ferror (f) || fclose (f) != 0;
2248
2249   ;
2250   return 0;
2251 }
2252 _ACEOF
2253 if ac_fn_c_try_run "$LINENO"; then :
2254   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2255 else
2256   ac_retval=1
2257 fi
2258 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2259   conftest.$ac_objext conftest.beam conftest.$ac_ext
2260 rm -f conftest.val
2261
2262   fi
2263   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2264   as_fn_set_status $ac_retval
2265
2266 } # ac_fn_c_compute_int
2267
2268 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2269 # ---------------------------------------------
2270 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2271 # accordingly.
2272 ac_fn_c_check_decl ()
2273 {
2274   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2275   as_decl_name=`echo $2|sed 's/ *(.*//'`
2276   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2277   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2278 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2279 if eval \${$3+:} false; then :
2280   $as_echo_n "(cached) " >&6
2281 else
2282   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2283 /* end confdefs.h.  */
2284 $4
2285 int
2286 main ()
2287 {
2288 #ifndef $as_decl_name
2289 #ifdef __cplusplus
2290   (void) $as_decl_use;
2291 #else
2292   (void) $as_decl_name;
2293 #endif
2294 #endif
2295
2296   ;
2297   return 0;
2298 }
2299 _ACEOF
2300 if ac_fn_c_try_compile "$LINENO"; then :
2301   eval "$3=yes"
2302 else
2303   eval "$3=no"
2304 fi
2305 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2306 fi
2307 eval ac_res=\$$3
2308                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2309 $as_echo "$ac_res" >&6; }
2310   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2311
2312 } # ac_fn_c_check_decl
2313 cat >config.log <<_ACEOF
2314 This file contains any messages produced by compilers while
2315 running configure, to aid debugging if configure makes a mistake.
2316
2317 It was created by PostgreSQL $as_me 9.5devel, which was
2318 generated by GNU Autoconf 2.69.  Invocation command line was
2319
2320   $ $0 $@
2321
2322 _ACEOF
2323 exec 5>>config.log
2324 {
2325 cat <<_ASUNAME
2326 ## --------- ##
2327 ## Platform. ##
2328 ## --------- ##
2329
2330 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2331 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2332 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2333 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2334 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2335
2336 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2337 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2338
2339 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2340 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2341 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2342 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2343 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2344 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2345 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2346
2347 _ASUNAME
2348
2349 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2350 for as_dir in $PATH
2351 do
2352   IFS=$as_save_IFS
2353   test -z "$as_dir" && as_dir=.
2354     $as_echo "PATH: $as_dir"
2355   done
2356 IFS=$as_save_IFS
2357
2358 } >&5
2359
2360 cat >&5 <<_ACEOF
2361
2362
2363 ## ----------- ##
2364 ## Core tests. ##
2365 ## ----------- ##
2366
2367 _ACEOF
2368
2369
2370 # Keep a trace of the command line.
2371 # Strip out --no-create and --no-recursion so they do not pile up.
2372 # Strip out --silent because we don't want to record it for future runs.
2373 # Also quote any args containing shell meta-characters.
2374 # Make two passes to allow for proper duplicate-argument suppression.
2375 ac_configure_args=
2376 ac_configure_args0=
2377 ac_configure_args1=
2378 ac_must_keep_next=false
2379 for ac_pass in 1 2
2380 do
2381   for ac_arg
2382   do
2383     case $ac_arg in
2384     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2385     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2386     | -silent | --silent | --silen | --sile | --sil)
2387       continue ;;
2388     *\'*)
2389       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2390     esac
2391     case $ac_pass in
2392     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2393     2)
2394       as_fn_append ac_configure_args1 " '$ac_arg'"
2395       if test $ac_must_keep_next = true; then
2396         ac_must_keep_next=false # Got value, back to normal.
2397       else
2398         case $ac_arg in
2399           *=* | --config-cache | -C | -disable-* | --disable-* \
2400           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2401           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2402           | -with-* | --with-* | -without-* | --without-* | --x)
2403             case "$ac_configure_args0 " in
2404               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2405             esac
2406             ;;
2407           -* ) ac_must_keep_next=true ;;
2408         esac
2409       fi
2410       as_fn_append ac_configure_args " '$ac_arg'"
2411       ;;
2412     esac
2413   done
2414 done
2415 { ac_configure_args0=; unset ac_configure_args0;}
2416 { ac_configure_args1=; unset ac_configure_args1;}
2417
2418 # When interrupted or exit'd, cleanup temporary files, and complete
2419 # config.log.  We remove comments because anyway the quotes in there
2420 # would cause problems or look ugly.
2421 # WARNING: Use '\'' to represent an apostrophe within the trap.
2422 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2423 trap 'exit_status=$?
2424   # Save into config.log some information that might help in debugging.
2425   {
2426     echo
2427
2428     $as_echo "## ---------------- ##
2429 ## Cache variables. ##
2430 ## ---------------- ##"
2431     echo
2432     # The following way of writing the cache mishandles newlines in values,
2433 (
2434   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2435     eval ac_val=\$$ac_var
2436     case $ac_val in #(
2437     *${as_nl}*)
2438       case $ac_var in #(
2439       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2440 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2441       esac
2442       case $ac_var in #(
2443       _ | IFS | as_nl) ;; #(
2444       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2445       *) { eval $ac_var=; unset $ac_var;} ;;
2446       esac ;;
2447     esac
2448   done
2449   (set) 2>&1 |
2450     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2451     *${as_nl}ac_space=\ *)
2452       sed -n \
2453         "s/'\''/'\''\\\\'\'''\''/g;
2454           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2455       ;; #(
2456     *)
2457       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2458       ;;
2459     esac |
2460     sort
2461 )
2462     echo
2463
2464     $as_echo "## ----------------- ##
2465 ## Output variables. ##
2466 ## ----------------- ##"
2467     echo
2468     for ac_var in $ac_subst_vars
2469     do
2470       eval ac_val=\$$ac_var
2471       case $ac_val in
2472       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2473       esac
2474       $as_echo "$ac_var='\''$ac_val'\''"
2475     done | sort
2476     echo
2477
2478     if test -n "$ac_subst_files"; then
2479       $as_echo "## ------------------- ##
2480 ## File substitutions. ##
2481 ## ------------------- ##"
2482       echo
2483       for ac_var in $ac_subst_files
2484       do
2485         eval ac_val=\$$ac_var
2486         case $ac_val in
2487         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2488         esac
2489         $as_echo "$ac_var='\''$ac_val'\''"
2490       done | sort
2491       echo
2492     fi
2493
2494     if test -s confdefs.h; then
2495       $as_echo "## ----------- ##
2496 ## confdefs.h. ##
2497 ## ----------- ##"
2498       echo
2499       cat confdefs.h
2500       echo
2501     fi
2502     test "$ac_signal" != 0 &&
2503       $as_echo "$as_me: caught signal $ac_signal"
2504     $as_echo "$as_me: exit $exit_status"
2505   } >&5
2506   rm -f core *.core core.conftest.* &&
2507     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2508     exit $exit_status
2509 ' 0
2510 for ac_signal in 1 2 13 15; do
2511   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2512 done
2513 ac_signal=0
2514
2515 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2516 rm -f -r conftest* confdefs.h
2517
2518 $as_echo "/* confdefs.h */" > confdefs.h
2519
2520 # Predefined preprocessor variables.
2521
2522 cat >>confdefs.h <<_ACEOF
2523 #define PACKAGE_NAME "$PACKAGE_NAME"
2524 _ACEOF
2525
2526 cat >>confdefs.h <<_ACEOF
2527 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2528 _ACEOF
2529
2530 cat >>confdefs.h <<_ACEOF
2531 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2532 _ACEOF
2533
2534 cat >>confdefs.h <<_ACEOF
2535 #define PACKAGE_STRING "$PACKAGE_STRING"
2536 _ACEOF
2537
2538 cat >>confdefs.h <<_ACEOF
2539 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2540 _ACEOF
2541
2542 cat >>confdefs.h <<_ACEOF
2543 #define PACKAGE_URL "$PACKAGE_URL"
2544 _ACEOF
2545
2546
2547 # Let the site file select an alternate cache file if it wants to.
2548 # Prefer an explicitly selected file to automatically selected ones.
2549 ac_site_file1=NONE
2550 ac_site_file2=NONE
2551 if test -n "$CONFIG_SITE"; then
2552   # We do not want a PATH search for config.site.
2553   case $CONFIG_SITE in #((
2554     -*)  ac_site_file1=./$CONFIG_SITE;;
2555     */*) ac_site_file1=$CONFIG_SITE;;
2556     *)   ac_site_file1=./$CONFIG_SITE;;
2557   esac
2558 elif test "x$prefix" != xNONE; then
2559   ac_site_file1=$prefix/share/config.site
2560   ac_site_file2=$prefix/etc/config.site
2561 else
2562   ac_site_file1=$ac_default_prefix/share/config.site
2563   ac_site_file2=$ac_default_prefix/etc/config.site
2564 fi
2565 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2566 do
2567   test "x$ac_site_file" = xNONE && continue
2568   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2569     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2570 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2571     sed 's/^/| /' "$ac_site_file" >&5
2572     . "$ac_site_file" \
2573       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2574 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2575 as_fn_error $? "failed to load site script $ac_site_file
2576 See \`config.log' for more details" "$LINENO" 5; }
2577   fi
2578 done
2579
2580 if test -r "$cache_file"; then
2581   # Some versions of bash will fail to source /dev/null (special files
2582   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2583   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2584     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2585 $as_echo "$as_me: loading cache $cache_file" >&6;}
2586     case $cache_file in
2587       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2588       *)                      . "./$cache_file";;
2589     esac
2590   fi
2591 else
2592   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2593 $as_echo "$as_me: creating cache $cache_file" >&6;}
2594   >$cache_file
2595 fi
2596
2597 # Check that the precious variables saved in the cache have kept the same
2598 # value.
2599 ac_cache_corrupted=false
2600 for ac_var in $ac_precious_vars; do
2601   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2602   eval ac_new_set=\$ac_env_${ac_var}_set
2603   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2604   eval ac_new_val=\$ac_env_${ac_var}_value
2605   case $ac_old_set,$ac_new_set in
2606     set,)
2607       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2608 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2609       ac_cache_corrupted=: ;;
2610     ,set)
2611       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2612 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2613       ac_cache_corrupted=: ;;
2614     ,);;
2615     *)
2616       if test "x$ac_old_val" != "x$ac_new_val"; then
2617         # differences in whitespace do not lead to failure.
2618         ac_old_val_w=`echo x $ac_old_val`
2619         ac_new_val_w=`echo x $ac_new_val`
2620         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2621           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2622 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2623           ac_cache_corrupted=:
2624         else
2625           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2626 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2627           eval $ac_var=\$ac_old_val
2628         fi
2629         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2630 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2631         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2632 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2633       fi;;
2634   esac
2635   # Pass precious variables to config.status.
2636   if test "$ac_new_set" = set; then
2637     case $ac_new_val in
2638     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2639     *) ac_arg=$ac_var=$ac_new_val ;;
2640     esac
2641     case " $ac_configure_args " in
2642       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2643       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2644     esac
2645   fi
2646 done
2647 if $ac_cache_corrupted; then
2648   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2649 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2650   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2651 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2652   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2653 fi
2654 ## -------------------- ##
2655 ## Main body of script. ##
2656 ## -------------------- ##
2657
2658 ac_ext=c
2659 ac_cpp='$CPP $CPPFLAGS'
2660 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2661 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2662 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2663
2664
2665
2666
2667
2668
2669 ac_aux_dir=
2670 for ac_dir in config "$srcdir"/config; do
2671   if test -f "$ac_dir/install-sh"; then
2672     ac_aux_dir=$ac_dir
2673     ac_install_sh="$ac_aux_dir/install-sh -c"
2674     break
2675   elif test -f "$ac_dir/install.sh"; then
2676     ac_aux_dir=$ac_dir
2677     ac_install_sh="$ac_aux_dir/install.sh -c"
2678     break
2679   elif test -f "$ac_dir/shtool"; then
2680     ac_aux_dir=$ac_dir
2681     ac_install_sh="$ac_aux_dir/shtool install -c"
2682     break
2683   fi
2684 done
2685 if test -z "$ac_aux_dir"; then
2686   as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2687 fi
2688
2689 # These three variables are undocumented and unsupported,
2690 # and are intended to be withdrawn in a future Autoconf release.
2691 # They can cause serious problems if a builder's source tree is in a directory
2692 # whose full name contains unusual characters.
2693 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2694 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2695 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2696
2697
2698
2699 configure_args=$ac_configure_args
2700
2701
2702 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\.[0-9][0-9]*\)'`
2703
2704
2705 cat >>confdefs.h <<_ACEOF
2706 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2707 _ACEOF
2708
2709
2710
2711
2712
2713 # Check whether --with-extra-version was given.
2714 if test "${with_extra_version+set}" = set; then :
2715   withval=$with_extra_version;
2716   case $withval in
2717     yes)
2718       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2719       ;;
2720     no)
2721       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2722       ;;
2723     *)
2724       PG_VERSION="$PACKAGE_VERSION$withval"
2725       ;;
2726   esac
2727
2728 else
2729   PG_VERSION="$PACKAGE_VERSION"
2730 fi
2731
2732
2733
2734 cat >>confdefs.h <<_ACEOF
2735 #define PG_VERSION "$PG_VERSION"
2736 _ACEOF
2737
2738
2739 # Make sure we can run config.sub.
2740 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2741   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2742
2743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2744 $as_echo_n "checking build system type... " >&6; }
2745 if ${ac_cv_build+:} false; then :
2746   $as_echo_n "(cached) " >&6
2747 else
2748   ac_build_alias=$build_alias
2749 test "x$ac_build_alias" = x &&
2750   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2751 test "x$ac_build_alias" = x &&
2752   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2753 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2754   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2755
2756 fi
2757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2758 $as_echo "$ac_cv_build" >&6; }
2759 case $ac_cv_build in
2760 *-*-*) ;;
2761 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2762 esac
2763 build=$ac_cv_build
2764 ac_save_IFS=$IFS; IFS='-'
2765 set x $ac_cv_build
2766 shift
2767 build_cpu=$1
2768 build_vendor=$2
2769 shift; shift
2770 # Remember, the first character of IFS is used to create $*,
2771 # except with old shells:
2772 build_os=$*
2773 IFS=$ac_save_IFS
2774 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2775
2776
2777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2778 $as_echo_n "checking host system type... " >&6; }
2779 if ${ac_cv_host+:} false; then :
2780   $as_echo_n "(cached) " >&6
2781 else
2782   if test "x$host_alias" = x; then
2783   ac_cv_host=$ac_cv_build
2784 else
2785   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2786     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2787 fi
2788
2789 fi
2790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2791 $as_echo "$ac_cv_host" >&6; }
2792 case $ac_cv_host in
2793 *-*-*) ;;
2794 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2795 esac
2796 host=$ac_cv_host
2797 ac_save_IFS=$IFS; IFS='-'
2798 set x $ac_cv_host
2799 shift
2800 host_cpu=$1
2801 host_vendor=$2
2802 shift; shift
2803 # Remember, the first character of IFS is used to create $*,
2804 # except with old shells:
2805 host_os=$*
2806 IFS=$ac_save_IFS
2807 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2808
2809
2810
2811 template=
2812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2813 $as_echo_n "checking which template to use... " >&6; }
2814
2815
2816
2817
2818 # Check whether --with-template was given.
2819 if test "${with_template+set}" = set; then :
2820   withval=$with_template;
2821   case $withval in
2822     yes)
2823       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2824       ;;
2825     no)
2826       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2827       ;;
2828     *)
2829
2830   case $withval in
2831     list)   echo; ls "$srcdir/src/template"; exit;;
2832     *)      if test -f "$srcdir/src/template/$with_template" ; then
2833               template=$withval
2834             else
2835               as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2836             fi;;
2837   esac
2838
2839       ;;
2840   esac
2841
2842 else
2843
2844 # --with-template not given
2845
2846 case $host_os in
2847      aix*) template=aix ;;
2848   cygwin*) template=cygwin ;;
2849   darwin*) template=darwin ;;
2850 dragonfly*) template=netbsd ;;
2851  freebsd*) template=freebsd ;;
2852     hpux*) template=hpux ;;
2853  linux*|gnu*|k*bsd*-gnu)
2854            template=linux ;;
2855    mingw*) template=win32 ;;
2856   netbsd*) template=netbsd ;;
2857  openbsd*) template=openbsd ;;
2858      sco*) template=sco ;;
2859  solaris*) template=solaris ;;
2860    sysv5*) template=unixware ;;
2861 esac
2862
2863   if test x"$template" = x"" ; then
2864     as_fn_error $? "
2865 *******************************************************************
2866 PostgreSQL has apparently not been ported to your platform yet.
2867 To try a manual configuration, look into the src/template directory
2868 for a similar platform and use the '--with-template=' option.
2869
2870 Please also contact <pgsql-bugs@postgresql.org> to see about
2871 rectifying this.  Include the above 'checking host system type...'
2872 line.
2873 *******************************************************************
2874 " "$LINENO" 5
2875   fi
2876
2877
2878 fi
2879
2880
2881
2882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
2883 $as_echo "$template" >&6; }
2884
2885 PORTNAME=$template
2886
2887
2888 # Initialize default assumption that we do not need separate assembly code
2889 # for TAS (test-and-set).  This can be overridden by the template file
2890 # when it's executed.
2891 need_tas=no
2892 tas_file=dummy.s
2893
2894
2895
2896 ##
2897 ## Command line options
2898 ##
2899
2900 #
2901 # Add non-standard directories to the include path
2902 #
2903
2904
2905
2906 # Check whether --with-includes was given.
2907 if test "${with_includes+set}" = set; then :
2908   withval=$with_includes;
2909   case $withval in
2910     yes)
2911       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
2912       ;;
2913     no)
2914       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
2915       ;;
2916     *)
2917
2918       ;;
2919   esac
2920
2921 fi
2922
2923
2924
2925
2926 #
2927 # Add non-standard directories to the library search path
2928 #
2929
2930
2931
2932 # Check whether --with-libraries was given.
2933 if test "${with_libraries+set}" = set; then :
2934   withval=$with_libraries;
2935   case $withval in
2936     yes)
2937       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
2938       ;;
2939     no)
2940       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
2941       ;;
2942     *)
2943       LIBRARY_DIRS=$withval
2944       ;;
2945   esac
2946
2947 fi
2948
2949
2950
2951
2952
2953
2954 # Check whether --with-libs was given.
2955 if test "${with_libs+set}" = set; then :
2956   withval=$with_libs;
2957   case $withval in
2958     yes)
2959       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
2960       ;;
2961     no)
2962       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
2963       ;;
2964     *)
2965       LIBRARY_DIRS=$withval
2966       ;;
2967   esac
2968
2969 fi
2970
2971
2972
2973
2974 #
2975 # 64-bit integer date/time storage: enabled by default.
2976 #
2977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with 64-bit integer date/time support" >&5
2978 $as_echo_n "checking whether to build with 64-bit integer date/time support... " >&6; }
2979
2980
2981 # Check whether --enable-integer-datetimes was given.
2982 if test "${enable_integer_datetimes+set}" = set; then :
2983   enableval=$enable_integer_datetimes;
2984   case $enableval in
2985     yes)
2986
2987 $as_echo "#define USE_INTEGER_DATETIMES 1" >>confdefs.h
2988
2989       ;;
2990     no)
2991       :
2992       ;;
2993     *)
2994       as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
2995       ;;
2996   esac
2997
2998 else
2999   enable_integer_datetimes=yes
3000
3001 $as_echo "#define USE_INTEGER_DATETIMES 1" >>confdefs.h
3002
3003 fi
3004
3005
3006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_integer_datetimes" >&5
3007 $as_echo "$enable_integer_datetimes" >&6; }
3008
3009
3010 #
3011 # NLS
3012 #
3013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3014 $as_echo_n "checking whether NLS is wanted... " >&6; }
3015
3016
3017 # Check whether --enable-nls was given.
3018 if test "${enable_nls+set}" = set; then :
3019   enableval=$enable_nls;
3020   case $enableval in
3021     yes)
3022       :
3023       ;;
3024     no)
3025       :
3026       ;;
3027     *)
3028       enable_nls=yes
3029 WANTED_LANGUAGES=$enableval
3030       ;;
3031   esac
3032
3033 else
3034   enable_nls=no
3035 fi
3036
3037
3038
3039 if test "$enable_nls" = yes; then
3040
3041 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3042
3043 fi
3044
3045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3046 $as_echo "$enable_nls" >&6; }
3047
3048
3049
3050 #
3051 # Default port number (--with-pgport), default 5432
3052 #
3053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3054 $as_echo_n "checking for default port number... " >&6; }
3055
3056
3057
3058 # Check whether --with-pgport was given.
3059 if test "${with_pgport+set}" = set; then :
3060   withval=$with_pgport;
3061   case $withval in
3062     yes)
3063       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3064       ;;
3065     no)
3066       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3067       ;;
3068     *)
3069       default_port=$withval
3070       ;;
3071   esac
3072
3073 else
3074   default_port=5432
3075 fi
3076
3077
3078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3079 $as_echo "$default_port" >&6; }
3080 # Need both of these because some places want an integer and some a string
3081
3082 cat >>confdefs.h <<_ACEOF
3083 #define DEF_PGPORT ${default_port}
3084 _ACEOF
3085
3086
3087 cat >>confdefs.h <<_ACEOF
3088 #define DEF_PGPORT_STR "${default_port}"
3089 _ACEOF
3090
3091
3092
3093 #
3094 # '-rpath'-like feature can be disabled
3095 #
3096
3097
3098 # Check whether --enable-rpath was given.
3099 if test "${enable_rpath+set}" = set; then :
3100   enableval=$enable_rpath;
3101   case $enableval in
3102     yes)
3103       :
3104       ;;
3105     no)
3106       :
3107       ;;
3108     *)
3109       as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3110       ;;
3111   esac
3112
3113 else
3114   enable_rpath=yes
3115
3116 fi
3117
3118
3119
3120
3121 #
3122 # Spinlocks
3123 #
3124
3125
3126 # Check whether --enable-spinlocks was given.
3127 if test "${enable_spinlocks+set}" = set; then :
3128   enableval=$enable_spinlocks;
3129   case $enableval in
3130     yes)
3131       :
3132       ;;
3133     no)
3134       :
3135       ;;
3136     *)
3137       as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3138       ;;
3139   esac
3140
3141 else
3142   enable_spinlocks=yes
3143
3144 fi
3145
3146
3147
3148 #
3149 # --enable-debug adds -g to compiler flags
3150 #
3151
3152
3153 # Check whether --enable-debug was given.
3154 if test "${enable_debug+set}" = set; then :
3155   enableval=$enable_debug;
3156   case $enableval in
3157     yes)
3158       :
3159       ;;
3160     no)
3161       :
3162       ;;
3163     *)
3164       as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3165       ;;
3166   esac
3167
3168 else
3169   enable_debug=no
3170
3171 fi
3172
3173
3174
3175
3176 #
3177 # --enable-profiling enables gcc profiling
3178 #
3179
3180
3181 # Check whether --enable-profiling was given.
3182 if test "${enable_profiling+set}" = set; then :
3183   enableval=$enable_profiling;
3184   case $enableval in
3185     yes)
3186       :
3187       ;;
3188     no)
3189       :
3190       ;;
3191     *)
3192       as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3193       ;;
3194   esac
3195
3196 else
3197   enable_profiling=no
3198
3199 fi
3200
3201
3202
3203 #
3204 # --enable-coverage enables generation of code coverage metrics with gcov
3205 #
3206
3207
3208 # Check whether --enable-coverage was given.
3209 if test "${enable_coverage+set}" = set; then :
3210   enableval=$enable_coverage;
3211   case $enableval in
3212     yes)
3213       for ac_prog in gcov
3214 do
3215   # Extract the first word of "$ac_prog", so it can be a program name with args.
3216 set dummy $ac_prog; ac_word=$2
3217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3218 $as_echo_n "checking for $ac_word... " >&6; }
3219 if ${ac_cv_prog_GCOV+:} false; then :
3220   $as_echo_n "(cached) " >&6
3221 else
3222   if test -n "$GCOV"; then
3223   ac_cv_prog_GCOV="$GCOV" # Let the user override the test.
3224 else
3225 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3226 for as_dir in $PATH
3227 do
3228   IFS=$as_save_IFS
3229   test -z "$as_dir" && as_dir=.
3230     for ac_exec_ext in '' $ac_executable_extensions; do
3231   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3232     ac_cv_prog_GCOV="$ac_prog"
3233     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3234     break 2
3235   fi
3236 done
3237   done
3238 IFS=$as_save_IFS
3239
3240 fi
3241 fi
3242 GCOV=$ac_cv_prog_GCOV
3243 if test -n "$GCOV"; then
3244   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3245 $as_echo "$GCOV" >&6; }
3246 else
3247   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3248 $as_echo "no" >&6; }
3249 fi
3250
3251
3252   test -n "$GCOV" && break
3253 done
3254
3255 if test -z "$GCOV"; then
3256   as_fn_error $? "gcov not found" "$LINENO" 5
3257 fi
3258 for ac_prog in lcov
3259 do
3260   # Extract the first word of "$ac_prog", so it can be a program name with args.
3261 set dummy $ac_prog; ac_word=$2
3262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3263 $as_echo_n "checking for $ac_word... " >&6; }
3264 if ${ac_cv_prog_LCOV+:} false; then :
3265   $as_echo_n "(cached) " >&6
3266 else
3267   if test -n "$LCOV"; then
3268   ac_cv_prog_LCOV="$LCOV" # Let the user override the test.
3269 else
3270 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3271 for as_dir in $PATH
3272 do
3273   IFS=$as_save_IFS
3274   test -z "$as_dir" && as_dir=.
3275     for ac_exec_ext in '' $ac_executable_extensions; do
3276   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3277     ac_cv_prog_LCOV="$ac_prog"
3278     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3279     break 2
3280   fi
3281 done
3282   done
3283 IFS=$as_save_IFS
3284
3285 fi
3286 fi
3287 LCOV=$ac_cv_prog_LCOV
3288 if test -n "$LCOV"; then
3289   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3290 $as_echo "$LCOV" >&6; }
3291 else
3292   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3293 $as_echo "no" >&6; }
3294 fi
3295
3296
3297   test -n "$LCOV" && break
3298 done
3299
3300 if test -z "$LCOV"; then
3301   as_fn_error $? "lcov not found" "$LINENO" 5
3302 fi
3303 for ac_prog in genhtml
3304 do
3305   # Extract the first word of "$ac_prog", so it can be a program name with args.
3306 set dummy $ac_prog; ac_word=$2
3307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3308 $as_echo_n "checking for $ac_word... " >&6; }
3309 if ${ac_cv_prog_GENHTML+:} false; then :
3310   $as_echo_n "(cached) " >&6
3311 else
3312   if test -n "$GENHTML"; then
3313   ac_cv_prog_GENHTML="$GENHTML" # Let the user override the test.
3314 else
3315 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3316 for as_dir in $PATH
3317 do
3318   IFS=$as_save_IFS
3319   test -z "$as_dir" && as_dir=.
3320     for ac_exec_ext in '' $ac_executable_extensions; do
3321   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3322     ac_cv_prog_GENHTML="$ac_prog"
3323     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3324     break 2
3325   fi
3326 done
3327   done
3328 IFS=$as_save_IFS
3329
3330 fi
3331 fi
3332 GENHTML=$ac_cv_prog_GENHTML
3333 if test -n "$GENHTML"; then
3334   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3335 $as_echo "$GENHTML" >&6; }
3336 else
3337   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3338 $as_echo "no" >&6; }
3339 fi
3340
3341
3342   test -n "$GENHTML" && break
3343 done
3344
3345 if test -z "$GENHTML"; then
3346   as_fn_error $? "genhtml not found" "$LINENO" 5
3347 fi
3348       ;;
3349     no)
3350       :
3351       ;;
3352     *)
3353       as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3354       ;;
3355   esac
3356
3357 else
3358   enable_coverage=no
3359
3360 fi
3361
3362
3363
3364
3365 #
3366 # DTrace
3367 #
3368
3369
3370 # Check whether --enable-dtrace was given.
3371 if test "${enable_dtrace+set}" = set; then :
3372   enableval=$enable_dtrace;
3373   case $enableval in
3374     yes)
3375       for ac_prog in dtrace
3376 do
3377   # Extract the first word of "$ac_prog", so it can be a program name with args.
3378 set dummy $ac_prog; ac_word=$2
3379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3380 $as_echo_n "checking for $ac_word... " >&6; }
3381 if ${ac_cv_prog_DTRACE+:} false; then :
3382   $as_echo_n "(cached) " >&6
3383 else
3384   if test -n "$DTRACE"; then
3385   ac_cv_prog_DTRACE="$DTRACE" # Let the user override the test.
3386 else
3387 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3388 for as_dir in $PATH
3389 do
3390   IFS=$as_save_IFS
3391   test -z "$as_dir" && as_dir=.
3392     for ac_exec_ext in '' $ac_executable_extensions; do
3393   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3394     ac_cv_prog_DTRACE="$ac_prog"
3395     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3396     break 2
3397   fi
3398 done
3399   done
3400 IFS=$as_save_IFS
3401
3402 fi
3403 fi
3404 DTRACE=$ac_cv_prog_DTRACE
3405 if test -n "$DTRACE"; then
3406   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3407 $as_echo "$DTRACE" >&6; }
3408 else
3409   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3410 $as_echo "no" >&6; }
3411 fi
3412
3413
3414   test -n "$DTRACE" && break
3415 done
3416
3417 if test -z "$DTRACE"; then
3418   as_fn_error $? "dtrace not found" "$LINENO" 5
3419 fi
3420
3421       ;;
3422     no)
3423       :
3424       ;;
3425     *)
3426       as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3427       ;;
3428   esac
3429
3430 else
3431   enable_dtrace=no
3432
3433 fi
3434
3435
3436
3437
3438 #
3439 # Block size
3440 #
3441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3442 $as_echo_n "checking for block size... " >&6; }
3443
3444
3445
3446 # Check whether --with-blocksize was given.
3447 if test "${with_blocksize+set}" = set; then :
3448   withval=$with_blocksize;
3449   case $withval in
3450     yes)
3451       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3452       ;;
3453     no)
3454       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3455       ;;
3456     *)
3457       blocksize=$withval
3458       ;;
3459   esac
3460
3461 else
3462   blocksize=8
3463 fi
3464
3465
3466 case ${blocksize} in
3467   1) BLCKSZ=1024;;
3468   2) BLCKSZ=2048;;
3469   4) BLCKSZ=4096;;
3470   8) BLCKSZ=8192;;
3471  16) BLCKSZ=16384;;
3472  32) BLCKSZ=32768;;
3473   *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3474 esac
3475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3476 $as_echo "${blocksize}kB" >&6; }
3477
3478
3479 cat >>confdefs.h <<_ACEOF
3480 #define BLCKSZ ${BLCKSZ}
3481 _ACEOF
3482
3483
3484 #
3485 # Relation segment size
3486 #
3487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3488 $as_echo_n "checking for segment size... " >&6; }
3489
3490
3491
3492 # Check whether --with-segsize was given.
3493 if test "${with_segsize+set}" = set; then :
3494   withval=$with_segsize;
3495   case $withval in
3496     yes)
3497       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3498       ;;
3499     no)
3500       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3501       ;;
3502     *)
3503       segsize=$withval
3504       ;;
3505   esac
3506
3507 else
3508   segsize=1
3509 fi
3510
3511
3512 # this expression is set up to avoid unnecessary integer overflow
3513 # blocksize is already guaranteed to be a factor of 1024
3514 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3515 test $? -eq 0 || exit 1
3516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3517 $as_echo "${segsize}GB" >&6; }
3518
3519
3520 cat >>confdefs.h <<_ACEOF
3521 #define RELSEG_SIZE ${RELSEG_SIZE}
3522 _ACEOF
3523
3524
3525 #
3526 # WAL block size
3527 #
3528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3529 $as_echo_n "checking for WAL block size... " >&6; }
3530
3531
3532
3533 # Check whether --with-wal-blocksize was given.
3534 if test "${with_wal_blocksize+set}" = set; then :
3535   withval=$with_wal_blocksize;
3536   case $withval in
3537     yes)
3538       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3539       ;;
3540     no)
3541       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3542       ;;
3543     *)
3544       wal_blocksize=$withval
3545       ;;
3546   esac
3547
3548 else
3549   wal_blocksize=8
3550 fi
3551
3552
3553 case ${wal_blocksize} in
3554   1) XLOG_BLCKSZ=1024;;
3555   2) XLOG_BLCKSZ=2048;;
3556   4) XLOG_BLCKSZ=4096;;
3557   8) XLOG_BLCKSZ=8192;;
3558  16) XLOG_BLCKSZ=16384;;
3559  32) XLOG_BLCKSZ=32768;;
3560  64) XLOG_BLCKSZ=65536;;
3561   *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3562 esac
3563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3564 $as_echo "${wal_blocksize}kB" >&6; }
3565
3566
3567 cat >>confdefs.h <<_ACEOF
3568 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3569 _ACEOF
3570
3571
3572 #
3573 # WAL segment size
3574 #
3575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL segment size" >&5
3576 $as_echo_n "checking for WAL segment size... " >&6; }
3577
3578
3579
3580 # Check whether --with-wal-segsize was given.
3581 if test "${with_wal_segsize+set}" = set; then :
3582   withval=$with_wal_segsize;
3583   case $withval in
3584     yes)
3585       as_fn_error $? "argument required for --with-wal-segsize option" "$LINENO" 5
3586       ;;
3587     no)
3588       as_fn_error $? "argument required for --with-wal-segsize option" "$LINENO" 5
3589       ;;
3590     *)
3591       wal_segsize=$withval
3592       ;;
3593   esac
3594
3595 else
3596   wal_segsize=16
3597 fi
3598
3599
3600 case ${wal_segsize} in
3601   1) ;;
3602   2) ;;
3603   4) ;;
3604   8) ;;
3605  16) ;;
3606  32) ;;
3607  64) ;;
3608   *) as_fn_error $? "Invalid WAL segment size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3609 esac
3610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_segsize}MB" >&5
3611 $as_echo "${wal_segsize}MB" >&6; }
3612
3613
3614 cat >>confdefs.h <<_ACEOF
3615 #define XLOG_SEG_SIZE (${wal_segsize} * 1024 * 1024)
3616 _ACEOF
3617
3618
3619 #
3620 # C compiler
3621 #
3622
3623 # For historical reasons you can also use --with-CC to specify the C compiler
3624 # to use, although the standard way to do this is to set the CC environment
3625 # variable.
3626
3627
3628
3629 # Check whether --with-CC was given.
3630 if test "${with_CC+set}" = set; then :
3631   withval=$with_CC;
3632   case $withval in
3633     yes)
3634       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3635       ;;
3636     no)
3637       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3638       ;;
3639     *)
3640       CC=$with_CC
3641       ;;
3642   esac
3643
3644 fi
3645
3646
3647
3648 case $template in
3649   aix) pgac_cc_list="gcc xlc";;
3650     *) pgac_cc_list="gcc cc";;
3651 esac
3652
3653 ac_ext=c
3654 ac_cpp='$CPP $CPPFLAGS'
3655 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3656 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3657 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3658 if test -n "$ac_tool_prefix"; then
3659   for ac_prog in $pgac_cc_list
3660   do
3661     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3662 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3664 $as_echo_n "checking for $ac_word... " >&6; }
3665 if ${ac_cv_prog_CC+:} false; then :
3666   $as_echo_n "(cached) " >&6
3667 else
3668   if test -n "$CC"; then
3669   ac_cv_prog_CC="$CC" # Let the user override the test.
3670 else
3671 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3672 for as_dir in $PATH
3673 do
3674   IFS=$as_save_IFS
3675   test -z "$as_dir" && as_dir=.
3676     for ac_exec_ext in '' $ac_executable_extensions; do
3677   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3678     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3679     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3680     break 2
3681   fi
3682 done
3683   done
3684 IFS=$as_save_IFS
3685
3686 fi
3687 fi
3688 CC=$ac_cv_prog_CC
3689 if test -n "$CC"; then
3690   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3691 $as_echo "$CC" >&6; }
3692 else
3693   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3694 $as_echo "no" >&6; }
3695 fi
3696
3697
3698     test -n "$CC" && break
3699   done
3700 fi
3701 if test -z "$CC"; then
3702   ac_ct_CC=$CC
3703   for ac_prog in $pgac_cc_list
3704 do
3705   # Extract the first word of "$ac_prog", so it can be a program name with args.
3706 set dummy $ac_prog; ac_word=$2
3707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3708 $as_echo_n "checking for $ac_word... " >&6; }
3709 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3710   $as_echo_n "(cached) " >&6
3711 else
3712   if test -n "$ac_ct_CC"; then
3713   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3714 else
3715 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3716 for as_dir in $PATH
3717 do
3718   IFS=$as_save_IFS
3719   test -z "$as_dir" && as_dir=.
3720     for ac_exec_ext in '' $ac_executable_extensions; do
3721   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3722     ac_cv_prog_ac_ct_CC="$ac_prog"
3723     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3724     break 2
3725   fi
3726 done
3727   done
3728 IFS=$as_save_IFS
3729
3730 fi
3731 fi
3732 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3733 if test -n "$ac_ct_CC"; then
3734   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3735 $as_echo "$ac_ct_CC" >&6; }
3736 else
3737   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3738 $as_echo "no" >&6; }
3739 fi
3740
3741
3742   test -n "$ac_ct_CC" && break
3743 done
3744
3745   if test "x$ac_ct_CC" = x; then
3746     CC=""
3747   else
3748     case $cross_compiling:$ac_tool_warned in
3749 yes:)
3750 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3751 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3752 ac_tool_warned=yes ;;
3753 esac
3754     CC=$ac_ct_CC
3755   fi
3756 fi
3757
3758
3759 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3760 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3761 as_fn_error $? "no acceptable C compiler found in \$PATH
3762 See \`config.log' for more details" "$LINENO" 5; }
3763
3764 # Provide some information about the compiler.
3765 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3766 set X $ac_compile
3767 ac_compiler=$2
3768 for ac_option in --version -v -V -qversion; do
3769   { { ac_try="$ac_compiler $ac_option >&5"
3770 case "(($ac_try" in
3771   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3772   *) ac_try_echo=$ac_try;;
3773 esac
3774 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3775 $as_echo "$ac_try_echo"; } >&5
3776   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3777   ac_status=$?
3778   if test -s conftest.err; then
3779     sed '10a\
3780 ... rest of stderr output deleted ...
3781          10q' conftest.err >conftest.er1
3782     cat conftest.er1 >&5
3783   fi
3784   rm -f conftest.er1 conftest.err
3785   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3786   test $ac_status = 0; }
3787 done
3788
3789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3790 /* end confdefs.h.  */
3791
3792 int
3793 main ()
3794 {
3795
3796   ;
3797   return 0;
3798 }
3799 _ACEOF
3800 ac_clean_files_save=$ac_clean_files
3801 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3802 # Try to create an executable without -o first, disregard a.out.
3803 # It will help us diagnose broken compilers, and finding out an intuition
3804 # of exeext.
3805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3806 $as_echo_n "checking whether the C compiler works... " >&6; }
3807 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3808
3809 # The possible output files:
3810 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3811
3812 ac_rmfiles=
3813 for ac_file in $ac_files
3814 do
3815   case $ac_file in
3816     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3817     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3818   esac
3819 done
3820 rm -f $ac_rmfiles
3821
3822 if { { ac_try="$ac_link_default"
3823 case "(($ac_try" in
3824   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3825   *) ac_try_echo=$ac_try;;
3826 esac
3827 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3828 $as_echo "$ac_try_echo"; } >&5
3829   (eval "$ac_link_default") 2>&5
3830   ac_status=$?
3831   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3832   test $ac_status = 0; }; then :
3833   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3834 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3835 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3836 # so that the user can short-circuit this test for compilers unknown to
3837 # Autoconf.
3838 for ac_file in $ac_files ''
3839 do
3840   test -f "$ac_file" || continue
3841   case $ac_file in
3842     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3843         ;;
3844     [ab].out )
3845         # We found the default executable, but exeext='' is most
3846         # certainly right.
3847         break;;
3848     *.* )
3849         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3850         then :; else
3851            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3852         fi
3853         # We set ac_cv_exeext here because the later test for it is not
3854         # safe: cross compilers may not add the suffix if given an `-o'
3855         # argument, so we may need to know it at that point already.
3856         # Even if this section looks crufty: it has the advantage of
3857         # actually working.
3858         break;;
3859     * )
3860         break;;
3861   esac
3862 done
3863 test "$ac_cv_exeext" = no && ac_cv_exeext=
3864
3865 else
3866   ac_file=''
3867 fi
3868 if test -z "$ac_file"; then :
3869   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3870 $as_echo "no" >&6; }
3871 $as_echo "$as_me: failed program was:" >&5
3872 sed 's/^/| /' conftest.$ac_ext >&5
3873
3874 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3875 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3876 as_fn_error 77 "C compiler cannot create executables
3877 See \`config.log' for more details" "$LINENO" 5; }
3878 else
3879   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3880 $as_echo "yes" >&6; }
3881 fi
3882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3883 $as_echo_n "checking for C compiler default output file name... " >&6; }
3884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3885 $as_echo "$ac_file" >&6; }
3886 ac_exeext=$ac_cv_exeext
3887
3888 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3889 ac_clean_files=$ac_clean_files_save
3890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3891 $as_echo_n "checking for suffix of executables... " >&6; }
3892 if { { ac_try="$ac_link"
3893 case "(($ac_try" in
3894   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3895   *) ac_try_echo=$ac_try;;
3896 esac
3897 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3898 $as_echo "$ac_try_echo"; } >&5
3899   (eval "$ac_link") 2>&5
3900   ac_status=$?
3901   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3902   test $ac_status = 0; }; then :
3903   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3904 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3905 # work properly (i.e., refer to `conftest.exe'), while it won't with
3906 # `rm'.
3907 for ac_file in conftest.exe conftest conftest.*; do
3908   test -f "$ac_file" || continue
3909   case $ac_file in
3910     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3911     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3912           break;;
3913     * ) break;;
3914   esac
3915 done
3916 else
3917   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3918 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3919 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3920 See \`config.log' for more details" "$LINENO" 5; }
3921 fi
3922 rm -f conftest conftest$ac_cv_exeext
3923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3924 $as_echo "$ac_cv_exeext" >&6; }
3925
3926 rm -f conftest.$ac_ext
3927 EXEEXT=$ac_cv_exeext
3928 ac_exeext=$EXEEXT
3929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3930 /* end confdefs.h.  */
3931 #include <stdio.h>
3932 int
3933 main ()
3934 {
3935 FILE *f = fopen ("conftest.out", "w");
3936  return ferror (f) || fclose (f) != 0;
3937
3938   ;
3939   return 0;
3940 }
3941 _ACEOF
3942 ac_clean_files="$ac_clean_files conftest.out"
3943 # Check that the compiler produces executables we can run.  If not, either
3944 # the compiler is broken, or we cross compile.
3945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3946 $as_echo_n "checking whether we are cross compiling... " >&6; }
3947 if test "$cross_compiling" != yes; then
3948   { { ac_try="$ac_link"
3949 case "(($ac_try" in
3950   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3951   *) ac_try_echo=$ac_try;;
3952 esac
3953 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3954 $as_echo "$ac_try_echo"; } >&5
3955   (eval "$ac_link") 2>&5
3956   ac_status=$?
3957   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3958   test $ac_status = 0; }
3959   if { ac_try='./conftest$ac_cv_exeext'
3960   { { case "(($ac_try" in
3961   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3962   *) ac_try_echo=$ac_try;;
3963 esac
3964 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3965 $as_echo "$ac_try_echo"; } >&5
3966   (eval "$ac_try") 2>&5
3967   ac_status=$?
3968   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3969   test $ac_status = 0; }; }; then
3970     cross_compiling=no
3971   else
3972     if test "$cross_compiling" = maybe; then
3973         cross_compiling=yes
3974     else
3975         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3976 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3977 as_fn_error $? "cannot run C compiled programs.
3978 If you meant to cross compile, use \`--host'.
3979 See \`config.log' for more details" "$LINENO" 5; }
3980     fi
3981   fi
3982 fi
3983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3984 $as_echo "$cross_compiling" >&6; }
3985
3986 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3987 ac_clean_files=$ac_clean_files_save
3988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3989 $as_echo_n "checking for suffix of object files... " >&6; }
3990 if ${ac_cv_objext+:} false; then :
3991   $as_echo_n "(cached) " >&6
3992 else
3993   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3994 /* end confdefs.h.  */
3995
3996 int
3997 main ()
3998 {
3999
4000   ;
4001   return 0;
4002 }
4003 _ACEOF
4004 rm -f conftest.o conftest.obj
4005 if { { ac_try="$ac_compile"
4006 case "(($ac_try" in
4007   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4008   *) ac_try_echo=$ac_try;;
4009 esac
4010 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4011 $as_echo "$ac_try_echo"; } >&5
4012   (eval "$ac_compile") 2>&5
4013   ac_status=$?
4014   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4015   test $ac_status = 0; }; then :
4016   for ac_file in conftest.o conftest.obj conftest.*; do
4017   test -f "$ac_file" || continue;
4018   case $ac_file in
4019     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4020     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4021        break;;
4022   esac
4023 done
4024 else
4025   $as_echo "$as_me: failed program was:" >&5
4026 sed 's/^/| /' conftest.$ac_ext >&5
4027
4028 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4029 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4030 as_fn_error $? "cannot compute suffix of object files: cannot compile
4031 See \`config.log' for more details" "$LINENO" 5; }
4032 fi
4033 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4034 fi
4035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4036 $as_echo "$ac_cv_objext" >&6; }
4037 OBJEXT=$ac_cv_objext
4038 ac_objext=$OBJEXT
4039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4040 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4041 if ${ac_cv_c_compiler_gnu+:} false; then :
4042   $as_echo_n "(cached) " >&6
4043 else
4044   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4045 /* end confdefs.h.  */
4046
4047 int
4048 main ()
4049 {
4050 #ifndef __GNUC__
4051        choke me
4052 #endif
4053
4054   ;
4055   return 0;
4056 }
4057 _ACEOF
4058 if ac_fn_c_try_compile "$LINENO"; then :
4059   ac_compiler_gnu=yes
4060 else
4061   ac_compiler_gnu=no
4062 fi
4063 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4064 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4065
4066 fi
4067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4068 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4069 if test $ac_compiler_gnu = yes; then
4070   GCC=yes
4071 else
4072   GCC=
4073 fi
4074 ac_test_CFLAGS=${CFLAGS+set}
4075 ac_save_CFLAGS=$CFLAGS
4076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4077 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4078 if ${ac_cv_prog_cc_g+:} false; then :
4079   $as_echo_n "(cached) " >&6
4080 else
4081   ac_save_c_werror_flag=$ac_c_werror_flag
4082    ac_c_werror_flag=yes
4083    ac_cv_prog_cc_g=no
4084    CFLAGS="-g"
4085    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4086 /* end confdefs.h.  */
4087
4088 int
4089 main ()
4090 {
4091
4092   ;
4093   return 0;
4094 }
4095 _ACEOF
4096 if ac_fn_c_try_compile "$LINENO"; then :
4097   ac_cv_prog_cc_g=yes
4098 else
4099   CFLAGS=""
4100       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4101 /* end confdefs.h.  */
4102
4103 int
4104 main ()
4105 {
4106
4107   ;
4108   return 0;
4109 }
4110 _ACEOF
4111 if ac_fn_c_try_compile "$LINENO"; then :
4112
4113 else
4114   ac_c_werror_flag=$ac_save_c_werror_flag
4115          CFLAGS="-g"
4116          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4117 /* end confdefs.h.  */
4118
4119 int
4120 main ()
4121 {
4122
4123   ;
4124   return 0;
4125 }
4126 _ACEOF
4127 if ac_fn_c_try_compile "$LINENO"; then :
4128   ac_cv_prog_cc_g=yes
4129 fi
4130 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4131 fi
4132 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4133 fi
4134 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4135    ac_c_werror_flag=$ac_save_c_werror_flag
4136 fi
4137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4138 $as_echo "$ac_cv_prog_cc_g" >&6; }
4139 if test "$ac_test_CFLAGS" = set; then
4140   CFLAGS=$ac_save_CFLAGS
4141 elif test $ac_cv_prog_cc_g = yes; then
4142   if test "$GCC" = yes; then
4143     CFLAGS="-g -O2"
4144   else
4145     CFLAGS="-g"
4146   fi
4147 else
4148   if test "$GCC" = yes; then
4149     CFLAGS="-O2"
4150   else
4151     CFLAGS=
4152   fi
4153 fi
4154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4155 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4156 if ${ac_cv_prog_cc_c89+:} false; then :
4157   $as_echo_n "(cached) " >&6
4158 else
4159   ac_cv_prog_cc_c89=no
4160 ac_save_CC=$CC
4161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4162 /* end confdefs.h.  */
4163 #include <stdarg.h>
4164 #include <stdio.h>
4165 struct stat;
4166 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4167 struct buf { int x; };
4168 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4169 static char *e (p, i)
4170      char **p;
4171      int i;
4172 {
4173   return p[i];
4174 }
4175 static char *f (char * (*g) (char **, int), char **p, ...)
4176 {
4177   char *s;
4178   va_list v;
4179   va_start (v,p);
4180   s = g (p, va_arg (v,int));
4181   va_end (v);
4182   return s;
4183 }
4184
4185 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4186    function prototypes and stuff, but not '\xHH' hex character constants.
4187    These don't provoke an error unfortunately, instead are silently treated
4188    as 'x'.  The following induces an error, until -std is added to get
4189    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4190    array size at least.  It's necessary to write '\x00'==0 to get something
4191    that's true only with -std.  */
4192 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4193
4194 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4195    inside strings and character constants.  */
4196 #define FOO(x) 'x'
4197 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4198
4199 int test (int i, double x);
4200 struct s1 {int (*f) (int a);};
4201 struct s2 {int (*f) (double a);};
4202 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4203 int argc;
4204 char **argv;
4205 int
4206 main ()
4207 {
4208 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4209   ;
4210   return 0;
4211 }
4212 _ACEOF
4213 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4214         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4215 do
4216   CC="$ac_save_CC $ac_arg"
4217   if ac_fn_c_try_compile "$LINENO"; then :
4218   ac_cv_prog_cc_c89=$ac_arg
4219 fi
4220 rm -f core conftest.err conftest.$ac_objext
4221   test "x$ac_cv_prog_cc_c89" != "xno" && break
4222 done
4223 rm -f conftest.$ac_ext
4224 CC=$ac_save_CC
4225
4226 fi
4227 # AC_CACHE_VAL
4228 case "x$ac_cv_prog_cc_c89" in
4229   x)
4230     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4231 $as_echo "none needed" >&6; } ;;
4232   xno)
4233     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4234 $as_echo "unsupported" >&6; } ;;
4235   *)
4236     CC="$CC $ac_cv_prog_cc_c89"
4237     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4238 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4239 esac
4240 if test "x$ac_cv_prog_cc_c89" != xno; then :
4241
4242 fi
4243
4244 ac_ext=c
4245 ac_cpp='$CPP $CPPFLAGS'
4246 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4247 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4248 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4249
4250
4251 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4252 # but has idiosyncrasies of its own.  We assume icc will define
4253 # __INTEL_COMPILER regardless of CFLAGS.
4254
4255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4256 /* end confdefs.h.  */
4257
4258 int
4259 main ()
4260 {
4261 #ifndef __INTEL_COMPILER
4262 choke me
4263 #endif
4264   ;
4265   return 0;
4266 }
4267 _ACEOF
4268 if ac_fn_c_try_compile "$LINENO"; then :
4269   ICC=yes
4270 else
4271   ICC=no
4272 fi
4273 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4274
4275 # Check if it's Sun Studio compiler. We assume that
4276 # __SUNPRO_C will be defined for Sun Studio compilers
4277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4278 /* end confdefs.h.  */
4279
4280 int
4281 main ()
4282 {
4283 #ifndef __SUNPRO_C
4284 choke me
4285 #endif
4286   ;
4287   return 0;
4288 }
4289 _ACEOF
4290 if ac_fn_c_try_compile "$LINENO"; then :
4291   SUN_STUDIO_CC=yes
4292 else
4293   SUN_STUDIO_CC=no
4294 fi
4295 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4296
4297
4298
4299 unset CFLAGS
4300
4301 #
4302 # Read the template
4303 #
4304 . "$srcdir/src/template/$template" || exit
4305
4306 # CFLAGS are selected so:
4307 # If the user specifies something in the environment, that is used.
4308 # else:  If the template file set something, that is used.
4309 # else:  If coverage was enabled, don't set anything.
4310 # else:  If the compiler is GCC, then we use -O2.
4311 # else:  If the compiler is something else, then we use -O, unless debugging.
4312
4313 if test "$ac_env_CFLAGS_set" = set; then
4314   CFLAGS=$ac_env_CFLAGS_value
4315 elif test "${CFLAGS+set}" = set; then
4316   : # (keep what template set)
4317 elif test "$enable_coverage" = yes; then
4318   : # no optimization by default
4319 elif test "$GCC" = yes; then
4320   CFLAGS="-O2"
4321 else
4322   # if the user selected debug mode, don't use -O
4323   if test "$enable_debug" != yes; then
4324     CFLAGS="-O"
4325   fi
4326 fi
4327
4328 # set CFLAGS_VECTOR from the environment, if available
4329 if test "$ac_env_CFLAGS_VECTOR_set" = set; then
4330   CFLAGS_VECTOR=$ac_env_CFLAGS_VECTOR_value
4331 fi
4332
4333 # Some versions of GCC support some additional useful warning flags.
4334 # Check whether they are supported, and add them to CFLAGS if so.
4335 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
4336 # but has its own.  Also check other compiler-specific flags here.
4337
4338 if test "$GCC" = yes -a "$ICC" = no; then
4339   CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wpointer-arith"
4340   # These work in some but not all gcc versions
4341   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5
4342 $as_echo_n "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
4343 if ${pgac_cv_prog_cc_cflags__Wdeclaration_after_statement+:} false; then :
4344   $as_echo_n "(cached) " >&6
4345 else
4346   pgac_save_CFLAGS=$CFLAGS
4347 CFLAGS="$pgac_save_CFLAGS -Wdeclaration-after-statement"
4348 ac_save_c_werror_flag=$ac_c_werror_flag
4349 ac_c_werror_flag=yes
4350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4351 /* end confdefs.h.  */
4352
4353 int
4354 main ()
4355 {
4356
4357   ;
4358   return 0;
4359 }
4360 _ACEOF
4361 if ac_fn_c_try_compile "$LINENO"; then :
4362   pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=yes
4363 else
4364   pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=no
4365 fi
4366 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4367 ac_c_werror_flag=$ac_save_c_werror_flag
4368 CFLAGS="$pgac_save_CFLAGS"
4369 fi
4370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&5
4371 $as_echo "$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&6; }
4372 if test x"$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" = x"yes"; then
4373   CFLAGS="$CFLAGS -Wdeclaration-after-statement"
4374 fi
4375
4376   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wendif-labels" >&5
4377 $as_echo_n "checking whether $CC supports -Wendif-labels... " >&6; }
4378 if ${pgac_cv_prog_cc_cflags__Wendif_labels+:} false; then :
4379   $as_echo_n "(cached) " >&6
4380 else
4381   pgac_save_CFLAGS=$CFLAGS
4382 CFLAGS="$pgac_save_CFLAGS -Wendif-labels"
4383 ac_save_c_werror_flag=$ac_c_werror_flag
4384 ac_c_werror_flag=yes
4385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4386 /* end confdefs.h.  */
4387
4388 int
4389 main ()
4390 {
4391
4392   ;
4393   return 0;
4394 }
4395 _ACEOF
4396 if ac_fn_c_try_compile "$LINENO"; then :
4397   pgac_cv_prog_cc_cflags__Wendif_labels=yes
4398 else
4399   pgac_cv_prog_cc_cflags__Wendif_labels=no
4400 fi
4401 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4402 ac_c_werror_flag=$ac_save_c_werror_flag
4403 CFLAGS="$pgac_save_CFLAGS"
4404 fi
4405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wendif_labels" >&5
4406 $as_echo "$pgac_cv_prog_cc_cflags__Wendif_labels" >&6; }
4407 if test x"$pgac_cv_prog_cc_cflags__Wendif_labels" = x"yes"; then
4408   CFLAGS="$CFLAGS -Wendif-labels"
4409 fi
4410
4411   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wmissing-format-attribute" >&5
4412 $as_echo_n "checking whether $CC supports -Wmissing-format-attribute... " >&6; }
4413 if ${pgac_cv_prog_cc_cflags__Wmissing_format_attribute+:} false; then :
4414   $as_echo_n "(cached) " >&6
4415 else
4416   pgac_save_CFLAGS=$CFLAGS
4417 CFLAGS="$pgac_save_CFLAGS -Wmissing-format-attribute"
4418 ac_save_c_werror_flag=$ac_c_werror_flag
4419 ac_c_werror_flag=yes
4420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4421 /* end confdefs.h.  */
4422
4423 int
4424 main ()
4425 {
4426
4427   ;
4428   return 0;
4429 }
4430 _ACEOF
4431 if ac_fn_c_try_compile "$LINENO"; then :
4432   pgac_cv_prog_cc_cflags__Wmissing_format_attribute=yes
4433 else
4434   pgac_cv_prog_cc_cflags__Wmissing_format_attribute=no
4435 fi
4436 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4437 ac_c_werror_flag=$ac_save_c_werror_flag
4438 CFLAGS="$pgac_save_CFLAGS"
4439 fi
4440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wmissing_format_attribute" >&5
4441 $as_echo "$pgac_cv_prog_cc_cflags__Wmissing_format_attribute" >&6; }
4442 if test x"$pgac_cv_prog_cc_cflags__Wmissing_format_attribute" = x"yes"; then
4443   CFLAGS="$CFLAGS -Wmissing-format-attribute"
4444 fi
4445
4446   # This was included in -Wall/-Wformat in older GCC versions
4447   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wformat-security" >&5
4448 $as_echo_n "checking whether $CC supports -Wformat-security... " >&6; }
4449 if ${pgac_cv_prog_cc_cflags__Wformat_security+:} false; then :
4450   $as_echo_n "(cached) " >&6
4451 else
4452   pgac_save_CFLAGS=$CFLAGS
4453 CFLAGS="$pgac_save_CFLAGS -Wformat-security"
4454 ac_save_c_werror_flag=$ac_c_werror_flag
4455 ac_c_werror_flag=yes
4456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4457 /* end confdefs.h.  */
4458
4459 int
4460 main ()
4461 {
4462
4463   ;
4464   return 0;
4465 }
4466 _ACEOF
4467 if ac_fn_c_try_compile "$LINENO"; then :
4468   pgac_cv_prog_cc_cflags__Wformat_security=yes
4469 else
4470   pgac_cv_prog_cc_cflags__Wformat_security=no
4471 fi
4472 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4473 ac_c_werror_flag=$ac_save_c_werror_flag
4474 CFLAGS="$pgac_save_CFLAGS"
4475 fi
4476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wformat_security" >&5
4477 $as_echo "$pgac_cv_prog_cc_cflags__Wformat_security" >&6; }
4478 if test x"$pgac_cv_prog_cc_cflags__Wformat_security" = x"yes"; then
4479   CFLAGS="$CFLAGS -Wformat-security"
4480 fi
4481
4482   # Disable strict-aliasing rules; needed for gcc 3.3+
4483   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-strict-aliasing" >&5
4484 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4485 if ${pgac_cv_prog_cc_cflags__fno_strict_aliasing+:} false; then :
4486   $as_echo_n "(cached) " >&6
4487 else
4488   pgac_save_CFLAGS=$CFLAGS
4489 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4490 ac_save_c_werror_flag=$ac_c_werror_flag
4491 ac_c_werror_flag=yes
4492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4493 /* end confdefs.h.  */
4494
4495 int
4496 main ()
4497 {
4498
4499   ;
4500   return 0;
4501 }
4502 _ACEOF
4503 if ac_fn_c_try_compile "$LINENO"; then :
4504   pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4505 else
4506   pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4507 fi
4508 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4509 ac_c_werror_flag=$ac_save_c_werror_flag
4510 CFLAGS="$pgac_save_CFLAGS"
4511 fi
4512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4513 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4514 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4515   CFLAGS="$CFLAGS -fno-strict-aliasing"
4516 fi
4517
4518   # Disable optimizations that assume no overflow; needed for gcc 4.3+
4519   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fwrapv" >&5
4520 $as_echo_n "checking whether $CC supports -fwrapv... " >&6; }
4521 if ${pgac_cv_prog_cc_cflags__fwrapv+:} false; then :
4522   $as_echo_n "(cached) " >&6
4523 else
4524   pgac_save_CFLAGS=$CFLAGS
4525 CFLAGS="$pgac_save_CFLAGS -fwrapv"
4526 ac_save_c_werror_flag=$ac_c_werror_flag
4527 ac_c_werror_flag=yes
4528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4529 /* end confdefs.h.  */
4530
4531 int
4532 main ()
4533 {
4534
4535   ;
4536   return 0;
4537 }
4538 _ACEOF
4539 if ac_fn_c_try_compile "$LINENO"; then :
4540   pgac_cv_prog_cc_cflags__fwrapv=yes
4541 else
4542   pgac_cv_prog_cc_cflags__fwrapv=no
4543 fi
4544 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4545 ac_c_werror_flag=$ac_save_c_werror_flag
4546 CFLAGS="$pgac_save_CFLAGS"
4547 fi
4548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fwrapv" >&5
4549 $as_echo "$pgac_cv_prog_cc_cflags__fwrapv" >&6; }
4550 if test x"$pgac_cv_prog_cc_cflags__fwrapv" = x"yes"; then
4551   CFLAGS="$CFLAGS -fwrapv"
4552 fi
4553
4554   # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
4555   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fexcess-precision=standard" >&5
4556 $as_echo_n "checking whether $CC supports -fexcess-precision=standard... " >&6; }
4557 if ${pgac_cv_prog_cc_cflags__fexcess_precision_standard+:} false; then :
4558   $as_echo_n "(cached) " >&6
4559 else
4560   pgac_save_CFLAGS=$CFLAGS
4561 CFLAGS="$pgac_save_CFLAGS -fexcess-precision=standard"
4562 ac_save_c_werror_flag=$ac_c_werror_flag
4563 ac_c_werror_flag=yes
4564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4565 /* end confdefs.h.  */
4566
4567 int
4568 main ()
4569 {
4570
4571   ;
4572   return 0;
4573 }
4574 _ACEOF
4575 if ac_fn_c_try_compile "$LINENO"; then :
4576   pgac_cv_prog_cc_cflags__fexcess_precision_standard=yes
4577 else
4578   pgac_cv_prog_cc_cflags__fexcess_precision_standard=no
4579 fi
4580 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4581 ac_c_werror_flag=$ac_save_c_werror_flag
4582 CFLAGS="$pgac_save_CFLAGS"
4583 fi
4584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fexcess_precision_standard" >&5
4585 $as_echo "$pgac_cv_prog_cc_cflags__fexcess_precision_standard" >&6; }
4586 if test x"$pgac_cv_prog_cc_cflags__fexcess_precision_standard" = x"yes"; then
4587   CFLAGS="$CFLAGS -fexcess-precision=standard"
4588 fi
4589
4590   # Optimization flags for specific files that benefit from vectorization
4591   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -funroll-loops" >&5
4592 $as_echo_n "checking whether $CC supports -funroll-loops... " >&6; }
4593 if ${pgac_cv_prog_cc_cflags__funroll_loops+:} false; then :
4594   $as_echo_n "(cached) " >&6
4595 else
4596   pgac_save_CFLAGS=$CFLAGS
4597 CFLAGS="$pgac_save_CFLAGS -funroll-loops"
4598 ac_save_c_werror_flag=$ac_c_werror_flag
4599 ac_c_werror_flag=yes
4600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4601 /* end confdefs.h.  */
4602
4603 int
4604 main ()
4605 {
4606
4607   ;
4608   return 0;
4609 }
4610 _ACEOF
4611 if ac_fn_c_try_compile "$LINENO"; then :
4612   pgac_cv_prog_cc_cflags__funroll_loops=yes
4613 else
4614   pgac_cv_prog_cc_cflags__funroll_loops=no
4615 fi
4616 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4617 ac_c_werror_flag=$ac_save_c_werror_flag
4618 CFLAGS="$pgac_save_CFLAGS"
4619 fi
4620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__funroll_loops" >&5
4621 $as_echo "$pgac_cv_prog_cc_cflags__funroll_loops" >&6; }
4622 if test x"$pgac_cv_prog_cc_cflags__funroll_loops" = x"yes"; then
4623   CFLAGS_VECTOR="${CFLAGS_VECTOR} -funroll-loops"
4624 fi
4625
4626   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -ftree-vectorize" >&5
4627 $as_echo_n "checking whether $CC supports -ftree-vectorize... " >&6; }
4628 if ${pgac_cv_prog_cc_cflags__ftree_vectorize+:} false; then :
4629   $as_echo_n "(cached) " >&6
4630 else
4631   pgac_save_CFLAGS=$CFLAGS
4632 CFLAGS="$pgac_save_CFLAGS -ftree-vectorize"
4633 ac_save_c_werror_flag=$ac_c_werror_flag
4634 ac_c_werror_flag=yes
4635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4636 /* end confdefs.h.  */
4637
4638 int
4639 main ()
4640 {
4641
4642   ;
4643   return 0;
4644 }
4645 _ACEOF
4646 if ac_fn_c_try_compile "$LINENO"; then :
4647   pgac_cv_prog_cc_cflags__ftree_vectorize=yes
4648 else
4649   pgac_cv_prog_cc_cflags__ftree_vectorize=no
4650 fi
4651 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4652 ac_c_werror_flag=$ac_save_c_werror_flag
4653 CFLAGS="$pgac_save_CFLAGS"
4654 fi
4655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__ftree_vectorize" >&5
4656 $as_echo "$pgac_cv_prog_cc_cflags__ftree_vectorize" >&6; }
4657 if test x"$pgac_cv_prog_cc_cflags__ftree_vectorize" = x"yes"; then
4658   CFLAGS_VECTOR="${CFLAGS_VECTOR} -ftree-vectorize"
4659 fi
4660
4661 elif test "$ICC" = yes; then
4662   # Intel's compiler has a bug/misoptimization in checking for
4663   # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
4664   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mp1" >&5
4665 $as_echo_n "checking whether $CC supports -mp1... " >&6; }
4666 if ${pgac_cv_prog_cc_cflags__mp1+:} false; then :
4667   $as_echo_n "(cached) " >&6
4668 else
4669   pgac_save_CFLAGS=$CFLAGS
4670 CFLAGS="$pgac_save_CFLAGS -mp1"
4671 ac_save_c_werror_flag=$ac_c_werror_flag
4672 ac_c_werror_flag=yes
4673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4674 /* end confdefs.h.  */
4675
4676 int
4677 main ()
4678 {
4679
4680   ;
4681   return 0;
4682 }
4683 _ACEOF
4684 if ac_fn_c_try_compile "$LINENO"; then :
4685   pgac_cv_prog_cc_cflags__mp1=yes
4686 else
4687   pgac_cv_prog_cc_cflags__mp1=no
4688 fi
4689 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4690 ac_c_werror_flag=$ac_save_c_werror_flag
4691 CFLAGS="$pgac_save_CFLAGS"
4692 fi
4693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__mp1" >&5
4694 $as_echo "$pgac_cv_prog_cc_cflags__mp1" >&6; }
4695 if test x"$pgac_cv_prog_cc_cflags__mp1" = x"yes"; then
4696   CFLAGS="$CFLAGS -mp1"
4697 fi
4698
4699   # Make sure strict aliasing is off (though this is said to be the default)
4700   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-strict-aliasing" >&5
4701 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4702 if ${pgac_cv_prog_cc_cflags__fno_strict_aliasing+:} false; then :
4703   $as_echo_n "(cached) " >&6
4704 else
4705   pgac_save_CFLAGS=$CFLAGS
4706 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4707 ac_save_c_werror_flag=$ac_c_werror_flag
4708 ac_c_werror_flag=yes
4709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4710 /* end confdefs.h.  */
4711
4712 int
4713 main ()
4714 {
4715
4716   ;
4717   return 0;
4718 }
4719 _ACEOF
4720 if ac_fn_c_try_compile "$LINENO"; then :
4721   pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4722 else
4723   pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4724 fi
4725 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4726 ac_c_werror_flag=$ac_save_c_werror_flag
4727 CFLAGS="$pgac_save_CFLAGS"
4728 fi
4729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4730 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4731 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4732   CFLAGS="$CFLAGS -fno-strict-aliasing"
4733 fi
4734
4735 elif test "$PORTNAME" = "aix"; then
4736   # AIX's xlc has to have strict aliasing turned off too
4737   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -qnoansialias" >&5
4738 $as_echo_n "checking whether $CC supports -qnoansialias... " >&6; }
4739 if ${pgac_cv_prog_cc_cflags__qnoansialias+:} false; then :
4740   $as_echo_n "(cached) " >&6
4741 else
4742   pgac_save_CFLAGS=$CFLAGS
4743 CFLAGS="$pgac_save_CFLAGS -qnoansialias"
4744 ac_save_c_werror_flag=$ac_c_werror_flag
4745 ac_c_werror_flag=yes
4746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4747 /* end confdefs.h.  */
4748
4749 int
4750 main ()
4751 {
4752
4753   ;
4754   return 0;
4755 }
4756 _ACEOF
4757 if ac_fn_c_try_compile "$LINENO"; then :
4758   pgac_cv_prog_cc_cflags__qnoansialias=yes
4759 else
4760   pgac_cv_prog_cc_cflags__qnoansialias=no
4761 fi
4762 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4763 ac_c_werror_flag=$ac_save_c_werror_flag
4764 CFLAGS="$pgac_save_CFLAGS"
4765 fi
4766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__qnoansialias" >&5
4767 $as_echo "$pgac_cv_prog_cc_cflags__qnoansialias" >&6; }
4768 if test x"$pgac_cv_prog_cc_cflags__qnoansialias" = x"yes"; then
4769   CFLAGS="$CFLAGS -qnoansialias"
4770 fi
4771
4772 elif test "$PORTNAME" = "hpux"; then
4773   # On some versions of HP-UX, libm functions do not set errno by default.
4774   # Fix that by using +Olibmerrno if the compiler recognizes it.
4775   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports +Olibmerrno" >&5
4776 $as_echo_n "checking whether $CC supports +Olibmerrno... " >&6; }
4777 if ${pgac_cv_prog_cc_cflags_pOlibmerrno+:} false; then :
4778   $as_echo_n "(cached) " >&6
4779 else
4780   pgac_save_CFLAGS=$CFLAGS
4781 CFLAGS="$pgac_save_CFLAGS +Olibmerrno"
4782 ac_save_c_werror_flag=$ac_c_werror_flag
4783 ac_c_werror_flag=yes
4784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4785 /* end confdefs.h.  */
4786
4787 int
4788 main ()
4789 {
4790
4791   ;
4792   return 0;
4793 }
4794 _ACEOF
4795 if ac_fn_c_try_compile "$LINENO"; then :
4796   pgac_cv_prog_cc_cflags_pOlibmerrno=yes
4797 else
4798   pgac_cv_prog_cc_cflags_pOlibmerrno=no
4799 fi
4800 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4801 ac_c_werror_flag=$ac_save_c_werror_flag
4802 CFLAGS="$pgac_save_CFLAGS"
4803 fi
4804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags_pOlibmerrno" >&5
4805 $as_echo "$pgac_cv_prog_cc_cflags_pOlibmerrno" >&6; }
4806 if test x"$pgac_cv_prog_cc_cflags_pOlibmerrno" = x"yes"; then
4807   CFLAGS="$CFLAGS +Olibmerrno"
4808 fi
4809
4810 fi
4811
4812 CFLAGS_VECTOR=$CFLAGS_VECTOR
4813
4814
4815 # supply -g if --enable-debug
4816 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
4817   CFLAGS="$CFLAGS -g"
4818 fi
4819
4820 # enable code coverage if --enable-coverage
4821 if test "$enable_coverage" = yes; then
4822   if test "$GCC" = yes; then
4823     CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
4824   else
4825     as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
4826   fi
4827 fi
4828
4829 # enable profiling if --enable-profiling
4830 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
4831   if test "$GCC" = yes; then
4832
4833 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
4834
4835     CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
4836   else
4837     as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
4838   fi
4839 fi
4840
4841 # We already have this in Makefile.win32, but configure needs it too
4842 if test "$PORTNAME" = "win32"; then
4843   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
4844 fi
4845
4846 # Check if the compiler still works with the template settings
4847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
4848 $as_echo_n "checking whether the C compiler still works... " >&6; }
4849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4850 /* end confdefs.h.  */
4851
4852 int
4853 main ()
4854 {
4855 return 0;
4856   ;
4857   return 0;
4858 }
4859 _ACEOF
4860 if ac_fn_c_try_link "$LINENO"; then :
4861   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4862 $as_echo "yes" >&6; }
4863 else
4864   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4865 $as_echo "no" >&6; }
4866    as_fn_error $? "cannot proceed" "$LINENO" 5
4867 fi
4868 rm -f core conftest.err conftest.$ac_objext \
4869     conftest$ac_exeext conftest.$ac_ext
4870
4871 # Defend against gcc -ffast-math
4872 if test "$GCC" = yes; then
4873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4874 /* end confdefs.h.  */
4875
4876 int
4877 main ()
4878 {
4879 #ifdef __FAST_MATH__
4880 choke me
4881 #endif
4882   ;
4883   return 0;
4884 }
4885 _ACEOF
4886 if ac_fn_c_try_compile "$LINENO"; then :
4887
4888 else
4889   as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
4890 fi
4891 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4892 fi
4893
4894 ac_ext=c
4895 ac_cpp='$CPP $CPPFLAGS'
4896 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4897 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4898 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4900 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4901 # On Suns, sometimes $CPP names a directory.
4902 if test -n "$CPP" && test -d "$CPP"; then
4903   CPP=
4904 fi
4905 if test -z "$CPP"; then
4906   if ${ac_cv_prog_CPP+:} false; then :
4907   $as_echo_n "(cached) " >&6
4908 else
4909       # Double quotes because CPP needs to be expanded
4910     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4911     do
4912       ac_preproc_ok=false
4913 for ac_c_preproc_warn_flag in '' yes
4914 do
4915   # Use a header file that comes with gcc, so configuring glibc
4916   # with a fresh cross-compiler works.
4917   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4918   # <limits.h> exists even on freestanding compilers.
4919   # On the NeXT, cc -E runs the code through the compiler's parser,
4920   # not just through cpp. "Syntax error" is here to catch this case.
4921   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4922 /* end confdefs.h.  */
4923 #ifdef __STDC__
4924 # include <limits.h>
4925 #else
4926 # include <assert.h>
4927 #endif
4928                      Syntax error
4929 _ACEOF
4930 if ac_fn_c_try_cpp "$LINENO"; then :
4931
4932 else
4933   # Broken: fails on valid input.
4934 continue
4935 fi
4936 rm -f conftest.err conftest.i conftest.$ac_ext
4937
4938   # OK, works on sane cases.  Now check whether nonexistent headers
4939   # can be detected and how.
4940   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4941 /* end confdefs.h.  */
4942 #include <ac_nonexistent.h>
4943 _ACEOF
4944 if ac_fn_c_try_cpp "$LINENO"; then :
4945   # Broken: success on invalid input.
4946 continue
4947 else
4948   # Passes both tests.
4949 ac_preproc_ok=:
4950 break
4951 fi
4952 rm -f conftest.err conftest.i conftest.$ac_ext
4953
4954 done
4955 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4956 rm -f conftest.i conftest.err conftest.$ac_ext
4957 if $ac_preproc_ok; then :
4958   break
4959 fi
4960
4961     done
4962     ac_cv_prog_CPP=$CPP
4963
4964 fi
4965   CPP=$ac_cv_prog_CPP
4966 else
4967   ac_cv_prog_CPP=$CPP
4968 fi
4969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4970 $as_echo "$CPP" >&6; }
4971 ac_preproc_ok=false
4972 for ac_c_preproc_warn_flag in '' yes
4973 do
4974   # Use a header file that comes with gcc, so configuring glibc
4975   # with a fresh cross-compiler works.
4976   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4977   # <limits.h> exists even on freestanding compilers.
4978   # On the NeXT, cc -E runs the code through the compiler's parser,
4979   # not just through cpp. "Syntax error" is here to catch this case.
4980   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4981 /* end confdefs.h.  */
4982 #ifdef __STDC__
4983 # include <limits.h>
4984 #else
4985 # include <assert.h>
4986 #endif
4987                      Syntax error
4988 _ACEOF
4989 if ac_fn_c_try_cpp "$LINENO"; then :
4990
4991 else
4992   # Broken: fails on valid input.
4993 continue
4994 fi
4995 rm -f conftest.err conftest.i conftest.$ac_ext
4996
4997   # OK, works on sane cases.  Now check whether nonexistent headers
4998   # can be detected and how.
4999   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5000 /* end confdefs.h.  */
5001 #include <ac_nonexistent.h>
5002 _ACEOF
5003 if ac_fn_c_try_cpp "$LINENO"; then :
5004   # Broken: success on invalid input.
5005 continue
5006 else
5007   # Passes both tests.
5008 ac_preproc_ok=:
5009 break
5010 fi
5011 rm -f conftest.err conftest.i conftest.$ac_ext
5012
5013 done
5014 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5015 rm -f conftest.i conftest.err conftest.$ac_ext
5016 if $ac_preproc_ok; then :
5017
5018 else
5019   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5020 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5021 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5022 See \`config.log' for more details" "$LINENO" 5; }
5023 fi
5024
5025 ac_ext=c
5026 ac_cpp='$CPP $CPPFLAGS'
5027 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5028 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5029 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5030
5031
5032
5033
5034 #
5035 # Set up TAS assembly code if needed; the template file has now had its
5036 # chance to request this.
5037 #
5038 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
5039
5040
5041 if test "$need_tas" = yes ; then
5042   TAS=tas.o
5043 else
5044   TAS=""
5045 fi
5046
5047
5048
5049 #
5050 # Automatic dependency tracking
5051 #
5052
5053
5054 # Check whether --enable-depend was given.
5055 if test "${enable_depend+set}" = set; then :
5056   enableval=$enable_depend;
5057   case $enableval in
5058     yes)
5059       autodepend=yes
5060       ;;
5061     no)
5062       :
5063       ;;
5064     *)
5065       as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
5066       ;;
5067   esac
5068
5069 else
5070   enable_depend=no
5071
5072 fi
5073
5074
5075
5076
5077
5078 #
5079 # Enable assert checks
5080 #
5081
5082
5083 # Check whether --enable-cassert was given.
5084 if test "${enable_cassert+set}" = set; then :
5085   enableval=$enable_cassert;
5086   case $enableval in
5087     yes)
5088
5089 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
5090
5091       ;;
5092     no)
5093       :
5094       ;;
5095     *)
5096       as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
5097       ;;
5098   esac
5099
5100 else
5101   enable_cassert=no
5102
5103 fi
5104
5105
5106
5107
5108 #
5109 # Include directories
5110 #
5111 ac_save_IFS=$IFS
5112 IFS="${IFS}${PATH_SEPARATOR}"
5113 # SRCH_INC comes from the template file
5114 for dir in $with_includes $SRCH_INC; do
5115   if test -d "$dir"; then
5116     INCLUDES="$INCLUDES -I$dir"
5117   else
5118     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
5119 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
5120   fi
5121 done
5122 IFS=$ac_save_IFS
5123
5124
5125
5126 #
5127 # Library directories
5128 #
5129 ac_save_IFS=$IFS
5130 IFS="${IFS}${PATH_SEPARATOR}"
5131 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
5132 for dir in $LIBRARY_DIRS $SRCH_LIB; do
5133   if test -d "$dir"; then
5134     LIBDIRS="$LIBDIRS -L$dir"
5135   else
5136     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
5137 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
5138   fi
5139 done
5140 IFS=$ac_save_IFS
5141
5142 #
5143 # Enable thread-safe client libraries
5144 #
5145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
5146 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
5147
5148
5149 # Check whether --enable-thread-safety was given.
5150 if test "${enable_thread_safety+set}" = set; then :
5151   enableval=$enable_thread_safety;
5152   case $enableval in
5153     yes)
5154       :
5155       ;;
5156     no)
5157       :
5158       ;;
5159     *)
5160       as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
5161       ;;
5162   esac
5163
5164 else
5165   enable_thread_safety=yes
5166
5167 fi
5168
5169
5170 if test "$enable_thread_safety" = yes; then
5171
5172 $as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
5173
5174 fi
5175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
5176 $as_echo "$enable_thread_safety" >&6; }
5177
5178
5179 #
5180 # Optionally build Tcl modules (PL/Tcl)
5181 #
5182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
5183 $as_echo_n "checking whether to build with Tcl... " >&6; }
5184
5185
5186
5187 # Check whether --with-tcl was given.
5188 if test "${with_tcl+set}" = set; then :
5189   withval=$with_tcl;
5190   case $withval in
5191     yes)
5192       :
5193       ;;
5194     no)
5195       :
5196       ;;
5197     *)
5198       as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
5199       ;;
5200   esac
5201
5202 else
5203   with_tcl=no
5204
5205 fi
5206
5207
5208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
5209 $as_echo "$with_tcl" >&6; }
5210
5211
5212 # We see if the path to the Tcl/Tk configuration scripts is specified.
5213 # This will override the use of tclsh to find the paths to search.
5214
5215
5216
5217
5218 # Check whether --with-tclconfig was given.
5219 if test "${with_tclconfig+set}" = set; then :
5220   withval=$with_tclconfig;
5221   case $withval in
5222     yes)
5223       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
5224       ;;
5225     no)
5226       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
5227       ;;
5228     *)
5229
5230       ;;
5231   esac
5232
5233 fi
5234
5235
5236
5237 #
5238 # Optionally build Perl modules (PL/Perl)
5239 #
5240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
5241 $as_echo_n "checking whether to build Perl modules... " >&6; }
5242
5243
5244
5245 # Check whether --with-perl was given.
5246 if test "${with_perl+set}" = set; then :
5247   withval=$with_perl;
5248   case $withval in
5249     yes)
5250       :
5251       ;;
5252     no)
5253       :
5254       ;;
5255     *)
5256       as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
5257       ;;
5258   esac
5259
5260 else
5261   with_perl=no
5262
5263 fi
5264
5265
5266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
5267 $as_echo "$with_perl" >&6; }
5268
5269
5270 #
5271 # Optionally build Python modules (PL/Python)
5272 #
5273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
5274 $as_echo_n "checking whether to build Python modules... " >&6; }
5275
5276
5277
5278 # Check whether --with-python was given.
5279 if test "${with_python+set}" = set; then :
5280   withval=$with_python;
5281   case $withval in
5282     yes)
5283       :
5284       ;;
5285     no)
5286       :
5287       ;;
5288     *)
5289       as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
5290       ;;
5291   esac
5292
5293 else
5294   with_python=no
5295
5296 fi
5297
5298
5299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
5300 $as_echo "$with_python" >&6; }
5301
5302
5303 #
5304 # GSSAPI
5305 #
5306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
5307 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
5308
5309
5310
5311 # Check whether --with-gssapi was given.
5312 if test "${with_gssapi+set}" = set; then :
5313   withval=$with_gssapi;
5314   case $withval in
5315     yes)
5316
5317
5318 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
5319
5320   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
5321
5322       ;;
5323     no)
5324       :
5325       ;;
5326     *)
5327       as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
5328       ;;
5329   esac
5330
5331 else
5332   with_gssapi=no
5333
5334 fi
5335
5336
5337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
5338 $as_echo "$with_gssapi" >&6; }
5339
5340
5341
5342
5343
5344 #
5345 # Kerberos configuration parameters
5346 #
5347
5348
5349
5350 # Check whether --with-krb-srvnam was given.
5351 if test "${with_krb_srvnam+set}" = set; then :
5352   withval=$with_krb_srvnam;
5353   case $withval in
5354     yes)
5355       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
5356       ;;
5357     no)
5358       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
5359       ;;
5360     *)
5361
5362       ;;
5363   esac
5364
5365 else
5366   with_krb_srvnam="postgres"
5367 fi
5368
5369
5370
5371 cat >>confdefs.h <<_ACEOF
5372 #define PG_KRB_SRVNAM "$with_krb_srvnam"
5373 _ACEOF
5374
5375
5376
5377 #
5378 # PAM
5379 #
5380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
5381 $as_echo_n "checking whether to build with PAM support... " >&6; }
5382
5383
5384
5385 # Check whether --with-pam was given.
5386 if test "${with_pam+set}" = set; then :
5387   withval=$with_pam;
5388   case $withval in
5389     yes)
5390
5391 $as_echo "#define USE_PAM 1" >>confdefs.h
5392
5393       ;;
5394     no)
5395       :
5396       ;;
5397     *)
5398       as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
5399       ;;
5400   esac
5401
5402 else
5403   with_pam=no
5404
5405 fi
5406
5407
5408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
5409 $as_echo "$with_pam" >&6; }
5410
5411
5412 #
5413 # LDAP
5414 #
5415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
5416 $as_echo_n "checking whether to build with LDAP support... " >&6; }
5417
5418
5419
5420 # Check whether --with-ldap was given.
5421 if test "${with_ldap+set}" = set; then :
5422   withval=$with_ldap;
5423   case $withval in
5424     yes)
5425
5426 $as_echo "#define USE_LDAP 1" >>confdefs.h
5427
5428       ;;
5429     no)
5430       :
5431       ;;
5432     *)
5433       as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
5434       ;;
5435   esac
5436
5437 else
5438   with_ldap=no
5439
5440 fi
5441
5442
5443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
5444 $as_echo "$with_ldap" >&6; }
5445
5446
5447 #
5448 # Bonjour
5449 #
5450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
5451 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
5452
5453
5454
5455 # Check whether --with-bonjour was given.
5456 if test "${with_bonjour+set}" = set; then :
5457   withval=$with_bonjour;
5458   case $withval in
5459     yes)
5460
5461 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
5462
5463       ;;
5464     no)
5465       :
5466       ;;
5467     *)
5468       as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
5469       ;;
5470   esac
5471
5472 else
5473   with_bonjour=no
5474
5475 fi
5476
5477
5478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
5479 $as_echo "$with_bonjour" >&6; }
5480
5481
5482 #
5483 # OpenSSL
5484 #
5485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with OpenSSL support" >&5
5486 $as_echo_n "checking whether to build with OpenSSL support... " >&6; }
5487
5488
5489
5490 # Check whether --with-openssl was given.
5491 if test "${with_openssl+set}" = set; then :
5492   withval=$with_openssl;
5493   case $withval in
5494     yes)
5495
5496 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
5497
5498       ;;
5499     no)
5500       :
5501       ;;
5502     *)
5503       as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
5504       ;;
5505   esac
5506
5507 else
5508   with_openssl=no
5509
5510 fi
5511
5512
5513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_openssl" >&5
5514 $as_echo "$with_openssl" >&6; }
5515
5516
5517 #
5518 # SELinux
5519 #
5520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
5521 $as_echo_n "checking whether to build with SELinux support... " >&6; }
5522
5523
5524
5525 # Check whether --with-selinux was given.
5526 if test "${with_selinux+set}" = set; then :
5527   withval=$with_selinux;
5528   case $withval in
5529     yes)
5530       :
5531       ;;
5532     no)
5533       :
5534       ;;
5535     *)
5536       as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
5537       ;;
5538   esac
5539
5540 else
5541   with_selinux=no
5542
5543 fi
5544
5545
5546
5547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
5548 $as_echo "$with_selinux" >&6; }
5549
5550 #
5551 # Readline
5552 #
5553
5554
5555
5556 # Check whether --with-readline was given.
5557 if test "${with_readline+set}" = set; then :
5558   withval=$with_readline;
5559   case $withval in
5560     yes)
5561       :
5562       ;;
5563     no)
5564       :
5565       ;;
5566     *)
5567       as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
5568       ;;
5569   esac
5570
5571 else
5572   with_readline=yes
5573
5574 fi
5575
5576
5577 # readline on MinGW has problems with backslashes in psql and other bugs.
5578 # This is particularly a problem with non-US code pages.
5579 # Therefore disable its use until we understand the cause. 2004-07-20
5580 if test "$PORTNAME" = "win32"; then
5581   if test "$with_readline" = yes; then
5582     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
5583 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
5584     with_readline=no
5585   fi
5586 fi
5587
5588
5589 #
5590 # Prefer libedit
5591 #
5592
5593
5594
5595 # Check whether --with-libedit-preferred was given.
5596 if test "${with_libedit_preferred+set}" = set; then :
5597   withval=$with_libedit_preferred;
5598   case $withval in
5599     yes)
5600       :
5601       ;;
5602     no)
5603       :
5604       ;;
5605     *)
5606       as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
5607       ;;
5608   esac
5609
5610 else
5611   with_libedit_preferred=no
5612
5613 fi
5614
5615
5616
5617
5618 #
5619 # UUID library
5620 #
5621 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
5622 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
5623 # UUID library.  More than one of these might be present on a given platform,
5624 # so we make the user say which one she wants.
5625 #
5626
5627
5628
5629 # Check whether --with-uuid was given.
5630 if test "${with_uuid+set}" = set; then :
5631   withval=$with_uuid;
5632   case $withval in
5633     yes)
5634       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
5635       ;;
5636     no)
5637       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
5638       ;;
5639     *)
5640
5641       ;;
5642   esac
5643
5644 fi
5645
5646
5647 if test x"$with_uuid" = x"" ; then
5648   with_uuid=no
5649 fi
5650
5651
5652
5653 # Check whether --with-ossp-uuid was given.
5654 if test "${with_ossp_uuid+set}" = set; then :
5655   withval=$with_ossp_uuid;
5656   case $withval in
5657     yes)
5658       :
5659       ;;
5660     no)
5661       :
5662       ;;
5663     *)
5664       as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
5665       ;;
5666   esac
5667
5668 else
5669   with_ossp_uuid=no
5670
5671 fi
5672
5673
5674 if test "$with_ossp_uuid" = yes ; then
5675   with_uuid=ossp
5676 fi
5677
5678 if test "$with_uuid" = bsd ; then
5679
5680 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
5681
5682   UUID_EXTRA_OBJS="md5.o sha1.o"
5683 elif test "$with_uuid" = e2fs ; then
5684
5685 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
5686
5687   UUID_EXTRA_OBJS="md5.o sha1.o"
5688 elif test "$with_uuid" = ossp ; then
5689
5690 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
5691
5692   UUID_EXTRA_OBJS=""
5693 elif test "$with_uuid" = no ; then
5694   UUID_EXTRA_OBJS=""
5695 else
5696   as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
5697 fi
5698
5699
5700
5701
5702 #
5703 # XML
5704 #
5705
5706
5707
5708 # Check whether --with-libxml was given.
5709 if test "${with_libxml+set}" = set; then :
5710   withval=$with_libxml;
5711   case $withval in
5712     yes)
5713
5714 $as_echo "#define USE_LIBXML 1" >>confdefs.h
5715
5716       ;;
5717     no)
5718       :
5719       ;;
5720     *)
5721       as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
5722       ;;
5723   esac
5724
5725 else
5726   with_libxml=no
5727
5728 fi
5729
5730
5731
5732 if test "$with_libxml" = yes ; then
5733   for ac_prog in xml2-config
5734 do
5735   # Extract the first word of "$ac_prog", so it can be a program name with args.
5736 set dummy $ac_prog; ac_word=$2
5737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5738 $as_echo_n "checking for $ac_word... " >&6; }
5739 if ${ac_cv_prog_XML2_CONFIG+:} false; then :
5740   $as_echo_n "(cached) " >&6
5741 else
5742   if test -n "$XML2_CONFIG"; then
5743   ac_cv_prog_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test.
5744 else
5745 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5746 for as_dir in $PATH
5747 do
5748   IFS=$as_save_IFS
5749   test -z "$as_dir" && as_dir=.
5750     for ac_exec_ext in '' $ac_executable_extensions; do
5751   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5752     ac_cv_prog_XML2_CONFIG="$ac_prog"
5753     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5754     break 2
5755   fi
5756 done
5757   done
5758 IFS=$as_save_IFS
5759
5760 fi
5761 fi
5762 XML2_CONFIG=$ac_cv_prog_XML2_CONFIG
5763 if test -n "$XML2_CONFIG"; then
5764   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
5765 $as_echo "$XML2_CONFIG" >&6; }
5766 else
5767   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5768 $as_echo "no" >&6; }
5769 fi
5770
5771
5772   test -n "$XML2_CONFIG" && break
5773 done
5774
5775   if test -n "$XML2_CONFIG"; then
5776     for pgac_option in `$XML2_CONFIG --cflags`; do
5777       case $pgac_option in
5778         -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
5779       esac
5780     done
5781     for pgac_option in `$XML2_CONFIG --libs`; do
5782       case $pgac_option in
5783         -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5784       esac
5785     done
5786   fi
5787 fi
5788
5789
5790
5791 #
5792 # XSLT
5793 #
5794
5795
5796
5797 # Check whether --with-libxslt was given.
5798 if test "${with_libxslt+set}" = set; then :
5799   withval=$with_libxslt;
5800   case $withval in
5801     yes)
5802
5803 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
5804
5805       ;;
5806     no)
5807       :
5808       ;;
5809     *)
5810       as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
5811       ;;
5812   esac
5813
5814 else
5815   with_libxslt=no
5816
5817 fi
5818
5819
5820
5821
5822
5823
5824 #
5825 # tzdata
5826 #
5827
5828
5829
5830 # Check whether --with-system-tzdata was given.
5831 if test "${with_system_tzdata+set}" = set; then :
5832   withval=$with_system_tzdata;
5833   case $withval in
5834     yes)
5835       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
5836       ;;
5837     no)
5838       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
5839       ;;
5840     *)
5841
5842       ;;
5843   esac
5844
5845 fi
5846
5847
5848
5849
5850 #
5851 # Zlib
5852 #
5853
5854
5855
5856 # Check whether --with-zlib was given.
5857 if test "${with_zlib+set}" = set; then :
5858   withval=$with_zlib;
5859   case $withval in
5860     yes)
5861       :
5862       ;;
5863     no)
5864       :
5865       ;;
5866     *)
5867       as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
5868       ;;
5869   esac
5870
5871 else
5872   with_zlib=yes
5873
5874 fi
5875
5876
5877
5878
5879 #
5880 # Elf
5881 #
5882
5883 # Assume system is ELF if it predefines __ELF__ as 1,
5884 # otherwise believe host_os based default.
5885 case $host_os in
5886     freebsd1*|freebsd2*) elf=no;;
5887     freebsd3*|freebsd4*) elf=yes;;
5888 esac
5889
5890
5891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5892 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5893 if ${ac_cv_path_GREP+:} false; then :
5894   $as_echo_n "(cached) " >&6
5895 else
5896   if test -z "$GREP"; then
5897   ac_path_GREP_found=false
5898   # Loop through the user's path and test for each of PROGNAME-LIST
5899   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5900 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5901 do
5902   IFS=$as_save_IFS
5903   test -z "$as_dir" && as_dir=.
5904     for ac_prog in grep ggrep; do
5905     for ac_exec_ext in '' $ac_executable_extensions; do
5906       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5907       as_fn_executable_p "$ac_path_GREP" || continue
5908 # Check for GNU ac_path_GREP and select it if it is found.
5909   # Check for GNU $ac_path_GREP
5910 case `"$ac_path_GREP" --version 2>&1` in
5911 *GNU*)
5912   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5913 *)
5914   ac_count=0
5915   $as_echo_n 0123456789 >"conftest.in"
5916   while :
5917   do
5918     cat "conftest.in" "conftest.in" >"conftest.tmp"
5919     mv "conftest.tmp" "conftest.in"
5920     cp "conftest.in" "conftest.nl"
5921     $as_echo 'GREP' >> "conftest.nl"
5922     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5923     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5924     as_fn_arith $ac_count + 1 && ac_count=$as_val
5925     if test $ac_count -gt ${ac_path_GREP_max-0}; then
5926       # Best one so far, save it but keep looking for a better one
5927       ac_cv_path_GREP="$ac_path_GREP"
5928       ac_path_GREP_max=$ac_count
5929     fi
5930     # 10*(2^10) chars as input seems more than enough
5931     test $ac_count -gt 10 && break
5932   done
5933   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5934 esac
5935
5936       $ac_path_GREP_found && break 3
5937     done
5938   done
5939   done
5940 IFS=$as_save_IFS
5941   if test -z "$ac_cv_path_GREP"; then
5942     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5943   fi
5944 else
5945   ac_cv_path_GREP=$GREP
5946 fi
5947
5948 fi
5949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5950 $as_echo "$ac_cv_path_GREP" >&6; }
5951  GREP="$ac_cv_path_GREP"
5952
5953
5954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5955 $as_echo_n "checking for egrep... " >&6; }
5956 if ${ac_cv_path_EGREP+:} false; then :
5957   $as_echo_n "(cached) " >&6
5958 else
5959   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5960    then ac_cv_path_EGREP="$GREP -E"
5961    else
5962      if test -z "$EGREP"; then
5963   ac_path_EGREP_found=false
5964   # Loop through the user's path and test for each of PROGNAME-LIST
5965   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5966 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5967 do
5968   IFS=$as_save_IFS
5969   test -z "$as_dir" && as_dir=.
5970     for ac_prog in egrep; do
5971     for ac_exec_ext in '' $ac_executable_extensions; do
5972       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5973       as_fn_executable_p "$ac_path_EGREP" || continue
5974 # Check for GNU ac_path_EGREP and select it if it is found.
5975   # Check for GNU $ac_path_EGREP
5976 case `"$ac_path_EGREP" --version 2>&1` in
5977 *GNU*)
5978   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5979 *)
5980   ac_count=0
5981   $as_echo_n 0123456789 >"conftest.in"
5982   while :
5983   do
5984     cat "conftest.in" "conftest.in" >"conftest.tmp"
5985     mv "conftest.tmp" "conftest.in"
5986     cp "conftest.in" "conftest.nl"
5987     $as_echo 'EGREP' >> "conftest.nl"
5988     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5989     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5990     as_fn_arith $ac_count + 1 && ac_count=$as_val
5991     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5992       # Best one so far, save it but keep looking for a better one
5993       ac_cv_path_EGREP="$ac_path_EGREP"
5994       ac_path_EGREP_max=$ac_count
5995     fi
5996     # 10*(2^10) chars as input seems more than enough
5997     test $ac_count -gt 10 && break
5998   done
5999   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6000 esac
6001
6002       $ac_path_EGREP_found && break 3
6003     done
6004   done
6005   done
6006 IFS=$as_save_IFS
6007   if test -z "$ac_cv_path_EGREP"; then
6008     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6009   fi
6010 else
6011   ac_cv_path_EGREP=$EGREP
6012 fi
6013
6014    fi
6015 fi
6016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6017 $as_echo "$ac_cv_path_EGREP" >&6; }
6018  EGREP="$ac_cv_path_EGREP"
6019
6020
6021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6022 /* end confdefs.h.  */
6023 #if __ELF__
6024   yes
6025 #endif
6026
6027 _ACEOF
6028 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6029   $EGREP "yes" >/dev/null 2>&1; then :
6030   ELF_SYS=true
6031 else
6032   if test "X$elf" = "Xyes" ; then
6033   ELF_SYS=true
6034 else
6035   ELF_SYS=
6036 fi
6037 fi
6038 rm -f conftest*
6039
6040
6041
6042 #
6043 # Assignments
6044 #
6045
6046 CPPFLAGS="$CPPFLAGS $INCLUDES"
6047 LDFLAGS="$LDFLAGS $LIBDIRS"
6048
6049
6050
6051
6052
6053 # Check whether --with-gnu-ld was given.
6054 if test "${with_gnu_ld+set}" = set; then :
6055   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
6056 else
6057   with_gnu_ld=no
6058 fi
6059
6060 ac_prog=ld
6061 if test "$GCC" = yes; then
6062   # Check if gcc -print-prog-name=ld gives a path.
6063   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
6064 $as_echo_n "checking for ld used by GCC... " >&6; }
6065   case $host in
6066   *-*-mingw*)
6067     # gcc leaves a trailing carriage return which upsets mingw
6068     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6069   *)
6070     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6071   esac
6072   case "$ac_prog" in
6073     # Accept absolute paths.
6074     [\\/]* | [A-Za-z]:[\\/]*)
6075       re_direlt='/[^/][^/]*/\.\./'
6076       # Canonicalize the path of ld
6077       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
6078       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
6079         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
6080       done
6081       test -z "$LD" && LD="$ac_prog"
6082       ;;
6083   "")
6084     # If it fails, then pretend we aren't using GCC.
6085     ac_prog=ld
6086     ;;
6087   *)
6088     # If it is relative, then search for the first ld in PATH.
6089     with_gnu_ld=unknown
6090     ;;
6091   esac
6092 elif test "$with_gnu_ld" = yes; then
6093   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
6094 $as_echo_n "checking for GNU ld... " >&6; }
6095 else
6096   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
6097 $as_echo_n "checking for non-GNU ld... " >&6; }
6098 fi
6099 if ${ac_cv_path_LD+:} false; then :
6100   $as_echo_n "(cached) " >&6
6101 else
6102   if test -z "$LD"; then
6103   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
6104   for ac_dir in $PATH; do
6105     test -z "$ac_dir" && ac_dir=.
6106     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6107       ac_cv_path_LD="$ac_dir/$ac_prog"
6108       # Check to see if the program is GNU ld.  I'd rather use --version,
6109       # but apparently some GNU ld's only accept -v.
6110       # Break only if it was the GNU/non-GNU ld that we prefer.
6111       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
6112         test "$with_gnu_ld" != no && break
6113       else
6114         test "$with_gnu_ld" != yes && break
6115       fi
6116     fi
6117   done
6118   IFS="$ac_save_ifs"
6119 else
6120   ac_cv_path_LD="$LD" # Let the user override the test with a path.
6121 fi
6122 fi
6123
6124 LD="$ac_cv_path_LD"
6125 if test -n "$LD"; then
6126   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
6127 $as_echo "$LD" >&6; }
6128 else
6129   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6130 $as_echo "no" >&6; }
6131 fi
6132 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
6133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
6134 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
6135 if ${ac_cv_prog_gnu_ld+:} false; then :
6136   $as_echo_n "(cached) " >&6
6137 else
6138   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
6139 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
6140   ac_cv_prog_gnu_ld=yes
6141 else
6142   ac_cv_prog_gnu_ld=no
6143 fi
6144 fi
6145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
6146 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
6147 with_gnu_ld=$ac_cv_prog_gnu_ld
6148
6149
6150
6151
6152 case $host_os in sysv5*)
6153   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ld -R works" >&5
6154 $as_echo_n "checking whether ld -R works... " >&6; }
6155 if ${pgac_cv_prog_ld_R+:} false; then :
6156   $as_echo_n "(cached) " >&6
6157 else
6158
6159     pgac_save_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -Wl,-R/usr/lib"
6160     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6161 /* end confdefs.h.  */
6162
6163 int
6164 main ()
6165 {
6166
6167   ;
6168   return 0;
6169 }
6170 _ACEOF
6171 if ac_fn_c_try_link "$LINENO"; then :
6172   pgac_cv_prog_ld_R=yes
6173 else
6174   pgac_cv_prog_ld_R=no
6175 fi
6176 rm -f core conftest.err conftest.$ac_objext \
6177     conftest$ac_exeext conftest.$ac_ext
6178     LDFLAGS=$pgac_save_LDFLAGS
6179
6180 fi
6181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_ld_R" >&5
6182 $as_echo "$pgac_cv_prog_ld_R" >&6; }
6183   ld_R_works=$pgac_cv_prog_ld_R
6184
6185 esac
6186 if test -n "$ac_tool_prefix"; then
6187   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6188 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6190 $as_echo_n "checking for $ac_word... " >&6; }
6191 if ${ac_cv_prog_RANLIB+:} false; then :
6192   $as_echo_n "(cached) " >&6
6193 else
6194   if test -n "$RANLIB"; then
6195   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6196 else
6197 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6198 for as_dir in $PATH
6199 do
6200   IFS=$as_save_IFS
6201   test -z "$as_dir" && as_dir=.
6202     for ac_exec_ext in '' $ac_executable_extensions; do
6203   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6204     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6205     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6206     break 2
6207   fi
6208 done
6209   done
6210 IFS=$as_save_IFS
6211
6212 fi
6213 fi
6214 RANLIB=$ac_cv_prog_RANLIB
6215 if test -n "$RANLIB"; then
6216   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6217 $as_echo "$RANLIB" >&6; }
6218 else
6219   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6220 $as_echo "no" >&6; }
6221 fi
6222
6223
6224 fi
6225 if test -z "$ac_cv_prog_RANLIB"; then
6226   ac_ct_RANLIB=$RANLIB
6227   # Extract the first word of "ranlib", so it can be a program name with args.
6228 set dummy ranlib; ac_word=$2
6229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6230 $as_echo_n "checking for $ac_word... " >&6; }
6231 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6232   $as_echo_n "(cached) " >&6
6233 else
6234   if test -n "$ac_ct_RANLIB"; then
6235   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6236 else
6237 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6238 for as_dir in $PATH
6239 do
6240   IFS=$as_save_IFS
6241   test -z "$as_dir" && as_dir=.
6242     for ac_exec_ext in '' $ac_executable_extensions; do
6243   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6244     ac_cv_prog_ac_ct_RANLIB="ranlib"
6245     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6246     break 2
6247   fi
6248 done
6249   done
6250 IFS=$as_save_IFS
6251
6252 fi
6253 fi
6254 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6255 if test -n "$ac_ct_RANLIB"; then
6256   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6257 $as_echo "$ac_ct_RANLIB" >&6; }
6258 else
6259   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6260 $as_echo "no" >&6; }
6261 fi
6262
6263   if test "x$ac_ct_RANLIB" = x; then
6264     RANLIB=":"
6265   else
6266     case $cross_compiling:$ac_tool_warned in
6267 yes:)
6268 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6269 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6270 ac_tool_warned=yes ;;
6271 esac
6272     RANLIB=$ac_ct_RANLIB
6273   fi
6274 else
6275   RANLIB="$ac_cv_prog_RANLIB"
6276 fi
6277
6278
6279   if test -n "$ac_tool_prefix"; then
6280   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6281 set dummy ${ac_tool_prefix}strip; ac_word=$2
6282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6283 $as_echo_n "checking for $ac_word... " >&6; }
6284 if ${ac_cv_prog_STRIP+:} false; then :
6285   $as_echo_n "(cached) " >&6
6286 else
6287   if test -n "$STRIP"; then
6288   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6289 else
6290 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6291 for as_dir in $PATH
6292 do
6293   IFS=$as_save_IFS
6294   test -z "$as_dir" && as_dir=.
6295     for ac_exec_ext in '' $ac_executable_extensions; do
6296   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6297     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6298     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6299     break 2
6300   fi
6301 done
6302   done
6303 IFS=$as_save_IFS
6304
6305 fi
6306 fi
6307 STRIP=$ac_cv_prog_STRIP
6308 if test -n "$STRIP"; then
6309   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6310 $as_echo "$STRIP" >&6; }
6311 else
6312   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6313 $as_echo "no" >&6; }
6314 fi
6315
6316
6317 fi
6318 if test -z "$ac_cv_prog_STRIP"; then
6319   ac_ct_STRIP=$STRIP
6320   # Extract the first word of "strip", so it can be a program name with args.
6321 set dummy strip; ac_word=$2
6322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6323 $as_echo_n "checking for $ac_word... " >&6; }
6324 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
6325   $as_echo_n "(cached) " >&6
6326 else
6327   if test -n "$ac_ct_STRIP"; then
6328   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6329 else
6330 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6331 for as_dir in $PATH
6332 do
6333   IFS=$as_save_IFS
6334   test -z "$as_dir" && as_dir=.
6335     for ac_exec_ext in '' $ac_executable_extensions; do
6336   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6337     ac_cv_prog_ac_ct_STRIP="strip"
6338     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6339     break 2
6340   fi
6341 done
6342   done
6343 IFS=$as_save_IFS
6344
6345 fi
6346 fi
6347 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6348 if test -n "$ac_ct_STRIP"; then
6349   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6350 $as_echo "$ac_ct_STRIP" >&6; }
6351 else
6352   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6353 $as_echo "no" >&6; }
6354 fi
6355
6356   if test "x$ac_ct_STRIP" = x; then
6357     STRIP=":"
6358   else
6359     case $cross_compiling:$ac_tool_warned in
6360 yes:)
6361 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6362 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6363 ac_tool_warned=yes ;;
6364 esac
6365     STRIP=$ac_ct_STRIP
6366   fi
6367 else
6368   STRIP="$ac_cv_prog_STRIP"
6369 fi
6370
6371
6372   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
6373 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
6374   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
6375     STRIP_STATIC_LIB="$STRIP -x"
6376     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
6377     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6378 $as_echo "yes" >&6; }
6379   else
6380     case $host_os in
6381       darwin*)
6382         STRIP="$STRIP -x"
6383         STRIP_STATIC_LIB=$STRIP
6384         STRIP_SHARED_LIB=$STRIP
6385         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6386 $as_echo "yes" >&6; }
6387         ;;
6388       *)
6389         STRIP_STATIC_LIB=:
6390         STRIP_SHARED_LIB=:
6391         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6392 $as_echo "no" >&6; }
6393         ;;
6394     esac
6395   fi
6396
6397
6398
6399 if test -n "$ac_tool_prefix"; then
6400   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6401 set dummy ${ac_tool_prefix}ar; ac_word=$2
6402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6403 $as_echo_n "checking for $ac_word... " >&6; }
6404 if ${ac_cv_prog_AR+:} false; then :
6405   $as_echo_n "(cached) " >&6
6406 else
6407   if test -n "$AR"; then
6408   ac_cv_prog_AR="$AR" # Let the user override the test.
6409 else
6410 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6411 for as_dir in $PATH
6412 do
6413   IFS=$as_save_IFS
6414   test -z "$as_dir" && as_dir=.
6415     for ac_exec_ext in '' $ac_executable_extensions; do
6416   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6417     ac_cv_prog_AR="${ac_tool_prefix}ar"
6418     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6419     break 2
6420   fi
6421 done
6422   done
6423 IFS=$as_save_IFS
6424
6425 fi
6426 fi
6427 AR=$ac_cv_prog_AR
6428 if test -n "$AR"; then
6429   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6430 $as_echo "$AR" >&6; }
6431 else
6432   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6433 $as_echo "no" >&6; }
6434 fi
6435
6436
6437 fi
6438 if test -z "$ac_cv_prog_AR"; then
6439   ac_ct_AR=$AR
6440   # Extract the first word of "ar", so it can be a program name with args.
6441 set dummy ar; ac_word=$2
6442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6443 $as_echo_n "checking for $ac_word... " >&6; }
6444 if ${ac_cv_prog_ac_ct_AR+:} false; then :
6445   $as_echo_n "(cached) " >&6
6446 else
6447   if test -n "$ac_ct_AR"; then
6448   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6449 else
6450 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6451 for as_dir in $PATH
6452 do
6453   IFS=$as_save_IFS
6454   test -z "$as_dir" && as_dir=.
6455     for ac_exec_ext in '' $ac_executable_extensions; do
6456   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6457     ac_cv_prog_ac_ct_AR="ar"
6458     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6459     break 2
6460   fi
6461 done
6462   done
6463 IFS=$as_save_IFS
6464
6465 fi
6466 fi
6467 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6468 if test -n "$ac_ct_AR"; then
6469   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6470 $as_echo "$ac_ct_AR" >&6; }
6471 else
6472   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6473 $as_echo "no" >&6; }
6474 fi
6475
6476   if test "x$ac_ct_AR" = x; then
6477     AR="ar"
6478   else
6479     case $cross_compiling:$ac_tool_warned in
6480 yes:)
6481 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6482 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6483 ac_tool_warned=yes ;;
6484 esac
6485     AR=$ac_ct_AR
6486   fi
6487 else
6488   AR="$ac_cv_prog_AR"
6489 fi
6490
6491 if test "$PORTNAME" = "win32"; then
6492   if test -n "$ac_tool_prefix"; then
6493   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6494 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
6495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6496 $as_echo_n "checking for $ac_word... " >&6; }
6497 if ${ac_cv_prog_DLLTOOL+:} false; then :
6498   $as_echo_n "(cached) " >&6
6499 else
6500   if test -n "$DLLTOOL"; then
6501   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6502 else
6503 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6504 for as_dir in $PATH
6505 do
6506   IFS=$as_save_IFS
6507   test -z "$as_dir" && as_dir=.
6508     for ac_exec_ext in '' $ac_executable_extensions; do
6509   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6510     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
6511     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6512     break 2
6513   fi
6514 done
6515   done
6516 IFS=$as_save_IFS
6517
6518 fi
6519 fi
6520 DLLTOOL=$ac_cv_prog_DLLTOOL
6521 if test -n "$DLLTOOL"; then
6522   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
6523 $as_echo "$DLLTOOL" >&6; }
6524 else
6525   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6526 $as_echo "no" >&6; }
6527 fi
6528
6529
6530 fi
6531 if test -z "$ac_cv_prog_DLLTOOL"; then
6532   ac_ct_DLLTOOL=$DLLTOOL
6533   # Extract the first word of "dlltool", so it can be a program name with args.
6534 set dummy dlltool; ac_word=$2
6535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6536 $as_echo_n "checking for $ac_word... " >&6; }
6537 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
6538   $as_echo_n "(cached) " >&6
6539 else
6540   if test -n "$ac_ct_DLLTOOL"; then
6541   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6542 else
6543 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6544 for as_dir in $PATH
6545 do
6546   IFS=$as_save_IFS
6547   test -z "$as_dir" && as_dir=.
6548     for ac_exec_ext in '' $ac_executable_extensions; do
6549   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6550     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
6551     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6552     break 2
6553   fi
6554 done
6555   done
6556 IFS=$as_save_IFS
6557
6558 fi
6559 fi
6560 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6561 if test -n "$ac_ct_DLLTOOL"; then
6562   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
6563 $as_echo "$ac_ct_DLLTOOL" >&6; }
6564 else
6565   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6566 $as_echo "no" >&6; }
6567 fi
6568
6569   if test "x$ac_ct_DLLTOOL" = x; then
6570     DLLTOOL="dlltool"
6571   else
6572     case $cross_compiling:$ac_tool_warned in
6573 yes:)
6574 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6575 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6576 ac_tool_warned=yes ;;
6577 esac
6578     DLLTOOL=$ac_ct_DLLTOOL
6579   fi
6580 else
6581   DLLTOOL="$ac_cv_prog_DLLTOOL"
6582 fi
6583
6584   if test -n "$ac_tool_prefix"; then
6585   # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
6586 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
6587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6588 $as_echo_n "checking for $ac_word... " >&6; }
6589 if ${ac_cv_prog_DLLWRAP+:} false; then :
6590   $as_echo_n "(cached) " >&6
6591 else
6592   if test -n "$DLLWRAP"; then
6593   ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
6594 else
6595 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6596 for as_dir in $PATH
6597 do
6598   IFS=$as_save_IFS
6599   test -z "$as_dir" && as_dir=.
6600     for ac_exec_ext in '' $ac_executable_extensions; do
6601   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6602     ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
6603     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6604     break 2
6605   fi
6606 done
6607   done
6608 IFS=$as_save_IFS
6609
6610 fi
6611 fi
6612 DLLWRAP=$ac_cv_prog_DLLWRAP
6613 if test -n "$DLLWRAP"; then
6614   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5
6615 $as_echo "$DLLWRAP" >&6; }
6616 else
6617   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6618 $as_echo "no" >&6; }
6619 fi
6620
6621
6622 fi
6623 if test -z "$ac_cv_prog_DLLWRAP"; then
6624   ac_ct_DLLWRAP=$DLLWRAP
6625   # Extract the first word of "dllwrap", so it can be a program name with args.
6626 set dummy dllwrap; ac_word=$2
6627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6628 $as_echo_n "checking for $ac_word... " >&6; }
6629 if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then :
6630   $as_echo_n "(cached) " >&6
6631 else
6632   if test -n "$ac_ct_DLLWRAP"; then
6633   ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
6634 else
6635 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6636 for as_dir in $PATH
6637 do
6638   IFS=$as_save_IFS
6639   test -z "$as_dir" && as_dir=.
6640     for ac_exec_ext in '' $ac_executable_extensions; do
6641   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6642     ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
6643     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6644     break 2
6645   fi
6646 done
6647   done
6648 IFS=$as_save_IFS
6649
6650 fi
6651 fi
6652 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
6653 if test -n "$ac_ct_DLLWRAP"; then
6654   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5
6655 $as_echo "$ac_ct_DLLWRAP" >&6; }
6656 else
6657   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6658 $as_echo "no" >&6; }
6659 fi
6660
6661   if test "x$ac_ct_DLLWRAP" = x; then
6662     DLLWRAP="dllwrap"
6663   else
6664     case $cross_compiling:$ac_tool_warned in
6665 yes:)
6666 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6667 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6668 ac_tool_warned=yes ;;
6669 esac
6670     DLLWRAP=$ac_ct_DLLWRAP
6671   fi
6672 else
6673   DLLWRAP="$ac_cv_prog_DLLWRAP"
6674 fi
6675
6676   if test -n "$ac_tool_prefix"; then
6677   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6678 set dummy ${ac_tool_prefix}windres; ac_word=$2
6679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6680 $as_echo_n "checking for $ac_word... " >&6; }
6681 if ${ac_cv_prog_WINDRES+:} false; then :
6682   $as_echo_n "(cached) " >&6
6683 else
6684   if test -n "$WINDRES"; then
6685   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
6686 else
6687 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6688 for as_dir in $PATH
6689 do
6690   IFS=$as_save_IFS
6691   test -z "$as_dir" && as_dir=.
6692     for ac_exec_ext in '' $ac_executable_extensions; do
6693   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6694     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
6695     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6696     break 2
6697   fi
6698 done
6699   done
6700 IFS=$as_save_IFS
6701
6702 fi
6703 fi
6704 WINDRES=$ac_cv_prog_WINDRES
6705 if test -n "$WINDRES"; then
6706   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
6707 $as_echo "$WINDRES" >&6; }
6708 else
6709   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6710 $as_echo "no" >&6; }
6711 fi
6712
6713
6714 fi
6715 if test -z "$ac_cv_prog_WINDRES"; then
6716   ac_ct_WINDRES=$WINDRES
6717   # Extract the first word of "windres", so it can be a program name with args.
6718 set dummy windres; ac_word=$2
6719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6720 $as_echo_n "checking for $ac_word... " >&6; }
6721 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
6722   $as_echo_n "(cached) " >&6
6723 else
6724   if test -n "$ac_ct_WINDRES"; then
6725   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
6726 else
6727 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6728 for as_dir in $PATH
6729 do
6730   IFS=$as_save_IFS
6731   test -z "$as_dir" && as_dir=.
6732     for ac_exec_ext in '' $ac_executable_extensions; do
6733   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6734     ac_cv_prog_ac_ct_WINDRES="windres"
6735     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6736     break 2
6737   fi
6738 done
6739   done
6740 IFS=$as_save_IFS
6741
6742 fi
6743 fi
6744 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6745 if test -n "$ac_ct_WINDRES"; then
6746   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
6747 $as_echo "$ac_ct_WINDRES" >&6; }
6748 else
6749   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6750 $as_echo "no" >&6; }
6751 fi
6752
6753   if test "x$ac_ct_WINDRES" = x; then
6754     WINDRES="windres"
6755   else
6756     case $cross_compiling:$ac_tool_warned in
6757 yes:)
6758 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6759 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6760 ac_tool_warned=yes ;;
6761 esac
6762     WINDRES=$ac_ct_WINDRES
6763   fi
6764 else
6765   WINDRES="$ac_cv_prog_WINDRES"
6766 fi
6767
6768 fi
6769
6770 # Find a good install program.  We prefer a C program (faster),
6771 # so one script is as good as another.  But avoid the broken or
6772 # incompatible versions:
6773 # SysV /etc/install, /usr/sbin/install
6774 # SunOS /usr/etc/install
6775 # IRIX /sbin/install
6776 # AIX /bin/install
6777 # AmigaOS /C/install, which installs bootblocks on floppy discs
6778 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6779 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
6780 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6781 # OS/2's system install, which has a completely different semantic
6782 # ./install, which can be erroneously created by make from ./install.sh.
6783 # Reject install programs that cannot install multiple files.
6784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6785 $as_echo_n "checking for a BSD-compatible install... " >&6; }
6786 if test -z "$INSTALL"; then
6787 if ${ac_cv_path_install+:} false; then :
6788   $as_echo_n "(cached) " >&6
6789 else
6790   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6791 for as_dir in $PATH
6792 do
6793   IFS=$as_save_IFS
6794   test -z "$as_dir" && as_dir=.
6795     # Account for people who put trailing slashes in PATH elements.
6796 case $as_dir/ in #((
6797   ./ | .// | /[cC]/* | \
6798   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
6799   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
6800   /usr/ucb/* ) ;;
6801   *)
6802     # OSF1 and SCO ODT 3.0 have their own names for install.
6803     # Don't use installbsd from OSF since it installs stuff as root
6804     # by default.
6805     for ac_prog in ginstall scoinst install; do
6806       for ac_exec_ext in '' $ac_executable_extensions; do
6807         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
6808           if test $ac_prog = install &&
6809             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6810             # AIX install.  It has an incompatible calling convention.
6811             :
6812           elif test $ac_prog = install &&
6813             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6814             # program-specific install script used by HP pwplus--don't use.
6815             :
6816           else
6817             rm -rf conftest.one conftest.two conftest.dir
6818             echo one > conftest.one
6819             echo two > conftest.two
6820             mkdir conftest.dir
6821             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6822               test -s conftest.one && test -s conftest.two &&
6823               test -s conftest.dir/conftest.one &&
6824               test -s conftest.dir/conftest.two
6825             then
6826               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6827               break 3
6828             fi
6829           fi
6830         fi
6831       done
6832     done
6833     ;;
6834 esac
6835
6836   done
6837 IFS=$as_save_IFS
6838
6839 rm -rf conftest.one conftest.two conftest.dir
6840
6841 fi
6842   if test "${ac_cv_path_install+set}" = set; then
6843     INSTALL=$ac_cv_path_install
6844   else
6845     # As a last resort, use the slow shell script.  Don't cache a
6846     # value for INSTALL within a source directory, because that will
6847     # break other packages using the cache if that directory is
6848     # removed, or if the value is a relative name.
6849     INSTALL=$ac_install_sh
6850   fi
6851 fi
6852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6853 $as_echo "$INSTALL" >&6; }
6854
6855 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6856 # It thinks the first close brace ends the variable substitution.
6857 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6858
6859 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6860
6861 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6862
6863 # When Autoconf chooses install-sh as install program it tries to generate
6864 # a relative path to it in each makefile where it subsitutes it. This clashes
6865 # with our Makefile.global concept. This workaround helps.
6866 case $INSTALL in
6867   *install-sh*) install_bin='';;
6868   *) install_bin=$INSTALL;;
6869 esac
6870
6871
6872 # Extract the first word of "tar", so it can be a program name with args.
6873 set dummy tar; ac_word=$2
6874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6875 $as_echo_n "checking for $ac_word... " >&6; }
6876 if ${ac_cv_path_TAR+:} false; then :
6877   $as_echo_n "(cached) " >&6
6878 else
6879   case $TAR in
6880   [\\/]* | ?:[\\/]*)
6881   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
6882   ;;
6883   *)
6884   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6885 for as_dir in $PATH
6886 do
6887   IFS=$as_save_IFS
6888   test -z "$as_dir" && as_dir=.
6889     for ac_exec_ext in '' $ac_executable_extensions; do
6890   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6891     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
6892     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6893     break 2
6894   fi
6895 done
6896   done
6897 IFS=$as_save_IFS
6898
6899   ;;
6900 esac
6901 fi
6902 TAR=$ac_cv_path_TAR
6903 if test -n "$TAR"; then
6904   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
6905 $as_echo "$TAR" >&6; }
6906 else
6907   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6908 $as_echo "no" >&6; }
6909 fi
6910
6911
6912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
6913 $as_echo_n "checking whether ln -s works... " >&6; }
6914 LN_S=$as_ln_s
6915 if test "$LN_S" = "ln -s"; then
6916   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6917 $as_echo "yes" >&6; }
6918 else
6919   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
6920 $as_echo "no, using $LN_S" >&6; }
6921 fi
6922
6923 for ac_prog in gawk mawk nawk awk
6924 do
6925   # Extract the first word of "$ac_prog", so it can be a program name with args.
6926 set dummy $ac_prog; ac_word=$2
6927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6928 $as_echo_n "checking for $ac_word... " >&6; }
6929 if ${ac_cv_prog_AWK+:} false; then :
6930   $as_echo_n "(cached) " >&6
6931 else
6932   if test -n "$AWK"; then
6933   ac_cv_prog_AWK="$AWK" # Let the user override the test.
6934 else
6935 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6936 for as_dir in $PATH
6937 do
6938   IFS=$as_save_IFS
6939   test -z "$as_dir" && as_dir=.
6940     for ac_exec_ext in '' $ac_executable_extensions; do
6941   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6942     ac_cv_prog_AWK="$ac_prog"
6943     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6944     break 2
6945   fi
6946 done
6947   done
6948 IFS=$as_save_IFS
6949
6950 fi
6951 fi
6952 AWK=$ac_cv_prog_AWK
6953 if test -n "$AWK"; then
6954   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6955 $as_echo "$AWK" >&6; }
6956 else
6957   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6958 $as_echo "no" >&6; }
6959 fi
6960
6961
6962   test -n "$AWK" && break
6963 done
6964
6965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6966 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6967 if test -z "$MKDIR_P"; then
6968   if ${ac_cv_path_mkdir+:} false; then :
6969   $as_echo_n "(cached) " >&6
6970 else
6971   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6972 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6973 do
6974   IFS=$as_save_IFS
6975   test -z "$as_dir" && as_dir=.
6976     for ac_prog in mkdir gmkdir; do
6977          for ac_exec_ext in '' $ac_executable_extensions; do
6978            as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
6979            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6980              'mkdir (GNU coreutils) '* | \
6981              'mkdir (coreutils) '* | \
6982              'mkdir (fileutils) '4.1*)
6983                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6984                break 3;;
6985            esac
6986          done
6987        done
6988   done
6989 IFS=$as_save_IFS
6990
6991 fi
6992
6993   test -d ./--version && rmdir ./--version
6994   if test "${ac_cv_path_mkdir+set}" = set; then
6995     MKDIR_P="$ac_cv_path_mkdir -p"
6996   else
6997     # As a last resort, use the slow shell script.  Don't cache a
6998     # value for MKDIR_P within a source directory, because that will
6999     # break other packages using the cache if that directory is
7000     # removed, or if the value is a relative name.
7001     MKDIR_P="$ac_install_sh -d"
7002   fi
7003 fi
7004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
7005 $as_echo "$MKDIR_P" >&6; }
7006
7007 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
7008 # a relative path to it in each makefile where it subsitutes it. This clashes
7009 # with our Makefile.global concept. This workaround helps.
7010 case $MKDIR_P in
7011   *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
7012 esac
7013
7014 # Let the user override the search
7015 if test -z "$BISON"; then
7016   for ac_prog in bison
7017 do
7018   # Extract the first word of "$ac_prog", so it can be a program name with args.
7019 set dummy $ac_prog; ac_word=$2
7020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7021 $as_echo_n "checking for $ac_word... " >&6; }
7022 if ${ac_cv_path_BISON+:} false; then :
7023   $as_echo_n "(cached) " >&6
7024 else
7025   case $BISON in
7026   [\\/]* | ?:[\\/]*)
7027   ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
7028   ;;
7029   *)
7030   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7031 for as_dir in $PATH
7032 do
7033   IFS=$as_save_IFS
7034   test -z "$as_dir" && as_dir=.
7035     for ac_exec_ext in '' $ac_executable_extensions; do
7036   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7037     ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
7038     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7039     break 2
7040   fi
7041 done
7042   done
7043 IFS=$as_save_IFS
7044
7045   ;;
7046 esac
7047 fi
7048 BISON=$ac_cv_path_BISON
7049 if test -n "$BISON"; then
7050   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
7051 $as_echo "$BISON" >&6; }
7052 else
7053   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7054 $as_echo "no" >&6; }
7055 fi
7056
7057
7058   test -n "$BISON" && break
7059 done
7060
7061 fi
7062
7063 if test "$BISON"; then
7064   pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
7065   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
7066 $as_echo "$as_me: using $pgac_bison_version" >&6;}
7067   if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
7068   then
7069     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7070 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
7071 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
7072 $as_echo "$as_me: WARNING:
7073 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
7074 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
7075     BISON=""
7076   fi
7077   # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
7078   # of the now preferred %name-prefix "base_yy", but the latter
7079   # doesn't work with Bison 2.3 or less.  So for now we silence the
7080   # deprecation warnings.
7081   if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
7082   then
7083     BISONFLAGS="$BISONFLAGS -Wno-deprecated"
7084   fi
7085 fi
7086
7087 if test -z "$BISON"; then
7088   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7089 *** Without Bison you will not be able to build PostgreSQL from Git nor
7090 *** change any of the parser definition files.  You can obtain Bison from
7091 *** a GNU mirror site.  (If you are using the official distribution of
7092 *** PostgreSQL then you do not need to worry about this, because the Bison
7093 *** output is pre-generated.)" >&5
7094 $as_echo "$as_me: WARNING:
7095 *** Without Bison you will not be able to build PostgreSQL from Git nor
7096 *** change any of the parser definition files.  You can obtain Bison from
7097 *** a GNU mirror site.  (If you are using the official distribution of
7098 *** PostgreSQL then you do not need to worry about this, because the Bison
7099 *** output is pre-generated.)" >&2;}
7100 fi
7101 # We don't need AC_SUBST(BISON) because AC_PATH_PROG did it
7102
7103
7104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
7105 $as_echo_n "checking for flex... " >&6; }
7106 if ${pgac_cv_path_flex+:} false; then :
7107   $as_echo_n "(cached) " >&6
7108 else
7109   # Let the user override the test
7110 if test -n "$FLEX"; then
7111   pgac_cv_path_flex=$FLEX
7112 else
7113   pgac_save_IFS=$IFS
7114   IFS=$PATH_SEPARATOR
7115   for pgac_dir in $PATH; do
7116     IFS=$pgac_save_IFS
7117     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
7118       pgac_dir=`pwd`
7119     fi
7120     for pgac_prog in flex lex; do
7121       pgac_candidate="$pgac_dir/$pgac_prog"
7122       if test -f "$pgac_candidate" \
7123         && $pgac_candidate --version </dev/null >/dev/null 2>&1
7124       then
7125         echo '%%'  > conftest.l
7126         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
7127           pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
7128           if echo "$pgac_flex_version" | sed 's/[.a-z]/ /g' | $AWK '{ if ($1 = 2 && $2 = 5 && $3 >= 31) exit 0; else exit 1;}'
7129           then
7130             pgac_cv_path_flex=$pgac_candidate
7131             break 2
7132           else
7133             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7134 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
7135 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
7136 $as_echo "$as_me: WARNING:
7137 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
7138 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
7139           fi
7140         fi
7141       fi
7142     done
7143   done
7144   rm -f conftest.l lex.yy.c
7145   : ${pgac_cv_path_flex=no}
7146 fi
7147
7148 fi
7149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
7150 $as_echo "$pgac_cv_path_flex" >&6; }
7151 if test x"$pgac_cv_path_flex" = x"no"; then
7152   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7153 *** Without Flex you will not be able to build PostgreSQL from Git nor
7154 *** change any of the scanner definition files.  You can obtain Flex from
7155 *** a GNU mirror site.  (If you are using the official distribution of
7156 *** PostgreSQL then you do not need to worry about this because the Flex
7157 *** output is pre-generated.)" >&5
7158 $as_echo "$as_me: WARNING:
7159 *** Without Flex you will not be able to build PostgreSQL from Git nor
7160 *** change any of the scanner definition files.  You can obtain Flex from
7161 *** a GNU mirror site.  (If you are using the official distribution of
7162 *** PostgreSQL then you do not need to worry about this because the Flex
7163 *** output is pre-generated.)" >&2;}
7164
7165   FLEX=
7166 else
7167   FLEX=$pgac_cv_path_flex
7168   pgac_flex_version=`$FLEX --version 2>/dev/null`
7169   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
7170 $as_echo "$as_me: using $pgac_flex_version" >&6;}
7171 fi
7172
7173
7174
7175
7176
7177 # Let the user override the search
7178 if test -z "$PERL"; then
7179   # Extract the first word of "perl", so it can be a program name with args.
7180 set dummy perl; ac_word=$2
7181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7182 $as_echo_n "checking for $ac_word... " >&6; }
7183 if ${ac_cv_path_PERL+:} false; then :
7184   $as_echo_n "(cached) " >&6
7185 else
7186   case $PERL in
7187   [\\/]* | ?:[\\/]*)
7188   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
7189   ;;
7190   *)
7191   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7192 for as_dir in $PATH
7193 do
7194   IFS=$as_save_IFS
7195   test -z "$as_dir" && as_dir=.
7196     for ac_exec_ext in '' $ac_executable_extensions; do
7197   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7198     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
7199     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7200     break 2
7201   fi
7202 done
7203   done
7204 IFS=$as_save_IFS
7205
7206   ;;
7207 esac
7208 fi
7209 PERL=$ac_cv_path_PERL
7210 if test -n "$PERL"; then
7211   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
7212 $as_echo "$PERL" >&6; }
7213 else
7214   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7215 $as_echo "no" >&6; }
7216 fi
7217
7218
7219 fi
7220
7221 if test "$PERL"; then
7222   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'`
7223   { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
7224 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
7225   if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
7226     $AWK '{ if ($1 = 5 && $2 >= 8) exit 1; else exit 0;}'
7227   then
7228     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7229 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7230 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
7231 $as_echo "$as_me: WARNING:
7232 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7233 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
7234     PERL=""
7235   fi
7236 fi
7237
7238 if test -z "$PERL"; then
7239   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7240 *** Without Perl you will not be able to build PostgreSQL from Git.
7241 *** You can obtain Perl from any CPAN mirror site.
7242 *** (If you are using the official distribution of PostgreSQL then you do not
7243 *** need to worry about this, because the Perl output is pre-generated.)" >&5
7244 $as_echo "$as_me: WARNING:
7245 *** Without Perl you will not be able to build PostgreSQL from Git.
7246 *** You can obtain Perl from any CPAN mirror site.
7247 *** (If you are using the official distribution of PostgreSQL then you do not
7248 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
7249 fi
7250
7251 if test "$with_perl" = yes; then
7252   if test -z "$PERL"; then
7253     as_fn_error $? "Perl not found" "$LINENO" 5
7254   fi
7255
7256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
7257 $as_echo_n "checking for Perl archlibexp... " >&6; }
7258 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
7259 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
7260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
7261 $as_echo "$perl_archlibexp" >&6; }
7262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
7263 $as_echo_n "checking for Perl privlibexp... " >&6; }
7264 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
7265 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
7266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
7267 $as_echo "$perl_privlibexp" >&6; }
7268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
7269 $as_echo_n "checking for Perl useshrplib... " >&6; }
7270 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
7271 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
7272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
7273 $as_echo "$perl_useshrplib" >&6; }
7274
7275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
7276 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
7277 if test "$PORTNAME" = "win32" ; then
7278 perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
7279 test -e "$perl_archlibexp/CORE/$perl_lib.lib" && perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
7280 else
7281 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
7282 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
7283 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
7284 fi
7285 if test -z "$perl_embed_ldflags" ; then
7286         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7287 $as_echo "no" >&6; }
7288         as_fn_error $? "could not determine flags for linking embedded Perl.
7289 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
7290 installed." "$LINENO" 5
7291 else
7292         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
7293 $as_echo "$perl_embed_ldflags" >&6; }
7294 fi
7295
7296 fi
7297
7298 if test "$with_python" = yes; then
7299   # Extract the first word of "python", so it can be a program name with args.
7300 set dummy python; ac_word=$2
7301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7302 $as_echo_n "checking for $ac_word... " >&6; }
7303 if ${ac_cv_path_PYTHON+:} false; then :
7304   $as_echo_n "(cached) " >&6
7305 else
7306   case $PYTHON in
7307   [\\/]* | ?:[\\/]*)
7308   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
7309   ;;
7310   *)
7311   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7312 for as_dir in $PATH
7313 do
7314   IFS=$as_save_IFS
7315   test -z "$as_dir" && as_dir=.
7316     for ac_exec_ext in '' $ac_executable_extensions; do
7317   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7318     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
7319     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7320     break 2
7321   fi
7322 done
7323   done
7324 IFS=$as_save_IFS
7325
7326   ;;
7327 esac
7328 fi
7329 PYTHON=$ac_cv_path_PYTHON
7330 if test -n "$PYTHON"; then
7331   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
7332 $as_echo "$PYTHON" >&6; }
7333 else
7334   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7335 $as_echo "no" >&6; }
7336 fi
7337
7338
7339 if test x"$PYTHON" = x""; then
7340   as_fn_error $? "Python not found" "$LINENO" 5
7341 fi
7342
7343
7344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python distutils module" >&5
7345 $as_echo_n "checking for Python distutils module... " >&6; }
7346 if "${PYTHON}" -c 'import distutils' 2>&5
7347 then
7348     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7349 $as_echo "yes" >&6; }
7350 else
7351     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7352 $as_echo "no" >&6; }
7353     as_fn_error $? "distutils module not found" "$LINENO" 5
7354 fi
7355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
7356 $as_echo_n "checking Python configuration directory... " >&6; }
7357 python_majorversion=`${PYTHON} -c "import sys; print(sys.version[0])"`
7358 python_version=`${PYTHON} -c "import sys; print(sys.version[:3])"`
7359 python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
7360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
7361 $as_echo "$python_configdir" >&6; }
7362
7363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directories" >&5
7364 $as_echo_n "checking Python include directories... " >&6; }
7365 python_includespec=`${PYTHON} -c "
7366 import distutils.sysconfig
7367 a = '-I' + distutils.sysconfig.get_python_inc(False)
7368 b = '-I' + distutils.sysconfig.get_python_inc(True)
7369 if a == b:
7370     print(a)
7371 else:
7372     print(a + ' ' + b)"`
7373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
7374 $as_echo "$python_includespec" >&6; }
7375
7376
7377
7378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
7379 $as_echo_n "checking how to link an embedded Python application... " >&6; }
7380
7381 python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
7382 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
7383 python_so=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('SO'))))"`
7384 ldlibrary=`echo "${python_ldlibrary}" | sed "s/${python_so}$//"`
7385 python_enable_shared=`${PYTHON} -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_vars().get('Py_ENABLE_SHARED',0))"`
7386
7387 if test x"${python_libdir}" != x"" -a x"${python_ldlibrary}" != x"" -a x"${python_ldlibrary}" != x"${ldlibrary}"
7388 then
7389         # New way: use the official shared library
7390         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
7391         python_libspec="-L${python_libdir} -l${ldlibrary}"
7392 else
7393         # Old way: use libpython from python_configdir
7394         python_libdir="${python_configdir}"
7395         # LDVERSION was introduced in Python 3.2.
7396         python_ldversion=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDVERSION'))))"`
7397         if test x"${python_ldversion}" = x""; then
7398                 python_ldversion=$python_version
7399         fi
7400         python_libspec="-L${python_libdir} -lpython${python_ldversion}"
7401 fi
7402
7403 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
7404
7405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
7406 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
7407
7408
7409 # threaded python is not supported on OpenBSD
7410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Python is compiled with thread support" >&5
7411 $as_echo_n "checking whether Python is compiled with thread support... " >&6; }
7412 pythreads=`${PYTHON} -c "import sys; print(int('thread' in sys.builtin_module_names))"`
7413 if test "$pythreads" = "1"; then
7414   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7415 $as_echo "yes" >&6; }
7416   case $host_os in
7417   openbsd*)
7418     as_fn_error $? "threaded Python not supported on this platform" "$LINENO" 5
7419     ;;
7420   esac
7421 else
7422   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7423 $as_echo "no" >&6; }
7424 fi
7425
7426
7427 fi
7428
7429 if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
7430   # Extract the first word of "zic", so it can be a program name with args.
7431 set dummy zic; ac_word=$2
7432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7433 $as_echo_n "checking for $ac_word... " >&6; }
7434 if ${ac_cv_path_ZIC+:} false; then :
7435   $as_echo_n "(cached) " >&6
7436 else
7437   case $ZIC in
7438   [\\/]* | ?:[\\/]*)
7439   ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
7440   ;;
7441   *)
7442   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7443 for as_dir in $PATH
7444 do
7445   IFS=$as_save_IFS
7446   test -z "$as_dir" && as_dir=.
7447     for ac_exec_ext in '' $ac_executable_extensions; do
7448   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7449     ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
7450     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7451     break 2
7452   fi
7453 done
7454   done
7455 IFS=$as_save_IFS
7456
7457   ;;
7458 esac
7459 fi
7460 ZIC=$ac_cv_path_ZIC
7461 if test -n "$ZIC"; then
7462   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
7463 $as_echo "$ZIC" >&6; }
7464 else
7465   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7466 $as_echo "no" >&6; }
7467 fi
7468
7469
7470   if test -z "$ZIC"; then
7471     as_fn_error $? "
7472 When cross-compiling, either use the option --with-system-tzdata to use
7473 existing time-zone data, or set the environment variable ZIC to a zic
7474 program to use during the build." "$LINENO" 5
7475   fi
7476 fi
7477
7478
7479 ##
7480 ## Libraries
7481 ##
7482 ## Most libraries are included only if they demonstrably provide a function
7483 ## we need, but libm is an exception: always include it, because there are
7484 ## too many compilers that play cute optimization games that will break
7485 ## probes for standard functions such as pow().
7486 ##
7487
7488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
7489 $as_echo_n "checking for main in -lm... " >&6; }
7490 if ${ac_cv_lib_m_main+:} false; then :
7491   $as_echo_n "(cached) " >&6
7492 else
7493   ac_check_lib_save_LIBS=$LIBS
7494 LIBS="-lm  $LIBS"
7495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7496 /* end confdefs.h.  */
7497
7498
7499 int
7500 main ()
7501 {
7502 return main ();
7503   ;
7504   return 0;
7505 }
7506 _ACEOF
7507 if ac_fn_c_try_link "$LINENO"; then :
7508   ac_cv_lib_m_main=yes
7509 else
7510   ac_cv_lib_m_main=no
7511 fi
7512 rm -f core conftest.err conftest.$ac_objext \
7513     conftest$ac_exeext conftest.$ac_ext
7514 LIBS=$ac_check_lib_save_LIBS
7515 fi
7516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
7517 $as_echo "$ac_cv_lib_m_main" >&6; }
7518 if test "x$ac_cv_lib_m_main" = xyes; then :
7519   cat >>confdefs.h <<_ACEOF
7520 #define HAVE_LIBM 1
7521 _ACEOF
7522
7523   LIBS="-lm $LIBS"
7524
7525 fi
7526
7527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
7528 $as_echo_n "checking for library containing setproctitle... " >&6; }
7529 if ${ac_cv_search_setproctitle+:} false; then :
7530   $as_echo_n "(cached) " >&6
7531 else
7532   ac_func_search_save_LIBS=$LIBS
7533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7534 /* end confdefs.h.  */
7535
7536 /* Override any GCC internal prototype to avoid an error.
7537    Use char because int might match the return type of a GCC
7538    builtin and then its argument prototype would still apply.  */
7539 #ifdef __cplusplus
7540 extern "C"
7541 #endif
7542 char setproctitle ();
7543 int
7544 main ()
7545 {
7546 return setproctitle ();
7547   ;
7548   return 0;
7549 }
7550 _ACEOF
7551 for ac_lib in '' util; do
7552   if test -z "$ac_lib"; then
7553     ac_res="none required"
7554   else
7555     ac_res=-l$ac_lib
7556     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7557   fi
7558   if ac_fn_c_try_link "$LINENO"; then :
7559   ac_cv_search_setproctitle=$ac_res
7560 fi
7561 rm -f core conftest.err conftest.$ac_objext \
7562     conftest$ac_exeext
7563   if ${ac_cv_search_setproctitle+:} false; then :
7564   break
7565 fi
7566 done
7567 if ${ac_cv_search_setproctitle+:} false; then :
7568
7569 else
7570   ac_cv_search_setproctitle=no
7571 fi
7572 rm conftest.$ac_ext
7573 LIBS=$ac_func_search_save_LIBS
7574 fi
7575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
7576 $as_echo "$ac_cv_search_setproctitle" >&6; }
7577 ac_res=$ac_cv_search_setproctitle
7578 if test "$ac_res" != no; then :
7579   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7580
7581 fi
7582
7583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
7584 $as_echo_n "checking for library containing dlopen... " >&6; }
7585 if ${ac_cv_search_dlopen+:} false; then :
7586   $as_echo_n "(cached) " >&6
7587 else
7588   ac_func_search_save_LIBS=$LIBS
7589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7590 /* end confdefs.h.  */
7591
7592 /* Override any GCC internal prototype to avoid an error.
7593    Use char because int might match the return type of a GCC
7594    builtin and then its argument prototype would still apply.  */
7595 #ifdef __cplusplus
7596 extern "C"
7597 #endif
7598 char dlopen ();
7599 int
7600 main ()
7601 {
7602 return dlopen ();
7603   ;
7604   return 0;
7605 }
7606 _ACEOF
7607 for ac_lib in '' dl; do
7608   if test -z "$ac_lib"; then
7609     ac_res="none required"
7610   else
7611     ac_res=-l$ac_lib
7612     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7613   fi
7614   if ac_fn_c_try_link "$LINENO"; then :
7615   ac_cv_search_dlopen=$ac_res
7616 fi
7617 rm -f core conftest.err conftest.$ac_objext \
7618     conftest$ac_exeext
7619   if ${ac_cv_search_dlopen+:} false; then :
7620   break
7621 fi
7622 done
7623 if ${ac_cv_search_dlopen+:} false; then :
7624
7625 else
7626   ac_cv_search_dlopen=no
7627 fi
7628 rm conftest.$ac_ext
7629 LIBS=$ac_func_search_save_LIBS
7630 fi
7631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
7632 $as_echo "$ac_cv_search_dlopen" >&6; }
7633 ac_res=$ac_cv_search_dlopen
7634 if test "$ac_res" != no; then :
7635   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7636
7637 fi
7638
7639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
7640 $as_echo_n "checking for library containing socket... " >&6; }
7641 if ${ac_cv_search_socket+:} false; then :
7642   $as_echo_n "(cached) " >&6
7643 else
7644   ac_func_search_save_LIBS=$LIBS
7645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7646 /* end confdefs.h.  */
7647
7648 /* Override any GCC internal prototype to avoid an error.
7649    Use char because int might match the return type of a GCC
7650    builtin and then its argument prototype would still apply.  */
7651 #ifdef __cplusplus
7652 extern "C"
7653 #endif
7654 char socket ();
7655 int
7656 main ()
7657 {
7658 return socket ();
7659   ;
7660   return 0;
7661 }
7662 _ACEOF
7663 for ac_lib in '' socket ws2_32; do
7664   if test -z "$ac_lib"; then
7665     ac_res="none required"
7666   else
7667     ac_res=-l$ac_lib
7668     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7669   fi
7670   if ac_fn_c_try_link "$LINENO"; then :
7671   ac_cv_search_socket=$ac_res
7672 fi
7673 rm -f core conftest.err conftest.$ac_objext \
7674     conftest$ac_exeext
7675   if ${ac_cv_search_socket+:} false; then :
7676   break
7677 fi
7678 done
7679 if ${ac_cv_search_socket+:} false; then :
7680
7681 else
7682   ac_cv_search_socket=no
7683 fi
7684 rm conftest.$ac_ext
7685 LIBS=$ac_func_search_save_LIBS
7686 fi
7687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
7688 $as_echo "$ac_cv_search_socket" >&6; }
7689 ac_res=$ac_cv_search_socket
7690 if test "$ac_res" != no; then :
7691   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7692
7693 fi
7694
7695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
7696 $as_echo_n "checking for library containing shl_load... " >&6; }
7697 if ${ac_cv_search_shl_load+:} false; then :
7698   $as_echo_n "(cached) " >&6
7699 else
7700   ac_func_search_save_LIBS=$LIBS
7701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7702 /* end confdefs.h.  */
7703
7704 /* Override any GCC internal prototype to avoid an error.
7705    Use char because int might match the return type of a GCC
7706    builtin and then its argument prototype would still apply.  */
7707 #ifdef __cplusplus
7708 extern "C"
7709 #endif
7710 char shl_load ();
7711 int
7712 main ()
7713 {
7714 return shl_load ();
7715   ;
7716   return 0;
7717 }
7718 _ACEOF
7719 for ac_lib in '' dld; do
7720   if test -z "$ac_lib"; then
7721     ac_res="none required"
7722   else
7723     ac_res=-l$ac_lib
7724     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7725   fi
7726   if ac_fn_c_try_link "$LINENO"; then :
7727   ac_cv_search_shl_load=$ac_res
7728 fi
7729 rm -f core conftest.err conftest.$ac_objext \
7730     conftest$ac_exeext
7731   if ${ac_cv_search_shl_load+:} false; then :
7732   break
7733 fi
7734 done
7735 if ${ac_cv_search_shl_load+:} false; then :
7736
7737 else
7738   ac_cv_search_shl_load=no
7739 fi
7740 rm conftest.$ac_ext
7741 LIBS=$ac_func_search_save_LIBS
7742 fi
7743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
7744 $as_echo "$ac_cv_search_shl_load" >&6; }
7745 ac_res=$ac_cv_search_shl_load
7746 if test "$ac_res" != no; then :
7747   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7748
7749 fi
7750
7751 # We only use libld in port/dynloader/aix.c
7752 case $host_os in
7753      aix*)
7754         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ldopen" >&5
7755 $as_echo_n "checking for library containing ldopen... " >&6; }
7756 if ${ac_cv_search_ldopen+:} false; then :
7757   $as_echo_n "(cached) " >&6
7758 else
7759   ac_func_search_save_LIBS=$LIBS
7760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7761 /* end confdefs.h.  */
7762
7763 /* Override any GCC internal prototype to avoid an error.
7764    Use char because int might match the return type of a GCC
7765    builtin and then its argument prototype would still apply.  */
7766 #ifdef __cplusplus
7767 extern "C"
7768 #endif
7769 char ldopen ();
7770 int
7771 main ()
7772 {
7773 return ldopen ();
7774   ;
7775   return 0;
7776 }
7777 _ACEOF
7778 for ac_lib in '' ld; do
7779   if test -z "$ac_lib"; then
7780     ac_res="none required"
7781   else
7782     ac_res=-l$ac_lib
7783     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7784   fi
7785   if ac_fn_c_try_link "$LINENO"; then :
7786   ac_cv_search_ldopen=$ac_res
7787 fi
7788 rm -f core conftest.err conftest.$ac_objext \
7789     conftest$ac_exeext
7790   if ${ac_cv_search_ldopen+:} false; then :
7791   break
7792 fi
7793 done
7794 if ${ac_cv_search_ldopen+:} false; then :
7795
7796 else
7797   ac_cv_search_ldopen=no
7798 fi
7799 rm conftest.$ac_ext
7800 LIBS=$ac_func_search_save_LIBS
7801 fi
7802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ldopen" >&5
7803 $as_echo "$ac_cv_search_ldopen" >&6; }
7804 ac_res=$ac_cv_search_ldopen
7805 if test "$ac_res" != no; then :
7806   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7807
7808 fi
7809
7810         ;;
7811 esac
7812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
7813 $as_echo_n "checking for library containing getopt_long... " >&6; }
7814 if ${ac_cv_search_getopt_long+:} false; then :
7815   $as_echo_n "(cached) " >&6
7816 else
7817   ac_func_search_save_LIBS=$LIBS
7818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7819 /* end confdefs.h.  */
7820
7821 /* Override any GCC internal prototype to avoid an error.
7822    Use char because int might match the return type of a GCC
7823    builtin and then its argument prototype would still apply.  */
7824 #ifdef __cplusplus
7825 extern "C"
7826 #endif
7827 char getopt_long ();
7828 int
7829 main ()
7830 {
7831 return getopt_long ();
7832   ;
7833   return 0;
7834 }
7835 _ACEOF
7836 for ac_lib in '' getopt gnugetopt; do
7837   if test -z "$ac_lib"; then
7838     ac_res="none required"
7839   else
7840     ac_res=-l$ac_lib
7841     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7842   fi
7843   if ac_fn_c_try_link "$LINENO"; then :
7844   ac_cv_search_getopt_long=$ac_res
7845 fi
7846 rm -f core conftest.err conftest.$ac_objext \
7847     conftest$ac_exeext
7848   if ${ac_cv_search_getopt_long+:} false; then :
7849   break
7850 fi
7851 done
7852 if ${ac_cv_search_getopt_long+:} false; then :
7853
7854 else
7855   ac_cv_search_getopt_long=no
7856 fi
7857 rm conftest.$ac_ext
7858 LIBS=$ac_func_search_save_LIBS
7859 fi
7860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
7861 $as_echo "$ac_cv_search_getopt_long" >&6; }
7862 ac_res=$ac_cv_search_getopt_long
7863 if test "$ac_res" != no; then :
7864   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7865
7866 fi
7867
7868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
7869 $as_echo_n "checking for library containing crypt... " >&6; }
7870 if ${ac_cv_search_crypt+:} false; then :
7871   $as_echo_n "(cached) " >&6
7872 else
7873   ac_func_search_save_LIBS=$LIBS
7874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7875 /* end confdefs.h.  */
7876
7877 /* Override any GCC internal prototype to avoid an error.
7878    Use char because int might match the return type of a GCC
7879    builtin and then its argument prototype would still apply.  */
7880 #ifdef __cplusplus
7881 extern "C"
7882 #endif
7883 char crypt ();
7884 int
7885 main ()
7886 {
7887 return crypt ();
7888   ;
7889   return 0;
7890 }
7891 _ACEOF
7892 for ac_lib in '' crypt; do
7893   if test -z "$ac_lib"; then
7894     ac_res="none required"
7895   else
7896     ac_res=-l$ac_lib
7897     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7898   fi
7899   if ac_fn_c_try_link "$LINENO"; then :
7900   ac_cv_search_crypt=$ac_res
7901 fi
7902 rm -f core conftest.err conftest.$ac_objext \
7903     conftest$ac_exeext
7904   if ${ac_cv_search_crypt+:} false; then :
7905   break
7906 fi
7907 done
7908 if ${ac_cv_search_crypt+:} false; then :
7909
7910 else
7911   ac_cv_search_crypt=no
7912 fi
7913 rm conftest.$ac_ext
7914 LIBS=$ac_func_search_save_LIBS
7915 fi
7916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
7917 $as_echo "$ac_cv_search_crypt" >&6; }
7918 ac_res=$ac_cv_search_crypt
7919 if test "$ac_res" != no; then :
7920   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7921
7922 fi
7923
7924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
7925 $as_echo_n "checking for library containing shm_open... " >&6; }
7926 if ${ac_cv_search_shm_open+:} false; then :
7927   $as_echo_n "(cached) " >&6
7928 else
7929   ac_func_search_save_LIBS=$LIBS
7930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7931 /* end confdefs.h.  */
7932
7933 /* Override any GCC internal prototype to avoid an error.
7934    Use char because int might match the return type of a GCC
7935    builtin and then its argument prototype would still apply.  */
7936 #ifdef __cplusplus
7937 extern "C"
7938 #endif
7939 char shm_open ();
7940 int
7941 main ()
7942 {
7943 return shm_open ();
7944   ;
7945   return 0;
7946 }
7947 _ACEOF
7948 for ac_lib in '' rt; do
7949   if test -z "$ac_lib"; then
7950     ac_res="none required"
7951   else
7952     ac_res=-l$ac_lib
7953     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7954   fi
7955   if ac_fn_c_try_link "$LINENO"; then :
7956   ac_cv_search_shm_open=$ac_res
7957 fi
7958 rm -f core conftest.err conftest.$ac_objext \
7959     conftest$ac_exeext
7960   if ${ac_cv_search_shm_open+:} false; then :
7961   break
7962 fi
7963 done
7964 if ${ac_cv_search_shm_open+:} false; then :
7965
7966 else
7967   ac_cv_search_shm_open=no
7968 fi
7969 rm conftest.$ac_ext
7970 LIBS=$ac_func_search_save_LIBS
7971 fi
7972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
7973 $as_echo "$ac_cv_search_shm_open" >&6; }
7974 ac_res=$ac_cv_search_shm_open
7975 if test "$ac_res" != no; then :
7976   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7977
7978 fi
7979
7980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
7981 $as_echo_n "checking for library containing shm_unlink... " >&6; }
7982 if ${ac_cv_search_shm_unlink+:} false; then :
7983   $as_echo_n "(cached) " >&6
7984 else
7985   ac_func_search_save_LIBS=$LIBS
7986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7987 /* end confdefs.h.  */
7988
7989 /* Override any GCC internal prototype to avoid an error.
7990    Use char because int might match the return type of a GCC
7991    builtin and then its argument prototype would still apply.  */
7992 #ifdef __cplusplus
7993 extern "C"
7994 #endif
7995 char shm_unlink ();
7996 int
7997 main ()
7998 {
7999 return shm_unlink ();
8000   ;
8001   return 0;
8002 }
8003 _ACEOF
8004 for ac_lib in '' rt; do
8005   if test -z "$ac_lib"; then
8006     ac_res="none required"
8007   else
8008     ac_res=-l$ac_lib
8009     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8010   fi
8011   if ac_fn_c_try_link "$LINENO"; then :
8012   ac_cv_search_shm_unlink=$ac_res
8013 fi
8014 rm -f core conftest.err conftest.$ac_objext \
8015     conftest$ac_exeext
8016   if ${ac_cv_search_shm_unlink+:} false; then :
8017   break
8018 fi
8019 done
8020 if ${ac_cv_search_shm_unlink+:} false; then :
8021
8022 else
8023   ac_cv_search_shm_unlink=no
8024 fi
8025 rm conftest.$ac_ext
8026 LIBS=$ac_func_search_save_LIBS
8027 fi
8028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
8029 $as_echo "$ac_cv_search_shm_unlink" >&6; }
8030 ac_res=$ac_cv_search_shm_unlink
8031 if test "$ac_res" != no; then :
8032   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8033
8034 fi
8035
8036 # Solaris:
8037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
8038 $as_echo_n "checking for library containing fdatasync... " >&6; }
8039 if ${ac_cv_search_fdatasync+:} false; then :
8040   $as_echo_n "(cached) " >&6
8041 else
8042   ac_func_search_save_LIBS=$LIBS
8043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8044 /* end confdefs.h.  */
8045
8046 /* Override any GCC internal prototype to avoid an error.
8047    Use char because int might match the return type of a GCC
8048    builtin and then its argument prototype would still apply.  */
8049 #ifdef __cplusplus
8050 extern "C"
8051 #endif
8052 char fdatasync ();
8053 int
8054 main ()
8055 {
8056 return fdatasync ();
8057   ;
8058   return 0;
8059 }
8060 _ACEOF
8061 for ac_lib in '' rt posix4; do
8062   if test -z "$ac_lib"; then
8063     ac_res="none required"
8064   else
8065     ac_res=-l$ac_lib
8066     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8067   fi
8068   if ac_fn_c_try_link "$LINENO"; then :
8069   ac_cv_search_fdatasync=$ac_res
8070 fi
8071 rm -f core conftest.err conftest.$ac_objext \
8072     conftest$ac_exeext
8073   if ${ac_cv_search_fdatasync+:} false; then :
8074   break
8075 fi
8076 done
8077 if ${ac_cv_search_fdatasync+:} false; then :
8078
8079 else
8080   ac_cv_search_fdatasync=no
8081 fi
8082 rm conftest.$ac_ext
8083 LIBS=$ac_func_search_save_LIBS
8084 fi
8085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
8086 $as_echo "$ac_cv_search_fdatasync" >&6; }
8087 ac_res=$ac_cv_search_fdatasync
8088 if test "$ac_res" != no; then :
8089   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8090
8091 fi
8092
8093 # Required for thread_test.c on Solaris 2.5:
8094 # Other ports use it too (HP-UX) so test unconditionally
8095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
8096 $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
8097 if ${ac_cv_search_gethostbyname_r+:} false; then :
8098   $as_echo_n "(cached) " >&6
8099 else
8100   ac_func_search_save_LIBS=$LIBS
8101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8102 /* end confdefs.h.  */
8103
8104 /* Override any GCC internal prototype to avoid an error.
8105    Use char because int might match the return type of a GCC
8106    builtin and then its argument prototype would still apply.  */
8107 #ifdef __cplusplus
8108 extern "C"
8109 #endif
8110 char gethostbyname_r ();
8111 int
8112 main ()
8113 {
8114 return gethostbyname_r ();
8115   ;
8116   return 0;
8117 }
8118 _ACEOF
8119 for ac_lib in '' nsl; do
8120   if test -z "$ac_lib"; then
8121     ac_res="none required"
8122   else
8123     ac_res=-l$ac_lib
8124     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8125   fi
8126   if ac_fn_c_try_link "$LINENO"; then :
8127   ac_cv_search_gethostbyname_r=$ac_res
8128 fi
8129 rm -f core conftest.err conftest.$ac_objext \
8130     conftest$ac_exeext
8131   if ${ac_cv_search_gethostbyname_r+:} false; then :
8132   break
8133 fi
8134 done
8135 if ${ac_cv_search_gethostbyname_r+:} false; then :
8136
8137 else
8138   ac_cv_search_gethostbyname_r=no
8139 fi
8140 rm conftest.$ac_ext
8141 LIBS=$ac_func_search_save_LIBS
8142 fi
8143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
8144 $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
8145 ac_res=$ac_cv_search_gethostbyname_r
8146 if test "$ac_res" != no; then :
8147   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8148
8149 fi
8150
8151 # Cygwin:
8152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
8153 $as_echo_n "checking for library containing shmget... " >&6; }
8154 if ${ac_cv_search_shmget+:} false; then :
8155   $as_echo_n "(cached) " >&6
8156 else
8157   ac_func_search_save_LIBS=$LIBS
8158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8159 /* end confdefs.h.  */
8160
8161 /* Override any GCC internal prototype to avoid an error.
8162    Use char because int might match the return type of a GCC
8163    builtin and then its argument prototype would still apply.  */
8164 #ifdef __cplusplus
8165 extern "C"
8166 #endif
8167 char shmget ();
8168 int
8169 main ()
8170 {
8171 return shmget ();
8172   ;
8173   return 0;
8174 }
8175 _ACEOF
8176 for ac_lib in '' cygipc; do
8177   if test -z "$ac_lib"; then
8178     ac_res="none required"
8179   else
8180     ac_res=-l$ac_lib
8181     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8182   fi
8183   if ac_fn_c_try_link "$LINENO"; then :
8184   ac_cv_search_shmget=$ac_res
8185 fi
8186 rm -f core conftest.err conftest.$ac_objext \
8187     conftest$ac_exeext
8188   if ${ac_cv_search_shmget+:} false; then :
8189   break
8190 fi
8191 done
8192 if ${ac_cv_search_shmget+:} false; then :
8193
8194 else
8195   ac_cv_search_shmget=no
8196 fi
8197 rm conftest.$ac_ext
8198 LIBS=$ac_func_search_save_LIBS
8199 fi
8200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
8201 $as_echo "$ac_cv_search_shmget" >&6; }
8202 ac_res=$ac_cv_search_shmget
8203 if test "$ac_res" != no; then :
8204   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8205
8206 fi
8207
8208
8209 if test "$with_readline" = yes; then
8210
8211
8212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
8213 $as_echo_n "checking for library containing readline... " >&6; }
8214 if ${pgac_cv_check_readline+:} false; then :
8215   $as_echo_n "(cached) " >&6
8216 else
8217   pgac_cv_check_readline=no
8218 pgac_save_LIBS=$LIBS
8219 if test x"$with_libedit_preferred" != x"yes"
8220 then    READLINE_ORDER="-lreadline -ledit"
8221 else    READLINE_ORDER="-ledit -lreadline"
8222 fi
8223 for pgac_rllib in $READLINE_ORDER ; do
8224   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
8225     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
8226     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8227 /* end confdefs.h.  */
8228
8229 /* Override any GCC internal prototype to avoid an error.
8230    Use char because int might match the return type of a GCC
8231    builtin and then its argument prototype would still apply.  */
8232 #ifdef __cplusplus
8233 extern "C"
8234 #endif
8235 char readline ();
8236 int
8237 main ()
8238 {
8239 return readline ();
8240   ;
8241   return 0;
8242 }
8243 _ACEOF
8244 if ac_fn_c_try_link "$LINENO"; then :
8245
8246       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
8247       # recognize dependent libraries; assume curses is needed if we didn't
8248       # find any dependency.
8249       case $host_os in
8250         netbsd* | openbsd* | irix*)
8251           if test x"$pgac_lib" = x"" ; then
8252             pgac_lib=" -lcurses"
8253           fi ;;
8254       esac
8255
8256       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
8257       break
8258
8259 fi
8260 rm -f core conftest.err conftest.$ac_objext \
8261     conftest$ac_exeext conftest.$ac_ext
8262   done
8263   if test "$pgac_cv_check_readline" != no ; then
8264     break
8265   fi
8266 done
8267 LIBS=$pgac_save_LIBS
8268
8269 fi
8270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
8271 $as_echo "$pgac_cv_check_readline" >&6; }
8272 if test "$pgac_cv_check_readline" != no ; then
8273   LIBS="$pgac_cv_check_readline $LIBS"
8274
8275 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
8276
8277 fi
8278
8279
8280   if test x"$pgac_cv_check_readline" = x"no"; then
8281     as_fn_error $? "readline library not found
8282 If you have readline already installed, see config.log for details on the
8283 failure.  It is possible the compiler isn't looking in the proper directory.
8284 Use --without-readline to disable readline support." "$LINENO" 5
8285   fi
8286 fi
8287
8288 if test "$with_zlib" = yes; then
8289   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
8290 $as_echo_n "checking for inflate in -lz... " >&6; }
8291 if ${ac_cv_lib_z_inflate+:} false; then :
8292   $as_echo_n "(cached) " >&6
8293 else
8294   ac_check_lib_save_LIBS=$LIBS
8295 LIBS="-lz  $LIBS"
8296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8297 /* end confdefs.h.  */
8298
8299 /* Override any GCC internal prototype to avoid an error.
8300    Use char because int might match the return type of a GCC
8301    builtin and then its argument prototype would still apply.  */
8302 #ifdef __cplusplus
8303 extern "C"
8304 #endif
8305 char inflate ();
8306 int
8307 main ()
8308 {
8309 return inflate ();
8310   ;
8311   return 0;
8312 }
8313 _ACEOF
8314 if ac_fn_c_try_link "$LINENO"; then :
8315   ac_cv_lib_z_inflate=yes
8316 else
8317   ac_cv_lib_z_inflate=no
8318 fi
8319 rm -f core conftest.err conftest.$ac_objext \
8320     conftest$ac_exeext conftest.$ac_ext
8321 LIBS=$ac_check_lib_save_LIBS
8322 fi
8323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
8324 $as_echo "$ac_cv_lib_z_inflate" >&6; }
8325 if test "x$ac_cv_lib_z_inflate" = xyes; then :
8326   cat >>confdefs.h <<_ACEOF
8327 #define HAVE_LIBZ 1
8328 _ACEOF
8329
8330   LIBS="-lz $LIBS"
8331
8332 else
8333   as_fn_error $? "zlib library not found
8334 If you have zlib already installed, see config.log for details on the
8335 failure.  It is possible the compiler isn't looking in the proper directory.
8336 Use --without-zlib to disable zlib support." "$LINENO" 5
8337 fi
8338
8339 fi
8340
8341 if test "$enable_spinlocks" = yes; then
8342
8343 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
8344
8345 else
8346   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
8347 *** Not using spinlocks will cause poor performance." >&5
8348 $as_echo "$as_me: WARNING:
8349 *** Not using spinlocks will cause poor performance." >&2;}
8350 fi
8351
8352 if test "$with_gssapi" = yes ; then
8353   if test "$PORTNAME" != "win32"; then
8354     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
8355 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
8356 if ${ac_cv_search_gss_init_sec_context+:} false; then :
8357   $as_echo_n "(cached) " >&6
8358 else
8359   ac_func_search_save_LIBS=$LIBS
8360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8361 /* end confdefs.h.  */
8362
8363 /* Override any GCC internal prototype to avoid an error.
8364    Use char because int might match the return type of a GCC
8365    builtin and then its argument prototype would still apply.  */
8366 #ifdef __cplusplus
8367 extern "C"
8368 #endif
8369 char gss_init_sec_context ();
8370 int
8371 main ()
8372 {
8373 return gss_init_sec_context ();
8374   ;
8375   return 0;
8376 }
8377 _ACEOF
8378 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
8379   if test -z "$ac_lib"; then
8380     ac_res="none required"
8381   else
8382     ac_res=-l$ac_lib
8383     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8384   fi
8385   if ac_fn_c_try_link "$LINENO"; then :
8386   ac_cv_search_gss_init_sec_context=$ac_res
8387 fi
8388 rm -f core conftest.err conftest.$ac_objext \
8389     conftest$ac_exeext
8390   if ${ac_cv_search_gss_init_sec_context+:} false; then :
8391   break
8392 fi
8393 done
8394 if ${ac_cv_search_gss_init_sec_context+:} false; then :
8395
8396 else
8397   ac_cv_search_gss_init_sec_context=no
8398 fi
8399 rm conftest.$ac_ext
8400 LIBS=$ac_func_search_save_LIBS
8401 fi
8402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
8403 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
8404 ac_res=$ac_cv_search_gss_init_sec_context
8405 if test "$ac_res" != no; then :
8406   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8407
8408 else
8409   as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
8410 fi
8411
8412   else
8413     LIBS="$LIBS -lgssapi32"
8414   fi
8415 fi
8416
8417 if test "$with_openssl" = yes ; then
8418     if test "$PORTNAME" != "win32"; then
8419      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
8420 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
8421 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
8422   $as_echo_n "(cached) " >&6
8423 else
8424   ac_check_lib_save_LIBS=$LIBS
8425 LIBS="-lcrypto  $LIBS"
8426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8427 /* end confdefs.h.  */
8428
8429 /* Override any GCC internal prototype to avoid an error.
8430    Use char because int might match the return type of a GCC
8431    builtin and then its argument prototype would still apply.  */
8432 #ifdef __cplusplus
8433 extern "C"
8434 #endif
8435 char CRYPTO_new_ex_data ();
8436 int
8437 main ()
8438 {
8439 return CRYPTO_new_ex_data ();
8440   ;
8441   return 0;
8442 }
8443 _ACEOF
8444 if ac_fn_c_try_link "$LINENO"; then :
8445   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
8446 else
8447   ac_cv_lib_crypto_CRYPTO_new_ex_data=no
8448 fi
8449 rm -f core conftest.err conftest.$ac_objext \
8450     conftest$ac_exeext conftest.$ac_ext
8451 LIBS=$ac_check_lib_save_LIBS
8452 fi
8453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
8454 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
8455 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
8456   cat >>confdefs.h <<_ACEOF
8457 #define HAVE_LIBCRYPTO 1
8458 _ACEOF
8459
8460   LIBS="-lcrypto $LIBS"
8461
8462 else
8463   as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
8464 fi
8465
8466      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5
8467 $as_echo_n "checking for SSL_library_init in -lssl... " >&6; }
8468 if ${ac_cv_lib_ssl_SSL_library_init+:} false; then :
8469   $as_echo_n "(cached) " >&6
8470 else
8471   ac_check_lib_save_LIBS=$LIBS
8472 LIBS="-lssl  $LIBS"
8473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8474 /* end confdefs.h.  */
8475
8476 /* Override any GCC internal prototype to avoid an error.
8477    Use char because int might match the return type of a GCC
8478    builtin and then its argument prototype would still apply.  */
8479 #ifdef __cplusplus
8480 extern "C"
8481 #endif
8482 char SSL_library_init ();
8483 int
8484 main ()
8485 {
8486 return SSL_library_init ();
8487   ;
8488   return 0;
8489 }
8490 _ACEOF
8491 if ac_fn_c_try_link "$LINENO"; then :
8492   ac_cv_lib_ssl_SSL_library_init=yes
8493 else
8494   ac_cv_lib_ssl_SSL_library_init=no
8495 fi
8496 rm -f core conftest.err conftest.$ac_objext \
8497     conftest$ac_exeext conftest.$ac_ext
8498 LIBS=$ac_check_lib_save_LIBS
8499 fi
8500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_library_init" >&5
8501 $as_echo "$ac_cv_lib_ssl_SSL_library_init" >&6; }
8502 if test "x$ac_cv_lib_ssl_SSL_library_init" = xyes; then :
8503   cat >>confdefs.h <<_ACEOF
8504 #define HAVE_LIBSSL 1
8505 _ACEOF
8506
8507   LIBS="-lssl $LIBS"
8508
8509 else
8510   as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
8511 fi
8512
8513   else
8514      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
8515 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
8516 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
8517   $as_echo_n "(cached) " >&6
8518 else
8519   ac_func_search_save_LIBS=$LIBS
8520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8521 /* end confdefs.h.  */
8522
8523 /* Override any GCC internal prototype to avoid an error.
8524    Use char because int might match the return type of a GCC
8525    builtin and then its argument prototype would still apply.  */
8526 #ifdef __cplusplus
8527 extern "C"
8528 #endif
8529 char CRYPTO_new_ex_data ();
8530 int
8531 main ()
8532 {
8533 return CRYPTO_new_ex_data ();
8534   ;
8535   return 0;
8536 }
8537 _ACEOF
8538 for ac_lib in '' eay32 crypto; do
8539   if test -z "$ac_lib"; then
8540     ac_res="none required"
8541   else
8542     ac_res=-l$ac_lib
8543     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8544   fi
8545   if ac_fn_c_try_link "$LINENO"; then :
8546   ac_cv_search_CRYPTO_new_ex_data=$ac_res
8547 fi
8548 rm -f core conftest.err conftest.$ac_objext \
8549     conftest$ac_exeext
8550   if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
8551   break
8552 fi
8553 done
8554 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
8555
8556 else
8557   ac_cv_search_CRYPTO_new_ex_data=no
8558 fi
8559 rm conftest.$ac_ext
8560 LIBS=$ac_func_search_save_LIBS
8561 fi
8562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
8563 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
8564 ac_res=$ac_cv_search_CRYPTO_new_ex_data
8565 if test "$ac_res" != no; then :
8566   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8567
8568 else
8569   as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
8570 fi
8571
8572      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_library_init" >&5
8573 $as_echo_n "checking for library containing SSL_library_init... " >&6; }
8574 if ${ac_cv_search_SSL_library_init+:} false; then :
8575   $as_echo_n "(cached) " >&6
8576 else
8577   ac_func_search_save_LIBS=$LIBS
8578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8579 /* end confdefs.h.  */
8580
8581 /* Override any GCC internal prototype to avoid an error.
8582    Use char because int might match the return type of a GCC
8583    builtin and then its argument prototype would still apply.  */
8584 #ifdef __cplusplus
8585 extern "C"
8586 #endif
8587 char SSL_library_init ();
8588 int
8589 main ()
8590 {
8591 return SSL_library_init ();
8592   ;
8593   return 0;
8594 }
8595 _ACEOF
8596 for ac_lib in '' ssleay32 ssl; do
8597   if test -z "$ac_lib"; then
8598     ac_res="none required"
8599   else
8600     ac_res=-l$ac_lib
8601     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8602   fi
8603   if ac_fn_c_try_link "$LINENO"; then :
8604   ac_cv_search_SSL_library_init=$ac_res
8605 fi
8606 rm -f core conftest.err conftest.$ac_objext \
8607     conftest$ac_exeext
8608   if ${ac_cv_search_SSL_library_init+:} false; then :
8609   break
8610 fi
8611 done
8612 if ${ac_cv_search_SSL_library_init+:} false; then :
8613
8614 else
8615   ac_cv_search_SSL_library_init=no
8616 fi
8617 rm conftest.$ac_ext
8618 LIBS=$ac_func_search_save_LIBS
8619 fi
8620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_library_init" >&5
8621 $as_echo "$ac_cv_search_SSL_library_init" >&6; }
8622 ac_res=$ac_cv_search_SSL_library_init
8623 if test "$ac_res" != no; then :
8624   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8625
8626 else
8627   as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
8628 fi
8629
8630   fi
8631   for ac_func in SSL_get_current_compression
8632 do :
8633   ac_fn_c_check_func "$LINENO" "SSL_get_current_compression" "ac_cv_func_SSL_get_current_compression"
8634 if test "x$ac_cv_func_SSL_get_current_compression" = xyes; then :
8635   cat >>confdefs.h <<_ACEOF
8636 #define HAVE_SSL_GET_CURRENT_COMPRESSION 1
8637 _ACEOF
8638
8639 fi
8640 done
8641
8642 fi
8643
8644 if test "$with_pam" = yes ; then
8645   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
8646 $as_echo_n "checking for pam_start in -lpam... " >&6; }
8647 if ${ac_cv_lib_pam_pam_start+:} false; then :
8648   $as_echo_n "(cached) " >&6
8649 else
8650   ac_check_lib_save_LIBS=$LIBS
8651 LIBS="-lpam  $LIBS"
8652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8653 /* end confdefs.h.  */
8654
8655 /* Override any GCC internal prototype to avoid an error.
8656    Use char because int might match the return type of a GCC
8657    builtin and then its argument prototype would still apply.  */
8658 #ifdef __cplusplus
8659 extern "C"
8660 #endif
8661 char pam_start ();
8662 int
8663 main ()
8664 {
8665 return pam_start ();
8666   ;
8667   return 0;
8668 }
8669 _ACEOF
8670 if ac_fn_c_try_link "$LINENO"; then :
8671   ac_cv_lib_pam_pam_start=yes
8672 else
8673   ac_cv_lib_pam_pam_start=no
8674 fi
8675 rm -f core conftest.err conftest.$ac_objext \
8676     conftest$ac_exeext conftest.$ac_ext
8677 LIBS=$ac_check_lib_save_LIBS
8678 fi
8679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
8680 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
8681 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
8682   cat >>confdefs.h <<_ACEOF
8683 #define HAVE_LIBPAM 1
8684 _ACEOF
8685
8686   LIBS="-lpam $LIBS"
8687
8688 else
8689   as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
8690 fi
8691
8692 fi
8693
8694 if test "$with_libxml" = yes ; then
8695   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
8696 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
8697 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
8698   $as_echo_n "(cached) " >&6
8699 else
8700   ac_check_lib_save_LIBS=$LIBS
8701 LIBS="-lxml2  $LIBS"
8702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8703 /* end confdefs.h.  */
8704
8705 /* Override any GCC internal prototype to avoid an error.
8706    Use char because int might match the return type of a GCC
8707    builtin and then its argument prototype would still apply.  */
8708 #ifdef __cplusplus
8709 extern "C"
8710 #endif
8711 char xmlSaveToBuffer ();
8712 int
8713 main ()
8714 {
8715 return xmlSaveToBuffer ();
8716   ;
8717   return 0;
8718 }
8719 _ACEOF
8720 if ac_fn_c_try_link "$LINENO"; then :
8721   ac_cv_lib_xml2_xmlSaveToBuffer=yes
8722 else
8723   ac_cv_lib_xml2_xmlSaveToBuffer=no
8724 fi
8725 rm -f core conftest.err conftest.$ac_objext \
8726     conftest$ac_exeext conftest.$ac_ext
8727 LIBS=$ac_check_lib_save_LIBS
8728 fi
8729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
8730 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
8731 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
8732   cat >>confdefs.h <<_ACEOF
8733 #define HAVE_LIBXML2 1
8734 _ACEOF
8735
8736   LIBS="-lxml2 $LIBS"
8737
8738 else
8739   as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
8740 fi
8741
8742 fi
8743
8744 if test "$with_libxslt" = yes ; then
8745   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
8746 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
8747 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
8748   $as_echo_n "(cached) " >&6
8749 else
8750   ac_check_lib_save_LIBS=$LIBS
8751 LIBS="-lxslt  $LIBS"
8752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8753 /* end confdefs.h.  */
8754
8755 /* Override any GCC internal prototype to avoid an error.
8756    Use char because int might match the return type of a GCC
8757    builtin and then its argument prototype would still apply.  */
8758 #ifdef __cplusplus
8759 extern "C"
8760 #endif
8761 char xsltCleanupGlobals ();
8762 int
8763 main ()
8764 {
8765 return xsltCleanupGlobals ();
8766   ;
8767   return 0;
8768 }
8769 _ACEOF
8770 if ac_fn_c_try_link "$LINENO"; then :
8771   ac_cv_lib_xslt_xsltCleanupGlobals=yes
8772 else
8773   ac_cv_lib_xslt_xsltCleanupGlobals=no
8774 fi
8775 rm -f core conftest.err conftest.$ac_objext \
8776     conftest$ac_exeext conftest.$ac_ext
8777 LIBS=$ac_check_lib_save_LIBS
8778 fi
8779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
8780 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
8781 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
8782   cat >>confdefs.h <<_ACEOF
8783 #define HAVE_LIBXSLT 1
8784 _ACEOF
8785
8786   LIBS="-lxslt $LIBS"
8787
8788 else
8789   as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
8790 fi
8791
8792 fi
8793
8794 # for contrib/sepgsql
8795 if test "$with_selinux" = yes; then
8796   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
8797 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
8798 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
8799   $as_echo_n "(cached) " >&6
8800 else
8801   ac_check_lib_save_LIBS=$LIBS
8802 LIBS="-lselinux  $LIBS"
8803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8804 /* end confdefs.h.  */
8805
8806 /* Override any GCC internal prototype to avoid an error.
8807    Use char because int might match the return type of a GCC
8808    builtin and then its argument prototype would still apply.  */
8809 #ifdef __cplusplus
8810 extern "C"
8811 #endif
8812 char security_compute_create_name ();
8813 int
8814 main ()
8815 {
8816 return security_compute_create_name ();
8817   ;
8818   return 0;
8819 }
8820 _ACEOF
8821 if ac_fn_c_try_link "$LINENO"; then :
8822   ac_cv_lib_selinux_security_compute_create_name=yes
8823 else
8824   ac_cv_lib_selinux_security_compute_create_name=no
8825 fi
8826 rm -f core conftest.err conftest.$ac_objext \
8827     conftest$ac_exeext conftest.$ac_ext
8828 LIBS=$ac_check_lib_save_LIBS
8829 fi
8830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
8831 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
8832 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
8833   cat >>confdefs.h <<_ACEOF
8834 #define HAVE_LIBSELINUX 1
8835 _ACEOF
8836
8837   LIBS="-lselinux $LIBS"
8838
8839 else
8840   as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
8841 fi
8842
8843 fi
8844
8845 # for contrib/uuid-ossp
8846 if test "$with_uuid" = bsd ; then
8847   # On BSD, the UUID functions are in libc
8848   ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
8849 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
8850   UUID_LIBS=""
8851 else
8852   as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
8853 fi
8854
8855 elif test "$with_uuid" = e2fs ; then
8856   # On OS X, the UUID functions are in libc
8857   ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
8858 if test "x$ac_cv_func_uuid_generate" = xyes; then :
8859   UUID_LIBS=""
8860 else
8861   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
8862 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
8863 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
8864   $as_echo_n "(cached) " >&6
8865 else
8866   ac_check_lib_save_LIBS=$LIBS
8867 LIBS="-luuid  $LIBS"
8868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8869 /* end confdefs.h.  */
8870
8871 /* Override any GCC internal prototype to avoid an error.
8872    Use char because int might match the return type of a GCC
8873    builtin and then its argument prototype would still apply.  */
8874 #ifdef __cplusplus
8875 extern "C"
8876 #endif
8877 char uuid_generate ();
8878 int
8879 main ()
8880 {
8881 return uuid_generate ();
8882   ;
8883   return 0;
8884 }
8885 _ACEOF
8886 if ac_fn_c_try_link "$LINENO"; then :
8887   ac_cv_lib_uuid_uuid_generate=yes
8888 else
8889   ac_cv_lib_uuid_uuid_generate=no
8890 fi
8891 rm -f core conftest.err conftest.$ac_objext \
8892     conftest$ac_exeext conftest.$ac_ext
8893 LIBS=$ac_check_lib_save_LIBS
8894 fi
8895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
8896 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
8897 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
8898   UUID_LIBS="-luuid"
8899 else
8900   as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
8901 fi
8902
8903 fi
8904
8905 elif test "$with_uuid" = ossp ; then
8906   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
8907 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
8908 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
8909   $as_echo_n "(cached) " >&6
8910 else
8911   ac_check_lib_save_LIBS=$LIBS
8912 LIBS="-lossp-uuid  $LIBS"
8913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8914 /* end confdefs.h.  */
8915
8916 /* Override any GCC internal prototype to avoid an error.
8917    Use char because int might match the return type of a GCC
8918    builtin and then its argument prototype would still apply.  */
8919 #ifdef __cplusplus
8920 extern "C"
8921 #endif
8922 char uuid_export ();
8923 int
8924 main ()
8925 {
8926 return uuid_export ();
8927   ;
8928   return 0;
8929 }
8930 _ACEOF
8931 if ac_fn_c_try_link "$LINENO"; then :
8932   ac_cv_lib_ossp_uuid_uuid_export=yes
8933 else
8934   ac_cv_lib_ossp_uuid_uuid_export=no
8935 fi
8936 rm -f core conftest.err conftest.$ac_objext \
8937     conftest$ac_exeext conftest.$ac_ext
8938 LIBS=$ac_check_lib_save_LIBS
8939 fi
8940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
8941 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
8942 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
8943   UUID_LIBS="-lossp-uuid"
8944 else
8945   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
8946 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
8947 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
8948   $as_echo_n "(cached) " >&6
8949 else
8950   ac_check_lib_save_LIBS=$LIBS
8951 LIBS="-luuid  $LIBS"
8952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8953 /* end confdefs.h.  */
8954
8955 /* Override any GCC internal prototype to avoid an error.
8956    Use char because int might match the return type of a GCC
8957    builtin and then its argument prototype would still apply.  */
8958 #ifdef __cplusplus
8959 extern "C"
8960 #endif
8961 char uuid_export ();
8962 int
8963 main ()
8964 {
8965 return uuid_export ();
8966   ;
8967   return 0;
8968 }
8969 _ACEOF
8970 if ac_fn_c_try_link "$LINENO"; then :
8971   ac_cv_lib_uuid_uuid_export=yes
8972 else
8973   ac_cv_lib_uuid_uuid_export=no
8974 fi
8975 rm -f core conftest.err conftest.$ac_objext \
8976     conftest$ac_exeext conftest.$ac_ext
8977 LIBS=$ac_check_lib_save_LIBS
8978 fi
8979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
8980 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
8981 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
8982   UUID_LIBS="-luuid"
8983 else
8984   as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
8985 fi
8986
8987 fi
8988
8989 fi
8990
8991
8992
8993 ##
8994 ## Header files
8995 ##
8996
8997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
8998 $as_echo_n "checking for ANSI C header files... " >&6; }
8999 if ${ac_cv_header_stdc+:} false; then :
9000   $as_echo_n "(cached) " >&6
9001 else
9002   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9003 /* end confdefs.h.  */
9004 #include <stdlib.h>
9005 #include <stdarg.h>
9006 #include <string.h>
9007 #include <float.h>
9008
9009 int
9010 main ()
9011 {
9012
9013   ;
9014   return 0;
9015 }
9016 _ACEOF
9017 if ac_fn_c_try_compile "$LINENO"; then :
9018   ac_cv_header_stdc=yes
9019 else
9020   ac_cv_header_stdc=no
9021 fi
9022 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9023
9024 if test $ac_cv_header_stdc = yes; then
9025   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9026   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9027 /* end confdefs.h.  */
9028 #include <string.h>
9029
9030 _ACEOF
9031 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9032   $EGREP "memchr" >/dev/null 2>&1; then :
9033
9034 else
9035   ac_cv_header_stdc=no
9036 fi
9037 rm -f conftest*
9038
9039 fi
9040
9041 if test $ac_cv_header_stdc = yes; then
9042   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9043   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9044 /* end confdefs.h.  */
9045 #include <stdlib.h>
9046
9047 _ACEOF
9048 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9049   $EGREP "free" >/dev/null 2>&1; then :
9050
9051 else
9052   ac_cv_header_stdc=no
9053 fi
9054 rm -f conftest*
9055
9056 fi
9057
9058 if test $ac_cv_header_stdc = yes; then
9059   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9060   if test "$cross_compiling" = yes; then :
9061   :
9062 else
9063   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9064 /* end confdefs.h.  */
9065 #include <ctype.h>
9066 #include <stdlib.h>
9067 #if ((' ' & 0x0FF) == 0x020)
9068 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9069 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9070 #else
9071 # define ISLOWER(c) \
9072                    (('a' <= (c) && (c) <= 'i') \
9073                      || ('j' <= (c) && (c) <= 'r') \
9074                      || ('s' <= (c) && (c) <= 'z'))
9075 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9076 #endif
9077
9078 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9079 int
9080 main ()
9081 {
9082   int i;
9083   for (i = 0; i < 256; i++)
9084     if (XOR (islower (i), ISLOWER (i))
9085         || toupper (i) != TOUPPER (i))
9086       return 2;
9087   return 0;
9088 }
9089 _ACEOF
9090 if ac_fn_c_try_run "$LINENO"; then :
9091
9092 else
9093   ac_cv_header_stdc=no
9094 fi
9095 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9096   conftest.$ac_objext conftest.beam conftest.$ac_ext
9097 fi
9098
9099 fi
9100 fi
9101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
9102 $as_echo "$ac_cv_header_stdc" >&6; }
9103 if test $ac_cv_header_stdc = yes; then
9104
9105 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
9106
9107 fi
9108
9109 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
9110 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
9111                   inttypes.h stdint.h unistd.h
9112 do :
9113   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9114 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
9115 "
9116 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9117   cat >>confdefs.h <<_ACEOF
9118 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9119 _ACEOF
9120
9121 fi
9122
9123 done
9124
9125
9126 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
9127 do :
9128   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9129 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9130 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9131   cat >>confdefs.h <<_ACEOF
9132 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9133 _ACEOF
9134
9135 fi
9136
9137 done
9138
9139
9140 # On BSD, test for net/if.h will fail unless sys/socket.h
9141 # is included first.
9142 for ac_header in net/if.h
9143 do :
9144   ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
9145 #ifdef HAVE_SYS_SOCKET_H
9146 #include <sys/socket.h>
9147 #endif
9148
9149 "
9150 if test "x$ac_cv_header_net_if_h" = xyes; then :
9151   cat >>confdefs.h <<_ACEOF
9152 #define HAVE_NET_IF_H 1
9153 _ACEOF
9154
9155 fi
9156
9157 done
9158
9159
9160 # On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
9161 # is included first.
9162 for ac_header in sys/ucred.h
9163 do :
9164   ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
9165 #include <sys/param.h>
9166
9167 "
9168 if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
9169   cat >>confdefs.h <<_ACEOF
9170 #define HAVE_SYS_UCRED_H 1
9171 _ACEOF
9172
9173 fi
9174
9175 done
9176
9177
9178 # At least on IRIX, test for netinet/tcp.h will fail unless
9179 # netinet/in.h is included first.
9180 for ac_header in netinet/in.h
9181 do :
9182   ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
9183 if test "x$ac_cv_header_netinet_in_h" = xyes; then :
9184   cat >>confdefs.h <<_ACEOF
9185 #define HAVE_NETINET_IN_H 1
9186 _ACEOF
9187
9188 fi
9189
9190 done
9191
9192 for ac_header in netinet/tcp.h
9193 do :
9194   ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
9195 #ifdef HAVE_NETINET_IN_H
9196 #include <netinet/in.h>
9197 #endif
9198
9199 "
9200 if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
9201   cat >>confdefs.h <<_ACEOF
9202 #define HAVE_NETINET_TCP_H 1
9203 _ACEOF
9204
9205 fi
9206
9207 done
9208
9209
9210 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
9211   for ac_header in readline/readline.h
9212 do :
9213   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
9214 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
9215   cat >>confdefs.h <<_ACEOF
9216 #define HAVE_READLINE_READLINE_H 1
9217 _ACEOF
9218
9219 else
9220   for ac_header in readline.h
9221 do :
9222   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
9223 if test "x$ac_cv_header_readline_h" = xyes; then :
9224   cat >>confdefs.h <<_ACEOF
9225 #define HAVE_READLINE_H 1
9226 _ACEOF
9227
9228 else
9229   as_fn_error $? "readline header not found
9230 If you have readline already installed, see config.log for details on the
9231 failure.  It is possible the compiler isn't looking in the proper directory.
9232 Use --without-readline to disable readline support." "$LINENO" 5
9233 fi
9234
9235 done
9236
9237 fi
9238
9239 done
9240
9241   for ac_header in readline/history.h
9242 do :
9243   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
9244 if test "x$ac_cv_header_readline_history_h" = xyes; then :
9245   cat >>confdefs.h <<_ACEOF
9246 #define HAVE_READLINE_HISTORY_H 1
9247 _ACEOF
9248
9249 else
9250   for ac_header in history.h
9251 do :
9252   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
9253 if test "x$ac_cv_header_history_h" = xyes; then :
9254   cat >>confdefs.h <<_ACEOF
9255 #define HAVE_HISTORY_H 1
9256 _ACEOF
9257
9258 else
9259   as_fn_error $? "history header not found
9260 If you have readline already installed, see config.log for details on the
9261 failure.  It is possible the compiler isn't looking in the proper directory.
9262 Use --without-readline to disable readline support." "$LINENO" 5
9263 fi
9264
9265 done
9266
9267 fi
9268
9269 done
9270
9271 fi
9272
9273 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
9274 # Some installations of libedit usurp /usr/include/readline/, which seems
9275 # bad practice, since in combined installations readline will have its headers
9276 # there.  We might have to resort to AC_EGREP checks to make sure we found
9277 # the proper header...
9278   for ac_header in editline/readline.h
9279 do :
9280   ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
9281 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
9282   cat >>confdefs.h <<_ACEOF
9283 #define HAVE_EDITLINE_READLINE_H 1
9284 _ACEOF
9285
9286 else
9287   for ac_header in readline.h
9288 do :
9289   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
9290 if test "x$ac_cv_header_readline_h" = xyes; then :
9291   cat >>confdefs.h <<_ACEOF
9292 #define HAVE_READLINE_H 1
9293 _ACEOF
9294
9295 else
9296   for ac_header in readline/readline.h
9297 do :
9298   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
9299 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
9300   cat >>confdefs.h <<_ACEOF
9301 #define HAVE_READLINE_READLINE_H 1
9302 _ACEOF
9303
9304 else
9305   as_fn_error $? "readline header not found
9306 If you have libedit already installed, see config.log for details on the
9307 failure.  It is possible the compiler isn't looking in the proper directory.
9308 Use --without-readline to disable libedit support." "$LINENO" 5
9309 fi
9310
9311 done
9312
9313 fi
9314
9315 done
9316
9317 fi
9318
9319 done
9320
9321 # Note: in a libedit installation, history.h is sometimes a dummy, and may
9322 # not be there at all.  Hence, don't complain if not found.  We must check
9323 # though, since in yet other versions it is an independent header.
9324   for ac_header in editline/history.h
9325 do :
9326   ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
9327 if test "x$ac_cv_header_editline_history_h" = xyes; then :
9328   cat >>confdefs.h <<_ACEOF
9329 #define HAVE_EDITLINE_HISTORY_H 1
9330 _ACEOF
9331
9332 else
9333   for ac_header in history.h
9334 do :
9335   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
9336 if test "x$ac_cv_header_history_h" = xyes; then :
9337   cat >>confdefs.h <<_ACEOF
9338 #define HAVE_HISTORY_H 1
9339 _ACEOF
9340
9341 else
9342   for ac_header in readline/history.h
9343 do :
9344   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
9345 if test "x$ac_cv_header_readline_history_h" = xyes; then :
9346   cat >>confdefs.h <<_ACEOF
9347 #define HAVE_READLINE_HISTORY_H 1
9348 _ACEOF
9349
9350 fi
9351
9352 done
9353
9354 fi
9355
9356 done
9357
9358 fi
9359
9360 done
9361
9362 fi
9363
9364 if test "$with_zlib" = yes; then
9365   ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
9366 if test "x$ac_cv_header_zlib_h" = xyes; then :
9367
9368 else
9369   as_fn_error $? "zlib header not found
9370 If you have zlib already installed, see config.log for details on the
9371 failure.  It is possible the compiler isn't looking in the proper directory.
9372 Use --without-zlib to disable zlib support." "$LINENO" 5
9373 fi
9374
9375
9376 fi
9377
9378 if test "$with_gssapi" = yes ; then
9379   for ac_header in gssapi/gssapi.h
9380 do :
9381   ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
9382 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
9383   cat >>confdefs.h <<_ACEOF
9384 #define HAVE_GSSAPI_GSSAPI_H 1
9385 _ACEOF
9386
9387 else
9388   for ac_header in gssapi.h
9389 do :
9390   ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
9391 if test "x$ac_cv_header_gssapi_h" = xyes; then :
9392   cat >>confdefs.h <<_ACEOF
9393 #define HAVE_GSSAPI_H 1
9394 _ACEOF
9395
9396 else
9397   as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
9398 fi
9399
9400 done
9401
9402 fi
9403
9404 done
9405
9406 fi
9407
9408 if test "$with_openssl" = yes ; then
9409   ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
9410 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
9411
9412 else
9413   as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
9414 fi
9415
9416
9417   ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
9418 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
9419
9420 else
9421   as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
9422 fi
9423
9424
9425 fi
9426
9427 if test "$with_pam" = yes ; then
9428   for ac_header in security/pam_appl.h
9429 do :
9430   ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
9431 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
9432   cat >>confdefs.h <<_ACEOF
9433 #define HAVE_SECURITY_PAM_APPL_H 1
9434 _ACEOF
9435
9436 else
9437   for ac_header in pam/pam_appl.h
9438 do :
9439   ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
9440 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
9441   cat >>confdefs.h <<_ACEOF
9442 #define HAVE_PAM_PAM_APPL_H 1
9443 _ACEOF
9444
9445 else
9446   as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
9447 fi
9448
9449 done
9450
9451 fi
9452
9453 done
9454
9455 fi
9456
9457 if test "$with_libxml" = yes ; then
9458   ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
9459 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
9460
9461 else
9462   as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
9463 fi
9464
9465
9466 fi
9467
9468 if test "$with_libxslt" = yes ; then
9469   ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
9470 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
9471
9472 else
9473   as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
9474 fi
9475
9476
9477 fi
9478
9479 if test "$with_ldap" = yes ; then
9480   if test "$PORTNAME" != "win32"; then
9481      for ac_header in ldap.h
9482 do :
9483   ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
9484 if test "x$ac_cv_header_ldap_h" = xyes; then :
9485   cat >>confdefs.h <<_ACEOF
9486 #define HAVE_LDAP_H 1
9487 _ACEOF
9488
9489 else
9490   as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
9491 fi
9492
9493 done
9494
9495      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
9496 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
9497 if ${pgac_cv_ldap_safe+:} false; then :
9498   $as_echo_n "(cached) " >&6
9499 else
9500   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9501 /* end confdefs.h.  */
9502 #include <ldap.h>
9503 #if !defined(LDAP_VENDOR_VERSION) || \
9504      (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
9505       LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
9506 choke me
9507 #endif
9508 int
9509 main ()
9510 {
9511
9512   ;
9513   return 0;
9514 }
9515 _ACEOF
9516 if ac_fn_c_try_compile "$LINENO"; then :
9517   pgac_cv_ldap_safe=yes
9518 else
9519   pgac_cv_ldap_safe=no
9520 fi
9521 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9522 fi
9523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
9524 $as_echo "$pgac_cv_ldap_safe" >&6; }
9525
9526 if test "$pgac_cv_ldap_safe" != yes; then
9527   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9528 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
9529 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
9530 *** also uses LDAP will crash on exit." >&5
9531 $as_echo "$as_me: WARNING:
9532 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
9533 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
9534 *** also uses LDAP will crash on exit." >&2;}
9535 fi
9536   else
9537      for ac_header in winldap.h
9538 do :
9539   ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
9540 #include <windows.h>
9541
9542 "
9543 if test "x$ac_cv_header_winldap_h" = xyes; then :
9544   cat >>confdefs.h <<_ACEOF
9545 #define HAVE_WINLDAP_H 1
9546 _ACEOF
9547
9548 else
9549   as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
9550 fi
9551
9552 done
9553
9554   fi
9555 fi
9556
9557 if test "$with_bonjour" = yes ; then
9558   ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
9559 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
9560
9561 else
9562   as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
9563 fi
9564
9565
9566 fi
9567
9568 # for contrib/uuid-ossp
9569 if test "$with_uuid" = bsd ; then
9570   for ac_header in uuid.h
9571 do :
9572   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
9573 if test "x$ac_cv_header_uuid_h" = xyes; then :
9574   cat >>confdefs.h <<_ACEOF
9575 #define HAVE_UUID_H 1
9576 _ACEOF
9577  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9578 /* end confdefs.h.  */
9579 #include <uuid.h>
9580
9581 _ACEOF
9582 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9583   $EGREP "uuid_to_string" >/dev/null 2>&1; then :
9584
9585 else
9586   as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
9587 fi
9588 rm -f conftest*
9589
9590 else
9591   as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
9592 fi
9593
9594 done
9595
9596 elif test "$with_uuid" = e2fs ; then
9597   for ac_header in uuid/uuid.h
9598 do :
9599   ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
9600 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
9601   cat >>confdefs.h <<_ACEOF
9602 #define HAVE_UUID_UUID_H 1
9603 _ACEOF
9604  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9605 /* end confdefs.h.  */
9606 #include <uuid/uuid.h>
9607
9608 _ACEOF
9609 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9610   $EGREP "uuid_generate" >/dev/null 2>&1; then :
9611
9612 else
9613   as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
9614 fi
9615 rm -f conftest*
9616
9617 else
9618   for ac_header in uuid.h
9619 do :
9620   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
9621 if test "x$ac_cv_header_uuid_h" = xyes; then :
9622   cat >>confdefs.h <<_ACEOF
9623 #define HAVE_UUID_H 1
9624 _ACEOF
9625  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9626 /* end confdefs.h.  */
9627 #include <uuid.h>
9628
9629 _ACEOF
9630 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9631   $EGREP "uuid_generate" >/dev/null 2>&1; then :
9632
9633 else
9634   as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
9635 fi
9636 rm -f conftest*
9637
9638 else
9639   as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
9640 fi
9641
9642 done
9643
9644 fi
9645
9646 done
9647
9648 elif test "$with_uuid" = ossp ; then
9649   for ac_header in ossp/uuid.h
9650 do :
9651   ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
9652 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
9653   cat >>confdefs.h <<_ACEOF
9654 #define HAVE_OSSP_UUID_H 1
9655 _ACEOF
9656  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9657 /* end confdefs.h.  */
9658 #include <ossp/uuid.h>
9659
9660 _ACEOF
9661 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9662   $EGREP "uuid_export" >/dev/null 2>&1; then :
9663
9664 else
9665   as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
9666 fi
9667 rm -f conftest*
9668
9669 else
9670   for ac_header in uuid.h
9671 do :
9672   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
9673 if test "x$ac_cv_header_uuid_h" = xyes; then :
9674   cat >>confdefs.h <<_ACEOF
9675 #define HAVE_UUID_H 1
9676 _ACEOF
9677  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9678 /* end confdefs.h.  */
9679 #include <uuid.h>
9680
9681 _ACEOF
9682 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9683   $EGREP "uuid_export" >/dev/null 2>&1; then :
9684
9685 else
9686   as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
9687 fi
9688 rm -f conftest*
9689
9690 else
9691   as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
9692 fi
9693
9694 done
9695
9696 fi
9697
9698 done
9699
9700 fi
9701
9702 if test "$PORTNAME" = "win32" ; then
9703    for ac_header in crtdefs.h
9704 do :
9705   ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
9706 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
9707   cat >>confdefs.h <<_ACEOF
9708 #define HAVE_CRTDEFS_H 1
9709 _ACEOF
9710
9711 fi
9712
9713 done
9714
9715 fi
9716
9717 ##
9718 ## Types, structures, compiler characteristics
9719 ##
9720
9721   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
9722 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
9723 if ${ac_cv_c_bigendian+:} false; then :
9724   $as_echo_n "(cached) " >&6
9725 else
9726   ac_cv_c_bigendian=unknown
9727     # See if we're dealing with a universal compiler.
9728     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9729 /* end confdefs.h.  */
9730 #ifndef __APPLE_CC__
9731                not a universal capable compiler
9732              #endif
9733              typedef int dummy;
9734
9735 _ACEOF
9736 if ac_fn_c_try_compile "$LINENO"; then :
9737
9738         # Check for potential -arch flags.  It is not universal unless
9739         # there are at least two -arch flags with different values.
9740         ac_arch=
9741         ac_prev=
9742         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
9743          if test -n "$ac_prev"; then
9744            case $ac_word in
9745              i?86 | x86_64 | ppc | ppc64)
9746                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
9747                  ac_arch=$ac_word
9748                else
9749                  ac_cv_c_bigendian=universal
9750                  break
9751                fi
9752                ;;
9753            esac
9754            ac_prev=
9755          elif test "x$ac_word" = "x-arch"; then
9756            ac_prev=arch
9757          fi
9758        done
9759 fi
9760 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9761     if test $ac_cv_c_bigendian = unknown; then
9762       # See if sys/param.h defines the BYTE_ORDER macro.
9763       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9764 /* end confdefs.h.  */
9765 #include <sys/types.h>
9766              #include <sys/param.h>
9767
9768 int
9769 main ()
9770 {
9771 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
9772                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
9773                      && LITTLE_ENDIAN)
9774               bogus endian macros
9775              #endif
9776
9777   ;
9778   return 0;
9779 }
9780 _ACEOF
9781 if ac_fn_c_try_compile "$LINENO"; then :
9782   # It does; now see whether it defined to BIG_ENDIAN or not.
9783          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9784 /* end confdefs.h.  */
9785 #include <sys/types.h>
9786                 #include <sys/param.h>
9787
9788 int
9789 main ()
9790 {
9791 #if BYTE_ORDER != BIG_ENDIAN
9792                  not big endian
9793                 #endif
9794
9795   ;
9796   return 0;
9797 }
9798 _ACEOF
9799 if ac_fn_c_try_compile "$LINENO"; then :
9800   ac_cv_c_bigendian=yes
9801 else
9802   ac_cv_c_bigendian=no
9803 fi
9804 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9805 fi
9806 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9807     fi
9808     if test $ac_cv_c_bigendian = unknown; then
9809       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
9810       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9811 /* end confdefs.h.  */
9812 #include <limits.h>
9813
9814 int
9815 main ()
9816 {
9817 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
9818               bogus endian macros
9819              #endif
9820
9821   ;
9822   return 0;
9823 }
9824 _ACEOF
9825 if ac_fn_c_try_compile "$LINENO"; then :
9826   # It does; now see whether it defined to _BIG_ENDIAN or not.
9827          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9828 /* end confdefs.h.  */
9829 #include <limits.h>
9830
9831 int
9832 main ()
9833 {
9834 #ifndef _BIG_ENDIAN
9835                  not big endian
9836                 #endif
9837
9838   ;
9839   return 0;
9840 }
9841 _ACEOF
9842 if ac_fn_c_try_compile "$LINENO"; then :
9843   ac_cv_c_bigendian=yes
9844 else
9845   ac_cv_c_bigendian=no
9846 fi
9847 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9848 fi
9849 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9850     fi
9851     if test $ac_cv_c_bigendian = unknown; then
9852       # Compile a test program.
9853       if test "$cross_compiling" = yes; then :
9854   # Try to guess by grepping values from an object file.
9855          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9856 /* end confdefs.h.  */
9857 short int ascii_mm[] =
9858                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
9859                 short int ascii_ii[] =
9860                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9861                 int use_ascii (int i) {
9862                   return ascii_mm[i] + ascii_ii[i];
9863                 }
9864                 short int ebcdic_ii[] =
9865                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
9866                 short int ebcdic_mm[] =
9867                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9868                 int use_ebcdic (int i) {
9869                   return ebcdic_mm[i] + ebcdic_ii[i];
9870                 }
9871                 extern int foo;
9872
9873 int
9874 main ()
9875 {
9876 return use_ascii (foo) == use_ebcdic (foo);
9877   ;
9878   return 0;
9879 }
9880 _ACEOF
9881 if ac_fn_c_try_compile "$LINENO"; then :
9882   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
9883               ac_cv_c_bigendian=yes
9884             fi
9885             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
9886               if test "$ac_cv_c_bigendian" = unknown; then
9887                 ac_cv_c_bigendian=no
9888               else
9889                 # finding both strings is unlikely to happen, but who knows?
9890                 ac_cv_c_bigendian=unknown
9891               fi
9892             fi
9893 fi
9894 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9895 else
9896   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9897 /* end confdefs.h.  */
9898 $ac_includes_default
9899 int
9900 main ()
9901 {
9902
9903              /* Are we little or big endian?  From Harbison&Steele.  */
9904              union
9905              {
9906                long int l;
9907                char c[sizeof (long int)];
9908              } u;
9909              u.l = 1;
9910              return u.c[sizeof (long int) - 1] == 1;
9911
9912   ;
9913   return 0;
9914 }
9915 _ACEOF
9916 if ac_fn_c_try_run "$LINENO"; then :
9917   ac_cv_c_bigendian=no
9918 else
9919   ac_cv_c_bigendian=yes
9920 fi
9921 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9922   conftest.$ac_objext conftest.beam conftest.$ac_ext
9923 fi
9924
9925     fi
9926 fi
9927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
9928 $as_echo "$ac_cv_c_bigendian" >&6; }
9929  case $ac_cv_c_bigendian in #(
9930    yes)
9931      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
9932 ;; #(
9933    no)
9934       ;; #(
9935    universal)
9936
9937 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
9938
9939      ;; #(
9940    *)
9941      as_fn_error $? "unknown endianness
9942  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
9943  esac
9944
9945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
9946 $as_echo_n "checking for inline... " >&6; }
9947 if ${ac_cv_c_inline+:} false; then :
9948   $as_echo_n "(cached) " >&6
9949 else
9950   ac_cv_c_inline=no
9951 for ac_kw in inline __inline__ __inline; do
9952   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9953 /* end confdefs.h.  */
9954 #ifndef __cplusplus
9955 typedef int foo_t;
9956 static $ac_kw foo_t static_foo () {return 0; }
9957 $ac_kw foo_t foo () {return 0; }
9958 #endif
9959
9960 _ACEOF
9961 if ac_fn_c_try_compile "$LINENO"; then :
9962   ac_cv_c_inline=$ac_kw
9963 fi
9964 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9965   test "$ac_cv_c_inline" != no && break
9966 done
9967
9968 fi
9969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
9970 $as_echo "$ac_cv_c_inline" >&6; }
9971
9972 case $ac_cv_c_inline in
9973   inline | yes) ;;
9974   *)
9975     case $ac_cv_c_inline in
9976       no) ac_val=;;
9977       *) ac_val=$ac_cv_c_inline;;
9978     esac
9979     cat >>confdefs.h <<_ACEOF
9980 #ifndef __cplusplus
9981 #define inline $ac_val
9982 #endif
9983 _ACEOF
9984     ;;
9985 esac
9986
9987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for quiet inline (no complaint if unreferenced)" >&5
9988 $as_echo_n "checking for quiet inline (no complaint if unreferenced)... " >&6; }
9989 if ${pgac_cv_c_inline_quietly+:} false; then :
9990   $as_echo_n "(cached) " >&6
9991 else
9992   pgac_cv_c_inline_quietly=no
9993   if test "$ac_cv_c_inline" != no; then
9994     pgac_c_inline_save_werror=$ac_c_werror_flag
9995     ac_c_werror_flag=yes
9996     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9997 /* end confdefs.h.  */
9998 #include "$srcdir/config/test_quiet_include.h"
9999 int
10000 main ()
10001 {
10002
10003   ;
10004   return 0;
10005 }
10006 _ACEOF
10007 if ac_fn_c_try_link "$LINENO"; then :
10008   pgac_cv_c_inline_quietly=yes
10009 fi
10010 rm -f core conftest.err conftest.$ac_objext \
10011     conftest$ac_exeext conftest.$ac_ext
10012     ac_c_werror_flag=$pgac_c_inline_save_werror
10013   fi
10014 fi
10015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_inline_quietly" >&5
10016 $as_echo "$pgac_cv_c_inline_quietly" >&6; }
10017 if test "$pgac_cv_c_inline_quietly" != no; then
10018
10019 cat >>confdefs.h <<_ACEOF
10020 #define PG_USE_INLINE 1
10021 _ACEOF
10022
10023 fi
10024
10025
10026   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array members" >&5
10027 $as_echo_n "checking for flexible array members... " >&6; }
10028 if ${ac_cv_c_flexmember+:} false; then :
10029   $as_echo_n "(cached) " >&6
10030 else
10031   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10032 /* end confdefs.h.  */
10033 #include <stdlib.h>
10034             #include <stdio.h>
10035             #include <stddef.h>
10036             struct s { int n; double d[]; };
10037 int
10038 main ()
10039 {
10040 int m = getchar ();
10041             struct s *p = malloc (offsetof (struct s, d)
10042                                   + m * sizeof (double));
10043             p->d[0] = 0.0;
10044             return p->d != (double *) NULL;
10045   ;
10046   return 0;
10047 }
10048 _ACEOF
10049 if ac_fn_c_try_compile "$LINENO"; then :
10050   ac_cv_c_flexmember=yes
10051 else
10052   ac_cv_c_flexmember=no
10053 fi
10054 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10055 fi
10056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
10057 $as_echo "$ac_cv_c_flexmember" >&6; }
10058   if test $ac_cv_c_flexmember = yes; then
10059
10060 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
10061
10062   else
10063     $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
10064
10065   fi
10066
10067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed types" >&5
10068 $as_echo_n "checking for signed types... " >&6; }
10069 if ${pgac_cv_c_signed+:} false; then :
10070   $as_echo_n "(cached) " >&6
10071 else
10072   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10073 /* end confdefs.h.  */
10074
10075 int
10076 main ()
10077 {
10078 signed char c; signed short s; signed int i;
10079   ;
10080   return 0;
10081 }
10082 _ACEOF
10083 if ac_fn_c_try_compile "$LINENO"; then :
10084   pgac_cv_c_signed=yes
10085 else
10086   pgac_cv_c_signed=no
10087 fi
10088 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10089 fi
10090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_signed" >&5
10091 $as_echo "$pgac_cv_c_signed" >&6; }
10092 if test x"$pgac_cv_c_signed" = xno ; then
10093
10094 $as_echo "#define signed /**/" >>confdefs.h
10095
10096 fi
10097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5
10098 $as_echo_n "checking for __func__... " >&6; }
10099 if ${pgac_cv_funcname_func_support+:} false; then :
10100   $as_echo_n "(cached) " >&6
10101 else
10102   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10103 /* end confdefs.h.  */
10104 #include <stdio.h>
10105 int
10106 main ()
10107 {
10108 printf("%s\n", __func__);
10109   ;
10110   return 0;
10111 }
10112 _ACEOF
10113 if ac_fn_c_try_compile "$LINENO"; then :
10114   pgac_cv_funcname_func_support=yes
10115 else
10116   pgac_cv_funcname_func_support=no
10117 fi
10118 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10119 fi
10120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_func_support" >&5
10121 $as_echo "$pgac_cv_funcname_func_support" >&6; }
10122 if test x"$pgac_cv_funcname_func_support" = xyes ; then
10123
10124 $as_echo "#define HAVE_FUNCNAME__FUNC 1" >>confdefs.h
10125
10126 else
10127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__" >&5
10128 $as_echo_n "checking for __FUNCTION__... " >&6; }
10129 if ${pgac_cv_funcname_function_support+:} false; then :
10130   $as_echo_n "(cached) " >&6
10131 else
10132   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10133 /* end confdefs.h.  */
10134 #include <stdio.h>
10135 int
10136 main ()
10137 {
10138 printf("%s\n", __FUNCTION__);
10139   ;
10140   return 0;
10141 }
10142 _ACEOF
10143 if ac_fn_c_try_compile "$LINENO"; then :
10144   pgac_cv_funcname_function_support=yes
10145 else
10146   pgac_cv_funcname_function_support=no
10147 fi
10148 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10149 fi
10150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_function_support" >&5
10151 $as_echo "$pgac_cv_funcname_function_support" >&6; }
10152 if test x"$pgac_cv_funcname_function_support" = xyes ; then
10153
10154 $as_echo "#define HAVE_FUNCNAME__FUNCTION 1" >>confdefs.h
10155
10156 fi
10157 fi
10158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
10159 $as_echo_n "checking for _Static_assert... " >&6; }
10160 if ${pgac_cv__static_assert+:} false; then :
10161   $as_echo_n "(cached) " >&6
10162 else
10163   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10164 /* end confdefs.h.  */
10165
10166 int
10167 main ()
10168 {
10169 ({ _Static_assert(1, "foo"); })
10170   ;
10171   return 0;
10172 }
10173 _ACEOF
10174 if ac_fn_c_try_link "$LINENO"; then :
10175   pgac_cv__static_assert=yes
10176 else
10177   pgac_cv__static_assert=no
10178 fi
10179 rm -f core conftest.err conftest.$ac_objext \
10180     conftest$ac_exeext conftest.$ac_ext
10181 fi
10182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
10183 $as_echo "$pgac_cv__static_assert" >&6; }
10184 if test x"$pgac_cv__static_assert" = xyes ; then
10185
10186 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
10187
10188 fi
10189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
10190 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
10191 if ${pgac_cv__types_compatible+:} false; then :
10192   $as_echo_n "(cached) " >&6
10193 else
10194   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10195 /* end confdefs.h.  */
10196
10197 int
10198 main ()
10199 {
10200  int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
10201   ;
10202   return 0;
10203 }
10204 _ACEOF
10205 if ac_fn_c_try_compile "$LINENO"; then :
10206   pgac_cv__types_compatible=yes
10207 else
10208   pgac_cv__types_compatible=no
10209 fi
10210 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10211 fi
10212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
10213 $as_echo "$pgac_cv__types_compatible" >&6; }
10214 if test x"$pgac_cv__types_compatible" = xyes ; then
10215
10216 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
10217
10218 fi
10219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
10220 $as_echo_n "checking for __builtin_constant_p... " >&6; }
10221 if ${pgac_cv__builtin_constant_p+:} false; then :
10222   $as_echo_n "(cached) " >&6
10223 else
10224   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10225 /* end confdefs.h.  */
10226 static int x; static int y[__builtin_constant_p(x) ? x : 1];
10227 int
10228 main ()
10229 {
10230
10231   ;
10232   return 0;
10233 }
10234 _ACEOF
10235 if ac_fn_c_try_compile "$LINENO"; then :
10236   pgac_cv__builtin_constant_p=yes
10237 else
10238   pgac_cv__builtin_constant_p=no
10239 fi
10240 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10241 fi
10242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
10243 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
10244 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
10245
10246 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
10247
10248 fi
10249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
10250 $as_echo_n "checking for __builtin_unreachable... " >&6; }
10251 if ${pgac_cv__builtin_unreachable+:} false; then :
10252   $as_echo_n "(cached) " >&6
10253 else
10254   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10255 /* end confdefs.h.  */
10256
10257 int
10258 main ()
10259 {
10260 __builtin_unreachable();
10261   ;
10262   return 0;
10263 }
10264 _ACEOF
10265 if ac_fn_c_try_link "$LINENO"; then :
10266   pgac_cv__builtin_unreachable=yes
10267 else
10268   pgac_cv__builtin_unreachable=no
10269 fi
10270 rm -f core conftest.err conftest.$ac_objext \
10271     conftest$ac_exeext conftest.$ac_ext
10272 fi
10273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
10274 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
10275 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
10276
10277 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
10278
10279 fi
10280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __VA_ARGS__" >&5
10281 $as_echo_n "checking for __VA_ARGS__... " >&6; }
10282 if ${pgac_cv__va_args+:} false; then :
10283   $as_echo_n "(cached) " >&6
10284 else
10285   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10286 /* end confdefs.h.  */
10287 #include <stdio.h>
10288 int
10289 main ()
10290 {
10291 #define debug(...) fprintf(stderr, __VA_ARGS__)
10292 debug("%s", "blarg");
10293
10294   ;
10295   return 0;
10296 }
10297 _ACEOF
10298 if ac_fn_c_try_compile "$LINENO"; then :
10299   pgac_cv__va_args=yes
10300 else
10301   pgac_cv__va_args=no
10302 fi
10303 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10304 fi
10305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__va_args" >&5
10306 $as_echo "$pgac_cv__va_args" >&6; }
10307 if test x"$pgac_cv__va_args" = xyes ; then
10308
10309 $as_echo "#define HAVE__VA_ARGS 1" >>confdefs.h
10310
10311 fi
10312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10313 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
10314 if ${ac_cv_struct_tm+:} false; then :
10315   $as_echo_n "(cached) " >&6
10316 else
10317   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10318 /* end confdefs.h.  */
10319 #include <sys/types.h>
10320 #include <time.h>
10321
10322 int
10323 main ()
10324 {
10325 struct tm tm;
10326                                      int *p = &tm.tm_sec;
10327                                      return !p;
10328   ;
10329   return 0;
10330 }
10331 _ACEOF
10332 if ac_fn_c_try_compile "$LINENO"; then :
10333   ac_cv_struct_tm=time.h
10334 else
10335   ac_cv_struct_tm=sys/time.h
10336 fi
10337 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10338 fi
10339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10340 $as_echo "$ac_cv_struct_tm" >&6; }
10341 if test $ac_cv_struct_tm = sys/time.h; then
10342
10343 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
10344
10345 fi
10346
10347 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
10348 #include <$ac_cv_struct_tm>
10349
10350 "
10351 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
10352
10353 cat >>confdefs.h <<_ACEOF
10354 #define HAVE_STRUCT_TM_TM_ZONE 1
10355 _ACEOF
10356
10357
10358 fi
10359
10360 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10361
10362 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
10363
10364 fi
10365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10366 $as_echo_n "checking for tzname... " >&6; }
10367 if ${ac_cv_var_tzname+:} false; then :
10368   $as_echo_n "(cached) " >&6
10369 else
10370   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10371 /* end confdefs.h.  */
10372 #include <time.h>
10373 #ifndef tzname /* For SGI.  */
10374 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
10375 #endif
10376
10377 int
10378 main ()
10379 {
10380 atoi(*tzname);
10381   ;
10382   return 0;
10383 }
10384 _ACEOF
10385 if ac_fn_c_try_link "$LINENO"; then :
10386   ac_cv_var_tzname=yes
10387 else
10388   ac_cv_var_tzname=no
10389 fi
10390 rm -f core conftest.err conftest.$ac_objext \
10391     conftest$ac_exeext conftest.$ac_ext
10392 fi
10393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10394 $as_echo "$ac_cv_var_tzname" >&6; }
10395 if test $ac_cv_var_tzname = yes; then
10396
10397 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
10398
10399 fi
10400
10401 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
10402 #include <sys/ipc.h>
10403 #include <sys/sem.h>
10404 "
10405 if test "x$ac_cv_type_union_semun" = xyes; then :
10406
10407 cat >>confdefs.h <<_ACEOF
10408 #define HAVE_UNION_SEMUN 1
10409 _ACEOF
10410
10411
10412 fi
10413
10414 ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
10415 #ifdef HAVE_SYS_UN_H
10416 #include <sys/un.h>
10417 #endif
10418
10419 "
10420 if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
10421
10422 $as_echo "#define HAVE_UNIX_SOCKETS 1" >>confdefs.h
10423
10424 fi
10425
10426 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
10427 #ifdef HAVE_SYS_SOCKET_H
10428 #include <sys/socket.h>
10429 #endif
10430
10431 "
10432 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
10433
10434 cat >>confdefs.h <<_ACEOF
10435 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
10436 _ACEOF
10437
10438
10439 fi
10440
10441 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
10442 #ifdef HAVE_SYS_SOCKET_H
10443 #include <sys/socket.h>
10444 #endif
10445
10446 "
10447 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
10448
10449 cat >>confdefs.h <<_ACEOF
10450 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
10451 _ACEOF
10452
10453
10454 fi
10455 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
10456 #ifdef HAVE_SYS_SOCKET_H
10457 #include <sys/socket.h>
10458 #endif
10459
10460 "
10461 if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
10462
10463 cat >>confdefs.h <<_ACEOF
10464 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
10465 _ACEOF
10466
10467
10468 fi
10469 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
10470 #ifdef HAVE_SYS_SOCKET_H
10471 #include <sys/socket.h>
10472 #endif
10473
10474 "
10475 if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
10476
10477 cat >>confdefs.h <<_ACEOF
10478 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
10479 _ACEOF
10480
10481
10482 fi
10483 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
10484 #ifdef HAVE_SYS_SOCKET_H
10485 #include <sys/socket.h>
10486 #endif
10487
10488 "
10489 if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
10490
10491 cat >>confdefs.h <<_ACEOF
10492 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
10493 _ACEOF
10494
10495
10496 fi
10497 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
10498 #ifdef HAVE_SYS_SOCKET_H
10499 #include <sys/socket.h>
10500 #endif
10501
10502 "
10503 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
10504
10505 cat >>confdefs.h <<_ACEOF
10506 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
10507 _ACEOF
10508
10509
10510 fi
10511
10512 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include <sys/types.h>
10513 #include <sys/socket.h>
10514 #include <netdb.h>
10515
10516 "
10517 if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
10518
10519 cat >>confdefs.h <<_ACEOF
10520 #define HAVE_STRUCT_ADDRINFO 1
10521 _ACEOF
10522
10523
10524 fi
10525
10526
10527   ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
10528 if test "x$ac_cv_type_intptr_t" = xyes; then :
10529
10530 $as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
10531
10532 else
10533   for ac_type in 'int' 'long int' 'long long int'; do
10534        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10535 /* end confdefs.h.  */
10536 $ac_includes_default
10537 int
10538 main ()
10539 {
10540 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
10541 test_array [0] = 0;
10542 return test_array [0];
10543
10544   ;
10545   return 0;
10546 }
10547 _ACEOF
10548 if ac_fn_c_try_compile "$LINENO"; then :
10549
10550 cat >>confdefs.h <<_ACEOF
10551 #define intptr_t $ac_type
10552 _ACEOF
10553
10554           ac_type=
10555 fi
10556 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10557        test -z "$ac_type" && break
10558      done
10559 fi
10560
10561
10562
10563   ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
10564 if test "x$ac_cv_type_uintptr_t" = xyes; then :
10565
10566 $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
10567
10568 else
10569   for ac_type in 'unsigned int' 'unsigned long int' \
10570         'unsigned long long int'; do
10571        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10572 /* end confdefs.h.  */
10573 $ac_includes_default
10574 int
10575 main ()
10576 {
10577 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
10578 test_array [0] = 0;
10579 return test_array [0];
10580
10581   ;
10582   return 0;
10583 }
10584 _ACEOF
10585 if ac_fn_c_try_compile "$LINENO"; then :
10586
10587 cat >>confdefs.h <<_ACEOF
10588 #define uintptr_t $ac_type
10589 _ACEOF
10590
10591           ac_type=
10592 fi
10593 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10594        test -z "$ac_type" && break
10595      done
10596 fi
10597
10598
10599
10600   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
10601 $as_echo_n "checking for unsigned long long int... " >&6; }
10602 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
10603   $as_echo_n "(cached) " >&6
10604 else
10605   ac_cv_type_unsigned_long_long_int=yes
10606      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
10607        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10608 /* end confdefs.h.  */
10609
10610   /* For now, do not test the preprocessor; as of 2007 there are too many
10611          implementations with broken preprocessors.  Perhaps this can
10612          be revisited in 2012.  In the meantime, code should not expect
10613          #if to work with literals wider than 32 bits.  */
10614       /* Test literals.  */
10615       long long int ll = 9223372036854775807ll;
10616       long long int nll = -9223372036854775807LL;
10617       unsigned long long int ull = 18446744073709551615ULL;
10618       /* Test constant expressions.   */
10619       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
10620                      ? 1 : -1)];
10621       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
10622                      ? 1 : -1)];
10623       int i = 63;
10624 int
10625 main ()
10626 {
10627 /* Test availability of runtime routines for shift and division.  */
10628       long long int llmax = 9223372036854775807ll;
10629       unsigned long long int ullmax = 18446744073709551615ull;
10630       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
10631               | (llmax / ll) | (llmax % ll)
10632               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
10633               | (ullmax / ull) | (ullmax % ull));
10634   ;
10635   return 0;
10636 }
10637
10638 _ACEOF
10639 if ac_fn_c_try_link "$LINENO"; then :
10640
10641 else
10642   ac_cv_type_unsigned_long_long_int=no
10643 fi
10644 rm -f core conftest.err conftest.$ac_objext \
10645     conftest$ac_exeext conftest.$ac_ext
10646      fi
10647 fi
10648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
10649 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
10650   if test $ac_cv_type_unsigned_long_long_int = yes; then
10651
10652 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
10653
10654   fi
10655
10656
10657
10658   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
10659 $as_echo_n "checking for long long int... " >&6; }
10660 if ${ac_cv_type_long_long_int+:} false; then :
10661   $as_echo_n "(cached) " >&6
10662 else
10663   ac_cv_type_long_long_int=yes
10664       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
10665         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
10666         if test $ac_cv_type_long_long_int = yes; then
10667                                   if test "$cross_compiling" = yes; then :
10668   :
10669 else
10670   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10671 /* end confdefs.h.  */
10672 #include <limits.h>
10673                  #ifndef LLONG_MAX
10674                  # define HALF \
10675                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
10676                  # define LLONG_MAX (HALF - 1 + HALF)
10677                  #endif
10678 int
10679 main ()
10680 {
10681 long long int n = 1;
10682                  int i;
10683                  for (i = 0; ; i++)
10684                    {
10685                      long long int m = n << i;
10686                      if (m >> i != n)
10687                        return 1;
10688                      if (LLONG_MAX / 2 < m)
10689                        break;
10690                    }
10691                  return 0;
10692   ;
10693   return 0;
10694 }
10695 _ACEOF
10696 if ac_fn_c_try_run "$LINENO"; then :
10697
10698 else
10699   ac_cv_type_long_long_int=no
10700 fi
10701 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10702   conftest.$ac_objext conftest.beam conftest.$ac_ext
10703 fi
10704
10705         fi
10706       fi
10707 fi
10708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
10709 $as_echo "$ac_cv_type_long_long_int" >&6; }
10710   if test $ac_cv_type_long_long_int = yes; then
10711
10712 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
10713
10714   fi
10715
10716
10717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
10718 $as_echo_n "checking for locale_t... " >&6; }
10719 if ${pgac_cv_type_locale_t+:} false; then :
10720   $as_echo_n "(cached) " >&6
10721 else
10722   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10723 /* end confdefs.h.  */
10724 #include <locale.h>
10725 locale_t x;
10726 int
10727 main ()
10728 {
10729
10730   ;
10731   return 0;
10732 }
10733 _ACEOF
10734 if ac_fn_c_try_compile "$LINENO"; then :
10735   pgac_cv_type_locale_t=yes
10736 else
10737   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10738 /* end confdefs.h.  */
10739 #include <xlocale.h>
10740 locale_t x;
10741 int
10742 main ()
10743 {
10744
10745   ;
10746   return 0;
10747 }
10748 _ACEOF
10749 if ac_fn_c_try_compile "$LINENO"; then :
10750   pgac_cv_type_locale_t='yes (in xlocale.h)'
10751 else
10752   pgac_cv_type_locale_t=no
10753 fi
10754 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10755 fi
10756 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10757 fi
10758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
10759 $as_echo "$pgac_cv_type_locale_t" >&6; }
10760 if test "$pgac_cv_type_locale_t" != no; then
10761
10762 $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
10763
10764 fi
10765 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
10766
10767 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
10768
10769 fi
10770
10771 ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
10772 #include <sys/param.h>
10773 #ifdef HAVE_SYS_UCRED_H
10774 #include <sys/ucred.h>
10775 #endif
10776 "
10777 if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
10778
10779 cat >>confdefs.h <<_ACEOF
10780 #define HAVE_STRUCT_CMSGCRED 1
10781 _ACEOF
10782
10783
10784 fi
10785
10786
10787 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
10788 #include <getopt.h>
10789 #endif
10790 "
10791 if test "x$ac_cv_type_struct_option" = xyes; then :
10792
10793 cat >>confdefs.h <<_ACEOF
10794 #define HAVE_STRUCT_OPTION 1
10795 _ACEOF
10796
10797
10798 fi
10799
10800
10801 if test "$with_zlib" = yes; then
10802   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
10803   # did not).  While we could work around the lack of z_streamp, it
10804   # seems unwise to encourage people to use such old zlib versions...
10805   ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
10806 "
10807 if test "x$ac_cv_type_z_streamp" = xyes; then :
10808
10809 else
10810   as_fn_error $? "zlib version is too old
10811 Use --without-zlib to disable zlib support." "$LINENO" 5
10812 fi
10813
10814 fi
10815
10816 # On PPC, check if assembler supports LWARX instruction's mutex hint bit
10817 case $host_cpu in
10818   ppc*|powerpc*)
10819     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports lwarx hint bit" >&5
10820 $as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
10821     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10822 /* end confdefs.h.  */
10823
10824 int
10825 main ()
10826 {
10827 int a = 0; int *p = &a; int r;
10828          __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
10829   ;
10830   return 0;
10831 }
10832 _ACEOF
10833 if ac_fn_c_try_compile "$LINENO"; then :
10834   pgac_cv_have_ppc_mutex_hint=yes
10835 else
10836   pgac_cv_have_ppc_mutex_hint=no
10837 fi
10838 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10839     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_ppc_mutex_hint" >&5
10840 $as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
10841     if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
10842
10843 $as_echo "#define HAVE_PPC_LWARX_MUTEX_HINT 1" >>confdefs.h
10844
10845     fi
10846   ;;
10847 esac
10848
10849 # Check largefile support.  You might think this is a system service not a
10850 # compiler characteristic, but you'd be wrong.  We must check this before
10851 # probing existence of related functions such as fseeko, since the largefile
10852 # defines can affect what is generated for that.
10853 if test "$PORTNAME" != "win32"; then
10854    # Check whether --enable-largefile was given.
10855 if test "${enable_largefile+set}" = set; then :
10856   enableval=$enable_largefile;
10857 fi
10858
10859 if test "$enable_largefile" != no; then
10860
10861   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
10862 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
10863 if ${ac_cv_sys_largefile_CC+:} false; then :
10864   $as_echo_n "(cached) " >&6
10865 else
10866   ac_cv_sys_largefile_CC=no
10867      if test "$GCC" != yes; then
10868        ac_save_CC=$CC
10869        while :; do
10870          # IRIX 6.2 and later do not support large files by default,
10871          # so use the C compiler's -n32 option if that helps.
10872          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10873 /* end confdefs.h.  */
10874 #include <sys/types.h>
10875  /* Check that off_t can represent 2**63 - 1 correctly.
10876     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10877     since some C++ compilers masquerading as C compilers
10878     incorrectly reject 9223372036854775807.  */
10879 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10880   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10881                        && LARGE_OFF_T % 2147483647 == 1)
10882                       ? 1 : -1];
10883 int
10884 main ()
10885 {
10886
10887   ;
10888   return 0;
10889 }
10890 _ACEOF
10891          if ac_fn_c_try_compile "$LINENO"; then :
10892   break
10893 fi
10894 rm -f core conftest.err conftest.$ac_objext
10895          CC="$CC -n32"
10896          if ac_fn_c_try_compile "$LINENO"; then :
10897   ac_cv_sys_largefile_CC=' -n32'; break
10898 fi
10899 rm -f core conftest.err conftest.$ac_objext
10900          break
10901        done
10902        CC=$ac_save_CC
10903        rm -f conftest.$ac_ext
10904     fi
10905 fi
10906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
10907 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
10908   if test "$ac_cv_sys_largefile_CC" != no; then
10909     CC=$CC$ac_cv_sys_largefile_CC
10910   fi
10911
10912   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
10913 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
10914 if ${ac_cv_sys_file_offset_bits+:} false; then :
10915   $as_echo_n "(cached) " >&6
10916 else
10917   while :; do
10918   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10919 /* end confdefs.h.  */
10920 #include <sys/types.h>
10921  /* Check that off_t can represent 2**63 - 1 correctly.
10922     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10923     since some C++ compilers masquerading as C compilers
10924     incorrectly reject 9223372036854775807.  */
10925 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10926   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10927                        && LARGE_OFF_T % 2147483647 == 1)
10928                       ? 1 : -1];
10929 int
10930 main ()
10931 {
10932
10933   ;
10934   return 0;
10935 }
10936 _ACEOF
10937 if ac_fn_c_try_compile "$LINENO"; then :
10938   ac_cv_sys_file_offset_bits=no; break
10939 fi
10940 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10941   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10942 /* end confdefs.h.  */
10943 #define _FILE_OFFSET_BITS 64
10944 #include <sys/types.h>
10945  /* Check that off_t can represent 2**63 - 1 correctly.
10946     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10947     since some C++ compilers masquerading as C compilers
10948     incorrectly reject 9223372036854775807.  */
10949 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10950   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10951                        && LARGE_OFF_T % 2147483647 == 1)
10952                       ? 1 : -1];
10953 int
10954 main ()
10955 {
10956
10957   ;
10958   return 0;
10959 }
10960 _ACEOF
10961 if ac_fn_c_try_compile "$LINENO"; then :
10962   ac_cv_sys_file_offset_bits=64; break
10963 fi
10964 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10965   ac_cv_sys_file_offset_bits=unknown
10966   break
10967 done
10968 fi
10969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
10970 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
10971 case $ac_cv_sys_file_offset_bits in #(
10972   no | unknown) ;;
10973   *)
10974 cat >>confdefs.h <<_ACEOF
10975 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
10976 _ACEOF
10977 ;;
10978 esac
10979 rm -rf conftest*
10980   if test $ac_cv_sys_file_offset_bits = unknown; then
10981     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
10982 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
10983 if ${ac_cv_sys_large_files+:} false; then :
10984   $as_echo_n "(cached) " >&6
10985 else
10986   while :; do
10987   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10988 /* end confdefs.h.  */
10989 #include <sys/types.h>
10990  /* Check that off_t can represent 2**63 - 1 correctly.
10991     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10992     since some C++ compilers masquerading as C compilers
10993     incorrectly reject 9223372036854775807.  */
10994 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10995   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10996                        && LARGE_OFF_T % 2147483647 == 1)
10997                       ? 1 : -1];
10998 int
10999 main ()
11000 {
11001
11002   ;
11003   return 0;
11004 }
11005 _ACEOF
11006 if ac_fn_c_try_compile "$LINENO"; then :
11007   ac_cv_sys_large_files=no; break
11008 fi
11009 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11010   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11011 /* end confdefs.h.  */
11012 #define _LARGE_FILES 1
11013 #include <sys/types.h>
11014  /* Check that off_t can represent 2**63 - 1 correctly.
11015     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11016     since some C++ compilers masquerading as C compilers
11017     incorrectly reject 9223372036854775807.  */
11018 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11019   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11020                        && LARGE_OFF_T % 2147483647 == 1)
11021                       ? 1 : -1];
11022 int
11023 main ()
11024 {
11025
11026   ;
11027   return 0;
11028 }
11029 _ACEOF
11030 if ac_fn_c_try_compile "$LINENO"; then :
11031   ac_cv_sys_large_files=1; break
11032 fi
11033 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11034   ac_cv_sys_large_files=unknown
11035   break
11036 done
11037 fi
11038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
11039 $as_echo "$ac_cv_sys_large_files" >&6; }
11040 case $ac_cv_sys_large_files in #(
11041   no | unknown) ;;
11042   *)
11043 cat >>confdefs.h <<_ACEOF
11044 #define _LARGE_FILES $ac_cv_sys_large_files
11045 _ACEOF
11046 ;;
11047 esac
11048 rm -rf conftest*
11049   fi
11050
11051
11052 fi
11053
11054
11055 fi
11056
11057 # Check for largefile support (must be after AC_SYS_LARGEFILE)
11058 # The cast to long int works around a bug in the HP C Compiler
11059 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11060 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11061 # This bug is HP SR number 8606223364.
11062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
11063 $as_echo_n "checking size of off_t... " >&6; }
11064 if ${ac_cv_sizeof_off_t+:} false; then :
11065   $as_echo_n "(cached) " >&6
11066 else
11067   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :
11068
11069 else
11070   if test "$ac_cv_type_off_t" = yes; then
11071      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11072 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11073 as_fn_error 77 "cannot compute sizeof (off_t)
11074 See \`config.log' for more details" "$LINENO" 5; }
11075    else
11076      ac_cv_sizeof_off_t=0
11077    fi
11078 fi
11079
11080 fi
11081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
11082 $as_echo "$ac_cv_sizeof_off_t" >&6; }
11083
11084
11085
11086 cat >>confdefs.h <<_ACEOF
11087 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
11088 _ACEOF
11089
11090
11091
11092 # If we don't have largefile support, can't handle segsize >= 2GB.
11093 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
11094    as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
11095 fi
11096
11097
11098 ##
11099 ## Functions, global variables
11100 ##
11101
11102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
11103 $as_echo_n "checking for int timezone... " >&6; }
11104 if ${pgac_cv_var_int_timezone+:} false; then :
11105   $as_echo_n "(cached) " >&6
11106 else
11107   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11108 /* end confdefs.h.  */
11109 #include <time.h>
11110 int res;
11111 int
11112 main ()
11113 {
11114 #ifndef __CYGWIN__
11115 res = timezone / 60;
11116 #else
11117 res = _timezone / 60;
11118 #endif
11119   ;
11120   return 0;
11121 }
11122 _ACEOF
11123 if ac_fn_c_try_link "$LINENO"; then :
11124   pgac_cv_var_int_timezone=yes
11125 else
11126   pgac_cv_var_int_timezone=no
11127 fi
11128 rm -f core conftest.err conftest.$ac_objext \
11129     conftest$ac_exeext conftest.$ac_ext
11130 fi
11131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
11132 $as_echo "$pgac_cv_var_int_timezone" >&6; }
11133 if test x"$pgac_cv_var_int_timezone" = xyes ; then
11134
11135 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
11136
11137 fi
11138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for accept()" >&5
11139 $as_echo_n "checking types of arguments for accept()... " >&6; }
11140  if ${ac_cv_func_accept_return+:} false; then :
11141   $as_echo_n "(cached) " >&6
11142 else
11143    if ${ac_cv_func_accept_arg1+:} false; then :
11144   $as_echo_n "(cached) " >&6
11145 else
11146     if ${ac_cv_func_accept_arg2+:} false; then :
11147   $as_echo_n "(cached) " >&6
11148 else
11149      if ${ac_cv_func_accept_arg3+:} false; then :
11150   $as_echo_n "(cached) " >&6
11151 else
11152       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL' 'SOCKET WSAAPI'; do
11153       for ac_cv_func_accept_arg1 in 'int' 'unsigned int' 'SOCKET'; do
11154        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
11155         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
11156          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11157 /* end confdefs.h.  */
11158 #ifdef HAVE_SYS_TYPES_H
11159 #include <sys/types.h>
11160 #endif
11161 #ifdef HAVE_SYS_SOCKET_H
11162 #include <sys/socket.h>
11163 #endif
11164 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
11165 int
11166 main ()
11167 {
11168
11169   ;
11170   return 0;
11171 }
11172 _ACEOF
11173 if ac_fn_c_try_compile "$LINENO"; then :
11174   ac_not_found=no; break 4
11175 else
11176   ac_not_found=yes
11177 fi
11178 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11179        done
11180       done
11181      done
11182     done
11183     if test "$ac_not_found" = yes; then
11184       as_fn_error $? "could not determine argument types" "$LINENO" 5
11185     fi
11186     if test "$ac_cv_func_accept_arg3" = "void"; then
11187       ac_cv_func_accept_arg3=int
11188     fi
11189
11190 fi
11191
11192 fi
11193
11194 fi
11195
11196 fi
11197  { $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
11198 $as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
11199
11200 cat >>confdefs.h <<_ACEOF
11201 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
11202 _ACEOF
11203
11204
11205 cat >>confdefs.h <<_ACEOF
11206 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
11207 _ACEOF
11208
11209
11210 cat >>confdefs.h <<_ACEOF
11211 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
11212 _ACEOF
11213
11214
11215 cat >>confdefs.h <<_ACEOF
11216 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
11217 _ACEOF
11218
11219
11220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
11221 $as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
11222 if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
11223   $as_echo_n "(cached) " >&6
11224 else
11225   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11226 /* end confdefs.h.  */
11227 #include <sys/time.h>
11228 int
11229 main ()
11230 {
11231 struct timeval *tp;
11232 struct timezone *tzp;
11233 gettimeofday(tp,tzp);
11234   ;
11235   return 0;
11236 }
11237 _ACEOF
11238 if ac_fn_c_try_compile "$LINENO"; then :
11239   pgac_cv_func_gettimeofday_1arg=no
11240 else
11241   pgac_cv_func_gettimeofday_1arg=yes
11242 fi
11243 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11244 fi
11245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5
11246 $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
11247 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
11248
11249 $as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
11250
11251 fi
11252
11253
11254 # Some versions of libedit contain strlcpy(), setproctitle(), and other
11255 # symbols that that library has no business exposing to the world.  Pending
11256 # acquisition of a clue by those developers, ignore libedit (including its
11257 # possible alias of libreadline) while checking for everything else.
11258 LIBS_including_readline="$LIBS"
11259 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
11260
11261 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
11262 do :
11263   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11264 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11265 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11266   cat >>confdefs.h <<_ACEOF
11267 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11268 _ACEOF
11269
11270 fi
11271 done
11272
11273
11274 ac_fn_c_check_func "$LINENO" "fseeko" "ac_cv_func_fseeko"
11275 if test "x$ac_cv_func_fseeko" = xyes; then :
11276   $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
11277
11278 else
11279   case " $LIBOBJS " in
11280   *" fseeko.$ac_objext "* ) ;;
11281   *) LIBOBJS="$LIBOBJS fseeko.$ac_objext"
11282  ;;
11283 esac
11284
11285 fi
11286
11287
11288 case $host_os in
11289         # NetBSD uses a custom fseeko/ftello built on fsetpos/fgetpos
11290         # Mingw uses macros to access Win32 API calls
11291         netbsd*|mingw*)
11292
11293 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
11294
11295                 ac_cv_func_fseeko=yes;;
11296         *)
11297                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
11298 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
11299 if ${ac_cv_sys_largefile_source+:} false; then :
11300   $as_echo_n "(cached) " >&6
11301 else
11302   while :; do
11303   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11304 /* end confdefs.h.  */
11305 #include <sys/types.h> /* for off_t */
11306      #include <stdio.h>
11307 int
11308 main ()
11309 {
11310 int (*fp) (FILE *, off_t, int) = fseeko;
11311      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
11312   ;
11313   return 0;
11314 }
11315 _ACEOF
11316 if ac_fn_c_try_link "$LINENO"; then :
11317   ac_cv_sys_largefile_source=no; break
11318 fi
11319 rm -f core conftest.err conftest.$ac_objext \
11320     conftest$ac_exeext conftest.$ac_ext
11321   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11322 /* end confdefs.h.  */
11323 #define _LARGEFILE_SOURCE 1
11324 #include <sys/types.h> /* for off_t */
11325      #include <stdio.h>
11326 int
11327 main ()
11328 {
11329 int (*fp) (FILE *, off_t, int) = fseeko;
11330      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
11331   ;
11332   return 0;
11333 }
11334 _ACEOF
11335 if ac_fn_c_try_link "$LINENO"; then :
11336   ac_cv_sys_largefile_source=1; break
11337 fi
11338 rm -f core conftest.err conftest.$ac_objext \
11339     conftest$ac_exeext conftest.$ac_ext
11340   ac_cv_sys_largefile_source=unknown
11341   break
11342 done
11343 fi
11344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
11345 $as_echo "$ac_cv_sys_largefile_source" >&6; }
11346 case $ac_cv_sys_largefile_source in #(
11347   no | unknown) ;;
11348   *)
11349 cat >>confdefs.h <<_ACEOF
11350 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
11351 _ACEOF
11352 ;;
11353 esac
11354 rm -rf conftest*
11355
11356 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
11357 # in glibc 2.1.3, but that breaks too many other things.
11358 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
11359 if test $ac_cv_sys_largefile_source != unknown; then
11360
11361 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
11362
11363 fi
11364 ;;
11365 esac
11366
11367 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
11368 # by calling it, 2009-04-02
11369 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
11370 if test "$PORTNAME" != "solaris"; then
11371 for ac_func in posix_fadvise
11372 do :
11373   ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
11374 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
11375   cat >>confdefs.h <<_ACEOF
11376 #define HAVE_POSIX_FADVISE 1
11377 _ACEOF
11378
11379 fi
11380 done
11381
11382 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
11383 "
11384 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
11385   ac_have_decl=1
11386 else
11387   ac_have_decl=0
11388 fi
11389
11390 cat >>confdefs.h <<_ACEOF
11391 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
11392 _ACEOF
11393
11394 fi
11395
11396 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
11397 "
11398 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
11399   ac_have_decl=1
11400 else
11401   ac_have_decl=0
11402 fi
11403
11404 cat >>confdefs.h <<_ACEOF
11405 #define HAVE_DECL_FDATASYNC $ac_have_decl
11406 _ACEOF
11407
11408 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
11409 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
11410   ac_have_decl=1
11411 else
11412   ac_have_decl=0
11413 fi
11414
11415 cat >>confdefs.h <<_ACEOF
11416 #define HAVE_DECL_STRLCAT $ac_have_decl
11417 _ACEOF
11418 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
11419 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
11420   ac_have_decl=1
11421 else
11422   ac_have_decl=0
11423 fi
11424
11425 cat >>confdefs.h <<_ACEOF
11426 #define HAVE_DECL_STRLCPY $ac_have_decl
11427 _ACEOF
11428
11429 # This is probably only present on Darwin, but may as well check always
11430 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
11431 "
11432 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
11433   ac_have_decl=1
11434 else
11435   ac_have_decl=0
11436 fi
11437
11438 cat >>confdefs.h <<_ACEOF
11439 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
11440 _ACEOF
11441
11442
11443 HAVE_IPV6=no
11444 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default
11445 #include <netinet/in.h>
11446 "
11447 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
11448
11449 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
11450
11451          HAVE_IPV6=yes
11452 fi
11453
11454
11455
11456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
11457 $as_echo_n "checking for PS_STRINGS... " >&6; }
11458 if ${pgac_cv_var_PS_STRINGS+:} false; then :
11459   $as_echo_n "(cached) " >&6
11460 else
11461   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11462 /* end confdefs.h.  */
11463 #include <machine/vmparam.h>
11464 #include <sys/exec.h>
11465
11466 int
11467 main ()
11468 {
11469 PS_STRINGS->ps_nargvstr = 1;
11470 PS_STRINGS->ps_argvstr = "foo";
11471   ;
11472   return 0;
11473 }
11474 _ACEOF
11475 if ac_fn_c_try_link "$LINENO"; then :
11476   pgac_cv_var_PS_STRINGS=yes
11477 else
11478   pgac_cv_var_PS_STRINGS=no
11479 fi
11480 rm -f core conftest.err conftest.$ac_objext \
11481     conftest$ac_exeext conftest.$ac_ext
11482 fi
11483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
11484 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
11485 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
11486
11487 $as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
11488
11489 fi
11490
11491
11492 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
11493 # is missing.  Yes, there are machines that have only one.  We may
11494 # also decide to use snprintf.c if snprintf() is present but does not
11495 # have all the features we need --- see below.
11496
11497 if test "$PORTNAME" = "win32"; then
11498   # Win32 gets snprintf.c built unconditionally.
11499   #
11500   # To properly translate all NLS languages strings, we must support the
11501   # *printf() %$ format, which allows *printf() arguments to be selected
11502   # by position in the translated string.
11503   #
11504   # libintl versions < 0.13 use the native *printf() functions, and Win32
11505   # *printf() doesn't understand %$, so we must use our /port versions,
11506   # which do understand %$. libintl versions >= 0.13 include their own
11507   # *printf versions on Win32.  The libintl 0.13 release note text is:
11508   #
11509   #   C format strings with positions, as they arise when a translator
11510   #   needs to reorder a sentence, are now supported on all platforms.
11511   #   On those few platforms (NetBSD and Woe32) for which the native
11512   #   printf()/fprintf()/... functions don't support such format
11513   #   strings, replacements are provided through <libintl.h>.
11514   #
11515   # We could use libintl >= 0.13's *printf() if we were sure that we had
11516   # a litint >= 0.13 at runtime, but seeing that there is no clean way
11517   # to guarantee that, it is best to just use our own, so we are sure to
11518   # get %$ support. In include/port.h we disable the *printf() macros
11519   # that might have been defined by libintl.
11520   #
11521   # We do this unconditionally whether NLS is used or not so we are sure
11522   # that all Win32 libraries and binaries behave the same.
11523   pgac_need_repl_snprintf=yes
11524 else
11525   pgac_need_repl_snprintf=no
11526   for ac_func in snprintf
11527 do :
11528   ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
11529 if test "x$ac_cv_func_snprintf" = xyes; then :
11530   cat >>confdefs.h <<_ACEOF
11531 #define HAVE_SNPRINTF 1
11532 _ACEOF
11533
11534 else
11535   pgac_need_repl_snprintf=yes
11536 fi
11537 done
11538
11539   for ac_func in vsnprintf
11540 do :
11541   ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
11542 if test "x$ac_cv_func_vsnprintf" = xyes; then :
11543   cat >>confdefs.h <<_ACEOF
11544 #define HAVE_VSNPRINTF 1
11545 _ACEOF
11546
11547 else
11548   pgac_need_repl_snprintf=yes
11549 fi
11550 done
11551
11552 fi
11553
11554
11555 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
11556 # include/c.h will provide declarations.  Note this is a separate test
11557 # from whether the functions exist in the C library --- there are
11558 # systems that have the functions but don't bother to declare them :-(
11559
11560 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11561 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
11562   ac_have_decl=1
11563 else
11564   ac_have_decl=0
11565 fi
11566
11567 cat >>confdefs.h <<_ACEOF
11568 #define HAVE_DECL_SNPRINTF $ac_have_decl
11569 _ACEOF
11570 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
11571 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
11572   ac_have_decl=1
11573 else
11574   ac_have_decl=0
11575 fi
11576
11577 cat >>confdefs.h <<_ACEOF
11578 #define HAVE_DECL_VSNPRINTF $ac_have_decl
11579 _ACEOF
11580
11581
11582
11583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf" >&5
11584 $as_echo_n "checking for isinf... " >&6; }
11585 if ${ac_cv_func_isinf+:} false; then :
11586   $as_echo_n "(cached) " >&6
11587 else
11588   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11589 /* end confdefs.h.  */
11590
11591 #include <math.h>
11592 double glob_double;
11593
11594 int
11595 main ()
11596 {
11597 return isinf(glob_double) ? 0 : 1;
11598   ;
11599   return 0;
11600 }
11601 _ACEOF
11602 if ac_fn_c_try_link "$LINENO"; then :
11603   ac_cv_func_isinf=yes
11604 else
11605   ac_cv_func_isinf=no
11606 fi
11607 rm -f core conftest.err conftest.$ac_objext \
11608     conftest$ac_exeext conftest.$ac_ext
11609 fi
11610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_isinf" >&5
11611 $as_echo "$ac_cv_func_isinf" >&6; }
11612
11613 if test $ac_cv_func_isinf = yes ; then
11614
11615 $as_echo "#define HAVE_ISINF 1" >>confdefs.h
11616
11617 else
11618   case " $LIBOBJS " in
11619   *" isinf.$ac_objext "* ) ;;
11620   *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
11621  ;;
11622 esac
11623
11624   # Look for a way to implement a substitute for isinf()
11625   for ac_func in fpclass fp_class fp_class_d class
11626 do :
11627   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11628 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11629 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11630   cat >>confdefs.h <<_ACEOF
11631 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11632 _ACEOF
11633  break
11634 fi
11635 done
11636
11637 fi
11638
11639 ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
11640 if test "x$ac_cv_func_crypt" = xyes; then :
11641   $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
11642
11643 else
11644   case " $LIBOBJS " in
11645   *" crypt.$ac_objext "* ) ;;
11646   *) LIBOBJS="$LIBOBJS crypt.$ac_objext"
11647  ;;
11648 esac
11649
11650 fi
11651
11652 ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
11653 if test "x$ac_cv_func_fls" = xyes; then :
11654   $as_echo "#define HAVE_FLS 1" >>confdefs.h
11655
11656 else
11657   case " $LIBOBJS " in
11658   *" fls.$ac_objext "* ) ;;
11659   *) LIBOBJS="$LIBOBJS fls.$ac_objext"
11660  ;;
11661 esac
11662
11663 fi
11664
11665 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
11666 if test "x$ac_cv_func_getopt" = xyes; then :
11667   $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
11668
11669 else
11670   case " $LIBOBJS " in
11671   *" getopt.$ac_objext "* ) ;;
11672   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
11673  ;;
11674 esac
11675
11676 fi
11677
11678 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
11679 if test "x$ac_cv_func_getrusage" = xyes; then :
11680   $as_echo "#define HAVE_GETRUSAGE 1" >>confdefs.h
11681
11682 else
11683   case " $LIBOBJS " in
11684   *" getrusage.$ac_objext "* ) ;;
11685   *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
11686  ;;
11687 esac
11688
11689 fi
11690
11691 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
11692 if test "x$ac_cv_func_inet_aton" = xyes; then :
11693   $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
11694
11695 else
11696   case " $LIBOBJS " in
11697   *" inet_aton.$ac_objext "* ) ;;
11698   *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
11699  ;;
11700 esac
11701
11702 fi
11703
11704 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
11705 if test "x$ac_cv_func_mkdtemp" = xyes; then :
11706   $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
11707
11708 else
11709   case " $LIBOBJS " in
11710   *" mkdtemp.$ac_objext "* ) ;;
11711   *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
11712  ;;
11713 esac
11714
11715 fi
11716
11717 ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
11718 if test "x$ac_cv_func_random" = xyes; then :
11719   $as_echo "#define HAVE_RANDOM 1" >>confdefs.h
11720
11721 else
11722   case " $LIBOBJS " in
11723   *" random.$ac_objext "* ) ;;
11724   *) LIBOBJS="$LIBOBJS random.$ac_objext"
11725  ;;
11726 esac
11727
11728 fi
11729
11730 ac_fn_c_check_func "$LINENO" "rint" "ac_cv_func_rint"
11731 if test "x$ac_cv_func_rint" = xyes; then :
11732   $as_echo "#define HAVE_RINT 1" >>confdefs.h
11733
11734 else
11735   case " $LIBOBJS " in
11736   *" rint.$ac_objext "* ) ;;
11737   *) LIBOBJS="$LIBOBJS rint.$ac_objext"
11738  ;;
11739 esac
11740
11741 fi
11742
11743 ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
11744 if test "x$ac_cv_func_srandom" = xyes; then :
11745   $as_echo "#define HAVE_SRANDOM 1" >>confdefs.h
11746
11747 else
11748   case " $LIBOBJS " in
11749   *" srandom.$ac_objext "* ) ;;
11750   *) LIBOBJS="$LIBOBJS srandom.$ac_objext"
11751  ;;
11752 esac
11753
11754 fi
11755
11756 ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
11757 if test "x$ac_cv_func_strerror" = xyes; then :
11758   $as_echo "#define HAVE_STRERROR 1" >>confdefs.h
11759
11760 else
11761   case " $LIBOBJS " in
11762   *" strerror.$ac_objext "* ) ;;
11763   *) LIBOBJS="$LIBOBJS strerror.$ac_objext"
11764  ;;
11765 esac
11766
11767 fi
11768
11769 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
11770 if test "x$ac_cv_func_strlcat" = xyes; then :
11771   $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
11772
11773 else
11774   case " $LIBOBJS " in
11775   *" strlcat.$ac_objext "* ) ;;
11776   *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
11777  ;;
11778 esac
11779
11780 fi
11781
11782 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
11783 if test "x$ac_cv_func_strlcpy" = xyes; then :
11784   $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
11785
11786 else
11787   case " $LIBOBJS " in
11788   *" strlcpy.$ac_objext "* ) ;;
11789   *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
11790  ;;
11791 esac
11792
11793 fi
11794
11795
11796
11797 case $host_os in
11798
11799         # Windows uses a specialised env handler
11800         # and doesn't need a replacement getpeereid because it doesn't use
11801         # Unix sockets.
11802         mingw*)
11803
11804 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
11805
11806
11807 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
11808
11809                 ac_cv_func_unsetenv=yes
11810                 ac_cv_func_getpeereid=yes;;
11811         *)
11812                 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
11813 if test "x$ac_cv_func_unsetenv" = xyes; then :
11814   $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
11815
11816 else
11817   case " $LIBOBJS " in
11818   *" unsetenv.$ac_objext "* ) ;;
11819   *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext"
11820  ;;
11821 esac
11822
11823 fi
11824
11825 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
11826 if test "x$ac_cv_func_getpeereid" = xyes; then :
11827   $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
11828
11829 else
11830   case " $LIBOBJS " in
11831   *" getpeereid.$ac_objext "* ) ;;
11832   *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
11833  ;;
11834 esac
11835
11836 fi
11837
11838
11839                 ;;
11840 esac
11841
11842 # System's version of getaddrinfo(), if any, may be used only if we found
11843 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
11844 # We use only our own getaddrinfo.c on Windows, but it's time to revisit that.
11845 if test x"$ac_cv_type_struct_addrinfo" = xyes && \
11846    test "$PORTNAME" != "win32"; then
11847   ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
11848 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
11849   $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
11850
11851 else
11852   case " $LIBOBJS " in
11853   *" getaddrinfo.$ac_objext "* ) ;;
11854   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
11855  ;;
11856 esac
11857
11858 fi
11859
11860
11861 else
11862   case " $LIBOBJS " in
11863   *" getaddrinfo.$ac_objext "* ) ;;
11864   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
11865  ;;
11866 esac
11867
11868 fi
11869
11870 # Similarly, use system's getopt_long() only if system provides struct option.
11871 if test x"$ac_cv_type_struct_option" = xyes ; then
11872   ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
11873 if test "x$ac_cv_func_getopt_long" = xyes; then :
11874   $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
11875
11876 else
11877   case " $LIBOBJS " in
11878   *" getopt_long.$ac_objext "* ) ;;
11879   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
11880  ;;
11881 esac
11882
11883 fi
11884
11885
11886 else
11887   case " $LIBOBJS " in
11888   *" getopt_long.$ac_objext "* ) ;;
11889   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
11890  ;;
11891 esac
11892
11893 fi
11894
11895 # Solaris' getopt() doesn't do what we want for long options, so always use
11896 # our version on that platform.
11897 if test "$PORTNAME" = "solaris"; then
11898   case " $LIBOBJS " in
11899   *" getopt.$ac_objext "* ) ;;
11900   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
11901  ;;
11902 esac
11903
11904 fi
11905
11906 # mingw has adopted a GNU-centric interpretation of optind/optreset,
11907 # so always use our version on Windows.
11908 if test "$PORTNAME" = "win32"; then
11909   case " $LIBOBJS " in
11910   *" getopt.$ac_objext "* ) ;;
11911   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
11912  ;;
11913 esac
11914
11915   case " $LIBOBJS " in
11916   *" getopt_long.$ac_objext "* ) ;;
11917   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
11918  ;;
11919 esac
11920
11921 fi
11922
11923 # Win32 support
11924 if test "$PORTNAME" = "win32"; then
11925   ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
11926 if test "x$ac_cv_func_gettimeofday" = xyes; then :
11927   $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
11928
11929 else
11930   case " $LIBOBJS " in
11931   *" gettimeofday.$ac_objext "* ) ;;
11932   *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
11933  ;;
11934 esac
11935
11936 fi
11937
11938
11939   case " $LIBOBJS " in
11940   *" kill.$ac_objext "* ) ;;
11941   *) LIBOBJS="$LIBOBJS kill.$ac_objext"
11942  ;;
11943 esac
11944
11945   case " $LIBOBJS " in
11946   *" open.$ac_objext "* ) ;;
11947   *) LIBOBJS="$LIBOBJS open.$ac_objext"
11948  ;;
11949 esac
11950
11951   case " $LIBOBJS " in
11952   *" system.$ac_objext "* ) ;;
11953   *) LIBOBJS="$LIBOBJS system.$ac_objext"
11954  ;;
11955 esac
11956
11957   case " $LIBOBJS " in
11958   *" win32env.$ac_objext "* ) ;;
11959   *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
11960  ;;
11961 esac
11962
11963   case " $LIBOBJS " in
11964   *" win32error.$ac_objext "* ) ;;
11965   *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
11966  ;;
11967 esac
11968
11969   case " $LIBOBJS " in
11970   *" win32setlocale.$ac_objext "* ) ;;
11971   *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
11972  ;;
11973 esac
11974
11975
11976 $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
11977
11978   ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
11979 #define WIN32_LEAN_AND_MEAN
11980 #include <windows.h>
11981 #include <string.h>
11982 #include <dbghelp.h>
11983 "
11984 if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
11985
11986 cat >>confdefs.h <<_ACEOF
11987 #define HAVE_MINIDUMP_TYPE 1
11988 _ACEOF
11989
11990 pgac_minidump_type=yes
11991 else
11992   pgac_minidump_type=no
11993 fi
11994
11995 fi
11996 if test x"$pgac_minidump_type" = x"yes" ; then
11997   have_win32_dbghelp=yes
11998
11999 else
12000   have_win32_dbghelp=no
12001
12002 fi
12003
12004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
12005 $as_echo_n "checking for sigsetjmp... " >&6; }
12006 if ${pgac_cv_func_sigsetjmp+:} false; then :
12007   $as_echo_n "(cached) " >&6
12008 else
12009   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12010 /* end confdefs.h.  */
12011 #include <setjmp.h>
12012 int
12013 main ()
12014 {
12015 sigjmp_buf x; sigsetjmp(x, 1);
12016   ;
12017   return 0;
12018 }
12019 _ACEOF
12020 if ac_fn_c_try_link "$LINENO"; then :
12021   pgac_cv_func_sigsetjmp=yes
12022 else
12023   pgac_cv_func_sigsetjmp=no
12024 fi
12025 rm -f core conftest.err conftest.$ac_objext \
12026     conftest$ac_exeext conftest.$ac_ext
12027 fi
12028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_sigsetjmp" >&5
12029 $as_echo "$pgac_cv_func_sigsetjmp" >&6; }
12030 if test x"$pgac_cv_func_sigsetjmp" = x"yes"; then
12031
12032 $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
12033
12034 fi
12035
12036 ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
12037 /* NetBSD declares sys_siglist in unistd.h.  */
12038 #ifdef HAVE_UNISTD_H
12039 # include <unistd.h>
12040 #endif
12041
12042 "
12043 if test "x$ac_cv_have_decl_sys_siglist" = xyes; then :
12044   ac_have_decl=1
12045 else
12046   ac_have_decl=0
12047 fi
12048
12049 cat >>confdefs.h <<_ACEOF
12050 #define HAVE_DECL_SYS_SIGLIST $ac_have_decl
12051 _ACEOF
12052
12053
12054
12055 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
12056 if test "x$ac_cv_func_syslog" = xyes; then :
12057   ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
12058 if test "x$ac_cv_header_syslog_h" = xyes; then :
12059
12060 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
12061
12062 fi
12063
12064
12065 fi
12066
12067
12068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
12069 $as_echo_n "checking for opterr... " >&6; }
12070 if ${pgac_cv_var_int_opterr+:} false; then :
12071   $as_echo_n "(cached) " >&6
12072 else
12073   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12074 /* end confdefs.h.  */
12075 #include <unistd.h>
12076 int
12077 main ()
12078 {
12079 extern int opterr; opterr = 1;
12080   ;
12081   return 0;
12082 }
12083 _ACEOF
12084 if ac_fn_c_try_link "$LINENO"; then :
12085   pgac_cv_var_int_opterr=yes
12086 else
12087   pgac_cv_var_int_opterr=no
12088 fi
12089 rm -f core conftest.err conftest.$ac_objext \
12090     conftest$ac_exeext conftest.$ac_ext
12091 fi
12092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
12093 $as_echo "$pgac_cv_var_int_opterr" >&6; }
12094 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
12095
12096 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
12097
12098 fi
12099
12100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
12101 $as_echo_n "checking for optreset... " >&6; }
12102 if ${pgac_cv_var_int_optreset+:} false; then :
12103   $as_echo_n "(cached) " >&6
12104 else
12105   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12106 /* end confdefs.h.  */
12107 #include <unistd.h>
12108 int
12109 main ()
12110 {
12111 extern int optreset; optreset = 1;
12112   ;
12113   return 0;
12114 }
12115 _ACEOF
12116 if ac_fn_c_try_link "$LINENO"; then :
12117   pgac_cv_var_int_optreset=yes
12118 else
12119   pgac_cv_var_int_optreset=no
12120 fi
12121 rm -f core conftest.err conftest.$ac_objext \
12122     conftest$ac_exeext conftest.$ac_ext
12123 fi
12124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
12125 $as_echo "$pgac_cv_var_int_optreset" >&6; }
12126 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
12127
12128 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
12129
12130 fi
12131
12132 for ac_func in strtoll strtoq
12133 do :
12134   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12135 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12136 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12137   cat >>confdefs.h <<_ACEOF
12138 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12139 _ACEOF
12140  break
12141 fi
12142 done
12143
12144 for ac_func in strtoull strtouq
12145 do :
12146   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12147 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12148 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12149   cat >>confdefs.h <<_ACEOF
12150 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12151 _ACEOF
12152  break
12153 fi
12154 done
12155
12156
12157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin locking functions" >&5
12158 $as_echo_n "checking for builtin locking functions... " >&6; }
12159 if ${pgac_cv_gcc_int_atomics+:} false; then :
12160   $as_echo_n "(cached) " >&6
12161 else
12162   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12163 /* end confdefs.h.  */
12164
12165 int
12166 main ()
12167 {
12168 int lock = 0;
12169    __sync_lock_test_and_set(&lock, 1);
12170    __sync_lock_release(&lock);
12171   ;
12172   return 0;
12173 }
12174 _ACEOF
12175 if ac_fn_c_try_link "$LINENO"; then :
12176   pgac_cv_gcc_int_atomics="yes"
12177 else
12178   pgac_cv_gcc_int_atomics="no"
12179 fi
12180 rm -f core conftest.err conftest.$ac_objext \
12181     conftest$ac_exeext conftest.$ac_ext
12182 fi
12183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_int_atomics" >&5
12184 $as_echo "$pgac_cv_gcc_int_atomics" >&6; }
12185 if test x"$pgac_cv_gcc_int_atomics" = x"yes"; then
12186
12187 $as_echo "#define HAVE_GCC_INT_ATOMICS 1" >>confdefs.h
12188
12189 fi
12190
12191 # Lastly, restore full LIBS list and check for readline/libedit symbols
12192 LIBS="$LIBS_including_readline"
12193
12194 if test "$with_readline" = yes; then
12195   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_append_character" >&5
12196 $as_echo_n "checking for rl_completion_append_character... " >&6; }
12197 if ${pgac_cv_var_rl_completion_append_character+:} false; then :
12198   $as_echo_n "(cached) " >&6
12199 else
12200   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12201 /* end confdefs.h.  */
12202 #include <stdio.h>
12203 #ifdef HAVE_READLINE_READLINE_H
12204 # include <readline/readline.h>
12205 #elif defined(HAVE_READLINE_H)
12206 # include <readline.h>
12207 #endif
12208
12209 int
12210 main ()
12211 {
12212 rl_completion_append_character = 'x';
12213   ;
12214   return 0;
12215 }
12216 _ACEOF
12217 if ac_fn_c_try_link "$LINENO"; then :
12218   pgac_cv_var_rl_completion_append_character=yes
12219 else
12220   pgac_cv_var_rl_completion_append_character=no
12221 fi
12222 rm -f core conftest.err conftest.$ac_objext \
12223     conftest$ac_exeext conftest.$ac_ext
12224 fi
12225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_append_character" >&5
12226 $as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
12227 if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
12228
12229 $as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
12230
12231 fi
12232   for ac_func in rl_completion_matches rl_filename_completion_function
12233 do :
12234   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12235 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12236 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12237   cat >>confdefs.h <<_ACEOF
12238 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12239 _ACEOF
12240
12241 fi
12242 done
12243
12244   for ac_func in append_history history_truncate_file
12245 do :
12246   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12247 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12248 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12249   cat >>confdefs.h <<_ACEOF
12250 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12251 _ACEOF
12252
12253 fi
12254 done
12255
12256 fi
12257
12258
12259 #
12260 # Pthreads
12261 #
12262 # For each platform, we need to know about any special compile and link
12263 # libraries, and whether the normal C function names are thread-safe.
12264 # See the comment at the top of src/port/thread.c for more information.
12265 # WIN32 doesn't need the pthread tests;  it always uses threads
12266 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then
12267
12268
12269
12270 ac_ext=c
12271 ac_cpp='$CPP $CPPFLAGS'
12272 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12273 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12274 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12275
12276 acx_pthread_ok=no
12277
12278 # We used to check for pthread.h first, but this fails if pthread.h
12279 # requires special compiler flags (e.g. on True64 or Sequent).
12280 # It gets checked for in the link test anyway.
12281
12282 # First of all, check if the user has set any of the PTHREAD_LIBS,
12283 # etcetera environment variables, and if threads linking works using
12284 # them:
12285 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
12286         save_CFLAGS="$CFLAGS"
12287         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
12288         save_LIBS="$LIBS"
12289         LIBS="$PTHREAD_LIBS $LIBS"
12290         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
12291 $as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
12292         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12293 /* end confdefs.h.  */
12294
12295 /* Override any GCC internal prototype to avoid an error.
12296    Use char because int might match the return type of a GCC
12297    builtin and then its argument prototype would still apply.  */
12298 #ifdef __cplusplus
12299 extern "C"
12300 #endif
12301 char pthread_join ();
12302 int
12303 main ()
12304 {
12305 return pthread_join ();
12306   ;
12307   return 0;
12308 }
12309 _ACEOF
12310 if ac_fn_c_try_link "$LINENO"; then :
12311   acx_pthread_ok=yes
12312 fi
12313 rm -f core conftest.err conftest.$ac_objext \
12314     conftest$ac_exeext conftest.$ac_ext
12315         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5
12316 $as_echo "$acx_pthread_ok" >&6; }
12317         if test x"$acx_pthread_ok" = xno; then
12318                 PTHREAD_LIBS=""
12319                 PTHREAD_CFLAGS=""
12320         fi
12321         LIBS="$save_LIBS"
12322         CFLAGS="$save_CFLAGS"
12323 fi
12324
12325 # We must check for the threads library under a number of different
12326 # names; the ordering is very important because some systems
12327 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
12328 # libraries is broken (non-POSIX).
12329
12330 # Create a list of thread flags to try.  Items starting with a "-" are
12331 # C compiler flags, and other items are library names, except for "none"
12332 # which indicates that we try without any flags at all, and "pthread-config"
12333 # which is a program returning the flags for the Pth emulation library.
12334
12335 acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config pthreadGC2"
12336
12337 # The ordering *is* (sometimes) important.  Some notes on the
12338 # individual items follow:
12339
12340 # pthreads: AIX (must check this before -lpthread)
12341 # none: in case threads are in libc; should be tried before -Kthread and
12342 #       other compiler flags to prevent continual compiler warnings
12343 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
12344 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
12345 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
12346 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
12347 # -pthreads: Solaris/gcc
12348 # -mthreads: Mingw32/gcc, Lynx/gcc
12349 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
12350 #      doesn't hurt to check since this sometimes defines pthreads too;
12351 #      also defines -D_REENTRANT)
12352 # pthread: Linux, etcetera
12353 # --thread-safe: KAI C++
12354 # pthread-config: use pthread-config program (for GNU Pth library)
12355
12356 case "${host_cpu}-${host_os}" in
12357         *solaris*)
12358
12359         # On Solaris (at least, for some versions), libc contains stubbed
12360         # (non-functional) versions of the pthreads routines, so link-based
12361         # tests will erroneously succeed.  (We need to link with -pthread or
12362         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
12363         # a function called by this macro, so we could check for that, but
12364         # who knows whether they'll stub that too in a future libc.)  So,
12365         # we'll just look for -pthreads and -lpthread first:
12366
12367         acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
12368         ;;
12369 esac
12370
12371 if test x"$acx_pthread_ok" = xno; then
12372 for flag in $acx_pthread_flags; do
12373
12374         tryPTHREAD_CFLAGS=""
12375         tryPTHREAD_LIBS=""
12376         case $flag in
12377                 none)
12378                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
12379 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
12380                 ;;
12381
12382                 -*)
12383                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
12384 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
12385                 tryPTHREAD_CFLAGS="$flag"
12386                 ;;
12387
12388                 pthread-config)
12389                 # skip this if we already have flags defined, for PostgreSQL
12390                 if test x"$PTHREAD_CFLAGS" != x -o x"$PTHREAD_LIBS" != x; then continue; fi
12391                 # Extract the first word of "pthread-config", so it can be a program name with args.
12392 set dummy pthread-config; ac_word=$2
12393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12394 $as_echo_n "checking for $ac_word... " >&6; }
12395 if ${ac_cv_prog_acx_pthread_config+:} false; then :
12396   $as_echo_n "(cached) " >&6
12397 else
12398   if test -n "$acx_pthread_config"; then
12399   ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
12400 else
12401 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12402 for as_dir in $PATH
12403 do
12404   IFS=$as_save_IFS
12405   test -z "$as_dir" && as_dir=.
12406     for ac_exec_ext in '' $ac_executable_extensions; do
12407   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12408     ac_cv_prog_acx_pthread_config="yes"
12409     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12410     break 2
12411   fi
12412 done
12413   done
12414 IFS=$as_save_IFS
12415
12416   test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
12417 fi
12418 fi
12419 acx_pthread_config=$ac_cv_prog_acx_pthread_config
12420 if test -n "$acx_pthread_config"; then
12421   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_config" >&5
12422 $as_echo "$acx_pthread_config" >&6; }
12423 else
12424   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12425 $as_echo "no" >&6; }
12426 fi
12427
12428
12429                 if test x"$acx_pthread_config" = xno; then continue; fi
12430                 tryPTHREAD_CFLAGS="`pthread-config --cflags`"
12431                 tryPTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
12432                 ;;
12433
12434                 *)
12435                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
12436 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
12437                 tryPTHREAD_LIBS="-l$flag"
12438                 ;;
12439         esac
12440
12441         save_LIBS="$LIBS"
12442         save_CFLAGS="$CFLAGS"
12443         LIBS="$tryPTHREAD_LIBS $PTHREAD_LIBS $LIBS"
12444         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
12445
12446         # Check for various functions.  We must include pthread.h,
12447         # since some functions may be macros.  (On the Sequent, we
12448         # need a special flag -Kthread to make this header compile.)
12449         # We check for pthread_join because it is in -lpthread on IRIX
12450         # while pthread_create is in libc.  We check for pthread_attr_init
12451         # due to DEC craziness with -lpthreads.  We check for
12452         # pthread_cleanup_push because it is one of the few pthread
12453         # functions on Solaris that doesn't have a non-functional libc stub.
12454         # We try pthread_create on general principles.
12455         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12456 /* end confdefs.h.  */
12457 #include <pthread.h>
12458 int
12459 main ()
12460 {
12461 pthread_t th; pthread_join(th, 0);
12462                      pthread_attr_init(0); pthread_cleanup_push(0, 0);
12463                      pthread_create(0,0,0,0); pthread_cleanup_pop(0);
12464   ;
12465   return 0;
12466 }
12467 _ACEOF
12468 if ac_fn_c_try_link "$LINENO"; then :
12469   acx_pthread_ok=yes
12470 else
12471   acx_pthread_ok=no
12472 fi
12473 rm -f core conftest.err conftest.$ac_objext \
12474     conftest$ac_exeext conftest.$ac_ext
12475
12476         if test "x$acx_pthread_ok" = xyes; then
12477             # Don't use options that are ignored by the compiler.
12478             # We find them by checking stderror.
12479             cat >conftest.$ac_ext <<_ACEOF
12480 int
12481 main (int argc, char **argv)
12482 {
12483   (void) argc;
12484   (void) argv;
12485   return 0;
12486 }
12487 _ACEOF
12488             rm -f conftest.$ac_objext conftest$ac_exeext
12489             # Check both linking and compiling, because they might tolerate different options.
12490             if test "`(eval $ac_link 2>&1 1>&5)`" = "" && test "`(eval $ac_compile 2>&1 1>&5)`" = ""; then
12491                 # The original macro breaks out of the loop at this point,
12492                 # but we continue trying flags because Linux needs -lpthread
12493                 # too to build libpq successfully.  The test above only
12494                 # tests for building binaries, not shared libraries.
12495                 PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
12496                 PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
12497             else   acx_pthread_ok=no
12498             fi
12499         fi
12500
12501         LIBS="$save_LIBS"
12502         CFLAGS="$save_CFLAGS"
12503
12504         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5
12505 $as_echo "$acx_pthread_ok" >&6; }
12506 done
12507 fi
12508
12509 # The original macro has a bunch of other tests here, which we have removed
12510 # because (a) Postgres doesn't need them, and (b) $acx_pthread_ok is not
12511 # meaningful at this point.
12512
12513
12514
12515
12516 ac_ext=c
12517 ac_cpp='$CPP $CPPFLAGS'
12518 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12519 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12520 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12521
12522         # set thread flags
12523
12524 # Some platforms use these, so just define them.  They can't hurt if they
12525 # are not supported.  For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
12526 # enables 5-arg getpwuid_r, among other things.
12527 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
12528
12529 # Check for *_r functions
12530 _CFLAGS="$CFLAGS"
12531 _LIBS="$LIBS"
12532 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
12533 LIBS="$LIBS $PTHREAD_LIBS"
12534
12535 if test "$PORTNAME" != "win32"; then
12536 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
12537 if test "x$ac_cv_header_pthread_h" = xyes; then :
12538
12539 else
12540   as_fn_error $? "
12541 pthread.h not found;  use --disable-thread-safety to disable thread safety" "$LINENO" 5
12542 fi
12543
12544
12545 fi
12546
12547 for ac_func in strerror_r getpwuid_r gethostbyname_r
12548 do :
12549   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12550 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12551 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12552   cat >>confdefs.h <<_ACEOF
12553 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12554 _ACEOF
12555
12556 fi
12557 done
12558
12559
12560 # Do test here with the proper thread flags
12561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpwuid_r takes a fifth argument" >&5
12562 $as_echo_n "checking whether getpwuid_r takes a fifth argument... " >&6; }
12563 if ${pgac_cv_func_getpwuid_r_5arg+:} false; then :
12564   $as_echo_n "(cached) " >&6
12565 else
12566   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12567 /* end confdefs.h.  */
12568 #include <sys/types.h>
12569 #include <pwd.h>
12570 int
12571 main ()
12572 {
12573 uid_t uid;
12574 struct passwd *space;
12575 char *buf;
12576 size_t bufsize;
12577 struct passwd **result;
12578 getpwuid_r(uid, space, buf, bufsize, result);
12579   ;
12580   return 0;
12581 }
12582 _ACEOF
12583 if ac_fn_c_try_compile "$LINENO"; then :
12584   pgac_cv_func_getpwuid_r_5arg=yes
12585 else
12586   pgac_cv_func_getpwuid_r_5arg=no
12587 fi
12588 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12589 fi
12590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_getpwuid_r_5arg" >&5
12591 $as_echo "$pgac_cv_func_getpwuid_r_5arg" >&6; }
12592 if test x"$pgac_cv_func_getpwuid_r_5arg" = xyes ; then
12593
12594 $as_echo "#define GETPWUID_R_5ARG 1" >>confdefs.h
12595
12596 fi
12597
12598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
12599 $as_echo_n "checking whether strerror_r returns int... " >&6; }
12600 if ${pgac_cv_func_strerror_r_int+:} false; then :
12601   $as_echo_n "(cached) " >&6
12602 else
12603   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12604 /* end confdefs.h.  */
12605 #include <string.h>
12606 int
12607 main ()
12608 {
12609 #ifndef _AIX
12610 int strerror_r(int, char *, size_t);
12611 #else
12612 /* Older AIX has 'int' for the third argument so we don't test the args. */
12613 int strerror_r();
12614 #endif
12615   ;
12616   return 0;
12617 }
12618 _ACEOF
12619 if ac_fn_c_try_compile "$LINENO"; then :
12620   pgac_cv_func_strerror_r_int=yes
12621 else
12622   pgac_cv_func_strerror_r_int=no
12623 fi
12624 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12625 fi
12626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
12627 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
12628 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
12629
12630 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
12631
12632 fi
12633
12634
12635 CFLAGS="$_CFLAGS"
12636 LIBS="$_LIBS"
12637
12638 else
12639 # do not use values from template file
12640 PTHREAD_CFLAGS=
12641 PTHREAD_LIBS=
12642 fi
12643
12644
12645
12646
12647
12648 # We can test for libldap_r only after we know PTHREAD_LIBS
12649 if test "$with_ldap" = yes ; then
12650   _LIBS="$LIBS"
12651   if test "$PORTNAME" != "win32"; then
12652     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
12653 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
12654 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
12655   $as_echo_n "(cached) " >&6
12656 else
12657   ac_check_lib_save_LIBS=$LIBS
12658 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
12659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12660 /* end confdefs.h.  */
12661
12662 /* Override any GCC internal prototype to avoid an error.
12663    Use char because int might match the return type of a GCC
12664    builtin and then its argument prototype would still apply.  */
12665 #ifdef __cplusplus
12666 extern "C"
12667 #endif
12668 char ldap_bind ();
12669 int
12670 main ()
12671 {
12672 return ldap_bind ();
12673   ;
12674   return 0;
12675 }
12676 _ACEOF
12677 if ac_fn_c_try_link "$LINENO"; then :
12678   ac_cv_lib_ldap_ldap_bind=yes
12679 else
12680   ac_cv_lib_ldap_ldap_bind=no
12681 fi
12682 rm -f core conftest.err conftest.$ac_objext \
12683     conftest$ac_exeext conftest.$ac_ext
12684 LIBS=$ac_check_lib_save_LIBS
12685 fi
12686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
12687 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
12688 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
12689   cat >>confdefs.h <<_ACEOF
12690 #define HAVE_LIBLDAP 1
12691 _ACEOF
12692
12693   LIBS="-lldap $LIBS"
12694
12695 else
12696   as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
12697 fi
12698
12699     LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
12700     if test "$enable_thread_safety" = yes; then
12701       # on some platforms ldap_r fails to link without PTHREAD_LIBS
12702       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_simple_bind in -lldap_r" >&5
12703 $as_echo_n "checking for ldap_simple_bind in -lldap_r... " >&6; }
12704 if ${ac_cv_lib_ldap_r_ldap_simple_bind+:} false; then :
12705   $as_echo_n "(cached) " >&6
12706 else
12707   ac_check_lib_save_LIBS=$LIBS
12708 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
12709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12710 /* end confdefs.h.  */
12711
12712 /* Override any GCC internal prototype to avoid an error.
12713    Use char because int might match the return type of a GCC
12714    builtin and then its argument prototype would still apply.  */
12715 #ifdef __cplusplus
12716 extern "C"
12717 #endif
12718 char ldap_simple_bind ();
12719 int
12720 main ()
12721 {
12722 return ldap_simple_bind ();
12723   ;
12724   return 0;
12725 }
12726 _ACEOF
12727 if ac_fn_c_try_link "$LINENO"; then :
12728   ac_cv_lib_ldap_r_ldap_simple_bind=yes
12729 else
12730   ac_cv_lib_ldap_r_ldap_simple_bind=no
12731 fi
12732 rm -f core conftest.err conftest.$ac_objext \
12733     conftest$ac_exeext conftest.$ac_ext
12734 LIBS=$ac_check_lib_save_LIBS
12735 fi
12736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
12737 $as_echo "$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
12738 if test "x$ac_cv_lib_ldap_r_ldap_simple_bind" = xyes; then :
12739   cat >>confdefs.h <<_ACEOF
12740 #define HAVE_LIBLDAP_R 1
12741 _ACEOF
12742
12743   LIBS="-lldap_r $LIBS"
12744
12745 else
12746   as_fn_error $? "library 'ldap_r' is required for LDAP" "$LINENO" 5
12747 fi
12748
12749       LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
12750     else
12751       LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
12752     fi
12753   else
12754     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
12755 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
12756 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
12757   $as_echo_n "(cached) " >&6
12758 else
12759   ac_check_lib_save_LIBS=$LIBS
12760 LIBS="-lwldap32  $LIBS"
12761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12762 /* end confdefs.h.  */
12763
12764 /* Override any GCC internal prototype to avoid an error.
12765    Use char because int might match the return type of a GCC
12766    builtin and then its argument prototype would still apply.  */
12767 #ifdef __cplusplus
12768 extern "C"
12769 #endif
12770 char ldap_bind ();
12771 int
12772 main ()
12773 {
12774 return ldap_bind ();
12775   ;
12776   return 0;
12777 }
12778 _ACEOF
12779 if ac_fn_c_try_link "$LINENO"; then :
12780   ac_cv_lib_wldap32_ldap_bind=yes
12781 else
12782   ac_cv_lib_wldap32_ldap_bind=no
12783 fi
12784 rm -f core conftest.err conftest.$ac_objext \
12785     conftest$ac_exeext conftest.$ac_ext
12786 LIBS=$ac_check_lib_save_LIBS
12787 fi
12788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
12789 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
12790 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
12791   cat >>confdefs.h <<_ACEOF
12792 #define HAVE_LIBWLDAP32 1
12793 _ACEOF
12794
12795   LIBS="-lwldap32 $LIBS"
12796
12797 else
12798   as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
12799 fi
12800
12801     LDAP_LIBS_FE="-lwldap32"
12802     LDAP_LIBS_BE="-lwldap32"
12803   fi
12804   LIBS="$_LIBS"
12805 fi
12806
12807
12808
12809
12810 # This test makes sure that run tests work at all.  Sometimes a shared
12811 # library is found by the linker, but the runtime linker can't find it.
12812 # This check should come after all modifications of compiler or linker
12813 # variables, and before any other run tests.
12814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
12815 $as_echo_n "checking test program... " >&6; }
12816 if test "$cross_compiling" = yes; then :
12817   { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
12818 $as_echo "cross-compiling" >&6; }
12819 else
12820   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12821 /* end confdefs.h.  */
12822 int main() { return 0; }
12823 _ACEOF
12824 if ac_fn_c_try_run "$LINENO"; then :
12825   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
12826 $as_echo "ok" >&6; }
12827 else
12828   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
12829 $as_echo "failed" >&6; }
12830 as_fn_error $? "
12831 Could not execute a simple test program.  This may be a problem
12832 related to locating shared libraries.  Check the file 'config.log'
12833 for the exact reason." "$LINENO" 5
12834 fi
12835 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12836   conftest.$ac_objext conftest.beam conftest.$ac_ext
12837 fi
12838
12839
12840 # --------------------
12841 # Run tests below here
12842 # --------------------
12843
12844 # Force use of our snprintf if system's doesn't do arg control
12845 # See comment above at snprintf test for details.
12846 if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
12847   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports argument control" >&5
12848 $as_echo_n "checking whether snprintf supports argument control... " >&6; }
12849 if ${pgac_cv_snprintf_arg_control+:} false; then :
12850   $as_echo_n "(cached) " >&6
12851 else
12852   if test "$cross_compiling" = yes; then :
12853   pgac_cv_snprintf_arg_control=cross
12854 else
12855   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12856 /* end confdefs.h.  */
12857 #include <stdio.h>
12858 #include <string.h>
12859
12860 int main()
12861 {
12862   char buf[100];
12863
12864   /* can it swap arguments? */
12865   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
12866   if (strcmp(buf, "4 3") != 0)
12867     return 1;
12868   return 0;
12869 }
12870 _ACEOF
12871 if ac_fn_c_try_run "$LINENO"; then :
12872   pgac_cv_snprintf_arg_control=yes
12873 else
12874   pgac_cv_snprintf_arg_control=no
12875 fi
12876 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12877   conftest.$ac_objext conftest.beam conftest.$ac_ext
12878 fi
12879
12880
12881 fi
12882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_arg_control" >&5
12883 $as_echo "$pgac_cv_snprintf_arg_control" >&6; }
12884
12885   if test $pgac_cv_snprintf_arg_control != yes ; then
12886     pgac_need_repl_snprintf=yes
12887   fi
12888 fi
12889
12890
12891
12892
12893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
12894 $as_echo_n "checking whether long int is 64 bits... " >&6; }
12895 if ${pgac_cv_type_long_int_64+:} false; then :
12896   $as_echo_n "(cached) " >&6
12897 else
12898   if test "$cross_compiling" = yes; then :
12899   # If cross-compiling, check the size reported by the compiler and
12900 # trust that the arithmetic works.
12901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12902 /* end confdefs.h.  */
12903
12904 int
12905 main ()
12906 {
12907 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
12908 test_array [0] = 0;
12909 return test_array [0];
12910
12911   ;
12912   return 0;
12913 }
12914 _ACEOF
12915 if ac_fn_c_try_compile "$LINENO"; then :
12916   pgac_cv_type_long_int_64=yes
12917 else
12918   pgac_cv_type_long_int_64=no
12919 fi
12920 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12921 else
12922   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12923 /* end confdefs.h.  */
12924 typedef long int ac_int64;
12925
12926 /*
12927  * These are globals to discourage the compiler from folding all the
12928  * arithmetic tests down to compile-time constants.
12929  */
12930 ac_int64 a = 20000001;
12931 ac_int64 b = 40000005;
12932
12933 int does_int64_work()
12934 {
12935   ac_int64 c,d;
12936
12937   if (sizeof(ac_int64) != 8)
12938     return 0;                   /* definitely not the right size */
12939
12940   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
12941   c = a * b;
12942   d = (c + b) / b;
12943   if (d != a+1)
12944     return 0;
12945   return 1;
12946 }
12947 main() {
12948   exit(! does_int64_work());
12949 }
12950 _ACEOF
12951 if ac_fn_c_try_run "$LINENO"; then :
12952   pgac_cv_type_long_int_64=yes
12953 else
12954   pgac_cv_type_long_int_64=no
12955 fi
12956 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12957   conftest.$ac_objext conftest.beam conftest.$ac_ext
12958 fi
12959
12960 fi
12961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
12962 $as_echo "$pgac_cv_type_long_int_64" >&6; }
12963
12964 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
12965 if test x"$pgac_cv_type_long_int_64" = xyes ; then
12966
12967 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
12968
12969 fi
12970
12971
12972 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
12973   pg_int64_type="long int"
12974 else
12975   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
12976 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
12977 if ${pgac_cv_type_long_long_int_64+:} false; then :
12978   $as_echo_n "(cached) " >&6
12979 else
12980   if test "$cross_compiling" = yes; then :
12981   # If cross-compiling, check the size reported by the compiler and
12982 # trust that the arithmetic works.
12983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12984 /* end confdefs.h.  */
12985
12986 int
12987 main ()
12988 {
12989 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
12990 test_array [0] = 0;
12991 return test_array [0];
12992
12993   ;
12994   return 0;
12995 }
12996 _ACEOF
12997 if ac_fn_c_try_compile "$LINENO"; then :
12998   pgac_cv_type_long_long_int_64=yes
12999 else
13000   pgac_cv_type_long_long_int_64=no
13001 fi
13002 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13003 else
13004   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13005 /* end confdefs.h.  */
13006 typedef long long int ac_int64;
13007
13008 /*
13009  * These are globals to discourage the compiler from folding all the
13010  * arithmetic tests down to compile-time constants.
13011  */
13012 ac_int64 a = 20000001;
13013 ac_int64 b = 40000005;
13014
13015 int does_int64_work()
13016 {
13017   ac_int64 c,d;
13018
13019   if (sizeof(ac_int64) != 8)
13020     return 0;                   /* definitely not the right size */
13021
13022   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
13023   c = a * b;
13024   d = (c + b) / b;
13025   if (d != a+1)
13026     return 0;
13027   return 1;
13028 }
13029 main() {
13030   exit(! does_int64_work());
13031 }
13032 _ACEOF
13033 if ac_fn_c_try_run "$LINENO"; then :
13034   pgac_cv_type_long_long_int_64=yes
13035 else
13036   pgac_cv_type_long_long_int_64=no
13037 fi
13038 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13039   conftest.$ac_objext conftest.beam conftest.$ac_ext
13040 fi
13041
13042 fi
13043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
13044 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
13045
13046 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
13047 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
13048
13049 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
13050
13051 fi
13052
13053   if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
13054     pg_int64_type="long long int"
13055   else
13056     as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
13057   fi
13058 fi
13059
13060
13061 cat >>confdefs.h <<_ACEOF
13062 #define PG_INT64_TYPE $pg_int64_type
13063 _ACEOF
13064
13065
13066
13067 if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
13068   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13069 /* end confdefs.h.  */
13070
13071 #define INT64CONST(x)  x##LL
13072 long long int foo = INT64CONST(0x1234567890123456);
13073
13074 int
13075 main ()
13076 {
13077
13078   ;
13079   return 0;
13080 }
13081 _ACEOF
13082 if ac_fn_c_try_compile "$LINENO"; then :
13083
13084 $as_echo "#define HAVE_LL_CONSTANTS 1" >>confdefs.h
13085
13086 fi
13087 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13088 fi
13089
13090
13091 # If we found "long int" is 64 bits, assume snprintf handles it.  If
13092 # we found we need to use "long long int", better check.  We cope with
13093 # snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
13094 # work, fall back to our own snprintf emulation (which we know uses %lld).
13095
13096 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
13097   if test $pgac_need_repl_snprintf = no; then
13098     { $as_echo "$as_me:${as_lineno-$LINENO}: checking snprintf length modifier for long long int" >&5
13099 $as_echo_n "checking snprintf length modifier for long long int... " >&6; }
13100 if ${pgac_cv_snprintf_long_long_int_modifier+:} false; then :
13101   $as_echo_n "(cached) " >&6
13102 else
13103   for pgac_modifier in 'll' 'q' 'I64'; do
13104 if test "$cross_compiling" = yes; then :
13105   pgac_cv_snprintf_long_long_int_modifier=cross; break
13106 else
13107   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13108 /* end confdefs.h.  */
13109 #include <stdio.h>
13110 typedef long long int ac_int64;
13111 #define INT64_FORMAT "%${pgac_modifier}d"
13112
13113 ac_int64 a = 20000001;
13114 ac_int64 b = 40000005;
13115
13116 int does_int64_snprintf_work()
13117 {
13118   ac_int64 c;
13119   char buf[100];
13120
13121   if (sizeof(ac_int64) != 8)
13122     return 0;                   /* doesn't look like the right size */
13123
13124   c = a * b;
13125   snprintf(buf, 100, INT64_FORMAT, c);
13126   if (strcmp(buf, "800000140000005") != 0)
13127     return 0;                   /* either multiply or snprintf is busted */
13128   return 1;
13129 }
13130 main() {
13131   exit(! does_int64_snprintf_work());
13132 }
13133 _ACEOF
13134 if ac_fn_c_try_run "$LINENO"; then :
13135   pgac_cv_snprintf_long_long_int_modifier=$pgac_modifier; break
13136 fi
13137 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13138   conftest.$ac_objext conftest.beam conftest.$ac_ext
13139 fi
13140
13141 done
13142 fi
13143
13144 LONG_LONG_INT_MODIFIER=''
13145
13146 case $pgac_cv_snprintf_long_long_int_modifier in
13147   cross) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot test (not on host machine)" >&5
13148 $as_echo "cannot test (not on host machine)" >&6; };;
13149   ?*)    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_long_long_int_modifier" >&5
13150 $as_echo "$pgac_cv_snprintf_long_long_int_modifier" >&6; }
13151          LONG_LONG_INT_MODIFIER=$pgac_cv_snprintf_long_long_int_modifier;;
13152   *)     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13153 $as_echo "none" >&6; };;
13154 esac
13155     if test "$LONG_LONG_INT_MODIFIER" = ""; then
13156       # Force usage of our own snprintf, since system snprintf is broken
13157       pgac_need_repl_snprintf=yes
13158       LONG_LONG_INT_MODIFIER='ll'
13159     fi
13160   else
13161     # Here if we previously decided we needed to use our own snprintf
13162     LONG_LONG_INT_MODIFIER='ll'
13163   fi
13164 else
13165   # Here if we are not using 'long long int' at all
13166   LONG_LONG_INT_MODIFIER='l'
13167 fi
13168
13169 INT64_MODIFIER="\"$LONG_LONG_INT_MODIFIER\""
13170
13171
13172 cat >>confdefs.h <<_ACEOF
13173 #define INT64_MODIFIER $INT64_MODIFIER
13174 _ACEOF
13175
13176
13177 # Also force use of our snprintf if the system's doesn't support the %z flag.
13178 if test "$pgac_need_repl_snprintf" = no; then
13179   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports the %z modifier" >&5
13180 $as_echo_n "checking whether snprintf supports the %z modifier... " >&6; }
13181 if ${pgac_cv_snprintf_size_t_support+:} false; then :
13182   $as_echo_n "(cached) " >&6
13183 else
13184   if test "$cross_compiling" = yes; then :
13185   pgac_cv_snprintf_size_t_support=cross
13186 else
13187   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13188 /* end confdefs.h.  */
13189 #include <stdio.h>
13190 #include <string.h>
13191
13192 int main()
13193 {
13194   char bufz[100];
13195   char buf64[100];
13196
13197   /*
13198    * Print the largest unsigned number fitting in a size_t using both %zu
13199    * and the previously-determined format for 64-bit integers.  Note that
13200    * we don't run this code unless we know snprintf handles 64-bit ints.
13201    */
13202   bufz[0] = '\0';  /* in case snprintf fails to emit anything */
13203   snprintf(bufz, sizeof(bufz), "%zu", ~((size_t) 0));
13204   snprintf(buf64, sizeof(buf64), "%" INT64_MODIFIER "u",
13205     (unsigned PG_INT64_TYPE) ~((size_t) 0));
13206   if (strcmp(bufz, buf64) != 0)
13207     return 1;
13208   return 0;
13209 }
13210 _ACEOF
13211 if ac_fn_c_try_run "$LINENO"; then :
13212   pgac_cv_snprintf_size_t_support=yes
13213 else
13214   pgac_cv_snprintf_size_t_support=no
13215 fi
13216 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13217   conftest.$ac_objext conftest.beam conftest.$ac_ext
13218 fi
13219
13220
13221 fi
13222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_size_t_support" >&5
13223 $as_echo "$pgac_cv_snprintf_size_t_support" >&6; }
13224
13225   if test "$pgac_cv_snprintf_size_t_support" != yes; then
13226     pgac_need_repl_snprintf=yes
13227   fi
13228 fi
13229
13230 # Now we have checked all the reasons to replace snprintf
13231 if test $pgac_need_repl_snprintf = yes; then
13232
13233 $as_echo "#define USE_REPL_SNPRINTF 1" >>confdefs.h
13234
13235   case " $LIBOBJS " in
13236   *" snprintf.$ac_objext "* ) ;;
13237   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
13238  ;;
13239 esac
13240
13241 fi
13242
13243 # Check size of void *, size_t (enables tweaks for > 32bit address space)
13244 # The cast to long int works around a bug in the HP C Compiler
13245 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13246 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13247 # This bug is HP SR number 8606223364.
13248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
13249 $as_echo_n "checking size of void *... " >&6; }
13250 if ${ac_cv_sizeof_void_p+:} false; then :
13251   $as_echo_n "(cached) " >&6
13252 else
13253   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
13254
13255 else
13256   if test "$ac_cv_type_void_p" = yes; then
13257      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13258 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13259 as_fn_error 77 "cannot compute sizeof (void *)
13260 See \`config.log' for more details" "$LINENO" 5; }
13261    else
13262      ac_cv_sizeof_void_p=0
13263    fi
13264 fi
13265
13266 fi
13267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
13268 $as_echo "$ac_cv_sizeof_void_p" >&6; }
13269
13270
13271
13272 cat >>confdefs.h <<_ACEOF
13273 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
13274 _ACEOF
13275
13276
13277 # The cast to long int works around a bug in the HP C Compiler
13278 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13279 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13280 # This bug is HP SR number 8606223364.
13281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
13282 $as_echo_n "checking size of size_t... " >&6; }
13283 if ${ac_cv_sizeof_size_t+:} false; then :
13284   $as_echo_n "(cached) " >&6
13285 else
13286   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
13287
13288 else
13289   if test "$ac_cv_type_size_t" = yes; then
13290      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13291 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13292 as_fn_error 77 "cannot compute sizeof (size_t)
13293 See \`config.log' for more details" "$LINENO" 5; }
13294    else
13295      ac_cv_sizeof_size_t=0
13296    fi
13297 fi
13298
13299 fi
13300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
13301 $as_echo "$ac_cv_sizeof_size_t" >&6; }
13302
13303
13304
13305 cat >>confdefs.h <<_ACEOF
13306 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
13307 _ACEOF
13308
13309
13310 # The cast to long int works around a bug in the HP C Compiler
13311 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13312 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13313 # This bug is HP SR number 8606223364.
13314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
13315 $as_echo_n "checking size of long... " >&6; }
13316 if ${ac_cv_sizeof_long+:} false; then :
13317   $as_echo_n "(cached) " >&6
13318 else
13319   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
13320
13321 else
13322   if test "$ac_cv_type_long" = yes; then
13323      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13324 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13325 as_fn_error 77 "cannot compute sizeof (long)
13326 See \`config.log' for more details" "$LINENO" 5; }
13327    else
13328      ac_cv_sizeof_long=0
13329    fi
13330 fi
13331
13332 fi
13333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
13334 $as_echo "$ac_cv_sizeof_long" >&6; }
13335
13336
13337
13338 cat >>confdefs.h <<_ACEOF
13339 #define SIZEOF_LONG $ac_cv_sizeof_long
13340 _ACEOF
13341
13342
13343
13344 # Decide whether float4 is passed by value: user-selectable, enabled by default
13345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float4 passed by value" >&5
13346 $as_echo_n "checking whether to build with float4 passed by value... " >&6; }
13347
13348
13349 # Check whether --enable-float4-byval was given.
13350 if test "${enable_float4_byval+set}" = set; then :
13351   enableval=$enable_float4_byval;
13352   case $enableval in
13353     yes)
13354
13355 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
13356
13357                float4passbyval=true
13358       ;;
13359     no)
13360       float4passbyval=false
13361       ;;
13362     *)
13363       as_fn_error $? "no argument expected for --enable-float4-byval option" "$LINENO" 5
13364       ;;
13365   esac
13366
13367 else
13368   enable_float4_byval=yes
13369
13370 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
13371
13372                float4passbyval=true
13373 fi
13374
13375
13376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float4_byval" >&5
13377 $as_echo "$enable_float4_byval" >&6; }
13378
13379 cat >>confdefs.h <<_ACEOF
13380 #define FLOAT4PASSBYVAL $float4passbyval
13381 _ACEOF
13382
13383
13384 # Decide whether float8 is passed by value.
13385 # Note: this setting also controls int8 and related types such as timestamp.
13386 # If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
13387 # If not, trying to select it is an error.
13388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float8 passed by value" >&5
13389 $as_echo_n "checking whether to build with float8 passed by value... " >&6; }
13390 if test $ac_cv_sizeof_void_p -ge 8 ; then
13391
13392
13393 # Check whether --enable-float8-byval was given.
13394 if test "${enable_float8_byval+set}" = set; then :
13395   enableval=$enable_float8_byval;
13396   case $enableval in
13397     yes)
13398       :
13399       ;;
13400     no)
13401       :
13402       ;;
13403     *)
13404       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
13405       ;;
13406   esac
13407
13408 else
13409   enable_float8_byval=yes
13410
13411 fi
13412
13413
13414 else
13415
13416
13417 # Check whether --enable-float8-byval was given.
13418 if test "${enable_float8_byval+set}" = set; then :
13419   enableval=$enable_float8_byval;
13420   case $enableval in
13421     yes)
13422       :
13423       ;;
13424     no)
13425       :
13426       ;;
13427     *)
13428       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
13429       ;;
13430   esac
13431
13432 else
13433   enable_float8_byval=no
13434
13435 fi
13436
13437
13438   if test "$enable_float8_byval" = yes ; then
13439     as_fn_error $? "--enable-float8-byval is not supported on 32-bit platforms." "$LINENO" 5
13440   fi
13441 fi
13442 if test "$enable_float8_byval" = yes ; then
13443
13444 $as_echo "#define USE_FLOAT8_BYVAL 1" >>confdefs.h
13445
13446   float8passbyval=true
13447 else
13448   float8passbyval=false
13449 fi
13450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float8_byval" >&5
13451 $as_echo "$enable_float8_byval" >&6; }
13452
13453 cat >>confdefs.h <<_ACEOF
13454 #define FLOAT8PASSBYVAL $float8passbyval
13455 _ACEOF
13456
13457
13458 # Determine memory alignment requirements for the basic C data types.
13459
13460 # The cast to long int works around a bug in the HP C Compiler,
13461 # see AC_CHECK_SIZEOF for more information.
13462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
13463 $as_echo_n "checking alignment of short... " >&6; }
13464 if ${ac_cv_alignof_short+:} false; then :
13465   $as_echo_n "(cached) " >&6
13466 else
13467   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short"        "$ac_includes_default
13468 #ifndef offsetof
13469 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13470 #endif
13471 typedef struct { char x; short y; } ac__type_alignof_;"; then :
13472
13473 else
13474   if test "$ac_cv_type_short" = yes; then
13475      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13476 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13477 as_fn_error 77 "cannot compute alignment of short
13478 See \`config.log' for more details" "$LINENO" 5; }
13479    else
13480      ac_cv_alignof_short=0
13481    fi
13482 fi
13483
13484 fi
13485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
13486 $as_echo "$ac_cv_alignof_short" >&6; }
13487
13488
13489
13490 cat >>confdefs.h <<_ACEOF
13491 #define ALIGNOF_SHORT $ac_cv_alignof_short
13492 _ACEOF
13493
13494
13495 # The cast to long int works around a bug in the HP C Compiler,
13496 # see AC_CHECK_SIZEOF for more information.
13497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
13498 $as_echo_n "checking alignment of int... " >&6; }
13499 if ${ac_cv_alignof_int+:} false; then :
13500   $as_echo_n "(cached) " >&6
13501 else
13502   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int"        "$ac_includes_default
13503 #ifndef offsetof
13504 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13505 #endif
13506 typedef struct { char x; int y; } ac__type_alignof_;"; then :
13507
13508 else
13509   if test "$ac_cv_type_int" = yes; then
13510      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13511 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13512 as_fn_error 77 "cannot compute alignment of int
13513 See \`config.log' for more details" "$LINENO" 5; }
13514    else
13515      ac_cv_alignof_int=0
13516    fi
13517 fi
13518
13519 fi
13520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
13521 $as_echo "$ac_cv_alignof_int" >&6; }
13522
13523
13524
13525 cat >>confdefs.h <<_ACEOF
13526 #define ALIGNOF_INT $ac_cv_alignof_int
13527 _ACEOF
13528
13529
13530 # The cast to long int works around a bug in the HP C Compiler,
13531 # see AC_CHECK_SIZEOF for more information.
13532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
13533 $as_echo_n "checking alignment of long... " >&6; }
13534 if ${ac_cv_alignof_long+:} false; then :
13535   $as_echo_n "(cached) " >&6
13536 else
13537   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long"        "$ac_includes_default
13538 #ifndef offsetof
13539 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13540 #endif
13541 typedef struct { char x; long y; } ac__type_alignof_;"; then :
13542
13543 else
13544   if test "$ac_cv_type_long" = yes; then
13545      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13546 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13547 as_fn_error 77 "cannot compute alignment of long
13548 See \`config.log' for more details" "$LINENO" 5; }
13549    else
13550      ac_cv_alignof_long=0
13551    fi
13552 fi
13553
13554 fi
13555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
13556 $as_echo "$ac_cv_alignof_long" >&6; }
13557
13558
13559
13560 cat >>confdefs.h <<_ACEOF
13561 #define ALIGNOF_LONG $ac_cv_alignof_long
13562 _ACEOF
13563
13564
13565 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
13566   # The cast to long int works around a bug in the HP C Compiler,
13567 # see AC_CHECK_SIZEOF for more information.
13568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
13569 $as_echo_n "checking alignment of long long int... " >&6; }
13570 if ${ac_cv_alignof_long_long_int+:} false; then :
13571   $as_echo_n "(cached) " >&6
13572 else
13573   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int"        "$ac_includes_default
13574 #ifndef offsetof
13575 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13576 #endif
13577 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
13578
13579 else
13580   if test "$ac_cv_type_long_long_int" = yes; then
13581      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13582 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13583 as_fn_error 77 "cannot compute alignment of long long int
13584 See \`config.log' for more details" "$LINENO" 5; }
13585    else
13586      ac_cv_alignof_long_long_int=0
13587    fi
13588 fi
13589
13590 fi
13591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
13592 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
13593
13594
13595
13596 cat >>confdefs.h <<_ACEOF
13597 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
13598 _ACEOF
13599
13600
13601 fi
13602 # The cast to long int works around a bug in the HP C Compiler,
13603 # see AC_CHECK_SIZEOF for more information.
13604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
13605 $as_echo_n "checking alignment of double... " >&6; }
13606 if ${ac_cv_alignof_double+:} false; then :
13607   $as_echo_n "(cached) " >&6
13608 else
13609   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double"        "$ac_includes_default
13610 #ifndef offsetof
13611 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13612 #endif
13613 typedef struct { char x; double y; } ac__type_alignof_;"; then :
13614
13615 else
13616   if test "$ac_cv_type_double" = yes; then
13617      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13618 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13619 as_fn_error 77 "cannot compute alignment of double
13620 See \`config.log' for more details" "$LINENO" 5; }
13621    else
13622      ac_cv_alignof_double=0
13623    fi
13624 fi
13625
13626 fi
13627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
13628 $as_echo "$ac_cv_alignof_double" >&6; }
13629
13630
13631
13632 cat >>confdefs.h <<_ACEOF
13633 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
13634 _ACEOF
13635
13636
13637
13638 # Compute maximum alignment of any basic type.
13639 # We assume long's alignment is at least as strong as char, short, or int;
13640 # but we must check long long (if it exists) and double.
13641
13642 MAX_ALIGNOF=$ac_cv_alignof_long
13643 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
13644   MAX_ALIGNOF=$ac_cv_alignof_double
13645 fi
13646 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
13647   MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
13648 fi
13649
13650 cat >>confdefs.h <<_ACEOF
13651 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
13652 _ACEOF
13653
13654
13655
13656 # Some platforms predefine the types int8, int16, etc.  Only check
13657 # a (hopefully) representative subset.
13658 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
13659 "
13660 if test "x$ac_cv_type_int8" = xyes; then :
13661
13662 cat >>confdefs.h <<_ACEOF
13663 #define HAVE_INT8 1
13664 _ACEOF
13665
13666
13667 fi
13668 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
13669 "
13670 if test "x$ac_cv_type_uint8" = xyes; then :
13671
13672 cat >>confdefs.h <<_ACEOF
13673 #define HAVE_UINT8 1
13674 _ACEOF
13675
13676
13677 fi
13678 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
13679 "
13680 if test "x$ac_cv_type_int64" = xyes; then :
13681
13682 cat >>confdefs.h <<_ACEOF
13683 #define HAVE_INT64 1
13684 _ACEOF
13685
13686
13687 fi
13688 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
13689 "
13690 if test "x$ac_cv_type_uint64" = xyes; then :
13691
13692 cat >>confdefs.h <<_ACEOF
13693 #define HAVE_UINT64 1
13694 _ACEOF
13695
13696
13697 fi
13698
13699
13700 # We also check for sig_atomic_t, which *should* be defined per ANSI
13701 # C, but is missing on some old platforms.
13702 ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "#include <signal.h>
13703 "
13704 if test "x$ac_cv_type_sig_atomic_t" = xyes; then :
13705
13706 cat >>confdefs.h <<_ACEOF
13707 #define HAVE_SIG_ATOMIC_T 1
13708 _ACEOF
13709
13710
13711 fi
13712
13713
13714
13715 if test "$PORTNAME" != "win32"
13716 then
13717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for POSIX signal interface" >&5
13718 $as_echo_n "checking for POSIX signal interface... " >&6; }
13719 if ${pgac_cv_func_posix_signals+:} false; then :
13720   $as_echo_n "(cached) " >&6
13721 else
13722   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13723 /* end confdefs.h.  */
13724 #include <signal.h>
13725
13726 int
13727 main ()
13728 {
13729 struct sigaction act, oact;
13730 sigemptyset(&act.sa_mask);
13731 act.sa_flags = SA_RESTART;
13732 sigaction(0, &act, &oact);
13733   ;
13734   return 0;
13735 }
13736 _ACEOF
13737 if ac_fn_c_try_link "$LINENO"; then :
13738   pgac_cv_func_posix_signals=yes
13739 else
13740   pgac_cv_func_posix_signals=no
13741 fi
13742 rm -f core conftest.err conftest.$ac_objext \
13743     conftest$ac_exeext conftest.$ac_ext
13744 fi
13745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_posix_signals" >&5
13746 $as_echo "$pgac_cv_func_posix_signals" >&6; }
13747 if test x"$pgac_cv_func_posix_signals" = xyes ; then
13748
13749 $as_echo "#define HAVE_POSIX_SIGNALS 1" >>confdefs.h
13750
13751 fi
13752 HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
13753
13754 if test "$pgac_cv_func_posix_signals" != yes -a "$enable_thread_safety" = yes; then
13755   as_fn_error $? "
13756 Thread-safety requires POSIX signals, which are not supported by this
13757 operating system;  use --disable-thread-safety to disable thread safety." "$LINENO" 5
13758 fi
13759 fi
13760
13761
13762 # Select semaphore implementation type.
13763 if test "$PORTNAME" != "win32"; then
13764   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
13765
13766 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
13767
13768     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
13769   else
13770     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
13771
13772 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
13773
13774       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
13775     else
13776
13777 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
13778
13779       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
13780     fi
13781   fi
13782 else
13783
13784 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
13785
13786   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
13787 fi
13788
13789
13790 # Select shared-memory implementation type.
13791 if test "$PORTNAME" != "win32"; then
13792
13793 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
13794
13795   SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
13796 else
13797
13798 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
13799
13800   SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
13801 fi
13802
13803 # Select latch implementation type.
13804 if test "$PORTNAME" != "win32"; then
13805   LATCH_IMPLEMENTATION="src/backend/port/unix_latch.c"
13806 else
13807   LATCH_IMPLEMENTATION="src/backend/port/win32_latch.c"
13808 fi
13809
13810 # If not set in template file, set bytes to use libc memset()
13811 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
13812   MEMSET_LOOP_LIMIT=1024
13813 fi
13814
13815 cat >>confdefs.h <<_ACEOF
13816 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
13817 _ACEOF
13818
13819
13820
13821 if test "$enable_nls" = yes ; then
13822
13823   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
13824 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
13825 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
13826   $as_echo_n "(cached) " >&6
13827 else
13828   ac_func_search_save_LIBS=$LIBS
13829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13830 /* end confdefs.h.  */
13831
13832 /* Override any GCC internal prototype to avoid an error.
13833    Use char because int might match the return type of a GCC
13834    builtin and then its argument prototype would still apply.  */
13835 #ifdef __cplusplus
13836 extern "C"
13837 #endif
13838 char bind_textdomain_codeset ();
13839 int
13840 main ()
13841 {
13842 return bind_textdomain_codeset ();
13843   ;
13844   return 0;
13845 }
13846 _ACEOF
13847 for ac_lib in '' intl; do
13848   if test -z "$ac_lib"; then
13849     ac_res="none required"
13850   else
13851     ac_res=-l$ac_lib
13852     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
13853   fi
13854   if ac_fn_c_try_link "$LINENO"; then :
13855   ac_cv_search_bind_textdomain_codeset=$ac_res
13856 fi
13857 rm -f core conftest.err conftest.$ac_objext \
13858     conftest$ac_exeext
13859   if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
13860   break
13861 fi
13862 done
13863 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
13864
13865 else
13866   ac_cv_search_bind_textdomain_codeset=no
13867 fi
13868 rm conftest.$ac_ext
13869 LIBS=$ac_func_search_save_LIBS
13870 fi
13871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
13872 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
13873 ac_res=$ac_cv_search_bind_textdomain_codeset
13874 if test "$ac_res" != no; then :
13875   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13876
13877 else
13878   as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
13879 fi
13880
13881   ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
13882 if test "x$ac_cv_header_libintl_h" = xyes; then :
13883
13884 else
13885   as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
13886 fi
13887
13888
13889   for ac_prog in msgfmt
13890 do
13891   # Extract the first word of "$ac_prog", so it can be a program name with args.
13892 set dummy $ac_prog; ac_word=$2
13893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13894 $as_echo_n "checking for $ac_word... " >&6; }
13895 if ${ac_cv_prog_MSGFMT+:} false; then :
13896   $as_echo_n "(cached) " >&6
13897 else
13898   if test -n "$MSGFMT"; then
13899   ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
13900 else
13901 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13902 for as_dir in $PATH
13903 do
13904   IFS=$as_save_IFS
13905   test -z "$as_dir" && as_dir=.
13906     for ac_exec_ext in '' $ac_executable_extensions; do
13907   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13908     ac_cv_prog_MSGFMT="$ac_prog"
13909     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13910     break 2
13911   fi
13912 done
13913   done
13914 IFS=$as_save_IFS
13915
13916 fi
13917 fi
13918 MSGFMT=$ac_cv_prog_MSGFMT
13919 if test -n "$MSGFMT"; then
13920   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
13921 $as_echo "$MSGFMT" >&6; }
13922 else
13923   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13924 $as_echo "no" >&6; }
13925 fi
13926
13927
13928   test -n "$MSGFMT" && break
13929 done
13930
13931   if test -z "$MSGFMT"; then
13932     as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
13933   fi
13934   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
13935 $as_echo_n "checking for msgfmt flags... " >&6; }
13936 if ${pgac_cv_msgfmt_flags+:} false; then :
13937   $as_echo_n "(cached) " >&6
13938 else
13939   if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
13940     pgac_cv_msgfmt_flags=-c
13941 fi
13942 fi
13943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
13944 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
13945   MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
13946
13947   for ac_prog in msgmerge
13948 do
13949   # Extract the first word of "$ac_prog", so it can be a program name with args.
13950 set dummy $ac_prog; ac_word=$2
13951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13952 $as_echo_n "checking for $ac_word... " >&6; }
13953 if ${ac_cv_prog_MSGMERGE+:} false; then :
13954   $as_echo_n "(cached) " >&6
13955 else
13956   if test -n "$MSGMERGE"; then
13957   ac_cv_prog_MSGMERGE="$MSGMERGE" # Let the user override the test.
13958 else
13959 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13960 for as_dir in $PATH
13961 do
13962   IFS=$as_save_IFS
13963   test -z "$as_dir" && as_dir=.
13964     for ac_exec_ext in '' $ac_executable_extensions; do
13965   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13966     ac_cv_prog_MSGMERGE="$ac_prog"
13967     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13968     break 2
13969   fi
13970 done
13971   done
13972 IFS=$as_save_IFS
13973
13974 fi
13975 fi
13976 MSGMERGE=$ac_cv_prog_MSGMERGE
13977 if test -n "$MSGMERGE"; then
13978   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
13979 $as_echo "$MSGMERGE" >&6; }
13980 else
13981   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13982 $as_echo "no" >&6; }
13983 fi
13984
13985
13986   test -n "$MSGMERGE" && break
13987 done
13988
13989   for ac_prog in xgettext
13990 do
13991   # Extract the first word of "$ac_prog", so it can be a program name with args.
13992 set dummy $ac_prog; ac_word=$2
13993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13994 $as_echo_n "checking for $ac_word... " >&6; }
13995 if ${ac_cv_prog_XGETTEXT+:} false; then :
13996   $as_echo_n "(cached) " >&6
13997 else
13998   if test -n "$XGETTEXT"; then
13999   ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test.
14000 else
14001 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14002 for as_dir in $PATH
14003 do
14004   IFS=$as_save_IFS
14005   test -z "$as_dir" && as_dir=.
14006     for ac_exec_ext in '' $ac_executable_extensions; do
14007   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14008     ac_cv_prog_XGETTEXT="$ac_prog"
14009     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14010     break 2
14011   fi
14012 done
14013   done
14014 IFS=$as_save_IFS
14015
14016 fi
14017 fi
14018 XGETTEXT=$ac_cv_prog_XGETTEXT
14019 if test -n "$XGETTEXT"; then
14020   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
14021 $as_echo "$XGETTEXT" >&6; }
14022 else
14023   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14024 $as_echo "no" >&6; }
14025 fi
14026
14027
14028   test -n "$XGETTEXT" && break
14029 done
14030
14031
14032 fi
14033
14034 # Check for Tcl configuration script tclConfig.sh
14035 if test "$with_tcl" = yes; then
14036     for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84 tclsh8.3 tclsh83
14037 do
14038   # Extract the first word of "$ac_prog", so it can be a program name with args.
14039 set dummy $ac_prog; ac_word=$2
14040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14041 $as_echo_n "checking for $ac_word... " >&6; }
14042 if ${ac_cv_path_TCLSH+:} false; then :
14043   $as_echo_n "(cached) " >&6
14044 else
14045   case $TCLSH in
14046   [\\/]* | ?:[\\/]*)
14047   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
14048   ;;
14049   *)
14050   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14051 for as_dir in $PATH
14052 do
14053   IFS=$as_save_IFS
14054   test -z "$as_dir" && as_dir=.
14055     for ac_exec_ext in '' $ac_executable_extensions; do
14056   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14057     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
14058     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14059     break 2
14060   fi
14061 done
14062   done
14063 IFS=$as_save_IFS
14064
14065   ;;
14066 esac
14067 fi
14068 TCLSH=$ac_cv_path_TCLSH
14069 if test -n "$TCLSH"; then
14070   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
14071 $as_echo "$TCLSH" >&6; }
14072 else
14073   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14074 $as_echo "no" >&6; }
14075 fi
14076
14077
14078   test -n "$TCLSH" && break
14079 done
14080
14081 if test x"$TCLSH" = x""; then
14082   as_fn_error $? "Tcl shell not found" "$LINENO" 5
14083 fi
14084
14085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
14086 $as_echo_n "checking for tclConfig.sh... " >&6; }
14087 # Let user override test
14088 if test -z "$TCL_CONFIG_SH"; then
14089     pgac_test_dirs="$with_tclconfig"
14090
14091     set X $pgac_test_dirs; shift
14092     if test $# -eq 0; then
14093         test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
14094         set X `echo 'puts $auto_path' | $TCLSH`; shift
14095     fi
14096
14097     for pgac_dir do
14098         if test -r "$pgac_dir/tclConfig.sh"; then
14099             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
14100             break
14101         fi
14102     done
14103 fi
14104
14105 if test -z "$TCL_CONFIG_SH"; then
14106     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14107 $as_echo "no" >&6; }
14108     as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
14109 else
14110     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
14111 $as_echo "$TCL_CONFIG_SH" >&6; }
14112 fi
14113
14114
14115
14116     . "$TCL_CONFIG_SH"
14117 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
14118 eval TCL_LIB_FILE=\"$TCL_LIB_FILE\"
14119 eval TCL_LIBS=\"$TCL_LIBS\"
14120 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
14121 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
14122
14123         # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
14124     ac_save_CPPFLAGS=$CPPFLAGS
14125     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
14126     ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
14127 if test "x$ac_cv_header_tcl_h" = xyes; then :
14128
14129 else
14130   as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
14131 fi
14132
14133
14134     CPPFLAGS=$ac_save_CPPFLAGS
14135 fi
14136
14137 # check for <perl.h>
14138 if test "$with_perl" = yes; then
14139   ac_save_CPPFLAGS=$CPPFLAGS
14140   CPPFLAGS="$CPPFLAGS -I$perl_archlibexp/CORE"
14141   ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
14142 "
14143 if test "x$ac_cv_header_perl_h" = xyes; then :
14144
14145 else
14146   as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
14147 fi
14148
14149
14150   # While we're at it, check that we can link to libperl.
14151   # On most platforms, if perl.h is there then libperl.so will be too, but at
14152   # this writing Debian packages them separately.  There is no known reason to
14153   # waste cycles on separate probes for the Tcl or Python libraries, though.
14154   pgac_save_LIBS=$LIBS
14155   LIBS="$perl_embed_ldflags"
14156   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
14157 $as_echo_n "checking for libperl... " >&6; }
14158   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14159 /* end confdefs.h.  */
14160
14161 #include <EXTERN.h>
14162 #include <perl.h>
14163
14164 int
14165 main ()
14166 {
14167 perl_alloc();
14168   ;
14169   return 0;
14170 }
14171 _ACEOF
14172 if ac_fn_c_try_link "$LINENO"; then :
14173   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14174 $as_echo "yes" >&6; }
14175 else
14176   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14177 $as_echo "no" >&6; }
14178      as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
14179 fi
14180 rm -f core conftest.err conftest.$ac_objext \
14181     conftest$ac_exeext conftest.$ac_ext
14182   LIBS=$pgac_save_LIBS
14183   CPPFLAGS=$ac_save_CPPFLAGS
14184 fi
14185
14186 # check for <Python.h>
14187 if test "$with_python" = yes; then
14188   ac_save_CPPFLAGS=$CPPFLAGS
14189   CPPFLAGS="$python_includespec $CPPFLAGS"
14190   ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
14191 if test "x$ac_cv_header_Python_h" = xyes; then :
14192
14193 else
14194   as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
14195 fi
14196
14197
14198   CPPFLAGS=$ac_save_CPPFLAGS
14199 fi
14200
14201 #
14202 # Check for DocBook and tools
14203 #
14204 for ac_prog in onsgmls nsgmls
14205 do
14206   # Extract the first word of "$ac_prog", so it can be a program name with args.
14207 set dummy $ac_prog; ac_word=$2
14208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14209 $as_echo_n "checking for $ac_word... " >&6; }
14210 if ${ac_cv_prog_NSGMLS+:} false; then :
14211   $as_echo_n "(cached) " >&6
14212 else
14213   if test -n "$NSGMLS"; then
14214   ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
14215 else
14216 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14217 for as_dir in $PATH
14218 do
14219   IFS=$as_save_IFS
14220   test -z "$as_dir" && as_dir=.
14221     for ac_exec_ext in '' $ac_executable_extensions; do
14222   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14223     ac_cv_prog_NSGMLS="$ac_prog"
14224     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14225     break 2
14226   fi
14227 done
14228   done
14229 IFS=$as_save_IFS
14230
14231 fi
14232 fi
14233 NSGMLS=$ac_cv_prog_NSGMLS
14234 if test -n "$NSGMLS"; then
14235   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NSGMLS" >&5
14236 $as_echo "$NSGMLS" >&6; }
14237 else
14238   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14239 $as_echo "no" >&6; }
14240 fi
14241
14242
14243   test -n "$NSGMLS" && break
14244 done
14245
14246 for ac_prog in openjade jade
14247 do
14248   # Extract the first word of "$ac_prog", so it can be a program name with args.
14249 set dummy $ac_prog; ac_word=$2
14250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14251 $as_echo_n "checking for $ac_word... " >&6; }
14252 if ${ac_cv_prog_JADE+:} false; then :
14253   $as_echo_n "(cached) " >&6
14254 else
14255   if test -n "$JADE"; then
14256   ac_cv_prog_JADE="$JADE" # Let the user override the test.
14257 else
14258 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14259 for as_dir in $PATH
14260 do
14261   IFS=$as_save_IFS
14262   test -z "$as_dir" && as_dir=.
14263     for ac_exec_ext in '' $ac_executable_extensions; do
14264   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14265     ac_cv_prog_JADE="$ac_prog"
14266     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14267     break 2
14268   fi
14269 done
14270   done
14271 IFS=$as_save_IFS
14272
14273 fi
14274 fi
14275 JADE=$ac_cv_prog_JADE
14276 if test -n "$JADE"; then
14277   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JADE" >&5
14278 $as_echo "$JADE" >&6; }
14279 else
14280   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14281 $as_echo "no" >&6; }
14282 fi
14283
14284
14285   test -n "$JADE" && break
14286 done
14287
14288
14289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook V4.2" >&5
14290 $as_echo_n "checking for DocBook V4.2... " >&6; }
14291 if ${pgac_cv_check_docbook+:} false; then :
14292   $as_echo_n "(cached) " >&6
14293 else
14294   cat >conftest.sgml <<EOF
14295 <!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
14296 <book>
14297  <title>test</title>
14298  <chapter>
14299   <title>random</title>
14300    <sect1>
14301     <title>testsect</title>
14302     <para>text</para>
14303   </sect1>
14304  </chapter>
14305 </book>
14306 EOF
14307
14308 pgac_cv_check_docbook=no
14309
14310 if test -n "$NSGMLS"; then
14311   $NSGMLS -s conftest.sgml 1>&5 2>&1
14312   if test $? -eq 0; then
14313     pgac_cv_check_docbook=yes
14314   fi
14315 fi
14316 rm -f conftest.sgml
14317 fi
14318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_docbook" >&5
14319 $as_echo "$pgac_cv_check_docbook" >&6; }
14320
14321 have_docbook=$pgac_cv_check_docbook
14322
14323
14324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook stylesheets" >&5
14325 $as_echo_n "checking for DocBook stylesheets... " >&6; }
14326 if ${pgac_cv_path_stylesheets+:} false; then :
14327   $as_echo_n "(cached) " >&6
14328 else
14329   if test -n "$DOCBOOKSTYLE"; then
14330   pgac_cv_path_stylesheets=$DOCBOOKSTYLE
14331 else
14332   for pgac_prefix in /usr /usr/local /opt /sw; do
14333     for pgac_infix in share lib; do
14334       for pgac_postfix in \
14335         sgml/stylesheets/nwalsh-modular \
14336         sgml/stylesheets/docbook \
14337         sgml/stylesheets/dsssl/docbook \
14338         sgml/docbook-dsssl \
14339         sgml/docbook/dsssl/modular \
14340         sgml/docbook/stylesheet/dsssl/modular \
14341         sgml/docbook/dsssl-stylesheets \
14342         sgml/dsssl/docbook-dsssl-nwalsh
14343       do
14344         pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
14345         if test -r "$pgac_candidate/html/docbook.dsl" \
14346            && test -r "$pgac_candidate/print/docbook.dsl"
14347         then
14348           pgac_cv_path_stylesheets=$pgac_candidate
14349           break 3
14350         fi
14351       done
14352     done
14353   done
14354 fi
14355 fi
14356
14357 DOCBOOKSTYLE=$pgac_cv_path_stylesheets
14358
14359 if test -n "$DOCBOOKSTYLE"; then
14360   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOCBOOKSTYLE" >&5
14361 $as_echo "$DOCBOOKSTYLE" >&6; }
14362 else
14363   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14364 $as_echo "no" >&6; }
14365 fi
14366 if test -n "$DOCBOOKSTYLE" -a -r "$DOCBOOKSTYLE/bin/collateindex.pl"; then
14367   COLLATEINDEX="$DOCBOOKSTYLE/bin/collateindex.pl"
14368
14369 else
14370   # Extract the first word of "collateindex.pl", so it can be a program name with args.
14371 set dummy collateindex.pl; ac_word=$2
14372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14373 $as_echo_n "checking for $ac_word... " >&6; }
14374 if ${ac_cv_path_COLLATEINDEX+:} false; then :
14375   $as_echo_n "(cached) " >&6
14376 else
14377   case $COLLATEINDEX in
14378   [\\/]* | ?:[\\/]*)
14379   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
14380   ;;
14381   *)
14382   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14383 for as_dir in $PATH
14384 do
14385   IFS=$as_save_IFS
14386   test -z "$as_dir" && as_dir=.
14387     for ac_exec_ext in '' $ac_executable_extensions; do
14388   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14389     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
14390     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14391     break 2
14392   fi
14393 done
14394   done
14395 IFS=$as_save_IFS
14396
14397   ;;
14398 esac
14399 fi
14400 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
14401 if test -n "$COLLATEINDEX"; then
14402   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COLLATEINDEX" >&5
14403 $as_echo "$COLLATEINDEX" >&6; }
14404 else
14405   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14406 $as_echo "no" >&6; }
14407 fi
14408
14409
14410 fi
14411 for ac_prog in dbtoepub
14412 do
14413   # Extract the first word of "$ac_prog", so it can be a program name with args.
14414 set dummy $ac_prog; ac_word=$2
14415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14416 $as_echo_n "checking for $ac_word... " >&6; }
14417 if ${ac_cv_prog_DBTOEPUB+:} false; then :
14418   $as_echo_n "(cached) " >&6
14419 else
14420   if test -n "$DBTOEPUB"; then
14421   ac_cv_prog_DBTOEPUB="$DBTOEPUB" # Let the user override the test.
14422 else
14423 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14424 for as_dir in $PATH
14425 do
14426   IFS=$as_save_IFS
14427   test -z "$as_dir" && as_dir=.
14428     for ac_exec_ext in '' $ac_executable_extensions; do
14429   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14430     ac_cv_prog_DBTOEPUB="$ac_prog"
14431     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14432     break 2
14433   fi
14434 done
14435   done
14436 IFS=$as_save_IFS
14437
14438 fi
14439 fi
14440 DBTOEPUB=$ac_cv_prog_DBTOEPUB
14441 if test -n "$DBTOEPUB"; then
14442   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
14443 $as_echo "$DBTOEPUB" >&6; }
14444 else
14445   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14446 $as_echo "no" >&6; }
14447 fi
14448
14449
14450   test -n "$DBTOEPUB" && break
14451 done
14452
14453 for ac_prog in xsltproc
14454 do
14455   # Extract the first word of "$ac_prog", so it can be a program name with args.
14456 set dummy $ac_prog; ac_word=$2
14457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14458 $as_echo_n "checking for $ac_word... " >&6; }
14459 if ${ac_cv_prog_XSLTPROC+:} false; then :
14460   $as_echo_n "(cached) " >&6
14461 else
14462   if test -n "$XSLTPROC"; then
14463   ac_cv_prog_XSLTPROC="$XSLTPROC" # Let the user override the test.
14464 else
14465 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14466 for as_dir in $PATH
14467 do
14468   IFS=$as_save_IFS
14469   test -z "$as_dir" && as_dir=.
14470     for ac_exec_ext in '' $ac_executable_extensions; do
14471   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14472     ac_cv_prog_XSLTPROC="$ac_prog"
14473     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14474     break 2
14475   fi
14476 done
14477   done
14478 IFS=$as_save_IFS
14479
14480 fi
14481 fi
14482 XSLTPROC=$ac_cv_prog_XSLTPROC
14483 if test -n "$XSLTPROC"; then
14484   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
14485 $as_echo "$XSLTPROC" >&6; }
14486 else
14487   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14488 $as_echo "no" >&6; }
14489 fi
14490
14491
14492   test -n "$XSLTPROC" && break
14493 done
14494
14495 for ac_prog in osx sgml2xml sx
14496 do
14497   # Extract the first word of "$ac_prog", so it can be a program name with args.
14498 set dummy $ac_prog; ac_word=$2
14499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14500 $as_echo_n "checking for $ac_word... " >&6; }
14501 if ${ac_cv_prog_OSX+:} false; then :
14502   $as_echo_n "(cached) " >&6
14503 else
14504   if test -n "$OSX"; then
14505   ac_cv_prog_OSX="$OSX" # Let the user override the test.
14506 else
14507 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14508 for as_dir in $PATH
14509 do
14510   IFS=$as_save_IFS
14511   test -z "$as_dir" && as_dir=.
14512     for ac_exec_ext in '' $ac_executable_extensions; do
14513   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14514     ac_cv_prog_OSX="$ac_prog"
14515     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14516     break 2
14517   fi
14518 done
14519   done
14520 IFS=$as_save_IFS
14521
14522 fi
14523 fi
14524 OSX=$ac_cv_prog_OSX
14525 if test -n "$OSX"; then
14526   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OSX" >&5
14527 $as_echo "$OSX" >&6; }
14528 else
14529   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14530 $as_echo "no" >&6; }
14531 fi
14532
14533
14534   test -n "$OSX" && break
14535 done
14536
14537
14538 #
14539 # Check for test tools
14540 #
14541 for ac_prog in prove
14542 do
14543   # Extract the first word of "$ac_prog", so it can be a program name with args.
14544 set dummy $ac_prog; ac_word=$2
14545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14546 $as_echo_n "checking for $ac_word... " >&6; }
14547 if ${ac_cv_prog_PROVE+:} false; then :
14548   $as_echo_n "(cached) " >&6
14549 else
14550   if test -n "$PROVE"; then
14551   ac_cv_prog_PROVE="$PROVE" # Let the user override the test.
14552 else
14553 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14554 for as_dir in $PATH
14555 do
14556   IFS=$as_save_IFS
14557   test -z "$as_dir" && as_dir=.
14558     for ac_exec_ext in '' $ac_executable_extensions; do
14559   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14560     ac_cv_prog_PROVE="$ac_prog"
14561     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14562     break 2
14563   fi
14564 done
14565   done
14566 IFS=$as_save_IFS
14567
14568 fi
14569 fi
14570 PROVE=$ac_cv_prog_PROVE
14571 if test -n "$PROVE"; then
14572   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
14573 $as_echo "$PROVE" >&6; }
14574 else
14575   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14576 $as_echo "no" >&6; }
14577 fi
14578
14579
14580   test -n "$PROVE" && break
14581 done
14582
14583
14584 # Thread testing
14585
14586 # We have to run the thread test near the end so we have all our symbols
14587 # defined.  Cross compiling throws a warning.
14588 #
14589 if test "$enable_thread_safety" = yes; then
14590 if test "$PORTNAME" != "win32"
14591 then
14592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking thread safety of required library functions" >&5
14593 $as_echo_n "checking thread safety of required library functions... " >&6; }
14594
14595 _CFLAGS="$CFLAGS"
14596 _LIBS="$LIBS"
14597 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
14598 LIBS="$LIBS $PTHREAD_LIBS"
14599 if test "$cross_compiling" = yes; then :
14600   { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
14601 $as_echo "maybe" >&6; }
14602   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
14603 *** Skipping thread test program because of cross-compile build.
14604 *** Run the program in src/test/thread on the target machine.
14605 " >&5
14606 $as_echo "$as_me: WARNING:
14607 *** Skipping thread test program because of cross-compile build.
14608 *** Run the program in src/test/thread on the target machine.
14609 " >&2;}
14610 else
14611   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14612 /* end confdefs.h.  */
14613 #include "$srcdir/src/test/thread/thread_test.c"
14614 _ACEOF
14615 if ac_fn_c_try_run "$LINENO"; then :
14616   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14617 $as_echo "yes" >&6; }
14618 else
14619   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14620 $as_echo "no" >&6; }
14621   as_fn_error $? "thread test program failed
14622 This platform is not thread-safe.  Check the file 'config.log' or compile
14623 and run src/test/thread/thread_test for the exact reason.
14624 Use --disable-thread-safety to disable thread safety." "$LINENO" 5
14625 fi
14626 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14627   conftest.$ac_objext conftest.beam conftest.$ac_ext
14628 fi
14629
14630 CFLAGS="$_CFLAGS"
14631 LIBS="$_LIBS"
14632 else
14633 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** skipping thread test on Win32" >&5
14634 $as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
14635 fi
14636 fi
14637
14638 # If compiler will take -Wl,--as-needed (or various platform-specific
14639 # spellings thereof) then add that to LDFLAGS.  This is much easier than
14640 # trying to filter LIBS to the minimum for each executable.
14641 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
14642 # libreadline; therefore we postpone testing it until we know what library
14643 # dependencies readline has.  The test code will try to link with $LIBS.
14644 if test "$with_readline" = yes; then
14645   link_test_func=readline
14646 else
14647   link_test_func=exit
14648 fi
14649
14650 if test "$PORTNAME" = "darwin"; then
14651   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
14652 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
14653 if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
14654   $as_echo_n "(cached) " >&6
14655 else
14656   pgac_save_LDFLAGS=$LDFLAGS
14657 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
14658 if test "$cross_compiling" = yes; then :
14659   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
14660 else
14661   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14662 /* end confdefs.h.  */
14663 extern void $link_test_func (); void (*fptr) () = $link_test_func;
14664 int
14665 main ()
14666 {
14667
14668   ;
14669   return 0;
14670 }
14671 _ACEOF
14672 if ac_fn_c_try_run "$LINENO"; then :
14673   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
14674 else
14675   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
14676 fi
14677 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14678   conftest.$ac_objext conftest.beam conftest.$ac_ext
14679 fi
14680
14681 LDFLAGS="$pgac_save_LDFLAGS"
14682 fi
14683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
14684 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
14685 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
14686   LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
14687 fi
14688
14689 elif test "$PORTNAME" = "openbsd"; then
14690   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
14691 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
14692 if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
14693   $as_echo_n "(cached) " >&6
14694 else
14695   pgac_save_LDFLAGS=$LDFLAGS
14696 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
14697 if test "$cross_compiling" = yes; then :
14698   pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
14699 else
14700   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14701 /* end confdefs.h.  */
14702 extern void $link_test_func (); void (*fptr) () = $link_test_func;
14703 int
14704 main ()
14705 {
14706
14707   ;
14708   return 0;
14709 }
14710 _ACEOF
14711 if ac_fn_c_try_run "$LINENO"; then :
14712   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
14713 else
14714   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
14715 fi
14716 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14717   conftest.$ac_objext conftest.beam conftest.$ac_ext
14718 fi
14719
14720 LDFLAGS="$pgac_save_LDFLAGS"
14721 fi
14722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
14723 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
14724 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
14725   LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
14726 fi
14727
14728 else
14729   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
14730 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
14731 if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
14732   $as_echo_n "(cached) " >&6
14733 else
14734   pgac_save_LDFLAGS=$LDFLAGS
14735 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
14736 if test "$cross_compiling" = yes; then :
14737   pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
14738 else
14739   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14740 /* end confdefs.h.  */
14741 extern void $link_test_func (); void (*fptr) () = $link_test_func;
14742 int
14743 main ()
14744 {
14745
14746   ;
14747   return 0;
14748 }
14749 _ACEOF
14750 if ac_fn_c_try_run "$LINENO"; then :
14751   pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
14752 else
14753   pgac_cv_prog_cc_ldflags__Wl___as_needed=no
14754 fi
14755 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14756   conftest.$ac_objext conftest.beam conftest.$ac_ext
14757 fi
14758
14759 LDFLAGS="$pgac_save_LDFLAGS"
14760 fi
14761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
14762 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
14763 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
14764   LDFLAGS="$LDFLAGS -Wl,--as-needed"
14765 fi
14766
14767 fi
14768
14769 # Create compiler version string
14770 if test x"$GCC" = x"yes" ; then
14771   cc_string=`${CC} --version | sed q`
14772   case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
14773 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
14774   cc_string=`${CC} -V 2>&1 | sed q`
14775 else
14776   cc_string=$CC
14777 fi
14778
14779
14780 cat >>confdefs.h <<_ACEOF
14781 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
14782 _ACEOF
14783
14784
14785 # Supply a numeric version string for use by 3rd party add-ons
14786 # awk -F is a regex on some platforms, and not on others, so make "." a tab
14787 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
14788 tr '.' '        ' |
14789 $AWK '{printf "%d%02d%02d", $1, $2, (NF >= 3) ? $3 : 0}'`"
14790
14791 cat >>confdefs.h <<_ACEOF
14792 #define PG_VERSION_NUM $PG_VERSION_NUM
14793 _ACEOF
14794
14795
14796
14797 # Begin output steps
14798
14799 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
14800 $as_echo "$as_me: using compiler=$cc_string" >&6;}
14801 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
14802 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
14803 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
14804 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
14805 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
14806 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
14807
14808 # prepare build tree if outside source tree
14809 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
14810 # Note 2: /bin/pwd might be better than shell's built-in at getting
14811 #         a symlink-free name.
14812 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
14813   vpath_build=no
14814 else
14815   vpath_build=yes
14816   if test "$no_create" != yes; then
14817     $as_echo_n "preparing build tree... " >&6
14818     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
14819     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
14820       || as_fn_error $? "failed" "$LINENO" 5
14821     { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14822 $as_echo "done" >&6; }
14823   fi
14824 fi
14825
14826
14827
14828 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
14829
14830
14831 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}"
14832
14833
14834 if test "$PORTNAME" = "win32"; then
14835 ac_config_commands="$ac_config_commands check_win32_symlinks"
14836
14837 fi
14838
14839 ac_config_headers="$ac_config_headers src/include/pg_config.h"
14840
14841
14842 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
14843
14844
14845 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
14846
14847
14848 cat >confcache <<\_ACEOF
14849 # This file is a shell script that caches the results of configure
14850 # tests run on this system so they can be shared between configure
14851 # scripts and configure runs, see configure's option --config-cache.
14852 # It is not useful on other systems.  If it contains results you don't
14853 # want to keep, you may remove or edit it.
14854 #
14855 # config.status only pays attention to the cache file if you give it
14856 # the --recheck option to rerun configure.
14857 #
14858 # `ac_cv_env_foo' variables (set or unset) will be overridden when
14859 # loading this file, other *unset* `ac_cv_foo' will be assigned the
14860 # following values.
14861
14862 _ACEOF
14863
14864 # The following way of writing the cache mishandles newlines in values,
14865 # but we know of no workaround that is simple, portable, and efficient.
14866 # So, we kill variables containing newlines.
14867 # Ultrix sh set writes to stderr and can't be redirected directly,
14868 # and sets the high bit in the cache file unless we assign to the vars.
14869 (
14870   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14871     eval ac_val=\$$ac_var
14872     case $ac_val in #(
14873     *${as_nl}*)
14874       case $ac_var in #(
14875       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14876 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
14877       esac
14878       case $ac_var in #(
14879       _ | IFS | as_nl) ;; #(
14880       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14881       *) { eval $ac_var=; unset $ac_var;} ;;
14882       esac ;;
14883     esac
14884   done
14885
14886   (set) 2>&1 |
14887     case $as_nl`(ac_space=' '; set) 2>&1` in #(
14888     *${as_nl}ac_space=\ *)
14889       # `set' does not quote correctly, so add quotes: double-quote
14890       # substitution turns \\\\ into \\, and sed turns \\ into \.
14891       sed -n \
14892         "s/'/'\\\\''/g;
14893           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
14894       ;; #(
14895     *)
14896       # `set' quotes correctly as required by POSIX, so do not add quotes.
14897       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
14898       ;;
14899     esac |
14900     sort
14901 ) |
14902   sed '
14903      /^ac_cv_env_/b end
14904      t clear
14905      :clear
14906      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14907      t end
14908      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14909      :end' >>confcache
14910 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14911   if test -w "$cache_file"; then
14912     if test "x$cache_file" != "x/dev/null"; then
14913       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14914 $as_echo "$as_me: updating cache $cache_file" >&6;}
14915       if test ! -f "$cache_file" || test -h "$cache_file"; then
14916         cat confcache >"$cache_file"
14917       else
14918         case $cache_file in #(
14919         */* | ?:*)
14920           mv -f confcache "$cache_file"$$ &&
14921           mv -f "$cache_file"$$ "$cache_file" ;; #(
14922         *)
14923           mv -f confcache "$cache_file" ;;
14924         esac
14925       fi
14926     fi
14927   else
14928     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14929 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
14930   fi
14931 fi
14932 rm -f confcache
14933
14934 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14935 # Let make expand exec_prefix.
14936 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14937
14938 DEFS=-DHAVE_CONFIG_H
14939
14940 ac_libobjs=
14941 ac_ltlibobjs=
14942 U=
14943 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14944   # 1. Remove the extension, and $U if already installed.
14945   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
14946   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
14947   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
14948   #    will be set to the directory where LIBOBJS objects are built.
14949   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14950   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
14951 done
14952 LIBOBJS=$ac_libobjs
14953
14954 LTLIBOBJS=$ac_ltlibobjs
14955
14956
14957
14958
14959 : "${CONFIG_STATUS=./config.status}"
14960 ac_write_fail=0
14961 ac_clean_files_save=$ac_clean_files
14962 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
14963 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14964 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14965 as_write_fail=0
14966 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
14967 #! $SHELL
14968 # Generated by $as_me.
14969 # Run this file to recreate the current configuration.
14970 # Compiler output produced by configure, useful for debugging
14971 # configure, is in config.log if it exists.
14972
14973 debug=false
14974 ac_cs_recheck=false
14975 ac_cs_silent=false
14976
14977 SHELL=\${CONFIG_SHELL-$SHELL}
14978 export SHELL
14979 _ASEOF
14980 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14981 ## -------------------- ##
14982 ## M4sh Initialization. ##
14983 ## -------------------- ##
14984
14985 # Be more Bourne compatible
14986 DUALCASE=1; export DUALCASE # for MKS sh
14987 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
14988   emulate sh
14989   NULLCMD=:
14990   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
14991   # is contrary to our usage.  Disable this feature.
14992   alias -g '${1+"$@"}'='"$@"'
14993   setopt NO_GLOB_SUBST
14994 else
14995   case `(set -o) 2>/dev/null` in #(
14996   *posix*) :
14997     set -o posix ;; #(
14998   *) :
14999      ;;
15000 esac
15001 fi
15002
15003
15004 as_nl='
15005 '
15006 export as_nl
15007 # Printing a long string crashes Solaris 7 /usr/bin/printf.
15008 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15009 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15010 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15011 # Prefer a ksh shell builtin over an external printf program on Solaris,
15012 # but without wasting forks for bash or zsh.
15013 if test -z "$BASH_VERSION$ZSH_VERSION" \
15014     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15015   as_echo='print -r --'
15016   as_echo_n='print -rn --'
15017 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15018   as_echo='printf %s\n'
15019   as_echo_n='printf %s'
15020 else
15021   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15022     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15023     as_echo_n='/usr/ucb/echo -n'
15024   else
15025     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15026     as_echo_n_body='eval
15027       arg=$1;
15028       case $arg in #(
15029       *"$as_nl"*)
15030         expr "X$arg" : "X\\(.*\\)$as_nl";
15031         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15032       esac;
15033       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15034     '
15035     export as_echo_n_body
15036     as_echo_n='sh -c $as_echo_n_body as_echo'
15037   fi
15038   export as_echo_body
15039   as_echo='sh -c $as_echo_body as_echo'
15040 fi
15041
15042 # The user is always right.
15043 if test "${PATH_SEPARATOR+set}" != set; then
15044   PATH_SEPARATOR=:
15045   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15046     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15047       PATH_SEPARATOR=';'
15048   }
15049 fi
15050
15051
15052 # IFS
15053 # We need space, tab and new line, in precisely that order.  Quoting is
15054 # there to prevent editors from complaining about space-tab.
15055 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
15056 # splitting by setting IFS to empty value.)
15057 IFS=" ""        $as_nl"
15058
15059 # Find who we are.  Look in the path if we contain no directory separator.
15060 as_myself=
15061 case $0 in #((
15062   *[\\/]* ) as_myself=$0 ;;
15063   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15064 for as_dir in $PATH
15065 do
15066   IFS=$as_save_IFS
15067   test -z "$as_dir" && as_dir=.
15068     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15069   done
15070 IFS=$as_save_IFS
15071
15072      ;;
15073 esac
15074 # We did not find ourselves, most probably we were run as `sh COMMAND'
15075 # in which case we are not to be found in the path.
15076 if test "x$as_myself" = x; then
15077   as_myself=$0
15078 fi
15079 if test ! -f "$as_myself"; then
15080   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15081   exit 1
15082 fi
15083
15084 # Unset variables that we do not need and which cause bugs (e.g. in
15085 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
15086 # suppresses any "Segmentation fault" message there.  '((' could
15087 # trigger a bug in pdksh 5.2.14.
15088 for as_var in BASH_ENV ENV MAIL MAILPATH
15089 do eval test x\${$as_var+set} = xset \
15090   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
15091 done
15092 PS1='$ '
15093 PS2='> '
15094 PS4='+ '
15095
15096 # NLS nuisances.
15097 LC_ALL=C
15098 export LC_ALL
15099 LANGUAGE=C
15100 export LANGUAGE
15101
15102 # CDPATH.
15103 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15104
15105
15106 # as_fn_error STATUS ERROR [LINENO LOG_FD]
15107 # ----------------------------------------
15108 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15109 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
15110 # script with STATUS, using 1 if that was 0.
15111 as_fn_error ()
15112 {
15113   as_status=$1; test $as_status -eq 0 && as_status=1
15114   if test "$4"; then
15115     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15116     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
15117   fi
15118   $as_echo "$as_me: error: $2" >&2
15119   as_fn_exit $as_status
15120 } # as_fn_error
15121
15122
15123 # as_fn_set_status STATUS
15124 # -----------------------
15125 # Set $? to STATUS, without forking.
15126 as_fn_set_status ()
15127 {
15128   return $1
15129 } # as_fn_set_status
15130
15131 # as_fn_exit STATUS
15132 # -----------------
15133 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15134 as_fn_exit ()
15135 {
15136   set +e
15137   as_fn_set_status $1
15138   exit $1
15139 } # as_fn_exit
15140
15141 # as_fn_unset VAR
15142 # ---------------
15143 # Portably unset VAR.
15144 as_fn_unset ()
15145 {
15146   { eval $1=; unset $1;}
15147 }
15148 as_unset=as_fn_unset
15149 # as_fn_append VAR VALUE
15150 # ----------------------
15151 # Append the text in VALUE to the end of the definition contained in VAR. Take
15152 # advantage of any shell optimizations that allow amortized linear growth over
15153 # repeated appends, instead of the typical quadratic growth present in naive
15154 # implementations.
15155 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15156   eval 'as_fn_append ()
15157   {
15158     eval $1+=\$2
15159   }'
15160 else
15161   as_fn_append ()
15162   {
15163     eval $1=\$$1\$2
15164   }
15165 fi # as_fn_append
15166
15167 # as_fn_arith ARG...
15168 # ------------------
15169 # Perform arithmetic evaluation on the ARGs, and store the result in the
15170 # global $as_val. Take advantage of shells that can avoid forks. The arguments
15171 # must be portable across $(()) and expr.
15172 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15173   eval 'as_fn_arith ()
15174   {
15175     as_val=$(( $* ))
15176   }'
15177 else
15178   as_fn_arith ()
15179   {
15180     as_val=`expr "$@" || test $? -eq 1`
15181   }
15182 fi # as_fn_arith
15183
15184
15185 if expr a : '\(a\)' >/dev/null 2>&1 &&
15186    test "X`expr 00001 : '.*\(...\)'`" = X001; then
15187   as_expr=expr
15188 else
15189   as_expr=false
15190 fi
15191
15192 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15193   as_basename=basename
15194 else
15195   as_basename=false
15196 fi
15197
15198 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15199   as_dirname=dirname
15200 else
15201   as_dirname=false
15202 fi
15203
15204 as_me=`$as_basename -- "$0" ||
15205 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15206          X"$0" : 'X\(//\)$' \| \
15207          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
15208 $as_echo X/"$0" |
15209     sed '/^.*\/\([^/][^/]*\)\/*$/{
15210             s//\1/
15211             q
15212           }
15213           /^X\/\(\/\/\)$/{
15214             s//\1/
15215             q
15216           }
15217           /^X\/\(\/\).*/{
15218             s//\1/
15219             q
15220           }
15221           s/.*/./; q'`
15222
15223 # Avoid depending upon Character Ranges.
15224 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15225 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15226 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15227 as_cr_digits='0123456789'
15228 as_cr_alnum=$as_cr_Letters$as_cr_digits
15229
15230 ECHO_C= ECHO_N= ECHO_T=
15231 case `echo -n x` in #(((((
15232 -n*)
15233   case `echo 'xy\c'` in
15234   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
15235   xy)  ECHO_C='\c';;
15236   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
15237        ECHO_T=' ';;
15238   esac;;
15239 *)
15240   ECHO_N='-n';;
15241 esac
15242
15243 rm -f conf$$ conf$$.exe conf$$.file
15244 if test -d conf$$.dir; then
15245   rm -f conf$$.dir/conf$$.file
15246 else
15247   rm -f conf$$.dir
15248   mkdir conf$$.dir 2>/dev/null
15249 fi
15250 if (echo >conf$$.file) 2>/dev/null; then
15251   if ln -s conf$$.file conf$$ 2>/dev/null; then
15252     as_ln_s='ln -s'
15253     # ... but there are two gotchas:
15254     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15255     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
15256     # In both cases, we have to default to `cp -pR'.
15257     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
15258       as_ln_s='cp -pR'
15259   elif ln conf$$.file conf$$ 2>/dev/null; then
15260     as_ln_s=ln
15261   else
15262     as_ln_s='cp -pR'
15263   fi
15264 else
15265   as_ln_s='cp -pR'
15266 fi
15267 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15268 rmdir conf$$.dir 2>/dev/null
15269
15270
15271 # as_fn_mkdir_p
15272 # -------------
15273 # Create "$as_dir" as a directory, including parents if necessary.
15274 as_fn_mkdir_p ()
15275 {
15276
15277   case $as_dir in #(
15278   -*) as_dir=./$as_dir;;
15279   esac
15280   test -d "$as_dir" || eval $as_mkdir_p || {
15281     as_dirs=
15282     while :; do
15283       case $as_dir in #(
15284       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15285       *) as_qdir=$as_dir;;
15286       esac
15287       as_dirs="'$as_qdir' $as_dirs"
15288       as_dir=`$as_dirname -- "$as_dir" ||
15289 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15290          X"$as_dir" : 'X\(//\)[^/]' \| \
15291          X"$as_dir" : 'X\(//\)$' \| \
15292          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15293 $as_echo X"$as_dir" |
15294     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15295             s//\1/
15296             q
15297           }
15298           /^X\(\/\/\)[^/].*/{
15299             s//\1/
15300             q
15301           }
15302           /^X\(\/\/\)$/{
15303             s//\1/
15304             q
15305           }
15306           /^X\(\/\).*/{
15307             s//\1/
15308             q
15309           }
15310           s/.*/./; q'`
15311       test -d "$as_dir" && break
15312     done
15313     test -z "$as_dirs" || eval "mkdir $as_dirs"
15314   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
15315
15316
15317 } # as_fn_mkdir_p
15318 if mkdir -p . 2>/dev/null; then
15319   as_mkdir_p='mkdir -p "$as_dir"'
15320 else
15321   test -d ./-p && rmdir ./-p
15322   as_mkdir_p=false
15323 fi
15324
15325
15326 # as_fn_executable_p FILE
15327 # -----------------------
15328 # Test if FILE is an executable regular file.
15329 as_fn_executable_p ()
15330 {
15331   test -f "$1" && test -x "$1"
15332 } # as_fn_executable_p
15333 as_test_x='test -x'
15334 as_executable_p=as_fn_executable_p
15335
15336 # Sed expression to map a string onto a valid CPP name.
15337 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
15338
15339 # Sed expression to map a string onto a valid variable name.
15340 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
15341
15342
15343 exec 6>&1
15344 ## ----------------------------------- ##
15345 ## Main body of $CONFIG_STATUS script. ##
15346 ## ----------------------------------- ##
15347 _ASEOF
15348 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
15349
15350 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15351 # Save the log message, to keep $0 and so on meaningful, and to
15352 # report actual input values of CONFIG_FILES etc. instead of their
15353 # values after options handling.
15354 ac_log="
15355 This file was extended by PostgreSQL $as_me 9.5devel, which was
15356 generated by GNU Autoconf 2.69.  Invocation command line was
15357
15358   CONFIG_FILES    = $CONFIG_FILES
15359   CONFIG_HEADERS  = $CONFIG_HEADERS
15360   CONFIG_LINKS    = $CONFIG_LINKS
15361   CONFIG_COMMANDS = $CONFIG_COMMANDS
15362   $ $0 $@
15363
15364 on `(hostname || uname -n) 2>/dev/null | sed 1q`
15365 "
15366
15367 _ACEOF
15368
15369 case $ac_config_files in *"
15370 "*) set x $ac_config_files; shift; ac_config_files=$*;;
15371 esac
15372
15373 case $ac_config_headers in *"
15374 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15375 esac
15376
15377
15378 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15379 # Files that config.status was made for.
15380 config_files="$ac_config_files"
15381 config_headers="$ac_config_headers"
15382 config_links="$ac_config_links"
15383 config_commands="$ac_config_commands"
15384
15385 _ACEOF
15386
15387 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15388 ac_cs_usage="\
15389 \`$as_me' instantiates files and other configuration actions
15390 from templates according to the current configuration.  Unless the files
15391 and actions are specified as TAGs, all are instantiated by default.
15392
15393 Usage: $0 [OPTION]... [TAG]...
15394
15395   -h, --help       print this help, then exit
15396   -V, --version    print version number and configuration settings, then exit
15397       --config     print configuration, then exit
15398   -q, --quiet, --silent
15399                    do not print progress messages
15400   -d, --debug      don't remove temporary files
15401       --recheck    update $as_me by reconfiguring in the same conditions
15402       --file=FILE[:TEMPLATE]
15403                    instantiate the configuration file FILE
15404       --header=FILE[:TEMPLATE]
15405                    instantiate the configuration header FILE
15406
15407 Configuration files:
15408 $config_files
15409
15410 Configuration headers:
15411 $config_headers
15412
15413 Configuration links:
15414 $config_links
15415
15416 Configuration commands:
15417 $config_commands
15418
15419 Report bugs to <pgsql-bugs@postgresql.org>."
15420
15421 _ACEOF
15422 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15423 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
15424 ac_cs_version="\\
15425 PostgreSQL config.status 9.5devel
15426 configured by $0, generated by GNU Autoconf 2.69,
15427   with options \\"\$ac_cs_config\\"
15428
15429 Copyright (C) 2012 Free Software Foundation, Inc.
15430 This config.status script is free software; the Free Software Foundation
15431 gives unlimited permission to copy, distribute and modify it."
15432
15433 ac_pwd='$ac_pwd'
15434 srcdir='$srcdir'
15435 INSTALL='$INSTALL'
15436 MKDIR_P='$MKDIR_P'
15437 AWK='$AWK'
15438 test -n "\$AWK" || AWK=awk
15439 _ACEOF
15440
15441 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15442 # The default lists apply if the user does not specify any file.
15443 ac_need_defaults=:
15444 while test $# != 0
15445 do
15446   case $1 in
15447   --*=?*)
15448     ac_option=`expr "X$1" : 'X\([^=]*\)='`
15449     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
15450     ac_shift=:
15451     ;;
15452   --*=)
15453     ac_option=`expr "X$1" : 'X\([^=]*\)='`
15454     ac_optarg=
15455     ac_shift=:
15456     ;;
15457   *)
15458     ac_option=$1
15459     ac_optarg=$2
15460     ac_shift=shift
15461     ;;
15462   esac
15463
15464   case $ac_option in
15465   # Handling of the options.
15466   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15467     ac_cs_recheck=: ;;
15468   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
15469     $as_echo "$ac_cs_version"; exit ;;
15470   --config | --confi | --conf | --con | --co | --c )
15471     $as_echo "$ac_cs_config"; exit ;;
15472   --debug | --debu | --deb | --de | --d | -d )
15473     debug=: ;;
15474   --file | --fil | --fi | --f )
15475     $ac_shift
15476     case $ac_optarg in
15477     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15478     '') as_fn_error $? "missing file argument" ;;
15479     esac
15480     as_fn_append CONFIG_FILES " '$ac_optarg'"
15481     ac_need_defaults=false;;
15482   --header | --heade | --head | --hea )
15483     $ac_shift
15484     case $ac_optarg in
15485     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15486     esac
15487     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
15488     ac_need_defaults=false;;
15489   --he | --h)
15490     # Conflict between --help and --header
15491     as_fn_error $? "ambiguous option: \`$1'
15492 Try \`$0 --help' for more information.";;
15493   --help | --hel | -h )
15494     $as_echo "$ac_cs_usage"; exit ;;
15495   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15496   | -silent | --silent | --silen | --sile | --sil | --si | --s)
15497     ac_cs_silent=: ;;
15498
15499   # This is an error.
15500   -*) as_fn_error $? "unrecognized option: \`$1'
15501 Try \`$0 --help' for more information." ;;
15502
15503   *) as_fn_append ac_config_targets " $1"
15504      ac_need_defaults=false ;;
15505
15506   esac
15507   shift
15508 done
15509
15510 ac_configure_extra_args=
15511
15512 if $ac_cs_silent; then
15513   exec 6>/dev/null
15514   ac_configure_extra_args="$ac_configure_extra_args --silent"
15515 fi
15516
15517 _ACEOF
15518 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15519 if \$ac_cs_recheck; then
15520   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
15521   shift
15522   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15523   CONFIG_SHELL='$SHELL'
15524   export CONFIG_SHELL
15525   exec "\$@"
15526 fi
15527
15528 _ACEOF
15529 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15530 exec 5>>config.log
15531 {
15532   echo
15533   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15534 ## Running $as_me. ##
15535 _ASBOX
15536   $as_echo "$ac_log"
15537 } >&5
15538
15539 _ACEOF
15540 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15541 _ACEOF
15542
15543 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15544
15545 # Handling of arguments.
15546 for ac_config_target in $ac_config_targets
15547 do
15548   case $ac_config_target in
15549     "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
15550     "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
15551     "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
15552     "src/backend/port/dynloader.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
15553     "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
15554     "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
15555     "src/backend/port/pg_latch.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_latch.c:${LATCH_IMPLEMENTATION}" ;;
15556     "src/include/dynloader.h") CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
15557     "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
15558     "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
15559     "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
15560     "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
15561     "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
15562     "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
15563
15564   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
15565   esac
15566 done
15567
15568
15569 # If the user did not use the arguments to specify the items to instantiate,
15570 # then the envvar interface is used.  Set only those that are not.
15571 # We use the long form for the default assignment because of an extremely
15572 # bizarre bug on SunOS 4.1.3.
15573 if $ac_need_defaults; then
15574   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15575   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15576   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
15577   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
15578 fi
15579
15580 # Have a temporary directory for convenience.  Make it in the build tree
15581 # simply because there is no reason against having it here, and in addition,
15582 # creating and moving files from /tmp can sometimes cause problems.
15583 # Hook for its removal unless debugging.
15584 # Note that there is a small window in which the directory will not be cleaned:
15585 # after its creation but before its name has been assigned to `$tmp'.
15586 $debug ||
15587 {
15588   tmp= ac_tmp=
15589   trap 'exit_status=$?
15590   : "${ac_tmp:=$tmp}"
15591   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
15592 ' 0
15593   trap 'as_fn_exit 1' 1 2 13 15
15594 }
15595 # Create a (secure) tmp directory for tmp files.
15596
15597 {
15598   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
15599   test -d "$tmp"
15600 }  ||
15601 {
15602   tmp=./conf$$-$RANDOM
15603   (umask 077 && mkdir "$tmp")
15604 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
15605 ac_tmp=$tmp
15606
15607 # Set up the scripts for CONFIG_FILES section.
15608 # No need to generate them if there are no CONFIG_FILES.
15609 # This happens for instance with `./config.status config.h'.
15610 if test -n "$CONFIG_FILES"; then
15611
15612
15613 ac_cr=`echo X | tr X '\015'`
15614 # On cygwin, bash can eat \r inside `` if the user requested igncr.
15615 # But we know of no other shell where ac_cr would be empty at this
15616 # point, so we can use a bashism as a fallback.
15617 if test "x$ac_cr" = x; then
15618   eval ac_cr=\$\'\\r\'
15619 fi
15620 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15621 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
15622   ac_cs_awk_cr='\\r'
15623 else
15624   ac_cs_awk_cr=$ac_cr
15625 fi
15626
15627 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
15628 _ACEOF
15629
15630
15631 {
15632   echo "cat >conf$$subs.awk <<_ACEOF" &&
15633   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15634   echo "_ACEOF"
15635 } >conf$$subs.sh ||
15636   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15637 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
15638 ac_delim='%!_!# '
15639 for ac_last_try in false false false false false :; do
15640   . ./conf$$subs.sh ||
15641     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15642
15643   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15644   if test $ac_delim_n = $ac_delim_num; then
15645     break
15646   elif $ac_last_try; then
15647     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15648   else
15649     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15650   fi
15651 done
15652 rm -f conf$$subs.sh
15653
15654 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15655 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
15656 _ACEOF
15657 sed -n '
15658 h
15659 s/^/S["/; s/!.*/"]=/
15660 p
15661 g
15662 s/^[^!]*!//
15663 :repl
15664 t repl
15665 s/'"$ac_delim"'$//
15666 t delim
15667 :nl
15668 h
15669 s/\(.\{148\}\)..*/\1/
15670 t more1
15671 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15672 p
15673 n
15674 b repl
15675 :more1
15676 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15677 p
15678 g
15679 s/.\{148\}//
15680 t nl
15681 :delim
15682 h
15683 s/\(.\{148\}\)..*/\1/
15684 t more2
15685 s/["\\]/\\&/g; s/^/"/; s/$/"/
15686 p
15687 b
15688 :more2
15689 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15690 p
15691 g
15692 s/.\{148\}//
15693 t delim
15694 ' <conf$$subs.awk | sed '
15695 /^[^""]/{
15696   N
15697   s/\n//
15698 }
15699 ' >>$CONFIG_STATUS || ac_write_fail=1
15700 rm -f conf$$subs.awk
15701 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15702 _ACAWK
15703 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
15704   for (key in S) S_is_set[key] = 1
15705   FS = "\a"
15706
15707 }
15708 {
15709   line = $ 0
15710   nfields = split(line, field, "@")
15711   substed = 0
15712   len = length(field[1])
15713   for (i = 2; i < nfields; i++) {
15714     key = field[i]
15715     keylen = length(key)
15716     if (S_is_set[key]) {
15717       value = S[key]
15718       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15719       len += length(value) + length(field[++i])
15720       substed = 1
15721     } else
15722       len += 1 + keylen
15723   }
15724
15725   print line
15726 }
15727
15728 _ACAWK
15729 _ACEOF
15730 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15731 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15732   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15733 else
15734   cat
15735 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
15736   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
15737 _ACEOF
15738
15739 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15740 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
15741 # trailing colons and then remove the whole line if VPATH becomes empty
15742 # (actually we leave an empty line to preserve line numbers).
15743 if test "x$srcdir" = x.; then
15744   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
15745 h
15746 s///
15747 s/^/:/
15748 s/[      ]*$/:/
15749 s/:\$(srcdir):/:/g
15750 s/:\${srcdir}:/:/g
15751 s/:@srcdir@:/:/g
15752 s/^:*//
15753 s/:*$//
15754 x
15755 s/\(=[   ]*\).*/\1/
15756 G
15757 s/\n//
15758 s/^[^=]*=[       ]*$//
15759 }'
15760 fi
15761
15762 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15763 fi # test -n "$CONFIG_FILES"
15764
15765 # Set up the scripts for CONFIG_HEADERS section.
15766 # No need to generate them if there are no CONFIG_HEADERS.
15767 # This happens for instance with `./config.status Makefile'.
15768 if test -n "$CONFIG_HEADERS"; then
15769 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
15770 BEGIN {
15771 _ACEOF
15772
15773 # Transform confdefs.h into an awk script `defines.awk', embedded as
15774 # here-document in config.status, that substitutes the proper values into
15775 # config.h.in to produce config.h.
15776
15777 # Create a delimiter string that does not exist in confdefs.h, to ease
15778 # handling of long lines.
15779 ac_delim='%!_!# '
15780 for ac_last_try in false false :; do
15781   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15782   if test -z "$ac_tt"; then
15783     break
15784   elif $ac_last_try; then
15785     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
15786   else
15787     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15788   fi
15789 done
15790
15791 # For the awk script, D is an array of macro values keyed by name,
15792 # likewise P contains macro parameters if any.  Preserve backslash
15793 # newline sequences.
15794
15795 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15796 sed -n '
15797 s/.\{148\}/&'"$ac_delim"'/g
15798 t rset
15799 :rset
15800 s/^[     ]*#[    ]*define[       ][      ]*/ /
15801 t def
15802 d
15803 :def
15804 s/\\$//
15805 t bsnl
15806 s/["\\]/\\&/g
15807 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
15808 D["\1"]=" \3"/p
15809 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
15810 d
15811 :bsnl
15812 s/["\\]/\\&/g
15813 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
15814 D["\1"]=" \3\\\\\\n"\\/p
15815 t cont
15816 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15817 t cont
15818 d
15819 :cont
15820 n
15821 s/.\{148\}/&'"$ac_delim"'/g
15822 t clear
15823 :clear
15824 s/\\$//
15825 t bsnlc
15826 s/["\\]/\\&/g; s/^/"/; s/$/"/p
15827 d
15828 :bsnlc
15829 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15830 b cont
15831 ' <confdefs.h | sed '
15832 s/'"$ac_delim"'/"\\\
15833 "/g' >>$CONFIG_STATUS || ac_write_fail=1
15834
15835 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15836   for (key in D) D_is_set[key] = 1
15837   FS = "\a"
15838 }
15839 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15840   line = \$ 0
15841   split(line, arg, " ")
15842   if (arg[1] == "#") {
15843     defundef = arg[2]
15844     mac1 = arg[3]
15845   } else {
15846     defundef = substr(arg[1], 2)
15847     mac1 = arg[2]
15848   }
15849   split(mac1, mac2, "(") #)
15850   macro = mac2[1]
15851   prefix = substr(line, 1, index(line, defundef) - 1)
15852   if (D_is_set[macro]) {
15853     # Preserve the white space surrounding the "#".
15854     print prefix "define", macro P[macro] D[macro]
15855     next
15856   } else {
15857     # Replace #undef with comments.  This is necessary, for example,
15858     # in the case of _POSIX_SOURCE, which is predefined and required
15859     # on some systems where configure will not decide to define it.
15860     if (defundef == "undef") {
15861       print "/*", prefix defundef, macro, "*/"
15862       next
15863     }
15864   }
15865 }
15866 { print }
15867 _ACAWK
15868 _ACEOF
15869 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15870   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
15871 fi # test -n "$CONFIG_HEADERS"
15872
15873
15874 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
15875 shift
15876 for ac_tag
15877 do
15878   case $ac_tag in
15879   :[FHLC]) ac_mode=$ac_tag; continue;;
15880   esac
15881   case $ac_mode$ac_tag in
15882   :[FHL]*:*);;
15883   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
15884   :[FH]-) ac_tag=-:-;;
15885   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15886   esac
15887   ac_save_IFS=$IFS
15888   IFS=:
15889   set x $ac_tag
15890   IFS=$ac_save_IFS
15891   shift
15892   ac_file=$1
15893   shift
15894
15895   case $ac_mode in
15896   :L) ac_source=$1;;
15897   :[FH])
15898     ac_file_inputs=
15899     for ac_f
15900     do
15901       case $ac_f in
15902       -) ac_f="$ac_tmp/stdin";;
15903       *) # Look for the file first in the build tree, then in the source tree
15904          # (if the path is not absolute).  The absolute path cannot be DOS-style,
15905          # because $ac_f cannot contain `:'.
15906          test -f "$ac_f" ||
15907            case $ac_f in
15908            [\\/$]*) false;;
15909            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15910            esac ||
15911            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
15912       esac
15913       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15914       as_fn_append ac_file_inputs " '$ac_f'"
15915     done
15916
15917     # Let's still pretend it is `configure' which instantiates (i.e., don't
15918     # use $as_me), people would be surprised to read:
15919     #    /* config.h.  Generated by config.status.  */
15920     configure_input='Generated from '`
15921           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15922         `' by configure.'
15923     if test x"$ac_file" != x-; then
15924       configure_input="$ac_file.  $configure_input"
15925       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15926 $as_echo "$as_me: creating $ac_file" >&6;}
15927     fi
15928     # Neutralize special characters interpreted by sed in replacement strings.
15929     case $configure_input in #(
15930     *\&* | *\|* | *\\* )
15931        ac_sed_conf_input=`$as_echo "$configure_input" |
15932        sed 's/[\\\\&|]/\\\\&/g'`;; #(
15933     *) ac_sed_conf_input=$configure_input;;
15934     esac
15935
15936     case $ac_tag in
15937     *:-:* | *:-) cat >"$ac_tmp/stdin" \
15938       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
15939     esac
15940     ;;
15941   esac
15942
15943   ac_dir=`$as_dirname -- "$ac_file" ||
15944 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15945          X"$ac_file" : 'X\(//\)[^/]' \| \
15946          X"$ac_file" : 'X\(//\)$' \| \
15947          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
15948 $as_echo X"$ac_file" |
15949     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15950             s//\1/
15951             q
15952           }
15953           /^X\(\/\/\)[^/].*/{
15954             s//\1/
15955             q
15956           }
15957           /^X\(\/\/\)$/{
15958             s//\1/
15959             q
15960           }
15961           /^X\(\/\).*/{
15962             s//\1/
15963             q
15964           }
15965           s/.*/./; q'`
15966   as_dir="$ac_dir"; as_fn_mkdir_p
15967   ac_builddir=.
15968
15969 case "$ac_dir" in
15970 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15971 *)
15972   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
15973   # A ".." for each directory in $ac_dir_suffix.
15974   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
15975   case $ac_top_builddir_sub in
15976   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15977   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15978   esac ;;
15979 esac
15980 ac_abs_top_builddir=$ac_pwd
15981 ac_abs_builddir=$ac_pwd$ac_dir_suffix
15982 # for backward compatibility:
15983 ac_top_builddir=$ac_top_build_prefix
15984
15985 case $srcdir in
15986   .)  # We are building in place.
15987     ac_srcdir=.
15988     ac_top_srcdir=$ac_top_builddir_sub
15989     ac_abs_top_srcdir=$ac_pwd ;;
15990   [\\/]* | ?:[\\/]* )  # Absolute name.
15991     ac_srcdir=$srcdir$ac_dir_suffix;
15992     ac_top_srcdir=$srcdir
15993     ac_abs_top_srcdir=$srcdir ;;
15994   *) # Relative name.
15995     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15996     ac_top_srcdir=$ac_top_build_prefix$srcdir
15997     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
15998 esac
15999 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
16000
16001
16002   case $ac_mode in
16003   :F)
16004   #
16005   # CONFIG_FILE
16006   #
16007
16008   case $INSTALL in
16009   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16010   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
16011   esac
16012   ac_MKDIR_P=$MKDIR_P
16013   case $MKDIR_P in
16014   [\\/$]* | ?:[\\/]* ) ;;
16015   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16016   esac
16017 _ACEOF
16018
16019 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16020 # If the template does not know about datarootdir, expand it.
16021 # FIXME: This hack should be removed a few years after 2.60.
16022 ac_datarootdir_hack=; ac_datarootdir_seen=
16023 ac_sed_dataroot='
16024 /datarootdir/ {
16025   p
16026   q
16027 }
16028 /@datadir@/p
16029 /@docdir@/p
16030 /@infodir@/p
16031 /@localedir@/p
16032 /@mandir@/p'
16033 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
16034 *datarootdir*) ac_datarootdir_seen=yes;;
16035 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
16036   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16037 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
16038 _ACEOF
16039 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16040   ac_datarootdir_hack='
16041   s&@datadir@&$datadir&g
16042   s&@docdir@&$docdir&g
16043   s&@infodir@&$infodir&g
16044   s&@localedir@&$localedir&g
16045   s&@mandir@&$mandir&g
16046   s&\\\${datarootdir}&$datarootdir&g' ;;
16047 esac
16048 _ACEOF
16049
16050 # Neutralize VPATH when `$srcdir' = `.'.
16051 # Shell code in configure.ac might set extrasub.
16052 # FIXME: do we really want to maintain this feature?
16053 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16054 ac_sed_extra="$ac_vpsub
16055 $extrasub
16056 _ACEOF
16057 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16058 :t
16059 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16060 s|@configure_input@|$ac_sed_conf_input|;t t
16061 s&@top_builddir@&$ac_top_builddir_sub&;t t
16062 s&@top_build_prefix@&$ac_top_build_prefix&;t t
16063 s&@srcdir@&$ac_srcdir&;t t
16064 s&@abs_srcdir@&$ac_abs_srcdir&;t t
16065 s&@top_srcdir@&$ac_top_srcdir&;t t
16066 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16067 s&@builddir@&$ac_builddir&;t t
16068 s&@abs_builddir@&$ac_abs_builddir&;t t
16069 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16070 s&@INSTALL@&$ac_INSTALL&;t t
16071 s&@MKDIR_P@&$ac_MKDIR_P&;t t
16072 $ac_datarootdir_hack
16073 "
16074 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16075   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16076
16077 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
16078   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16079   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
16080       "$ac_tmp/out"`; test -z "$ac_out"; } &&
16081   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16082 which seems to be undefined.  Please make sure it is defined" >&5
16083 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16084 which seems to be undefined.  Please make sure it is defined" >&2;}
16085
16086   rm -f "$ac_tmp/stdin"
16087   case $ac_file in
16088   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16089   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
16090   esac \
16091   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16092  ;;
16093   :H)
16094   #
16095   # CONFIG_HEADER
16096   #
16097   if test x"$ac_file" != x-; then
16098     {
16099       $as_echo "/* $configure_input  */" \
16100       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16101     } >"$ac_tmp/config.h" \
16102       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16103     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
16104       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16105 $as_echo "$as_me: $ac_file is unchanged" >&6;}
16106     else
16107       rm -f "$ac_file"
16108       mv "$ac_tmp/config.h" "$ac_file" \
16109         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16110     fi
16111   else
16112     $as_echo "/* $configure_input  */" \
16113       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
16114       || as_fn_error $? "could not create -" "$LINENO" 5
16115   fi
16116  ;;
16117   :L)
16118   #
16119   # CONFIG_LINK
16120   #
16121
16122   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
16123     :
16124   else
16125     # Prefer the file from the source tree if names are identical.
16126     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
16127       ac_source=$srcdir/$ac_source
16128     fi
16129
16130     { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
16131 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
16132
16133     if test ! -r "$ac_source"; then
16134       as_fn_error $? "$ac_source: file not found" "$LINENO" 5
16135     fi
16136     rm -f "$ac_file"
16137
16138     # Try a relative symlink, then a hard link, then a copy.
16139     case $ac_source in
16140     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
16141         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
16142     esac
16143     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
16144       ln "$ac_source" "$ac_file" 2>/dev/null ||
16145       cp -p "$ac_source" "$ac_file" ||
16146       as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
16147   fi
16148  ;;
16149   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
16150 $as_echo "$as_me: executing $ac_file commands" >&6;}
16151  ;;
16152   esac
16153
16154
16155   case $ac_file$ac_mode in
16156     "check_win32_symlinks":C)
16157 # Links sometimes fail undetected on Mingw -
16158 # so here we detect it and warn the user
16159 for FILE in $CONFIG_LINKS
16160  do
16161         # test -e works for symlinks in the MinGW console
16162         test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
16163 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
16164  done
16165  ;;
16166     "src/include/pg_config.h":H)
16167 # Update timestamp for pg_config.h (see Makefile.global)
16168 echo >src/include/stamp-h
16169  ;;
16170     "src/include/pg_config_ext.h":H)
16171 # Update timestamp for pg_config_ext.h (see Makefile.global)
16172 echo >src/include/stamp-ext-h
16173  ;;
16174     "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
16175
16176   esac
16177 done # for ac_tag
16178
16179
16180 as_fn_exit 0
16181 _ACEOF
16182 ac_clean_files=$ac_clean_files_save
16183
16184 test $ac_write_fail = 0 ||
16185   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
16186
16187
16188 # configure is writing to config.log, and then calls config.status.
16189 # config.status does its own redirection, appending to config.log.
16190 # Unfortunately, on DOS this fails, as config.log is still kept open
16191 # by configure, so config.status won't be able to write to it; its
16192 # output is simply discarded.  So we exec the FD to /dev/null,
16193 # effectively closing config.log, so it can be properly (re)opened and
16194 # appended to by config.status.  When coming back to configure, we
16195 # need to make the FD available again.
16196 if test "$no_create" != yes; then
16197   ac_cs_success=:
16198   ac_config_status_args=
16199   test "$silent" = yes &&
16200     ac_config_status_args="$ac_config_status_args --quiet"
16201   exec 5>/dev/null
16202   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
16203   exec 5>>config.log
16204   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16205   # would make configure fail if this is the last instruction.
16206   $ac_cs_success || as_fn_exit 1
16207 fi
16208 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16209   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16210 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
16211 fi
16212