]> granicus.if.org Git - postgresql/blob - configure
Translation updates
[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_atomics
806 enable_debug
807 enable_profiling
808 enable_coverage
809 enable_dtrace
810 with_blocksize
811 with_segsize
812 with_wal_blocksize
813 with_wal_segsize
814 with_CC
815 enable_depend
816 enable_cassert
817 enable_thread_safety
818 with_tcl
819 with_tclconfig
820 with_perl
821 with_python
822 with_gssapi
823 with_krb_srvnam
824 with_pam
825 with_ldap
826 with_bonjour
827 with_openssl
828 with_selinux
829 with_readline
830 with_libedit_preferred
831 with_uuid
832 with_ossp_uuid
833 with_libxml
834 with_libxslt
835 with_system_tzdata
836 with_zlib
837 with_gnu_ld
838 enable_largefile
839 enable_float4_byval
840 enable_float8_byval
841 '
842       ac_precious_vars='build_alias
843 host_alias
844 target_alias
845 CC
846 CFLAGS
847 LDFLAGS
848 LIBS
849 CPPFLAGS
850 CPP
851 LDFLAGS_EX
852 LDFLAGS_SL
853 DOCBOOKSTYLE'
854
855
856 # Initialize some variables set by options.
857 ac_init_help=
858 ac_init_version=false
859 ac_unrecognized_opts=
860 ac_unrecognized_sep=
861 # The variables have the same names as the options, with
862 # dashes changed to underlines.
863 cache_file=/dev/null
864 exec_prefix=NONE
865 no_create=
866 no_recursion=
867 prefix=NONE
868 program_prefix=NONE
869 program_suffix=NONE
870 program_transform_name=s,x,x,
871 silent=
872 site=
873 srcdir=
874 verbose=
875 x_includes=NONE
876 x_libraries=NONE
877
878 # Installation directory options.
879 # These are left unexpanded so users can "make install exec_prefix=/foo"
880 # and all the variables that are supposed to be based on exec_prefix
881 # by default will actually change.
882 # Use braces instead of parens because sh, perl, etc. also accept them.
883 # (The list follows the same order as the GNU Coding Standards.)
884 bindir='${exec_prefix}/bin'
885 sbindir='${exec_prefix}/sbin'
886 libexecdir='${exec_prefix}/libexec'
887 datarootdir='${prefix}/share'
888 datadir='${datarootdir}'
889 sysconfdir='${prefix}/etc'
890 sharedstatedir='${prefix}/com'
891 localstatedir='${prefix}/var'
892 includedir='${prefix}/include'
893 oldincludedir='/usr/include'
894 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
895 infodir='${datarootdir}/info'
896 htmldir='${docdir}'
897 dvidir='${docdir}'
898 pdfdir='${docdir}'
899 psdir='${docdir}'
900 libdir='${exec_prefix}/lib'
901 localedir='${datarootdir}/locale'
902 mandir='${datarootdir}/man'
903
904 ac_prev=
905 ac_dashdash=
906 for ac_option
907 do
908   # If the previous option needs an argument, assign it.
909   if test -n "$ac_prev"; then
910     eval $ac_prev=\$ac_option
911     ac_prev=
912     continue
913   fi
914
915   case $ac_option in
916   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
917   *=)   ac_optarg= ;;
918   *)    ac_optarg=yes ;;
919   esac
920
921   # Accept the important Cygnus configure options, so we can diagnose typos.
922
923   case $ac_dashdash$ac_option in
924   --)
925     ac_dashdash=yes ;;
926
927   -bindir | --bindir | --bindi | --bind | --bin | --bi)
928     ac_prev=bindir ;;
929   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
930     bindir=$ac_optarg ;;
931
932   -build | --build | --buil | --bui | --bu)
933     ac_prev=build_alias ;;
934   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
935     build_alias=$ac_optarg ;;
936
937   -cache-file | --cache-file | --cache-fil | --cache-fi \
938   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
939     ac_prev=cache_file ;;
940   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
941   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
942     cache_file=$ac_optarg ;;
943
944   --config-cache | -C)
945     cache_file=config.cache ;;
946
947   -datadir | --datadir | --datadi | --datad)
948     ac_prev=datadir ;;
949   -datadir=* | --datadir=* | --datadi=* | --datad=*)
950     datadir=$ac_optarg ;;
951
952   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
953   | --dataroo | --dataro | --datar)
954     ac_prev=datarootdir ;;
955   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
956   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
957     datarootdir=$ac_optarg ;;
958
959   -disable-* | --disable-*)
960     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
961     # Reject names that are not valid shell variable names.
962     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
963       as_fn_error $? "invalid feature name: $ac_useropt"
964     ac_useropt_orig=$ac_useropt
965     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
966     case $ac_user_opts in
967       *"
968 "enable_$ac_useropt"
969 "*) ;;
970       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
971          ac_unrecognized_sep=', ';;
972     esac
973     eval enable_$ac_useropt=no ;;
974
975   -docdir | --docdir | --docdi | --doc | --do)
976     ac_prev=docdir ;;
977   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
978     docdir=$ac_optarg ;;
979
980   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
981     ac_prev=dvidir ;;
982   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
983     dvidir=$ac_optarg ;;
984
985   -enable-* | --enable-*)
986     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
987     # Reject names that are not valid shell variable names.
988     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
989       as_fn_error $? "invalid feature name: $ac_useropt"
990     ac_useropt_orig=$ac_useropt
991     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
992     case $ac_user_opts in
993       *"
994 "enable_$ac_useropt"
995 "*) ;;
996       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
997          ac_unrecognized_sep=', ';;
998     esac
999     eval enable_$ac_useropt=\$ac_optarg ;;
1000
1001   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1002   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1003   | --exec | --exe | --ex)
1004     ac_prev=exec_prefix ;;
1005   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1006   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1007   | --exec=* | --exe=* | --ex=*)
1008     exec_prefix=$ac_optarg ;;
1009
1010   -gas | --gas | --ga | --g)
1011     # Obsolete; use --with-gas.
1012     with_gas=yes ;;
1013
1014   -help | --help | --hel | --he | -h)
1015     ac_init_help=long ;;
1016   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1017     ac_init_help=recursive ;;
1018   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1019     ac_init_help=short ;;
1020
1021   -host | --host | --hos | --ho)
1022     ac_prev=host_alias ;;
1023   -host=* | --host=* | --hos=* | --ho=*)
1024     host_alias=$ac_optarg ;;
1025
1026   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1027     ac_prev=htmldir ;;
1028   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1029   | --ht=*)
1030     htmldir=$ac_optarg ;;
1031
1032   -includedir | --includedir | --includedi | --included | --include \
1033   | --includ | --inclu | --incl | --inc)
1034     ac_prev=includedir ;;
1035   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1036   | --includ=* | --inclu=* | --incl=* | --inc=*)
1037     includedir=$ac_optarg ;;
1038
1039   -infodir | --infodir | --infodi | --infod | --info | --inf)
1040     ac_prev=infodir ;;
1041   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1042     infodir=$ac_optarg ;;
1043
1044   -libdir | --libdir | --libdi | --libd)
1045     ac_prev=libdir ;;
1046   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1047     libdir=$ac_optarg ;;
1048
1049   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1050   | --libexe | --libex | --libe)
1051     ac_prev=libexecdir ;;
1052   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1053   | --libexe=* | --libex=* | --libe=*)
1054     libexecdir=$ac_optarg ;;
1055
1056   -localedir | --localedir | --localedi | --localed | --locale)
1057     ac_prev=localedir ;;
1058   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1059     localedir=$ac_optarg ;;
1060
1061   -localstatedir | --localstatedir | --localstatedi | --localstated \
1062   | --localstate | --localstat | --localsta | --localst | --locals)
1063     ac_prev=localstatedir ;;
1064   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1065   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1066     localstatedir=$ac_optarg ;;
1067
1068   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1069     ac_prev=mandir ;;
1070   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1071     mandir=$ac_optarg ;;
1072
1073   -nfp | --nfp | --nf)
1074     # Obsolete; use --without-fp.
1075     with_fp=no ;;
1076
1077   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1078   | --no-cr | --no-c | -n)
1079     no_create=yes ;;
1080
1081   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1082   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1083     no_recursion=yes ;;
1084
1085   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1086   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1087   | --oldin | --oldi | --old | --ol | --o)
1088     ac_prev=oldincludedir ;;
1089   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1090   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1091   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1092     oldincludedir=$ac_optarg ;;
1093
1094   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1095     ac_prev=prefix ;;
1096   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1097     prefix=$ac_optarg ;;
1098
1099   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1100   | --program-pre | --program-pr | --program-p)
1101     ac_prev=program_prefix ;;
1102   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1103   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1104     program_prefix=$ac_optarg ;;
1105
1106   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1107   | --program-suf | --program-su | --program-s)
1108     ac_prev=program_suffix ;;
1109   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1110   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1111     program_suffix=$ac_optarg ;;
1112
1113   -program-transform-name | --program-transform-name \
1114   | --program-transform-nam | --program-transform-na \
1115   | --program-transform-n | --program-transform- \
1116   | --program-transform | --program-transfor \
1117   | --program-transfo | --program-transf \
1118   | --program-trans | --program-tran \
1119   | --progr-tra | --program-tr | --program-t)
1120     ac_prev=program_transform_name ;;
1121   -program-transform-name=* | --program-transform-name=* \
1122   | --program-transform-nam=* | --program-transform-na=* \
1123   | --program-transform-n=* | --program-transform-=* \
1124   | --program-transform=* | --program-transfor=* \
1125   | --program-transfo=* | --program-transf=* \
1126   | --program-trans=* | --program-tran=* \
1127   | --progr-tra=* | --program-tr=* | --program-t=*)
1128     program_transform_name=$ac_optarg ;;
1129
1130   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1131     ac_prev=pdfdir ;;
1132   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1133     pdfdir=$ac_optarg ;;
1134
1135   -psdir | --psdir | --psdi | --psd | --ps)
1136     ac_prev=psdir ;;
1137   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1138     psdir=$ac_optarg ;;
1139
1140   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1141   | -silent | --silent | --silen | --sile | --sil)
1142     silent=yes ;;
1143
1144   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1145     ac_prev=sbindir ;;
1146   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1147   | --sbi=* | --sb=*)
1148     sbindir=$ac_optarg ;;
1149
1150   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1151   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1152   | --sharedst | --shareds | --shared | --share | --shar \
1153   | --sha | --sh)
1154     ac_prev=sharedstatedir ;;
1155   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1156   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1157   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1158   | --sha=* | --sh=*)
1159     sharedstatedir=$ac_optarg ;;
1160
1161   -site | --site | --sit)
1162     ac_prev=site ;;
1163   -site=* | --site=* | --sit=*)
1164     site=$ac_optarg ;;
1165
1166   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1167     ac_prev=srcdir ;;
1168   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1169     srcdir=$ac_optarg ;;
1170
1171   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1172   | --syscon | --sysco | --sysc | --sys | --sy)
1173     ac_prev=sysconfdir ;;
1174   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1175   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1176     sysconfdir=$ac_optarg ;;
1177
1178   -target | --target | --targe | --targ | --tar | --ta | --t)
1179     ac_prev=target_alias ;;
1180   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1181     target_alias=$ac_optarg ;;
1182
1183   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1184     verbose=yes ;;
1185
1186   -version | --version | --versio | --versi | --vers | -V)
1187     ac_init_version=: ;;
1188
1189   -with-* | --with-*)
1190     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1191     # Reject names that are not valid shell variable names.
1192     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1193       as_fn_error $? "invalid package name: $ac_useropt"
1194     ac_useropt_orig=$ac_useropt
1195     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1196     case $ac_user_opts in
1197       *"
1198 "with_$ac_useropt"
1199 "*) ;;
1200       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1201          ac_unrecognized_sep=', ';;
1202     esac
1203     eval with_$ac_useropt=\$ac_optarg ;;
1204
1205   -without-* | --without-*)
1206     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1207     # Reject names that are not valid shell variable names.
1208     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1209       as_fn_error $? "invalid package name: $ac_useropt"
1210     ac_useropt_orig=$ac_useropt
1211     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1212     case $ac_user_opts in
1213       *"
1214 "with_$ac_useropt"
1215 "*) ;;
1216       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1217          ac_unrecognized_sep=', ';;
1218     esac
1219     eval with_$ac_useropt=no ;;
1220
1221   --x)
1222     # Obsolete; use --with-x.
1223     with_x=yes ;;
1224
1225   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1226   | --x-incl | --x-inc | --x-in | --x-i)
1227     ac_prev=x_includes ;;
1228   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1229   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1230     x_includes=$ac_optarg ;;
1231
1232   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1233   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1234     ac_prev=x_libraries ;;
1235   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1236   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1237     x_libraries=$ac_optarg ;;
1238
1239   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1240 Try \`$0 --help' for more information"
1241     ;;
1242
1243   *=*)
1244     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1245     # Reject names that are not valid shell variable names.
1246     case $ac_envvar in #(
1247       '' | [0-9]* | *[!_$as_cr_alnum]* )
1248       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1249     esac
1250     eval $ac_envvar=\$ac_optarg
1251     export $ac_envvar ;;
1252
1253   *)
1254     # FIXME: should be removed in autoconf 3.0.
1255     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1256     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1257       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1258     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1259     ;;
1260
1261   esac
1262 done
1263
1264 if test -n "$ac_prev"; then
1265   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1266   as_fn_error $? "missing argument to $ac_option"
1267 fi
1268
1269 if test -n "$ac_unrecognized_opts"; then
1270   case $enable_option_checking in
1271     no) ;;
1272     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1273     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1274   esac
1275 fi
1276
1277 # Check all directory arguments for consistency.
1278 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1279                 datadir sysconfdir sharedstatedir localstatedir includedir \
1280                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1281                 libdir localedir mandir
1282 do
1283   eval ac_val=\$$ac_var
1284   # Remove trailing slashes.
1285   case $ac_val in
1286     */ )
1287       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1288       eval $ac_var=\$ac_val;;
1289   esac
1290   # Be sure to have absolute directory names.
1291   case $ac_val in
1292     [\\/$]* | ?:[\\/]* )  continue;;
1293     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1294   esac
1295   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1296 done
1297
1298 # There might be people who depend on the old broken behavior: `$host'
1299 # used to hold the argument of --host etc.
1300 # FIXME: To remove some day.
1301 build=$build_alias
1302 host=$host_alias
1303 target=$target_alias
1304
1305 # FIXME: To remove some day.
1306 if test "x$host_alias" != x; then
1307   if test "x$build_alias" = x; then
1308     cross_compiling=maybe
1309   elif test "x$build_alias" != "x$host_alias"; then
1310     cross_compiling=yes
1311   fi
1312 fi
1313
1314 ac_tool_prefix=
1315 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1316
1317 test "$silent" = yes && exec 6>/dev/null
1318
1319
1320 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1321 ac_ls_di=`ls -di .` &&
1322 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1323   as_fn_error $? "working directory cannot be determined"
1324 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1325   as_fn_error $? "pwd does not report name of working directory"
1326
1327
1328 # Find the source files, if location was not specified.
1329 if test -z "$srcdir"; then
1330   ac_srcdir_defaulted=yes
1331   # Try the directory containing this script, then the parent directory.
1332   ac_confdir=`$as_dirname -- "$as_myself" ||
1333 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1334          X"$as_myself" : 'X\(//\)[^/]' \| \
1335          X"$as_myself" : 'X\(//\)$' \| \
1336          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1337 $as_echo X"$as_myself" |
1338     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1339             s//\1/
1340             q
1341           }
1342           /^X\(\/\/\)[^/].*/{
1343             s//\1/
1344             q
1345           }
1346           /^X\(\/\/\)$/{
1347             s//\1/
1348             q
1349           }
1350           /^X\(\/\).*/{
1351             s//\1/
1352             q
1353           }
1354           s/.*/./; q'`
1355   srcdir=$ac_confdir
1356   if test ! -r "$srcdir/$ac_unique_file"; then
1357     srcdir=..
1358   fi
1359 else
1360   ac_srcdir_defaulted=no
1361 fi
1362 if test ! -r "$srcdir/$ac_unique_file"; then
1363   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1364   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1365 fi
1366 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1367 ac_abs_confdir=`(
1368         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1369         pwd)`
1370 # When building in place, set srcdir=.
1371 if test "$ac_abs_confdir" = "$ac_pwd"; then
1372   srcdir=.
1373 fi
1374 # Remove unnecessary trailing slashes from srcdir.
1375 # Double slashes in file names in object file debugging info
1376 # mess up M-x gdb in Emacs.
1377 case $srcdir in
1378 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1379 esac
1380 for ac_var in $ac_precious_vars; do
1381   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1382   eval ac_env_${ac_var}_value=\$${ac_var}
1383   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1384   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1385 done
1386
1387 #
1388 # Report the --help message.
1389 #
1390 if test "$ac_init_help" = "long"; then
1391   # Omit some internal or obsolete options to make the list less imposing.
1392   # This message is too long to be a string in the A/UX 3.1 sh.
1393   cat <<_ACEOF
1394 \`configure' configures PostgreSQL 9.5devel to adapt to many kinds of systems.
1395
1396 Usage: $0 [OPTION]... [VAR=VALUE]...
1397
1398 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1399 VAR=VALUE.  See below for descriptions of some of the useful variables.
1400
1401 Defaults for the options are specified in brackets.
1402
1403 Configuration:
1404   -h, --help              display this help and exit
1405       --help=short        display options specific to this package
1406       --help=recursive    display the short help of all the included packages
1407   -V, --version           display version information and exit
1408   -q, --quiet, --silent   do not print \`checking ...' messages
1409       --cache-file=FILE   cache test results in FILE [disabled]
1410   -C, --config-cache      alias for \`--cache-file=config.cache'
1411   -n, --no-create         do not create output files
1412       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1413
1414 Installation directories:
1415   --prefix=PREFIX         install architecture-independent files in PREFIX
1416                           [$ac_default_prefix]
1417   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1418                           [PREFIX]
1419
1420 By default, \`make install' will install all the files in
1421 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1422 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1423 for instance \`--prefix=\$HOME'.
1424
1425 For better control, use the options below.
1426
1427 Fine tuning of the installation directories:
1428   --bindir=DIR            user executables [EPREFIX/bin]
1429   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1430   --libexecdir=DIR        program executables [EPREFIX/libexec]
1431   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1432   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1433   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1434   --libdir=DIR            object code libraries [EPREFIX/lib]
1435   --includedir=DIR        C header files [PREFIX/include]
1436   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1437   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1438   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1439   --infodir=DIR           info documentation [DATAROOTDIR/info]
1440   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1441   --mandir=DIR            man documentation [DATAROOTDIR/man]
1442   --docdir=DIR            documentation root [DATAROOTDIR/doc/postgresql]
1443   --htmldir=DIR           html documentation [DOCDIR]
1444   --dvidir=DIR            dvi documentation [DOCDIR]
1445   --pdfdir=DIR            pdf documentation [DOCDIR]
1446   --psdir=DIR             ps documentation [DOCDIR]
1447 _ACEOF
1448
1449   cat <<\_ACEOF
1450
1451 System types:
1452   --build=BUILD     configure for building on BUILD [guessed]
1453   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1454 _ACEOF
1455 fi
1456
1457 if test -n "$ac_init_help"; then
1458   case $ac_init_help in
1459      short | recursive ) echo "Configuration of PostgreSQL 9.5devel:";;
1460    esac
1461   cat <<\_ACEOF
1462
1463 Optional Features:
1464   --disable-option-checking  ignore unrecognized --enable/--with options
1465   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1466   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1467   --disable-integer-datetimes
1468                           disable 64-bit integer date/time support
1469   --enable-nls[=LANGUAGES]
1470                           enable Native Language Support
1471   --disable-rpath         do not embed shared library search path in
1472                           executables
1473   --disable-spinlocks     do not use spinlocks
1474   --disable-atomics       do not use atomic operations
1475   --enable-debug          build with debugging symbols (-g)
1476   --enable-profiling      build with profiling enabled
1477   --enable-coverage       build with coverage testing instrumentation
1478   --enable-dtrace         build with DTrace support
1479   --enable-depend         turn on automatic dependency tracking
1480   --enable-cassert        enable assertion checks (for debugging)
1481   --disable-thread-safety disable thread-safety in client libraries
1482   --disable-largefile     omit support for large files
1483   --disable-float4-byval  disable float4 passed by value
1484   --disable-float8-byval  disable float8 passed by value
1485
1486 Optional Packages:
1487   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1488   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1489   --with-extra-version=STRING
1490                           append STRING to version
1491   --with-template=NAME    override operating system template
1492   --with-includes=DIRS    look for additional header files in DIRS
1493   --with-libraries=DIRS   look for additional libraries in DIRS
1494   --with-libs=DIRS        alternative spelling of --with-libraries
1495   --with-pgport=PORTNUM   set default port number [5432]
1496   --with-blocksize=BLOCKSIZE
1497                           set table block size in kB [8]
1498   --with-segsize=SEGSIZE  set table segment size in GB [1]
1499   --with-wal-blocksize=BLOCKSIZE
1500                           set WAL block size in kB [8]
1501   --with-wal-segsize=SEGSIZE
1502                           set WAL segment size in MB [16]
1503   --with-CC=CMD           set compiler (deprecated)
1504   --with-tcl              build Tcl modules (PL/Tcl)
1505   --with-tclconfig=DIR    tclConfig.sh is in DIR
1506   --with-perl             build Perl modules (PL/Perl)
1507   --with-python           build Python modules (PL/Python)
1508   --with-gssapi           build with GSSAPI support
1509   --with-krb-srvnam=NAME  default service principal name in Kerberos (GSSAPI)
1510                           [postgres]
1511   --with-pam              build with PAM support
1512   --with-ldap             build with LDAP support
1513   --with-bonjour          build with Bonjour support
1514   --with-openssl          build with OpenSSL support
1515   --with-selinux          build with SELinux support
1516   --without-readline      do not use GNU Readline nor BSD Libedit for editing
1517   --with-libedit-preferred
1518                           prefer BSD Libedit over GNU Readline
1519   --with-uuid=LIB         build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1520   --with-ossp-uuid        obsolete spelling of --with-uuid=ossp
1521   --with-libxml           build with XML support
1522   --with-libxslt          use XSLT support when building contrib/xml2
1523   --with-system-tzdata=DIR
1524                           use system time zone data in DIR
1525   --without-zlib          do not use Zlib
1526   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1527
1528 Some influential environment variables:
1529   CC          C compiler command
1530   CFLAGS      C compiler flags
1531   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1532               nonstandard directory <lib dir>
1533   LIBS        libraries to pass to the linker, e.g. -l<library>
1534   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1535               you have headers in a nonstandard directory <include dir>
1536   CPP         C preprocessor
1537   LDFLAGS_EX  extra linker flags for linking executables only
1538   LDFLAGS_SL  extra linker flags for linking shared libraries only
1539   DOCBOOKSTYLE
1540               location of DocBook stylesheets
1541
1542 Use these variables to override the choices made by `configure' or to help
1543 it to find libraries and programs with nonstandard names/locations.
1544
1545 Report bugs to <pgsql-bugs@postgresql.org>.
1546 _ACEOF
1547 ac_status=$?
1548 fi
1549
1550 if test "$ac_init_help" = "recursive"; then
1551   # If there are subdirs, report their specific --help.
1552   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1553     test -d "$ac_dir" ||
1554       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1555       continue
1556     ac_builddir=.
1557
1558 case "$ac_dir" in
1559 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1560 *)
1561   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1562   # A ".." for each directory in $ac_dir_suffix.
1563   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1564   case $ac_top_builddir_sub in
1565   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1566   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1567   esac ;;
1568 esac
1569 ac_abs_top_builddir=$ac_pwd
1570 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1571 # for backward compatibility:
1572 ac_top_builddir=$ac_top_build_prefix
1573
1574 case $srcdir in
1575   .)  # We are building in place.
1576     ac_srcdir=.
1577     ac_top_srcdir=$ac_top_builddir_sub
1578     ac_abs_top_srcdir=$ac_pwd ;;
1579   [\\/]* | ?:[\\/]* )  # Absolute name.
1580     ac_srcdir=$srcdir$ac_dir_suffix;
1581     ac_top_srcdir=$srcdir
1582     ac_abs_top_srcdir=$srcdir ;;
1583   *) # Relative name.
1584     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1585     ac_top_srcdir=$ac_top_build_prefix$srcdir
1586     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1587 esac
1588 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1589
1590     cd "$ac_dir" || { ac_status=$?; continue; }
1591     # Check for guested configure.
1592     if test -f "$ac_srcdir/configure.gnu"; then
1593       echo &&
1594       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1595     elif test -f "$ac_srcdir/configure"; then
1596       echo &&
1597       $SHELL "$ac_srcdir/configure" --help=recursive
1598     else
1599       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1600     fi || ac_status=$?
1601     cd "$ac_pwd" || { ac_status=$?; break; }
1602   done
1603 fi
1604
1605 test -n "$ac_init_help" && exit $ac_status
1606 if $ac_init_version; then
1607   cat <<\_ACEOF
1608 PostgreSQL configure 9.5devel
1609 generated by GNU Autoconf 2.69
1610
1611 Copyright (C) 2012 Free Software Foundation, Inc.
1612 This configure script is free software; the Free Software Foundation
1613 gives unlimited permission to copy, distribute and modify it.
1614
1615 Copyright (c) 1996-2014, PostgreSQL Global Development Group
1616 _ACEOF
1617   exit
1618 fi
1619
1620 ## ------------------------ ##
1621 ## Autoconf initialization. ##
1622 ## ------------------------ ##
1623
1624 # ac_fn_c_try_compile LINENO
1625 # --------------------------
1626 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1627 ac_fn_c_try_compile ()
1628 {
1629   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1630   rm -f conftest.$ac_objext
1631   if { { ac_try="$ac_compile"
1632 case "(($ac_try" in
1633   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1634   *) ac_try_echo=$ac_try;;
1635 esac
1636 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1637 $as_echo "$ac_try_echo"; } >&5
1638   (eval "$ac_compile") 2>conftest.err
1639   ac_status=$?
1640   if test -s conftest.err; then
1641     grep -v '^ *+' conftest.err >conftest.er1
1642     cat conftest.er1 >&5
1643     mv -f conftest.er1 conftest.err
1644   fi
1645   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1646   test $ac_status = 0; } && {
1647          test -z "$ac_c_werror_flag" ||
1648          test ! -s conftest.err
1649        } && test -s conftest.$ac_objext; then :
1650   ac_retval=0
1651 else
1652   $as_echo "$as_me: failed program was:" >&5
1653 sed 's/^/| /' conftest.$ac_ext >&5
1654
1655         ac_retval=1
1656 fi
1657   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1658   as_fn_set_status $ac_retval
1659
1660 } # ac_fn_c_try_compile
1661
1662 # ac_fn_c_try_link LINENO
1663 # -----------------------
1664 # Try to link conftest.$ac_ext, and return whether this succeeded.
1665 ac_fn_c_try_link ()
1666 {
1667   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1668   rm -f conftest.$ac_objext conftest$ac_exeext
1669   if { { ac_try="$ac_link"
1670 case "(($ac_try" in
1671   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1672   *) ac_try_echo=$ac_try;;
1673 esac
1674 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1675 $as_echo "$ac_try_echo"; } >&5
1676   (eval "$ac_link") 2>conftest.err
1677   ac_status=$?
1678   if test -s conftest.err; then
1679     grep -v '^ *+' conftest.err >conftest.er1
1680     cat conftest.er1 >&5
1681     mv -f conftest.er1 conftest.err
1682   fi
1683   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1684   test $ac_status = 0; } && {
1685          test -z "$ac_c_werror_flag" ||
1686          test ! -s conftest.err
1687        } && test -s conftest$ac_exeext && {
1688          test "$cross_compiling" = yes ||
1689          test -x conftest$ac_exeext
1690        }; then :
1691   ac_retval=0
1692 else
1693   $as_echo "$as_me: failed program was:" >&5
1694 sed 's/^/| /' conftest.$ac_ext >&5
1695
1696         ac_retval=1
1697 fi
1698   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1699   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1700   # interfere with the next link command; also delete a directory that is
1701   # left behind by Apple's compiler.  We do this before executing the actions.
1702   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1703   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1704   as_fn_set_status $ac_retval
1705
1706 } # ac_fn_c_try_link
1707
1708 # ac_fn_c_try_cpp LINENO
1709 # ----------------------
1710 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1711 ac_fn_c_try_cpp ()
1712 {
1713   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1714   if { { ac_try="$ac_cpp conftest.$ac_ext"
1715 case "(($ac_try" in
1716   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1717   *) ac_try_echo=$ac_try;;
1718 esac
1719 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1720 $as_echo "$ac_try_echo"; } >&5
1721   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1722   ac_status=$?
1723   if test -s conftest.err; then
1724     grep -v '^ *+' conftest.err >conftest.er1
1725     cat conftest.er1 >&5
1726     mv -f conftest.er1 conftest.err
1727   fi
1728   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1729   test $ac_status = 0; } > conftest.i && {
1730          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1731          test ! -s conftest.err
1732        }; then :
1733   ac_retval=0
1734 else
1735   $as_echo "$as_me: failed program was:" >&5
1736 sed 's/^/| /' conftest.$ac_ext >&5
1737
1738     ac_retval=1
1739 fi
1740   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1741   as_fn_set_status $ac_retval
1742
1743 } # ac_fn_c_try_cpp
1744
1745 # ac_fn_c_check_func LINENO FUNC VAR
1746 # ----------------------------------
1747 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1748 ac_fn_c_check_func ()
1749 {
1750   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1751   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1752 $as_echo_n "checking for $2... " >&6; }
1753 if eval \${$3+:} false; then :
1754   $as_echo_n "(cached) " >&6
1755 else
1756   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1757 /* end confdefs.h.  */
1758 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1759    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1760 #define $2 innocuous_$2
1761
1762 /* System header to define __stub macros and hopefully few prototypes,
1763     which can conflict with char $2 (); below.
1764     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1765     <limits.h> exists even on freestanding compilers.  */
1766
1767 #ifdef __STDC__
1768 # include <limits.h>
1769 #else
1770 # include <assert.h>
1771 #endif
1772
1773 #undef $2
1774
1775 /* Override any GCC internal prototype to avoid an error.
1776    Use char because int might match the return type of a GCC
1777    builtin and then its argument prototype would still apply.  */
1778 #ifdef __cplusplus
1779 extern "C"
1780 #endif
1781 char $2 ();
1782 /* The GNU C library defines this for functions which it implements
1783     to always fail with ENOSYS.  Some functions are actually named
1784     something starting with __ and the normal name is an alias.  */
1785 #if defined __stub_$2 || defined __stub___$2
1786 choke me
1787 #endif
1788
1789 int
1790 main ()
1791 {
1792 return $2 ();
1793   ;
1794   return 0;
1795 }
1796 _ACEOF
1797 if ac_fn_c_try_link "$LINENO"; then :
1798   eval "$3=yes"
1799 else
1800   eval "$3=no"
1801 fi
1802 rm -f core conftest.err conftest.$ac_objext \
1803     conftest$ac_exeext conftest.$ac_ext
1804 fi
1805 eval ac_res=\$$3
1806                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1807 $as_echo "$ac_res" >&6; }
1808   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1809
1810 } # ac_fn_c_check_func
1811
1812 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1813 # -------------------------------------------------------
1814 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1815 # the include files in INCLUDES and setting the cache variable VAR
1816 # accordingly.
1817 ac_fn_c_check_header_mongrel ()
1818 {
1819   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1820   if eval \${$3+:} false; then :
1821   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1822 $as_echo_n "checking for $2... " >&6; }
1823 if eval \${$3+:} false; then :
1824   $as_echo_n "(cached) " >&6
1825 fi
1826 eval ac_res=\$$3
1827                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1828 $as_echo "$ac_res" >&6; }
1829 else
1830   # Is the header compilable?
1831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1832 $as_echo_n "checking $2 usability... " >&6; }
1833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1834 /* end confdefs.h.  */
1835 $4
1836 #include <$2>
1837 _ACEOF
1838 if ac_fn_c_try_compile "$LINENO"; then :
1839   ac_header_compiler=yes
1840 else
1841   ac_header_compiler=no
1842 fi
1843 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1845 $as_echo "$ac_header_compiler" >&6; }
1846
1847 # Is the header present?
1848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1849 $as_echo_n "checking $2 presence... " >&6; }
1850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1851 /* end confdefs.h.  */
1852 #include <$2>
1853 _ACEOF
1854 if ac_fn_c_try_cpp "$LINENO"; then :
1855   ac_header_preproc=yes
1856 else
1857   ac_header_preproc=no
1858 fi
1859 rm -f conftest.err conftest.i conftest.$ac_ext
1860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1861 $as_echo "$ac_header_preproc" >&6; }
1862
1863 # So?  What about this header?
1864 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1865   yes:no: )
1866     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1867 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1868     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1869 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1870     ;;
1871   no:yes:* )
1872     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1873 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1874     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1875 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1876     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1877 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1878     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1879 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1880     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1881 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1882 ( $as_echo "## ---------------------------------------- ##
1883 ## Report this to pgsql-bugs@postgresql.org ##
1884 ## ---------------------------------------- ##"
1885      ) | sed "s/^/$as_me: WARNING:     /" >&2
1886     ;;
1887 esac
1888   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1889 $as_echo_n "checking for $2... " >&6; }
1890 if eval \${$3+:} false; then :
1891   $as_echo_n "(cached) " >&6
1892 else
1893   eval "$3=\$ac_header_compiler"
1894 fi
1895 eval ac_res=\$$3
1896                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1897 $as_echo "$ac_res" >&6; }
1898 fi
1899   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1900
1901 } # ac_fn_c_check_header_mongrel
1902
1903 # ac_fn_c_try_run LINENO
1904 # ----------------------
1905 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1906 # that executables *can* be run.
1907 ac_fn_c_try_run ()
1908 {
1909   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1910   if { { ac_try="$ac_link"
1911 case "(($ac_try" in
1912   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1913   *) ac_try_echo=$ac_try;;
1914 esac
1915 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1916 $as_echo "$ac_try_echo"; } >&5
1917   (eval "$ac_link") 2>&5
1918   ac_status=$?
1919   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1920   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1921   { { case "(($ac_try" in
1922   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1923   *) ac_try_echo=$ac_try;;
1924 esac
1925 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1926 $as_echo "$ac_try_echo"; } >&5
1927   (eval "$ac_try") 2>&5
1928   ac_status=$?
1929   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1930   test $ac_status = 0; }; }; then :
1931   ac_retval=0
1932 else
1933   $as_echo "$as_me: program exited with status $ac_status" >&5
1934        $as_echo "$as_me: failed program was:" >&5
1935 sed 's/^/| /' conftest.$ac_ext >&5
1936
1937        ac_retval=$ac_status
1938 fi
1939   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1940   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1941   as_fn_set_status $ac_retval
1942
1943 } # ac_fn_c_try_run
1944
1945 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1946 # -------------------------------------------------------
1947 # Tests whether HEADER exists and can be compiled using the include files in
1948 # INCLUDES, setting the cache variable VAR accordingly.
1949 ac_fn_c_check_header_compile ()
1950 {
1951   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1952   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1953 $as_echo_n "checking for $2... " >&6; }
1954 if eval \${$3+:} false; then :
1955   $as_echo_n "(cached) " >&6
1956 else
1957   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1958 /* end confdefs.h.  */
1959 $4
1960 #include <$2>
1961 _ACEOF
1962 if ac_fn_c_try_compile "$LINENO"; then :
1963   eval "$3=yes"
1964 else
1965   eval "$3=no"
1966 fi
1967 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1968 fi
1969 eval ac_res=\$$3
1970                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1971 $as_echo "$ac_res" >&6; }
1972   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1973
1974 } # ac_fn_c_check_header_compile
1975
1976 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
1977 # ----------------------------------------------------
1978 # Tries to find if the field MEMBER exists in type AGGR, after including
1979 # INCLUDES, setting cache variable VAR accordingly.
1980 ac_fn_c_check_member ()
1981 {
1982   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1983   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
1984 $as_echo_n "checking for $2.$3... " >&6; }
1985 if eval \${$4+:} false; then :
1986   $as_echo_n "(cached) " >&6
1987 else
1988   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1989 /* end confdefs.h.  */
1990 $5
1991 int
1992 main ()
1993 {
1994 static $2 ac_aggr;
1995 if (ac_aggr.$3)
1996 return 0;
1997   ;
1998   return 0;
1999 }
2000 _ACEOF
2001 if ac_fn_c_try_compile "$LINENO"; then :
2002   eval "$4=yes"
2003 else
2004   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2005 /* end confdefs.h.  */
2006 $5
2007 int
2008 main ()
2009 {
2010 static $2 ac_aggr;
2011 if (sizeof ac_aggr.$3)
2012 return 0;
2013   ;
2014   return 0;
2015 }
2016 _ACEOF
2017 if ac_fn_c_try_compile "$LINENO"; then :
2018   eval "$4=yes"
2019 else
2020   eval "$4=no"
2021 fi
2022 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2023 fi
2024 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2025 fi
2026 eval ac_res=\$$4
2027                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2028 $as_echo "$ac_res" >&6; }
2029   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2030
2031 } # ac_fn_c_check_member
2032
2033 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2034 # -------------------------------------------
2035 # Tests whether TYPE exists after having included INCLUDES, setting cache
2036 # variable VAR accordingly.
2037 ac_fn_c_check_type ()
2038 {
2039   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2040   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2041 $as_echo_n "checking for $2... " >&6; }
2042 if eval \${$3+:} false; then :
2043   $as_echo_n "(cached) " >&6
2044 else
2045   eval "$3=no"
2046   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2047 /* end confdefs.h.  */
2048 $4
2049 int
2050 main ()
2051 {
2052 if (sizeof ($2))
2053          return 0;
2054   ;
2055   return 0;
2056 }
2057 _ACEOF
2058 if ac_fn_c_try_compile "$LINENO"; then :
2059   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2060 /* end confdefs.h.  */
2061 $4
2062 int
2063 main ()
2064 {
2065 if (sizeof (($2)))
2066             return 0;
2067   ;
2068   return 0;
2069 }
2070 _ACEOF
2071 if ac_fn_c_try_compile "$LINENO"; then :
2072
2073 else
2074   eval "$3=yes"
2075 fi
2076 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2077 fi
2078 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2079 fi
2080 eval ac_res=\$$3
2081                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2082 $as_echo "$ac_res" >&6; }
2083   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2084
2085 } # ac_fn_c_check_type
2086
2087 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2088 # --------------------------------------------
2089 # Tries to find the compile-time value of EXPR in a program that includes
2090 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2091 # computed
2092 ac_fn_c_compute_int ()
2093 {
2094   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2095   if test "$cross_compiling" = yes; then
2096     # Depending upon the size, compute the lo and hi bounds.
2097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2098 /* end confdefs.h.  */
2099 $4
2100 int
2101 main ()
2102 {
2103 static int test_array [1 - 2 * !(($2) >= 0)];
2104 test_array [0] = 0;
2105 return test_array [0];
2106
2107   ;
2108   return 0;
2109 }
2110 _ACEOF
2111 if ac_fn_c_try_compile "$LINENO"; then :
2112   ac_lo=0 ac_mid=0
2113   while :; do
2114     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2115 /* end confdefs.h.  */
2116 $4
2117 int
2118 main ()
2119 {
2120 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2121 test_array [0] = 0;
2122 return test_array [0];
2123
2124   ;
2125   return 0;
2126 }
2127 _ACEOF
2128 if ac_fn_c_try_compile "$LINENO"; then :
2129   ac_hi=$ac_mid; break
2130 else
2131   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2132                         if test $ac_lo -le $ac_mid; then
2133                           ac_lo= ac_hi=
2134                           break
2135                         fi
2136                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2137 fi
2138 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2139   done
2140 else
2141   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2142 /* end confdefs.h.  */
2143 $4
2144 int
2145 main ()
2146 {
2147 static int test_array [1 - 2 * !(($2) < 0)];
2148 test_array [0] = 0;
2149 return test_array [0];
2150
2151   ;
2152   return 0;
2153 }
2154 _ACEOF
2155 if ac_fn_c_try_compile "$LINENO"; then :
2156   ac_hi=-1 ac_mid=-1
2157   while :; do
2158     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2159 /* end confdefs.h.  */
2160 $4
2161 int
2162 main ()
2163 {
2164 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2165 test_array [0] = 0;
2166 return test_array [0];
2167
2168   ;
2169   return 0;
2170 }
2171 _ACEOF
2172 if ac_fn_c_try_compile "$LINENO"; then :
2173   ac_lo=$ac_mid; break
2174 else
2175   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2176                         if test $ac_mid -le $ac_hi; then
2177                           ac_lo= ac_hi=
2178                           break
2179                         fi
2180                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2181 fi
2182 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2183   done
2184 else
2185   ac_lo= ac_hi=
2186 fi
2187 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2188 fi
2189 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2190 # Binary search between lo and hi bounds.
2191 while test "x$ac_lo" != "x$ac_hi"; do
2192   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2193   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2194 /* end confdefs.h.  */
2195 $4
2196 int
2197 main ()
2198 {
2199 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2200 test_array [0] = 0;
2201 return test_array [0];
2202
2203   ;
2204   return 0;
2205 }
2206 _ACEOF
2207 if ac_fn_c_try_compile "$LINENO"; then :
2208   ac_hi=$ac_mid
2209 else
2210   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2211 fi
2212 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2213 done
2214 case $ac_lo in #((
2215 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2216 '') ac_retval=1 ;;
2217 esac
2218   else
2219     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2220 /* end confdefs.h.  */
2221 $4
2222 static long int longval () { return $2; }
2223 static unsigned long int ulongval () { return $2; }
2224 #include <stdio.h>
2225 #include <stdlib.h>
2226 int
2227 main ()
2228 {
2229
2230   FILE *f = fopen ("conftest.val", "w");
2231   if (! f)
2232     return 1;
2233   if (($2) < 0)
2234     {
2235       long int i = longval ();
2236       if (i != ($2))
2237         return 1;
2238       fprintf (f, "%ld", i);
2239     }
2240   else
2241     {
2242       unsigned long int i = ulongval ();
2243       if (i != ($2))
2244         return 1;
2245       fprintf (f, "%lu", i);
2246     }
2247   /* Do not output a trailing newline, as this causes \r\n confusion
2248      on some platforms.  */
2249   return ferror (f) || fclose (f) != 0;
2250
2251   ;
2252   return 0;
2253 }
2254 _ACEOF
2255 if ac_fn_c_try_run "$LINENO"; then :
2256   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2257 else
2258   ac_retval=1
2259 fi
2260 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2261   conftest.$ac_objext conftest.beam conftest.$ac_ext
2262 rm -f conftest.val
2263
2264   fi
2265   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2266   as_fn_set_status $ac_retval
2267
2268 } # ac_fn_c_compute_int
2269
2270 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2271 # ---------------------------------------------
2272 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2273 # accordingly.
2274 ac_fn_c_check_decl ()
2275 {
2276   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2277   as_decl_name=`echo $2|sed 's/ *(.*//'`
2278   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2279   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2280 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2281 if eval \${$3+:} false; then :
2282   $as_echo_n "(cached) " >&6
2283 else
2284   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2285 /* end confdefs.h.  */
2286 $4
2287 int
2288 main ()
2289 {
2290 #ifndef $as_decl_name
2291 #ifdef __cplusplus
2292   (void) $as_decl_use;
2293 #else
2294   (void) $as_decl_name;
2295 #endif
2296 #endif
2297
2298   ;
2299   return 0;
2300 }
2301 _ACEOF
2302 if ac_fn_c_try_compile "$LINENO"; then :
2303   eval "$3=yes"
2304 else
2305   eval "$3=no"
2306 fi
2307 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2308 fi
2309 eval ac_res=\$$3
2310                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2311 $as_echo "$ac_res" >&6; }
2312   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2313
2314 } # ac_fn_c_check_decl
2315 cat >config.log <<_ACEOF
2316 This file contains any messages produced by compilers while
2317 running configure, to aid debugging if configure makes a mistake.
2318
2319 It was created by PostgreSQL $as_me 9.5devel, which was
2320 generated by GNU Autoconf 2.69.  Invocation command line was
2321
2322   $ $0 $@
2323
2324 _ACEOF
2325 exec 5>>config.log
2326 {
2327 cat <<_ASUNAME
2328 ## --------- ##
2329 ## Platform. ##
2330 ## --------- ##
2331
2332 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2333 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2334 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2335 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2336 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2337
2338 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2339 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2340
2341 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2342 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2343 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2344 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2345 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2346 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2347 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2348
2349 _ASUNAME
2350
2351 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2352 for as_dir in $PATH
2353 do
2354   IFS=$as_save_IFS
2355   test -z "$as_dir" && as_dir=.
2356     $as_echo "PATH: $as_dir"
2357   done
2358 IFS=$as_save_IFS
2359
2360 } >&5
2361
2362 cat >&5 <<_ACEOF
2363
2364
2365 ## ----------- ##
2366 ## Core tests. ##
2367 ## ----------- ##
2368
2369 _ACEOF
2370
2371
2372 # Keep a trace of the command line.
2373 # Strip out --no-create and --no-recursion so they do not pile up.
2374 # Strip out --silent because we don't want to record it for future runs.
2375 # Also quote any args containing shell meta-characters.
2376 # Make two passes to allow for proper duplicate-argument suppression.
2377 ac_configure_args=
2378 ac_configure_args0=
2379 ac_configure_args1=
2380 ac_must_keep_next=false
2381 for ac_pass in 1 2
2382 do
2383   for ac_arg
2384   do
2385     case $ac_arg in
2386     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2387     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2388     | -silent | --silent | --silen | --sile | --sil)
2389       continue ;;
2390     *\'*)
2391       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2392     esac
2393     case $ac_pass in
2394     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2395     2)
2396       as_fn_append ac_configure_args1 " '$ac_arg'"
2397       if test $ac_must_keep_next = true; then
2398         ac_must_keep_next=false # Got value, back to normal.
2399       else
2400         case $ac_arg in
2401           *=* | --config-cache | -C | -disable-* | --disable-* \
2402           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2403           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2404           | -with-* | --with-* | -without-* | --without-* | --x)
2405             case "$ac_configure_args0 " in
2406               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2407             esac
2408             ;;
2409           -* ) ac_must_keep_next=true ;;
2410         esac
2411       fi
2412       as_fn_append ac_configure_args " '$ac_arg'"
2413       ;;
2414     esac
2415   done
2416 done
2417 { ac_configure_args0=; unset ac_configure_args0;}
2418 { ac_configure_args1=; unset ac_configure_args1;}
2419
2420 # When interrupted or exit'd, cleanup temporary files, and complete
2421 # config.log.  We remove comments because anyway the quotes in there
2422 # would cause problems or look ugly.
2423 # WARNING: Use '\'' to represent an apostrophe within the trap.
2424 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2425 trap 'exit_status=$?
2426   # Save into config.log some information that might help in debugging.
2427   {
2428     echo
2429
2430     $as_echo "## ---------------- ##
2431 ## Cache variables. ##
2432 ## ---------------- ##"
2433     echo
2434     # The following way of writing the cache mishandles newlines in values,
2435 (
2436   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2437     eval ac_val=\$$ac_var
2438     case $ac_val in #(
2439     *${as_nl}*)
2440       case $ac_var in #(
2441       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2442 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2443       esac
2444       case $ac_var in #(
2445       _ | IFS | as_nl) ;; #(
2446       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2447       *) { eval $ac_var=; unset $ac_var;} ;;
2448       esac ;;
2449     esac
2450   done
2451   (set) 2>&1 |
2452     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2453     *${as_nl}ac_space=\ *)
2454       sed -n \
2455         "s/'\''/'\''\\\\'\'''\''/g;
2456           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2457       ;; #(
2458     *)
2459       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2460       ;;
2461     esac |
2462     sort
2463 )
2464     echo
2465
2466     $as_echo "## ----------------- ##
2467 ## Output variables. ##
2468 ## ----------------- ##"
2469     echo
2470     for ac_var in $ac_subst_vars
2471     do
2472       eval ac_val=\$$ac_var
2473       case $ac_val in
2474       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2475       esac
2476       $as_echo "$ac_var='\''$ac_val'\''"
2477     done | sort
2478     echo
2479
2480     if test -n "$ac_subst_files"; then
2481       $as_echo "## ------------------- ##
2482 ## File substitutions. ##
2483 ## ------------------- ##"
2484       echo
2485       for ac_var in $ac_subst_files
2486       do
2487         eval ac_val=\$$ac_var
2488         case $ac_val in
2489         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2490         esac
2491         $as_echo "$ac_var='\''$ac_val'\''"
2492       done | sort
2493       echo
2494     fi
2495
2496     if test -s confdefs.h; then
2497       $as_echo "## ----------- ##
2498 ## confdefs.h. ##
2499 ## ----------- ##"
2500       echo
2501       cat confdefs.h
2502       echo
2503     fi
2504     test "$ac_signal" != 0 &&
2505       $as_echo "$as_me: caught signal $ac_signal"
2506     $as_echo "$as_me: exit $exit_status"
2507   } >&5
2508   rm -f core *.core core.conftest.* &&
2509     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2510     exit $exit_status
2511 ' 0
2512 for ac_signal in 1 2 13 15; do
2513   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2514 done
2515 ac_signal=0
2516
2517 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2518 rm -f -r conftest* confdefs.h
2519
2520 $as_echo "/* confdefs.h */" > confdefs.h
2521
2522 # Predefined preprocessor variables.
2523
2524 cat >>confdefs.h <<_ACEOF
2525 #define PACKAGE_NAME "$PACKAGE_NAME"
2526 _ACEOF
2527
2528 cat >>confdefs.h <<_ACEOF
2529 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2530 _ACEOF
2531
2532 cat >>confdefs.h <<_ACEOF
2533 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2534 _ACEOF
2535
2536 cat >>confdefs.h <<_ACEOF
2537 #define PACKAGE_STRING "$PACKAGE_STRING"
2538 _ACEOF
2539
2540 cat >>confdefs.h <<_ACEOF
2541 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2542 _ACEOF
2543
2544 cat >>confdefs.h <<_ACEOF
2545 #define PACKAGE_URL "$PACKAGE_URL"
2546 _ACEOF
2547
2548
2549 # Let the site file select an alternate cache file if it wants to.
2550 # Prefer an explicitly selected file to automatically selected ones.
2551 ac_site_file1=NONE
2552 ac_site_file2=NONE
2553 if test -n "$CONFIG_SITE"; then
2554   # We do not want a PATH search for config.site.
2555   case $CONFIG_SITE in #((
2556     -*)  ac_site_file1=./$CONFIG_SITE;;
2557     */*) ac_site_file1=$CONFIG_SITE;;
2558     *)   ac_site_file1=./$CONFIG_SITE;;
2559   esac
2560 elif test "x$prefix" != xNONE; then
2561   ac_site_file1=$prefix/share/config.site
2562   ac_site_file2=$prefix/etc/config.site
2563 else
2564   ac_site_file1=$ac_default_prefix/share/config.site
2565   ac_site_file2=$ac_default_prefix/etc/config.site
2566 fi
2567 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2568 do
2569   test "x$ac_site_file" = xNONE && continue
2570   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2571     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2572 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2573     sed 's/^/| /' "$ac_site_file" >&5
2574     . "$ac_site_file" \
2575       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2576 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2577 as_fn_error $? "failed to load site script $ac_site_file
2578 See \`config.log' for more details" "$LINENO" 5; }
2579   fi
2580 done
2581
2582 if test -r "$cache_file"; then
2583   # Some versions of bash will fail to source /dev/null (special files
2584   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2585   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2586     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2587 $as_echo "$as_me: loading cache $cache_file" >&6;}
2588     case $cache_file in
2589       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2590       *)                      . "./$cache_file";;
2591     esac
2592   fi
2593 else
2594   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2595 $as_echo "$as_me: creating cache $cache_file" >&6;}
2596   >$cache_file
2597 fi
2598
2599 # Check that the precious variables saved in the cache have kept the same
2600 # value.
2601 ac_cache_corrupted=false
2602 for ac_var in $ac_precious_vars; do
2603   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2604   eval ac_new_set=\$ac_env_${ac_var}_set
2605   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2606   eval ac_new_val=\$ac_env_${ac_var}_value
2607   case $ac_old_set,$ac_new_set in
2608     set,)
2609       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2610 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2611       ac_cache_corrupted=: ;;
2612     ,set)
2613       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2614 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2615       ac_cache_corrupted=: ;;
2616     ,);;
2617     *)
2618       if test "x$ac_old_val" != "x$ac_new_val"; then
2619         # differences in whitespace do not lead to failure.
2620         ac_old_val_w=`echo x $ac_old_val`
2621         ac_new_val_w=`echo x $ac_new_val`
2622         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2623           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2624 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2625           ac_cache_corrupted=:
2626         else
2627           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2628 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2629           eval $ac_var=\$ac_old_val
2630         fi
2631         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2632 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2633         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2634 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2635       fi;;
2636   esac
2637   # Pass precious variables to config.status.
2638   if test "$ac_new_set" = set; then
2639     case $ac_new_val in
2640     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2641     *) ac_arg=$ac_var=$ac_new_val ;;
2642     esac
2643     case " $ac_configure_args " in
2644       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2645       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2646     esac
2647   fi
2648 done
2649 if $ac_cache_corrupted; then
2650   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2651 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2652   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2653 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2654   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2655 fi
2656 ## -------------------- ##
2657 ## Main body of script. ##
2658 ## -------------------- ##
2659
2660 ac_ext=c
2661 ac_cpp='$CPP $CPPFLAGS'
2662 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2663 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2664 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2665
2666
2667
2668
2669
2670
2671 ac_aux_dir=
2672 for ac_dir in config "$srcdir"/config; do
2673   if test -f "$ac_dir/install-sh"; then
2674     ac_aux_dir=$ac_dir
2675     ac_install_sh="$ac_aux_dir/install-sh -c"
2676     break
2677   elif test -f "$ac_dir/install.sh"; then
2678     ac_aux_dir=$ac_dir
2679     ac_install_sh="$ac_aux_dir/install.sh -c"
2680     break
2681   elif test -f "$ac_dir/shtool"; then
2682     ac_aux_dir=$ac_dir
2683     ac_install_sh="$ac_aux_dir/shtool install -c"
2684     break
2685   fi
2686 done
2687 if test -z "$ac_aux_dir"; then
2688   as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2689 fi
2690
2691 # These three variables are undocumented and unsupported,
2692 # and are intended to be withdrawn in a future Autoconf release.
2693 # They can cause serious problems if a builder's source tree is in a directory
2694 # whose full name contains unusual characters.
2695 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2696 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2697 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2698
2699
2700
2701 configure_args=$ac_configure_args
2702
2703
2704 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\.[0-9][0-9]*\)'`
2705
2706
2707 cat >>confdefs.h <<_ACEOF
2708 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2709 _ACEOF
2710
2711
2712
2713
2714
2715 # Check whether --with-extra-version was given.
2716 if test "${with_extra_version+set}" = set; then :
2717   withval=$with_extra_version;
2718   case $withval in
2719     yes)
2720       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2721       ;;
2722     no)
2723       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2724       ;;
2725     *)
2726       PG_VERSION="$PACKAGE_VERSION$withval"
2727       ;;
2728   esac
2729
2730 else
2731   PG_VERSION="$PACKAGE_VERSION"
2732 fi
2733
2734
2735
2736 cat >>confdefs.h <<_ACEOF
2737 #define PG_VERSION "$PG_VERSION"
2738 _ACEOF
2739
2740
2741 # Make sure we can run config.sub.
2742 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2743   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2744
2745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2746 $as_echo_n "checking build system type... " >&6; }
2747 if ${ac_cv_build+:} false; then :
2748   $as_echo_n "(cached) " >&6
2749 else
2750   ac_build_alias=$build_alias
2751 test "x$ac_build_alias" = x &&
2752   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2753 test "x$ac_build_alias" = x &&
2754   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2755 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2756   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2757
2758 fi
2759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2760 $as_echo "$ac_cv_build" >&6; }
2761 case $ac_cv_build in
2762 *-*-*) ;;
2763 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2764 esac
2765 build=$ac_cv_build
2766 ac_save_IFS=$IFS; IFS='-'
2767 set x $ac_cv_build
2768 shift
2769 build_cpu=$1
2770 build_vendor=$2
2771 shift; shift
2772 # Remember, the first character of IFS is used to create $*,
2773 # except with old shells:
2774 build_os=$*
2775 IFS=$ac_save_IFS
2776 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2777
2778
2779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2780 $as_echo_n "checking host system type... " >&6; }
2781 if ${ac_cv_host+:} false; then :
2782   $as_echo_n "(cached) " >&6
2783 else
2784   if test "x$host_alias" = x; then
2785   ac_cv_host=$ac_cv_build
2786 else
2787   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2788     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2789 fi
2790
2791 fi
2792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2793 $as_echo "$ac_cv_host" >&6; }
2794 case $ac_cv_host in
2795 *-*-*) ;;
2796 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2797 esac
2798 host=$ac_cv_host
2799 ac_save_IFS=$IFS; IFS='-'
2800 set x $ac_cv_host
2801 shift
2802 host_cpu=$1
2803 host_vendor=$2
2804 shift; shift
2805 # Remember, the first character of IFS is used to create $*,
2806 # except with old shells:
2807 host_os=$*
2808 IFS=$ac_save_IFS
2809 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2810
2811
2812
2813 template=
2814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2815 $as_echo_n "checking which template to use... " >&6; }
2816
2817
2818
2819
2820 # Check whether --with-template was given.
2821 if test "${with_template+set}" = set; then :
2822   withval=$with_template;
2823   case $withval in
2824     yes)
2825       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2826       ;;
2827     no)
2828       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2829       ;;
2830     *)
2831
2832   case $withval in
2833     list)   echo; ls "$srcdir/src/template"; exit;;
2834     *)      if test -f "$srcdir/src/template/$with_template" ; then
2835               template=$withval
2836             else
2837               as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2838             fi;;
2839   esac
2840
2841       ;;
2842   esac
2843
2844 else
2845
2846 # --with-template not given
2847
2848 case $host_os in
2849      aix*) template=aix ;;
2850   cygwin*) template=cygwin ;;
2851   darwin*) template=darwin ;;
2852 dragonfly*) template=netbsd ;;
2853  freebsd*) template=freebsd ;;
2854     hpux*) template=hpux ;;
2855  linux*|gnu*|k*bsd*-gnu)
2856            template=linux ;;
2857    mingw*) template=win32 ;;
2858   netbsd*) template=netbsd ;;
2859  openbsd*) template=openbsd ;;
2860      sco*) template=sco ;;
2861  solaris*) template=solaris ;;
2862    sysv5*) template=unixware ;;
2863 esac
2864
2865   if test x"$template" = x"" ; then
2866     as_fn_error $? "
2867 *******************************************************************
2868 PostgreSQL has apparently not been ported to your platform yet.
2869 To try a manual configuration, look into the src/template directory
2870 for a similar platform and use the '--with-template=' option.
2871
2872 Please also contact <pgsql-bugs@postgresql.org> to see about
2873 rectifying this.  Include the above 'checking host system type...'
2874 line.
2875 *******************************************************************
2876 " "$LINENO" 5
2877   fi
2878
2879
2880 fi
2881
2882
2883
2884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
2885 $as_echo "$template" >&6; }
2886
2887 PORTNAME=$template
2888
2889
2890 # Initialize default assumption that we do not need separate assembly code
2891 # for TAS (test-and-set).  This can be overridden by the template file
2892 # when it's executed.
2893 need_tas=no
2894 tas_file=dummy.s
2895
2896
2897
2898 ##
2899 ## Command line options
2900 ##
2901
2902 #
2903 # Add non-standard directories to the include path
2904 #
2905
2906
2907
2908 # Check whether --with-includes was given.
2909 if test "${with_includes+set}" = set; then :
2910   withval=$with_includes;
2911   case $withval in
2912     yes)
2913       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
2914       ;;
2915     no)
2916       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
2917       ;;
2918     *)
2919
2920       ;;
2921   esac
2922
2923 fi
2924
2925
2926
2927
2928 #
2929 # Add non-standard directories to the library search path
2930 #
2931
2932
2933
2934 # Check whether --with-libraries was given.
2935 if test "${with_libraries+set}" = set; then :
2936   withval=$with_libraries;
2937   case $withval in
2938     yes)
2939       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
2940       ;;
2941     no)
2942       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
2943       ;;
2944     *)
2945       LIBRARY_DIRS=$withval
2946       ;;
2947   esac
2948
2949 fi
2950
2951
2952
2953
2954
2955
2956 # Check whether --with-libs was given.
2957 if test "${with_libs+set}" = set; then :
2958   withval=$with_libs;
2959   case $withval in
2960     yes)
2961       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
2962       ;;
2963     no)
2964       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
2965       ;;
2966     *)
2967       LIBRARY_DIRS=$withval
2968       ;;
2969   esac
2970
2971 fi
2972
2973
2974
2975
2976 #
2977 # 64-bit integer date/time storage: enabled by default.
2978 #
2979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with 64-bit integer date/time support" >&5
2980 $as_echo_n "checking whether to build with 64-bit integer date/time support... " >&6; }
2981
2982
2983 # Check whether --enable-integer-datetimes was given.
2984 if test "${enable_integer_datetimes+set}" = set; then :
2985   enableval=$enable_integer_datetimes;
2986   case $enableval in
2987     yes)
2988
2989 $as_echo "#define USE_INTEGER_DATETIMES 1" >>confdefs.h
2990
2991       ;;
2992     no)
2993       :
2994       ;;
2995     *)
2996       as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
2997       ;;
2998   esac
2999
3000 else
3001   enable_integer_datetimes=yes
3002
3003 $as_echo "#define USE_INTEGER_DATETIMES 1" >>confdefs.h
3004
3005 fi
3006
3007
3008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_integer_datetimes" >&5
3009 $as_echo "$enable_integer_datetimes" >&6; }
3010
3011
3012 #
3013 # NLS
3014 #
3015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3016 $as_echo_n "checking whether NLS is wanted... " >&6; }
3017
3018
3019 # Check whether --enable-nls was given.
3020 if test "${enable_nls+set}" = set; then :
3021   enableval=$enable_nls;
3022   case $enableval in
3023     yes)
3024       :
3025       ;;
3026     no)
3027       :
3028       ;;
3029     *)
3030       enable_nls=yes
3031 WANTED_LANGUAGES=$enableval
3032       ;;
3033   esac
3034
3035 else
3036   enable_nls=no
3037 fi
3038
3039
3040
3041 if test "$enable_nls" = yes; then
3042
3043 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3044
3045 fi
3046
3047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3048 $as_echo "$enable_nls" >&6; }
3049
3050
3051
3052 #
3053 # Default port number (--with-pgport), default 5432
3054 #
3055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3056 $as_echo_n "checking for default port number... " >&6; }
3057
3058
3059
3060 # Check whether --with-pgport was given.
3061 if test "${with_pgport+set}" = set; then :
3062   withval=$with_pgport;
3063   case $withval in
3064     yes)
3065       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3066       ;;
3067     no)
3068       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3069       ;;
3070     *)
3071       default_port=$withval
3072       ;;
3073   esac
3074
3075 else
3076   default_port=5432
3077 fi
3078
3079
3080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3081 $as_echo "$default_port" >&6; }
3082 # Need both of these because some places want an integer and some a string
3083
3084 cat >>confdefs.h <<_ACEOF
3085 #define DEF_PGPORT ${default_port}
3086 _ACEOF
3087
3088
3089 cat >>confdefs.h <<_ACEOF
3090 #define DEF_PGPORT_STR "${default_port}"
3091 _ACEOF
3092
3093
3094
3095 #
3096 # '-rpath'-like feature can be disabled
3097 #
3098
3099
3100 # Check whether --enable-rpath was given.
3101 if test "${enable_rpath+set}" = set; then :
3102   enableval=$enable_rpath;
3103   case $enableval in
3104     yes)
3105       :
3106       ;;
3107     no)
3108       :
3109       ;;
3110     *)
3111       as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3112       ;;
3113   esac
3114
3115 else
3116   enable_rpath=yes
3117
3118 fi
3119
3120
3121
3122
3123 #
3124 # Spinlocks
3125 #
3126
3127
3128 # Check whether --enable-spinlocks was given.
3129 if test "${enable_spinlocks+set}" = set; then :
3130   enableval=$enable_spinlocks;
3131   case $enableval in
3132     yes)
3133       :
3134       ;;
3135     no)
3136       :
3137       ;;
3138     *)
3139       as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3140       ;;
3141   esac
3142
3143 else
3144   enable_spinlocks=yes
3145
3146 fi
3147
3148
3149
3150 #
3151 # Atomic operations
3152 #
3153
3154
3155 # Check whether --enable-atomics was given.
3156 if test "${enable_atomics+set}" = set; then :
3157   enableval=$enable_atomics;
3158   case $enableval in
3159     yes)
3160       :
3161       ;;
3162     no)
3163       :
3164       ;;
3165     *)
3166       as_fn_error $? "no argument expected for --enable-atomics option" "$LINENO" 5
3167       ;;
3168   esac
3169
3170 else
3171   enable_atomics=yes
3172
3173 fi
3174
3175
3176
3177 #
3178 # --enable-debug adds -g to compiler flags
3179 #
3180
3181
3182 # Check whether --enable-debug was given.
3183 if test "${enable_debug+set}" = set; then :
3184   enableval=$enable_debug;
3185   case $enableval in
3186     yes)
3187       :
3188       ;;
3189     no)
3190       :
3191       ;;
3192     *)
3193       as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3194       ;;
3195   esac
3196
3197 else
3198   enable_debug=no
3199
3200 fi
3201
3202
3203
3204
3205 #
3206 # --enable-profiling enables gcc profiling
3207 #
3208
3209
3210 # Check whether --enable-profiling was given.
3211 if test "${enable_profiling+set}" = set; then :
3212   enableval=$enable_profiling;
3213   case $enableval in
3214     yes)
3215       :
3216       ;;
3217     no)
3218       :
3219       ;;
3220     *)
3221       as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3222       ;;
3223   esac
3224
3225 else
3226   enable_profiling=no
3227
3228 fi
3229
3230
3231
3232 #
3233 # --enable-coverage enables generation of code coverage metrics with gcov
3234 #
3235
3236
3237 # Check whether --enable-coverage was given.
3238 if test "${enable_coverage+set}" = set; then :
3239   enableval=$enable_coverage;
3240   case $enableval in
3241     yes)
3242       for ac_prog in gcov
3243 do
3244   # Extract the first word of "$ac_prog", so it can be a program name with args.
3245 set dummy $ac_prog; ac_word=$2
3246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3247 $as_echo_n "checking for $ac_word... " >&6; }
3248 if ${ac_cv_prog_GCOV+:} false; then :
3249   $as_echo_n "(cached) " >&6
3250 else
3251   if test -n "$GCOV"; then
3252   ac_cv_prog_GCOV="$GCOV" # Let the user override the test.
3253 else
3254 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3255 for as_dir in $PATH
3256 do
3257   IFS=$as_save_IFS
3258   test -z "$as_dir" && as_dir=.
3259     for ac_exec_ext in '' $ac_executable_extensions; do
3260   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3261     ac_cv_prog_GCOV="$ac_prog"
3262     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3263     break 2
3264   fi
3265 done
3266   done
3267 IFS=$as_save_IFS
3268
3269 fi
3270 fi
3271 GCOV=$ac_cv_prog_GCOV
3272 if test -n "$GCOV"; then
3273   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3274 $as_echo "$GCOV" >&6; }
3275 else
3276   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3277 $as_echo "no" >&6; }
3278 fi
3279
3280
3281   test -n "$GCOV" && break
3282 done
3283
3284 if test -z "$GCOV"; then
3285   as_fn_error $? "gcov not found" "$LINENO" 5
3286 fi
3287 for ac_prog in lcov
3288 do
3289   # Extract the first word of "$ac_prog", so it can be a program name with args.
3290 set dummy $ac_prog; ac_word=$2
3291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3292 $as_echo_n "checking for $ac_word... " >&6; }
3293 if ${ac_cv_prog_LCOV+:} false; then :
3294   $as_echo_n "(cached) " >&6
3295 else
3296   if test -n "$LCOV"; then
3297   ac_cv_prog_LCOV="$LCOV" # Let the user override the test.
3298 else
3299 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3300 for as_dir in $PATH
3301 do
3302   IFS=$as_save_IFS
3303   test -z "$as_dir" && as_dir=.
3304     for ac_exec_ext in '' $ac_executable_extensions; do
3305   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3306     ac_cv_prog_LCOV="$ac_prog"
3307     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3308     break 2
3309   fi
3310 done
3311   done
3312 IFS=$as_save_IFS
3313
3314 fi
3315 fi
3316 LCOV=$ac_cv_prog_LCOV
3317 if test -n "$LCOV"; then
3318   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3319 $as_echo "$LCOV" >&6; }
3320 else
3321   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3322 $as_echo "no" >&6; }
3323 fi
3324
3325
3326   test -n "$LCOV" && break
3327 done
3328
3329 if test -z "$LCOV"; then
3330   as_fn_error $? "lcov not found" "$LINENO" 5
3331 fi
3332 for ac_prog in genhtml
3333 do
3334   # Extract the first word of "$ac_prog", so it can be a program name with args.
3335 set dummy $ac_prog; ac_word=$2
3336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3337 $as_echo_n "checking for $ac_word... " >&6; }
3338 if ${ac_cv_prog_GENHTML+:} false; then :
3339   $as_echo_n "(cached) " >&6
3340 else
3341   if test -n "$GENHTML"; then
3342   ac_cv_prog_GENHTML="$GENHTML" # Let the user override the test.
3343 else
3344 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3345 for as_dir in $PATH
3346 do
3347   IFS=$as_save_IFS
3348   test -z "$as_dir" && as_dir=.
3349     for ac_exec_ext in '' $ac_executable_extensions; do
3350   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3351     ac_cv_prog_GENHTML="$ac_prog"
3352     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3353     break 2
3354   fi
3355 done
3356   done
3357 IFS=$as_save_IFS
3358
3359 fi
3360 fi
3361 GENHTML=$ac_cv_prog_GENHTML
3362 if test -n "$GENHTML"; then
3363   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3364 $as_echo "$GENHTML" >&6; }
3365 else
3366   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3367 $as_echo "no" >&6; }
3368 fi
3369
3370
3371   test -n "$GENHTML" && break
3372 done
3373
3374 if test -z "$GENHTML"; then
3375   as_fn_error $? "genhtml not found" "$LINENO" 5
3376 fi
3377       ;;
3378     no)
3379       :
3380       ;;
3381     *)
3382       as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3383       ;;
3384   esac
3385
3386 else
3387   enable_coverage=no
3388
3389 fi
3390
3391
3392
3393
3394 #
3395 # DTrace
3396 #
3397
3398
3399 # Check whether --enable-dtrace was given.
3400 if test "${enable_dtrace+set}" = set; then :
3401   enableval=$enable_dtrace;
3402   case $enableval in
3403     yes)
3404       for ac_prog in dtrace
3405 do
3406   # Extract the first word of "$ac_prog", so it can be a program name with args.
3407 set dummy $ac_prog; ac_word=$2
3408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3409 $as_echo_n "checking for $ac_word... " >&6; }
3410 if ${ac_cv_prog_DTRACE+:} false; then :
3411   $as_echo_n "(cached) " >&6
3412 else
3413   if test -n "$DTRACE"; then
3414   ac_cv_prog_DTRACE="$DTRACE" # Let the user override the test.
3415 else
3416 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3417 for as_dir in $PATH
3418 do
3419   IFS=$as_save_IFS
3420   test -z "$as_dir" && as_dir=.
3421     for ac_exec_ext in '' $ac_executable_extensions; do
3422   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3423     ac_cv_prog_DTRACE="$ac_prog"
3424     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3425     break 2
3426   fi
3427 done
3428   done
3429 IFS=$as_save_IFS
3430
3431 fi
3432 fi
3433 DTRACE=$ac_cv_prog_DTRACE
3434 if test -n "$DTRACE"; then
3435   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3436 $as_echo "$DTRACE" >&6; }
3437 else
3438   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3439 $as_echo "no" >&6; }
3440 fi
3441
3442
3443   test -n "$DTRACE" && break
3444 done
3445
3446 if test -z "$DTRACE"; then
3447   as_fn_error $? "dtrace not found" "$LINENO" 5
3448 fi
3449
3450       ;;
3451     no)
3452       :
3453       ;;
3454     *)
3455       as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3456       ;;
3457   esac
3458
3459 else
3460   enable_dtrace=no
3461
3462 fi
3463
3464
3465
3466
3467 #
3468 # Block size
3469 #
3470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3471 $as_echo_n "checking for block size... " >&6; }
3472
3473
3474
3475 # Check whether --with-blocksize was given.
3476 if test "${with_blocksize+set}" = set; then :
3477   withval=$with_blocksize;
3478   case $withval in
3479     yes)
3480       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3481       ;;
3482     no)
3483       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3484       ;;
3485     *)
3486       blocksize=$withval
3487       ;;
3488   esac
3489
3490 else
3491   blocksize=8
3492 fi
3493
3494
3495 case ${blocksize} in
3496   1) BLCKSZ=1024;;
3497   2) BLCKSZ=2048;;
3498   4) BLCKSZ=4096;;
3499   8) BLCKSZ=8192;;
3500  16) BLCKSZ=16384;;
3501  32) BLCKSZ=32768;;
3502   *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3503 esac
3504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3505 $as_echo "${blocksize}kB" >&6; }
3506
3507
3508 cat >>confdefs.h <<_ACEOF
3509 #define BLCKSZ ${BLCKSZ}
3510 _ACEOF
3511
3512
3513 #
3514 # Relation segment size
3515 #
3516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3517 $as_echo_n "checking for segment size... " >&6; }
3518
3519
3520
3521 # Check whether --with-segsize was given.
3522 if test "${with_segsize+set}" = set; then :
3523   withval=$with_segsize;
3524   case $withval in
3525     yes)
3526       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3527       ;;
3528     no)
3529       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3530       ;;
3531     *)
3532       segsize=$withval
3533       ;;
3534   esac
3535
3536 else
3537   segsize=1
3538 fi
3539
3540
3541 # this expression is set up to avoid unnecessary integer overflow
3542 # blocksize is already guaranteed to be a factor of 1024
3543 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3544 test $? -eq 0 || exit 1
3545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3546 $as_echo "${segsize}GB" >&6; }
3547
3548
3549 cat >>confdefs.h <<_ACEOF
3550 #define RELSEG_SIZE ${RELSEG_SIZE}
3551 _ACEOF
3552
3553
3554 #
3555 # WAL block size
3556 #
3557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3558 $as_echo_n "checking for WAL block size... " >&6; }
3559
3560
3561
3562 # Check whether --with-wal-blocksize was given.
3563 if test "${with_wal_blocksize+set}" = set; then :
3564   withval=$with_wal_blocksize;
3565   case $withval in
3566     yes)
3567       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3568       ;;
3569     no)
3570       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3571       ;;
3572     *)
3573       wal_blocksize=$withval
3574       ;;
3575   esac
3576
3577 else
3578   wal_blocksize=8
3579 fi
3580
3581
3582 case ${wal_blocksize} in
3583   1) XLOG_BLCKSZ=1024;;
3584   2) XLOG_BLCKSZ=2048;;
3585   4) XLOG_BLCKSZ=4096;;
3586   8) XLOG_BLCKSZ=8192;;
3587  16) XLOG_BLCKSZ=16384;;
3588  32) XLOG_BLCKSZ=32768;;
3589  64) XLOG_BLCKSZ=65536;;
3590   *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3591 esac
3592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3593 $as_echo "${wal_blocksize}kB" >&6; }
3594
3595
3596 cat >>confdefs.h <<_ACEOF
3597 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3598 _ACEOF
3599
3600
3601 #
3602 # WAL segment size
3603 #
3604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL segment size" >&5
3605 $as_echo_n "checking for WAL segment size... " >&6; }
3606
3607
3608
3609 # Check whether --with-wal-segsize was given.
3610 if test "${with_wal_segsize+set}" = set; then :
3611   withval=$with_wal_segsize;
3612   case $withval in
3613     yes)
3614       as_fn_error $? "argument required for --with-wal-segsize option" "$LINENO" 5
3615       ;;
3616     no)
3617       as_fn_error $? "argument required for --with-wal-segsize option" "$LINENO" 5
3618       ;;
3619     *)
3620       wal_segsize=$withval
3621       ;;
3622   esac
3623
3624 else
3625   wal_segsize=16
3626 fi
3627
3628
3629 case ${wal_segsize} in
3630   1) ;;
3631   2) ;;
3632   4) ;;
3633   8) ;;
3634  16) ;;
3635  32) ;;
3636  64) ;;
3637   *) as_fn_error $? "Invalid WAL segment size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3638 esac
3639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_segsize}MB" >&5
3640 $as_echo "${wal_segsize}MB" >&6; }
3641
3642
3643 cat >>confdefs.h <<_ACEOF
3644 #define XLOG_SEG_SIZE (${wal_segsize} * 1024 * 1024)
3645 _ACEOF
3646
3647
3648 #
3649 # C compiler
3650 #
3651
3652 # For historical reasons you can also use --with-CC to specify the C compiler
3653 # to use, although the standard way to do this is to set the CC environment
3654 # variable.
3655
3656
3657
3658 # Check whether --with-CC was given.
3659 if test "${with_CC+set}" = set; then :
3660   withval=$with_CC;
3661   case $withval in
3662     yes)
3663       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3664       ;;
3665     no)
3666       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3667       ;;
3668     *)
3669       CC=$with_CC
3670       ;;
3671   esac
3672
3673 fi
3674
3675
3676
3677 case $template in
3678   aix) pgac_cc_list="gcc xlc";;
3679     *) pgac_cc_list="gcc cc";;
3680 esac
3681
3682 ac_ext=c
3683 ac_cpp='$CPP $CPPFLAGS'
3684 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3685 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3686 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3687 if test -n "$ac_tool_prefix"; then
3688   for ac_prog in $pgac_cc_list
3689   do
3690     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3691 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3693 $as_echo_n "checking for $ac_word... " >&6; }
3694 if ${ac_cv_prog_CC+:} false; then :
3695   $as_echo_n "(cached) " >&6
3696 else
3697   if test -n "$CC"; then
3698   ac_cv_prog_CC="$CC" # Let the user override the test.
3699 else
3700 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3701 for as_dir in $PATH
3702 do
3703   IFS=$as_save_IFS
3704   test -z "$as_dir" && as_dir=.
3705     for ac_exec_ext in '' $ac_executable_extensions; do
3706   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3707     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3708     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3709     break 2
3710   fi
3711 done
3712   done
3713 IFS=$as_save_IFS
3714
3715 fi
3716 fi
3717 CC=$ac_cv_prog_CC
3718 if test -n "$CC"; then
3719   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3720 $as_echo "$CC" >&6; }
3721 else
3722   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3723 $as_echo "no" >&6; }
3724 fi
3725
3726
3727     test -n "$CC" && break
3728   done
3729 fi
3730 if test -z "$CC"; then
3731   ac_ct_CC=$CC
3732   for ac_prog in $pgac_cc_list
3733 do
3734   # Extract the first word of "$ac_prog", so it can be a program name with args.
3735 set dummy $ac_prog; ac_word=$2
3736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3737 $as_echo_n "checking for $ac_word... " >&6; }
3738 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3739   $as_echo_n "(cached) " >&6
3740 else
3741   if test -n "$ac_ct_CC"; then
3742   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3743 else
3744 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3745 for as_dir in $PATH
3746 do
3747   IFS=$as_save_IFS
3748   test -z "$as_dir" && as_dir=.
3749     for ac_exec_ext in '' $ac_executable_extensions; do
3750   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3751     ac_cv_prog_ac_ct_CC="$ac_prog"
3752     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3753     break 2
3754   fi
3755 done
3756   done
3757 IFS=$as_save_IFS
3758
3759 fi
3760 fi
3761 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3762 if test -n "$ac_ct_CC"; then
3763   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3764 $as_echo "$ac_ct_CC" >&6; }
3765 else
3766   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3767 $as_echo "no" >&6; }
3768 fi
3769
3770
3771   test -n "$ac_ct_CC" && break
3772 done
3773
3774   if test "x$ac_ct_CC" = x; then
3775     CC=""
3776   else
3777     case $cross_compiling:$ac_tool_warned in
3778 yes:)
3779 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3780 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3781 ac_tool_warned=yes ;;
3782 esac
3783     CC=$ac_ct_CC
3784   fi
3785 fi
3786
3787
3788 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3789 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3790 as_fn_error $? "no acceptable C compiler found in \$PATH
3791 See \`config.log' for more details" "$LINENO" 5; }
3792
3793 # Provide some information about the compiler.
3794 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3795 set X $ac_compile
3796 ac_compiler=$2
3797 for ac_option in --version -v -V -qversion; do
3798   { { ac_try="$ac_compiler $ac_option >&5"
3799 case "(($ac_try" in
3800   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3801   *) ac_try_echo=$ac_try;;
3802 esac
3803 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3804 $as_echo "$ac_try_echo"; } >&5
3805   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3806   ac_status=$?
3807   if test -s conftest.err; then
3808     sed '10a\
3809 ... rest of stderr output deleted ...
3810          10q' conftest.err >conftest.er1
3811     cat conftest.er1 >&5
3812   fi
3813   rm -f conftest.er1 conftest.err
3814   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3815   test $ac_status = 0; }
3816 done
3817
3818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3819 /* end confdefs.h.  */
3820
3821 int
3822 main ()
3823 {
3824
3825   ;
3826   return 0;
3827 }
3828 _ACEOF
3829 ac_clean_files_save=$ac_clean_files
3830 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3831 # Try to create an executable without -o first, disregard a.out.
3832 # It will help us diagnose broken compilers, and finding out an intuition
3833 # of exeext.
3834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3835 $as_echo_n "checking whether the C compiler works... " >&6; }
3836 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3837
3838 # The possible output files:
3839 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3840
3841 ac_rmfiles=
3842 for ac_file in $ac_files
3843 do
3844   case $ac_file in
3845     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3846     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3847   esac
3848 done
3849 rm -f $ac_rmfiles
3850
3851 if { { ac_try="$ac_link_default"
3852 case "(($ac_try" in
3853   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3854   *) ac_try_echo=$ac_try;;
3855 esac
3856 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3857 $as_echo "$ac_try_echo"; } >&5
3858   (eval "$ac_link_default") 2>&5
3859   ac_status=$?
3860   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3861   test $ac_status = 0; }; then :
3862   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3863 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3864 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3865 # so that the user can short-circuit this test for compilers unknown to
3866 # Autoconf.
3867 for ac_file in $ac_files ''
3868 do
3869   test -f "$ac_file" || continue
3870   case $ac_file in
3871     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3872         ;;
3873     [ab].out )
3874         # We found the default executable, but exeext='' is most
3875         # certainly right.
3876         break;;
3877     *.* )
3878         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3879         then :; else
3880            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3881         fi
3882         # We set ac_cv_exeext here because the later test for it is not
3883         # safe: cross compilers may not add the suffix if given an `-o'
3884         # argument, so we may need to know it at that point already.
3885         # Even if this section looks crufty: it has the advantage of
3886         # actually working.
3887         break;;
3888     * )
3889         break;;
3890   esac
3891 done
3892 test "$ac_cv_exeext" = no && ac_cv_exeext=
3893
3894 else
3895   ac_file=''
3896 fi
3897 if test -z "$ac_file"; then :
3898   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3899 $as_echo "no" >&6; }
3900 $as_echo "$as_me: failed program was:" >&5
3901 sed 's/^/| /' conftest.$ac_ext >&5
3902
3903 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3904 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3905 as_fn_error 77 "C compiler cannot create executables
3906 See \`config.log' for more details" "$LINENO" 5; }
3907 else
3908   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3909 $as_echo "yes" >&6; }
3910 fi
3911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3912 $as_echo_n "checking for C compiler default output file name... " >&6; }
3913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3914 $as_echo "$ac_file" >&6; }
3915 ac_exeext=$ac_cv_exeext
3916
3917 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3918 ac_clean_files=$ac_clean_files_save
3919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3920 $as_echo_n "checking for suffix of executables... " >&6; }
3921 if { { ac_try="$ac_link"
3922 case "(($ac_try" in
3923   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3924   *) ac_try_echo=$ac_try;;
3925 esac
3926 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3927 $as_echo "$ac_try_echo"; } >&5
3928   (eval "$ac_link") 2>&5
3929   ac_status=$?
3930   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3931   test $ac_status = 0; }; then :
3932   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3933 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3934 # work properly (i.e., refer to `conftest.exe'), while it won't with
3935 # `rm'.
3936 for ac_file in conftest.exe conftest conftest.*; do
3937   test -f "$ac_file" || continue
3938   case $ac_file in
3939     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3940     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3941           break;;
3942     * ) break;;
3943   esac
3944 done
3945 else
3946   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3947 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3948 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3949 See \`config.log' for more details" "$LINENO" 5; }
3950 fi
3951 rm -f conftest conftest$ac_cv_exeext
3952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3953 $as_echo "$ac_cv_exeext" >&6; }
3954
3955 rm -f conftest.$ac_ext
3956 EXEEXT=$ac_cv_exeext
3957 ac_exeext=$EXEEXT
3958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3959 /* end confdefs.h.  */
3960 #include <stdio.h>
3961 int
3962 main ()
3963 {
3964 FILE *f = fopen ("conftest.out", "w");
3965  return ferror (f) || fclose (f) != 0;
3966
3967   ;
3968   return 0;
3969 }
3970 _ACEOF
3971 ac_clean_files="$ac_clean_files conftest.out"
3972 # Check that the compiler produces executables we can run.  If not, either
3973 # the compiler is broken, or we cross compile.
3974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3975 $as_echo_n "checking whether we are cross compiling... " >&6; }
3976 if test "$cross_compiling" != yes; then
3977   { { ac_try="$ac_link"
3978 case "(($ac_try" in
3979   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3980   *) ac_try_echo=$ac_try;;
3981 esac
3982 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3983 $as_echo "$ac_try_echo"; } >&5
3984   (eval "$ac_link") 2>&5
3985   ac_status=$?
3986   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3987   test $ac_status = 0; }
3988   if { ac_try='./conftest$ac_cv_exeext'
3989   { { case "(($ac_try" in
3990   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3991   *) ac_try_echo=$ac_try;;
3992 esac
3993 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3994 $as_echo "$ac_try_echo"; } >&5
3995   (eval "$ac_try") 2>&5
3996   ac_status=$?
3997   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3998   test $ac_status = 0; }; }; then
3999     cross_compiling=no
4000   else
4001     if test "$cross_compiling" = maybe; then
4002         cross_compiling=yes
4003     else
4004         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4005 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4006 as_fn_error $? "cannot run C compiled programs.
4007 If you meant to cross compile, use \`--host'.
4008 See \`config.log' for more details" "$LINENO" 5; }
4009     fi
4010   fi
4011 fi
4012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4013 $as_echo "$cross_compiling" >&6; }
4014
4015 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4016 ac_clean_files=$ac_clean_files_save
4017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4018 $as_echo_n "checking for suffix of object files... " >&6; }
4019 if ${ac_cv_objext+:} false; then :
4020   $as_echo_n "(cached) " >&6
4021 else
4022   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4023 /* end confdefs.h.  */
4024
4025 int
4026 main ()
4027 {
4028
4029   ;
4030   return 0;
4031 }
4032 _ACEOF
4033 rm -f conftest.o conftest.obj
4034 if { { ac_try="$ac_compile"
4035 case "(($ac_try" in
4036   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4037   *) ac_try_echo=$ac_try;;
4038 esac
4039 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4040 $as_echo "$ac_try_echo"; } >&5
4041   (eval "$ac_compile") 2>&5
4042   ac_status=$?
4043   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4044   test $ac_status = 0; }; then :
4045   for ac_file in conftest.o conftest.obj conftest.*; do
4046   test -f "$ac_file" || continue;
4047   case $ac_file in
4048     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4049     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4050        break;;
4051   esac
4052 done
4053 else
4054   $as_echo "$as_me: failed program was:" >&5
4055 sed 's/^/| /' conftest.$ac_ext >&5
4056
4057 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4058 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4059 as_fn_error $? "cannot compute suffix of object files: cannot compile
4060 See \`config.log' for more details" "$LINENO" 5; }
4061 fi
4062 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4063 fi
4064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4065 $as_echo "$ac_cv_objext" >&6; }
4066 OBJEXT=$ac_cv_objext
4067 ac_objext=$OBJEXT
4068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4069 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4070 if ${ac_cv_c_compiler_gnu+:} false; then :
4071   $as_echo_n "(cached) " >&6
4072 else
4073   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4074 /* end confdefs.h.  */
4075
4076 int
4077 main ()
4078 {
4079 #ifndef __GNUC__
4080        choke me
4081 #endif
4082
4083   ;
4084   return 0;
4085 }
4086 _ACEOF
4087 if ac_fn_c_try_compile "$LINENO"; then :
4088   ac_compiler_gnu=yes
4089 else
4090   ac_compiler_gnu=no
4091 fi
4092 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4093 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4094
4095 fi
4096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4097 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4098 if test $ac_compiler_gnu = yes; then
4099   GCC=yes
4100 else
4101   GCC=
4102 fi
4103 ac_test_CFLAGS=${CFLAGS+set}
4104 ac_save_CFLAGS=$CFLAGS
4105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4106 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4107 if ${ac_cv_prog_cc_g+:} false; then :
4108   $as_echo_n "(cached) " >&6
4109 else
4110   ac_save_c_werror_flag=$ac_c_werror_flag
4111    ac_c_werror_flag=yes
4112    ac_cv_prog_cc_g=no
4113    CFLAGS="-g"
4114    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4115 /* end confdefs.h.  */
4116
4117 int
4118 main ()
4119 {
4120
4121   ;
4122   return 0;
4123 }
4124 _ACEOF
4125 if ac_fn_c_try_compile "$LINENO"; then :
4126   ac_cv_prog_cc_g=yes
4127 else
4128   CFLAGS=""
4129       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4130 /* end confdefs.h.  */
4131
4132 int
4133 main ()
4134 {
4135
4136   ;
4137   return 0;
4138 }
4139 _ACEOF
4140 if ac_fn_c_try_compile "$LINENO"; then :
4141
4142 else
4143   ac_c_werror_flag=$ac_save_c_werror_flag
4144          CFLAGS="-g"
4145          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4146 /* end confdefs.h.  */
4147
4148 int
4149 main ()
4150 {
4151
4152   ;
4153   return 0;
4154 }
4155 _ACEOF
4156 if ac_fn_c_try_compile "$LINENO"; then :
4157   ac_cv_prog_cc_g=yes
4158 fi
4159 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4160 fi
4161 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4162 fi
4163 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4164    ac_c_werror_flag=$ac_save_c_werror_flag
4165 fi
4166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4167 $as_echo "$ac_cv_prog_cc_g" >&6; }
4168 if test "$ac_test_CFLAGS" = set; then
4169   CFLAGS=$ac_save_CFLAGS
4170 elif test $ac_cv_prog_cc_g = yes; then
4171   if test "$GCC" = yes; then
4172     CFLAGS="-g -O2"
4173   else
4174     CFLAGS="-g"
4175   fi
4176 else
4177   if test "$GCC" = yes; then
4178     CFLAGS="-O2"
4179   else
4180     CFLAGS=
4181   fi
4182 fi
4183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4184 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4185 if ${ac_cv_prog_cc_c89+:} false; then :
4186   $as_echo_n "(cached) " >&6
4187 else
4188   ac_cv_prog_cc_c89=no
4189 ac_save_CC=$CC
4190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4191 /* end confdefs.h.  */
4192 #include <stdarg.h>
4193 #include <stdio.h>
4194 struct stat;
4195 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4196 struct buf { int x; };
4197 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4198 static char *e (p, i)
4199      char **p;
4200      int i;
4201 {
4202   return p[i];
4203 }
4204 static char *f (char * (*g) (char **, int), char **p, ...)
4205 {
4206   char *s;
4207   va_list v;
4208   va_start (v,p);
4209   s = g (p, va_arg (v,int));
4210   va_end (v);
4211   return s;
4212 }
4213
4214 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4215    function prototypes and stuff, but not '\xHH' hex character constants.
4216    These don't provoke an error unfortunately, instead are silently treated
4217    as 'x'.  The following induces an error, until -std is added to get
4218    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4219    array size at least.  It's necessary to write '\x00'==0 to get something
4220    that's true only with -std.  */
4221 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4222
4223 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4224    inside strings and character constants.  */
4225 #define FOO(x) 'x'
4226 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4227
4228 int test (int i, double x);
4229 struct s1 {int (*f) (int a);};
4230 struct s2 {int (*f) (double a);};
4231 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4232 int argc;
4233 char **argv;
4234 int
4235 main ()
4236 {
4237 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4238   ;
4239   return 0;
4240 }
4241 _ACEOF
4242 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4243         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4244 do
4245   CC="$ac_save_CC $ac_arg"
4246   if ac_fn_c_try_compile "$LINENO"; then :
4247   ac_cv_prog_cc_c89=$ac_arg
4248 fi
4249 rm -f core conftest.err conftest.$ac_objext
4250   test "x$ac_cv_prog_cc_c89" != "xno" && break
4251 done
4252 rm -f conftest.$ac_ext
4253 CC=$ac_save_CC
4254
4255 fi
4256 # AC_CACHE_VAL
4257 case "x$ac_cv_prog_cc_c89" in
4258   x)
4259     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4260 $as_echo "none needed" >&6; } ;;
4261   xno)
4262     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4263 $as_echo "unsupported" >&6; } ;;
4264   *)
4265     CC="$CC $ac_cv_prog_cc_c89"
4266     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4267 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4268 esac
4269 if test "x$ac_cv_prog_cc_c89" != xno; then :
4270
4271 fi
4272
4273 ac_ext=c
4274 ac_cpp='$CPP $CPPFLAGS'
4275 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4276 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4277 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4278
4279
4280 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4281 # but has idiosyncrasies of its own.  We assume icc will define
4282 # __INTEL_COMPILER regardless of CFLAGS.
4283
4284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4285 /* end confdefs.h.  */
4286
4287 int
4288 main ()
4289 {
4290 #ifndef __INTEL_COMPILER
4291 choke me
4292 #endif
4293   ;
4294   return 0;
4295 }
4296 _ACEOF
4297 if ac_fn_c_try_compile "$LINENO"; then :
4298   ICC=yes
4299 else
4300   ICC=no
4301 fi
4302 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4303
4304 # Check if it's Sun Studio compiler. We assume that
4305 # __SUNPRO_C will be defined for Sun Studio compilers
4306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4307 /* end confdefs.h.  */
4308
4309 int
4310 main ()
4311 {
4312 #ifndef __SUNPRO_C
4313 choke me
4314 #endif
4315   ;
4316   return 0;
4317 }
4318 _ACEOF
4319 if ac_fn_c_try_compile "$LINENO"; then :
4320   SUN_STUDIO_CC=yes
4321 else
4322   SUN_STUDIO_CC=no
4323 fi
4324 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4325
4326
4327
4328 unset CFLAGS
4329
4330 #
4331 # Read the template
4332 #
4333 . "$srcdir/src/template/$template" || exit
4334
4335 # CFLAGS are selected so:
4336 # If the user specifies something in the environment, that is used.
4337 # else:  If the template file set something, that is used.
4338 # else:  If coverage was enabled, don't set anything.
4339 # else:  If the compiler is GCC, then we use -O2.
4340 # else:  If the compiler is something else, then we use -O, unless debugging.
4341
4342 if test "$ac_env_CFLAGS_set" = set; then
4343   CFLAGS=$ac_env_CFLAGS_value
4344 elif test "${CFLAGS+set}" = set; then
4345   : # (keep what template set)
4346 elif test "$enable_coverage" = yes; then
4347   : # no optimization by default
4348 elif test "$GCC" = yes; then
4349   CFLAGS="-O2"
4350 else
4351   # if the user selected debug mode, don't use -O
4352   if test "$enable_debug" != yes; then
4353     CFLAGS="-O"
4354   fi
4355 fi
4356
4357 # set CFLAGS_VECTOR from the environment, if available
4358 if test "$ac_env_CFLAGS_VECTOR_set" = set; then
4359   CFLAGS_VECTOR=$ac_env_CFLAGS_VECTOR_value
4360 fi
4361
4362 # Some versions of GCC support some additional useful warning flags.
4363 # Check whether they are supported, and add them to CFLAGS if so.
4364 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
4365 # but has its own.  Also check other compiler-specific flags here.
4366
4367 if test "$GCC" = yes -a "$ICC" = no; then
4368   CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wpointer-arith"
4369   # These work in some but not all gcc versions
4370   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5
4371 $as_echo_n "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
4372 if ${pgac_cv_prog_cc_cflags__Wdeclaration_after_statement+:} false; then :
4373   $as_echo_n "(cached) " >&6
4374 else
4375   pgac_save_CFLAGS=$CFLAGS
4376 CFLAGS="$pgac_save_CFLAGS -Wdeclaration-after-statement"
4377 ac_save_c_werror_flag=$ac_c_werror_flag
4378 ac_c_werror_flag=yes
4379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4380 /* end confdefs.h.  */
4381
4382 int
4383 main ()
4384 {
4385
4386   ;
4387   return 0;
4388 }
4389 _ACEOF
4390 if ac_fn_c_try_compile "$LINENO"; then :
4391   pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=yes
4392 else
4393   pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=no
4394 fi
4395 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4396 ac_c_werror_flag=$ac_save_c_werror_flag
4397 CFLAGS="$pgac_save_CFLAGS"
4398 fi
4399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&5
4400 $as_echo "$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&6; }
4401 if test x"$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" = x"yes"; then
4402   CFLAGS="$CFLAGS -Wdeclaration-after-statement"
4403 fi
4404
4405   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wendif-labels" >&5
4406 $as_echo_n "checking whether $CC supports -Wendif-labels... " >&6; }
4407 if ${pgac_cv_prog_cc_cflags__Wendif_labels+:} false; then :
4408   $as_echo_n "(cached) " >&6
4409 else
4410   pgac_save_CFLAGS=$CFLAGS
4411 CFLAGS="$pgac_save_CFLAGS -Wendif-labels"
4412 ac_save_c_werror_flag=$ac_c_werror_flag
4413 ac_c_werror_flag=yes
4414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4415 /* end confdefs.h.  */
4416
4417 int
4418 main ()
4419 {
4420
4421   ;
4422   return 0;
4423 }
4424 _ACEOF
4425 if ac_fn_c_try_compile "$LINENO"; then :
4426   pgac_cv_prog_cc_cflags__Wendif_labels=yes
4427 else
4428   pgac_cv_prog_cc_cflags__Wendif_labels=no
4429 fi
4430 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4431 ac_c_werror_flag=$ac_save_c_werror_flag
4432 CFLAGS="$pgac_save_CFLAGS"
4433 fi
4434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wendif_labels" >&5
4435 $as_echo "$pgac_cv_prog_cc_cflags__Wendif_labels" >&6; }
4436 if test x"$pgac_cv_prog_cc_cflags__Wendif_labels" = x"yes"; then
4437   CFLAGS="$CFLAGS -Wendif-labels"
4438 fi
4439
4440   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wmissing-format-attribute" >&5
4441 $as_echo_n "checking whether $CC supports -Wmissing-format-attribute... " >&6; }
4442 if ${pgac_cv_prog_cc_cflags__Wmissing_format_attribute+:} false; then :
4443   $as_echo_n "(cached) " >&6
4444 else
4445   pgac_save_CFLAGS=$CFLAGS
4446 CFLAGS="$pgac_save_CFLAGS -Wmissing-format-attribute"
4447 ac_save_c_werror_flag=$ac_c_werror_flag
4448 ac_c_werror_flag=yes
4449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4450 /* end confdefs.h.  */
4451
4452 int
4453 main ()
4454 {
4455
4456   ;
4457   return 0;
4458 }
4459 _ACEOF
4460 if ac_fn_c_try_compile "$LINENO"; then :
4461   pgac_cv_prog_cc_cflags__Wmissing_format_attribute=yes
4462 else
4463   pgac_cv_prog_cc_cflags__Wmissing_format_attribute=no
4464 fi
4465 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4466 ac_c_werror_flag=$ac_save_c_werror_flag
4467 CFLAGS="$pgac_save_CFLAGS"
4468 fi
4469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wmissing_format_attribute" >&5
4470 $as_echo "$pgac_cv_prog_cc_cflags__Wmissing_format_attribute" >&6; }
4471 if test x"$pgac_cv_prog_cc_cflags__Wmissing_format_attribute" = x"yes"; then
4472   CFLAGS="$CFLAGS -Wmissing-format-attribute"
4473 fi
4474
4475   # This was included in -Wall/-Wformat in older GCC versions
4476   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wformat-security" >&5
4477 $as_echo_n "checking whether $CC supports -Wformat-security... " >&6; }
4478 if ${pgac_cv_prog_cc_cflags__Wformat_security+:} false; then :
4479   $as_echo_n "(cached) " >&6
4480 else
4481   pgac_save_CFLAGS=$CFLAGS
4482 CFLAGS="$pgac_save_CFLAGS -Wformat-security"
4483 ac_save_c_werror_flag=$ac_c_werror_flag
4484 ac_c_werror_flag=yes
4485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4486 /* end confdefs.h.  */
4487
4488 int
4489 main ()
4490 {
4491
4492   ;
4493   return 0;
4494 }
4495 _ACEOF
4496 if ac_fn_c_try_compile "$LINENO"; then :
4497   pgac_cv_prog_cc_cflags__Wformat_security=yes
4498 else
4499   pgac_cv_prog_cc_cflags__Wformat_security=no
4500 fi
4501 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4502 ac_c_werror_flag=$ac_save_c_werror_flag
4503 CFLAGS="$pgac_save_CFLAGS"
4504 fi
4505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wformat_security" >&5
4506 $as_echo "$pgac_cv_prog_cc_cflags__Wformat_security" >&6; }
4507 if test x"$pgac_cv_prog_cc_cflags__Wformat_security" = x"yes"; then
4508   CFLAGS="$CFLAGS -Wformat-security"
4509 fi
4510
4511   # Disable strict-aliasing rules; needed for gcc 3.3+
4512   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-strict-aliasing" >&5
4513 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4514 if ${pgac_cv_prog_cc_cflags__fno_strict_aliasing+:} false; then :
4515   $as_echo_n "(cached) " >&6
4516 else
4517   pgac_save_CFLAGS=$CFLAGS
4518 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4519 ac_save_c_werror_flag=$ac_c_werror_flag
4520 ac_c_werror_flag=yes
4521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4522 /* end confdefs.h.  */
4523
4524 int
4525 main ()
4526 {
4527
4528   ;
4529   return 0;
4530 }
4531 _ACEOF
4532 if ac_fn_c_try_compile "$LINENO"; then :
4533   pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4534 else
4535   pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4536 fi
4537 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4538 ac_c_werror_flag=$ac_save_c_werror_flag
4539 CFLAGS="$pgac_save_CFLAGS"
4540 fi
4541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4542 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4543 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4544   CFLAGS="$CFLAGS -fno-strict-aliasing"
4545 fi
4546
4547   # Disable optimizations that assume no overflow; needed for gcc 4.3+
4548   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fwrapv" >&5
4549 $as_echo_n "checking whether $CC supports -fwrapv... " >&6; }
4550 if ${pgac_cv_prog_cc_cflags__fwrapv+:} false; then :
4551   $as_echo_n "(cached) " >&6
4552 else
4553   pgac_save_CFLAGS=$CFLAGS
4554 CFLAGS="$pgac_save_CFLAGS -fwrapv"
4555 ac_save_c_werror_flag=$ac_c_werror_flag
4556 ac_c_werror_flag=yes
4557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4558 /* end confdefs.h.  */
4559
4560 int
4561 main ()
4562 {
4563
4564   ;
4565   return 0;
4566 }
4567 _ACEOF
4568 if ac_fn_c_try_compile "$LINENO"; then :
4569   pgac_cv_prog_cc_cflags__fwrapv=yes
4570 else
4571   pgac_cv_prog_cc_cflags__fwrapv=no
4572 fi
4573 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4574 ac_c_werror_flag=$ac_save_c_werror_flag
4575 CFLAGS="$pgac_save_CFLAGS"
4576 fi
4577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fwrapv" >&5
4578 $as_echo "$pgac_cv_prog_cc_cflags__fwrapv" >&6; }
4579 if test x"$pgac_cv_prog_cc_cflags__fwrapv" = x"yes"; then
4580   CFLAGS="$CFLAGS -fwrapv"
4581 fi
4582
4583   # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
4584   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fexcess-precision=standard" >&5
4585 $as_echo_n "checking whether $CC supports -fexcess-precision=standard... " >&6; }
4586 if ${pgac_cv_prog_cc_cflags__fexcess_precision_standard+:} false; then :
4587   $as_echo_n "(cached) " >&6
4588 else
4589   pgac_save_CFLAGS=$CFLAGS
4590 CFLAGS="$pgac_save_CFLAGS -fexcess-precision=standard"
4591 ac_save_c_werror_flag=$ac_c_werror_flag
4592 ac_c_werror_flag=yes
4593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4594 /* end confdefs.h.  */
4595
4596 int
4597 main ()
4598 {
4599
4600   ;
4601   return 0;
4602 }
4603 _ACEOF
4604 if ac_fn_c_try_compile "$LINENO"; then :
4605   pgac_cv_prog_cc_cflags__fexcess_precision_standard=yes
4606 else
4607   pgac_cv_prog_cc_cflags__fexcess_precision_standard=no
4608 fi
4609 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4610 ac_c_werror_flag=$ac_save_c_werror_flag
4611 CFLAGS="$pgac_save_CFLAGS"
4612 fi
4613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fexcess_precision_standard" >&5
4614 $as_echo "$pgac_cv_prog_cc_cflags__fexcess_precision_standard" >&6; }
4615 if test x"$pgac_cv_prog_cc_cflags__fexcess_precision_standard" = x"yes"; then
4616   CFLAGS="$CFLAGS -fexcess-precision=standard"
4617 fi
4618
4619   # Optimization flags for specific files that benefit from vectorization
4620   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -funroll-loops" >&5
4621 $as_echo_n "checking whether $CC supports -funroll-loops... " >&6; }
4622 if ${pgac_cv_prog_cc_cflags__funroll_loops+:} false; then :
4623   $as_echo_n "(cached) " >&6
4624 else
4625   pgac_save_CFLAGS=$CFLAGS
4626 CFLAGS="$pgac_save_CFLAGS -funroll-loops"
4627 ac_save_c_werror_flag=$ac_c_werror_flag
4628 ac_c_werror_flag=yes
4629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4630 /* end confdefs.h.  */
4631
4632 int
4633 main ()
4634 {
4635
4636   ;
4637   return 0;
4638 }
4639 _ACEOF
4640 if ac_fn_c_try_compile "$LINENO"; then :
4641   pgac_cv_prog_cc_cflags__funroll_loops=yes
4642 else
4643   pgac_cv_prog_cc_cflags__funroll_loops=no
4644 fi
4645 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4646 ac_c_werror_flag=$ac_save_c_werror_flag
4647 CFLAGS="$pgac_save_CFLAGS"
4648 fi
4649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__funroll_loops" >&5
4650 $as_echo "$pgac_cv_prog_cc_cflags__funroll_loops" >&6; }
4651 if test x"$pgac_cv_prog_cc_cflags__funroll_loops" = x"yes"; then
4652   CFLAGS_VECTOR="${CFLAGS_VECTOR} -funroll-loops"
4653 fi
4654
4655   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -ftree-vectorize" >&5
4656 $as_echo_n "checking whether $CC supports -ftree-vectorize... " >&6; }
4657 if ${pgac_cv_prog_cc_cflags__ftree_vectorize+:} false; then :
4658   $as_echo_n "(cached) " >&6
4659 else
4660   pgac_save_CFLAGS=$CFLAGS
4661 CFLAGS="$pgac_save_CFLAGS -ftree-vectorize"
4662 ac_save_c_werror_flag=$ac_c_werror_flag
4663 ac_c_werror_flag=yes
4664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4665 /* end confdefs.h.  */
4666
4667 int
4668 main ()
4669 {
4670
4671   ;
4672   return 0;
4673 }
4674 _ACEOF
4675 if ac_fn_c_try_compile "$LINENO"; then :
4676   pgac_cv_prog_cc_cflags__ftree_vectorize=yes
4677 else
4678   pgac_cv_prog_cc_cflags__ftree_vectorize=no
4679 fi
4680 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4681 ac_c_werror_flag=$ac_save_c_werror_flag
4682 CFLAGS="$pgac_save_CFLAGS"
4683 fi
4684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__ftree_vectorize" >&5
4685 $as_echo "$pgac_cv_prog_cc_cflags__ftree_vectorize" >&6; }
4686 if test x"$pgac_cv_prog_cc_cflags__ftree_vectorize" = x"yes"; then
4687   CFLAGS_VECTOR="${CFLAGS_VECTOR} -ftree-vectorize"
4688 fi
4689
4690 elif test "$ICC" = yes; then
4691   # Intel's compiler has a bug/misoptimization in checking for
4692   # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
4693   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mp1" >&5
4694 $as_echo_n "checking whether $CC supports -mp1... " >&6; }
4695 if ${pgac_cv_prog_cc_cflags__mp1+:} false; then :
4696   $as_echo_n "(cached) " >&6
4697 else
4698   pgac_save_CFLAGS=$CFLAGS
4699 CFLAGS="$pgac_save_CFLAGS -mp1"
4700 ac_save_c_werror_flag=$ac_c_werror_flag
4701 ac_c_werror_flag=yes
4702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4703 /* end confdefs.h.  */
4704
4705 int
4706 main ()
4707 {
4708
4709   ;
4710   return 0;
4711 }
4712 _ACEOF
4713 if ac_fn_c_try_compile "$LINENO"; then :
4714   pgac_cv_prog_cc_cflags__mp1=yes
4715 else
4716   pgac_cv_prog_cc_cflags__mp1=no
4717 fi
4718 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4719 ac_c_werror_flag=$ac_save_c_werror_flag
4720 CFLAGS="$pgac_save_CFLAGS"
4721 fi
4722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__mp1" >&5
4723 $as_echo "$pgac_cv_prog_cc_cflags__mp1" >&6; }
4724 if test x"$pgac_cv_prog_cc_cflags__mp1" = x"yes"; then
4725   CFLAGS="$CFLAGS -mp1"
4726 fi
4727
4728   # Make sure strict aliasing is off (though this is said to be the default)
4729   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-strict-aliasing" >&5
4730 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4731 if ${pgac_cv_prog_cc_cflags__fno_strict_aliasing+:} false; then :
4732   $as_echo_n "(cached) " >&6
4733 else
4734   pgac_save_CFLAGS=$CFLAGS
4735 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4736 ac_save_c_werror_flag=$ac_c_werror_flag
4737 ac_c_werror_flag=yes
4738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4739 /* end confdefs.h.  */
4740
4741 int
4742 main ()
4743 {
4744
4745   ;
4746   return 0;
4747 }
4748 _ACEOF
4749 if ac_fn_c_try_compile "$LINENO"; then :
4750   pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4751 else
4752   pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4753 fi
4754 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4755 ac_c_werror_flag=$ac_save_c_werror_flag
4756 CFLAGS="$pgac_save_CFLAGS"
4757 fi
4758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4759 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4760 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4761   CFLAGS="$CFLAGS -fno-strict-aliasing"
4762 fi
4763
4764 elif test "$PORTNAME" = "aix"; then
4765   # AIX's xlc has to have strict aliasing turned off too
4766   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -qnoansialias" >&5
4767 $as_echo_n "checking whether $CC supports -qnoansialias... " >&6; }
4768 if ${pgac_cv_prog_cc_cflags__qnoansialias+:} false; then :
4769   $as_echo_n "(cached) " >&6
4770 else
4771   pgac_save_CFLAGS=$CFLAGS
4772 CFLAGS="$pgac_save_CFLAGS -qnoansialias"
4773 ac_save_c_werror_flag=$ac_c_werror_flag
4774 ac_c_werror_flag=yes
4775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4776 /* end confdefs.h.  */
4777
4778 int
4779 main ()
4780 {
4781
4782   ;
4783   return 0;
4784 }
4785 _ACEOF
4786 if ac_fn_c_try_compile "$LINENO"; then :
4787   pgac_cv_prog_cc_cflags__qnoansialias=yes
4788 else
4789   pgac_cv_prog_cc_cflags__qnoansialias=no
4790 fi
4791 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4792 ac_c_werror_flag=$ac_save_c_werror_flag
4793 CFLAGS="$pgac_save_CFLAGS"
4794 fi
4795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__qnoansialias" >&5
4796 $as_echo "$pgac_cv_prog_cc_cflags__qnoansialias" >&6; }
4797 if test x"$pgac_cv_prog_cc_cflags__qnoansialias" = x"yes"; then
4798   CFLAGS="$CFLAGS -qnoansialias"
4799 fi
4800
4801 elif test "$PORTNAME" = "hpux"; then
4802   # On some versions of HP-UX, libm functions do not set errno by default.
4803   # Fix that by using +Olibmerrno if the compiler recognizes it.
4804   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports +Olibmerrno" >&5
4805 $as_echo_n "checking whether $CC supports +Olibmerrno... " >&6; }
4806 if ${pgac_cv_prog_cc_cflags_pOlibmerrno+:} false; then :
4807   $as_echo_n "(cached) " >&6
4808 else
4809   pgac_save_CFLAGS=$CFLAGS
4810 CFLAGS="$pgac_save_CFLAGS +Olibmerrno"
4811 ac_save_c_werror_flag=$ac_c_werror_flag
4812 ac_c_werror_flag=yes
4813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4814 /* end confdefs.h.  */
4815
4816 int
4817 main ()
4818 {
4819
4820   ;
4821   return 0;
4822 }
4823 _ACEOF
4824 if ac_fn_c_try_compile "$LINENO"; then :
4825   pgac_cv_prog_cc_cflags_pOlibmerrno=yes
4826 else
4827   pgac_cv_prog_cc_cflags_pOlibmerrno=no
4828 fi
4829 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4830 ac_c_werror_flag=$ac_save_c_werror_flag
4831 CFLAGS="$pgac_save_CFLAGS"
4832 fi
4833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags_pOlibmerrno" >&5
4834 $as_echo "$pgac_cv_prog_cc_cflags_pOlibmerrno" >&6; }
4835 if test x"$pgac_cv_prog_cc_cflags_pOlibmerrno" = x"yes"; then
4836   CFLAGS="$CFLAGS +Olibmerrno"
4837 fi
4838
4839 fi
4840
4841 CFLAGS_VECTOR=$CFLAGS_VECTOR
4842
4843
4844 # supply -g if --enable-debug
4845 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
4846   CFLAGS="$CFLAGS -g"
4847 fi
4848
4849 # enable code coverage if --enable-coverage
4850 if test "$enable_coverage" = yes; then
4851   if test "$GCC" = yes; then
4852     CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
4853   else
4854     as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
4855   fi
4856 fi
4857
4858 # enable profiling if --enable-profiling
4859 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
4860   if test "$GCC" = yes; then
4861
4862 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
4863
4864     CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
4865   else
4866     as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
4867   fi
4868 fi
4869
4870 # We already have this in Makefile.win32, but configure needs it too
4871 if test "$PORTNAME" = "win32"; then
4872   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
4873 fi
4874
4875 # Check if the compiler still works with the template settings
4876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
4877 $as_echo_n "checking whether the C compiler still works... " >&6; }
4878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4879 /* end confdefs.h.  */
4880
4881 int
4882 main ()
4883 {
4884 return 0;
4885   ;
4886   return 0;
4887 }
4888 _ACEOF
4889 if ac_fn_c_try_link "$LINENO"; then :
4890   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4891 $as_echo "yes" >&6; }
4892 else
4893   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4894 $as_echo "no" >&6; }
4895    as_fn_error $? "cannot proceed" "$LINENO" 5
4896 fi
4897 rm -f core conftest.err conftest.$ac_objext \
4898     conftest$ac_exeext conftest.$ac_ext
4899
4900 # Defend against gcc -ffast-math
4901 if test "$GCC" = yes; then
4902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4903 /* end confdefs.h.  */
4904
4905 int
4906 main ()
4907 {
4908 #ifdef __FAST_MATH__
4909 choke me
4910 #endif
4911   ;
4912   return 0;
4913 }
4914 _ACEOF
4915 if ac_fn_c_try_compile "$LINENO"; then :
4916
4917 else
4918   as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
4919 fi
4920 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4921 fi
4922
4923 ac_ext=c
4924 ac_cpp='$CPP $CPPFLAGS'
4925 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4926 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4927 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4929 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4930 # On Suns, sometimes $CPP names a directory.
4931 if test -n "$CPP" && test -d "$CPP"; then
4932   CPP=
4933 fi
4934 if test -z "$CPP"; then
4935   if ${ac_cv_prog_CPP+:} false; then :
4936   $as_echo_n "(cached) " >&6
4937 else
4938       # Double quotes because CPP needs to be expanded
4939     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4940     do
4941       ac_preproc_ok=false
4942 for ac_c_preproc_warn_flag in '' yes
4943 do
4944   # Use a header file that comes with gcc, so configuring glibc
4945   # with a fresh cross-compiler works.
4946   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4947   # <limits.h> exists even on freestanding compilers.
4948   # On the NeXT, cc -E runs the code through the compiler's parser,
4949   # not just through cpp. "Syntax error" is here to catch this case.
4950   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4951 /* end confdefs.h.  */
4952 #ifdef __STDC__
4953 # include <limits.h>
4954 #else
4955 # include <assert.h>
4956 #endif
4957                      Syntax error
4958 _ACEOF
4959 if ac_fn_c_try_cpp "$LINENO"; then :
4960
4961 else
4962   # Broken: fails on valid input.
4963 continue
4964 fi
4965 rm -f conftest.err conftest.i conftest.$ac_ext
4966
4967   # OK, works on sane cases.  Now check whether nonexistent headers
4968   # can be detected and how.
4969   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4970 /* end confdefs.h.  */
4971 #include <ac_nonexistent.h>
4972 _ACEOF
4973 if ac_fn_c_try_cpp "$LINENO"; then :
4974   # Broken: success on invalid input.
4975 continue
4976 else
4977   # Passes both tests.
4978 ac_preproc_ok=:
4979 break
4980 fi
4981 rm -f conftest.err conftest.i conftest.$ac_ext
4982
4983 done
4984 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4985 rm -f conftest.i conftest.err conftest.$ac_ext
4986 if $ac_preproc_ok; then :
4987   break
4988 fi
4989
4990     done
4991     ac_cv_prog_CPP=$CPP
4992
4993 fi
4994   CPP=$ac_cv_prog_CPP
4995 else
4996   ac_cv_prog_CPP=$CPP
4997 fi
4998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4999 $as_echo "$CPP" >&6; }
5000 ac_preproc_ok=false
5001 for ac_c_preproc_warn_flag in '' yes
5002 do
5003   # Use a header file that comes with gcc, so configuring glibc
5004   # with a fresh cross-compiler works.
5005   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5006   # <limits.h> exists even on freestanding compilers.
5007   # On the NeXT, cc -E runs the code through the compiler's parser,
5008   # not just through cpp. "Syntax error" is here to catch this case.
5009   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5010 /* end confdefs.h.  */
5011 #ifdef __STDC__
5012 # include <limits.h>
5013 #else
5014 # include <assert.h>
5015 #endif
5016                      Syntax error
5017 _ACEOF
5018 if ac_fn_c_try_cpp "$LINENO"; then :
5019
5020 else
5021   # Broken: fails on valid input.
5022 continue
5023 fi
5024 rm -f conftest.err conftest.i conftest.$ac_ext
5025
5026   # OK, works on sane cases.  Now check whether nonexistent headers
5027   # can be detected and how.
5028   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5029 /* end confdefs.h.  */
5030 #include <ac_nonexistent.h>
5031 _ACEOF
5032 if ac_fn_c_try_cpp "$LINENO"; then :
5033   # Broken: success on invalid input.
5034 continue
5035 else
5036   # Passes both tests.
5037 ac_preproc_ok=:
5038 break
5039 fi
5040 rm -f conftest.err conftest.i conftest.$ac_ext
5041
5042 done
5043 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5044 rm -f conftest.i conftest.err conftest.$ac_ext
5045 if $ac_preproc_ok; then :
5046
5047 else
5048   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5049 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5050 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5051 See \`config.log' for more details" "$LINENO" 5; }
5052 fi
5053
5054 ac_ext=c
5055 ac_cpp='$CPP $CPPFLAGS'
5056 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5057 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5058 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5059
5060
5061
5062
5063 #
5064 # Set up TAS assembly code if needed; the template file has now had its
5065 # chance to request this.
5066 #
5067 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
5068
5069
5070 if test "$need_tas" = yes ; then
5071   TAS=tas.o
5072 else
5073   TAS=""
5074 fi
5075
5076
5077
5078 #
5079 # Automatic dependency tracking
5080 #
5081
5082
5083 # Check whether --enable-depend was given.
5084 if test "${enable_depend+set}" = set; then :
5085   enableval=$enable_depend;
5086   case $enableval in
5087     yes)
5088       autodepend=yes
5089       ;;
5090     no)
5091       :
5092       ;;
5093     *)
5094       as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
5095       ;;
5096   esac
5097
5098 else
5099   enable_depend=no
5100
5101 fi
5102
5103
5104
5105
5106
5107 #
5108 # Enable assert checks
5109 #
5110
5111
5112 # Check whether --enable-cassert was given.
5113 if test "${enable_cassert+set}" = set; then :
5114   enableval=$enable_cassert;
5115   case $enableval in
5116     yes)
5117
5118 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
5119
5120       ;;
5121     no)
5122       :
5123       ;;
5124     *)
5125       as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
5126       ;;
5127   esac
5128
5129 else
5130   enable_cassert=no
5131
5132 fi
5133
5134
5135
5136
5137 #
5138 # Include directories
5139 #
5140 ac_save_IFS=$IFS
5141 IFS="${IFS}${PATH_SEPARATOR}"
5142 # SRCH_INC comes from the template file
5143 for dir in $with_includes $SRCH_INC; do
5144   if test -d "$dir"; then
5145     INCLUDES="$INCLUDES -I$dir"
5146   else
5147     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
5148 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
5149   fi
5150 done
5151 IFS=$ac_save_IFS
5152
5153
5154
5155 #
5156 # Library directories
5157 #
5158 ac_save_IFS=$IFS
5159 IFS="${IFS}${PATH_SEPARATOR}"
5160 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
5161 for dir in $LIBRARY_DIRS $SRCH_LIB; do
5162   if test -d "$dir"; then
5163     LIBDIRS="$LIBDIRS -L$dir"
5164   else
5165     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
5166 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
5167   fi
5168 done
5169 IFS=$ac_save_IFS
5170
5171 #
5172 # Enable thread-safe client libraries
5173 #
5174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
5175 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
5176
5177
5178 # Check whether --enable-thread-safety was given.
5179 if test "${enable_thread_safety+set}" = set; then :
5180   enableval=$enable_thread_safety;
5181   case $enableval in
5182     yes)
5183       :
5184       ;;
5185     no)
5186       :
5187       ;;
5188     *)
5189       as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
5190       ;;
5191   esac
5192
5193 else
5194   enable_thread_safety=yes
5195
5196 fi
5197
5198
5199 if test "$enable_thread_safety" = yes; then
5200
5201 $as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
5202
5203 fi
5204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
5205 $as_echo "$enable_thread_safety" >&6; }
5206
5207
5208 #
5209 # Optionally build Tcl modules (PL/Tcl)
5210 #
5211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
5212 $as_echo_n "checking whether to build with Tcl... " >&6; }
5213
5214
5215
5216 # Check whether --with-tcl was given.
5217 if test "${with_tcl+set}" = set; then :
5218   withval=$with_tcl;
5219   case $withval in
5220     yes)
5221       :
5222       ;;
5223     no)
5224       :
5225       ;;
5226     *)
5227       as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
5228       ;;
5229   esac
5230
5231 else
5232   with_tcl=no
5233
5234 fi
5235
5236
5237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
5238 $as_echo "$with_tcl" >&6; }
5239
5240
5241 # We see if the path to the Tcl/Tk configuration scripts is specified.
5242 # This will override the use of tclsh to find the paths to search.
5243
5244
5245
5246
5247 # Check whether --with-tclconfig was given.
5248 if test "${with_tclconfig+set}" = set; then :
5249   withval=$with_tclconfig;
5250   case $withval in
5251     yes)
5252       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
5253       ;;
5254     no)
5255       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
5256       ;;
5257     *)
5258
5259       ;;
5260   esac
5261
5262 fi
5263
5264
5265
5266 #
5267 # Optionally build Perl modules (PL/Perl)
5268 #
5269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
5270 $as_echo_n "checking whether to build Perl modules... " >&6; }
5271
5272
5273
5274 # Check whether --with-perl was given.
5275 if test "${with_perl+set}" = set; then :
5276   withval=$with_perl;
5277   case $withval in
5278     yes)
5279       :
5280       ;;
5281     no)
5282       :
5283       ;;
5284     *)
5285       as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
5286       ;;
5287   esac
5288
5289 else
5290   with_perl=no
5291
5292 fi
5293
5294
5295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
5296 $as_echo "$with_perl" >&6; }
5297
5298
5299 #
5300 # Optionally build Python modules (PL/Python)
5301 #
5302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
5303 $as_echo_n "checking whether to build Python modules... " >&6; }
5304
5305
5306
5307 # Check whether --with-python was given.
5308 if test "${with_python+set}" = set; then :
5309   withval=$with_python;
5310   case $withval in
5311     yes)
5312       :
5313       ;;
5314     no)
5315       :
5316       ;;
5317     *)
5318       as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
5319       ;;
5320   esac
5321
5322 else
5323   with_python=no
5324
5325 fi
5326
5327
5328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
5329 $as_echo "$with_python" >&6; }
5330
5331
5332 #
5333 # GSSAPI
5334 #
5335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
5336 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
5337
5338
5339
5340 # Check whether --with-gssapi was given.
5341 if test "${with_gssapi+set}" = set; then :
5342   withval=$with_gssapi;
5343   case $withval in
5344     yes)
5345
5346
5347 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
5348
5349   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
5350
5351       ;;
5352     no)
5353       :
5354       ;;
5355     *)
5356       as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
5357       ;;
5358   esac
5359
5360 else
5361   with_gssapi=no
5362
5363 fi
5364
5365
5366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
5367 $as_echo "$with_gssapi" >&6; }
5368
5369
5370
5371
5372
5373 #
5374 # Kerberos configuration parameters
5375 #
5376
5377
5378
5379 # Check whether --with-krb-srvnam was given.
5380 if test "${with_krb_srvnam+set}" = set; then :
5381   withval=$with_krb_srvnam;
5382   case $withval in
5383     yes)
5384       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
5385       ;;
5386     no)
5387       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
5388       ;;
5389     *)
5390
5391       ;;
5392   esac
5393
5394 else
5395   with_krb_srvnam="postgres"
5396 fi
5397
5398
5399
5400 cat >>confdefs.h <<_ACEOF
5401 #define PG_KRB_SRVNAM "$with_krb_srvnam"
5402 _ACEOF
5403
5404
5405
5406 #
5407 # PAM
5408 #
5409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
5410 $as_echo_n "checking whether to build with PAM support... " >&6; }
5411
5412
5413
5414 # Check whether --with-pam was given.
5415 if test "${with_pam+set}" = set; then :
5416   withval=$with_pam;
5417   case $withval in
5418     yes)
5419
5420 $as_echo "#define USE_PAM 1" >>confdefs.h
5421
5422       ;;
5423     no)
5424       :
5425       ;;
5426     *)
5427       as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
5428       ;;
5429   esac
5430
5431 else
5432   with_pam=no
5433
5434 fi
5435
5436
5437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
5438 $as_echo "$with_pam" >&6; }
5439
5440
5441 #
5442 # LDAP
5443 #
5444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
5445 $as_echo_n "checking whether to build with LDAP support... " >&6; }
5446
5447
5448
5449 # Check whether --with-ldap was given.
5450 if test "${with_ldap+set}" = set; then :
5451   withval=$with_ldap;
5452   case $withval in
5453     yes)
5454
5455 $as_echo "#define USE_LDAP 1" >>confdefs.h
5456
5457       ;;
5458     no)
5459       :
5460       ;;
5461     *)
5462       as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
5463       ;;
5464   esac
5465
5466 else
5467   with_ldap=no
5468
5469 fi
5470
5471
5472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
5473 $as_echo "$with_ldap" >&6; }
5474
5475
5476 #
5477 # Bonjour
5478 #
5479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
5480 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
5481
5482
5483
5484 # Check whether --with-bonjour was given.
5485 if test "${with_bonjour+set}" = set; then :
5486   withval=$with_bonjour;
5487   case $withval in
5488     yes)
5489
5490 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
5491
5492       ;;
5493     no)
5494       :
5495       ;;
5496     *)
5497       as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
5498       ;;
5499   esac
5500
5501 else
5502   with_bonjour=no
5503
5504 fi
5505
5506
5507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
5508 $as_echo "$with_bonjour" >&6; }
5509
5510
5511 #
5512 # OpenSSL
5513 #
5514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with OpenSSL support" >&5
5515 $as_echo_n "checking whether to build with OpenSSL support... " >&6; }
5516
5517
5518
5519 # Check whether --with-openssl was given.
5520 if test "${with_openssl+set}" = set; then :
5521   withval=$with_openssl;
5522   case $withval in
5523     yes)
5524
5525 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
5526
5527       ;;
5528     no)
5529       :
5530       ;;
5531     *)
5532       as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
5533       ;;
5534   esac
5535
5536 else
5537   with_openssl=no
5538
5539 fi
5540
5541
5542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_openssl" >&5
5543 $as_echo "$with_openssl" >&6; }
5544
5545
5546 #
5547 # SELinux
5548 #
5549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
5550 $as_echo_n "checking whether to build with SELinux support... " >&6; }
5551
5552
5553
5554 # Check whether --with-selinux was given.
5555 if test "${with_selinux+set}" = set; then :
5556   withval=$with_selinux;
5557   case $withval in
5558     yes)
5559       :
5560       ;;
5561     no)
5562       :
5563       ;;
5564     *)
5565       as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
5566       ;;
5567   esac
5568
5569 else
5570   with_selinux=no
5571
5572 fi
5573
5574
5575
5576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
5577 $as_echo "$with_selinux" >&6; }
5578
5579 #
5580 # Readline
5581 #
5582
5583
5584
5585 # Check whether --with-readline was given.
5586 if test "${with_readline+set}" = set; then :
5587   withval=$with_readline;
5588   case $withval in
5589     yes)
5590       :
5591       ;;
5592     no)
5593       :
5594       ;;
5595     *)
5596       as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
5597       ;;
5598   esac
5599
5600 else
5601   with_readline=yes
5602
5603 fi
5604
5605
5606 # readline on MinGW has problems with backslashes in psql and other bugs.
5607 # This is particularly a problem with non-US code pages.
5608 # Therefore disable its use until we understand the cause. 2004-07-20
5609 if test "$PORTNAME" = "win32"; then
5610   if test "$with_readline" = yes; then
5611     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
5612 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
5613     with_readline=no
5614   fi
5615 fi
5616
5617
5618 #
5619 # Prefer libedit
5620 #
5621
5622
5623
5624 # Check whether --with-libedit-preferred was given.
5625 if test "${with_libedit_preferred+set}" = set; then :
5626   withval=$with_libedit_preferred;
5627   case $withval in
5628     yes)
5629       :
5630       ;;
5631     no)
5632       :
5633       ;;
5634     *)
5635       as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
5636       ;;
5637   esac
5638
5639 else
5640   with_libedit_preferred=no
5641
5642 fi
5643
5644
5645
5646
5647 #
5648 # UUID library
5649 #
5650 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
5651 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
5652 # UUID library.  More than one of these might be present on a given platform,
5653 # so we make the user say which one she wants.
5654 #
5655
5656
5657
5658 # Check whether --with-uuid was given.
5659 if test "${with_uuid+set}" = set; then :
5660   withval=$with_uuid;
5661   case $withval in
5662     yes)
5663       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
5664       ;;
5665     no)
5666       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
5667       ;;
5668     *)
5669
5670       ;;
5671   esac
5672
5673 fi
5674
5675
5676 if test x"$with_uuid" = x"" ; then
5677   with_uuid=no
5678 fi
5679
5680
5681
5682 # Check whether --with-ossp-uuid was given.
5683 if test "${with_ossp_uuid+set}" = set; then :
5684   withval=$with_ossp_uuid;
5685   case $withval in
5686     yes)
5687       :
5688       ;;
5689     no)
5690       :
5691       ;;
5692     *)
5693       as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
5694       ;;
5695   esac
5696
5697 else
5698   with_ossp_uuid=no
5699
5700 fi
5701
5702
5703 if test "$with_ossp_uuid" = yes ; then
5704   with_uuid=ossp
5705 fi
5706
5707 if test "$with_uuid" = bsd ; then
5708
5709 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
5710
5711   UUID_EXTRA_OBJS="md5.o sha1.o"
5712 elif test "$with_uuid" = e2fs ; then
5713
5714 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
5715
5716   UUID_EXTRA_OBJS="md5.o sha1.o"
5717 elif test "$with_uuid" = ossp ; then
5718
5719 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
5720
5721   UUID_EXTRA_OBJS=""
5722 elif test "$with_uuid" = no ; then
5723   UUID_EXTRA_OBJS=""
5724 else
5725   as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
5726 fi
5727
5728
5729
5730
5731 #
5732 # XML
5733 #
5734
5735
5736
5737 # Check whether --with-libxml was given.
5738 if test "${with_libxml+set}" = set; then :
5739   withval=$with_libxml;
5740   case $withval in
5741     yes)
5742
5743 $as_echo "#define USE_LIBXML 1" >>confdefs.h
5744
5745       ;;
5746     no)
5747       :
5748       ;;
5749     *)
5750       as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
5751       ;;
5752   esac
5753
5754 else
5755   with_libxml=no
5756
5757 fi
5758
5759
5760
5761 if test "$with_libxml" = yes ; then
5762   for ac_prog in xml2-config
5763 do
5764   # Extract the first word of "$ac_prog", so it can be a program name with args.
5765 set dummy $ac_prog; ac_word=$2
5766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5767 $as_echo_n "checking for $ac_word... " >&6; }
5768 if ${ac_cv_prog_XML2_CONFIG+:} false; then :
5769   $as_echo_n "(cached) " >&6
5770 else
5771   if test -n "$XML2_CONFIG"; then
5772   ac_cv_prog_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test.
5773 else
5774 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5775 for as_dir in $PATH
5776 do
5777   IFS=$as_save_IFS
5778   test -z "$as_dir" && as_dir=.
5779     for ac_exec_ext in '' $ac_executable_extensions; do
5780   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5781     ac_cv_prog_XML2_CONFIG="$ac_prog"
5782     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5783     break 2
5784   fi
5785 done
5786   done
5787 IFS=$as_save_IFS
5788
5789 fi
5790 fi
5791 XML2_CONFIG=$ac_cv_prog_XML2_CONFIG
5792 if test -n "$XML2_CONFIG"; then
5793   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
5794 $as_echo "$XML2_CONFIG" >&6; }
5795 else
5796   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5797 $as_echo "no" >&6; }
5798 fi
5799
5800
5801   test -n "$XML2_CONFIG" && break
5802 done
5803
5804   if test -n "$XML2_CONFIG"; then
5805     for pgac_option in `$XML2_CONFIG --cflags`; do
5806       case $pgac_option in
5807         -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
5808       esac
5809     done
5810     for pgac_option in `$XML2_CONFIG --libs`; do
5811       case $pgac_option in
5812         -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5813       esac
5814     done
5815   fi
5816 fi
5817
5818
5819
5820 #
5821 # XSLT
5822 #
5823
5824
5825
5826 # Check whether --with-libxslt was given.
5827 if test "${with_libxslt+set}" = set; then :
5828   withval=$with_libxslt;
5829   case $withval in
5830     yes)
5831
5832 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
5833
5834       ;;
5835     no)
5836       :
5837       ;;
5838     *)
5839       as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
5840       ;;
5841   esac
5842
5843 else
5844   with_libxslt=no
5845
5846 fi
5847
5848
5849
5850
5851
5852
5853 #
5854 # tzdata
5855 #
5856
5857
5858
5859 # Check whether --with-system-tzdata was given.
5860 if test "${with_system_tzdata+set}" = set; then :
5861   withval=$with_system_tzdata;
5862   case $withval in
5863     yes)
5864       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
5865       ;;
5866     no)
5867       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
5868       ;;
5869     *)
5870
5871       ;;
5872   esac
5873
5874 fi
5875
5876
5877
5878
5879 #
5880 # Zlib
5881 #
5882
5883
5884
5885 # Check whether --with-zlib was given.
5886 if test "${with_zlib+set}" = set; then :
5887   withval=$with_zlib;
5888   case $withval in
5889     yes)
5890       :
5891       ;;
5892     no)
5893       :
5894       ;;
5895     *)
5896       as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
5897       ;;
5898   esac
5899
5900 else
5901   with_zlib=yes
5902
5903 fi
5904
5905
5906
5907
5908 #
5909 # Elf
5910 #
5911
5912 # Assume system is ELF if it predefines __ELF__ as 1,
5913 # otherwise believe host_os based default.
5914 case $host_os in
5915     freebsd1*|freebsd2*) elf=no;;
5916     freebsd3*|freebsd4*) elf=yes;;
5917 esac
5918
5919
5920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5921 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5922 if ${ac_cv_path_GREP+:} false; then :
5923   $as_echo_n "(cached) " >&6
5924 else
5925   if test -z "$GREP"; then
5926   ac_path_GREP_found=false
5927   # Loop through the user's path and test for each of PROGNAME-LIST
5928   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5929 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5930 do
5931   IFS=$as_save_IFS
5932   test -z "$as_dir" && as_dir=.
5933     for ac_prog in grep ggrep; do
5934     for ac_exec_ext in '' $ac_executable_extensions; do
5935       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5936       as_fn_executable_p "$ac_path_GREP" || continue
5937 # Check for GNU ac_path_GREP and select it if it is found.
5938   # Check for GNU $ac_path_GREP
5939 case `"$ac_path_GREP" --version 2>&1` in
5940 *GNU*)
5941   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5942 *)
5943   ac_count=0
5944   $as_echo_n 0123456789 >"conftest.in"
5945   while :
5946   do
5947     cat "conftest.in" "conftest.in" >"conftest.tmp"
5948     mv "conftest.tmp" "conftest.in"
5949     cp "conftest.in" "conftest.nl"
5950     $as_echo 'GREP' >> "conftest.nl"
5951     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5952     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5953     as_fn_arith $ac_count + 1 && ac_count=$as_val
5954     if test $ac_count -gt ${ac_path_GREP_max-0}; then
5955       # Best one so far, save it but keep looking for a better one
5956       ac_cv_path_GREP="$ac_path_GREP"
5957       ac_path_GREP_max=$ac_count
5958     fi
5959     # 10*(2^10) chars as input seems more than enough
5960     test $ac_count -gt 10 && break
5961   done
5962   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5963 esac
5964
5965       $ac_path_GREP_found && break 3
5966     done
5967   done
5968   done
5969 IFS=$as_save_IFS
5970   if test -z "$ac_cv_path_GREP"; then
5971     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5972   fi
5973 else
5974   ac_cv_path_GREP=$GREP
5975 fi
5976
5977 fi
5978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5979 $as_echo "$ac_cv_path_GREP" >&6; }
5980  GREP="$ac_cv_path_GREP"
5981
5982
5983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5984 $as_echo_n "checking for egrep... " >&6; }
5985 if ${ac_cv_path_EGREP+:} false; then :
5986   $as_echo_n "(cached) " >&6
5987 else
5988   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5989    then ac_cv_path_EGREP="$GREP -E"
5990    else
5991      if test -z "$EGREP"; then
5992   ac_path_EGREP_found=false
5993   # Loop through the user's path and test for each of PROGNAME-LIST
5994   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5995 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5996 do
5997   IFS=$as_save_IFS
5998   test -z "$as_dir" && as_dir=.
5999     for ac_prog in egrep; do
6000     for ac_exec_ext in '' $ac_executable_extensions; do
6001       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6002       as_fn_executable_p "$ac_path_EGREP" || continue
6003 # Check for GNU ac_path_EGREP and select it if it is found.
6004   # Check for GNU $ac_path_EGREP
6005 case `"$ac_path_EGREP" --version 2>&1` in
6006 *GNU*)
6007   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6008 *)
6009   ac_count=0
6010   $as_echo_n 0123456789 >"conftest.in"
6011   while :
6012   do
6013     cat "conftest.in" "conftest.in" >"conftest.tmp"
6014     mv "conftest.tmp" "conftest.in"
6015     cp "conftest.in" "conftest.nl"
6016     $as_echo 'EGREP' >> "conftest.nl"
6017     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6018     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6019     as_fn_arith $ac_count + 1 && ac_count=$as_val
6020     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6021       # Best one so far, save it but keep looking for a better one
6022       ac_cv_path_EGREP="$ac_path_EGREP"
6023       ac_path_EGREP_max=$ac_count
6024     fi
6025     # 10*(2^10) chars as input seems more than enough
6026     test $ac_count -gt 10 && break
6027   done
6028   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6029 esac
6030
6031       $ac_path_EGREP_found && break 3
6032     done
6033   done
6034   done
6035 IFS=$as_save_IFS
6036   if test -z "$ac_cv_path_EGREP"; then
6037     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6038   fi
6039 else
6040   ac_cv_path_EGREP=$EGREP
6041 fi
6042
6043    fi
6044 fi
6045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6046 $as_echo "$ac_cv_path_EGREP" >&6; }
6047  EGREP="$ac_cv_path_EGREP"
6048
6049
6050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6051 /* end confdefs.h.  */
6052 #if __ELF__
6053   yes
6054 #endif
6055
6056 _ACEOF
6057 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6058   $EGREP "yes" >/dev/null 2>&1; then :
6059   ELF_SYS=true
6060 else
6061   if test "X$elf" = "Xyes" ; then
6062   ELF_SYS=true
6063 else
6064   ELF_SYS=
6065 fi
6066 fi
6067 rm -f conftest*
6068
6069
6070
6071 #
6072 # Assignments
6073 #
6074
6075 CPPFLAGS="$CPPFLAGS $INCLUDES"
6076 LDFLAGS="$LDFLAGS $LIBDIRS"
6077
6078
6079
6080
6081
6082 # Check whether --with-gnu-ld was given.
6083 if test "${with_gnu_ld+set}" = set; then :
6084   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
6085 else
6086   with_gnu_ld=no
6087 fi
6088
6089 ac_prog=ld
6090 if test "$GCC" = yes; then
6091   # Check if gcc -print-prog-name=ld gives a path.
6092   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
6093 $as_echo_n "checking for ld used by GCC... " >&6; }
6094   case $host in
6095   *-*-mingw*)
6096     # gcc leaves a trailing carriage return which upsets mingw
6097     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6098   *)
6099     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6100   esac
6101   case "$ac_prog" in
6102     # Accept absolute paths.
6103     [\\/]* | [A-Za-z]:[\\/]*)
6104       re_direlt='/[^/][^/]*/\.\./'
6105       # Canonicalize the path of ld
6106       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
6107       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
6108         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
6109       done
6110       test -z "$LD" && LD="$ac_prog"
6111       ;;
6112   "")
6113     # If it fails, then pretend we aren't using GCC.
6114     ac_prog=ld
6115     ;;
6116   *)
6117     # If it is relative, then search for the first ld in PATH.
6118     with_gnu_ld=unknown
6119     ;;
6120   esac
6121 elif test "$with_gnu_ld" = yes; then
6122   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
6123 $as_echo_n "checking for GNU ld... " >&6; }
6124 else
6125   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
6126 $as_echo_n "checking for non-GNU ld... " >&6; }
6127 fi
6128 if ${ac_cv_path_LD+:} false; then :
6129   $as_echo_n "(cached) " >&6
6130 else
6131   if test -z "$LD"; then
6132   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
6133   for ac_dir in $PATH; do
6134     test -z "$ac_dir" && ac_dir=.
6135     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6136       ac_cv_path_LD="$ac_dir/$ac_prog"
6137       # Check to see if the program is GNU ld.  I'd rather use --version,
6138       # but apparently some GNU ld's only accept -v.
6139       # Break only if it was the GNU/non-GNU ld that we prefer.
6140       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
6141         test "$with_gnu_ld" != no && break
6142       else
6143         test "$with_gnu_ld" != yes && break
6144       fi
6145     fi
6146   done
6147   IFS="$ac_save_ifs"
6148 else
6149   ac_cv_path_LD="$LD" # Let the user override the test with a path.
6150 fi
6151 fi
6152
6153 LD="$ac_cv_path_LD"
6154 if test -n "$LD"; then
6155   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
6156 $as_echo "$LD" >&6; }
6157 else
6158   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6159 $as_echo "no" >&6; }
6160 fi
6161 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
6162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
6163 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
6164 if ${ac_cv_prog_gnu_ld+:} false; then :
6165   $as_echo_n "(cached) " >&6
6166 else
6167   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
6168 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
6169   ac_cv_prog_gnu_ld=yes
6170 else
6171   ac_cv_prog_gnu_ld=no
6172 fi
6173 fi
6174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
6175 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
6176 with_gnu_ld=$ac_cv_prog_gnu_ld
6177
6178
6179
6180
6181 case $host_os in sysv5*)
6182   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ld -R works" >&5
6183 $as_echo_n "checking whether ld -R works... " >&6; }
6184 if ${pgac_cv_prog_ld_R+:} false; then :
6185   $as_echo_n "(cached) " >&6
6186 else
6187
6188     pgac_save_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -Wl,-R/usr/lib"
6189     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6190 /* end confdefs.h.  */
6191
6192 int
6193 main ()
6194 {
6195
6196   ;
6197   return 0;
6198 }
6199 _ACEOF
6200 if ac_fn_c_try_link "$LINENO"; then :
6201   pgac_cv_prog_ld_R=yes
6202 else
6203   pgac_cv_prog_ld_R=no
6204 fi
6205 rm -f core conftest.err conftest.$ac_objext \
6206     conftest$ac_exeext conftest.$ac_ext
6207     LDFLAGS=$pgac_save_LDFLAGS
6208
6209 fi
6210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_ld_R" >&5
6211 $as_echo "$pgac_cv_prog_ld_R" >&6; }
6212   ld_R_works=$pgac_cv_prog_ld_R
6213
6214 esac
6215 if test -n "$ac_tool_prefix"; then
6216   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6217 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6219 $as_echo_n "checking for $ac_word... " >&6; }
6220 if ${ac_cv_prog_RANLIB+:} false; then :
6221   $as_echo_n "(cached) " >&6
6222 else
6223   if test -n "$RANLIB"; then
6224   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6225 else
6226 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6227 for as_dir in $PATH
6228 do
6229   IFS=$as_save_IFS
6230   test -z "$as_dir" && as_dir=.
6231     for ac_exec_ext in '' $ac_executable_extensions; do
6232   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6233     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6234     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6235     break 2
6236   fi
6237 done
6238   done
6239 IFS=$as_save_IFS
6240
6241 fi
6242 fi
6243 RANLIB=$ac_cv_prog_RANLIB
6244 if test -n "$RANLIB"; then
6245   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6246 $as_echo "$RANLIB" >&6; }
6247 else
6248   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6249 $as_echo "no" >&6; }
6250 fi
6251
6252
6253 fi
6254 if test -z "$ac_cv_prog_RANLIB"; then
6255   ac_ct_RANLIB=$RANLIB
6256   # Extract the first word of "ranlib", so it can be a program name with args.
6257 set dummy ranlib; ac_word=$2
6258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6259 $as_echo_n "checking for $ac_word... " >&6; }
6260 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6261   $as_echo_n "(cached) " >&6
6262 else
6263   if test -n "$ac_ct_RANLIB"; then
6264   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6265 else
6266 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6267 for as_dir in $PATH
6268 do
6269   IFS=$as_save_IFS
6270   test -z "$as_dir" && as_dir=.
6271     for ac_exec_ext in '' $ac_executable_extensions; do
6272   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6273     ac_cv_prog_ac_ct_RANLIB="ranlib"
6274     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6275     break 2
6276   fi
6277 done
6278   done
6279 IFS=$as_save_IFS
6280
6281 fi
6282 fi
6283 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6284 if test -n "$ac_ct_RANLIB"; then
6285   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6286 $as_echo "$ac_ct_RANLIB" >&6; }
6287 else
6288   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6289 $as_echo "no" >&6; }
6290 fi
6291
6292   if test "x$ac_ct_RANLIB" = x; then
6293     RANLIB=":"
6294   else
6295     case $cross_compiling:$ac_tool_warned in
6296 yes:)
6297 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6298 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6299 ac_tool_warned=yes ;;
6300 esac
6301     RANLIB=$ac_ct_RANLIB
6302   fi
6303 else
6304   RANLIB="$ac_cv_prog_RANLIB"
6305 fi
6306
6307
6308   if test -n "$ac_tool_prefix"; then
6309   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6310 set dummy ${ac_tool_prefix}strip; ac_word=$2
6311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6312 $as_echo_n "checking for $ac_word... " >&6; }
6313 if ${ac_cv_prog_STRIP+:} false; then :
6314   $as_echo_n "(cached) " >&6
6315 else
6316   if test -n "$STRIP"; then
6317   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6318 else
6319 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6320 for as_dir in $PATH
6321 do
6322   IFS=$as_save_IFS
6323   test -z "$as_dir" && as_dir=.
6324     for ac_exec_ext in '' $ac_executable_extensions; do
6325   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6326     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6327     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6328     break 2
6329   fi
6330 done
6331   done
6332 IFS=$as_save_IFS
6333
6334 fi
6335 fi
6336 STRIP=$ac_cv_prog_STRIP
6337 if test -n "$STRIP"; then
6338   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6339 $as_echo "$STRIP" >&6; }
6340 else
6341   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6342 $as_echo "no" >&6; }
6343 fi
6344
6345
6346 fi
6347 if test -z "$ac_cv_prog_STRIP"; then
6348   ac_ct_STRIP=$STRIP
6349   # Extract the first word of "strip", so it can be a program name with args.
6350 set dummy strip; ac_word=$2
6351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6352 $as_echo_n "checking for $ac_word... " >&6; }
6353 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
6354   $as_echo_n "(cached) " >&6
6355 else
6356   if test -n "$ac_ct_STRIP"; then
6357   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6358 else
6359 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6360 for as_dir in $PATH
6361 do
6362   IFS=$as_save_IFS
6363   test -z "$as_dir" && as_dir=.
6364     for ac_exec_ext in '' $ac_executable_extensions; do
6365   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6366     ac_cv_prog_ac_ct_STRIP="strip"
6367     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6368     break 2
6369   fi
6370 done
6371   done
6372 IFS=$as_save_IFS
6373
6374 fi
6375 fi
6376 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6377 if test -n "$ac_ct_STRIP"; then
6378   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6379 $as_echo "$ac_ct_STRIP" >&6; }
6380 else
6381   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6382 $as_echo "no" >&6; }
6383 fi
6384
6385   if test "x$ac_ct_STRIP" = x; then
6386     STRIP=":"
6387   else
6388     case $cross_compiling:$ac_tool_warned in
6389 yes:)
6390 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6391 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6392 ac_tool_warned=yes ;;
6393 esac
6394     STRIP=$ac_ct_STRIP
6395   fi
6396 else
6397   STRIP="$ac_cv_prog_STRIP"
6398 fi
6399
6400
6401   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
6402 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
6403   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
6404     STRIP_STATIC_LIB="$STRIP -x"
6405     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
6406     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6407 $as_echo "yes" >&6; }
6408   else
6409     case $host_os in
6410       darwin*)
6411         STRIP="$STRIP -x"
6412         STRIP_STATIC_LIB=$STRIP
6413         STRIP_SHARED_LIB=$STRIP
6414         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6415 $as_echo "yes" >&6; }
6416         ;;
6417       *)
6418         STRIP_STATIC_LIB=:
6419         STRIP_SHARED_LIB=:
6420         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6421 $as_echo "no" >&6; }
6422         ;;
6423     esac
6424   fi
6425
6426
6427
6428 if test -n "$ac_tool_prefix"; then
6429   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6430 set dummy ${ac_tool_prefix}ar; ac_word=$2
6431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6432 $as_echo_n "checking for $ac_word... " >&6; }
6433 if ${ac_cv_prog_AR+:} false; then :
6434   $as_echo_n "(cached) " >&6
6435 else
6436   if test -n "$AR"; then
6437   ac_cv_prog_AR="$AR" # Let the user override the test.
6438 else
6439 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6440 for as_dir in $PATH
6441 do
6442   IFS=$as_save_IFS
6443   test -z "$as_dir" && as_dir=.
6444     for ac_exec_ext in '' $ac_executable_extensions; do
6445   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6446     ac_cv_prog_AR="${ac_tool_prefix}ar"
6447     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6448     break 2
6449   fi
6450 done
6451   done
6452 IFS=$as_save_IFS
6453
6454 fi
6455 fi
6456 AR=$ac_cv_prog_AR
6457 if test -n "$AR"; then
6458   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6459 $as_echo "$AR" >&6; }
6460 else
6461   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6462 $as_echo "no" >&6; }
6463 fi
6464
6465
6466 fi
6467 if test -z "$ac_cv_prog_AR"; then
6468   ac_ct_AR=$AR
6469   # Extract the first word of "ar", so it can be a program name with args.
6470 set dummy ar; ac_word=$2
6471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6472 $as_echo_n "checking for $ac_word... " >&6; }
6473 if ${ac_cv_prog_ac_ct_AR+:} false; then :
6474   $as_echo_n "(cached) " >&6
6475 else
6476   if test -n "$ac_ct_AR"; then
6477   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6478 else
6479 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6480 for as_dir in $PATH
6481 do
6482   IFS=$as_save_IFS
6483   test -z "$as_dir" && as_dir=.
6484     for ac_exec_ext in '' $ac_executable_extensions; do
6485   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6486     ac_cv_prog_ac_ct_AR="ar"
6487     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6488     break 2
6489   fi
6490 done
6491   done
6492 IFS=$as_save_IFS
6493
6494 fi
6495 fi
6496 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6497 if test -n "$ac_ct_AR"; then
6498   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6499 $as_echo "$ac_ct_AR" >&6; }
6500 else
6501   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6502 $as_echo "no" >&6; }
6503 fi
6504
6505   if test "x$ac_ct_AR" = x; then
6506     AR="ar"
6507   else
6508     case $cross_compiling:$ac_tool_warned in
6509 yes:)
6510 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6511 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6512 ac_tool_warned=yes ;;
6513 esac
6514     AR=$ac_ct_AR
6515   fi
6516 else
6517   AR="$ac_cv_prog_AR"
6518 fi
6519
6520 if test "$PORTNAME" = "win32"; then
6521   if test -n "$ac_tool_prefix"; then
6522   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6523 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
6524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6525 $as_echo_n "checking for $ac_word... " >&6; }
6526 if ${ac_cv_prog_DLLTOOL+:} false; then :
6527   $as_echo_n "(cached) " >&6
6528 else
6529   if test -n "$DLLTOOL"; then
6530   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6531 else
6532 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6533 for as_dir in $PATH
6534 do
6535   IFS=$as_save_IFS
6536   test -z "$as_dir" && as_dir=.
6537     for ac_exec_ext in '' $ac_executable_extensions; do
6538   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6539     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
6540     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6541     break 2
6542   fi
6543 done
6544   done
6545 IFS=$as_save_IFS
6546
6547 fi
6548 fi
6549 DLLTOOL=$ac_cv_prog_DLLTOOL
6550 if test -n "$DLLTOOL"; then
6551   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
6552 $as_echo "$DLLTOOL" >&6; }
6553 else
6554   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6555 $as_echo "no" >&6; }
6556 fi
6557
6558
6559 fi
6560 if test -z "$ac_cv_prog_DLLTOOL"; then
6561   ac_ct_DLLTOOL=$DLLTOOL
6562   # Extract the first word of "dlltool", so it can be a program name with args.
6563 set dummy dlltool; ac_word=$2
6564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6565 $as_echo_n "checking for $ac_word... " >&6; }
6566 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
6567   $as_echo_n "(cached) " >&6
6568 else
6569   if test -n "$ac_ct_DLLTOOL"; then
6570   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6571 else
6572 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6573 for as_dir in $PATH
6574 do
6575   IFS=$as_save_IFS
6576   test -z "$as_dir" && as_dir=.
6577     for ac_exec_ext in '' $ac_executable_extensions; do
6578   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6579     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
6580     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6581     break 2
6582   fi
6583 done
6584   done
6585 IFS=$as_save_IFS
6586
6587 fi
6588 fi
6589 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6590 if test -n "$ac_ct_DLLTOOL"; then
6591   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
6592 $as_echo "$ac_ct_DLLTOOL" >&6; }
6593 else
6594   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6595 $as_echo "no" >&6; }
6596 fi
6597
6598   if test "x$ac_ct_DLLTOOL" = x; then
6599     DLLTOOL="dlltool"
6600   else
6601     case $cross_compiling:$ac_tool_warned in
6602 yes:)
6603 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6604 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6605 ac_tool_warned=yes ;;
6606 esac
6607     DLLTOOL=$ac_ct_DLLTOOL
6608   fi
6609 else
6610   DLLTOOL="$ac_cv_prog_DLLTOOL"
6611 fi
6612
6613   if test -n "$ac_tool_prefix"; then
6614   # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
6615 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
6616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6617 $as_echo_n "checking for $ac_word... " >&6; }
6618 if ${ac_cv_prog_DLLWRAP+:} false; then :
6619   $as_echo_n "(cached) " >&6
6620 else
6621   if test -n "$DLLWRAP"; then
6622   ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
6623 else
6624 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6625 for as_dir in $PATH
6626 do
6627   IFS=$as_save_IFS
6628   test -z "$as_dir" && as_dir=.
6629     for ac_exec_ext in '' $ac_executable_extensions; do
6630   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6631     ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
6632     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6633     break 2
6634   fi
6635 done
6636   done
6637 IFS=$as_save_IFS
6638
6639 fi
6640 fi
6641 DLLWRAP=$ac_cv_prog_DLLWRAP
6642 if test -n "$DLLWRAP"; then
6643   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5
6644 $as_echo "$DLLWRAP" >&6; }
6645 else
6646   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6647 $as_echo "no" >&6; }
6648 fi
6649
6650
6651 fi
6652 if test -z "$ac_cv_prog_DLLWRAP"; then
6653   ac_ct_DLLWRAP=$DLLWRAP
6654   # Extract the first word of "dllwrap", so it can be a program name with args.
6655 set dummy dllwrap; ac_word=$2
6656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6657 $as_echo_n "checking for $ac_word... " >&6; }
6658 if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then :
6659   $as_echo_n "(cached) " >&6
6660 else
6661   if test -n "$ac_ct_DLLWRAP"; then
6662   ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
6663 else
6664 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6665 for as_dir in $PATH
6666 do
6667   IFS=$as_save_IFS
6668   test -z "$as_dir" && as_dir=.
6669     for ac_exec_ext in '' $ac_executable_extensions; do
6670   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6671     ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
6672     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6673     break 2
6674   fi
6675 done
6676   done
6677 IFS=$as_save_IFS
6678
6679 fi
6680 fi
6681 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
6682 if test -n "$ac_ct_DLLWRAP"; then
6683   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5
6684 $as_echo "$ac_ct_DLLWRAP" >&6; }
6685 else
6686   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6687 $as_echo "no" >&6; }
6688 fi
6689
6690   if test "x$ac_ct_DLLWRAP" = x; then
6691     DLLWRAP="dllwrap"
6692   else
6693     case $cross_compiling:$ac_tool_warned in
6694 yes:)
6695 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6696 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6697 ac_tool_warned=yes ;;
6698 esac
6699     DLLWRAP=$ac_ct_DLLWRAP
6700   fi
6701 else
6702   DLLWRAP="$ac_cv_prog_DLLWRAP"
6703 fi
6704
6705   if test -n "$ac_tool_prefix"; then
6706   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6707 set dummy ${ac_tool_prefix}windres; ac_word=$2
6708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6709 $as_echo_n "checking for $ac_word... " >&6; }
6710 if ${ac_cv_prog_WINDRES+:} false; then :
6711   $as_echo_n "(cached) " >&6
6712 else
6713   if test -n "$WINDRES"; then
6714   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
6715 else
6716 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6717 for as_dir in $PATH
6718 do
6719   IFS=$as_save_IFS
6720   test -z "$as_dir" && as_dir=.
6721     for ac_exec_ext in '' $ac_executable_extensions; do
6722   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6723     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
6724     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6725     break 2
6726   fi
6727 done
6728   done
6729 IFS=$as_save_IFS
6730
6731 fi
6732 fi
6733 WINDRES=$ac_cv_prog_WINDRES
6734 if test -n "$WINDRES"; then
6735   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
6736 $as_echo "$WINDRES" >&6; }
6737 else
6738   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6739 $as_echo "no" >&6; }
6740 fi
6741
6742
6743 fi
6744 if test -z "$ac_cv_prog_WINDRES"; then
6745   ac_ct_WINDRES=$WINDRES
6746   # Extract the first word of "windres", so it can be a program name with args.
6747 set dummy windres; ac_word=$2
6748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6749 $as_echo_n "checking for $ac_word... " >&6; }
6750 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
6751   $as_echo_n "(cached) " >&6
6752 else
6753   if test -n "$ac_ct_WINDRES"; then
6754   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
6755 else
6756 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6757 for as_dir in $PATH
6758 do
6759   IFS=$as_save_IFS
6760   test -z "$as_dir" && as_dir=.
6761     for ac_exec_ext in '' $ac_executable_extensions; do
6762   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6763     ac_cv_prog_ac_ct_WINDRES="windres"
6764     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6765     break 2
6766   fi
6767 done
6768   done
6769 IFS=$as_save_IFS
6770
6771 fi
6772 fi
6773 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6774 if test -n "$ac_ct_WINDRES"; then
6775   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
6776 $as_echo "$ac_ct_WINDRES" >&6; }
6777 else
6778   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6779 $as_echo "no" >&6; }
6780 fi
6781
6782   if test "x$ac_ct_WINDRES" = x; then
6783     WINDRES="windres"
6784   else
6785     case $cross_compiling:$ac_tool_warned in
6786 yes:)
6787 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6788 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6789 ac_tool_warned=yes ;;
6790 esac
6791     WINDRES=$ac_ct_WINDRES
6792   fi
6793 else
6794   WINDRES="$ac_cv_prog_WINDRES"
6795 fi
6796
6797 fi
6798
6799 # Find a good install program.  We prefer a C program (faster),
6800 # so one script is as good as another.  But avoid the broken or
6801 # incompatible versions:
6802 # SysV /etc/install, /usr/sbin/install
6803 # SunOS /usr/etc/install
6804 # IRIX /sbin/install
6805 # AIX /bin/install
6806 # AmigaOS /C/install, which installs bootblocks on floppy discs
6807 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6808 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
6809 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6810 # OS/2's system install, which has a completely different semantic
6811 # ./install, which can be erroneously created by make from ./install.sh.
6812 # Reject install programs that cannot install multiple files.
6813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6814 $as_echo_n "checking for a BSD-compatible install... " >&6; }
6815 if test -z "$INSTALL"; then
6816 if ${ac_cv_path_install+:} false; then :
6817   $as_echo_n "(cached) " >&6
6818 else
6819   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6820 for as_dir in $PATH
6821 do
6822   IFS=$as_save_IFS
6823   test -z "$as_dir" && as_dir=.
6824     # Account for people who put trailing slashes in PATH elements.
6825 case $as_dir/ in #((
6826   ./ | .// | /[cC]/* | \
6827   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
6828   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
6829   /usr/ucb/* ) ;;
6830   *)
6831     # OSF1 and SCO ODT 3.0 have their own names for install.
6832     # Don't use installbsd from OSF since it installs stuff as root
6833     # by default.
6834     for ac_prog in ginstall scoinst install; do
6835       for ac_exec_ext in '' $ac_executable_extensions; do
6836         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
6837           if test $ac_prog = install &&
6838             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6839             # AIX install.  It has an incompatible calling convention.
6840             :
6841           elif test $ac_prog = install &&
6842             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6843             # program-specific install script used by HP pwplus--don't use.
6844             :
6845           else
6846             rm -rf conftest.one conftest.two conftest.dir
6847             echo one > conftest.one
6848             echo two > conftest.two
6849             mkdir conftest.dir
6850             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6851               test -s conftest.one && test -s conftest.two &&
6852               test -s conftest.dir/conftest.one &&
6853               test -s conftest.dir/conftest.two
6854             then
6855               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6856               break 3
6857             fi
6858           fi
6859         fi
6860       done
6861     done
6862     ;;
6863 esac
6864
6865   done
6866 IFS=$as_save_IFS
6867
6868 rm -rf conftest.one conftest.two conftest.dir
6869
6870 fi
6871   if test "${ac_cv_path_install+set}" = set; then
6872     INSTALL=$ac_cv_path_install
6873   else
6874     # As a last resort, use the slow shell script.  Don't cache a
6875     # value for INSTALL within a source directory, because that will
6876     # break other packages using the cache if that directory is
6877     # removed, or if the value is a relative name.
6878     INSTALL=$ac_install_sh
6879   fi
6880 fi
6881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6882 $as_echo "$INSTALL" >&6; }
6883
6884 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6885 # It thinks the first close brace ends the variable substitution.
6886 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6887
6888 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6889
6890 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6891
6892 # When Autoconf chooses install-sh as install program it tries to generate
6893 # a relative path to it in each makefile where it subsitutes it. This clashes
6894 # with our Makefile.global concept. This workaround helps.
6895 case $INSTALL in
6896   *install-sh*) install_bin='';;
6897   *) install_bin=$INSTALL;;
6898 esac
6899
6900
6901 # Extract the first word of "tar", so it can be a program name with args.
6902 set dummy tar; ac_word=$2
6903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6904 $as_echo_n "checking for $ac_word... " >&6; }
6905 if ${ac_cv_path_TAR+:} false; then :
6906   $as_echo_n "(cached) " >&6
6907 else
6908   case $TAR in
6909   [\\/]* | ?:[\\/]*)
6910   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
6911   ;;
6912   *)
6913   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6914 for as_dir in $PATH
6915 do
6916   IFS=$as_save_IFS
6917   test -z "$as_dir" && as_dir=.
6918     for ac_exec_ext in '' $ac_executable_extensions; do
6919   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6920     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
6921     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6922     break 2
6923   fi
6924 done
6925   done
6926 IFS=$as_save_IFS
6927
6928   ;;
6929 esac
6930 fi
6931 TAR=$ac_cv_path_TAR
6932 if test -n "$TAR"; then
6933   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
6934 $as_echo "$TAR" >&6; }
6935 else
6936   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6937 $as_echo "no" >&6; }
6938 fi
6939
6940
6941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
6942 $as_echo_n "checking whether ln -s works... " >&6; }
6943 LN_S=$as_ln_s
6944 if test "$LN_S" = "ln -s"; then
6945   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6946 $as_echo "yes" >&6; }
6947 else
6948   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
6949 $as_echo "no, using $LN_S" >&6; }
6950 fi
6951
6952 for ac_prog in gawk mawk nawk awk
6953 do
6954   # Extract the first word of "$ac_prog", so it can be a program name with args.
6955 set dummy $ac_prog; ac_word=$2
6956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6957 $as_echo_n "checking for $ac_word... " >&6; }
6958 if ${ac_cv_prog_AWK+:} false; then :
6959   $as_echo_n "(cached) " >&6
6960 else
6961   if test -n "$AWK"; then
6962   ac_cv_prog_AWK="$AWK" # Let the user override the test.
6963 else
6964 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6965 for as_dir in $PATH
6966 do
6967   IFS=$as_save_IFS
6968   test -z "$as_dir" && as_dir=.
6969     for ac_exec_ext in '' $ac_executable_extensions; do
6970   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6971     ac_cv_prog_AWK="$ac_prog"
6972     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6973     break 2
6974   fi
6975 done
6976   done
6977 IFS=$as_save_IFS
6978
6979 fi
6980 fi
6981 AWK=$ac_cv_prog_AWK
6982 if test -n "$AWK"; then
6983   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6984 $as_echo "$AWK" >&6; }
6985 else
6986   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6987 $as_echo "no" >&6; }
6988 fi
6989
6990
6991   test -n "$AWK" && break
6992 done
6993
6994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6995 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6996 if test -z "$MKDIR_P"; then
6997   if ${ac_cv_path_mkdir+:} false; then :
6998   $as_echo_n "(cached) " >&6
6999 else
7000   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7001 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
7002 do
7003   IFS=$as_save_IFS
7004   test -z "$as_dir" && as_dir=.
7005     for ac_prog in mkdir gmkdir; do
7006          for ac_exec_ext in '' $ac_executable_extensions; do
7007            as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
7008            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
7009              'mkdir (GNU coreutils) '* | \
7010              'mkdir (coreutils) '* | \
7011              'mkdir (fileutils) '4.1*)
7012                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
7013                break 3;;
7014            esac
7015          done
7016        done
7017   done
7018 IFS=$as_save_IFS
7019
7020 fi
7021
7022   test -d ./--version && rmdir ./--version
7023   if test "${ac_cv_path_mkdir+set}" = set; then
7024     MKDIR_P="$ac_cv_path_mkdir -p"
7025   else
7026     # As a last resort, use the slow shell script.  Don't cache a
7027     # value for MKDIR_P within a source directory, because that will
7028     # break other packages using the cache if that directory is
7029     # removed, or if the value is a relative name.
7030     MKDIR_P="$ac_install_sh -d"
7031   fi
7032 fi
7033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
7034 $as_echo "$MKDIR_P" >&6; }
7035
7036 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
7037 # a relative path to it in each makefile where it subsitutes it. This clashes
7038 # with our Makefile.global concept. This workaround helps.
7039 case $MKDIR_P in
7040   *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
7041 esac
7042
7043 # Let the user override the search
7044 if test -z "$BISON"; then
7045   for ac_prog in bison
7046 do
7047   # Extract the first word of "$ac_prog", so it can be a program name with args.
7048 set dummy $ac_prog; ac_word=$2
7049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7050 $as_echo_n "checking for $ac_word... " >&6; }
7051 if ${ac_cv_path_BISON+:} false; then :
7052   $as_echo_n "(cached) " >&6
7053 else
7054   case $BISON in
7055   [\\/]* | ?:[\\/]*)
7056   ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
7057   ;;
7058   *)
7059   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7060 for as_dir in $PATH
7061 do
7062   IFS=$as_save_IFS
7063   test -z "$as_dir" && as_dir=.
7064     for ac_exec_ext in '' $ac_executable_extensions; do
7065   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7066     ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
7067     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7068     break 2
7069   fi
7070 done
7071   done
7072 IFS=$as_save_IFS
7073
7074   ;;
7075 esac
7076 fi
7077 BISON=$ac_cv_path_BISON
7078 if test -n "$BISON"; then
7079   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
7080 $as_echo "$BISON" >&6; }
7081 else
7082   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7083 $as_echo "no" >&6; }
7084 fi
7085
7086
7087   test -n "$BISON" && break
7088 done
7089
7090 fi
7091
7092 if test "$BISON"; then
7093   pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
7094   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
7095 $as_echo "$as_me: using $pgac_bison_version" >&6;}
7096   if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
7097   then
7098     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7099 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
7100 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
7101 $as_echo "$as_me: WARNING:
7102 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
7103 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
7104     BISON=""
7105   fi
7106   # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
7107   # of the now preferred %name-prefix "base_yy", but the latter
7108   # doesn't work with Bison 2.3 or less.  So for now we silence the
7109   # deprecation warnings.
7110   if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
7111   then
7112     BISONFLAGS="$BISONFLAGS -Wno-deprecated"
7113   fi
7114 fi
7115
7116 if test -z "$BISON"; then
7117   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7118 *** Without Bison you will not be able to build PostgreSQL from Git nor
7119 *** change any of the parser definition files.  You can obtain Bison from
7120 *** a GNU mirror site.  (If you are using the official distribution of
7121 *** PostgreSQL then you do not need to worry about this, because the Bison
7122 *** output is pre-generated.)" >&5
7123 $as_echo "$as_me: WARNING:
7124 *** Without Bison you will not be able to build PostgreSQL from Git nor
7125 *** change any of the parser definition files.  You can obtain Bison from
7126 *** a GNU mirror site.  (If you are using the official distribution of
7127 *** PostgreSQL then you do not need to worry about this, because the Bison
7128 *** output is pre-generated.)" >&2;}
7129 fi
7130 # We don't need AC_SUBST(BISON) because AC_PATH_PROG did it
7131
7132
7133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
7134 $as_echo_n "checking for flex... " >&6; }
7135 if ${pgac_cv_path_flex+:} false; then :
7136   $as_echo_n "(cached) " >&6
7137 else
7138   # Let the user override the test
7139 if test -n "$FLEX"; then
7140   pgac_cv_path_flex=$FLEX
7141 else
7142   pgac_save_IFS=$IFS
7143   IFS=$PATH_SEPARATOR
7144   for pgac_dir in $PATH; do
7145     IFS=$pgac_save_IFS
7146     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
7147       pgac_dir=`pwd`
7148     fi
7149     for pgac_prog in flex lex; do
7150       pgac_candidate="$pgac_dir/$pgac_prog"
7151       if test -f "$pgac_candidate" \
7152         && $pgac_candidate --version </dev/null >/dev/null 2>&1
7153       then
7154         echo '%%'  > conftest.l
7155         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
7156           pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
7157           if echo "$pgac_flex_version" | sed 's/[.a-z]/ /g' | $AWK '{ if ($1 = 2 && $2 = 5 && $3 >= 31) exit 0; else exit 1;}'
7158           then
7159             pgac_cv_path_flex=$pgac_candidate
7160             break 2
7161           else
7162             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7163 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
7164 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
7165 $as_echo "$as_me: WARNING:
7166 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
7167 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
7168           fi
7169         fi
7170       fi
7171     done
7172   done
7173   rm -f conftest.l lex.yy.c
7174   : ${pgac_cv_path_flex=no}
7175 fi
7176
7177 fi
7178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
7179 $as_echo "$pgac_cv_path_flex" >&6; }
7180 if test x"$pgac_cv_path_flex" = x"no"; then
7181   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7182 *** Without Flex you will not be able to build PostgreSQL from Git nor
7183 *** change any of the scanner definition files.  You can obtain Flex from
7184 *** a GNU mirror site.  (If you are using the official distribution of
7185 *** PostgreSQL then you do not need to worry about this because the Flex
7186 *** output is pre-generated.)" >&5
7187 $as_echo "$as_me: WARNING:
7188 *** Without Flex you will not be able to build PostgreSQL from Git nor
7189 *** change any of the scanner definition files.  You can obtain Flex from
7190 *** a GNU mirror site.  (If you are using the official distribution of
7191 *** PostgreSQL then you do not need to worry about this because the Flex
7192 *** output is pre-generated.)" >&2;}
7193
7194   FLEX=
7195 else
7196   FLEX=$pgac_cv_path_flex
7197   pgac_flex_version=`$FLEX --version 2>/dev/null`
7198   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
7199 $as_echo "$as_me: using $pgac_flex_version" >&6;}
7200 fi
7201
7202
7203
7204
7205
7206 # Let the user override the search
7207 if test -z "$PERL"; then
7208   # Extract the first word of "perl", so it can be a program name with args.
7209 set dummy perl; ac_word=$2
7210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7211 $as_echo_n "checking for $ac_word... " >&6; }
7212 if ${ac_cv_path_PERL+:} false; then :
7213   $as_echo_n "(cached) " >&6
7214 else
7215   case $PERL in
7216   [\\/]* | ?:[\\/]*)
7217   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
7218   ;;
7219   *)
7220   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7221 for as_dir in $PATH
7222 do
7223   IFS=$as_save_IFS
7224   test -z "$as_dir" && as_dir=.
7225     for ac_exec_ext in '' $ac_executable_extensions; do
7226   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7227     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
7228     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7229     break 2
7230   fi
7231 done
7232   done
7233 IFS=$as_save_IFS
7234
7235   ;;
7236 esac
7237 fi
7238 PERL=$ac_cv_path_PERL
7239 if test -n "$PERL"; then
7240   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
7241 $as_echo "$PERL" >&6; }
7242 else
7243   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7244 $as_echo "no" >&6; }
7245 fi
7246
7247
7248 fi
7249
7250 if test "$PERL"; then
7251   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'`
7252   { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
7253 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
7254   if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
7255     $AWK '{ if ($1 = 5 && $2 >= 8) exit 1; else exit 0;}'
7256   then
7257     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7258 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7259 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
7260 $as_echo "$as_me: WARNING:
7261 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7262 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
7263     PERL=""
7264   fi
7265 fi
7266
7267 if test -z "$PERL"; then
7268   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7269 *** Without Perl you will not be able to build PostgreSQL from Git.
7270 *** You can obtain Perl from any CPAN mirror site.
7271 *** (If you are using the official distribution of PostgreSQL then you do not
7272 *** need to worry about this, because the Perl output is pre-generated.)" >&5
7273 $as_echo "$as_me: WARNING:
7274 *** Without Perl you will not be able to build PostgreSQL from Git.
7275 *** You can obtain Perl from any CPAN mirror site.
7276 *** (If you are using the official distribution of PostgreSQL then you do not
7277 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
7278 fi
7279
7280 if test "$with_perl" = yes; then
7281   if test -z "$PERL"; then
7282     as_fn_error $? "Perl not found" "$LINENO" 5
7283   fi
7284
7285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
7286 $as_echo_n "checking for Perl archlibexp... " >&6; }
7287 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
7288 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
7289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
7290 $as_echo "$perl_archlibexp" >&6; }
7291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
7292 $as_echo_n "checking for Perl privlibexp... " >&6; }
7293 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
7294 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
7295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
7296 $as_echo "$perl_privlibexp" >&6; }
7297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
7298 $as_echo_n "checking for Perl useshrplib... " >&6; }
7299 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
7300 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
7301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
7302 $as_echo "$perl_useshrplib" >&6; }
7303
7304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
7305 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
7306 if test "$PORTNAME" = "win32" ; then
7307 perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
7308 test -e "$perl_archlibexp/CORE/$perl_lib.lib" && perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
7309 else
7310 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
7311 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
7312 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
7313 fi
7314 if test -z "$perl_embed_ldflags" ; then
7315         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7316 $as_echo "no" >&6; }
7317         as_fn_error $? "could not determine flags for linking embedded Perl.
7318 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
7319 installed." "$LINENO" 5
7320 else
7321         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
7322 $as_echo "$perl_embed_ldflags" >&6; }
7323 fi
7324
7325 fi
7326
7327 if test "$with_python" = yes; then
7328   # Extract the first word of "python", so it can be a program name with args.
7329 set dummy python; ac_word=$2
7330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7331 $as_echo_n "checking for $ac_word... " >&6; }
7332 if ${ac_cv_path_PYTHON+:} false; then :
7333   $as_echo_n "(cached) " >&6
7334 else
7335   case $PYTHON in
7336   [\\/]* | ?:[\\/]*)
7337   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
7338   ;;
7339   *)
7340   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7341 for as_dir in $PATH
7342 do
7343   IFS=$as_save_IFS
7344   test -z "$as_dir" && as_dir=.
7345     for ac_exec_ext in '' $ac_executable_extensions; do
7346   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7347     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
7348     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7349     break 2
7350   fi
7351 done
7352   done
7353 IFS=$as_save_IFS
7354
7355   ;;
7356 esac
7357 fi
7358 PYTHON=$ac_cv_path_PYTHON
7359 if test -n "$PYTHON"; then
7360   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
7361 $as_echo "$PYTHON" >&6; }
7362 else
7363   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7364 $as_echo "no" >&6; }
7365 fi
7366
7367
7368 if test x"$PYTHON" = x""; then
7369   as_fn_error $? "Python not found" "$LINENO" 5
7370 fi
7371
7372
7373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python distutils module" >&5
7374 $as_echo_n "checking for Python distutils module... " >&6; }
7375 if "${PYTHON}" -c 'import distutils' 2>&5
7376 then
7377     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7378 $as_echo "yes" >&6; }
7379 else
7380     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7381 $as_echo "no" >&6; }
7382     as_fn_error $? "distutils module not found" "$LINENO" 5
7383 fi
7384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
7385 $as_echo_n "checking Python configuration directory... " >&6; }
7386 python_majorversion=`${PYTHON} -c "import sys; print(sys.version[0])"`
7387 python_version=`${PYTHON} -c "import sys; print(sys.version[:3])"`
7388 python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
7389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
7390 $as_echo "$python_configdir" >&6; }
7391
7392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directories" >&5
7393 $as_echo_n "checking Python include directories... " >&6; }
7394 python_includespec=`${PYTHON} -c "
7395 import distutils.sysconfig
7396 a = '-I' + distutils.sysconfig.get_python_inc(False)
7397 b = '-I' + distutils.sysconfig.get_python_inc(True)
7398 if a == b:
7399     print(a)
7400 else:
7401     print(a + ' ' + b)"`
7402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
7403 $as_echo "$python_includespec" >&6; }
7404
7405
7406
7407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
7408 $as_echo_n "checking how to link an embedded Python application... " >&6; }
7409
7410 python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
7411 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
7412 python_so=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('SO'))))"`
7413 ldlibrary=`echo "${python_ldlibrary}" | sed "s/${python_so}$//"`
7414 python_enable_shared=`${PYTHON} -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_vars().get('Py_ENABLE_SHARED',0))"`
7415
7416 if test x"${python_libdir}" != x"" -a x"${python_ldlibrary}" != x"" -a x"${python_ldlibrary}" != x"${ldlibrary}"
7417 then
7418         # New way: use the official shared library
7419         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
7420         python_libspec="-L${python_libdir} -l${ldlibrary}"
7421 else
7422         # Old way: use libpython from python_configdir
7423         python_libdir="${python_configdir}"
7424         # LDVERSION was introduced in Python 3.2.
7425         python_ldversion=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDVERSION'))))"`
7426         if test x"${python_ldversion}" = x""; then
7427                 python_ldversion=$python_version
7428         fi
7429         python_libspec="-L${python_libdir} -lpython${python_ldversion}"
7430 fi
7431
7432 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
7433
7434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
7435 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
7436
7437
7438 # threaded python is not supported on OpenBSD
7439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Python is compiled with thread support" >&5
7440 $as_echo_n "checking whether Python is compiled with thread support... " >&6; }
7441 pythreads=`${PYTHON} -c "import sys; print(int('thread' in sys.builtin_module_names))"`
7442 if test "$pythreads" = "1"; then
7443   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7444 $as_echo "yes" >&6; }
7445   case $host_os in
7446   openbsd*)
7447     as_fn_error $? "threaded Python not supported on this platform" "$LINENO" 5
7448     ;;
7449   esac
7450 else
7451   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7452 $as_echo "no" >&6; }
7453 fi
7454
7455
7456 fi
7457
7458 if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
7459   # Extract the first word of "zic", so it can be a program name with args.
7460 set dummy zic; ac_word=$2
7461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7462 $as_echo_n "checking for $ac_word... " >&6; }
7463 if ${ac_cv_path_ZIC+:} false; then :
7464   $as_echo_n "(cached) " >&6
7465 else
7466   case $ZIC in
7467   [\\/]* | ?:[\\/]*)
7468   ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
7469   ;;
7470   *)
7471   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7472 for as_dir in $PATH
7473 do
7474   IFS=$as_save_IFS
7475   test -z "$as_dir" && as_dir=.
7476     for ac_exec_ext in '' $ac_executable_extensions; do
7477   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7478     ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
7479     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7480     break 2
7481   fi
7482 done
7483   done
7484 IFS=$as_save_IFS
7485
7486   ;;
7487 esac
7488 fi
7489 ZIC=$ac_cv_path_ZIC
7490 if test -n "$ZIC"; then
7491   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
7492 $as_echo "$ZIC" >&6; }
7493 else
7494   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7495 $as_echo "no" >&6; }
7496 fi
7497
7498
7499   if test -z "$ZIC"; then
7500     as_fn_error $? "
7501 When cross-compiling, either use the option --with-system-tzdata to use
7502 existing time-zone data, or set the environment variable ZIC to a zic
7503 program to use during the build." "$LINENO" 5
7504   fi
7505 fi
7506
7507
7508 ##
7509 ## Libraries
7510 ##
7511 ## Most libraries are included only if they demonstrably provide a function
7512 ## we need, but libm is an exception: always include it, because there are
7513 ## too many compilers that play cute optimization games that will break
7514 ## probes for standard functions such as pow().
7515 ##
7516
7517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
7518 $as_echo_n "checking for main in -lm... " >&6; }
7519 if ${ac_cv_lib_m_main+:} false; then :
7520   $as_echo_n "(cached) " >&6
7521 else
7522   ac_check_lib_save_LIBS=$LIBS
7523 LIBS="-lm  $LIBS"
7524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7525 /* end confdefs.h.  */
7526
7527
7528 int
7529 main ()
7530 {
7531 return main ();
7532   ;
7533   return 0;
7534 }
7535 _ACEOF
7536 if ac_fn_c_try_link "$LINENO"; then :
7537   ac_cv_lib_m_main=yes
7538 else
7539   ac_cv_lib_m_main=no
7540 fi
7541 rm -f core conftest.err conftest.$ac_objext \
7542     conftest$ac_exeext conftest.$ac_ext
7543 LIBS=$ac_check_lib_save_LIBS
7544 fi
7545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
7546 $as_echo "$ac_cv_lib_m_main" >&6; }
7547 if test "x$ac_cv_lib_m_main" = xyes; then :
7548   cat >>confdefs.h <<_ACEOF
7549 #define HAVE_LIBM 1
7550 _ACEOF
7551
7552   LIBS="-lm $LIBS"
7553
7554 fi
7555
7556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
7557 $as_echo_n "checking for library containing setproctitle... " >&6; }
7558 if ${ac_cv_search_setproctitle+:} false; then :
7559   $as_echo_n "(cached) " >&6
7560 else
7561   ac_func_search_save_LIBS=$LIBS
7562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7563 /* end confdefs.h.  */
7564
7565 /* Override any GCC internal prototype to avoid an error.
7566    Use char because int might match the return type of a GCC
7567    builtin and then its argument prototype would still apply.  */
7568 #ifdef __cplusplus
7569 extern "C"
7570 #endif
7571 char setproctitle ();
7572 int
7573 main ()
7574 {
7575 return setproctitle ();
7576   ;
7577   return 0;
7578 }
7579 _ACEOF
7580 for ac_lib in '' util; do
7581   if test -z "$ac_lib"; then
7582     ac_res="none required"
7583   else
7584     ac_res=-l$ac_lib
7585     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7586   fi
7587   if ac_fn_c_try_link "$LINENO"; then :
7588   ac_cv_search_setproctitle=$ac_res
7589 fi
7590 rm -f core conftest.err conftest.$ac_objext \
7591     conftest$ac_exeext
7592   if ${ac_cv_search_setproctitle+:} false; then :
7593   break
7594 fi
7595 done
7596 if ${ac_cv_search_setproctitle+:} false; then :
7597
7598 else
7599   ac_cv_search_setproctitle=no
7600 fi
7601 rm conftest.$ac_ext
7602 LIBS=$ac_func_search_save_LIBS
7603 fi
7604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
7605 $as_echo "$ac_cv_search_setproctitle" >&6; }
7606 ac_res=$ac_cv_search_setproctitle
7607 if test "$ac_res" != no; then :
7608   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7609
7610 fi
7611
7612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
7613 $as_echo_n "checking for library containing dlopen... " >&6; }
7614 if ${ac_cv_search_dlopen+:} false; then :
7615   $as_echo_n "(cached) " >&6
7616 else
7617   ac_func_search_save_LIBS=$LIBS
7618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7619 /* end confdefs.h.  */
7620
7621 /* Override any GCC internal prototype to avoid an error.
7622    Use char because int might match the return type of a GCC
7623    builtin and then its argument prototype would still apply.  */
7624 #ifdef __cplusplus
7625 extern "C"
7626 #endif
7627 char dlopen ();
7628 int
7629 main ()
7630 {
7631 return dlopen ();
7632   ;
7633   return 0;
7634 }
7635 _ACEOF
7636 for ac_lib in '' dl; do
7637   if test -z "$ac_lib"; then
7638     ac_res="none required"
7639   else
7640     ac_res=-l$ac_lib
7641     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7642   fi
7643   if ac_fn_c_try_link "$LINENO"; then :
7644   ac_cv_search_dlopen=$ac_res
7645 fi
7646 rm -f core conftest.err conftest.$ac_objext \
7647     conftest$ac_exeext
7648   if ${ac_cv_search_dlopen+:} false; then :
7649   break
7650 fi
7651 done
7652 if ${ac_cv_search_dlopen+:} false; then :
7653
7654 else
7655   ac_cv_search_dlopen=no
7656 fi
7657 rm conftest.$ac_ext
7658 LIBS=$ac_func_search_save_LIBS
7659 fi
7660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
7661 $as_echo "$ac_cv_search_dlopen" >&6; }
7662 ac_res=$ac_cv_search_dlopen
7663 if test "$ac_res" != no; then :
7664   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7665
7666 fi
7667
7668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
7669 $as_echo_n "checking for library containing socket... " >&6; }
7670 if ${ac_cv_search_socket+:} false; then :
7671   $as_echo_n "(cached) " >&6
7672 else
7673   ac_func_search_save_LIBS=$LIBS
7674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7675 /* end confdefs.h.  */
7676
7677 /* Override any GCC internal prototype to avoid an error.
7678    Use char because int might match the return type of a GCC
7679    builtin and then its argument prototype would still apply.  */
7680 #ifdef __cplusplus
7681 extern "C"
7682 #endif
7683 char socket ();
7684 int
7685 main ()
7686 {
7687 return socket ();
7688   ;
7689   return 0;
7690 }
7691 _ACEOF
7692 for ac_lib in '' socket ws2_32; do
7693   if test -z "$ac_lib"; then
7694     ac_res="none required"
7695   else
7696     ac_res=-l$ac_lib
7697     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7698   fi
7699   if ac_fn_c_try_link "$LINENO"; then :
7700   ac_cv_search_socket=$ac_res
7701 fi
7702 rm -f core conftest.err conftest.$ac_objext \
7703     conftest$ac_exeext
7704   if ${ac_cv_search_socket+:} false; then :
7705   break
7706 fi
7707 done
7708 if ${ac_cv_search_socket+:} false; then :
7709
7710 else
7711   ac_cv_search_socket=no
7712 fi
7713 rm conftest.$ac_ext
7714 LIBS=$ac_func_search_save_LIBS
7715 fi
7716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
7717 $as_echo "$ac_cv_search_socket" >&6; }
7718 ac_res=$ac_cv_search_socket
7719 if test "$ac_res" != no; then :
7720   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7721
7722 fi
7723
7724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
7725 $as_echo_n "checking for library containing shl_load... " >&6; }
7726 if ${ac_cv_search_shl_load+:} false; then :
7727   $as_echo_n "(cached) " >&6
7728 else
7729   ac_func_search_save_LIBS=$LIBS
7730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7731 /* end confdefs.h.  */
7732
7733 /* Override any GCC internal prototype to avoid an error.
7734    Use char because int might match the return type of a GCC
7735    builtin and then its argument prototype would still apply.  */
7736 #ifdef __cplusplus
7737 extern "C"
7738 #endif
7739 char shl_load ();
7740 int
7741 main ()
7742 {
7743 return shl_load ();
7744   ;
7745   return 0;
7746 }
7747 _ACEOF
7748 for ac_lib in '' dld; do
7749   if test -z "$ac_lib"; then
7750     ac_res="none required"
7751   else
7752     ac_res=-l$ac_lib
7753     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7754   fi
7755   if ac_fn_c_try_link "$LINENO"; then :
7756   ac_cv_search_shl_load=$ac_res
7757 fi
7758 rm -f core conftest.err conftest.$ac_objext \
7759     conftest$ac_exeext
7760   if ${ac_cv_search_shl_load+:} false; then :
7761   break
7762 fi
7763 done
7764 if ${ac_cv_search_shl_load+:} false; then :
7765
7766 else
7767   ac_cv_search_shl_load=no
7768 fi
7769 rm conftest.$ac_ext
7770 LIBS=$ac_func_search_save_LIBS
7771 fi
7772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
7773 $as_echo "$ac_cv_search_shl_load" >&6; }
7774 ac_res=$ac_cv_search_shl_load
7775 if test "$ac_res" != no; then :
7776   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7777
7778 fi
7779
7780 # We only use libld in port/dynloader/aix.c
7781 case $host_os in
7782      aix*)
7783         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ldopen" >&5
7784 $as_echo_n "checking for library containing ldopen... " >&6; }
7785 if ${ac_cv_search_ldopen+:} false; then :
7786   $as_echo_n "(cached) " >&6
7787 else
7788   ac_func_search_save_LIBS=$LIBS
7789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7790 /* end confdefs.h.  */
7791
7792 /* Override any GCC internal prototype to avoid an error.
7793    Use char because int might match the return type of a GCC
7794    builtin and then its argument prototype would still apply.  */
7795 #ifdef __cplusplus
7796 extern "C"
7797 #endif
7798 char ldopen ();
7799 int
7800 main ()
7801 {
7802 return ldopen ();
7803   ;
7804   return 0;
7805 }
7806 _ACEOF
7807 for ac_lib in '' ld; do
7808   if test -z "$ac_lib"; then
7809     ac_res="none required"
7810   else
7811     ac_res=-l$ac_lib
7812     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7813   fi
7814   if ac_fn_c_try_link "$LINENO"; then :
7815   ac_cv_search_ldopen=$ac_res
7816 fi
7817 rm -f core conftest.err conftest.$ac_objext \
7818     conftest$ac_exeext
7819   if ${ac_cv_search_ldopen+:} false; then :
7820   break
7821 fi
7822 done
7823 if ${ac_cv_search_ldopen+:} false; then :
7824
7825 else
7826   ac_cv_search_ldopen=no
7827 fi
7828 rm conftest.$ac_ext
7829 LIBS=$ac_func_search_save_LIBS
7830 fi
7831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ldopen" >&5
7832 $as_echo "$ac_cv_search_ldopen" >&6; }
7833 ac_res=$ac_cv_search_ldopen
7834 if test "$ac_res" != no; then :
7835   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7836
7837 fi
7838
7839         ;;
7840 esac
7841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
7842 $as_echo_n "checking for library containing getopt_long... " >&6; }
7843 if ${ac_cv_search_getopt_long+:} false; then :
7844   $as_echo_n "(cached) " >&6
7845 else
7846   ac_func_search_save_LIBS=$LIBS
7847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7848 /* end confdefs.h.  */
7849
7850 /* Override any GCC internal prototype to avoid an error.
7851    Use char because int might match the return type of a GCC
7852    builtin and then its argument prototype would still apply.  */
7853 #ifdef __cplusplus
7854 extern "C"
7855 #endif
7856 char getopt_long ();
7857 int
7858 main ()
7859 {
7860 return getopt_long ();
7861   ;
7862   return 0;
7863 }
7864 _ACEOF
7865 for ac_lib in '' getopt gnugetopt; do
7866   if test -z "$ac_lib"; then
7867     ac_res="none required"
7868   else
7869     ac_res=-l$ac_lib
7870     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7871   fi
7872   if ac_fn_c_try_link "$LINENO"; then :
7873   ac_cv_search_getopt_long=$ac_res
7874 fi
7875 rm -f core conftest.err conftest.$ac_objext \
7876     conftest$ac_exeext
7877   if ${ac_cv_search_getopt_long+:} false; then :
7878   break
7879 fi
7880 done
7881 if ${ac_cv_search_getopt_long+:} false; then :
7882
7883 else
7884   ac_cv_search_getopt_long=no
7885 fi
7886 rm conftest.$ac_ext
7887 LIBS=$ac_func_search_save_LIBS
7888 fi
7889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
7890 $as_echo "$ac_cv_search_getopt_long" >&6; }
7891 ac_res=$ac_cv_search_getopt_long
7892 if test "$ac_res" != no; then :
7893   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7894
7895 fi
7896
7897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
7898 $as_echo_n "checking for library containing crypt... " >&6; }
7899 if ${ac_cv_search_crypt+:} false; then :
7900   $as_echo_n "(cached) " >&6
7901 else
7902   ac_func_search_save_LIBS=$LIBS
7903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7904 /* end confdefs.h.  */
7905
7906 /* Override any GCC internal prototype to avoid an error.
7907    Use char because int might match the return type of a GCC
7908    builtin and then its argument prototype would still apply.  */
7909 #ifdef __cplusplus
7910 extern "C"
7911 #endif
7912 char crypt ();
7913 int
7914 main ()
7915 {
7916 return crypt ();
7917   ;
7918   return 0;
7919 }
7920 _ACEOF
7921 for ac_lib in '' crypt; do
7922   if test -z "$ac_lib"; then
7923     ac_res="none required"
7924   else
7925     ac_res=-l$ac_lib
7926     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7927   fi
7928   if ac_fn_c_try_link "$LINENO"; then :
7929   ac_cv_search_crypt=$ac_res
7930 fi
7931 rm -f core conftest.err conftest.$ac_objext \
7932     conftest$ac_exeext
7933   if ${ac_cv_search_crypt+:} false; then :
7934   break
7935 fi
7936 done
7937 if ${ac_cv_search_crypt+:} false; then :
7938
7939 else
7940   ac_cv_search_crypt=no
7941 fi
7942 rm conftest.$ac_ext
7943 LIBS=$ac_func_search_save_LIBS
7944 fi
7945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
7946 $as_echo "$ac_cv_search_crypt" >&6; }
7947 ac_res=$ac_cv_search_crypt
7948 if test "$ac_res" != no; then :
7949   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7950
7951 fi
7952
7953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
7954 $as_echo_n "checking for library containing shm_open... " >&6; }
7955 if ${ac_cv_search_shm_open+:} false; then :
7956   $as_echo_n "(cached) " >&6
7957 else
7958   ac_func_search_save_LIBS=$LIBS
7959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7960 /* end confdefs.h.  */
7961
7962 /* Override any GCC internal prototype to avoid an error.
7963    Use char because int might match the return type of a GCC
7964    builtin and then its argument prototype would still apply.  */
7965 #ifdef __cplusplus
7966 extern "C"
7967 #endif
7968 char shm_open ();
7969 int
7970 main ()
7971 {
7972 return shm_open ();
7973   ;
7974   return 0;
7975 }
7976 _ACEOF
7977 for ac_lib in '' rt; do
7978   if test -z "$ac_lib"; then
7979     ac_res="none required"
7980   else
7981     ac_res=-l$ac_lib
7982     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7983   fi
7984   if ac_fn_c_try_link "$LINENO"; then :
7985   ac_cv_search_shm_open=$ac_res
7986 fi
7987 rm -f core conftest.err conftest.$ac_objext \
7988     conftest$ac_exeext
7989   if ${ac_cv_search_shm_open+:} false; then :
7990   break
7991 fi
7992 done
7993 if ${ac_cv_search_shm_open+:} false; then :
7994
7995 else
7996   ac_cv_search_shm_open=no
7997 fi
7998 rm conftest.$ac_ext
7999 LIBS=$ac_func_search_save_LIBS
8000 fi
8001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
8002 $as_echo "$ac_cv_search_shm_open" >&6; }
8003 ac_res=$ac_cv_search_shm_open
8004 if test "$ac_res" != no; then :
8005   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8006
8007 fi
8008
8009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
8010 $as_echo_n "checking for library containing shm_unlink... " >&6; }
8011 if ${ac_cv_search_shm_unlink+:} false; then :
8012   $as_echo_n "(cached) " >&6
8013 else
8014   ac_func_search_save_LIBS=$LIBS
8015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8016 /* end confdefs.h.  */
8017
8018 /* Override any GCC internal prototype to avoid an error.
8019    Use char because int might match the return type of a GCC
8020    builtin and then its argument prototype would still apply.  */
8021 #ifdef __cplusplus
8022 extern "C"
8023 #endif
8024 char shm_unlink ();
8025 int
8026 main ()
8027 {
8028 return shm_unlink ();
8029   ;
8030   return 0;
8031 }
8032 _ACEOF
8033 for ac_lib in '' rt; do
8034   if test -z "$ac_lib"; then
8035     ac_res="none required"
8036   else
8037     ac_res=-l$ac_lib
8038     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8039   fi
8040   if ac_fn_c_try_link "$LINENO"; then :
8041   ac_cv_search_shm_unlink=$ac_res
8042 fi
8043 rm -f core conftest.err conftest.$ac_objext \
8044     conftest$ac_exeext
8045   if ${ac_cv_search_shm_unlink+:} false; then :
8046   break
8047 fi
8048 done
8049 if ${ac_cv_search_shm_unlink+:} false; then :
8050
8051 else
8052   ac_cv_search_shm_unlink=no
8053 fi
8054 rm conftest.$ac_ext
8055 LIBS=$ac_func_search_save_LIBS
8056 fi
8057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
8058 $as_echo "$ac_cv_search_shm_unlink" >&6; }
8059 ac_res=$ac_cv_search_shm_unlink
8060 if test "$ac_res" != no; then :
8061   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8062
8063 fi
8064
8065 # Solaris:
8066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
8067 $as_echo_n "checking for library containing fdatasync... " >&6; }
8068 if ${ac_cv_search_fdatasync+:} false; then :
8069   $as_echo_n "(cached) " >&6
8070 else
8071   ac_func_search_save_LIBS=$LIBS
8072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8073 /* end confdefs.h.  */
8074
8075 /* Override any GCC internal prototype to avoid an error.
8076    Use char because int might match the return type of a GCC
8077    builtin and then its argument prototype would still apply.  */
8078 #ifdef __cplusplus
8079 extern "C"
8080 #endif
8081 char fdatasync ();
8082 int
8083 main ()
8084 {
8085 return fdatasync ();
8086   ;
8087   return 0;
8088 }
8089 _ACEOF
8090 for ac_lib in '' rt posix4; do
8091   if test -z "$ac_lib"; then
8092     ac_res="none required"
8093   else
8094     ac_res=-l$ac_lib
8095     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8096   fi
8097   if ac_fn_c_try_link "$LINENO"; then :
8098   ac_cv_search_fdatasync=$ac_res
8099 fi
8100 rm -f core conftest.err conftest.$ac_objext \
8101     conftest$ac_exeext
8102   if ${ac_cv_search_fdatasync+:} false; then :
8103   break
8104 fi
8105 done
8106 if ${ac_cv_search_fdatasync+:} false; then :
8107
8108 else
8109   ac_cv_search_fdatasync=no
8110 fi
8111 rm conftest.$ac_ext
8112 LIBS=$ac_func_search_save_LIBS
8113 fi
8114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
8115 $as_echo "$ac_cv_search_fdatasync" >&6; }
8116 ac_res=$ac_cv_search_fdatasync
8117 if test "$ac_res" != no; then :
8118   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8119
8120 fi
8121
8122 # Required for thread_test.c on Solaris 2.5:
8123 # Other ports use it too (HP-UX) so test unconditionally
8124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
8125 $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
8126 if ${ac_cv_search_gethostbyname_r+:} false; then :
8127   $as_echo_n "(cached) " >&6
8128 else
8129   ac_func_search_save_LIBS=$LIBS
8130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8131 /* end confdefs.h.  */
8132
8133 /* Override any GCC internal prototype to avoid an error.
8134    Use char because int might match the return type of a GCC
8135    builtin and then its argument prototype would still apply.  */
8136 #ifdef __cplusplus
8137 extern "C"
8138 #endif
8139 char gethostbyname_r ();
8140 int
8141 main ()
8142 {
8143 return gethostbyname_r ();
8144   ;
8145   return 0;
8146 }
8147 _ACEOF
8148 for ac_lib in '' nsl; do
8149   if test -z "$ac_lib"; then
8150     ac_res="none required"
8151   else
8152     ac_res=-l$ac_lib
8153     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8154   fi
8155   if ac_fn_c_try_link "$LINENO"; then :
8156   ac_cv_search_gethostbyname_r=$ac_res
8157 fi
8158 rm -f core conftest.err conftest.$ac_objext \
8159     conftest$ac_exeext
8160   if ${ac_cv_search_gethostbyname_r+:} false; then :
8161   break
8162 fi
8163 done
8164 if ${ac_cv_search_gethostbyname_r+:} false; then :
8165
8166 else
8167   ac_cv_search_gethostbyname_r=no
8168 fi
8169 rm conftest.$ac_ext
8170 LIBS=$ac_func_search_save_LIBS
8171 fi
8172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
8173 $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
8174 ac_res=$ac_cv_search_gethostbyname_r
8175 if test "$ac_res" != no; then :
8176   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8177
8178 fi
8179
8180 # Cygwin:
8181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
8182 $as_echo_n "checking for library containing shmget... " >&6; }
8183 if ${ac_cv_search_shmget+:} false; then :
8184   $as_echo_n "(cached) " >&6
8185 else
8186   ac_func_search_save_LIBS=$LIBS
8187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8188 /* end confdefs.h.  */
8189
8190 /* Override any GCC internal prototype to avoid an error.
8191    Use char because int might match the return type of a GCC
8192    builtin and then its argument prototype would still apply.  */
8193 #ifdef __cplusplus
8194 extern "C"
8195 #endif
8196 char shmget ();
8197 int
8198 main ()
8199 {
8200 return shmget ();
8201   ;
8202   return 0;
8203 }
8204 _ACEOF
8205 for ac_lib in '' cygipc; do
8206   if test -z "$ac_lib"; then
8207     ac_res="none required"
8208   else
8209     ac_res=-l$ac_lib
8210     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8211   fi
8212   if ac_fn_c_try_link "$LINENO"; then :
8213   ac_cv_search_shmget=$ac_res
8214 fi
8215 rm -f core conftest.err conftest.$ac_objext \
8216     conftest$ac_exeext
8217   if ${ac_cv_search_shmget+:} false; then :
8218   break
8219 fi
8220 done
8221 if ${ac_cv_search_shmget+:} false; then :
8222
8223 else
8224   ac_cv_search_shmget=no
8225 fi
8226 rm conftest.$ac_ext
8227 LIBS=$ac_func_search_save_LIBS
8228 fi
8229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
8230 $as_echo "$ac_cv_search_shmget" >&6; }
8231 ac_res=$ac_cv_search_shmget
8232 if test "$ac_res" != no; then :
8233   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8234
8235 fi
8236
8237
8238 if test "$with_readline" = yes; then
8239
8240
8241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
8242 $as_echo_n "checking for library containing readline... " >&6; }
8243 if ${pgac_cv_check_readline+:} false; then :
8244   $as_echo_n "(cached) " >&6
8245 else
8246   pgac_cv_check_readline=no
8247 pgac_save_LIBS=$LIBS
8248 if test x"$with_libedit_preferred" != x"yes"
8249 then    READLINE_ORDER="-lreadline -ledit"
8250 else    READLINE_ORDER="-ledit -lreadline"
8251 fi
8252 for pgac_rllib in $READLINE_ORDER ; do
8253   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
8254     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
8255     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8256 /* end confdefs.h.  */
8257
8258 /* Override any GCC internal prototype to avoid an error.
8259    Use char because int might match the return type of a GCC
8260    builtin and then its argument prototype would still apply.  */
8261 #ifdef __cplusplus
8262 extern "C"
8263 #endif
8264 char readline ();
8265 int
8266 main ()
8267 {
8268 return readline ();
8269   ;
8270   return 0;
8271 }
8272 _ACEOF
8273 if ac_fn_c_try_link "$LINENO"; then :
8274
8275       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
8276       # recognize dependent libraries; assume curses is needed if we didn't
8277       # find any dependency.
8278       case $host_os in
8279         netbsd* | openbsd* | irix*)
8280           if test x"$pgac_lib" = x"" ; then
8281             pgac_lib=" -lcurses"
8282           fi ;;
8283       esac
8284
8285       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
8286       break
8287
8288 fi
8289 rm -f core conftest.err conftest.$ac_objext \
8290     conftest$ac_exeext conftest.$ac_ext
8291   done
8292   if test "$pgac_cv_check_readline" != no ; then
8293     break
8294   fi
8295 done
8296 LIBS=$pgac_save_LIBS
8297
8298 fi
8299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
8300 $as_echo "$pgac_cv_check_readline" >&6; }
8301 if test "$pgac_cv_check_readline" != no ; then
8302   LIBS="$pgac_cv_check_readline $LIBS"
8303
8304 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
8305
8306 fi
8307
8308
8309   if test x"$pgac_cv_check_readline" = x"no"; then
8310     as_fn_error $? "readline library not found
8311 If you have readline already installed, see config.log for details on the
8312 failure.  It is possible the compiler isn't looking in the proper directory.
8313 Use --without-readline to disable readline support." "$LINENO" 5
8314   fi
8315 fi
8316
8317 if test "$with_zlib" = yes; then
8318   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
8319 $as_echo_n "checking for inflate in -lz... " >&6; }
8320 if ${ac_cv_lib_z_inflate+:} false; then :
8321   $as_echo_n "(cached) " >&6
8322 else
8323   ac_check_lib_save_LIBS=$LIBS
8324 LIBS="-lz  $LIBS"
8325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8326 /* end confdefs.h.  */
8327
8328 /* Override any GCC internal prototype to avoid an error.
8329    Use char because int might match the return type of a GCC
8330    builtin and then its argument prototype would still apply.  */
8331 #ifdef __cplusplus
8332 extern "C"
8333 #endif
8334 char inflate ();
8335 int
8336 main ()
8337 {
8338 return inflate ();
8339   ;
8340   return 0;
8341 }
8342 _ACEOF
8343 if ac_fn_c_try_link "$LINENO"; then :
8344   ac_cv_lib_z_inflate=yes
8345 else
8346   ac_cv_lib_z_inflate=no
8347 fi
8348 rm -f core conftest.err conftest.$ac_objext \
8349     conftest$ac_exeext conftest.$ac_ext
8350 LIBS=$ac_check_lib_save_LIBS
8351 fi
8352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
8353 $as_echo "$ac_cv_lib_z_inflate" >&6; }
8354 if test "x$ac_cv_lib_z_inflate" = xyes; then :
8355   cat >>confdefs.h <<_ACEOF
8356 #define HAVE_LIBZ 1
8357 _ACEOF
8358
8359   LIBS="-lz $LIBS"
8360
8361 else
8362   as_fn_error $? "zlib library not found
8363 If you have zlib already installed, see config.log for details on the
8364 failure.  It is possible the compiler isn't looking in the proper directory.
8365 Use --without-zlib to disable zlib support." "$LINENO" 5
8366 fi
8367
8368 fi
8369
8370 if test "$enable_spinlocks" = yes; then
8371
8372 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
8373
8374 else
8375   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
8376 *** Not using spinlocks will cause poor performance." >&5
8377 $as_echo "$as_me: WARNING:
8378 *** Not using spinlocks will cause poor performance." >&2;}
8379 fi
8380
8381 if test "$enable_atomics" = yes; then
8382
8383 $as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
8384
8385 else
8386   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
8387 *** Not using atomic operations will cause poor performance." >&5
8388 $as_echo "$as_me: WARNING:
8389 *** Not using atomic operations will cause poor performance." >&2;}
8390 fi
8391
8392 if test "$with_gssapi" = yes ; then
8393   if test "$PORTNAME" != "win32"; then
8394     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
8395 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
8396 if ${ac_cv_search_gss_init_sec_context+:} false; then :
8397   $as_echo_n "(cached) " >&6
8398 else
8399   ac_func_search_save_LIBS=$LIBS
8400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8401 /* end confdefs.h.  */
8402
8403 /* Override any GCC internal prototype to avoid an error.
8404    Use char because int might match the return type of a GCC
8405    builtin and then its argument prototype would still apply.  */
8406 #ifdef __cplusplus
8407 extern "C"
8408 #endif
8409 char gss_init_sec_context ();
8410 int
8411 main ()
8412 {
8413 return gss_init_sec_context ();
8414   ;
8415   return 0;
8416 }
8417 _ACEOF
8418 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
8419   if test -z "$ac_lib"; then
8420     ac_res="none required"
8421   else
8422     ac_res=-l$ac_lib
8423     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8424   fi
8425   if ac_fn_c_try_link "$LINENO"; then :
8426   ac_cv_search_gss_init_sec_context=$ac_res
8427 fi
8428 rm -f core conftest.err conftest.$ac_objext \
8429     conftest$ac_exeext
8430   if ${ac_cv_search_gss_init_sec_context+:} false; then :
8431   break
8432 fi
8433 done
8434 if ${ac_cv_search_gss_init_sec_context+:} false; then :
8435
8436 else
8437   ac_cv_search_gss_init_sec_context=no
8438 fi
8439 rm conftest.$ac_ext
8440 LIBS=$ac_func_search_save_LIBS
8441 fi
8442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
8443 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
8444 ac_res=$ac_cv_search_gss_init_sec_context
8445 if test "$ac_res" != no; then :
8446   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8447
8448 else
8449   as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
8450 fi
8451
8452   else
8453     LIBS="$LIBS -lgssapi32"
8454   fi
8455 fi
8456
8457 if test "$with_openssl" = yes ; then
8458     if test "$PORTNAME" != "win32"; then
8459      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
8460 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
8461 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
8462   $as_echo_n "(cached) " >&6
8463 else
8464   ac_check_lib_save_LIBS=$LIBS
8465 LIBS="-lcrypto  $LIBS"
8466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8467 /* end confdefs.h.  */
8468
8469 /* Override any GCC internal prototype to avoid an error.
8470    Use char because int might match the return type of a GCC
8471    builtin and then its argument prototype would still apply.  */
8472 #ifdef __cplusplus
8473 extern "C"
8474 #endif
8475 char CRYPTO_new_ex_data ();
8476 int
8477 main ()
8478 {
8479 return CRYPTO_new_ex_data ();
8480   ;
8481   return 0;
8482 }
8483 _ACEOF
8484 if ac_fn_c_try_link "$LINENO"; then :
8485   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
8486 else
8487   ac_cv_lib_crypto_CRYPTO_new_ex_data=no
8488 fi
8489 rm -f core conftest.err conftest.$ac_objext \
8490     conftest$ac_exeext conftest.$ac_ext
8491 LIBS=$ac_check_lib_save_LIBS
8492 fi
8493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
8494 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
8495 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
8496   cat >>confdefs.h <<_ACEOF
8497 #define HAVE_LIBCRYPTO 1
8498 _ACEOF
8499
8500   LIBS="-lcrypto $LIBS"
8501
8502 else
8503   as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
8504 fi
8505
8506      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5
8507 $as_echo_n "checking for SSL_library_init in -lssl... " >&6; }
8508 if ${ac_cv_lib_ssl_SSL_library_init+:} false; then :
8509   $as_echo_n "(cached) " >&6
8510 else
8511   ac_check_lib_save_LIBS=$LIBS
8512 LIBS="-lssl  $LIBS"
8513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8514 /* end confdefs.h.  */
8515
8516 /* Override any GCC internal prototype to avoid an error.
8517    Use char because int might match the return type of a GCC
8518    builtin and then its argument prototype would still apply.  */
8519 #ifdef __cplusplus
8520 extern "C"
8521 #endif
8522 char SSL_library_init ();
8523 int
8524 main ()
8525 {
8526 return SSL_library_init ();
8527   ;
8528   return 0;
8529 }
8530 _ACEOF
8531 if ac_fn_c_try_link "$LINENO"; then :
8532   ac_cv_lib_ssl_SSL_library_init=yes
8533 else
8534   ac_cv_lib_ssl_SSL_library_init=no
8535 fi
8536 rm -f core conftest.err conftest.$ac_objext \
8537     conftest$ac_exeext conftest.$ac_ext
8538 LIBS=$ac_check_lib_save_LIBS
8539 fi
8540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_library_init" >&5
8541 $as_echo "$ac_cv_lib_ssl_SSL_library_init" >&6; }
8542 if test "x$ac_cv_lib_ssl_SSL_library_init" = xyes; then :
8543   cat >>confdefs.h <<_ACEOF
8544 #define HAVE_LIBSSL 1
8545 _ACEOF
8546
8547   LIBS="-lssl $LIBS"
8548
8549 else
8550   as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
8551 fi
8552
8553   else
8554      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
8555 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
8556 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
8557   $as_echo_n "(cached) " >&6
8558 else
8559   ac_func_search_save_LIBS=$LIBS
8560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8561 /* end confdefs.h.  */
8562
8563 /* Override any GCC internal prototype to avoid an error.
8564    Use char because int might match the return type of a GCC
8565    builtin and then its argument prototype would still apply.  */
8566 #ifdef __cplusplus
8567 extern "C"
8568 #endif
8569 char CRYPTO_new_ex_data ();
8570 int
8571 main ()
8572 {
8573 return CRYPTO_new_ex_data ();
8574   ;
8575   return 0;
8576 }
8577 _ACEOF
8578 for ac_lib in '' eay32 crypto; do
8579   if test -z "$ac_lib"; then
8580     ac_res="none required"
8581   else
8582     ac_res=-l$ac_lib
8583     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8584   fi
8585   if ac_fn_c_try_link "$LINENO"; then :
8586   ac_cv_search_CRYPTO_new_ex_data=$ac_res
8587 fi
8588 rm -f core conftest.err conftest.$ac_objext \
8589     conftest$ac_exeext
8590   if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
8591   break
8592 fi
8593 done
8594 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
8595
8596 else
8597   ac_cv_search_CRYPTO_new_ex_data=no
8598 fi
8599 rm conftest.$ac_ext
8600 LIBS=$ac_func_search_save_LIBS
8601 fi
8602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
8603 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
8604 ac_res=$ac_cv_search_CRYPTO_new_ex_data
8605 if test "$ac_res" != no; then :
8606   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8607
8608 else
8609   as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
8610 fi
8611
8612      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_library_init" >&5
8613 $as_echo_n "checking for library containing SSL_library_init... " >&6; }
8614 if ${ac_cv_search_SSL_library_init+:} false; then :
8615   $as_echo_n "(cached) " >&6
8616 else
8617   ac_func_search_save_LIBS=$LIBS
8618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8619 /* end confdefs.h.  */
8620
8621 /* Override any GCC internal prototype to avoid an error.
8622    Use char because int might match the return type of a GCC
8623    builtin and then its argument prototype would still apply.  */
8624 #ifdef __cplusplus
8625 extern "C"
8626 #endif
8627 char SSL_library_init ();
8628 int
8629 main ()
8630 {
8631 return SSL_library_init ();
8632   ;
8633   return 0;
8634 }
8635 _ACEOF
8636 for ac_lib in '' ssleay32 ssl; do
8637   if test -z "$ac_lib"; then
8638     ac_res="none required"
8639   else
8640     ac_res=-l$ac_lib
8641     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8642   fi
8643   if ac_fn_c_try_link "$LINENO"; then :
8644   ac_cv_search_SSL_library_init=$ac_res
8645 fi
8646 rm -f core conftest.err conftest.$ac_objext \
8647     conftest$ac_exeext
8648   if ${ac_cv_search_SSL_library_init+:} false; then :
8649   break
8650 fi
8651 done
8652 if ${ac_cv_search_SSL_library_init+:} false; then :
8653
8654 else
8655   ac_cv_search_SSL_library_init=no
8656 fi
8657 rm conftest.$ac_ext
8658 LIBS=$ac_func_search_save_LIBS
8659 fi
8660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_library_init" >&5
8661 $as_echo "$ac_cv_search_SSL_library_init" >&6; }
8662 ac_res=$ac_cv_search_SSL_library_init
8663 if test "$ac_res" != no; then :
8664   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8665
8666 else
8667   as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
8668 fi
8669
8670   fi
8671   for ac_func in SSL_get_current_compression
8672 do :
8673   ac_fn_c_check_func "$LINENO" "SSL_get_current_compression" "ac_cv_func_SSL_get_current_compression"
8674 if test "x$ac_cv_func_SSL_get_current_compression" = xyes; then :
8675   cat >>confdefs.h <<_ACEOF
8676 #define HAVE_SSL_GET_CURRENT_COMPRESSION 1
8677 _ACEOF
8678
8679 fi
8680 done
8681
8682 fi
8683
8684 if test "$with_pam" = yes ; then
8685   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
8686 $as_echo_n "checking for pam_start in -lpam... " >&6; }
8687 if ${ac_cv_lib_pam_pam_start+:} false; then :
8688   $as_echo_n "(cached) " >&6
8689 else
8690   ac_check_lib_save_LIBS=$LIBS
8691 LIBS="-lpam  $LIBS"
8692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8693 /* end confdefs.h.  */
8694
8695 /* Override any GCC internal prototype to avoid an error.
8696    Use char because int might match the return type of a GCC
8697    builtin and then its argument prototype would still apply.  */
8698 #ifdef __cplusplus
8699 extern "C"
8700 #endif
8701 char pam_start ();
8702 int
8703 main ()
8704 {
8705 return pam_start ();
8706   ;
8707   return 0;
8708 }
8709 _ACEOF
8710 if ac_fn_c_try_link "$LINENO"; then :
8711   ac_cv_lib_pam_pam_start=yes
8712 else
8713   ac_cv_lib_pam_pam_start=no
8714 fi
8715 rm -f core conftest.err conftest.$ac_objext \
8716     conftest$ac_exeext conftest.$ac_ext
8717 LIBS=$ac_check_lib_save_LIBS
8718 fi
8719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
8720 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
8721 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
8722   cat >>confdefs.h <<_ACEOF
8723 #define HAVE_LIBPAM 1
8724 _ACEOF
8725
8726   LIBS="-lpam $LIBS"
8727
8728 else
8729   as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
8730 fi
8731
8732 fi
8733
8734 if test "$with_libxml" = yes ; then
8735   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
8736 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
8737 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
8738   $as_echo_n "(cached) " >&6
8739 else
8740   ac_check_lib_save_LIBS=$LIBS
8741 LIBS="-lxml2  $LIBS"
8742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8743 /* end confdefs.h.  */
8744
8745 /* Override any GCC internal prototype to avoid an error.
8746    Use char because int might match the return type of a GCC
8747    builtin and then its argument prototype would still apply.  */
8748 #ifdef __cplusplus
8749 extern "C"
8750 #endif
8751 char xmlSaveToBuffer ();
8752 int
8753 main ()
8754 {
8755 return xmlSaveToBuffer ();
8756   ;
8757   return 0;
8758 }
8759 _ACEOF
8760 if ac_fn_c_try_link "$LINENO"; then :
8761   ac_cv_lib_xml2_xmlSaveToBuffer=yes
8762 else
8763   ac_cv_lib_xml2_xmlSaveToBuffer=no
8764 fi
8765 rm -f core conftest.err conftest.$ac_objext \
8766     conftest$ac_exeext conftest.$ac_ext
8767 LIBS=$ac_check_lib_save_LIBS
8768 fi
8769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
8770 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
8771 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
8772   cat >>confdefs.h <<_ACEOF
8773 #define HAVE_LIBXML2 1
8774 _ACEOF
8775
8776   LIBS="-lxml2 $LIBS"
8777
8778 else
8779   as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
8780 fi
8781
8782 fi
8783
8784 if test "$with_libxslt" = yes ; then
8785   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
8786 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
8787 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
8788   $as_echo_n "(cached) " >&6
8789 else
8790   ac_check_lib_save_LIBS=$LIBS
8791 LIBS="-lxslt  $LIBS"
8792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8793 /* end confdefs.h.  */
8794
8795 /* Override any GCC internal prototype to avoid an error.
8796    Use char because int might match the return type of a GCC
8797    builtin and then its argument prototype would still apply.  */
8798 #ifdef __cplusplus
8799 extern "C"
8800 #endif
8801 char xsltCleanupGlobals ();
8802 int
8803 main ()
8804 {
8805 return xsltCleanupGlobals ();
8806   ;
8807   return 0;
8808 }
8809 _ACEOF
8810 if ac_fn_c_try_link "$LINENO"; then :
8811   ac_cv_lib_xslt_xsltCleanupGlobals=yes
8812 else
8813   ac_cv_lib_xslt_xsltCleanupGlobals=no
8814 fi
8815 rm -f core conftest.err conftest.$ac_objext \
8816     conftest$ac_exeext conftest.$ac_ext
8817 LIBS=$ac_check_lib_save_LIBS
8818 fi
8819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
8820 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
8821 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
8822   cat >>confdefs.h <<_ACEOF
8823 #define HAVE_LIBXSLT 1
8824 _ACEOF
8825
8826   LIBS="-lxslt $LIBS"
8827
8828 else
8829   as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
8830 fi
8831
8832 fi
8833
8834 # for contrib/sepgsql
8835 if test "$with_selinux" = yes; then
8836   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
8837 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
8838 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
8839   $as_echo_n "(cached) " >&6
8840 else
8841   ac_check_lib_save_LIBS=$LIBS
8842 LIBS="-lselinux  $LIBS"
8843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8844 /* end confdefs.h.  */
8845
8846 /* Override any GCC internal prototype to avoid an error.
8847    Use char because int might match the return type of a GCC
8848    builtin and then its argument prototype would still apply.  */
8849 #ifdef __cplusplus
8850 extern "C"
8851 #endif
8852 char security_compute_create_name ();
8853 int
8854 main ()
8855 {
8856 return security_compute_create_name ();
8857   ;
8858   return 0;
8859 }
8860 _ACEOF
8861 if ac_fn_c_try_link "$LINENO"; then :
8862   ac_cv_lib_selinux_security_compute_create_name=yes
8863 else
8864   ac_cv_lib_selinux_security_compute_create_name=no
8865 fi
8866 rm -f core conftest.err conftest.$ac_objext \
8867     conftest$ac_exeext conftest.$ac_ext
8868 LIBS=$ac_check_lib_save_LIBS
8869 fi
8870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
8871 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
8872 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
8873   cat >>confdefs.h <<_ACEOF
8874 #define HAVE_LIBSELINUX 1
8875 _ACEOF
8876
8877   LIBS="-lselinux $LIBS"
8878
8879 else
8880   as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
8881 fi
8882
8883 fi
8884
8885 # for contrib/uuid-ossp
8886 if test "$with_uuid" = bsd ; then
8887   # On BSD, the UUID functions are in libc
8888   ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
8889 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
8890   UUID_LIBS=""
8891 else
8892   as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
8893 fi
8894
8895 elif test "$with_uuid" = e2fs ; then
8896   # On OS X, the UUID functions are in libc
8897   ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
8898 if test "x$ac_cv_func_uuid_generate" = xyes; then :
8899   UUID_LIBS=""
8900 else
8901   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
8902 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
8903 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
8904   $as_echo_n "(cached) " >&6
8905 else
8906   ac_check_lib_save_LIBS=$LIBS
8907 LIBS="-luuid  $LIBS"
8908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8909 /* end confdefs.h.  */
8910
8911 /* Override any GCC internal prototype to avoid an error.
8912    Use char because int might match the return type of a GCC
8913    builtin and then its argument prototype would still apply.  */
8914 #ifdef __cplusplus
8915 extern "C"
8916 #endif
8917 char uuid_generate ();
8918 int
8919 main ()
8920 {
8921 return uuid_generate ();
8922   ;
8923   return 0;
8924 }
8925 _ACEOF
8926 if ac_fn_c_try_link "$LINENO"; then :
8927   ac_cv_lib_uuid_uuid_generate=yes
8928 else
8929   ac_cv_lib_uuid_uuid_generate=no
8930 fi
8931 rm -f core conftest.err conftest.$ac_objext \
8932     conftest$ac_exeext conftest.$ac_ext
8933 LIBS=$ac_check_lib_save_LIBS
8934 fi
8935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
8936 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
8937 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
8938   UUID_LIBS="-luuid"
8939 else
8940   as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
8941 fi
8942
8943 fi
8944
8945 elif test "$with_uuid" = ossp ; then
8946   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
8947 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
8948 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
8949   $as_echo_n "(cached) " >&6
8950 else
8951   ac_check_lib_save_LIBS=$LIBS
8952 LIBS="-lossp-uuid  $LIBS"
8953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8954 /* end confdefs.h.  */
8955
8956 /* Override any GCC internal prototype to avoid an error.
8957    Use char because int might match the return type of a GCC
8958    builtin and then its argument prototype would still apply.  */
8959 #ifdef __cplusplus
8960 extern "C"
8961 #endif
8962 char uuid_export ();
8963 int
8964 main ()
8965 {
8966 return uuid_export ();
8967   ;
8968   return 0;
8969 }
8970 _ACEOF
8971 if ac_fn_c_try_link "$LINENO"; then :
8972   ac_cv_lib_ossp_uuid_uuid_export=yes
8973 else
8974   ac_cv_lib_ossp_uuid_uuid_export=no
8975 fi
8976 rm -f core conftest.err conftest.$ac_objext \
8977     conftest$ac_exeext conftest.$ac_ext
8978 LIBS=$ac_check_lib_save_LIBS
8979 fi
8980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
8981 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
8982 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
8983   UUID_LIBS="-lossp-uuid"
8984 else
8985   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
8986 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
8987 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
8988   $as_echo_n "(cached) " >&6
8989 else
8990   ac_check_lib_save_LIBS=$LIBS
8991 LIBS="-luuid  $LIBS"
8992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8993 /* end confdefs.h.  */
8994
8995 /* Override any GCC internal prototype to avoid an error.
8996    Use char because int might match the return type of a GCC
8997    builtin and then its argument prototype would still apply.  */
8998 #ifdef __cplusplus
8999 extern "C"
9000 #endif
9001 char uuid_export ();
9002 int
9003 main ()
9004 {
9005 return uuid_export ();
9006   ;
9007   return 0;
9008 }
9009 _ACEOF
9010 if ac_fn_c_try_link "$LINENO"; then :
9011   ac_cv_lib_uuid_uuid_export=yes
9012 else
9013   ac_cv_lib_uuid_uuid_export=no
9014 fi
9015 rm -f core conftest.err conftest.$ac_objext \
9016     conftest$ac_exeext conftest.$ac_ext
9017 LIBS=$ac_check_lib_save_LIBS
9018 fi
9019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
9020 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
9021 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
9022   UUID_LIBS="-luuid"
9023 else
9024   as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
9025 fi
9026
9027 fi
9028
9029 fi
9030
9031
9032
9033 ##
9034 ## Header files
9035 ##
9036
9037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
9038 $as_echo_n "checking for ANSI C header files... " >&6; }
9039 if ${ac_cv_header_stdc+:} false; then :
9040   $as_echo_n "(cached) " >&6
9041 else
9042   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9043 /* end confdefs.h.  */
9044 #include <stdlib.h>
9045 #include <stdarg.h>
9046 #include <string.h>
9047 #include <float.h>
9048
9049 int
9050 main ()
9051 {
9052
9053   ;
9054   return 0;
9055 }
9056 _ACEOF
9057 if ac_fn_c_try_compile "$LINENO"; then :
9058   ac_cv_header_stdc=yes
9059 else
9060   ac_cv_header_stdc=no
9061 fi
9062 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9063
9064 if test $ac_cv_header_stdc = yes; then
9065   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9066   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9067 /* end confdefs.h.  */
9068 #include <string.h>
9069
9070 _ACEOF
9071 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9072   $EGREP "memchr" >/dev/null 2>&1; then :
9073
9074 else
9075   ac_cv_header_stdc=no
9076 fi
9077 rm -f conftest*
9078
9079 fi
9080
9081 if test $ac_cv_header_stdc = yes; then
9082   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9083   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9084 /* end confdefs.h.  */
9085 #include <stdlib.h>
9086
9087 _ACEOF
9088 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9089   $EGREP "free" >/dev/null 2>&1; then :
9090
9091 else
9092   ac_cv_header_stdc=no
9093 fi
9094 rm -f conftest*
9095
9096 fi
9097
9098 if test $ac_cv_header_stdc = yes; then
9099   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9100   if test "$cross_compiling" = yes; then :
9101   :
9102 else
9103   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9104 /* end confdefs.h.  */
9105 #include <ctype.h>
9106 #include <stdlib.h>
9107 #if ((' ' & 0x0FF) == 0x020)
9108 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9109 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9110 #else
9111 # define ISLOWER(c) \
9112                    (('a' <= (c) && (c) <= 'i') \
9113                      || ('j' <= (c) && (c) <= 'r') \
9114                      || ('s' <= (c) && (c) <= 'z'))
9115 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9116 #endif
9117
9118 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9119 int
9120 main ()
9121 {
9122   int i;
9123   for (i = 0; i < 256; i++)
9124     if (XOR (islower (i), ISLOWER (i))
9125         || toupper (i) != TOUPPER (i))
9126       return 2;
9127   return 0;
9128 }
9129 _ACEOF
9130 if ac_fn_c_try_run "$LINENO"; then :
9131
9132 else
9133   ac_cv_header_stdc=no
9134 fi
9135 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9136   conftest.$ac_objext conftest.beam conftest.$ac_ext
9137 fi
9138
9139 fi
9140 fi
9141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
9142 $as_echo "$ac_cv_header_stdc" >&6; }
9143 if test $ac_cv_header_stdc = yes; then
9144
9145 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
9146
9147 fi
9148
9149 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
9150 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
9151                   inttypes.h stdint.h unistd.h
9152 do :
9153   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9154 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
9155 "
9156 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9157   cat >>confdefs.h <<_ACEOF
9158 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9159 _ACEOF
9160
9161 fi
9162
9163 done
9164
9165
9166 for ac_header in atomic.h 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
9167 do :
9168   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9169 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9170 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9171   cat >>confdefs.h <<_ACEOF
9172 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9173 _ACEOF
9174
9175 fi
9176
9177 done
9178
9179
9180 # On BSD, test for net/if.h will fail unless sys/socket.h
9181 # is included first.
9182 for ac_header in net/if.h
9183 do :
9184   ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
9185 #ifdef HAVE_SYS_SOCKET_H
9186 #include <sys/socket.h>
9187 #endif
9188
9189 "
9190 if test "x$ac_cv_header_net_if_h" = xyes; then :
9191   cat >>confdefs.h <<_ACEOF
9192 #define HAVE_NET_IF_H 1
9193 _ACEOF
9194
9195 fi
9196
9197 done
9198
9199
9200 # On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
9201 # is included first.
9202 for ac_header in sys/ucred.h
9203 do :
9204   ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
9205 #include <sys/param.h>
9206
9207 "
9208 if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
9209   cat >>confdefs.h <<_ACEOF
9210 #define HAVE_SYS_UCRED_H 1
9211 _ACEOF
9212
9213 fi
9214
9215 done
9216
9217
9218 # At least on IRIX, test for netinet/tcp.h will fail unless
9219 # netinet/in.h is included first.
9220 for ac_header in netinet/in.h
9221 do :
9222   ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
9223 if test "x$ac_cv_header_netinet_in_h" = xyes; then :
9224   cat >>confdefs.h <<_ACEOF
9225 #define HAVE_NETINET_IN_H 1
9226 _ACEOF
9227
9228 fi
9229
9230 done
9231
9232 for ac_header in netinet/tcp.h
9233 do :
9234   ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
9235 #ifdef HAVE_NETINET_IN_H
9236 #include <netinet/in.h>
9237 #endif
9238
9239 "
9240 if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
9241   cat >>confdefs.h <<_ACEOF
9242 #define HAVE_NETINET_TCP_H 1
9243 _ACEOF
9244
9245 fi
9246
9247 done
9248
9249
9250 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
9251   for ac_header in readline/readline.h
9252 do :
9253   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
9254 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
9255   cat >>confdefs.h <<_ACEOF
9256 #define HAVE_READLINE_READLINE_H 1
9257 _ACEOF
9258
9259 else
9260   for ac_header in readline.h
9261 do :
9262   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
9263 if test "x$ac_cv_header_readline_h" = xyes; then :
9264   cat >>confdefs.h <<_ACEOF
9265 #define HAVE_READLINE_H 1
9266 _ACEOF
9267
9268 else
9269   as_fn_error $? "readline header not found
9270 If you have readline already installed, see config.log for details on the
9271 failure.  It is possible the compiler isn't looking in the proper directory.
9272 Use --without-readline to disable readline support." "$LINENO" 5
9273 fi
9274
9275 done
9276
9277 fi
9278
9279 done
9280
9281   for ac_header in readline/history.h
9282 do :
9283   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
9284 if test "x$ac_cv_header_readline_history_h" = xyes; then :
9285   cat >>confdefs.h <<_ACEOF
9286 #define HAVE_READLINE_HISTORY_H 1
9287 _ACEOF
9288
9289 else
9290   for ac_header in history.h
9291 do :
9292   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
9293 if test "x$ac_cv_header_history_h" = xyes; then :
9294   cat >>confdefs.h <<_ACEOF
9295 #define HAVE_HISTORY_H 1
9296 _ACEOF
9297
9298 else
9299   as_fn_error $? "history header not found
9300 If you have readline already installed, see config.log for details on the
9301 failure.  It is possible the compiler isn't looking in the proper directory.
9302 Use --without-readline to disable readline support." "$LINENO" 5
9303 fi
9304
9305 done
9306
9307 fi
9308
9309 done
9310
9311 fi
9312
9313 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
9314 # Some installations of libedit usurp /usr/include/readline/, which seems
9315 # bad practice, since in combined installations readline will have its headers
9316 # there.  We might have to resort to AC_EGREP checks to make sure we found
9317 # the proper header...
9318   for ac_header in editline/readline.h
9319 do :
9320   ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
9321 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
9322   cat >>confdefs.h <<_ACEOF
9323 #define HAVE_EDITLINE_READLINE_H 1
9324 _ACEOF
9325
9326 else
9327   for ac_header in readline.h
9328 do :
9329   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
9330 if test "x$ac_cv_header_readline_h" = xyes; then :
9331   cat >>confdefs.h <<_ACEOF
9332 #define HAVE_READLINE_H 1
9333 _ACEOF
9334
9335 else
9336   for ac_header in readline/readline.h
9337 do :
9338   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
9339 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
9340   cat >>confdefs.h <<_ACEOF
9341 #define HAVE_READLINE_READLINE_H 1
9342 _ACEOF
9343
9344 else
9345   as_fn_error $? "readline header not found
9346 If you have libedit already installed, see config.log for details on the
9347 failure.  It is possible the compiler isn't looking in the proper directory.
9348 Use --without-readline to disable libedit support." "$LINENO" 5
9349 fi
9350
9351 done
9352
9353 fi
9354
9355 done
9356
9357 fi
9358
9359 done
9360
9361 # Note: in a libedit installation, history.h is sometimes a dummy, and may
9362 # not be there at all.  Hence, don't complain if not found.  We must check
9363 # though, since in yet other versions it is an independent header.
9364   for ac_header in editline/history.h
9365 do :
9366   ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
9367 if test "x$ac_cv_header_editline_history_h" = xyes; then :
9368   cat >>confdefs.h <<_ACEOF
9369 #define HAVE_EDITLINE_HISTORY_H 1
9370 _ACEOF
9371
9372 else
9373   for ac_header in history.h
9374 do :
9375   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
9376 if test "x$ac_cv_header_history_h" = xyes; then :
9377   cat >>confdefs.h <<_ACEOF
9378 #define HAVE_HISTORY_H 1
9379 _ACEOF
9380
9381 else
9382   for ac_header in readline/history.h
9383 do :
9384   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
9385 if test "x$ac_cv_header_readline_history_h" = xyes; then :
9386   cat >>confdefs.h <<_ACEOF
9387 #define HAVE_READLINE_HISTORY_H 1
9388 _ACEOF
9389
9390 fi
9391
9392 done
9393
9394 fi
9395
9396 done
9397
9398 fi
9399
9400 done
9401
9402 fi
9403
9404 if test "$with_zlib" = yes; then
9405   ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
9406 if test "x$ac_cv_header_zlib_h" = xyes; then :
9407
9408 else
9409   as_fn_error $? "zlib header not found
9410 If you have zlib already installed, see config.log for details on the
9411 failure.  It is possible the compiler isn't looking in the proper directory.
9412 Use --without-zlib to disable zlib support." "$LINENO" 5
9413 fi
9414
9415
9416 fi
9417
9418 if test "$with_gssapi" = yes ; then
9419   for ac_header in gssapi/gssapi.h
9420 do :
9421   ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
9422 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
9423   cat >>confdefs.h <<_ACEOF
9424 #define HAVE_GSSAPI_GSSAPI_H 1
9425 _ACEOF
9426
9427 else
9428   for ac_header in gssapi.h
9429 do :
9430   ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
9431 if test "x$ac_cv_header_gssapi_h" = xyes; then :
9432   cat >>confdefs.h <<_ACEOF
9433 #define HAVE_GSSAPI_H 1
9434 _ACEOF
9435
9436 else
9437   as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
9438 fi
9439
9440 done
9441
9442 fi
9443
9444 done
9445
9446 fi
9447
9448 if test "$with_openssl" = yes ; then
9449   ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
9450 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
9451
9452 else
9453   as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
9454 fi
9455
9456
9457   ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
9458 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
9459
9460 else
9461   as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
9462 fi
9463
9464
9465 fi
9466
9467 if test "$with_pam" = yes ; then
9468   for ac_header in security/pam_appl.h
9469 do :
9470   ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
9471 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
9472   cat >>confdefs.h <<_ACEOF
9473 #define HAVE_SECURITY_PAM_APPL_H 1
9474 _ACEOF
9475
9476 else
9477   for ac_header in pam/pam_appl.h
9478 do :
9479   ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
9480 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
9481   cat >>confdefs.h <<_ACEOF
9482 #define HAVE_PAM_PAM_APPL_H 1
9483 _ACEOF
9484
9485 else
9486   as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
9487 fi
9488
9489 done
9490
9491 fi
9492
9493 done
9494
9495 fi
9496
9497 if test "$with_libxml" = yes ; then
9498   ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
9499 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
9500
9501 else
9502   as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
9503 fi
9504
9505
9506 fi
9507
9508 if test "$with_libxslt" = yes ; then
9509   ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
9510 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
9511
9512 else
9513   as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
9514 fi
9515
9516
9517 fi
9518
9519 if test "$with_ldap" = yes ; then
9520   if test "$PORTNAME" != "win32"; then
9521      for ac_header in ldap.h
9522 do :
9523   ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
9524 if test "x$ac_cv_header_ldap_h" = xyes; then :
9525   cat >>confdefs.h <<_ACEOF
9526 #define HAVE_LDAP_H 1
9527 _ACEOF
9528
9529 else
9530   as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
9531 fi
9532
9533 done
9534
9535      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
9536 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
9537 if ${pgac_cv_ldap_safe+:} false; then :
9538   $as_echo_n "(cached) " >&6
9539 else
9540   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9541 /* end confdefs.h.  */
9542 #include <ldap.h>
9543 #if !defined(LDAP_VENDOR_VERSION) || \
9544      (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
9545       LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
9546 choke me
9547 #endif
9548 int
9549 main ()
9550 {
9551
9552   ;
9553   return 0;
9554 }
9555 _ACEOF
9556 if ac_fn_c_try_compile "$LINENO"; then :
9557   pgac_cv_ldap_safe=yes
9558 else
9559   pgac_cv_ldap_safe=no
9560 fi
9561 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9562 fi
9563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
9564 $as_echo "$pgac_cv_ldap_safe" >&6; }
9565
9566 if test "$pgac_cv_ldap_safe" != yes; then
9567   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9568 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
9569 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
9570 *** also uses LDAP will crash on exit." >&5
9571 $as_echo "$as_me: WARNING:
9572 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
9573 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
9574 *** also uses LDAP will crash on exit." >&2;}
9575 fi
9576   else
9577      for ac_header in winldap.h
9578 do :
9579   ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
9580 #include <windows.h>
9581
9582 "
9583 if test "x$ac_cv_header_winldap_h" = xyes; then :
9584   cat >>confdefs.h <<_ACEOF
9585 #define HAVE_WINLDAP_H 1
9586 _ACEOF
9587
9588 else
9589   as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
9590 fi
9591
9592 done
9593
9594   fi
9595 fi
9596
9597 if test "$with_bonjour" = yes ; then
9598   ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
9599 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
9600
9601 else
9602   as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
9603 fi
9604
9605
9606 fi
9607
9608 # for contrib/uuid-ossp
9609 if test "$with_uuid" = bsd ; then
9610   for ac_header in uuid.h
9611 do :
9612   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
9613 if test "x$ac_cv_header_uuid_h" = xyes; then :
9614   cat >>confdefs.h <<_ACEOF
9615 #define HAVE_UUID_H 1
9616 _ACEOF
9617  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9618 /* end confdefs.h.  */
9619 #include <uuid.h>
9620
9621 _ACEOF
9622 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9623   $EGREP "uuid_to_string" >/dev/null 2>&1; then :
9624
9625 else
9626   as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
9627 fi
9628 rm -f conftest*
9629
9630 else
9631   as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
9632 fi
9633
9634 done
9635
9636 elif test "$with_uuid" = e2fs ; then
9637   for ac_header in uuid/uuid.h
9638 do :
9639   ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
9640 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
9641   cat >>confdefs.h <<_ACEOF
9642 #define HAVE_UUID_UUID_H 1
9643 _ACEOF
9644  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9645 /* end confdefs.h.  */
9646 #include <uuid/uuid.h>
9647
9648 _ACEOF
9649 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9650   $EGREP "uuid_generate" >/dev/null 2>&1; then :
9651
9652 else
9653   as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
9654 fi
9655 rm -f conftest*
9656
9657 else
9658   for ac_header in uuid.h
9659 do :
9660   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
9661 if test "x$ac_cv_header_uuid_h" = xyes; then :
9662   cat >>confdefs.h <<_ACEOF
9663 #define HAVE_UUID_H 1
9664 _ACEOF
9665  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9666 /* end confdefs.h.  */
9667 #include <uuid.h>
9668
9669 _ACEOF
9670 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9671   $EGREP "uuid_generate" >/dev/null 2>&1; then :
9672
9673 else
9674   as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
9675 fi
9676 rm -f conftest*
9677
9678 else
9679   as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
9680 fi
9681
9682 done
9683
9684 fi
9685
9686 done
9687
9688 elif test "$with_uuid" = ossp ; then
9689   for ac_header in ossp/uuid.h
9690 do :
9691   ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
9692 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
9693   cat >>confdefs.h <<_ACEOF
9694 #define HAVE_OSSP_UUID_H 1
9695 _ACEOF
9696  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9697 /* end confdefs.h.  */
9698 #include <ossp/uuid.h>
9699
9700 _ACEOF
9701 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9702   $EGREP "uuid_export" >/dev/null 2>&1; then :
9703
9704 else
9705   as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
9706 fi
9707 rm -f conftest*
9708
9709 else
9710   for ac_header in uuid.h
9711 do :
9712   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
9713 if test "x$ac_cv_header_uuid_h" = xyes; then :
9714   cat >>confdefs.h <<_ACEOF
9715 #define HAVE_UUID_H 1
9716 _ACEOF
9717  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9718 /* end confdefs.h.  */
9719 #include <uuid.h>
9720
9721 _ACEOF
9722 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9723   $EGREP "uuid_export" >/dev/null 2>&1; then :
9724
9725 else
9726   as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
9727 fi
9728 rm -f conftest*
9729
9730 else
9731   as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
9732 fi
9733
9734 done
9735
9736 fi
9737
9738 done
9739
9740 fi
9741
9742 if test "$PORTNAME" = "win32" ; then
9743    for ac_header in crtdefs.h
9744 do :
9745   ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
9746 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
9747   cat >>confdefs.h <<_ACEOF
9748 #define HAVE_CRTDEFS_H 1
9749 _ACEOF
9750
9751 fi
9752
9753 done
9754
9755 fi
9756
9757 ##
9758 ## Types, structures, compiler characteristics
9759 ##
9760
9761   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
9762 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
9763 if ${ac_cv_c_bigendian+:} false; then :
9764   $as_echo_n "(cached) " >&6
9765 else
9766   ac_cv_c_bigendian=unknown
9767     # See if we're dealing with a universal compiler.
9768     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9769 /* end confdefs.h.  */
9770 #ifndef __APPLE_CC__
9771                not a universal capable compiler
9772              #endif
9773              typedef int dummy;
9774
9775 _ACEOF
9776 if ac_fn_c_try_compile "$LINENO"; then :
9777
9778         # Check for potential -arch flags.  It is not universal unless
9779         # there are at least two -arch flags with different values.
9780         ac_arch=
9781         ac_prev=
9782         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
9783          if test -n "$ac_prev"; then
9784            case $ac_word in
9785              i?86 | x86_64 | ppc | ppc64)
9786                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
9787                  ac_arch=$ac_word
9788                else
9789                  ac_cv_c_bigendian=universal
9790                  break
9791                fi
9792                ;;
9793            esac
9794            ac_prev=
9795          elif test "x$ac_word" = "x-arch"; then
9796            ac_prev=arch
9797          fi
9798        done
9799 fi
9800 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9801     if test $ac_cv_c_bigendian = unknown; then
9802       # See if sys/param.h defines the BYTE_ORDER macro.
9803       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9804 /* end confdefs.h.  */
9805 #include <sys/types.h>
9806              #include <sys/param.h>
9807
9808 int
9809 main ()
9810 {
9811 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
9812                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
9813                      && LITTLE_ENDIAN)
9814               bogus endian macros
9815              #endif
9816
9817   ;
9818   return 0;
9819 }
9820 _ACEOF
9821 if ac_fn_c_try_compile "$LINENO"; then :
9822   # It does; now see whether it defined to BIG_ENDIAN or not.
9823          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9824 /* end confdefs.h.  */
9825 #include <sys/types.h>
9826                 #include <sys/param.h>
9827
9828 int
9829 main ()
9830 {
9831 #if BYTE_ORDER != BIG_ENDIAN
9832                  not big endian
9833                 #endif
9834
9835   ;
9836   return 0;
9837 }
9838 _ACEOF
9839 if ac_fn_c_try_compile "$LINENO"; then :
9840   ac_cv_c_bigendian=yes
9841 else
9842   ac_cv_c_bigendian=no
9843 fi
9844 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9845 fi
9846 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9847     fi
9848     if test $ac_cv_c_bigendian = unknown; then
9849       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
9850       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9851 /* end confdefs.h.  */
9852 #include <limits.h>
9853
9854 int
9855 main ()
9856 {
9857 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
9858               bogus endian macros
9859              #endif
9860
9861   ;
9862   return 0;
9863 }
9864 _ACEOF
9865 if ac_fn_c_try_compile "$LINENO"; then :
9866   # It does; now see whether it defined to _BIG_ENDIAN or not.
9867          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9868 /* end confdefs.h.  */
9869 #include <limits.h>
9870
9871 int
9872 main ()
9873 {
9874 #ifndef _BIG_ENDIAN
9875                  not big endian
9876                 #endif
9877
9878   ;
9879   return 0;
9880 }
9881 _ACEOF
9882 if ac_fn_c_try_compile "$LINENO"; then :
9883   ac_cv_c_bigendian=yes
9884 else
9885   ac_cv_c_bigendian=no
9886 fi
9887 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9888 fi
9889 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9890     fi
9891     if test $ac_cv_c_bigendian = unknown; then
9892       # Compile a test program.
9893       if test "$cross_compiling" = yes; then :
9894   # Try to guess by grepping values from an object file.
9895          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9896 /* end confdefs.h.  */
9897 short int ascii_mm[] =
9898                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
9899                 short int ascii_ii[] =
9900                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9901                 int use_ascii (int i) {
9902                   return ascii_mm[i] + ascii_ii[i];
9903                 }
9904                 short int ebcdic_ii[] =
9905                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
9906                 short int ebcdic_mm[] =
9907                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9908                 int use_ebcdic (int i) {
9909                   return ebcdic_mm[i] + ebcdic_ii[i];
9910                 }
9911                 extern int foo;
9912
9913 int
9914 main ()
9915 {
9916 return use_ascii (foo) == use_ebcdic (foo);
9917   ;
9918   return 0;
9919 }
9920 _ACEOF
9921 if ac_fn_c_try_compile "$LINENO"; then :
9922   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
9923               ac_cv_c_bigendian=yes
9924             fi
9925             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
9926               if test "$ac_cv_c_bigendian" = unknown; then
9927                 ac_cv_c_bigendian=no
9928               else
9929                 # finding both strings is unlikely to happen, but who knows?
9930                 ac_cv_c_bigendian=unknown
9931               fi
9932             fi
9933 fi
9934 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9935 else
9936   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9937 /* end confdefs.h.  */
9938 $ac_includes_default
9939 int
9940 main ()
9941 {
9942
9943              /* Are we little or big endian?  From Harbison&Steele.  */
9944              union
9945              {
9946                long int l;
9947                char c[sizeof (long int)];
9948              } u;
9949              u.l = 1;
9950              return u.c[sizeof (long int) - 1] == 1;
9951
9952   ;
9953   return 0;
9954 }
9955 _ACEOF
9956 if ac_fn_c_try_run "$LINENO"; then :
9957   ac_cv_c_bigendian=no
9958 else
9959   ac_cv_c_bigendian=yes
9960 fi
9961 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9962   conftest.$ac_objext conftest.beam conftest.$ac_ext
9963 fi
9964
9965     fi
9966 fi
9967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
9968 $as_echo "$ac_cv_c_bigendian" >&6; }
9969  case $ac_cv_c_bigendian in #(
9970    yes)
9971      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
9972 ;; #(
9973    no)
9974       ;; #(
9975    universal)
9976
9977 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
9978
9979      ;; #(
9980    *)
9981      as_fn_error $? "unknown endianness
9982  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
9983  esac
9984
9985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
9986 $as_echo_n "checking for inline... " >&6; }
9987 if ${ac_cv_c_inline+:} false; then :
9988   $as_echo_n "(cached) " >&6
9989 else
9990   ac_cv_c_inline=no
9991 for ac_kw in inline __inline__ __inline; do
9992   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9993 /* end confdefs.h.  */
9994 #ifndef __cplusplus
9995 typedef int foo_t;
9996 static $ac_kw foo_t static_foo () {return 0; }
9997 $ac_kw foo_t foo () {return 0; }
9998 #endif
9999
10000 _ACEOF
10001 if ac_fn_c_try_compile "$LINENO"; then :
10002   ac_cv_c_inline=$ac_kw
10003 fi
10004 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10005   test "$ac_cv_c_inline" != no && break
10006 done
10007
10008 fi
10009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
10010 $as_echo "$ac_cv_c_inline" >&6; }
10011
10012 case $ac_cv_c_inline in
10013   inline | yes) ;;
10014   *)
10015     case $ac_cv_c_inline in
10016       no) ac_val=;;
10017       *) ac_val=$ac_cv_c_inline;;
10018     esac
10019     cat >>confdefs.h <<_ACEOF
10020 #ifndef __cplusplus
10021 #define inline $ac_val
10022 #endif
10023 _ACEOF
10024     ;;
10025 esac
10026
10027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for quiet inline (no complaint if unreferenced)" >&5
10028 $as_echo_n "checking for quiet inline (no complaint if unreferenced)... " >&6; }
10029 if ${pgac_cv_c_inline_quietly+:} false; then :
10030   $as_echo_n "(cached) " >&6
10031 else
10032   pgac_cv_c_inline_quietly=no
10033   if test "$ac_cv_c_inline" != no; then
10034     pgac_c_inline_save_werror=$ac_c_werror_flag
10035     ac_c_werror_flag=yes
10036     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10037 /* end confdefs.h.  */
10038 #include "$srcdir/config/test_quiet_include.h"
10039 int
10040 main ()
10041 {
10042
10043   ;
10044   return 0;
10045 }
10046 _ACEOF
10047 if ac_fn_c_try_link "$LINENO"; then :
10048   pgac_cv_c_inline_quietly=yes
10049 fi
10050 rm -f core conftest.err conftest.$ac_objext \
10051     conftest$ac_exeext conftest.$ac_ext
10052     ac_c_werror_flag=$pgac_c_inline_save_werror
10053   fi
10054 fi
10055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_inline_quietly" >&5
10056 $as_echo "$pgac_cv_c_inline_quietly" >&6; }
10057 if test "$pgac_cv_c_inline_quietly" != no; then
10058
10059 cat >>confdefs.h <<_ACEOF
10060 #define PG_USE_INLINE 1
10061 _ACEOF
10062
10063 fi
10064
10065
10066   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array members" >&5
10067 $as_echo_n "checking for flexible array members... " >&6; }
10068 if ${ac_cv_c_flexmember+:} false; then :
10069   $as_echo_n "(cached) " >&6
10070 else
10071   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10072 /* end confdefs.h.  */
10073 #include <stdlib.h>
10074             #include <stdio.h>
10075             #include <stddef.h>
10076             struct s { int n; double d[]; };
10077 int
10078 main ()
10079 {
10080 int m = getchar ();
10081             struct s *p = malloc (offsetof (struct s, d)
10082                                   + m * sizeof (double));
10083             p->d[0] = 0.0;
10084             return p->d != (double *) NULL;
10085   ;
10086   return 0;
10087 }
10088 _ACEOF
10089 if ac_fn_c_try_compile "$LINENO"; then :
10090   ac_cv_c_flexmember=yes
10091 else
10092   ac_cv_c_flexmember=no
10093 fi
10094 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10095 fi
10096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
10097 $as_echo "$ac_cv_c_flexmember" >&6; }
10098   if test $ac_cv_c_flexmember = yes; then
10099
10100 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
10101
10102   else
10103     $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
10104
10105   fi
10106
10107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed types" >&5
10108 $as_echo_n "checking for signed types... " >&6; }
10109 if ${pgac_cv_c_signed+:} false; then :
10110   $as_echo_n "(cached) " >&6
10111 else
10112   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10113 /* end confdefs.h.  */
10114
10115 int
10116 main ()
10117 {
10118 signed char c; signed short s; signed int i;
10119   ;
10120   return 0;
10121 }
10122 _ACEOF
10123 if ac_fn_c_try_compile "$LINENO"; then :
10124   pgac_cv_c_signed=yes
10125 else
10126   pgac_cv_c_signed=no
10127 fi
10128 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10129 fi
10130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_signed" >&5
10131 $as_echo "$pgac_cv_c_signed" >&6; }
10132 if test x"$pgac_cv_c_signed" = xno ; then
10133
10134 $as_echo "#define signed /**/" >>confdefs.h
10135
10136 fi
10137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5
10138 $as_echo_n "checking for __func__... " >&6; }
10139 if ${pgac_cv_funcname_func_support+:} false; then :
10140   $as_echo_n "(cached) " >&6
10141 else
10142   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10143 /* end confdefs.h.  */
10144 #include <stdio.h>
10145 int
10146 main ()
10147 {
10148 printf("%s\n", __func__);
10149   ;
10150   return 0;
10151 }
10152 _ACEOF
10153 if ac_fn_c_try_compile "$LINENO"; then :
10154   pgac_cv_funcname_func_support=yes
10155 else
10156   pgac_cv_funcname_func_support=no
10157 fi
10158 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10159 fi
10160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_func_support" >&5
10161 $as_echo "$pgac_cv_funcname_func_support" >&6; }
10162 if test x"$pgac_cv_funcname_func_support" = xyes ; then
10163
10164 $as_echo "#define HAVE_FUNCNAME__FUNC 1" >>confdefs.h
10165
10166 else
10167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__" >&5
10168 $as_echo_n "checking for __FUNCTION__... " >&6; }
10169 if ${pgac_cv_funcname_function_support+:} false; then :
10170   $as_echo_n "(cached) " >&6
10171 else
10172   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10173 /* end confdefs.h.  */
10174 #include <stdio.h>
10175 int
10176 main ()
10177 {
10178 printf("%s\n", __FUNCTION__);
10179   ;
10180   return 0;
10181 }
10182 _ACEOF
10183 if ac_fn_c_try_compile "$LINENO"; then :
10184   pgac_cv_funcname_function_support=yes
10185 else
10186   pgac_cv_funcname_function_support=no
10187 fi
10188 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10189 fi
10190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_function_support" >&5
10191 $as_echo "$pgac_cv_funcname_function_support" >&6; }
10192 if test x"$pgac_cv_funcname_function_support" = xyes ; then
10193
10194 $as_echo "#define HAVE_FUNCNAME__FUNCTION 1" >>confdefs.h
10195
10196 fi
10197 fi
10198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
10199 $as_echo_n "checking for _Static_assert... " >&6; }
10200 if ${pgac_cv__static_assert+:} false; then :
10201   $as_echo_n "(cached) " >&6
10202 else
10203   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10204 /* end confdefs.h.  */
10205
10206 int
10207 main ()
10208 {
10209 ({ _Static_assert(1, "foo"); })
10210   ;
10211   return 0;
10212 }
10213 _ACEOF
10214 if ac_fn_c_try_link "$LINENO"; then :
10215   pgac_cv__static_assert=yes
10216 else
10217   pgac_cv__static_assert=no
10218 fi
10219 rm -f core conftest.err conftest.$ac_objext \
10220     conftest$ac_exeext conftest.$ac_ext
10221 fi
10222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
10223 $as_echo "$pgac_cv__static_assert" >&6; }
10224 if test x"$pgac_cv__static_assert" = xyes ; then
10225
10226 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
10227
10228 fi
10229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
10230 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
10231 if ${pgac_cv__types_compatible+:} false; then :
10232   $as_echo_n "(cached) " >&6
10233 else
10234   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10235 /* end confdefs.h.  */
10236
10237 int
10238 main ()
10239 {
10240  int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
10241   ;
10242   return 0;
10243 }
10244 _ACEOF
10245 if ac_fn_c_try_compile "$LINENO"; then :
10246   pgac_cv__types_compatible=yes
10247 else
10248   pgac_cv__types_compatible=no
10249 fi
10250 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10251 fi
10252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
10253 $as_echo "$pgac_cv__types_compatible" >&6; }
10254 if test x"$pgac_cv__types_compatible" = xyes ; then
10255
10256 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
10257
10258 fi
10259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
10260 $as_echo_n "checking for __builtin_constant_p... " >&6; }
10261 if ${pgac_cv__builtin_constant_p+:} false; then :
10262   $as_echo_n "(cached) " >&6
10263 else
10264   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10265 /* end confdefs.h.  */
10266 static int x; static int y[__builtin_constant_p(x) ? x : 1];
10267 int
10268 main ()
10269 {
10270
10271   ;
10272   return 0;
10273 }
10274 _ACEOF
10275 if ac_fn_c_try_compile "$LINENO"; then :
10276   pgac_cv__builtin_constant_p=yes
10277 else
10278   pgac_cv__builtin_constant_p=no
10279 fi
10280 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10281 fi
10282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
10283 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
10284 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
10285
10286 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
10287
10288 fi
10289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
10290 $as_echo_n "checking for __builtin_unreachable... " >&6; }
10291 if ${pgac_cv__builtin_unreachable+:} false; then :
10292   $as_echo_n "(cached) " >&6
10293 else
10294   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10295 /* end confdefs.h.  */
10296
10297 int
10298 main ()
10299 {
10300 __builtin_unreachable();
10301   ;
10302   return 0;
10303 }
10304 _ACEOF
10305 if ac_fn_c_try_link "$LINENO"; then :
10306   pgac_cv__builtin_unreachable=yes
10307 else
10308   pgac_cv__builtin_unreachable=no
10309 fi
10310 rm -f core conftest.err conftest.$ac_objext \
10311     conftest$ac_exeext conftest.$ac_ext
10312 fi
10313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
10314 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
10315 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
10316
10317 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
10318
10319 fi
10320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __VA_ARGS__" >&5
10321 $as_echo_n "checking for __VA_ARGS__... " >&6; }
10322 if ${pgac_cv__va_args+:} false; then :
10323   $as_echo_n "(cached) " >&6
10324 else
10325   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10326 /* end confdefs.h.  */
10327 #include <stdio.h>
10328 int
10329 main ()
10330 {
10331 #define debug(...) fprintf(stderr, __VA_ARGS__)
10332 debug("%s", "blarg");
10333
10334   ;
10335   return 0;
10336 }
10337 _ACEOF
10338 if ac_fn_c_try_compile "$LINENO"; then :
10339   pgac_cv__va_args=yes
10340 else
10341   pgac_cv__va_args=no
10342 fi
10343 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10344 fi
10345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__va_args" >&5
10346 $as_echo "$pgac_cv__va_args" >&6; }
10347 if test x"$pgac_cv__va_args" = xyes ; then
10348
10349 $as_echo "#define HAVE__VA_ARGS 1" >>confdefs.h
10350
10351 fi
10352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10353 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
10354 if ${ac_cv_struct_tm+:} false; then :
10355   $as_echo_n "(cached) " >&6
10356 else
10357   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10358 /* end confdefs.h.  */
10359 #include <sys/types.h>
10360 #include <time.h>
10361
10362 int
10363 main ()
10364 {
10365 struct tm tm;
10366                                      int *p = &tm.tm_sec;
10367                                      return !p;
10368   ;
10369   return 0;
10370 }
10371 _ACEOF
10372 if ac_fn_c_try_compile "$LINENO"; then :
10373   ac_cv_struct_tm=time.h
10374 else
10375   ac_cv_struct_tm=sys/time.h
10376 fi
10377 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10378 fi
10379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10380 $as_echo "$ac_cv_struct_tm" >&6; }
10381 if test $ac_cv_struct_tm = sys/time.h; then
10382
10383 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
10384
10385 fi
10386
10387 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
10388 #include <$ac_cv_struct_tm>
10389
10390 "
10391 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
10392
10393 cat >>confdefs.h <<_ACEOF
10394 #define HAVE_STRUCT_TM_TM_ZONE 1
10395 _ACEOF
10396
10397
10398 fi
10399
10400 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10401
10402 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
10403
10404 fi
10405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10406 $as_echo_n "checking for tzname... " >&6; }
10407 if ${ac_cv_var_tzname+:} false; then :
10408   $as_echo_n "(cached) " >&6
10409 else
10410   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10411 /* end confdefs.h.  */
10412 #include <time.h>
10413 #ifndef tzname /* For SGI.  */
10414 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
10415 #endif
10416
10417 int
10418 main ()
10419 {
10420 atoi(*tzname);
10421   ;
10422   return 0;
10423 }
10424 _ACEOF
10425 if ac_fn_c_try_link "$LINENO"; then :
10426   ac_cv_var_tzname=yes
10427 else
10428   ac_cv_var_tzname=no
10429 fi
10430 rm -f core conftest.err conftest.$ac_objext \
10431     conftest$ac_exeext conftest.$ac_ext
10432 fi
10433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10434 $as_echo "$ac_cv_var_tzname" >&6; }
10435 if test $ac_cv_var_tzname = yes; then
10436
10437 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
10438
10439 fi
10440
10441 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
10442 #include <sys/ipc.h>
10443 #include <sys/sem.h>
10444 "
10445 if test "x$ac_cv_type_union_semun" = xyes; then :
10446
10447 cat >>confdefs.h <<_ACEOF
10448 #define HAVE_UNION_SEMUN 1
10449 _ACEOF
10450
10451
10452 fi
10453
10454 ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
10455 #ifdef HAVE_SYS_UN_H
10456 #include <sys/un.h>
10457 #endif
10458
10459 "
10460 if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
10461
10462 $as_echo "#define HAVE_UNIX_SOCKETS 1" >>confdefs.h
10463
10464 fi
10465
10466 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
10467 #ifdef HAVE_SYS_SOCKET_H
10468 #include <sys/socket.h>
10469 #endif
10470
10471 "
10472 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
10473
10474 cat >>confdefs.h <<_ACEOF
10475 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
10476 _ACEOF
10477
10478
10479 fi
10480
10481 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
10482 #ifdef HAVE_SYS_SOCKET_H
10483 #include <sys/socket.h>
10484 #endif
10485
10486 "
10487 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
10488
10489 cat >>confdefs.h <<_ACEOF
10490 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
10491 _ACEOF
10492
10493
10494 fi
10495 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
10496 #ifdef HAVE_SYS_SOCKET_H
10497 #include <sys/socket.h>
10498 #endif
10499
10500 "
10501 if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
10502
10503 cat >>confdefs.h <<_ACEOF
10504 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
10505 _ACEOF
10506
10507
10508 fi
10509 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
10510 #ifdef HAVE_SYS_SOCKET_H
10511 #include <sys/socket.h>
10512 #endif
10513
10514 "
10515 if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
10516
10517 cat >>confdefs.h <<_ACEOF
10518 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
10519 _ACEOF
10520
10521
10522 fi
10523 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
10524 #ifdef HAVE_SYS_SOCKET_H
10525 #include <sys/socket.h>
10526 #endif
10527
10528 "
10529 if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
10530
10531 cat >>confdefs.h <<_ACEOF
10532 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
10533 _ACEOF
10534
10535
10536 fi
10537 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
10538 #ifdef HAVE_SYS_SOCKET_H
10539 #include <sys/socket.h>
10540 #endif
10541
10542 "
10543 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
10544
10545 cat >>confdefs.h <<_ACEOF
10546 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
10547 _ACEOF
10548
10549
10550 fi
10551
10552 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include <sys/types.h>
10553 #include <sys/socket.h>
10554 #include <netdb.h>
10555
10556 "
10557 if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
10558
10559 cat >>confdefs.h <<_ACEOF
10560 #define HAVE_STRUCT_ADDRINFO 1
10561 _ACEOF
10562
10563
10564 fi
10565
10566
10567   ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
10568 if test "x$ac_cv_type_intptr_t" = xyes; then :
10569
10570 $as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
10571
10572 else
10573   for ac_type in 'int' 'long int' 'long long int'; do
10574        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10575 /* end confdefs.h.  */
10576 $ac_includes_default
10577 int
10578 main ()
10579 {
10580 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
10581 test_array [0] = 0;
10582 return test_array [0];
10583
10584   ;
10585   return 0;
10586 }
10587 _ACEOF
10588 if ac_fn_c_try_compile "$LINENO"; then :
10589
10590 cat >>confdefs.h <<_ACEOF
10591 #define intptr_t $ac_type
10592 _ACEOF
10593
10594           ac_type=
10595 fi
10596 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10597        test -z "$ac_type" && break
10598      done
10599 fi
10600
10601
10602
10603   ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
10604 if test "x$ac_cv_type_uintptr_t" = xyes; then :
10605
10606 $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
10607
10608 else
10609   for ac_type in 'unsigned int' 'unsigned long int' \
10610         'unsigned long long int'; do
10611        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10612 /* end confdefs.h.  */
10613 $ac_includes_default
10614 int
10615 main ()
10616 {
10617 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
10618 test_array [0] = 0;
10619 return test_array [0];
10620
10621   ;
10622   return 0;
10623 }
10624 _ACEOF
10625 if ac_fn_c_try_compile "$LINENO"; then :
10626
10627 cat >>confdefs.h <<_ACEOF
10628 #define uintptr_t $ac_type
10629 _ACEOF
10630
10631           ac_type=
10632 fi
10633 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10634        test -z "$ac_type" && break
10635      done
10636 fi
10637
10638
10639
10640   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
10641 $as_echo_n "checking for unsigned long long int... " >&6; }
10642 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
10643   $as_echo_n "(cached) " >&6
10644 else
10645   ac_cv_type_unsigned_long_long_int=yes
10646      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
10647        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10648 /* end confdefs.h.  */
10649
10650   /* For now, do not test the preprocessor; as of 2007 there are too many
10651          implementations with broken preprocessors.  Perhaps this can
10652          be revisited in 2012.  In the meantime, code should not expect
10653          #if to work with literals wider than 32 bits.  */
10654       /* Test literals.  */
10655       long long int ll = 9223372036854775807ll;
10656       long long int nll = -9223372036854775807LL;
10657       unsigned long long int ull = 18446744073709551615ULL;
10658       /* Test constant expressions.   */
10659       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
10660                      ? 1 : -1)];
10661       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
10662                      ? 1 : -1)];
10663       int i = 63;
10664 int
10665 main ()
10666 {
10667 /* Test availability of runtime routines for shift and division.  */
10668       long long int llmax = 9223372036854775807ll;
10669       unsigned long long int ullmax = 18446744073709551615ull;
10670       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
10671               | (llmax / ll) | (llmax % ll)
10672               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
10673               | (ullmax / ull) | (ullmax % ull));
10674   ;
10675   return 0;
10676 }
10677
10678 _ACEOF
10679 if ac_fn_c_try_link "$LINENO"; then :
10680
10681 else
10682   ac_cv_type_unsigned_long_long_int=no
10683 fi
10684 rm -f core conftest.err conftest.$ac_objext \
10685     conftest$ac_exeext conftest.$ac_ext
10686      fi
10687 fi
10688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
10689 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
10690   if test $ac_cv_type_unsigned_long_long_int = yes; then
10691
10692 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
10693
10694   fi
10695
10696
10697
10698   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
10699 $as_echo_n "checking for long long int... " >&6; }
10700 if ${ac_cv_type_long_long_int+:} false; then :
10701   $as_echo_n "(cached) " >&6
10702 else
10703   ac_cv_type_long_long_int=yes
10704       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
10705         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
10706         if test $ac_cv_type_long_long_int = yes; then
10707                                   if test "$cross_compiling" = yes; then :
10708   :
10709 else
10710   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10711 /* end confdefs.h.  */
10712 #include <limits.h>
10713                  #ifndef LLONG_MAX
10714                  # define HALF \
10715                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
10716                  # define LLONG_MAX (HALF - 1 + HALF)
10717                  #endif
10718 int
10719 main ()
10720 {
10721 long long int n = 1;
10722                  int i;
10723                  for (i = 0; ; i++)
10724                    {
10725                      long long int m = n << i;
10726                      if (m >> i != n)
10727                        return 1;
10728                      if (LLONG_MAX / 2 < m)
10729                        break;
10730                    }
10731                  return 0;
10732   ;
10733   return 0;
10734 }
10735 _ACEOF
10736 if ac_fn_c_try_run "$LINENO"; then :
10737
10738 else
10739   ac_cv_type_long_long_int=no
10740 fi
10741 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10742   conftest.$ac_objext conftest.beam conftest.$ac_ext
10743 fi
10744
10745         fi
10746       fi
10747 fi
10748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
10749 $as_echo "$ac_cv_type_long_long_int" >&6; }
10750   if test $ac_cv_type_long_long_int = yes; then
10751
10752 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
10753
10754   fi
10755
10756
10757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
10758 $as_echo_n "checking for locale_t... " >&6; }
10759 if ${pgac_cv_type_locale_t+:} false; then :
10760   $as_echo_n "(cached) " >&6
10761 else
10762   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10763 /* end confdefs.h.  */
10764 #include <locale.h>
10765 locale_t x;
10766 int
10767 main ()
10768 {
10769
10770   ;
10771   return 0;
10772 }
10773 _ACEOF
10774 if ac_fn_c_try_compile "$LINENO"; then :
10775   pgac_cv_type_locale_t=yes
10776 else
10777   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10778 /* end confdefs.h.  */
10779 #include <xlocale.h>
10780 locale_t x;
10781 int
10782 main ()
10783 {
10784
10785   ;
10786   return 0;
10787 }
10788 _ACEOF
10789 if ac_fn_c_try_compile "$LINENO"; then :
10790   pgac_cv_type_locale_t='yes (in xlocale.h)'
10791 else
10792   pgac_cv_type_locale_t=no
10793 fi
10794 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10795 fi
10796 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10797 fi
10798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
10799 $as_echo "$pgac_cv_type_locale_t" >&6; }
10800 if test "$pgac_cv_type_locale_t" != no; then
10801
10802 $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
10803
10804 fi
10805 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
10806
10807 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
10808
10809 fi
10810
10811 ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
10812 #include <sys/param.h>
10813 #ifdef HAVE_SYS_UCRED_H
10814 #include <sys/ucred.h>
10815 #endif
10816 "
10817 if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
10818
10819 cat >>confdefs.h <<_ACEOF
10820 #define HAVE_STRUCT_CMSGCRED 1
10821 _ACEOF
10822
10823
10824 fi
10825
10826
10827 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
10828 #include <getopt.h>
10829 #endif
10830 "
10831 if test "x$ac_cv_type_struct_option" = xyes; then :
10832
10833 cat >>confdefs.h <<_ACEOF
10834 #define HAVE_STRUCT_OPTION 1
10835 _ACEOF
10836
10837
10838 fi
10839
10840
10841 if test "$with_zlib" = yes; then
10842   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
10843   # did not).  While we could work around the lack of z_streamp, it
10844   # seems unwise to encourage people to use such old zlib versions...
10845   ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
10846 "
10847 if test "x$ac_cv_type_z_streamp" = xyes; then :
10848
10849 else
10850   as_fn_error $? "zlib version is too old
10851 Use --without-zlib to disable zlib support." "$LINENO" 5
10852 fi
10853
10854 fi
10855
10856 # On PPC, check if assembler supports LWARX instruction's mutex hint bit
10857 case $host_cpu in
10858   ppc*|powerpc*)
10859     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports lwarx hint bit" >&5
10860 $as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
10861     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10862 /* end confdefs.h.  */
10863
10864 int
10865 main ()
10866 {
10867 int a = 0; int *p = &a; int r;
10868          __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
10869   ;
10870   return 0;
10871 }
10872 _ACEOF
10873 if ac_fn_c_try_compile "$LINENO"; then :
10874   pgac_cv_have_ppc_mutex_hint=yes
10875 else
10876   pgac_cv_have_ppc_mutex_hint=no
10877 fi
10878 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10879     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_ppc_mutex_hint" >&5
10880 $as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
10881     if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
10882
10883 $as_echo "#define HAVE_PPC_LWARX_MUTEX_HINT 1" >>confdefs.h
10884
10885     fi
10886   ;;
10887 esac
10888
10889 # Check largefile support.  You might think this is a system service not a
10890 # compiler characteristic, but you'd be wrong.  We must check this before
10891 # probing existence of related functions such as fseeko, since the largefile
10892 # defines can affect what is generated for that.
10893 if test "$PORTNAME" != "win32"; then
10894    # Check whether --enable-largefile was given.
10895 if test "${enable_largefile+set}" = set; then :
10896   enableval=$enable_largefile;
10897 fi
10898
10899 if test "$enable_largefile" != no; then
10900
10901   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
10902 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
10903 if ${ac_cv_sys_largefile_CC+:} false; then :
10904   $as_echo_n "(cached) " >&6
10905 else
10906   ac_cv_sys_largefile_CC=no
10907      if test "$GCC" != yes; then
10908        ac_save_CC=$CC
10909        while :; do
10910          # IRIX 6.2 and later do not support large files by default,
10911          # so use the C compiler's -n32 option if that helps.
10912          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10913 /* end confdefs.h.  */
10914 #include <sys/types.h>
10915  /* Check that off_t can represent 2**63 - 1 correctly.
10916     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10917     since some C++ compilers masquerading as C compilers
10918     incorrectly reject 9223372036854775807.  */
10919 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10920   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10921                        && LARGE_OFF_T % 2147483647 == 1)
10922                       ? 1 : -1];
10923 int
10924 main ()
10925 {
10926
10927   ;
10928   return 0;
10929 }
10930 _ACEOF
10931          if ac_fn_c_try_compile "$LINENO"; then :
10932   break
10933 fi
10934 rm -f core conftest.err conftest.$ac_objext
10935          CC="$CC -n32"
10936          if ac_fn_c_try_compile "$LINENO"; then :
10937   ac_cv_sys_largefile_CC=' -n32'; break
10938 fi
10939 rm -f core conftest.err conftest.$ac_objext
10940          break
10941        done
10942        CC=$ac_save_CC
10943        rm -f conftest.$ac_ext
10944     fi
10945 fi
10946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
10947 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
10948   if test "$ac_cv_sys_largefile_CC" != no; then
10949     CC=$CC$ac_cv_sys_largefile_CC
10950   fi
10951
10952   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
10953 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
10954 if ${ac_cv_sys_file_offset_bits+:} false; then :
10955   $as_echo_n "(cached) " >&6
10956 else
10957   while :; do
10958   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10959 /* end confdefs.h.  */
10960 #include <sys/types.h>
10961  /* Check that off_t can represent 2**63 - 1 correctly.
10962     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10963     since some C++ compilers masquerading as C compilers
10964     incorrectly reject 9223372036854775807.  */
10965 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10966   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10967                        && LARGE_OFF_T % 2147483647 == 1)
10968                       ? 1 : -1];
10969 int
10970 main ()
10971 {
10972
10973   ;
10974   return 0;
10975 }
10976 _ACEOF
10977 if ac_fn_c_try_compile "$LINENO"; then :
10978   ac_cv_sys_file_offset_bits=no; break
10979 fi
10980 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10981   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10982 /* end confdefs.h.  */
10983 #define _FILE_OFFSET_BITS 64
10984 #include <sys/types.h>
10985  /* Check that off_t can represent 2**63 - 1 correctly.
10986     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10987     since some C++ compilers masquerading as C compilers
10988     incorrectly reject 9223372036854775807.  */
10989 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10990   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10991                        && LARGE_OFF_T % 2147483647 == 1)
10992                       ? 1 : -1];
10993 int
10994 main ()
10995 {
10996
10997   ;
10998   return 0;
10999 }
11000 _ACEOF
11001 if ac_fn_c_try_compile "$LINENO"; then :
11002   ac_cv_sys_file_offset_bits=64; break
11003 fi
11004 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11005   ac_cv_sys_file_offset_bits=unknown
11006   break
11007 done
11008 fi
11009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
11010 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
11011 case $ac_cv_sys_file_offset_bits in #(
11012   no | unknown) ;;
11013   *)
11014 cat >>confdefs.h <<_ACEOF
11015 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
11016 _ACEOF
11017 ;;
11018 esac
11019 rm -rf conftest*
11020   if test $ac_cv_sys_file_offset_bits = unknown; then
11021     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
11022 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
11023 if ${ac_cv_sys_large_files+:} false; then :
11024   $as_echo_n "(cached) " >&6
11025 else
11026   while :; do
11027   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11028 /* end confdefs.h.  */
11029 #include <sys/types.h>
11030  /* Check that off_t can represent 2**63 - 1 correctly.
11031     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11032     since some C++ compilers masquerading as C compilers
11033     incorrectly reject 9223372036854775807.  */
11034 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11035   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11036                        && LARGE_OFF_T % 2147483647 == 1)
11037                       ? 1 : -1];
11038 int
11039 main ()
11040 {
11041
11042   ;
11043   return 0;
11044 }
11045 _ACEOF
11046 if ac_fn_c_try_compile "$LINENO"; then :
11047   ac_cv_sys_large_files=no; break
11048 fi
11049 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11050   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11051 /* end confdefs.h.  */
11052 #define _LARGE_FILES 1
11053 #include <sys/types.h>
11054  /* Check that off_t can represent 2**63 - 1 correctly.
11055     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11056     since some C++ compilers masquerading as C compilers
11057     incorrectly reject 9223372036854775807.  */
11058 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11059   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11060                        && LARGE_OFF_T % 2147483647 == 1)
11061                       ? 1 : -1];
11062 int
11063 main ()
11064 {
11065
11066   ;
11067   return 0;
11068 }
11069 _ACEOF
11070 if ac_fn_c_try_compile "$LINENO"; then :
11071   ac_cv_sys_large_files=1; break
11072 fi
11073 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11074   ac_cv_sys_large_files=unknown
11075   break
11076 done
11077 fi
11078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
11079 $as_echo "$ac_cv_sys_large_files" >&6; }
11080 case $ac_cv_sys_large_files in #(
11081   no | unknown) ;;
11082   *)
11083 cat >>confdefs.h <<_ACEOF
11084 #define _LARGE_FILES $ac_cv_sys_large_files
11085 _ACEOF
11086 ;;
11087 esac
11088 rm -rf conftest*
11089   fi
11090
11091
11092 fi
11093
11094
11095 fi
11096
11097 # Check for largefile support (must be after AC_SYS_LARGEFILE)
11098 # The cast to long int works around a bug in the HP C Compiler
11099 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11100 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11101 # This bug is HP SR number 8606223364.
11102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
11103 $as_echo_n "checking size of off_t... " >&6; }
11104 if ${ac_cv_sizeof_off_t+:} false; then :
11105   $as_echo_n "(cached) " >&6
11106 else
11107   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :
11108
11109 else
11110   if test "$ac_cv_type_off_t" = yes; then
11111      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11112 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11113 as_fn_error 77 "cannot compute sizeof (off_t)
11114 See \`config.log' for more details" "$LINENO" 5; }
11115    else
11116      ac_cv_sizeof_off_t=0
11117    fi
11118 fi
11119
11120 fi
11121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
11122 $as_echo "$ac_cv_sizeof_off_t" >&6; }
11123
11124
11125
11126 cat >>confdefs.h <<_ACEOF
11127 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
11128 _ACEOF
11129
11130
11131
11132 # If we don't have largefile support, can't handle segsize >= 2GB.
11133 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
11134    as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
11135 fi
11136
11137
11138 ##
11139 ## Functions, global variables
11140 ##
11141
11142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
11143 $as_echo_n "checking for int timezone... " >&6; }
11144 if ${pgac_cv_var_int_timezone+:} false; then :
11145   $as_echo_n "(cached) " >&6
11146 else
11147   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11148 /* end confdefs.h.  */
11149 #include <time.h>
11150 int res;
11151 int
11152 main ()
11153 {
11154 #ifndef __CYGWIN__
11155 res = timezone / 60;
11156 #else
11157 res = _timezone / 60;
11158 #endif
11159   ;
11160   return 0;
11161 }
11162 _ACEOF
11163 if ac_fn_c_try_link "$LINENO"; then :
11164   pgac_cv_var_int_timezone=yes
11165 else
11166   pgac_cv_var_int_timezone=no
11167 fi
11168 rm -f core conftest.err conftest.$ac_objext \
11169     conftest$ac_exeext conftest.$ac_ext
11170 fi
11171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
11172 $as_echo "$pgac_cv_var_int_timezone" >&6; }
11173 if test x"$pgac_cv_var_int_timezone" = xyes ; then
11174
11175 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
11176
11177 fi
11178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for accept()" >&5
11179 $as_echo_n "checking types of arguments for accept()... " >&6; }
11180  if ${ac_cv_func_accept_return+:} false; then :
11181   $as_echo_n "(cached) " >&6
11182 else
11183    if ${ac_cv_func_accept_arg1+:} false; then :
11184   $as_echo_n "(cached) " >&6
11185 else
11186     if ${ac_cv_func_accept_arg2+:} false; then :
11187   $as_echo_n "(cached) " >&6
11188 else
11189      if ${ac_cv_func_accept_arg3+:} false; then :
11190   $as_echo_n "(cached) " >&6
11191 else
11192       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL' 'SOCKET WSAAPI'; do
11193       for ac_cv_func_accept_arg1 in 'int' 'unsigned int' 'SOCKET'; do
11194        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
11195         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
11196          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11197 /* end confdefs.h.  */
11198 #ifdef HAVE_SYS_TYPES_H
11199 #include <sys/types.h>
11200 #endif
11201 #ifdef HAVE_SYS_SOCKET_H
11202 #include <sys/socket.h>
11203 #endif
11204 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
11205 int
11206 main ()
11207 {
11208
11209   ;
11210   return 0;
11211 }
11212 _ACEOF
11213 if ac_fn_c_try_compile "$LINENO"; then :
11214   ac_not_found=no; break 4
11215 else
11216   ac_not_found=yes
11217 fi
11218 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11219        done
11220       done
11221      done
11222     done
11223     if test "$ac_not_found" = yes; then
11224       as_fn_error $? "could not determine argument types" "$LINENO" 5
11225     fi
11226     if test "$ac_cv_func_accept_arg3" = "void"; then
11227       ac_cv_func_accept_arg3=int
11228     fi
11229
11230 fi
11231
11232 fi
11233
11234 fi
11235
11236 fi
11237  { $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
11238 $as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
11239
11240 cat >>confdefs.h <<_ACEOF
11241 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
11242 _ACEOF
11243
11244
11245 cat >>confdefs.h <<_ACEOF
11246 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
11247 _ACEOF
11248
11249
11250 cat >>confdefs.h <<_ACEOF
11251 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
11252 _ACEOF
11253
11254
11255 cat >>confdefs.h <<_ACEOF
11256 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
11257 _ACEOF
11258
11259
11260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
11261 $as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
11262 if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
11263   $as_echo_n "(cached) " >&6
11264 else
11265   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11266 /* end confdefs.h.  */
11267 #include <sys/time.h>
11268 int
11269 main ()
11270 {
11271 struct timeval *tp;
11272 struct timezone *tzp;
11273 gettimeofday(tp,tzp);
11274   ;
11275   return 0;
11276 }
11277 _ACEOF
11278 if ac_fn_c_try_compile "$LINENO"; then :
11279   pgac_cv_func_gettimeofday_1arg=no
11280 else
11281   pgac_cv_func_gettimeofday_1arg=yes
11282 fi
11283 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11284 fi
11285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5
11286 $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
11287 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
11288
11289 $as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
11290
11291 fi
11292
11293
11294 # Some versions of libedit contain strlcpy(), setproctitle(), and other
11295 # symbols that that library has no business exposing to the world.  Pending
11296 # acquisition of a clue by those developers, ignore libedit (including its
11297 # possible alias of libreadline) while checking for everything else.
11298 LIBS_including_readline="$LIBS"
11299 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
11300
11301 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
11302 do :
11303   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11304 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11305 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11306   cat >>confdefs.h <<_ACEOF
11307 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11308 _ACEOF
11309
11310 fi
11311 done
11312
11313
11314 ac_fn_c_check_func "$LINENO" "fseeko" "ac_cv_func_fseeko"
11315 if test "x$ac_cv_func_fseeko" = xyes; then :
11316   $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
11317
11318 else
11319   case " $LIBOBJS " in
11320   *" fseeko.$ac_objext "* ) ;;
11321   *) LIBOBJS="$LIBOBJS fseeko.$ac_objext"
11322  ;;
11323 esac
11324
11325 fi
11326
11327
11328 case $host_os in
11329         # NetBSD uses a custom fseeko/ftello built on fsetpos/fgetpos
11330         # Mingw uses macros to access Win32 API calls
11331         netbsd*|mingw*)
11332
11333 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
11334
11335                 ac_cv_func_fseeko=yes;;
11336         *)
11337                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
11338 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
11339 if ${ac_cv_sys_largefile_source+:} false; then :
11340   $as_echo_n "(cached) " >&6
11341 else
11342   while :; do
11343   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11344 /* end confdefs.h.  */
11345 #include <sys/types.h> /* for off_t */
11346      #include <stdio.h>
11347 int
11348 main ()
11349 {
11350 int (*fp) (FILE *, off_t, int) = fseeko;
11351      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
11352   ;
11353   return 0;
11354 }
11355 _ACEOF
11356 if ac_fn_c_try_link "$LINENO"; then :
11357   ac_cv_sys_largefile_source=no; break
11358 fi
11359 rm -f core conftest.err conftest.$ac_objext \
11360     conftest$ac_exeext conftest.$ac_ext
11361   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11362 /* end confdefs.h.  */
11363 #define _LARGEFILE_SOURCE 1
11364 #include <sys/types.h> /* for off_t */
11365      #include <stdio.h>
11366 int
11367 main ()
11368 {
11369 int (*fp) (FILE *, off_t, int) = fseeko;
11370      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
11371   ;
11372   return 0;
11373 }
11374 _ACEOF
11375 if ac_fn_c_try_link "$LINENO"; then :
11376   ac_cv_sys_largefile_source=1; break
11377 fi
11378 rm -f core conftest.err conftest.$ac_objext \
11379     conftest$ac_exeext conftest.$ac_ext
11380   ac_cv_sys_largefile_source=unknown
11381   break
11382 done
11383 fi
11384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
11385 $as_echo "$ac_cv_sys_largefile_source" >&6; }
11386 case $ac_cv_sys_largefile_source in #(
11387   no | unknown) ;;
11388   *)
11389 cat >>confdefs.h <<_ACEOF
11390 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
11391 _ACEOF
11392 ;;
11393 esac
11394 rm -rf conftest*
11395
11396 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
11397 # in glibc 2.1.3, but that breaks too many other things.
11398 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
11399 if test $ac_cv_sys_largefile_source != unknown; then
11400
11401 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
11402
11403 fi
11404 ;;
11405 esac
11406
11407 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
11408 # by calling it, 2009-04-02
11409 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
11410 if test "$PORTNAME" != "solaris"; then
11411 for ac_func in posix_fadvise
11412 do :
11413   ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
11414 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
11415   cat >>confdefs.h <<_ACEOF
11416 #define HAVE_POSIX_FADVISE 1
11417 _ACEOF
11418
11419 fi
11420 done
11421
11422 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
11423 "
11424 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
11425   ac_have_decl=1
11426 else
11427   ac_have_decl=0
11428 fi
11429
11430 cat >>confdefs.h <<_ACEOF
11431 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
11432 _ACEOF
11433
11434 fi
11435
11436 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
11437 "
11438 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
11439   ac_have_decl=1
11440 else
11441   ac_have_decl=0
11442 fi
11443
11444 cat >>confdefs.h <<_ACEOF
11445 #define HAVE_DECL_FDATASYNC $ac_have_decl
11446 _ACEOF
11447
11448 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
11449 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
11450   ac_have_decl=1
11451 else
11452   ac_have_decl=0
11453 fi
11454
11455 cat >>confdefs.h <<_ACEOF
11456 #define HAVE_DECL_STRLCAT $ac_have_decl
11457 _ACEOF
11458 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
11459 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
11460   ac_have_decl=1
11461 else
11462   ac_have_decl=0
11463 fi
11464
11465 cat >>confdefs.h <<_ACEOF
11466 #define HAVE_DECL_STRLCPY $ac_have_decl
11467 _ACEOF
11468
11469 # This is probably only present on Darwin, but may as well check always
11470 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
11471 "
11472 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
11473   ac_have_decl=1
11474 else
11475   ac_have_decl=0
11476 fi
11477
11478 cat >>confdefs.h <<_ACEOF
11479 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
11480 _ACEOF
11481
11482
11483 HAVE_IPV6=no
11484 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default
11485 #include <netinet/in.h>
11486 "
11487 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
11488
11489 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
11490
11491          HAVE_IPV6=yes
11492 fi
11493
11494
11495
11496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
11497 $as_echo_n "checking for PS_STRINGS... " >&6; }
11498 if ${pgac_cv_var_PS_STRINGS+:} false; then :
11499   $as_echo_n "(cached) " >&6
11500 else
11501   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11502 /* end confdefs.h.  */
11503 #include <machine/vmparam.h>
11504 #include <sys/exec.h>
11505
11506 int
11507 main ()
11508 {
11509 PS_STRINGS->ps_nargvstr = 1;
11510 PS_STRINGS->ps_argvstr = "foo";
11511   ;
11512   return 0;
11513 }
11514 _ACEOF
11515 if ac_fn_c_try_link "$LINENO"; then :
11516   pgac_cv_var_PS_STRINGS=yes
11517 else
11518   pgac_cv_var_PS_STRINGS=no
11519 fi
11520 rm -f core conftest.err conftest.$ac_objext \
11521     conftest$ac_exeext conftest.$ac_ext
11522 fi
11523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
11524 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
11525 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
11526
11527 $as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
11528
11529 fi
11530
11531
11532 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
11533 # is missing.  Yes, there are machines that have only one.  We may
11534 # also decide to use snprintf.c if snprintf() is present but does not
11535 # have all the features we need --- see below.
11536
11537 if test "$PORTNAME" = "win32"; then
11538   # Win32 gets snprintf.c built unconditionally.
11539   #
11540   # To properly translate all NLS languages strings, we must support the
11541   # *printf() %$ format, which allows *printf() arguments to be selected
11542   # by position in the translated string.
11543   #
11544   # libintl versions < 0.13 use the native *printf() functions, and Win32
11545   # *printf() doesn't understand %$, so we must use our /port versions,
11546   # which do understand %$. libintl versions >= 0.13 include their own
11547   # *printf versions on Win32.  The libintl 0.13 release note text is:
11548   #
11549   #   C format strings with positions, as they arise when a translator
11550   #   needs to reorder a sentence, are now supported on all platforms.
11551   #   On those few platforms (NetBSD and Woe32) for which the native
11552   #   printf()/fprintf()/... functions don't support such format
11553   #   strings, replacements are provided through <libintl.h>.
11554   #
11555   # We could use libintl >= 0.13's *printf() if we were sure that we had
11556   # a litint >= 0.13 at runtime, but seeing that there is no clean way
11557   # to guarantee that, it is best to just use our own, so we are sure to
11558   # get %$ support. In include/port.h we disable the *printf() macros
11559   # that might have been defined by libintl.
11560   #
11561   # We do this unconditionally whether NLS is used or not so we are sure
11562   # that all Win32 libraries and binaries behave the same.
11563   pgac_need_repl_snprintf=yes
11564 else
11565   pgac_need_repl_snprintf=no
11566   for ac_func in snprintf
11567 do :
11568   ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
11569 if test "x$ac_cv_func_snprintf" = xyes; then :
11570   cat >>confdefs.h <<_ACEOF
11571 #define HAVE_SNPRINTF 1
11572 _ACEOF
11573
11574 else
11575   pgac_need_repl_snprintf=yes
11576 fi
11577 done
11578
11579   for ac_func in vsnprintf
11580 do :
11581   ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
11582 if test "x$ac_cv_func_vsnprintf" = xyes; then :
11583   cat >>confdefs.h <<_ACEOF
11584 #define HAVE_VSNPRINTF 1
11585 _ACEOF
11586
11587 else
11588   pgac_need_repl_snprintf=yes
11589 fi
11590 done
11591
11592 fi
11593
11594
11595 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
11596 # include/c.h will provide declarations.  Note this is a separate test
11597 # from whether the functions exist in the C library --- there are
11598 # systems that have the functions but don't bother to declare them :-(
11599
11600 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11601 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
11602   ac_have_decl=1
11603 else
11604   ac_have_decl=0
11605 fi
11606
11607 cat >>confdefs.h <<_ACEOF
11608 #define HAVE_DECL_SNPRINTF $ac_have_decl
11609 _ACEOF
11610 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
11611 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
11612   ac_have_decl=1
11613 else
11614   ac_have_decl=0
11615 fi
11616
11617 cat >>confdefs.h <<_ACEOF
11618 #define HAVE_DECL_VSNPRINTF $ac_have_decl
11619 _ACEOF
11620
11621
11622
11623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf" >&5
11624 $as_echo_n "checking for isinf... " >&6; }
11625 if ${ac_cv_func_isinf+:} false; then :
11626   $as_echo_n "(cached) " >&6
11627 else
11628   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11629 /* end confdefs.h.  */
11630
11631 #include <math.h>
11632 double glob_double;
11633
11634 int
11635 main ()
11636 {
11637 return isinf(glob_double) ? 0 : 1;
11638   ;
11639   return 0;
11640 }
11641 _ACEOF
11642 if ac_fn_c_try_link "$LINENO"; then :
11643   ac_cv_func_isinf=yes
11644 else
11645   ac_cv_func_isinf=no
11646 fi
11647 rm -f core conftest.err conftest.$ac_objext \
11648     conftest$ac_exeext conftest.$ac_ext
11649 fi
11650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_isinf" >&5
11651 $as_echo "$ac_cv_func_isinf" >&6; }
11652
11653 if test $ac_cv_func_isinf = yes ; then
11654
11655 $as_echo "#define HAVE_ISINF 1" >>confdefs.h
11656
11657 else
11658   case " $LIBOBJS " in
11659   *" isinf.$ac_objext "* ) ;;
11660   *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
11661  ;;
11662 esac
11663
11664   # Look for a way to implement a substitute for isinf()
11665   for ac_func in fpclass fp_class fp_class_d class
11666 do :
11667   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11668 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11669 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11670   cat >>confdefs.h <<_ACEOF
11671 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11672 _ACEOF
11673  break
11674 fi
11675 done
11676
11677 fi
11678
11679 ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
11680 if test "x$ac_cv_func_crypt" = xyes; then :
11681   $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
11682
11683 else
11684   case " $LIBOBJS " in
11685   *" crypt.$ac_objext "* ) ;;
11686   *) LIBOBJS="$LIBOBJS crypt.$ac_objext"
11687  ;;
11688 esac
11689
11690 fi
11691
11692 ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
11693 if test "x$ac_cv_func_fls" = xyes; then :
11694   $as_echo "#define HAVE_FLS 1" >>confdefs.h
11695
11696 else
11697   case " $LIBOBJS " in
11698   *" fls.$ac_objext "* ) ;;
11699   *) LIBOBJS="$LIBOBJS fls.$ac_objext"
11700  ;;
11701 esac
11702
11703 fi
11704
11705 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
11706 if test "x$ac_cv_func_getopt" = xyes; then :
11707   $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
11708
11709 else
11710   case " $LIBOBJS " in
11711   *" getopt.$ac_objext "* ) ;;
11712   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
11713  ;;
11714 esac
11715
11716 fi
11717
11718 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
11719 if test "x$ac_cv_func_getrusage" = xyes; then :
11720   $as_echo "#define HAVE_GETRUSAGE 1" >>confdefs.h
11721
11722 else
11723   case " $LIBOBJS " in
11724   *" getrusage.$ac_objext "* ) ;;
11725   *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
11726  ;;
11727 esac
11728
11729 fi
11730
11731 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
11732 if test "x$ac_cv_func_inet_aton" = xyes; then :
11733   $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
11734
11735 else
11736   case " $LIBOBJS " in
11737   *" inet_aton.$ac_objext "* ) ;;
11738   *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
11739  ;;
11740 esac
11741
11742 fi
11743
11744 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
11745 if test "x$ac_cv_func_mkdtemp" = xyes; then :
11746   $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
11747
11748 else
11749   case " $LIBOBJS " in
11750   *" mkdtemp.$ac_objext "* ) ;;
11751   *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
11752  ;;
11753 esac
11754
11755 fi
11756
11757 ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
11758 if test "x$ac_cv_func_random" = xyes; then :
11759   $as_echo "#define HAVE_RANDOM 1" >>confdefs.h
11760
11761 else
11762   case " $LIBOBJS " in
11763   *" random.$ac_objext "* ) ;;
11764   *) LIBOBJS="$LIBOBJS random.$ac_objext"
11765  ;;
11766 esac
11767
11768 fi
11769
11770 ac_fn_c_check_func "$LINENO" "rint" "ac_cv_func_rint"
11771 if test "x$ac_cv_func_rint" = xyes; then :
11772   $as_echo "#define HAVE_RINT 1" >>confdefs.h
11773
11774 else
11775   case " $LIBOBJS " in
11776   *" rint.$ac_objext "* ) ;;
11777   *) LIBOBJS="$LIBOBJS rint.$ac_objext"
11778  ;;
11779 esac
11780
11781 fi
11782
11783 ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
11784 if test "x$ac_cv_func_srandom" = xyes; then :
11785   $as_echo "#define HAVE_SRANDOM 1" >>confdefs.h
11786
11787 else
11788   case " $LIBOBJS " in
11789   *" srandom.$ac_objext "* ) ;;
11790   *) LIBOBJS="$LIBOBJS srandom.$ac_objext"
11791  ;;
11792 esac
11793
11794 fi
11795
11796 ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
11797 if test "x$ac_cv_func_strerror" = xyes; then :
11798   $as_echo "#define HAVE_STRERROR 1" >>confdefs.h
11799
11800 else
11801   case " $LIBOBJS " in
11802   *" strerror.$ac_objext "* ) ;;
11803   *) LIBOBJS="$LIBOBJS strerror.$ac_objext"
11804  ;;
11805 esac
11806
11807 fi
11808
11809 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
11810 if test "x$ac_cv_func_strlcat" = xyes; then :
11811   $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
11812
11813 else
11814   case " $LIBOBJS " in
11815   *" strlcat.$ac_objext "* ) ;;
11816   *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
11817  ;;
11818 esac
11819
11820 fi
11821
11822 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
11823 if test "x$ac_cv_func_strlcpy" = xyes; then :
11824   $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
11825
11826 else
11827   case " $LIBOBJS " in
11828   *" strlcpy.$ac_objext "* ) ;;
11829   *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
11830  ;;
11831 esac
11832
11833 fi
11834
11835
11836
11837 case $host_os in
11838
11839         # Windows uses a specialised env handler
11840         # and doesn't need a replacement getpeereid because it doesn't use
11841         # Unix sockets.
11842         mingw*)
11843
11844 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
11845
11846
11847 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
11848
11849                 ac_cv_func_unsetenv=yes
11850                 ac_cv_func_getpeereid=yes;;
11851         *)
11852                 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
11853 if test "x$ac_cv_func_unsetenv" = xyes; then :
11854   $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
11855
11856 else
11857   case " $LIBOBJS " in
11858   *" unsetenv.$ac_objext "* ) ;;
11859   *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext"
11860  ;;
11861 esac
11862
11863 fi
11864
11865 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
11866 if test "x$ac_cv_func_getpeereid" = xyes; then :
11867   $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
11868
11869 else
11870   case " $LIBOBJS " in
11871   *" getpeereid.$ac_objext "* ) ;;
11872   *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
11873  ;;
11874 esac
11875
11876 fi
11877
11878
11879                 ;;
11880 esac
11881
11882 # System's version of getaddrinfo(), if any, may be used only if we found
11883 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
11884 # We use only our own getaddrinfo.c on Windows, but it's time to revisit that.
11885 if test x"$ac_cv_type_struct_addrinfo" = xyes && \
11886    test "$PORTNAME" != "win32"; then
11887   ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
11888 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
11889   $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
11890
11891 else
11892   case " $LIBOBJS " in
11893   *" getaddrinfo.$ac_objext "* ) ;;
11894   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
11895  ;;
11896 esac
11897
11898 fi
11899
11900
11901 else
11902   case " $LIBOBJS " in
11903   *" getaddrinfo.$ac_objext "* ) ;;
11904   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
11905  ;;
11906 esac
11907
11908 fi
11909
11910 # Similarly, use system's getopt_long() only if system provides struct option.
11911 if test x"$ac_cv_type_struct_option" = xyes ; then
11912   ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
11913 if test "x$ac_cv_func_getopt_long" = xyes; then :
11914   $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
11915
11916 else
11917   case " $LIBOBJS " in
11918   *" getopt_long.$ac_objext "* ) ;;
11919   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
11920  ;;
11921 esac
11922
11923 fi
11924
11925
11926 else
11927   case " $LIBOBJS " in
11928   *" getopt_long.$ac_objext "* ) ;;
11929   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
11930  ;;
11931 esac
11932
11933 fi
11934
11935 # Solaris' getopt() doesn't do what we want for long options, so always use
11936 # our version on that platform.
11937 if test "$PORTNAME" = "solaris"; then
11938   case " $LIBOBJS " in
11939   *" getopt.$ac_objext "* ) ;;
11940   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
11941  ;;
11942 esac
11943
11944 fi
11945
11946 # mingw has adopted a GNU-centric interpretation of optind/optreset,
11947 # so always use our version on Windows.
11948 if test "$PORTNAME" = "win32"; then
11949   case " $LIBOBJS " in
11950   *" getopt.$ac_objext "* ) ;;
11951   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
11952  ;;
11953 esac
11954
11955   case " $LIBOBJS " in
11956   *" getopt_long.$ac_objext "* ) ;;
11957   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
11958  ;;
11959 esac
11960
11961 fi
11962
11963 # Win32 support
11964 if test "$PORTNAME" = "win32"; then
11965   ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
11966 if test "x$ac_cv_func_gettimeofday" = xyes; then :
11967   $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
11968
11969 else
11970   case " $LIBOBJS " in
11971   *" gettimeofday.$ac_objext "* ) ;;
11972   *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
11973  ;;
11974 esac
11975
11976 fi
11977
11978
11979   case " $LIBOBJS " in
11980   *" kill.$ac_objext "* ) ;;
11981   *) LIBOBJS="$LIBOBJS kill.$ac_objext"
11982  ;;
11983 esac
11984
11985   case " $LIBOBJS " in
11986   *" open.$ac_objext "* ) ;;
11987   *) LIBOBJS="$LIBOBJS open.$ac_objext"
11988  ;;
11989 esac
11990
11991   case " $LIBOBJS " in
11992   *" system.$ac_objext "* ) ;;
11993   *) LIBOBJS="$LIBOBJS system.$ac_objext"
11994  ;;
11995 esac
11996
11997   case " $LIBOBJS " in
11998   *" win32env.$ac_objext "* ) ;;
11999   *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
12000  ;;
12001 esac
12002
12003   case " $LIBOBJS " in
12004   *" win32error.$ac_objext "* ) ;;
12005   *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
12006  ;;
12007 esac
12008
12009   case " $LIBOBJS " in
12010   *" win32setlocale.$ac_objext "* ) ;;
12011   *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
12012  ;;
12013 esac
12014
12015
12016 $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
12017
12018   ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
12019 #define WIN32_LEAN_AND_MEAN
12020 #include <windows.h>
12021 #include <string.h>
12022 #include <dbghelp.h>
12023 "
12024 if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
12025
12026 cat >>confdefs.h <<_ACEOF
12027 #define HAVE_MINIDUMP_TYPE 1
12028 _ACEOF
12029
12030 pgac_minidump_type=yes
12031 else
12032   pgac_minidump_type=no
12033 fi
12034
12035 fi
12036 if test x"$pgac_minidump_type" = x"yes" ; then
12037   have_win32_dbghelp=yes
12038
12039 else
12040   have_win32_dbghelp=no
12041
12042 fi
12043
12044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
12045 $as_echo_n "checking for sigsetjmp... " >&6; }
12046 if ${pgac_cv_func_sigsetjmp+:} false; then :
12047   $as_echo_n "(cached) " >&6
12048 else
12049   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12050 /* end confdefs.h.  */
12051 #include <setjmp.h>
12052 int
12053 main ()
12054 {
12055 sigjmp_buf x; sigsetjmp(x, 1);
12056   ;
12057   return 0;
12058 }
12059 _ACEOF
12060 if ac_fn_c_try_link "$LINENO"; then :
12061   pgac_cv_func_sigsetjmp=yes
12062 else
12063   pgac_cv_func_sigsetjmp=no
12064 fi
12065 rm -f core conftest.err conftest.$ac_objext \
12066     conftest$ac_exeext conftest.$ac_ext
12067 fi
12068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_sigsetjmp" >&5
12069 $as_echo "$pgac_cv_func_sigsetjmp" >&6; }
12070 if test x"$pgac_cv_func_sigsetjmp" = x"yes"; then
12071
12072 $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
12073
12074 fi
12075
12076 ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
12077 /* NetBSD declares sys_siglist in unistd.h.  */
12078 #ifdef HAVE_UNISTD_H
12079 # include <unistd.h>
12080 #endif
12081
12082 "
12083 if test "x$ac_cv_have_decl_sys_siglist" = xyes; then :
12084   ac_have_decl=1
12085 else
12086   ac_have_decl=0
12087 fi
12088
12089 cat >>confdefs.h <<_ACEOF
12090 #define HAVE_DECL_SYS_SIGLIST $ac_have_decl
12091 _ACEOF
12092
12093
12094
12095 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
12096 if test "x$ac_cv_func_syslog" = xyes; then :
12097   ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
12098 if test "x$ac_cv_header_syslog_h" = xyes; then :
12099
12100 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
12101
12102 fi
12103
12104
12105 fi
12106
12107
12108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
12109 $as_echo_n "checking for opterr... " >&6; }
12110 if ${pgac_cv_var_int_opterr+:} false; then :
12111   $as_echo_n "(cached) " >&6
12112 else
12113   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12114 /* end confdefs.h.  */
12115 #include <unistd.h>
12116 int
12117 main ()
12118 {
12119 extern int opterr; opterr = 1;
12120   ;
12121   return 0;
12122 }
12123 _ACEOF
12124 if ac_fn_c_try_link "$LINENO"; then :
12125   pgac_cv_var_int_opterr=yes
12126 else
12127   pgac_cv_var_int_opterr=no
12128 fi
12129 rm -f core conftest.err conftest.$ac_objext \
12130     conftest$ac_exeext conftest.$ac_ext
12131 fi
12132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
12133 $as_echo "$pgac_cv_var_int_opterr" >&6; }
12134 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
12135
12136 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
12137
12138 fi
12139
12140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
12141 $as_echo_n "checking for optreset... " >&6; }
12142 if ${pgac_cv_var_int_optreset+:} false; then :
12143   $as_echo_n "(cached) " >&6
12144 else
12145   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12146 /* end confdefs.h.  */
12147 #include <unistd.h>
12148 int
12149 main ()
12150 {
12151 extern int optreset; optreset = 1;
12152   ;
12153   return 0;
12154 }
12155 _ACEOF
12156 if ac_fn_c_try_link "$LINENO"; then :
12157   pgac_cv_var_int_optreset=yes
12158 else
12159   pgac_cv_var_int_optreset=no
12160 fi
12161 rm -f core conftest.err conftest.$ac_objext \
12162     conftest$ac_exeext conftest.$ac_ext
12163 fi
12164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
12165 $as_echo "$pgac_cv_var_int_optreset" >&6; }
12166 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
12167
12168 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
12169
12170 fi
12171
12172 for ac_func in strtoll strtoq
12173 do :
12174   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12175 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12176 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12177   cat >>confdefs.h <<_ACEOF
12178 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12179 _ACEOF
12180  break
12181 fi
12182 done
12183
12184 for ac_func in strtoull strtouq
12185 do :
12186   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12187 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12188 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12189   cat >>confdefs.h <<_ACEOF
12190 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12191 _ACEOF
12192  break
12193 fi
12194 done
12195
12196
12197 # Lastly, restore full LIBS list and check for readline/libedit symbols
12198 LIBS="$LIBS_including_readline"
12199
12200 if test "$with_readline" = yes; then
12201   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_append_character" >&5
12202 $as_echo_n "checking for rl_completion_append_character... " >&6; }
12203 if ${pgac_cv_var_rl_completion_append_character+:} false; then :
12204   $as_echo_n "(cached) " >&6
12205 else
12206   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12207 /* end confdefs.h.  */
12208 #include <stdio.h>
12209 #ifdef HAVE_READLINE_READLINE_H
12210 # include <readline/readline.h>
12211 #elif defined(HAVE_READLINE_H)
12212 # include <readline.h>
12213 #endif
12214
12215 int
12216 main ()
12217 {
12218 rl_completion_append_character = 'x';
12219   ;
12220   return 0;
12221 }
12222 _ACEOF
12223 if ac_fn_c_try_link "$LINENO"; then :
12224   pgac_cv_var_rl_completion_append_character=yes
12225 else
12226   pgac_cv_var_rl_completion_append_character=no
12227 fi
12228 rm -f core conftest.err conftest.$ac_objext \
12229     conftest$ac_exeext conftest.$ac_ext
12230 fi
12231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_append_character" >&5
12232 $as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
12233 if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
12234
12235 $as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
12236
12237 fi
12238   for ac_func in rl_completion_matches rl_filename_completion_function
12239 do :
12240   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12241 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12242 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12243   cat >>confdefs.h <<_ACEOF
12244 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12245 _ACEOF
12246
12247 fi
12248 done
12249
12250   for ac_func in append_history history_truncate_file
12251 do :
12252   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12253 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12254 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12255   cat >>confdefs.h <<_ACEOF
12256 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12257 _ACEOF
12258
12259 fi
12260 done
12261
12262 fi
12263
12264
12265 #
12266 # Pthreads
12267 #
12268 # For each platform, we need to know about any special compile and link
12269 # libraries, and whether the normal C function names are thread-safe.
12270 # See the comment at the top of src/port/thread.c for more information.
12271 # WIN32 doesn't need the pthread tests;  it always uses threads
12272 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then
12273
12274
12275
12276 ac_ext=c
12277 ac_cpp='$CPP $CPPFLAGS'
12278 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12279 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12280 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12281
12282 acx_pthread_ok=no
12283
12284 # We used to check for pthread.h first, but this fails if pthread.h
12285 # requires special compiler flags (e.g. on True64 or Sequent).
12286 # It gets checked for in the link test anyway.
12287
12288 # First of all, check if the user has set any of the PTHREAD_LIBS,
12289 # etcetera environment variables, and if threads linking works using
12290 # them:
12291 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
12292         save_CFLAGS="$CFLAGS"
12293         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
12294         save_LIBS="$LIBS"
12295         LIBS="$PTHREAD_LIBS $LIBS"
12296         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
12297 $as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
12298         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12299 /* end confdefs.h.  */
12300
12301 /* Override any GCC internal prototype to avoid an error.
12302    Use char because int might match the return type of a GCC
12303    builtin and then its argument prototype would still apply.  */
12304 #ifdef __cplusplus
12305 extern "C"
12306 #endif
12307 char pthread_join ();
12308 int
12309 main ()
12310 {
12311 return pthread_join ();
12312   ;
12313   return 0;
12314 }
12315 _ACEOF
12316 if ac_fn_c_try_link "$LINENO"; then :
12317   acx_pthread_ok=yes
12318 fi
12319 rm -f core conftest.err conftest.$ac_objext \
12320     conftest$ac_exeext conftest.$ac_ext
12321         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5
12322 $as_echo "$acx_pthread_ok" >&6; }
12323         if test x"$acx_pthread_ok" = xno; then
12324                 PTHREAD_LIBS=""
12325                 PTHREAD_CFLAGS=""
12326         fi
12327         LIBS="$save_LIBS"
12328         CFLAGS="$save_CFLAGS"
12329 fi
12330
12331 # We must check for the threads library under a number of different
12332 # names; the ordering is very important because some systems
12333 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
12334 # libraries is broken (non-POSIX).
12335
12336 # Create a list of thread flags to try.  Items starting with a "-" are
12337 # C compiler flags, and other items are library names, except for "none"
12338 # which indicates that we try without any flags at all, and "pthread-config"
12339 # which is a program returning the flags for the Pth emulation library.
12340
12341 acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config pthreadGC2"
12342
12343 # The ordering *is* (sometimes) important.  Some notes on the
12344 # individual items follow:
12345
12346 # pthreads: AIX (must check this before -lpthread)
12347 # none: in case threads are in libc; should be tried before -Kthread and
12348 #       other compiler flags to prevent continual compiler warnings
12349 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
12350 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
12351 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
12352 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
12353 # -pthreads: Solaris/gcc
12354 # -mthreads: Mingw32/gcc, Lynx/gcc
12355 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
12356 #      doesn't hurt to check since this sometimes defines pthreads too;
12357 #      also defines -D_REENTRANT)
12358 # pthread: Linux, etcetera
12359 # --thread-safe: KAI C++
12360 # pthread-config: use pthread-config program (for GNU Pth library)
12361
12362 case "${host_cpu}-${host_os}" in
12363         *solaris*)
12364
12365         # On Solaris (at least, for some versions), libc contains stubbed
12366         # (non-functional) versions of the pthreads routines, so link-based
12367         # tests will erroneously succeed.  (We need to link with -pthread or
12368         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
12369         # a function called by this macro, so we could check for that, but
12370         # who knows whether they'll stub that too in a future libc.)  So,
12371         # we'll just look for -pthreads and -lpthread first:
12372
12373         acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
12374         ;;
12375 esac
12376
12377 if test x"$acx_pthread_ok" = xno; then
12378 for flag in $acx_pthread_flags; do
12379
12380         tryPTHREAD_CFLAGS=""
12381         tryPTHREAD_LIBS=""
12382         case $flag in
12383                 none)
12384                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
12385 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
12386                 ;;
12387
12388                 -*)
12389                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
12390 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
12391                 tryPTHREAD_CFLAGS="$flag"
12392                 ;;
12393
12394                 pthread-config)
12395                 # skip this if we already have flags defined, for PostgreSQL
12396                 if test x"$PTHREAD_CFLAGS" != x -o x"$PTHREAD_LIBS" != x; then continue; fi
12397                 # Extract the first word of "pthread-config", so it can be a program name with args.
12398 set dummy pthread-config; ac_word=$2
12399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12400 $as_echo_n "checking for $ac_word... " >&6; }
12401 if ${ac_cv_prog_acx_pthread_config+:} false; then :
12402   $as_echo_n "(cached) " >&6
12403 else
12404   if test -n "$acx_pthread_config"; then
12405   ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
12406 else
12407 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12408 for as_dir in $PATH
12409 do
12410   IFS=$as_save_IFS
12411   test -z "$as_dir" && as_dir=.
12412     for ac_exec_ext in '' $ac_executable_extensions; do
12413   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12414     ac_cv_prog_acx_pthread_config="yes"
12415     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12416     break 2
12417   fi
12418 done
12419   done
12420 IFS=$as_save_IFS
12421
12422   test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
12423 fi
12424 fi
12425 acx_pthread_config=$ac_cv_prog_acx_pthread_config
12426 if test -n "$acx_pthread_config"; then
12427   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_config" >&5
12428 $as_echo "$acx_pthread_config" >&6; }
12429 else
12430   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12431 $as_echo "no" >&6; }
12432 fi
12433
12434
12435                 if test x"$acx_pthread_config" = xno; then continue; fi
12436                 tryPTHREAD_CFLAGS="`pthread-config --cflags`"
12437                 tryPTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
12438                 ;;
12439
12440                 *)
12441                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
12442 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
12443                 tryPTHREAD_LIBS="-l$flag"
12444                 ;;
12445         esac
12446
12447         save_LIBS="$LIBS"
12448         save_CFLAGS="$CFLAGS"
12449         LIBS="$tryPTHREAD_LIBS $PTHREAD_LIBS $LIBS"
12450         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
12451
12452         # Check for various functions.  We must include pthread.h,
12453         # since some functions may be macros.  (On the Sequent, we
12454         # need a special flag -Kthread to make this header compile.)
12455         # We check for pthread_join because it is in -lpthread on IRIX
12456         # while pthread_create is in libc.  We check for pthread_attr_init
12457         # due to DEC craziness with -lpthreads.  We check for
12458         # pthread_cleanup_push because it is one of the few pthread
12459         # functions on Solaris that doesn't have a non-functional libc stub.
12460         # We try pthread_create on general principles.
12461         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12462 /* end confdefs.h.  */
12463 #include <pthread.h>
12464 int
12465 main ()
12466 {
12467 pthread_t th; pthread_join(th, 0);
12468                      pthread_attr_init(0); pthread_cleanup_push(0, 0);
12469                      pthread_create(0,0,0,0); pthread_cleanup_pop(0);
12470   ;
12471   return 0;
12472 }
12473 _ACEOF
12474 if ac_fn_c_try_link "$LINENO"; then :
12475   acx_pthread_ok=yes
12476 else
12477   acx_pthread_ok=no
12478 fi
12479 rm -f core conftest.err conftest.$ac_objext \
12480     conftest$ac_exeext conftest.$ac_ext
12481
12482         if test "x$acx_pthread_ok" = xyes; then
12483             # Don't use options that are ignored by the compiler.
12484             # We find them by checking stderror.
12485             cat >conftest.$ac_ext <<_ACEOF
12486 int
12487 main (int argc, char **argv)
12488 {
12489   (void) argc;
12490   (void) argv;
12491   return 0;
12492 }
12493 _ACEOF
12494             rm -f conftest.$ac_objext conftest$ac_exeext
12495             # Check both linking and compiling, because they might tolerate different options.
12496             if test "`(eval $ac_link 2>&1 1>&5)`" = "" && test "`(eval $ac_compile 2>&1 1>&5)`" = ""; then
12497                 # The original macro breaks out of the loop at this point,
12498                 # but we continue trying flags because Linux needs -lpthread
12499                 # too to build libpq successfully.  The test above only
12500                 # tests for building binaries, not shared libraries.
12501                 PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
12502                 PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
12503             else   acx_pthread_ok=no
12504             fi
12505         fi
12506
12507         LIBS="$save_LIBS"
12508         CFLAGS="$save_CFLAGS"
12509
12510         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5
12511 $as_echo "$acx_pthread_ok" >&6; }
12512 done
12513 fi
12514
12515 # The original macro has a bunch of other tests here, which we have removed
12516 # because (a) Postgres doesn't need them, and (b) $acx_pthread_ok is not
12517 # meaningful at this point.
12518
12519
12520
12521
12522 ac_ext=c
12523 ac_cpp='$CPP $CPPFLAGS'
12524 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12525 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12526 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12527
12528         # set thread flags
12529
12530 # Some platforms use these, so just define them.  They can't hurt if they
12531 # are not supported.  For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
12532 # enables 5-arg getpwuid_r, among other things.
12533 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
12534
12535 # Check for *_r functions
12536 _CFLAGS="$CFLAGS"
12537 _LIBS="$LIBS"
12538 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
12539 LIBS="$LIBS $PTHREAD_LIBS"
12540
12541 if test "$PORTNAME" != "win32"; then
12542 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
12543 if test "x$ac_cv_header_pthread_h" = xyes; then :
12544
12545 else
12546   as_fn_error $? "
12547 pthread.h not found;  use --disable-thread-safety to disable thread safety" "$LINENO" 5
12548 fi
12549
12550
12551 fi
12552
12553 for ac_func in strerror_r getpwuid_r gethostbyname_r
12554 do :
12555   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12556 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12557 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12558   cat >>confdefs.h <<_ACEOF
12559 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12560 _ACEOF
12561
12562 fi
12563 done
12564
12565
12566 # Do test here with the proper thread flags
12567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpwuid_r takes a fifth argument" >&5
12568 $as_echo_n "checking whether getpwuid_r takes a fifth argument... " >&6; }
12569 if ${pgac_cv_func_getpwuid_r_5arg+:} false; then :
12570   $as_echo_n "(cached) " >&6
12571 else
12572   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12573 /* end confdefs.h.  */
12574 #include <sys/types.h>
12575 #include <pwd.h>
12576 int
12577 main ()
12578 {
12579 uid_t uid;
12580 struct passwd *space;
12581 char *buf;
12582 size_t bufsize;
12583 struct passwd **result;
12584 getpwuid_r(uid, space, buf, bufsize, result);
12585   ;
12586   return 0;
12587 }
12588 _ACEOF
12589 if ac_fn_c_try_compile "$LINENO"; then :
12590   pgac_cv_func_getpwuid_r_5arg=yes
12591 else
12592   pgac_cv_func_getpwuid_r_5arg=no
12593 fi
12594 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12595 fi
12596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_getpwuid_r_5arg" >&5
12597 $as_echo "$pgac_cv_func_getpwuid_r_5arg" >&6; }
12598 if test x"$pgac_cv_func_getpwuid_r_5arg" = xyes ; then
12599
12600 $as_echo "#define GETPWUID_R_5ARG 1" >>confdefs.h
12601
12602 fi
12603
12604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
12605 $as_echo_n "checking whether strerror_r returns int... " >&6; }
12606 if ${pgac_cv_func_strerror_r_int+:} false; then :
12607   $as_echo_n "(cached) " >&6
12608 else
12609   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12610 /* end confdefs.h.  */
12611 #include <string.h>
12612 int
12613 main ()
12614 {
12615 #ifndef _AIX
12616 int strerror_r(int, char *, size_t);
12617 #else
12618 /* Older AIX has 'int' for the third argument so we don't test the args. */
12619 int strerror_r();
12620 #endif
12621   ;
12622   return 0;
12623 }
12624 _ACEOF
12625 if ac_fn_c_try_compile "$LINENO"; then :
12626   pgac_cv_func_strerror_r_int=yes
12627 else
12628   pgac_cv_func_strerror_r_int=no
12629 fi
12630 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12631 fi
12632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
12633 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
12634 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
12635
12636 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
12637
12638 fi
12639
12640
12641 CFLAGS="$_CFLAGS"
12642 LIBS="$_LIBS"
12643
12644 else
12645 # do not use values from template file
12646 PTHREAD_CFLAGS=
12647 PTHREAD_LIBS=
12648 fi
12649
12650
12651
12652
12653
12654 # We can test for libldap_r only after we know PTHREAD_LIBS
12655 if test "$with_ldap" = yes ; then
12656   _LIBS="$LIBS"
12657   if test "$PORTNAME" != "win32"; then
12658     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
12659 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
12660 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
12661   $as_echo_n "(cached) " >&6
12662 else
12663   ac_check_lib_save_LIBS=$LIBS
12664 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
12665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12666 /* end confdefs.h.  */
12667
12668 /* Override any GCC internal prototype to avoid an error.
12669    Use char because int might match the return type of a GCC
12670    builtin and then its argument prototype would still apply.  */
12671 #ifdef __cplusplus
12672 extern "C"
12673 #endif
12674 char ldap_bind ();
12675 int
12676 main ()
12677 {
12678 return ldap_bind ();
12679   ;
12680   return 0;
12681 }
12682 _ACEOF
12683 if ac_fn_c_try_link "$LINENO"; then :
12684   ac_cv_lib_ldap_ldap_bind=yes
12685 else
12686   ac_cv_lib_ldap_ldap_bind=no
12687 fi
12688 rm -f core conftest.err conftest.$ac_objext \
12689     conftest$ac_exeext conftest.$ac_ext
12690 LIBS=$ac_check_lib_save_LIBS
12691 fi
12692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
12693 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
12694 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
12695   cat >>confdefs.h <<_ACEOF
12696 #define HAVE_LIBLDAP 1
12697 _ACEOF
12698
12699   LIBS="-lldap $LIBS"
12700
12701 else
12702   as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
12703 fi
12704
12705     LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
12706     if test "$enable_thread_safety" = yes; then
12707       # on some platforms ldap_r fails to link without PTHREAD_LIBS
12708       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_simple_bind in -lldap_r" >&5
12709 $as_echo_n "checking for ldap_simple_bind in -lldap_r... " >&6; }
12710 if ${ac_cv_lib_ldap_r_ldap_simple_bind+:} false; then :
12711   $as_echo_n "(cached) " >&6
12712 else
12713   ac_check_lib_save_LIBS=$LIBS
12714 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
12715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12716 /* end confdefs.h.  */
12717
12718 /* Override any GCC internal prototype to avoid an error.
12719    Use char because int might match the return type of a GCC
12720    builtin and then its argument prototype would still apply.  */
12721 #ifdef __cplusplus
12722 extern "C"
12723 #endif
12724 char ldap_simple_bind ();
12725 int
12726 main ()
12727 {
12728 return ldap_simple_bind ();
12729   ;
12730   return 0;
12731 }
12732 _ACEOF
12733 if ac_fn_c_try_link "$LINENO"; then :
12734   ac_cv_lib_ldap_r_ldap_simple_bind=yes
12735 else
12736   ac_cv_lib_ldap_r_ldap_simple_bind=no
12737 fi
12738 rm -f core conftest.err conftest.$ac_objext \
12739     conftest$ac_exeext conftest.$ac_ext
12740 LIBS=$ac_check_lib_save_LIBS
12741 fi
12742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
12743 $as_echo "$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
12744 if test "x$ac_cv_lib_ldap_r_ldap_simple_bind" = xyes; then :
12745   cat >>confdefs.h <<_ACEOF
12746 #define HAVE_LIBLDAP_R 1
12747 _ACEOF
12748
12749   LIBS="-lldap_r $LIBS"
12750
12751 else
12752   as_fn_error $? "library 'ldap_r' is required for LDAP" "$LINENO" 5
12753 fi
12754
12755       LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
12756     else
12757       LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
12758     fi
12759   else
12760     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
12761 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
12762 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
12763   $as_echo_n "(cached) " >&6
12764 else
12765   ac_check_lib_save_LIBS=$LIBS
12766 LIBS="-lwldap32  $LIBS"
12767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12768 /* end confdefs.h.  */
12769
12770 /* Override any GCC internal prototype to avoid an error.
12771    Use char because int might match the return type of a GCC
12772    builtin and then its argument prototype would still apply.  */
12773 #ifdef __cplusplus
12774 extern "C"
12775 #endif
12776 char ldap_bind ();
12777 int
12778 main ()
12779 {
12780 return ldap_bind ();
12781   ;
12782   return 0;
12783 }
12784 _ACEOF
12785 if ac_fn_c_try_link "$LINENO"; then :
12786   ac_cv_lib_wldap32_ldap_bind=yes
12787 else
12788   ac_cv_lib_wldap32_ldap_bind=no
12789 fi
12790 rm -f core conftest.err conftest.$ac_objext \
12791     conftest$ac_exeext conftest.$ac_ext
12792 LIBS=$ac_check_lib_save_LIBS
12793 fi
12794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
12795 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
12796 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
12797   cat >>confdefs.h <<_ACEOF
12798 #define HAVE_LIBWLDAP32 1
12799 _ACEOF
12800
12801   LIBS="-lwldap32 $LIBS"
12802
12803 else
12804   as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
12805 fi
12806
12807     LDAP_LIBS_FE="-lwldap32"
12808     LDAP_LIBS_BE="-lwldap32"
12809   fi
12810   LIBS="$_LIBS"
12811 fi
12812
12813
12814
12815
12816 # This test makes sure that run tests work at all.  Sometimes a shared
12817 # library is found by the linker, but the runtime linker can't find it.
12818 # This check should come after all modifications of compiler or linker
12819 # variables, and before any other run tests.
12820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
12821 $as_echo_n "checking test program... " >&6; }
12822 if test "$cross_compiling" = yes; then :
12823   { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
12824 $as_echo "cross-compiling" >&6; }
12825 else
12826   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12827 /* end confdefs.h.  */
12828 int main() { return 0; }
12829 _ACEOF
12830 if ac_fn_c_try_run "$LINENO"; then :
12831   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
12832 $as_echo "ok" >&6; }
12833 else
12834   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
12835 $as_echo "failed" >&6; }
12836 as_fn_error $? "
12837 Could not execute a simple test program.  This may be a problem
12838 related to locating shared libraries.  Check the file 'config.log'
12839 for the exact reason." "$LINENO" 5
12840 fi
12841 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12842   conftest.$ac_objext conftest.beam conftest.$ac_ext
12843 fi
12844
12845
12846 # --------------------
12847 # Run tests below here
12848 # --------------------
12849
12850 # Force use of our snprintf if system's doesn't do arg control
12851 # See comment above at snprintf test for details.
12852 if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
12853   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports argument control" >&5
12854 $as_echo_n "checking whether snprintf supports argument control... " >&6; }
12855 if ${pgac_cv_snprintf_arg_control+:} false; then :
12856   $as_echo_n "(cached) " >&6
12857 else
12858   if test "$cross_compiling" = yes; then :
12859   pgac_cv_snprintf_arg_control=cross
12860 else
12861   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12862 /* end confdefs.h.  */
12863 #include <stdio.h>
12864 #include <string.h>
12865
12866 int main()
12867 {
12868   char buf[100];
12869
12870   /* can it swap arguments? */
12871   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
12872   if (strcmp(buf, "4 3") != 0)
12873     return 1;
12874   return 0;
12875 }
12876 _ACEOF
12877 if ac_fn_c_try_run "$LINENO"; then :
12878   pgac_cv_snprintf_arg_control=yes
12879 else
12880   pgac_cv_snprintf_arg_control=no
12881 fi
12882 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12883   conftest.$ac_objext conftest.beam conftest.$ac_ext
12884 fi
12885
12886
12887 fi
12888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_arg_control" >&5
12889 $as_echo "$pgac_cv_snprintf_arg_control" >&6; }
12890
12891   if test $pgac_cv_snprintf_arg_control != yes ; then
12892     pgac_need_repl_snprintf=yes
12893   fi
12894 fi
12895
12896
12897
12898
12899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
12900 $as_echo_n "checking whether long int is 64 bits... " >&6; }
12901 if ${pgac_cv_type_long_int_64+:} false; then :
12902   $as_echo_n "(cached) " >&6
12903 else
12904   if test "$cross_compiling" = yes; then :
12905   # If cross-compiling, check the size reported by the compiler and
12906 # trust that the arithmetic works.
12907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12908 /* end confdefs.h.  */
12909
12910 int
12911 main ()
12912 {
12913 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
12914 test_array [0] = 0;
12915 return test_array [0];
12916
12917   ;
12918   return 0;
12919 }
12920 _ACEOF
12921 if ac_fn_c_try_compile "$LINENO"; then :
12922   pgac_cv_type_long_int_64=yes
12923 else
12924   pgac_cv_type_long_int_64=no
12925 fi
12926 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12927 else
12928   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12929 /* end confdefs.h.  */
12930 typedef long int ac_int64;
12931
12932 /*
12933  * These are globals to discourage the compiler from folding all the
12934  * arithmetic tests down to compile-time constants.
12935  */
12936 ac_int64 a = 20000001;
12937 ac_int64 b = 40000005;
12938
12939 int does_int64_work()
12940 {
12941   ac_int64 c,d;
12942
12943   if (sizeof(ac_int64) != 8)
12944     return 0;                   /* definitely not the right size */
12945
12946   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
12947   c = a * b;
12948   d = (c + b) / b;
12949   if (d != a+1)
12950     return 0;
12951   return 1;
12952 }
12953 main() {
12954   exit(! does_int64_work());
12955 }
12956 _ACEOF
12957 if ac_fn_c_try_run "$LINENO"; then :
12958   pgac_cv_type_long_int_64=yes
12959 else
12960   pgac_cv_type_long_int_64=no
12961 fi
12962 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12963   conftest.$ac_objext conftest.beam conftest.$ac_ext
12964 fi
12965
12966 fi
12967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
12968 $as_echo "$pgac_cv_type_long_int_64" >&6; }
12969
12970 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
12971 if test x"$pgac_cv_type_long_int_64" = xyes ; then
12972
12973 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
12974
12975 fi
12976
12977
12978 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
12979   pg_int64_type="long int"
12980 else
12981   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
12982 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
12983 if ${pgac_cv_type_long_long_int_64+:} false; then :
12984   $as_echo_n "(cached) " >&6
12985 else
12986   if test "$cross_compiling" = yes; then :
12987   # If cross-compiling, check the size reported by the compiler and
12988 # trust that the arithmetic works.
12989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12990 /* end confdefs.h.  */
12991
12992 int
12993 main ()
12994 {
12995 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
12996 test_array [0] = 0;
12997 return test_array [0];
12998
12999   ;
13000   return 0;
13001 }
13002 _ACEOF
13003 if ac_fn_c_try_compile "$LINENO"; then :
13004   pgac_cv_type_long_long_int_64=yes
13005 else
13006   pgac_cv_type_long_long_int_64=no
13007 fi
13008 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13009 else
13010   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13011 /* end confdefs.h.  */
13012 typedef long long int ac_int64;
13013
13014 /*
13015  * These are globals to discourage the compiler from folding all the
13016  * arithmetic tests down to compile-time constants.
13017  */
13018 ac_int64 a = 20000001;
13019 ac_int64 b = 40000005;
13020
13021 int does_int64_work()
13022 {
13023   ac_int64 c,d;
13024
13025   if (sizeof(ac_int64) != 8)
13026     return 0;                   /* definitely not the right size */
13027
13028   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
13029   c = a * b;
13030   d = (c + b) / b;
13031   if (d != a+1)
13032     return 0;
13033   return 1;
13034 }
13035 main() {
13036   exit(! does_int64_work());
13037 }
13038 _ACEOF
13039 if ac_fn_c_try_run "$LINENO"; then :
13040   pgac_cv_type_long_long_int_64=yes
13041 else
13042   pgac_cv_type_long_long_int_64=no
13043 fi
13044 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13045   conftest.$ac_objext conftest.beam conftest.$ac_ext
13046 fi
13047
13048 fi
13049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
13050 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
13051
13052 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
13053 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
13054
13055 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
13056
13057 fi
13058
13059   if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
13060     pg_int64_type="long long int"
13061   else
13062     as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
13063   fi
13064 fi
13065
13066
13067 cat >>confdefs.h <<_ACEOF
13068 #define PG_INT64_TYPE $pg_int64_type
13069 _ACEOF
13070
13071
13072
13073 if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
13074   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13075 /* end confdefs.h.  */
13076
13077 #define INT64CONST(x)  x##LL
13078 long long int foo = INT64CONST(0x1234567890123456);
13079
13080 int
13081 main ()
13082 {
13083
13084   ;
13085   return 0;
13086 }
13087 _ACEOF
13088 if ac_fn_c_try_compile "$LINENO"; then :
13089
13090 $as_echo "#define HAVE_LL_CONSTANTS 1" >>confdefs.h
13091
13092 fi
13093 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13094 fi
13095
13096
13097 # If we found "long int" is 64 bits, assume snprintf handles it.  If
13098 # we found we need to use "long long int", better check.  We cope with
13099 # snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
13100 # work, fall back to our own snprintf emulation (which we know uses %lld).
13101
13102 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
13103   if test $pgac_need_repl_snprintf = no; then
13104     { $as_echo "$as_me:${as_lineno-$LINENO}: checking snprintf length modifier for long long int" >&5
13105 $as_echo_n "checking snprintf length modifier for long long int... " >&6; }
13106 if ${pgac_cv_snprintf_long_long_int_modifier+:} false; then :
13107   $as_echo_n "(cached) " >&6
13108 else
13109   for pgac_modifier in 'll' 'q' 'I64'; do
13110 if test "$cross_compiling" = yes; then :
13111   pgac_cv_snprintf_long_long_int_modifier=cross; break
13112 else
13113   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13114 /* end confdefs.h.  */
13115 #include <stdio.h>
13116 typedef long long int ac_int64;
13117 #define INT64_FORMAT "%${pgac_modifier}d"
13118
13119 ac_int64 a = 20000001;
13120 ac_int64 b = 40000005;
13121
13122 int does_int64_snprintf_work()
13123 {
13124   ac_int64 c;
13125   char buf[100];
13126
13127   if (sizeof(ac_int64) != 8)
13128     return 0;                   /* doesn't look like the right size */
13129
13130   c = a * b;
13131   snprintf(buf, 100, INT64_FORMAT, c);
13132   if (strcmp(buf, "800000140000005") != 0)
13133     return 0;                   /* either multiply or snprintf is busted */
13134   return 1;
13135 }
13136 main() {
13137   exit(! does_int64_snprintf_work());
13138 }
13139 _ACEOF
13140 if ac_fn_c_try_run "$LINENO"; then :
13141   pgac_cv_snprintf_long_long_int_modifier=$pgac_modifier; break
13142 fi
13143 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13144   conftest.$ac_objext conftest.beam conftest.$ac_ext
13145 fi
13146
13147 done
13148 fi
13149
13150 LONG_LONG_INT_MODIFIER=''
13151
13152 case $pgac_cv_snprintf_long_long_int_modifier in
13153   cross) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot test (not on host machine)" >&5
13154 $as_echo "cannot test (not on host machine)" >&6; };;
13155   ?*)    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_long_long_int_modifier" >&5
13156 $as_echo "$pgac_cv_snprintf_long_long_int_modifier" >&6; }
13157          LONG_LONG_INT_MODIFIER=$pgac_cv_snprintf_long_long_int_modifier;;
13158   *)     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13159 $as_echo "none" >&6; };;
13160 esac
13161     if test "$LONG_LONG_INT_MODIFIER" = ""; then
13162       # Force usage of our own snprintf, since system snprintf is broken
13163       pgac_need_repl_snprintf=yes
13164       LONG_LONG_INT_MODIFIER='ll'
13165     fi
13166   else
13167     # Here if we previously decided we needed to use our own snprintf
13168     LONG_LONG_INT_MODIFIER='ll'
13169   fi
13170 else
13171   # Here if we are not using 'long long int' at all
13172   LONG_LONG_INT_MODIFIER='l'
13173 fi
13174
13175 INT64_MODIFIER="\"$LONG_LONG_INT_MODIFIER\""
13176
13177
13178 cat >>confdefs.h <<_ACEOF
13179 #define INT64_MODIFIER $INT64_MODIFIER
13180 _ACEOF
13181
13182
13183 # Also force use of our snprintf if the system's doesn't support the %z flag.
13184 if test "$pgac_need_repl_snprintf" = no; then
13185   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports the %z modifier" >&5
13186 $as_echo_n "checking whether snprintf supports the %z modifier... " >&6; }
13187 if ${pgac_cv_snprintf_size_t_support+:} false; then :
13188   $as_echo_n "(cached) " >&6
13189 else
13190   if test "$cross_compiling" = yes; then :
13191   pgac_cv_snprintf_size_t_support=cross
13192 else
13193   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13194 /* end confdefs.h.  */
13195 #include <stdio.h>
13196 #include <string.h>
13197
13198 int main()
13199 {
13200   char bufz[100];
13201   char buf64[100];
13202
13203   /*
13204    * Print the largest unsigned number fitting in a size_t using both %zu
13205    * and the previously-determined format for 64-bit integers.  Note that
13206    * we don't run this code unless we know snprintf handles 64-bit ints.
13207    */
13208   bufz[0] = '\0';  /* in case snprintf fails to emit anything */
13209   snprintf(bufz, sizeof(bufz), "%zu", ~((size_t) 0));
13210   snprintf(buf64, sizeof(buf64), "%" INT64_MODIFIER "u",
13211     (unsigned PG_INT64_TYPE) ~((size_t) 0));
13212   if (strcmp(bufz, buf64) != 0)
13213     return 1;
13214   return 0;
13215 }
13216 _ACEOF
13217 if ac_fn_c_try_run "$LINENO"; then :
13218   pgac_cv_snprintf_size_t_support=yes
13219 else
13220   pgac_cv_snprintf_size_t_support=no
13221 fi
13222 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13223   conftest.$ac_objext conftest.beam conftest.$ac_ext
13224 fi
13225
13226
13227 fi
13228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_size_t_support" >&5
13229 $as_echo "$pgac_cv_snprintf_size_t_support" >&6; }
13230
13231   if test "$pgac_cv_snprintf_size_t_support" != yes; then
13232     pgac_need_repl_snprintf=yes
13233   fi
13234 fi
13235
13236 # Now we have checked all the reasons to replace snprintf
13237 if test $pgac_need_repl_snprintf = yes; then
13238
13239 $as_echo "#define USE_REPL_SNPRINTF 1" >>confdefs.h
13240
13241   case " $LIBOBJS " in
13242   *" snprintf.$ac_objext "* ) ;;
13243   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
13244  ;;
13245 esac
13246
13247 fi
13248
13249 # Check size of void *, size_t (enables tweaks for > 32bit address space)
13250 # The cast to long int works around a bug in the HP C Compiler
13251 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13252 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13253 # This bug is HP SR number 8606223364.
13254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
13255 $as_echo_n "checking size of void *... " >&6; }
13256 if ${ac_cv_sizeof_void_p+:} false; then :
13257   $as_echo_n "(cached) " >&6
13258 else
13259   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
13260
13261 else
13262   if test "$ac_cv_type_void_p" = yes; then
13263      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13264 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13265 as_fn_error 77 "cannot compute sizeof (void *)
13266 See \`config.log' for more details" "$LINENO" 5; }
13267    else
13268      ac_cv_sizeof_void_p=0
13269    fi
13270 fi
13271
13272 fi
13273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
13274 $as_echo "$ac_cv_sizeof_void_p" >&6; }
13275
13276
13277
13278 cat >>confdefs.h <<_ACEOF
13279 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
13280 _ACEOF
13281
13282
13283 # The cast to long int works around a bug in the HP C Compiler
13284 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13285 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13286 # This bug is HP SR number 8606223364.
13287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
13288 $as_echo_n "checking size of size_t... " >&6; }
13289 if ${ac_cv_sizeof_size_t+:} false; then :
13290   $as_echo_n "(cached) " >&6
13291 else
13292   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
13293
13294 else
13295   if test "$ac_cv_type_size_t" = yes; then
13296      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13297 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13298 as_fn_error 77 "cannot compute sizeof (size_t)
13299 See \`config.log' for more details" "$LINENO" 5; }
13300    else
13301      ac_cv_sizeof_size_t=0
13302    fi
13303 fi
13304
13305 fi
13306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
13307 $as_echo "$ac_cv_sizeof_size_t" >&6; }
13308
13309
13310
13311 cat >>confdefs.h <<_ACEOF
13312 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
13313 _ACEOF
13314
13315
13316 # The cast to long int works around a bug in the HP C Compiler
13317 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13318 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13319 # This bug is HP SR number 8606223364.
13320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
13321 $as_echo_n "checking size of long... " >&6; }
13322 if ${ac_cv_sizeof_long+:} false; then :
13323   $as_echo_n "(cached) " >&6
13324 else
13325   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
13326
13327 else
13328   if test "$ac_cv_type_long" = yes; then
13329      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13330 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13331 as_fn_error 77 "cannot compute sizeof (long)
13332 See \`config.log' for more details" "$LINENO" 5; }
13333    else
13334      ac_cv_sizeof_long=0
13335    fi
13336 fi
13337
13338 fi
13339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
13340 $as_echo "$ac_cv_sizeof_long" >&6; }
13341
13342
13343
13344 cat >>confdefs.h <<_ACEOF
13345 #define SIZEOF_LONG $ac_cv_sizeof_long
13346 _ACEOF
13347
13348
13349
13350 # Decide whether float4 is passed by value: user-selectable, enabled by default
13351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float4 passed by value" >&5
13352 $as_echo_n "checking whether to build with float4 passed by value... " >&6; }
13353
13354
13355 # Check whether --enable-float4-byval was given.
13356 if test "${enable_float4_byval+set}" = set; then :
13357   enableval=$enable_float4_byval;
13358   case $enableval in
13359     yes)
13360
13361 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
13362
13363                float4passbyval=true
13364       ;;
13365     no)
13366       float4passbyval=false
13367       ;;
13368     *)
13369       as_fn_error $? "no argument expected for --enable-float4-byval option" "$LINENO" 5
13370       ;;
13371   esac
13372
13373 else
13374   enable_float4_byval=yes
13375
13376 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
13377
13378                float4passbyval=true
13379 fi
13380
13381
13382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float4_byval" >&5
13383 $as_echo "$enable_float4_byval" >&6; }
13384
13385 cat >>confdefs.h <<_ACEOF
13386 #define FLOAT4PASSBYVAL $float4passbyval
13387 _ACEOF
13388
13389
13390 # Decide whether float8 is passed by value.
13391 # Note: this setting also controls int8 and related types such as timestamp.
13392 # If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
13393 # If not, trying to select it is an error.
13394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float8 passed by value" >&5
13395 $as_echo_n "checking whether to build with float8 passed by value... " >&6; }
13396 if test $ac_cv_sizeof_void_p -ge 8 ; then
13397
13398
13399 # Check whether --enable-float8-byval was given.
13400 if test "${enable_float8_byval+set}" = set; then :
13401   enableval=$enable_float8_byval;
13402   case $enableval in
13403     yes)
13404       :
13405       ;;
13406     no)
13407       :
13408       ;;
13409     *)
13410       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
13411       ;;
13412   esac
13413
13414 else
13415   enable_float8_byval=yes
13416
13417 fi
13418
13419
13420 else
13421
13422
13423 # Check whether --enable-float8-byval was given.
13424 if test "${enable_float8_byval+set}" = set; then :
13425   enableval=$enable_float8_byval;
13426   case $enableval in
13427     yes)
13428       :
13429       ;;
13430     no)
13431       :
13432       ;;
13433     *)
13434       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
13435       ;;
13436   esac
13437
13438 else
13439   enable_float8_byval=no
13440
13441 fi
13442
13443
13444   if test "$enable_float8_byval" = yes ; then
13445     as_fn_error $? "--enable-float8-byval is not supported on 32-bit platforms." "$LINENO" 5
13446   fi
13447 fi
13448 if test "$enable_float8_byval" = yes ; then
13449
13450 $as_echo "#define USE_FLOAT8_BYVAL 1" >>confdefs.h
13451
13452   float8passbyval=true
13453 else
13454   float8passbyval=false
13455 fi
13456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float8_byval" >&5
13457 $as_echo "$enable_float8_byval" >&6; }
13458
13459 cat >>confdefs.h <<_ACEOF
13460 #define FLOAT8PASSBYVAL $float8passbyval
13461 _ACEOF
13462
13463
13464 # Determine memory alignment requirements for the basic C data types.
13465
13466 # The cast to long int works around a bug in the HP C Compiler,
13467 # see AC_CHECK_SIZEOF for more information.
13468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
13469 $as_echo_n "checking alignment of short... " >&6; }
13470 if ${ac_cv_alignof_short+:} false; then :
13471   $as_echo_n "(cached) " >&6
13472 else
13473   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short"        "$ac_includes_default
13474 #ifndef offsetof
13475 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13476 #endif
13477 typedef struct { char x; short y; } ac__type_alignof_;"; then :
13478
13479 else
13480   if test "$ac_cv_type_short" = yes; then
13481      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13482 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13483 as_fn_error 77 "cannot compute alignment of short
13484 See \`config.log' for more details" "$LINENO" 5; }
13485    else
13486      ac_cv_alignof_short=0
13487    fi
13488 fi
13489
13490 fi
13491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
13492 $as_echo "$ac_cv_alignof_short" >&6; }
13493
13494
13495
13496 cat >>confdefs.h <<_ACEOF
13497 #define ALIGNOF_SHORT $ac_cv_alignof_short
13498 _ACEOF
13499
13500
13501 # The cast to long int works around a bug in the HP C Compiler,
13502 # see AC_CHECK_SIZEOF for more information.
13503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
13504 $as_echo_n "checking alignment of int... " >&6; }
13505 if ${ac_cv_alignof_int+:} false; then :
13506   $as_echo_n "(cached) " >&6
13507 else
13508   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int"        "$ac_includes_default
13509 #ifndef offsetof
13510 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13511 #endif
13512 typedef struct { char x; int y; } ac__type_alignof_;"; then :
13513
13514 else
13515   if test "$ac_cv_type_int" = yes; then
13516      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13517 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13518 as_fn_error 77 "cannot compute alignment of int
13519 See \`config.log' for more details" "$LINENO" 5; }
13520    else
13521      ac_cv_alignof_int=0
13522    fi
13523 fi
13524
13525 fi
13526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
13527 $as_echo "$ac_cv_alignof_int" >&6; }
13528
13529
13530
13531 cat >>confdefs.h <<_ACEOF
13532 #define ALIGNOF_INT $ac_cv_alignof_int
13533 _ACEOF
13534
13535
13536 # The cast to long int works around a bug in the HP C Compiler,
13537 # see AC_CHECK_SIZEOF for more information.
13538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
13539 $as_echo_n "checking alignment of long... " >&6; }
13540 if ${ac_cv_alignof_long+:} false; then :
13541   $as_echo_n "(cached) " >&6
13542 else
13543   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long"        "$ac_includes_default
13544 #ifndef offsetof
13545 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13546 #endif
13547 typedef struct { char x; long y; } ac__type_alignof_;"; then :
13548
13549 else
13550   if test "$ac_cv_type_long" = yes; then
13551      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13552 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13553 as_fn_error 77 "cannot compute alignment of long
13554 See \`config.log' for more details" "$LINENO" 5; }
13555    else
13556      ac_cv_alignof_long=0
13557    fi
13558 fi
13559
13560 fi
13561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
13562 $as_echo "$ac_cv_alignof_long" >&6; }
13563
13564
13565
13566 cat >>confdefs.h <<_ACEOF
13567 #define ALIGNOF_LONG $ac_cv_alignof_long
13568 _ACEOF
13569
13570
13571 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
13572   # The cast to long int works around a bug in the HP C Compiler,
13573 # see AC_CHECK_SIZEOF for more information.
13574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
13575 $as_echo_n "checking alignment of long long int... " >&6; }
13576 if ${ac_cv_alignof_long_long_int+:} false; then :
13577   $as_echo_n "(cached) " >&6
13578 else
13579   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int"        "$ac_includes_default
13580 #ifndef offsetof
13581 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13582 #endif
13583 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
13584
13585 else
13586   if test "$ac_cv_type_long_long_int" = yes; then
13587      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13588 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13589 as_fn_error 77 "cannot compute alignment of long long int
13590 See \`config.log' for more details" "$LINENO" 5; }
13591    else
13592      ac_cv_alignof_long_long_int=0
13593    fi
13594 fi
13595
13596 fi
13597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
13598 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
13599
13600
13601
13602 cat >>confdefs.h <<_ACEOF
13603 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
13604 _ACEOF
13605
13606
13607 fi
13608 # The cast to long int works around a bug in the HP C Compiler,
13609 # see AC_CHECK_SIZEOF for more information.
13610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
13611 $as_echo_n "checking alignment of double... " >&6; }
13612 if ${ac_cv_alignof_double+:} false; then :
13613   $as_echo_n "(cached) " >&6
13614 else
13615   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double"        "$ac_includes_default
13616 #ifndef offsetof
13617 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13618 #endif
13619 typedef struct { char x; double y; } ac__type_alignof_;"; then :
13620
13621 else
13622   if test "$ac_cv_type_double" = yes; then
13623      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13624 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13625 as_fn_error 77 "cannot compute alignment of double
13626 See \`config.log' for more details" "$LINENO" 5; }
13627    else
13628      ac_cv_alignof_double=0
13629    fi
13630 fi
13631
13632 fi
13633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
13634 $as_echo "$ac_cv_alignof_double" >&6; }
13635
13636
13637
13638 cat >>confdefs.h <<_ACEOF
13639 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
13640 _ACEOF
13641
13642
13643
13644 # Compute maximum alignment of any basic type.
13645 # We assume long's alignment is at least as strong as char, short, or int;
13646 # but we must check long long (if it exists) and double.
13647
13648 MAX_ALIGNOF=$ac_cv_alignof_long
13649 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
13650   MAX_ALIGNOF=$ac_cv_alignof_double
13651 fi
13652 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
13653   MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
13654 fi
13655
13656 cat >>confdefs.h <<_ACEOF
13657 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
13658 _ACEOF
13659
13660
13661
13662 # Some platforms predefine the types int8, int16, etc.  Only check
13663 # a (hopefully) representative subset.
13664 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
13665 "
13666 if test "x$ac_cv_type_int8" = xyes; then :
13667
13668 cat >>confdefs.h <<_ACEOF
13669 #define HAVE_INT8 1
13670 _ACEOF
13671
13672
13673 fi
13674 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
13675 "
13676 if test "x$ac_cv_type_uint8" = xyes; then :
13677
13678 cat >>confdefs.h <<_ACEOF
13679 #define HAVE_UINT8 1
13680 _ACEOF
13681
13682
13683 fi
13684 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
13685 "
13686 if test "x$ac_cv_type_int64" = xyes; then :
13687
13688 cat >>confdefs.h <<_ACEOF
13689 #define HAVE_INT64 1
13690 _ACEOF
13691
13692
13693 fi
13694 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
13695 "
13696 if test "x$ac_cv_type_uint64" = xyes; then :
13697
13698 cat >>confdefs.h <<_ACEOF
13699 #define HAVE_UINT64 1
13700 _ACEOF
13701
13702
13703 fi
13704
13705
13706 # We also check for sig_atomic_t, which *should* be defined per ANSI
13707 # C, but is missing on some old platforms.
13708 ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "#include <signal.h>
13709 "
13710 if test "x$ac_cv_type_sig_atomic_t" = xyes; then :
13711
13712 cat >>confdefs.h <<_ACEOF
13713 #define HAVE_SIG_ATOMIC_T 1
13714 _ACEOF
13715
13716
13717 fi
13718
13719
13720 # Check for various atomic operations now that we have checked how to declare
13721 # 64bit integers.
13722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
13723 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
13724 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
13725   $as_echo_n "(cached) " >&6
13726 else
13727   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13728 /* end confdefs.h.  */
13729
13730 int
13731 main ()
13732 {
13733 char lock = 0;
13734    __sync_lock_test_and_set(&lock, 1);
13735    __sync_lock_release(&lock);
13736   ;
13737   return 0;
13738 }
13739 _ACEOF
13740 if ac_fn_c_try_link "$LINENO"; then :
13741   pgac_cv_gcc_sync_char_tas="yes"
13742 else
13743   pgac_cv_gcc_sync_char_tas="no"
13744 fi
13745 rm -f core conftest.err conftest.$ac_objext \
13746     conftest$ac_exeext conftest.$ac_ext
13747 fi
13748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
13749 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
13750 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
13751
13752 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
13753
13754 fi
13755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
13756 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
13757 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
13758   $as_echo_n "(cached) " >&6
13759 else
13760   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13761 /* end confdefs.h.  */
13762
13763 int
13764 main ()
13765 {
13766 int lock = 0;
13767    __sync_lock_test_and_set(&lock, 1);
13768    __sync_lock_release(&lock);
13769   ;
13770   return 0;
13771 }
13772 _ACEOF
13773 if ac_fn_c_try_link "$LINENO"; then :
13774   pgac_cv_gcc_sync_int32_tas="yes"
13775 else
13776   pgac_cv_gcc_sync_int32_tas="no"
13777 fi
13778 rm -f core conftest.err conftest.$ac_objext \
13779     conftest$ac_exeext conftest.$ac_ext
13780 fi
13781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
13782 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
13783 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
13784
13785 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
13786
13787 fi
13788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
13789 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
13790 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
13791   $as_echo_n "(cached) " >&6
13792 else
13793   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13794 /* end confdefs.h.  */
13795
13796 int
13797 main ()
13798 {
13799 int val = 0;
13800    __sync_val_compare_and_swap(&val, 0, 37);
13801   ;
13802   return 0;
13803 }
13804 _ACEOF
13805 if ac_fn_c_try_link "$LINENO"; then :
13806   pgac_cv_gcc_sync_int32_cas="yes"
13807 else
13808   pgac_cv_gcc_sync_int32_cas="no"
13809 fi
13810 rm -f core conftest.err conftest.$ac_objext \
13811     conftest$ac_exeext conftest.$ac_ext
13812 fi
13813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
13814 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
13815 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
13816
13817 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
13818
13819 fi
13820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
13821 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
13822 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
13823   $as_echo_n "(cached) " >&6
13824 else
13825   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13826 /* end confdefs.h.  */
13827
13828 int
13829 main ()
13830 {
13831 PG_INT64_TYPE lock = 0;
13832    __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
13833   ;
13834   return 0;
13835 }
13836 _ACEOF
13837 if ac_fn_c_try_link "$LINENO"; then :
13838   pgac_cv_gcc_sync_int64_cas="yes"
13839 else
13840   pgac_cv_gcc_sync_int64_cas="no"
13841 fi
13842 rm -f core conftest.err conftest.$ac_objext \
13843     conftest$ac_exeext conftest.$ac_ext
13844 fi
13845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
13846 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
13847 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
13848
13849 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
13850
13851 fi
13852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
13853 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
13854 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
13855   $as_echo_n "(cached) " >&6
13856 else
13857   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13858 /* end confdefs.h.  */
13859
13860 int
13861 main ()
13862 {
13863 int val = 0;
13864    int expect = 0;
13865    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
13866   ;
13867   return 0;
13868 }
13869 _ACEOF
13870 if ac_fn_c_try_link "$LINENO"; then :
13871   pgac_cv_gcc_atomic_int32_cas="yes"
13872 else
13873   pgac_cv_gcc_atomic_int32_cas="no"
13874 fi
13875 rm -f core conftest.err conftest.$ac_objext \
13876     conftest$ac_exeext conftest.$ac_ext
13877 fi
13878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
13879 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
13880 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
13881
13882 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
13883
13884 fi
13885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
13886 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
13887 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
13888   $as_echo_n "(cached) " >&6
13889 else
13890   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13891 /* end confdefs.h.  */
13892
13893 int
13894 main ()
13895 {
13896 PG_INT64_TYPE val = 0;
13897    PG_INT64_TYPE expect = 0;
13898    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
13899   ;
13900   return 0;
13901 }
13902 _ACEOF
13903 if ac_fn_c_try_link "$LINENO"; then :
13904   pgac_cv_gcc_atomic_int64_cas="yes"
13905 else
13906   pgac_cv_gcc_atomic_int64_cas="no"
13907 fi
13908 rm -f core conftest.err conftest.$ac_objext \
13909     conftest$ac_exeext conftest.$ac_ext
13910 fi
13911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
13912 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
13913 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
13914
13915 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
13916
13917 fi
13918
13919 if test "$PORTNAME" != "win32"
13920 then
13921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for POSIX signal interface" >&5
13922 $as_echo_n "checking for POSIX signal interface... " >&6; }
13923 if ${pgac_cv_func_posix_signals+:} false; then :
13924   $as_echo_n "(cached) " >&6
13925 else
13926   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13927 /* end confdefs.h.  */
13928 #include <signal.h>
13929
13930 int
13931 main ()
13932 {
13933 struct sigaction act, oact;
13934 sigemptyset(&act.sa_mask);
13935 act.sa_flags = SA_RESTART;
13936 sigaction(0, &act, &oact);
13937   ;
13938   return 0;
13939 }
13940 _ACEOF
13941 if ac_fn_c_try_link "$LINENO"; then :
13942   pgac_cv_func_posix_signals=yes
13943 else
13944   pgac_cv_func_posix_signals=no
13945 fi
13946 rm -f core conftest.err conftest.$ac_objext \
13947     conftest$ac_exeext conftest.$ac_ext
13948 fi
13949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_posix_signals" >&5
13950 $as_echo "$pgac_cv_func_posix_signals" >&6; }
13951 if test x"$pgac_cv_func_posix_signals" = xyes ; then
13952
13953 $as_echo "#define HAVE_POSIX_SIGNALS 1" >>confdefs.h
13954
13955 fi
13956 HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
13957
13958 if test "$pgac_cv_func_posix_signals" != yes -a "$enable_thread_safety" = yes; then
13959   as_fn_error $? "
13960 Thread-safety requires POSIX signals, which are not supported by this
13961 operating system;  use --disable-thread-safety to disable thread safety." "$LINENO" 5
13962 fi
13963 fi
13964
13965
13966 # Select semaphore implementation type.
13967 if test "$PORTNAME" != "win32"; then
13968   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
13969
13970 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
13971
13972     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
13973   else
13974     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
13975
13976 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
13977
13978       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
13979     else
13980
13981 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
13982
13983       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
13984     fi
13985   fi
13986 else
13987
13988 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
13989
13990   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
13991 fi
13992
13993
13994 # Select shared-memory implementation type.
13995 if test "$PORTNAME" != "win32"; then
13996
13997 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
13998
13999   SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
14000 else
14001
14002 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
14003
14004   SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
14005 fi
14006
14007 # Select latch implementation type.
14008 if test "$PORTNAME" != "win32"; then
14009   LATCH_IMPLEMENTATION="src/backend/port/unix_latch.c"
14010 else
14011   LATCH_IMPLEMENTATION="src/backend/port/win32_latch.c"
14012 fi
14013
14014 # If not set in template file, set bytes to use libc memset()
14015 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
14016   MEMSET_LOOP_LIMIT=1024
14017 fi
14018
14019 cat >>confdefs.h <<_ACEOF
14020 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
14021 _ACEOF
14022
14023
14024
14025 if test "$enable_nls" = yes ; then
14026
14027   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
14028 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
14029 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
14030   $as_echo_n "(cached) " >&6
14031 else
14032   ac_func_search_save_LIBS=$LIBS
14033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14034 /* end confdefs.h.  */
14035
14036 /* Override any GCC internal prototype to avoid an error.
14037    Use char because int might match the return type of a GCC
14038    builtin and then its argument prototype would still apply.  */
14039 #ifdef __cplusplus
14040 extern "C"
14041 #endif
14042 char bind_textdomain_codeset ();
14043 int
14044 main ()
14045 {
14046 return bind_textdomain_codeset ();
14047   ;
14048   return 0;
14049 }
14050 _ACEOF
14051 for ac_lib in '' intl; do
14052   if test -z "$ac_lib"; then
14053     ac_res="none required"
14054   else
14055     ac_res=-l$ac_lib
14056     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14057   fi
14058   if ac_fn_c_try_link "$LINENO"; then :
14059   ac_cv_search_bind_textdomain_codeset=$ac_res
14060 fi
14061 rm -f core conftest.err conftest.$ac_objext \
14062     conftest$ac_exeext
14063   if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
14064   break
14065 fi
14066 done
14067 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
14068
14069 else
14070   ac_cv_search_bind_textdomain_codeset=no
14071 fi
14072 rm conftest.$ac_ext
14073 LIBS=$ac_func_search_save_LIBS
14074 fi
14075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
14076 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
14077 ac_res=$ac_cv_search_bind_textdomain_codeset
14078 if test "$ac_res" != no; then :
14079   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14080
14081 else
14082   as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
14083 fi
14084
14085   ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
14086 if test "x$ac_cv_header_libintl_h" = xyes; then :
14087
14088 else
14089   as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
14090 fi
14091
14092
14093   for ac_prog in msgfmt
14094 do
14095   # Extract the first word of "$ac_prog", so it can be a program name with args.
14096 set dummy $ac_prog; ac_word=$2
14097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14098 $as_echo_n "checking for $ac_word... " >&6; }
14099 if ${ac_cv_prog_MSGFMT+:} false; then :
14100   $as_echo_n "(cached) " >&6
14101 else
14102   if test -n "$MSGFMT"; then
14103   ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
14104 else
14105 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14106 for as_dir in $PATH
14107 do
14108   IFS=$as_save_IFS
14109   test -z "$as_dir" && as_dir=.
14110     for ac_exec_ext in '' $ac_executable_extensions; do
14111   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14112     ac_cv_prog_MSGFMT="$ac_prog"
14113     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14114     break 2
14115   fi
14116 done
14117   done
14118 IFS=$as_save_IFS
14119
14120 fi
14121 fi
14122 MSGFMT=$ac_cv_prog_MSGFMT
14123 if test -n "$MSGFMT"; then
14124   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
14125 $as_echo "$MSGFMT" >&6; }
14126 else
14127   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14128 $as_echo "no" >&6; }
14129 fi
14130
14131
14132   test -n "$MSGFMT" && break
14133 done
14134
14135   if test -z "$MSGFMT"; then
14136     as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
14137   fi
14138   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
14139 $as_echo_n "checking for msgfmt flags... " >&6; }
14140 if ${pgac_cv_msgfmt_flags+:} false; then :
14141   $as_echo_n "(cached) " >&6
14142 else
14143   if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
14144     pgac_cv_msgfmt_flags=-c
14145 fi
14146 fi
14147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
14148 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
14149   MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
14150
14151   for ac_prog in msgmerge
14152 do
14153   # Extract the first word of "$ac_prog", so it can be a program name with args.
14154 set dummy $ac_prog; ac_word=$2
14155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14156 $as_echo_n "checking for $ac_word... " >&6; }
14157 if ${ac_cv_prog_MSGMERGE+:} false; then :
14158   $as_echo_n "(cached) " >&6
14159 else
14160   if test -n "$MSGMERGE"; then
14161   ac_cv_prog_MSGMERGE="$MSGMERGE" # Let the user override the test.
14162 else
14163 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14164 for as_dir in $PATH
14165 do
14166   IFS=$as_save_IFS
14167   test -z "$as_dir" && as_dir=.
14168     for ac_exec_ext in '' $ac_executable_extensions; do
14169   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14170     ac_cv_prog_MSGMERGE="$ac_prog"
14171     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14172     break 2
14173   fi
14174 done
14175   done
14176 IFS=$as_save_IFS
14177
14178 fi
14179 fi
14180 MSGMERGE=$ac_cv_prog_MSGMERGE
14181 if test -n "$MSGMERGE"; then
14182   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
14183 $as_echo "$MSGMERGE" >&6; }
14184 else
14185   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14186 $as_echo "no" >&6; }
14187 fi
14188
14189
14190   test -n "$MSGMERGE" && break
14191 done
14192
14193   for ac_prog in xgettext
14194 do
14195   # Extract the first word of "$ac_prog", so it can be a program name with args.
14196 set dummy $ac_prog; ac_word=$2
14197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14198 $as_echo_n "checking for $ac_word... " >&6; }
14199 if ${ac_cv_prog_XGETTEXT+:} false; then :
14200   $as_echo_n "(cached) " >&6
14201 else
14202   if test -n "$XGETTEXT"; then
14203   ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test.
14204 else
14205 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14206 for as_dir in $PATH
14207 do
14208   IFS=$as_save_IFS
14209   test -z "$as_dir" && as_dir=.
14210     for ac_exec_ext in '' $ac_executable_extensions; do
14211   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14212     ac_cv_prog_XGETTEXT="$ac_prog"
14213     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14214     break 2
14215   fi
14216 done
14217   done
14218 IFS=$as_save_IFS
14219
14220 fi
14221 fi
14222 XGETTEXT=$ac_cv_prog_XGETTEXT
14223 if test -n "$XGETTEXT"; then
14224   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
14225 $as_echo "$XGETTEXT" >&6; }
14226 else
14227   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14228 $as_echo "no" >&6; }
14229 fi
14230
14231
14232   test -n "$XGETTEXT" && break
14233 done
14234
14235
14236 fi
14237
14238 # Check for Tcl configuration script tclConfig.sh
14239 if test "$with_tcl" = yes; then
14240     for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84 tclsh8.3 tclsh83
14241 do
14242   # Extract the first word of "$ac_prog", so it can be a program name with args.
14243 set dummy $ac_prog; ac_word=$2
14244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14245 $as_echo_n "checking for $ac_word... " >&6; }
14246 if ${ac_cv_path_TCLSH+:} false; then :
14247   $as_echo_n "(cached) " >&6
14248 else
14249   case $TCLSH in
14250   [\\/]* | ?:[\\/]*)
14251   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
14252   ;;
14253   *)
14254   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14255 for as_dir in $PATH
14256 do
14257   IFS=$as_save_IFS
14258   test -z "$as_dir" && as_dir=.
14259     for ac_exec_ext in '' $ac_executable_extensions; do
14260   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14261     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
14262     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14263     break 2
14264   fi
14265 done
14266   done
14267 IFS=$as_save_IFS
14268
14269   ;;
14270 esac
14271 fi
14272 TCLSH=$ac_cv_path_TCLSH
14273 if test -n "$TCLSH"; then
14274   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
14275 $as_echo "$TCLSH" >&6; }
14276 else
14277   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14278 $as_echo "no" >&6; }
14279 fi
14280
14281
14282   test -n "$TCLSH" && break
14283 done
14284
14285 if test x"$TCLSH" = x""; then
14286   as_fn_error $? "Tcl shell not found" "$LINENO" 5
14287 fi
14288
14289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
14290 $as_echo_n "checking for tclConfig.sh... " >&6; }
14291 # Let user override test
14292 if test -z "$TCL_CONFIG_SH"; then
14293     pgac_test_dirs="$with_tclconfig"
14294
14295     set X $pgac_test_dirs; shift
14296     if test $# -eq 0; then
14297         test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
14298         set X `echo 'puts $auto_path' | $TCLSH`; shift
14299     fi
14300
14301     for pgac_dir do
14302         if test -r "$pgac_dir/tclConfig.sh"; then
14303             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
14304             break
14305         fi
14306     done
14307 fi
14308
14309 if test -z "$TCL_CONFIG_SH"; then
14310     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14311 $as_echo "no" >&6; }
14312     as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
14313 else
14314     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
14315 $as_echo "$TCL_CONFIG_SH" >&6; }
14316 fi
14317
14318
14319
14320     . "$TCL_CONFIG_SH"
14321 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
14322 eval TCL_LIB_FILE=\"$TCL_LIB_FILE\"
14323 eval TCL_LIBS=\"$TCL_LIBS\"
14324 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
14325 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
14326
14327         # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
14328     ac_save_CPPFLAGS=$CPPFLAGS
14329     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
14330     ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
14331 if test "x$ac_cv_header_tcl_h" = xyes; then :
14332
14333 else
14334   as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
14335 fi
14336
14337
14338     CPPFLAGS=$ac_save_CPPFLAGS
14339 fi
14340
14341 # check for <perl.h>
14342 if test "$with_perl" = yes; then
14343   ac_save_CPPFLAGS=$CPPFLAGS
14344   CPPFLAGS="$CPPFLAGS -I$perl_archlibexp/CORE"
14345   ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
14346 "
14347 if test "x$ac_cv_header_perl_h" = xyes; then :
14348
14349 else
14350   as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
14351 fi
14352
14353
14354   # While we're at it, check that we can link to libperl.
14355   # On most platforms, if perl.h is there then libperl.so will be too, but at
14356   # this writing Debian packages them separately.  There is no known reason to
14357   # waste cycles on separate probes for the Tcl or Python libraries, though.
14358   pgac_save_LIBS=$LIBS
14359   LIBS="$perl_embed_ldflags"
14360   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
14361 $as_echo_n "checking for libperl... " >&6; }
14362   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14363 /* end confdefs.h.  */
14364
14365 #include <EXTERN.h>
14366 #include <perl.h>
14367
14368 int
14369 main ()
14370 {
14371 perl_alloc();
14372   ;
14373   return 0;
14374 }
14375 _ACEOF
14376 if ac_fn_c_try_link "$LINENO"; then :
14377   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14378 $as_echo "yes" >&6; }
14379 else
14380   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14381 $as_echo "no" >&6; }
14382      as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
14383 fi
14384 rm -f core conftest.err conftest.$ac_objext \
14385     conftest$ac_exeext conftest.$ac_ext
14386   LIBS=$pgac_save_LIBS
14387   CPPFLAGS=$ac_save_CPPFLAGS
14388 fi
14389
14390 # check for <Python.h>
14391 if test "$with_python" = yes; then
14392   ac_save_CPPFLAGS=$CPPFLAGS
14393   CPPFLAGS="$python_includespec $CPPFLAGS"
14394   ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
14395 if test "x$ac_cv_header_Python_h" = xyes; then :
14396
14397 else
14398   as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
14399 fi
14400
14401
14402   CPPFLAGS=$ac_save_CPPFLAGS
14403 fi
14404
14405 #
14406 # Check for DocBook and tools
14407 #
14408 for ac_prog in onsgmls nsgmls
14409 do
14410   # Extract the first word of "$ac_prog", so it can be a program name with args.
14411 set dummy $ac_prog; ac_word=$2
14412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14413 $as_echo_n "checking for $ac_word... " >&6; }
14414 if ${ac_cv_prog_NSGMLS+:} false; then :
14415   $as_echo_n "(cached) " >&6
14416 else
14417   if test -n "$NSGMLS"; then
14418   ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
14419 else
14420 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14421 for as_dir in $PATH
14422 do
14423   IFS=$as_save_IFS
14424   test -z "$as_dir" && as_dir=.
14425     for ac_exec_ext in '' $ac_executable_extensions; do
14426   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14427     ac_cv_prog_NSGMLS="$ac_prog"
14428     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14429     break 2
14430   fi
14431 done
14432   done
14433 IFS=$as_save_IFS
14434
14435 fi
14436 fi
14437 NSGMLS=$ac_cv_prog_NSGMLS
14438 if test -n "$NSGMLS"; then
14439   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NSGMLS" >&5
14440 $as_echo "$NSGMLS" >&6; }
14441 else
14442   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14443 $as_echo "no" >&6; }
14444 fi
14445
14446
14447   test -n "$NSGMLS" && break
14448 done
14449
14450 for ac_prog in openjade jade
14451 do
14452   # Extract the first word of "$ac_prog", so it can be a program name with args.
14453 set dummy $ac_prog; ac_word=$2
14454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14455 $as_echo_n "checking for $ac_word... " >&6; }
14456 if ${ac_cv_prog_JADE+:} false; then :
14457   $as_echo_n "(cached) " >&6
14458 else
14459   if test -n "$JADE"; then
14460   ac_cv_prog_JADE="$JADE" # Let the user override the test.
14461 else
14462 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14463 for as_dir in $PATH
14464 do
14465   IFS=$as_save_IFS
14466   test -z "$as_dir" && as_dir=.
14467     for ac_exec_ext in '' $ac_executable_extensions; do
14468   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14469     ac_cv_prog_JADE="$ac_prog"
14470     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14471     break 2
14472   fi
14473 done
14474   done
14475 IFS=$as_save_IFS
14476
14477 fi
14478 fi
14479 JADE=$ac_cv_prog_JADE
14480 if test -n "$JADE"; then
14481   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JADE" >&5
14482 $as_echo "$JADE" >&6; }
14483 else
14484   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14485 $as_echo "no" >&6; }
14486 fi
14487
14488
14489   test -n "$JADE" && break
14490 done
14491
14492
14493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook V4.2" >&5
14494 $as_echo_n "checking for DocBook V4.2... " >&6; }
14495 if ${pgac_cv_check_docbook+:} false; then :
14496   $as_echo_n "(cached) " >&6
14497 else
14498   cat >conftest.sgml <<EOF
14499 <!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
14500 <book>
14501  <title>test</title>
14502  <chapter>
14503   <title>random</title>
14504    <sect1>
14505     <title>testsect</title>
14506     <para>text</para>
14507   </sect1>
14508  </chapter>
14509 </book>
14510 EOF
14511
14512 pgac_cv_check_docbook=no
14513
14514 if test -n "$NSGMLS"; then
14515   $NSGMLS -s conftest.sgml 1>&5 2>&1
14516   if test $? -eq 0; then
14517     pgac_cv_check_docbook=yes
14518   fi
14519 fi
14520 rm -f conftest.sgml
14521 fi
14522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_docbook" >&5
14523 $as_echo "$pgac_cv_check_docbook" >&6; }
14524
14525 have_docbook=$pgac_cv_check_docbook
14526
14527
14528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook stylesheets" >&5
14529 $as_echo_n "checking for DocBook stylesheets... " >&6; }
14530 if ${pgac_cv_path_stylesheets+:} false; then :
14531   $as_echo_n "(cached) " >&6
14532 else
14533   if test -n "$DOCBOOKSTYLE"; then
14534   pgac_cv_path_stylesheets=$DOCBOOKSTYLE
14535 else
14536   for pgac_prefix in /usr /usr/local /opt /sw; do
14537     for pgac_infix in share lib; do
14538       for pgac_postfix in \
14539         sgml/stylesheets/nwalsh-modular \
14540         sgml/stylesheets/docbook \
14541         sgml/stylesheets/dsssl/docbook \
14542         sgml/docbook-dsssl \
14543         sgml/docbook/dsssl/modular \
14544         sgml/docbook/stylesheet/dsssl/modular \
14545         sgml/docbook/dsssl-stylesheets \
14546         sgml/dsssl/docbook-dsssl-nwalsh
14547       do
14548         pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
14549         if test -r "$pgac_candidate/html/docbook.dsl" \
14550            && test -r "$pgac_candidate/print/docbook.dsl"
14551         then
14552           pgac_cv_path_stylesheets=$pgac_candidate
14553           break 3
14554         fi
14555       done
14556     done
14557   done
14558 fi
14559 fi
14560
14561 DOCBOOKSTYLE=$pgac_cv_path_stylesheets
14562
14563 if test -n "$DOCBOOKSTYLE"; then
14564   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOCBOOKSTYLE" >&5
14565 $as_echo "$DOCBOOKSTYLE" >&6; }
14566 else
14567   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14568 $as_echo "no" >&6; }
14569 fi
14570 if test -n "$DOCBOOKSTYLE" -a -r "$DOCBOOKSTYLE/bin/collateindex.pl"; then
14571   COLLATEINDEX="$DOCBOOKSTYLE/bin/collateindex.pl"
14572
14573 else
14574   # Extract the first word of "collateindex.pl", so it can be a program name with args.
14575 set dummy collateindex.pl; ac_word=$2
14576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14577 $as_echo_n "checking for $ac_word... " >&6; }
14578 if ${ac_cv_path_COLLATEINDEX+:} false; then :
14579   $as_echo_n "(cached) " >&6
14580 else
14581   case $COLLATEINDEX in
14582   [\\/]* | ?:[\\/]*)
14583   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
14584   ;;
14585   *)
14586   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14587 for as_dir in $PATH
14588 do
14589   IFS=$as_save_IFS
14590   test -z "$as_dir" && as_dir=.
14591     for ac_exec_ext in '' $ac_executable_extensions; do
14592   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14593     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
14594     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14595     break 2
14596   fi
14597 done
14598   done
14599 IFS=$as_save_IFS
14600
14601   ;;
14602 esac
14603 fi
14604 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
14605 if test -n "$COLLATEINDEX"; then
14606   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COLLATEINDEX" >&5
14607 $as_echo "$COLLATEINDEX" >&6; }
14608 else
14609   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14610 $as_echo "no" >&6; }
14611 fi
14612
14613
14614 fi
14615 for ac_prog in dbtoepub
14616 do
14617   # Extract the first word of "$ac_prog", so it can be a program name with args.
14618 set dummy $ac_prog; ac_word=$2
14619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14620 $as_echo_n "checking for $ac_word... " >&6; }
14621 if ${ac_cv_prog_DBTOEPUB+:} false; then :
14622   $as_echo_n "(cached) " >&6
14623 else
14624   if test -n "$DBTOEPUB"; then
14625   ac_cv_prog_DBTOEPUB="$DBTOEPUB" # Let the user override the test.
14626 else
14627 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14628 for as_dir in $PATH
14629 do
14630   IFS=$as_save_IFS
14631   test -z "$as_dir" && as_dir=.
14632     for ac_exec_ext in '' $ac_executable_extensions; do
14633   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14634     ac_cv_prog_DBTOEPUB="$ac_prog"
14635     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14636     break 2
14637   fi
14638 done
14639   done
14640 IFS=$as_save_IFS
14641
14642 fi
14643 fi
14644 DBTOEPUB=$ac_cv_prog_DBTOEPUB
14645 if test -n "$DBTOEPUB"; then
14646   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
14647 $as_echo "$DBTOEPUB" >&6; }
14648 else
14649   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14650 $as_echo "no" >&6; }
14651 fi
14652
14653
14654   test -n "$DBTOEPUB" && break
14655 done
14656
14657 for ac_prog in xsltproc
14658 do
14659   # Extract the first word of "$ac_prog", so it can be a program name with args.
14660 set dummy $ac_prog; ac_word=$2
14661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14662 $as_echo_n "checking for $ac_word... " >&6; }
14663 if ${ac_cv_prog_XSLTPROC+:} false; then :
14664   $as_echo_n "(cached) " >&6
14665 else
14666   if test -n "$XSLTPROC"; then
14667   ac_cv_prog_XSLTPROC="$XSLTPROC" # Let the user override the test.
14668 else
14669 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14670 for as_dir in $PATH
14671 do
14672   IFS=$as_save_IFS
14673   test -z "$as_dir" && as_dir=.
14674     for ac_exec_ext in '' $ac_executable_extensions; do
14675   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14676     ac_cv_prog_XSLTPROC="$ac_prog"
14677     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14678     break 2
14679   fi
14680 done
14681   done
14682 IFS=$as_save_IFS
14683
14684 fi
14685 fi
14686 XSLTPROC=$ac_cv_prog_XSLTPROC
14687 if test -n "$XSLTPROC"; then
14688   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
14689 $as_echo "$XSLTPROC" >&6; }
14690 else
14691   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14692 $as_echo "no" >&6; }
14693 fi
14694
14695
14696   test -n "$XSLTPROC" && break
14697 done
14698
14699 for ac_prog in osx sgml2xml sx
14700 do
14701   # Extract the first word of "$ac_prog", so it can be a program name with args.
14702 set dummy $ac_prog; ac_word=$2
14703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14704 $as_echo_n "checking for $ac_word... " >&6; }
14705 if ${ac_cv_prog_OSX+:} false; then :
14706   $as_echo_n "(cached) " >&6
14707 else
14708   if test -n "$OSX"; then
14709   ac_cv_prog_OSX="$OSX" # Let the user override the test.
14710 else
14711 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14712 for as_dir in $PATH
14713 do
14714   IFS=$as_save_IFS
14715   test -z "$as_dir" && as_dir=.
14716     for ac_exec_ext in '' $ac_executable_extensions; do
14717   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14718     ac_cv_prog_OSX="$ac_prog"
14719     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14720     break 2
14721   fi
14722 done
14723   done
14724 IFS=$as_save_IFS
14725
14726 fi
14727 fi
14728 OSX=$ac_cv_prog_OSX
14729 if test -n "$OSX"; then
14730   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OSX" >&5
14731 $as_echo "$OSX" >&6; }
14732 else
14733   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14734 $as_echo "no" >&6; }
14735 fi
14736
14737
14738   test -n "$OSX" && break
14739 done
14740
14741
14742 #
14743 # Check for test tools
14744 #
14745 for ac_prog in prove
14746 do
14747   # Extract the first word of "$ac_prog", so it can be a program name with args.
14748 set dummy $ac_prog; ac_word=$2
14749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14750 $as_echo_n "checking for $ac_word... " >&6; }
14751 if ${ac_cv_prog_PROVE+:} false; then :
14752   $as_echo_n "(cached) " >&6
14753 else
14754   if test -n "$PROVE"; then
14755   ac_cv_prog_PROVE="$PROVE" # Let the user override the test.
14756 else
14757 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14758 for as_dir in $PATH
14759 do
14760   IFS=$as_save_IFS
14761   test -z "$as_dir" && as_dir=.
14762     for ac_exec_ext in '' $ac_executable_extensions; do
14763   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14764     ac_cv_prog_PROVE="$ac_prog"
14765     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14766     break 2
14767   fi
14768 done
14769   done
14770 IFS=$as_save_IFS
14771
14772 fi
14773 fi
14774 PROVE=$ac_cv_prog_PROVE
14775 if test -n "$PROVE"; then
14776   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
14777 $as_echo "$PROVE" >&6; }
14778 else
14779   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14780 $as_echo "no" >&6; }
14781 fi
14782
14783
14784   test -n "$PROVE" && break
14785 done
14786
14787
14788 # Thread testing
14789
14790 # We have to run the thread test near the end so we have all our symbols
14791 # defined.  Cross compiling throws a warning.
14792 #
14793 if test "$enable_thread_safety" = yes; then
14794 if test "$PORTNAME" != "win32"
14795 then
14796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking thread safety of required library functions" >&5
14797 $as_echo_n "checking thread safety of required library functions... " >&6; }
14798
14799 _CFLAGS="$CFLAGS"
14800 _LIBS="$LIBS"
14801 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
14802 LIBS="$LIBS $PTHREAD_LIBS"
14803 if test "$cross_compiling" = yes; then :
14804   { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
14805 $as_echo "maybe" >&6; }
14806   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
14807 *** Skipping thread test program because of cross-compile build.
14808 *** Run the program in src/test/thread on the target machine.
14809 " >&5
14810 $as_echo "$as_me: WARNING:
14811 *** Skipping thread test program because of cross-compile build.
14812 *** Run the program in src/test/thread on the target machine.
14813 " >&2;}
14814 else
14815   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14816 /* end confdefs.h.  */
14817 #include "$srcdir/src/test/thread/thread_test.c"
14818 _ACEOF
14819 if ac_fn_c_try_run "$LINENO"; then :
14820   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14821 $as_echo "yes" >&6; }
14822 else
14823   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14824 $as_echo "no" >&6; }
14825   as_fn_error $? "thread test program failed
14826 This platform is not thread-safe.  Check the file 'config.log' or compile
14827 and run src/test/thread/thread_test for the exact reason.
14828 Use --disable-thread-safety to disable thread safety." "$LINENO" 5
14829 fi
14830 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14831   conftest.$ac_objext conftest.beam conftest.$ac_ext
14832 fi
14833
14834 CFLAGS="$_CFLAGS"
14835 LIBS="$_LIBS"
14836 else
14837 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** skipping thread test on Win32" >&5
14838 $as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
14839 fi
14840 fi
14841
14842 # If compiler will take -Wl,--as-needed (or various platform-specific
14843 # spellings thereof) then add that to LDFLAGS.  This is much easier than
14844 # trying to filter LIBS to the minimum for each executable.
14845 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
14846 # libreadline; therefore we postpone testing it until we know what library
14847 # dependencies readline has.  The test code will try to link with $LIBS.
14848 if test "$with_readline" = yes; then
14849   link_test_func=readline
14850 else
14851   link_test_func=exit
14852 fi
14853
14854 if test "$PORTNAME" = "darwin"; then
14855   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
14856 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
14857 if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
14858   $as_echo_n "(cached) " >&6
14859 else
14860   pgac_save_LDFLAGS=$LDFLAGS
14861 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
14862 if test "$cross_compiling" = yes; then :
14863   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
14864 else
14865   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14866 /* end confdefs.h.  */
14867 extern void $link_test_func (); void (*fptr) () = $link_test_func;
14868 int
14869 main ()
14870 {
14871
14872   ;
14873   return 0;
14874 }
14875 _ACEOF
14876 if ac_fn_c_try_run "$LINENO"; then :
14877   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
14878 else
14879   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
14880 fi
14881 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14882   conftest.$ac_objext conftest.beam conftest.$ac_ext
14883 fi
14884
14885 LDFLAGS="$pgac_save_LDFLAGS"
14886 fi
14887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
14888 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
14889 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
14890   LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
14891 fi
14892
14893 elif test "$PORTNAME" = "openbsd"; then
14894   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
14895 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
14896 if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
14897   $as_echo_n "(cached) " >&6
14898 else
14899   pgac_save_LDFLAGS=$LDFLAGS
14900 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
14901 if test "$cross_compiling" = yes; then :
14902   pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
14903 else
14904   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14905 /* end confdefs.h.  */
14906 extern void $link_test_func (); void (*fptr) () = $link_test_func;
14907 int
14908 main ()
14909 {
14910
14911   ;
14912   return 0;
14913 }
14914 _ACEOF
14915 if ac_fn_c_try_run "$LINENO"; then :
14916   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
14917 else
14918   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
14919 fi
14920 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14921   conftest.$ac_objext conftest.beam conftest.$ac_ext
14922 fi
14923
14924 LDFLAGS="$pgac_save_LDFLAGS"
14925 fi
14926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
14927 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
14928 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
14929   LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
14930 fi
14931
14932 else
14933   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
14934 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
14935 if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
14936   $as_echo_n "(cached) " >&6
14937 else
14938   pgac_save_LDFLAGS=$LDFLAGS
14939 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
14940 if test "$cross_compiling" = yes; then :
14941   pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
14942 else
14943   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14944 /* end confdefs.h.  */
14945 extern void $link_test_func (); void (*fptr) () = $link_test_func;
14946 int
14947 main ()
14948 {
14949
14950   ;
14951   return 0;
14952 }
14953 _ACEOF
14954 if ac_fn_c_try_run "$LINENO"; then :
14955   pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
14956 else
14957   pgac_cv_prog_cc_ldflags__Wl___as_needed=no
14958 fi
14959 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14960   conftest.$ac_objext conftest.beam conftest.$ac_ext
14961 fi
14962
14963 LDFLAGS="$pgac_save_LDFLAGS"
14964 fi
14965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
14966 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
14967 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
14968   LDFLAGS="$LDFLAGS -Wl,--as-needed"
14969 fi
14970
14971 fi
14972
14973 # Create compiler version string
14974 if test x"$GCC" = x"yes" ; then
14975   cc_string=`${CC} --version | sed q`
14976   case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
14977 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
14978   cc_string=`${CC} -V 2>&1 | sed q`
14979 else
14980   cc_string=$CC
14981 fi
14982
14983
14984 cat >>confdefs.h <<_ACEOF
14985 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
14986 _ACEOF
14987
14988
14989 # Supply a numeric version string for use by 3rd party add-ons
14990 # awk -F is a regex on some platforms, and not on others, so make "." a tab
14991 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
14992 tr '.' '        ' |
14993 $AWK '{printf "%d%02d%02d", $1, $2, (NF >= 3) ? $3 : 0}'`"
14994
14995 cat >>confdefs.h <<_ACEOF
14996 #define PG_VERSION_NUM $PG_VERSION_NUM
14997 _ACEOF
14998
14999
15000
15001 # Begin output steps
15002
15003 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
15004 $as_echo "$as_me: using compiler=$cc_string" >&6;}
15005 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
15006 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
15007 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
15008 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
15009 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
15010 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
15011
15012 # prepare build tree if outside source tree
15013 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
15014 # Note 2: /bin/pwd might be better than shell's built-in at getting
15015 #         a symlink-free name.
15016 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
15017   vpath_build=no
15018 else
15019   vpath_build=yes
15020   if test "$no_create" != yes; then
15021     $as_echo_n "preparing build tree... " >&6
15022     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
15023     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
15024       || as_fn_error $? "failed" "$LINENO" 5
15025     { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15026 $as_echo "done" >&6; }
15027   fi
15028 fi
15029
15030
15031
15032 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
15033
15034
15035 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}"
15036
15037
15038 if test "$PORTNAME" = "win32"; then
15039 ac_config_commands="$ac_config_commands check_win32_symlinks"
15040
15041 fi
15042
15043 ac_config_headers="$ac_config_headers src/include/pg_config.h"
15044
15045
15046 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
15047
15048
15049 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
15050
15051
15052 cat >confcache <<\_ACEOF
15053 # This file is a shell script that caches the results of configure
15054 # tests run on this system so they can be shared between configure
15055 # scripts and configure runs, see configure's option --config-cache.
15056 # It is not useful on other systems.  If it contains results you don't
15057 # want to keep, you may remove or edit it.
15058 #
15059 # config.status only pays attention to the cache file if you give it
15060 # the --recheck option to rerun configure.
15061 #
15062 # `ac_cv_env_foo' variables (set or unset) will be overridden when
15063 # loading this file, other *unset* `ac_cv_foo' will be assigned the
15064 # following values.
15065
15066 _ACEOF
15067
15068 # The following way of writing the cache mishandles newlines in values,
15069 # but we know of no workaround that is simple, portable, and efficient.
15070 # So, we kill variables containing newlines.
15071 # Ultrix sh set writes to stderr and can't be redirected directly,
15072 # and sets the high bit in the cache file unless we assign to the vars.
15073 (
15074   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15075     eval ac_val=\$$ac_var
15076     case $ac_val in #(
15077     *${as_nl}*)
15078       case $ac_var in #(
15079       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15080 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
15081       esac
15082       case $ac_var in #(
15083       _ | IFS | as_nl) ;; #(
15084       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15085       *) { eval $ac_var=; unset $ac_var;} ;;
15086       esac ;;
15087     esac
15088   done
15089
15090   (set) 2>&1 |
15091     case $as_nl`(ac_space=' '; set) 2>&1` in #(
15092     *${as_nl}ac_space=\ *)
15093       # `set' does not quote correctly, so add quotes: double-quote
15094       # substitution turns \\\\ into \\, and sed turns \\ into \.
15095       sed -n \
15096         "s/'/'\\\\''/g;
15097           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15098       ;; #(
15099     *)
15100       # `set' quotes correctly as required by POSIX, so do not add quotes.
15101       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
15102       ;;
15103     esac |
15104     sort
15105 ) |
15106   sed '
15107      /^ac_cv_env_/b end
15108      t clear
15109      :clear
15110      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15111      t end
15112      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15113      :end' >>confcache
15114 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15115   if test -w "$cache_file"; then
15116     if test "x$cache_file" != "x/dev/null"; then
15117       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15118 $as_echo "$as_me: updating cache $cache_file" >&6;}
15119       if test ! -f "$cache_file" || test -h "$cache_file"; then
15120         cat confcache >"$cache_file"
15121       else
15122         case $cache_file in #(
15123         */* | ?:*)
15124           mv -f confcache "$cache_file"$$ &&
15125           mv -f "$cache_file"$$ "$cache_file" ;; #(
15126         *)
15127           mv -f confcache "$cache_file" ;;
15128         esac
15129       fi
15130     fi
15131   else
15132     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15133 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
15134   fi
15135 fi
15136 rm -f confcache
15137
15138 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15139 # Let make expand exec_prefix.
15140 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15141
15142 DEFS=-DHAVE_CONFIG_H
15143
15144 ac_libobjs=
15145 ac_ltlibobjs=
15146 U=
15147 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15148   # 1. Remove the extension, and $U if already installed.
15149   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
15150   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
15151   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
15152   #    will be set to the directory where LIBOBJS objects are built.
15153   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15154   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
15155 done
15156 LIBOBJS=$ac_libobjs
15157
15158 LTLIBOBJS=$ac_ltlibobjs
15159
15160
15161
15162
15163 : "${CONFIG_STATUS=./config.status}"
15164 ac_write_fail=0
15165 ac_clean_files_save=$ac_clean_files
15166 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15167 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15168 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15169 as_write_fail=0
15170 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
15171 #! $SHELL
15172 # Generated by $as_me.
15173 # Run this file to recreate the current configuration.
15174 # Compiler output produced by configure, useful for debugging
15175 # configure, is in config.log if it exists.
15176
15177 debug=false
15178 ac_cs_recheck=false
15179 ac_cs_silent=false
15180
15181 SHELL=\${CONFIG_SHELL-$SHELL}
15182 export SHELL
15183 _ASEOF
15184 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15185 ## -------------------- ##
15186 ## M4sh Initialization. ##
15187 ## -------------------- ##
15188
15189 # Be more Bourne compatible
15190 DUALCASE=1; export DUALCASE # for MKS sh
15191 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
15192   emulate sh
15193   NULLCMD=:
15194   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
15195   # is contrary to our usage.  Disable this feature.
15196   alias -g '${1+"$@"}'='"$@"'
15197   setopt NO_GLOB_SUBST
15198 else
15199   case `(set -o) 2>/dev/null` in #(
15200   *posix*) :
15201     set -o posix ;; #(
15202   *) :
15203      ;;
15204 esac
15205 fi
15206
15207
15208 as_nl='
15209 '
15210 export as_nl
15211 # Printing a long string crashes Solaris 7 /usr/bin/printf.
15212 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15213 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15214 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15215 # Prefer a ksh shell builtin over an external printf program on Solaris,
15216 # but without wasting forks for bash or zsh.
15217 if test -z "$BASH_VERSION$ZSH_VERSION" \
15218     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15219   as_echo='print -r --'
15220   as_echo_n='print -rn --'
15221 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15222   as_echo='printf %s\n'
15223   as_echo_n='printf %s'
15224 else
15225   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15226     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15227     as_echo_n='/usr/ucb/echo -n'
15228   else
15229     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15230     as_echo_n_body='eval
15231       arg=$1;
15232       case $arg in #(
15233       *"$as_nl"*)
15234         expr "X$arg" : "X\\(.*\\)$as_nl";
15235         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15236       esac;
15237       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15238     '
15239     export as_echo_n_body
15240     as_echo_n='sh -c $as_echo_n_body as_echo'
15241   fi
15242   export as_echo_body
15243   as_echo='sh -c $as_echo_body as_echo'
15244 fi
15245
15246 # The user is always right.
15247 if test "${PATH_SEPARATOR+set}" != set; then
15248   PATH_SEPARATOR=:
15249   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15250     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15251       PATH_SEPARATOR=';'
15252   }
15253 fi
15254
15255
15256 # IFS
15257 # We need space, tab and new line, in precisely that order.  Quoting is
15258 # there to prevent editors from complaining about space-tab.
15259 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
15260 # splitting by setting IFS to empty value.)
15261 IFS=" ""        $as_nl"
15262
15263 # Find who we are.  Look in the path if we contain no directory separator.
15264 as_myself=
15265 case $0 in #((
15266   *[\\/]* ) as_myself=$0 ;;
15267   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15268 for as_dir in $PATH
15269 do
15270   IFS=$as_save_IFS
15271   test -z "$as_dir" && as_dir=.
15272     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15273   done
15274 IFS=$as_save_IFS
15275
15276      ;;
15277 esac
15278 # We did not find ourselves, most probably we were run as `sh COMMAND'
15279 # in which case we are not to be found in the path.
15280 if test "x$as_myself" = x; then
15281   as_myself=$0
15282 fi
15283 if test ! -f "$as_myself"; then
15284   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15285   exit 1
15286 fi
15287
15288 # Unset variables that we do not need and which cause bugs (e.g. in
15289 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
15290 # suppresses any "Segmentation fault" message there.  '((' could
15291 # trigger a bug in pdksh 5.2.14.
15292 for as_var in BASH_ENV ENV MAIL MAILPATH
15293 do eval test x\${$as_var+set} = xset \
15294   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
15295 done
15296 PS1='$ '
15297 PS2='> '
15298 PS4='+ '
15299
15300 # NLS nuisances.
15301 LC_ALL=C
15302 export LC_ALL
15303 LANGUAGE=C
15304 export LANGUAGE
15305
15306 # CDPATH.
15307 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15308
15309
15310 # as_fn_error STATUS ERROR [LINENO LOG_FD]
15311 # ----------------------------------------
15312 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15313 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
15314 # script with STATUS, using 1 if that was 0.
15315 as_fn_error ()
15316 {
15317   as_status=$1; test $as_status -eq 0 && as_status=1
15318   if test "$4"; then
15319     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15320     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
15321   fi
15322   $as_echo "$as_me: error: $2" >&2
15323   as_fn_exit $as_status
15324 } # as_fn_error
15325
15326
15327 # as_fn_set_status STATUS
15328 # -----------------------
15329 # Set $? to STATUS, without forking.
15330 as_fn_set_status ()
15331 {
15332   return $1
15333 } # as_fn_set_status
15334
15335 # as_fn_exit STATUS
15336 # -----------------
15337 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15338 as_fn_exit ()
15339 {
15340   set +e
15341   as_fn_set_status $1
15342   exit $1
15343 } # as_fn_exit
15344
15345 # as_fn_unset VAR
15346 # ---------------
15347 # Portably unset VAR.
15348 as_fn_unset ()
15349 {
15350   { eval $1=; unset $1;}
15351 }
15352 as_unset=as_fn_unset
15353 # as_fn_append VAR VALUE
15354 # ----------------------
15355 # Append the text in VALUE to the end of the definition contained in VAR. Take
15356 # advantage of any shell optimizations that allow amortized linear growth over
15357 # repeated appends, instead of the typical quadratic growth present in naive
15358 # implementations.
15359 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15360   eval 'as_fn_append ()
15361   {
15362     eval $1+=\$2
15363   }'
15364 else
15365   as_fn_append ()
15366   {
15367     eval $1=\$$1\$2
15368   }
15369 fi # as_fn_append
15370
15371 # as_fn_arith ARG...
15372 # ------------------
15373 # Perform arithmetic evaluation on the ARGs, and store the result in the
15374 # global $as_val. Take advantage of shells that can avoid forks. The arguments
15375 # must be portable across $(()) and expr.
15376 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15377   eval 'as_fn_arith ()
15378   {
15379     as_val=$(( $* ))
15380   }'
15381 else
15382   as_fn_arith ()
15383   {
15384     as_val=`expr "$@" || test $? -eq 1`
15385   }
15386 fi # as_fn_arith
15387
15388
15389 if expr a : '\(a\)' >/dev/null 2>&1 &&
15390    test "X`expr 00001 : '.*\(...\)'`" = X001; then
15391   as_expr=expr
15392 else
15393   as_expr=false
15394 fi
15395
15396 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15397   as_basename=basename
15398 else
15399   as_basename=false
15400 fi
15401
15402 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15403   as_dirname=dirname
15404 else
15405   as_dirname=false
15406 fi
15407
15408 as_me=`$as_basename -- "$0" ||
15409 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15410          X"$0" : 'X\(//\)$' \| \
15411          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
15412 $as_echo X/"$0" |
15413     sed '/^.*\/\([^/][^/]*\)\/*$/{
15414             s//\1/
15415             q
15416           }
15417           /^X\/\(\/\/\)$/{
15418             s//\1/
15419             q
15420           }
15421           /^X\/\(\/\).*/{
15422             s//\1/
15423             q
15424           }
15425           s/.*/./; q'`
15426
15427 # Avoid depending upon Character Ranges.
15428 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15429 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15430 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15431 as_cr_digits='0123456789'
15432 as_cr_alnum=$as_cr_Letters$as_cr_digits
15433
15434 ECHO_C= ECHO_N= ECHO_T=
15435 case `echo -n x` in #(((((
15436 -n*)
15437   case `echo 'xy\c'` in
15438   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
15439   xy)  ECHO_C='\c';;
15440   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
15441        ECHO_T=' ';;
15442   esac;;
15443 *)
15444   ECHO_N='-n';;
15445 esac
15446
15447 rm -f conf$$ conf$$.exe conf$$.file
15448 if test -d conf$$.dir; then
15449   rm -f conf$$.dir/conf$$.file
15450 else
15451   rm -f conf$$.dir
15452   mkdir conf$$.dir 2>/dev/null
15453 fi
15454 if (echo >conf$$.file) 2>/dev/null; then
15455   if ln -s conf$$.file conf$$ 2>/dev/null; then
15456     as_ln_s='ln -s'
15457     # ... but there are two gotchas:
15458     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15459     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
15460     # In both cases, we have to default to `cp -pR'.
15461     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
15462       as_ln_s='cp -pR'
15463   elif ln conf$$.file conf$$ 2>/dev/null; then
15464     as_ln_s=ln
15465   else
15466     as_ln_s='cp -pR'
15467   fi
15468 else
15469   as_ln_s='cp -pR'
15470 fi
15471 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15472 rmdir conf$$.dir 2>/dev/null
15473
15474
15475 # as_fn_mkdir_p
15476 # -------------
15477 # Create "$as_dir" as a directory, including parents if necessary.
15478 as_fn_mkdir_p ()
15479 {
15480
15481   case $as_dir in #(
15482   -*) as_dir=./$as_dir;;
15483   esac
15484   test -d "$as_dir" || eval $as_mkdir_p || {
15485     as_dirs=
15486     while :; do
15487       case $as_dir in #(
15488       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15489       *) as_qdir=$as_dir;;
15490       esac
15491       as_dirs="'$as_qdir' $as_dirs"
15492       as_dir=`$as_dirname -- "$as_dir" ||
15493 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15494          X"$as_dir" : 'X\(//\)[^/]' \| \
15495          X"$as_dir" : 'X\(//\)$' \| \
15496          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15497 $as_echo X"$as_dir" |
15498     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15499             s//\1/
15500             q
15501           }
15502           /^X\(\/\/\)[^/].*/{
15503             s//\1/
15504             q
15505           }
15506           /^X\(\/\/\)$/{
15507             s//\1/
15508             q
15509           }
15510           /^X\(\/\).*/{
15511             s//\1/
15512             q
15513           }
15514           s/.*/./; q'`
15515       test -d "$as_dir" && break
15516     done
15517     test -z "$as_dirs" || eval "mkdir $as_dirs"
15518   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
15519
15520
15521 } # as_fn_mkdir_p
15522 if mkdir -p . 2>/dev/null; then
15523   as_mkdir_p='mkdir -p "$as_dir"'
15524 else
15525   test -d ./-p && rmdir ./-p
15526   as_mkdir_p=false
15527 fi
15528
15529
15530 # as_fn_executable_p FILE
15531 # -----------------------
15532 # Test if FILE is an executable regular file.
15533 as_fn_executable_p ()
15534 {
15535   test -f "$1" && test -x "$1"
15536 } # as_fn_executable_p
15537 as_test_x='test -x'
15538 as_executable_p=as_fn_executable_p
15539
15540 # Sed expression to map a string onto a valid CPP name.
15541 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
15542
15543 # Sed expression to map a string onto a valid variable name.
15544 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
15545
15546
15547 exec 6>&1
15548 ## ----------------------------------- ##
15549 ## Main body of $CONFIG_STATUS script. ##
15550 ## ----------------------------------- ##
15551 _ASEOF
15552 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
15553
15554 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15555 # Save the log message, to keep $0 and so on meaningful, and to
15556 # report actual input values of CONFIG_FILES etc. instead of their
15557 # values after options handling.
15558 ac_log="
15559 This file was extended by PostgreSQL $as_me 9.5devel, which was
15560 generated by GNU Autoconf 2.69.  Invocation command line was
15561
15562   CONFIG_FILES    = $CONFIG_FILES
15563   CONFIG_HEADERS  = $CONFIG_HEADERS
15564   CONFIG_LINKS    = $CONFIG_LINKS
15565   CONFIG_COMMANDS = $CONFIG_COMMANDS
15566   $ $0 $@
15567
15568 on `(hostname || uname -n) 2>/dev/null | sed 1q`
15569 "
15570
15571 _ACEOF
15572
15573 case $ac_config_files in *"
15574 "*) set x $ac_config_files; shift; ac_config_files=$*;;
15575 esac
15576
15577 case $ac_config_headers in *"
15578 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15579 esac
15580
15581
15582 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15583 # Files that config.status was made for.
15584 config_files="$ac_config_files"
15585 config_headers="$ac_config_headers"
15586 config_links="$ac_config_links"
15587 config_commands="$ac_config_commands"
15588
15589 _ACEOF
15590
15591 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15592 ac_cs_usage="\
15593 \`$as_me' instantiates files and other configuration actions
15594 from templates according to the current configuration.  Unless the files
15595 and actions are specified as TAGs, all are instantiated by default.
15596
15597 Usage: $0 [OPTION]... [TAG]...
15598
15599   -h, --help       print this help, then exit
15600   -V, --version    print version number and configuration settings, then exit
15601       --config     print configuration, then exit
15602   -q, --quiet, --silent
15603                    do not print progress messages
15604   -d, --debug      don't remove temporary files
15605       --recheck    update $as_me by reconfiguring in the same conditions
15606       --file=FILE[:TEMPLATE]
15607                    instantiate the configuration file FILE
15608       --header=FILE[:TEMPLATE]
15609                    instantiate the configuration header FILE
15610
15611 Configuration files:
15612 $config_files
15613
15614 Configuration headers:
15615 $config_headers
15616
15617 Configuration links:
15618 $config_links
15619
15620 Configuration commands:
15621 $config_commands
15622
15623 Report bugs to <pgsql-bugs@postgresql.org>."
15624
15625 _ACEOF
15626 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15627 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
15628 ac_cs_version="\\
15629 PostgreSQL config.status 9.5devel
15630 configured by $0, generated by GNU Autoconf 2.69,
15631   with options \\"\$ac_cs_config\\"
15632
15633 Copyright (C) 2012 Free Software Foundation, Inc.
15634 This config.status script is free software; the Free Software Foundation
15635 gives unlimited permission to copy, distribute and modify it."
15636
15637 ac_pwd='$ac_pwd'
15638 srcdir='$srcdir'
15639 INSTALL='$INSTALL'
15640 MKDIR_P='$MKDIR_P'
15641 AWK='$AWK'
15642 test -n "\$AWK" || AWK=awk
15643 _ACEOF
15644
15645 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15646 # The default lists apply if the user does not specify any file.
15647 ac_need_defaults=:
15648 while test $# != 0
15649 do
15650   case $1 in
15651   --*=?*)
15652     ac_option=`expr "X$1" : 'X\([^=]*\)='`
15653     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
15654     ac_shift=:
15655     ;;
15656   --*=)
15657     ac_option=`expr "X$1" : 'X\([^=]*\)='`
15658     ac_optarg=
15659     ac_shift=:
15660     ;;
15661   *)
15662     ac_option=$1
15663     ac_optarg=$2
15664     ac_shift=shift
15665     ;;
15666   esac
15667
15668   case $ac_option in
15669   # Handling of the options.
15670   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15671     ac_cs_recheck=: ;;
15672   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
15673     $as_echo "$ac_cs_version"; exit ;;
15674   --config | --confi | --conf | --con | --co | --c )
15675     $as_echo "$ac_cs_config"; exit ;;
15676   --debug | --debu | --deb | --de | --d | -d )
15677     debug=: ;;
15678   --file | --fil | --fi | --f )
15679     $ac_shift
15680     case $ac_optarg in
15681     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15682     '') as_fn_error $? "missing file argument" ;;
15683     esac
15684     as_fn_append CONFIG_FILES " '$ac_optarg'"
15685     ac_need_defaults=false;;
15686   --header | --heade | --head | --hea )
15687     $ac_shift
15688     case $ac_optarg in
15689     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15690     esac
15691     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
15692     ac_need_defaults=false;;
15693   --he | --h)
15694     # Conflict between --help and --header
15695     as_fn_error $? "ambiguous option: \`$1'
15696 Try \`$0 --help' for more information.";;
15697   --help | --hel | -h )
15698     $as_echo "$ac_cs_usage"; exit ;;
15699   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15700   | -silent | --silent | --silen | --sile | --sil | --si | --s)
15701     ac_cs_silent=: ;;
15702
15703   # This is an error.
15704   -*) as_fn_error $? "unrecognized option: \`$1'
15705 Try \`$0 --help' for more information." ;;
15706
15707   *) as_fn_append ac_config_targets " $1"
15708      ac_need_defaults=false ;;
15709
15710   esac
15711   shift
15712 done
15713
15714 ac_configure_extra_args=
15715
15716 if $ac_cs_silent; then
15717   exec 6>/dev/null
15718   ac_configure_extra_args="$ac_configure_extra_args --silent"
15719 fi
15720
15721 _ACEOF
15722 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15723 if \$ac_cs_recheck; then
15724   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
15725   shift
15726   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15727   CONFIG_SHELL='$SHELL'
15728   export CONFIG_SHELL
15729   exec "\$@"
15730 fi
15731
15732 _ACEOF
15733 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15734 exec 5>>config.log
15735 {
15736   echo
15737   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15738 ## Running $as_me. ##
15739 _ASBOX
15740   $as_echo "$ac_log"
15741 } >&5
15742
15743 _ACEOF
15744 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15745 _ACEOF
15746
15747 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15748
15749 # Handling of arguments.
15750 for ac_config_target in $ac_config_targets
15751 do
15752   case $ac_config_target in
15753     "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
15754     "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
15755     "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
15756     "src/backend/port/dynloader.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
15757     "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
15758     "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
15759     "src/backend/port/pg_latch.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_latch.c:${LATCH_IMPLEMENTATION}" ;;
15760     "src/include/dynloader.h") CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
15761     "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
15762     "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
15763     "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
15764     "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
15765     "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
15766     "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
15767
15768   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
15769   esac
15770 done
15771
15772
15773 # If the user did not use the arguments to specify the items to instantiate,
15774 # then the envvar interface is used.  Set only those that are not.
15775 # We use the long form for the default assignment because of an extremely
15776 # bizarre bug on SunOS 4.1.3.
15777 if $ac_need_defaults; then
15778   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15779   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15780   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
15781   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
15782 fi
15783
15784 # Have a temporary directory for convenience.  Make it in the build tree
15785 # simply because there is no reason against having it here, and in addition,
15786 # creating and moving files from /tmp can sometimes cause problems.
15787 # Hook for its removal unless debugging.
15788 # Note that there is a small window in which the directory will not be cleaned:
15789 # after its creation but before its name has been assigned to `$tmp'.
15790 $debug ||
15791 {
15792   tmp= ac_tmp=
15793   trap 'exit_status=$?
15794   : "${ac_tmp:=$tmp}"
15795   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
15796 ' 0
15797   trap 'as_fn_exit 1' 1 2 13 15
15798 }
15799 # Create a (secure) tmp directory for tmp files.
15800
15801 {
15802   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
15803   test -d "$tmp"
15804 }  ||
15805 {
15806   tmp=./conf$$-$RANDOM
15807   (umask 077 && mkdir "$tmp")
15808 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
15809 ac_tmp=$tmp
15810
15811 # Set up the scripts for CONFIG_FILES section.
15812 # No need to generate them if there are no CONFIG_FILES.
15813 # This happens for instance with `./config.status config.h'.
15814 if test -n "$CONFIG_FILES"; then
15815
15816
15817 ac_cr=`echo X | tr X '\015'`
15818 # On cygwin, bash can eat \r inside `` if the user requested igncr.
15819 # But we know of no other shell where ac_cr would be empty at this
15820 # point, so we can use a bashism as a fallback.
15821 if test "x$ac_cr" = x; then
15822   eval ac_cr=\$\'\\r\'
15823 fi
15824 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15825 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
15826   ac_cs_awk_cr='\\r'
15827 else
15828   ac_cs_awk_cr=$ac_cr
15829 fi
15830
15831 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
15832 _ACEOF
15833
15834
15835 {
15836   echo "cat >conf$$subs.awk <<_ACEOF" &&
15837   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15838   echo "_ACEOF"
15839 } >conf$$subs.sh ||
15840   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15841 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
15842 ac_delim='%!_!# '
15843 for ac_last_try in false false false false false :; do
15844   . ./conf$$subs.sh ||
15845     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15846
15847   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15848   if test $ac_delim_n = $ac_delim_num; then
15849     break
15850   elif $ac_last_try; then
15851     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15852   else
15853     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15854   fi
15855 done
15856 rm -f conf$$subs.sh
15857
15858 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15859 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
15860 _ACEOF
15861 sed -n '
15862 h
15863 s/^/S["/; s/!.*/"]=/
15864 p
15865 g
15866 s/^[^!]*!//
15867 :repl
15868 t repl
15869 s/'"$ac_delim"'$//
15870 t delim
15871 :nl
15872 h
15873 s/\(.\{148\}\)..*/\1/
15874 t more1
15875 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15876 p
15877 n
15878 b repl
15879 :more1
15880 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15881 p
15882 g
15883 s/.\{148\}//
15884 t nl
15885 :delim
15886 h
15887 s/\(.\{148\}\)..*/\1/
15888 t more2
15889 s/["\\]/\\&/g; s/^/"/; s/$/"/
15890 p
15891 b
15892 :more2
15893 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15894 p
15895 g
15896 s/.\{148\}//
15897 t delim
15898 ' <conf$$subs.awk | sed '
15899 /^[^""]/{
15900   N
15901   s/\n//
15902 }
15903 ' >>$CONFIG_STATUS || ac_write_fail=1
15904 rm -f conf$$subs.awk
15905 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15906 _ACAWK
15907 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
15908   for (key in S) S_is_set[key] = 1
15909   FS = "\a"
15910
15911 }
15912 {
15913   line = $ 0
15914   nfields = split(line, field, "@")
15915   substed = 0
15916   len = length(field[1])
15917   for (i = 2; i < nfields; i++) {
15918     key = field[i]
15919     keylen = length(key)
15920     if (S_is_set[key]) {
15921       value = S[key]
15922       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15923       len += length(value) + length(field[++i])
15924       substed = 1
15925     } else
15926       len += 1 + keylen
15927   }
15928
15929   print line
15930 }
15931
15932 _ACAWK
15933 _ACEOF
15934 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15935 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15936   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15937 else
15938   cat
15939 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
15940   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
15941 _ACEOF
15942
15943 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15944 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
15945 # trailing colons and then remove the whole line if VPATH becomes empty
15946 # (actually we leave an empty line to preserve line numbers).
15947 if test "x$srcdir" = x.; then
15948   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
15949 h
15950 s///
15951 s/^/:/
15952 s/[      ]*$/:/
15953 s/:\$(srcdir):/:/g
15954 s/:\${srcdir}:/:/g
15955 s/:@srcdir@:/:/g
15956 s/^:*//
15957 s/:*$//
15958 x
15959 s/\(=[   ]*\).*/\1/
15960 G
15961 s/\n//
15962 s/^[^=]*=[       ]*$//
15963 }'
15964 fi
15965
15966 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15967 fi # test -n "$CONFIG_FILES"
15968
15969 # Set up the scripts for CONFIG_HEADERS section.
15970 # No need to generate them if there are no CONFIG_HEADERS.
15971 # This happens for instance with `./config.status Makefile'.
15972 if test -n "$CONFIG_HEADERS"; then
15973 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
15974 BEGIN {
15975 _ACEOF
15976
15977 # Transform confdefs.h into an awk script `defines.awk', embedded as
15978 # here-document in config.status, that substitutes the proper values into
15979 # config.h.in to produce config.h.
15980
15981 # Create a delimiter string that does not exist in confdefs.h, to ease
15982 # handling of long lines.
15983 ac_delim='%!_!# '
15984 for ac_last_try in false false :; do
15985   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15986   if test -z "$ac_tt"; then
15987     break
15988   elif $ac_last_try; then
15989     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
15990   else
15991     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15992   fi
15993 done
15994
15995 # For the awk script, D is an array of macro values keyed by name,
15996 # likewise P contains macro parameters if any.  Preserve backslash
15997 # newline sequences.
15998
15999 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16000 sed -n '
16001 s/.\{148\}/&'"$ac_delim"'/g
16002 t rset
16003 :rset
16004 s/^[     ]*#[    ]*define[       ][      ]*/ /
16005 t def
16006 d
16007 :def
16008 s/\\$//
16009 t bsnl
16010 s/["\\]/\\&/g
16011 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
16012 D["\1"]=" \3"/p
16013 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
16014 d
16015 :bsnl
16016 s/["\\]/\\&/g
16017 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
16018 D["\1"]=" \3\\\\\\n"\\/p
16019 t cont
16020 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16021 t cont
16022 d
16023 :cont
16024 n
16025 s/.\{148\}/&'"$ac_delim"'/g
16026 t clear
16027 :clear
16028 s/\\$//
16029 t bsnlc
16030 s/["\\]/\\&/g; s/^/"/; s/$/"/p
16031 d
16032 :bsnlc
16033 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16034 b cont
16035 ' <confdefs.h | sed '
16036 s/'"$ac_delim"'/"\\\
16037 "/g' >>$CONFIG_STATUS || ac_write_fail=1
16038
16039 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16040   for (key in D) D_is_set[key] = 1
16041   FS = "\a"
16042 }
16043 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16044   line = \$ 0
16045   split(line, arg, " ")
16046   if (arg[1] == "#") {
16047     defundef = arg[2]
16048     mac1 = arg[3]
16049   } else {
16050     defundef = substr(arg[1], 2)
16051     mac1 = arg[2]
16052   }
16053   split(mac1, mac2, "(") #)
16054   macro = mac2[1]
16055   prefix = substr(line, 1, index(line, defundef) - 1)
16056   if (D_is_set[macro]) {
16057     # Preserve the white space surrounding the "#".
16058     print prefix "define", macro P[macro] D[macro]
16059     next
16060   } else {
16061     # Replace #undef with comments.  This is necessary, for example,
16062     # in the case of _POSIX_SOURCE, which is predefined and required
16063     # on some systems where configure will not decide to define it.
16064     if (defundef == "undef") {
16065       print "/*", prefix defundef, macro, "*/"
16066       next
16067     }
16068   }
16069 }
16070 { print }
16071 _ACAWK
16072 _ACEOF
16073 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16074   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
16075 fi # test -n "$CONFIG_HEADERS"
16076
16077
16078 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
16079 shift
16080 for ac_tag
16081 do
16082   case $ac_tag in
16083   :[FHLC]) ac_mode=$ac_tag; continue;;
16084   esac
16085   case $ac_mode$ac_tag in
16086   :[FHL]*:*);;
16087   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
16088   :[FH]-) ac_tag=-:-;;
16089   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16090   esac
16091   ac_save_IFS=$IFS
16092   IFS=:
16093   set x $ac_tag
16094   IFS=$ac_save_IFS
16095   shift
16096   ac_file=$1
16097   shift
16098
16099   case $ac_mode in
16100   :L) ac_source=$1;;
16101   :[FH])
16102     ac_file_inputs=
16103     for ac_f
16104     do
16105       case $ac_f in
16106       -) ac_f="$ac_tmp/stdin";;
16107       *) # Look for the file first in the build tree, then in the source tree
16108          # (if the path is not absolute).  The absolute path cannot be DOS-style,
16109          # because $ac_f cannot contain `:'.
16110          test -f "$ac_f" ||
16111            case $ac_f in
16112            [\\/$]*) false;;
16113            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16114            esac ||
16115            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
16116       esac
16117       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16118       as_fn_append ac_file_inputs " '$ac_f'"
16119     done
16120
16121     # Let's still pretend it is `configure' which instantiates (i.e., don't
16122     # use $as_me), people would be surprised to read:
16123     #    /* config.h.  Generated by config.status.  */
16124     configure_input='Generated from '`
16125           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16126         `' by configure.'
16127     if test x"$ac_file" != x-; then
16128       configure_input="$ac_file.  $configure_input"
16129       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16130 $as_echo "$as_me: creating $ac_file" >&6;}
16131     fi
16132     # Neutralize special characters interpreted by sed in replacement strings.
16133     case $configure_input in #(
16134     *\&* | *\|* | *\\* )
16135        ac_sed_conf_input=`$as_echo "$configure_input" |
16136        sed 's/[\\\\&|]/\\\\&/g'`;; #(
16137     *) ac_sed_conf_input=$configure_input;;
16138     esac
16139
16140     case $ac_tag in
16141     *:-:* | *:-) cat >"$ac_tmp/stdin" \
16142       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
16143     esac
16144     ;;
16145   esac
16146
16147   ac_dir=`$as_dirname -- "$ac_file" ||
16148 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16149          X"$ac_file" : 'X\(//\)[^/]' \| \
16150          X"$ac_file" : 'X\(//\)$' \| \
16151          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
16152 $as_echo X"$ac_file" |
16153     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16154             s//\1/
16155             q
16156           }
16157           /^X\(\/\/\)[^/].*/{
16158             s//\1/
16159             q
16160           }
16161           /^X\(\/\/\)$/{
16162             s//\1/
16163             q
16164           }
16165           /^X\(\/\).*/{
16166             s//\1/
16167             q
16168           }
16169           s/.*/./; q'`
16170   as_dir="$ac_dir"; as_fn_mkdir_p
16171   ac_builddir=.
16172
16173 case "$ac_dir" in
16174 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16175 *)
16176   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
16177   # A ".." for each directory in $ac_dir_suffix.
16178   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
16179   case $ac_top_builddir_sub in
16180   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16181   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16182   esac ;;
16183 esac
16184 ac_abs_top_builddir=$ac_pwd
16185 ac_abs_builddir=$ac_pwd$ac_dir_suffix
16186 # for backward compatibility:
16187 ac_top_builddir=$ac_top_build_prefix
16188
16189 case $srcdir in
16190   .)  # We are building in place.
16191     ac_srcdir=.
16192     ac_top_srcdir=$ac_top_builddir_sub
16193     ac_abs_top_srcdir=$ac_pwd ;;
16194   [\\/]* | ?:[\\/]* )  # Absolute name.
16195     ac_srcdir=$srcdir$ac_dir_suffix;
16196     ac_top_srcdir=$srcdir
16197     ac_abs_top_srcdir=$srcdir ;;
16198   *) # Relative name.
16199     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16200     ac_top_srcdir=$ac_top_build_prefix$srcdir
16201     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
16202 esac
16203 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
16204
16205
16206   case $ac_mode in
16207   :F)
16208   #
16209   # CONFIG_FILE
16210   #
16211
16212   case $INSTALL in
16213   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16214   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
16215   esac
16216   ac_MKDIR_P=$MKDIR_P
16217   case $MKDIR_P in
16218   [\\/$]* | ?:[\\/]* ) ;;
16219   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16220   esac
16221 _ACEOF
16222
16223 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16224 # If the template does not know about datarootdir, expand it.
16225 # FIXME: This hack should be removed a few years after 2.60.
16226 ac_datarootdir_hack=; ac_datarootdir_seen=
16227 ac_sed_dataroot='
16228 /datarootdir/ {
16229   p
16230   q
16231 }
16232 /@datadir@/p
16233 /@docdir@/p
16234 /@infodir@/p
16235 /@localedir@/p
16236 /@mandir@/p'
16237 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
16238 *datarootdir*) ac_datarootdir_seen=yes;;
16239 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
16240   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16241 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
16242 _ACEOF
16243 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16244   ac_datarootdir_hack='
16245   s&@datadir@&$datadir&g
16246   s&@docdir@&$docdir&g
16247   s&@infodir@&$infodir&g
16248   s&@localedir@&$localedir&g
16249   s&@mandir@&$mandir&g
16250   s&\\\${datarootdir}&$datarootdir&g' ;;
16251 esac
16252 _ACEOF
16253
16254 # Neutralize VPATH when `$srcdir' = `.'.
16255 # Shell code in configure.ac might set extrasub.
16256 # FIXME: do we really want to maintain this feature?
16257 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16258 ac_sed_extra="$ac_vpsub
16259 $extrasub
16260 _ACEOF
16261 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16262 :t
16263 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16264 s|@configure_input@|$ac_sed_conf_input|;t t
16265 s&@top_builddir@&$ac_top_builddir_sub&;t t
16266 s&@top_build_prefix@&$ac_top_build_prefix&;t t
16267 s&@srcdir@&$ac_srcdir&;t t
16268 s&@abs_srcdir@&$ac_abs_srcdir&;t t
16269 s&@top_srcdir@&$ac_top_srcdir&;t t
16270 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16271 s&@builddir@&$ac_builddir&;t t
16272 s&@abs_builddir@&$ac_abs_builddir&;t t
16273 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16274 s&@INSTALL@&$ac_INSTALL&;t t
16275 s&@MKDIR_P@&$ac_MKDIR_P&;t t
16276 $ac_datarootdir_hack
16277 "
16278 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16279   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16280
16281 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
16282   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16283   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
16284       "$ac_tmp/out"`; test -z "$ac_out"; } &&
16285   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16286 which seems to be undefined.  Please make sure it is defined" >&5
16287 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16288 which seems to be undefined.  Please make sure it is defined" >&2;}
16289
16290   rm -f "$ac_tmp/stdin"
16291   case $ac_file in
16292   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16293   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
16294   esac \
16295   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16296  ;;
16297   :H)
16298   #
16299   # CONFIG_HEADER
16300   #
16301   if test x"$ac_file" != x-; then
16302     {
16303       $as_echo "/* $configure_input  */" \
16304       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16305     } >"$ac_tmp/config.h" \
16306       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16307     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
16308       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16309 $as_echo "$as_me: $ac_file is unchanged" >&6;}
16310     else
16311       rm -f "$ac_file"
16312       mv "$ac_tmp/config.h" "$ac_file" \
16313         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16314     fi
16315   else
16316     $as_echo "/* $configure_input  */" \
16317       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
16318       || as_fn_error $? "could not create -" "$LINENO" 5
16319   fi
16320  ;;
16321   :L)
16322   #
16323   # CONFIG_LINK
16324   #
16325
16326   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
16327     :
16328   else
16329     # Prefer the file from the source tree if names are identical.
16330     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
16331       ac_source=$srcdir/$ac_source
16332     fi
16333
16334     { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
16335 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
16336
16337     if test ! -r "$ac_source"; then
16338       as_fn_error $? "$ac_source: file not found" "$LINENO" 5
16339     fi
16340     rm -f "$ac_file"
16341
16342     # Try a relative symlink, then a hard link, then a copy.
16343     case $ac_source in
16344     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
16345         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
16346     esac
16347     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
16348       ln "$ac_source" "$ac_file" 2>/dev/null ||
16349       cp -p "$ac_source" "$ac_file" ||
16350       as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
16351   fi
16352  ;;
16353   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
16354 $as_echo "$as_me: executing $ac_file commands" >&6;}
16355  ;;
16356   esac
16357
16358
16359   case $ac_file$ac_mode in
16360     "check_win32_symlinks":C)
16361 # Links sometimes fail undetected on Mingw -
16362 # so here we detect it and warn the user
16363 for FILE in $CONFIG_LINKS
16364  do
16365         # test -e works for symlinks in the MinGW console
16366         test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
16367 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
16368  done
16369  ;;
16370     "src/include/pg_config.h":H)
16371 # Update timestamp for pg_config.h (see Makefile.global)
16372 echo >src/include/stamp-h
16373  ;;
16374     "src/include/pg_config_ext.h":H)
16375 # Update timestamp for pg_config_ext.h (see Makefile.global)
16376 echo >src/include/stamp-ext-h
16377  ;;
16378     "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
16379
16380   esac
16381 done # for ac_tag
16382
16383
16384 as_fn_exit 0
16385 _ACEOF
16386 ac_clean_files=$ac_clean_files_save
16387
16388 test $ac_write_fail = 0 ||
16389   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
16390
16391
16392 # configure is writing to config.log, and then calls config.status.
16393 # config.status does its own redirection, appending to config.log.
16394 # Unfortunately, on DOS this fails, as config.log is still kept open
16395 # by configure, so config.status won't be able to write to it; its
16396 # output is simply discarded.  So we exec the FD to /dev/null,
16397 # effectively closing config.log, so it can be properly (re)opened and
16398 # appended to by config.status.  When coming back to configure, we
16399 # need to make the FD available again.
16400 if test "$no_create" != yes; then
16401   ac_cs_success=:
16402   ac_config_status_args=
16403   test "$silent" = yes &&
16404     ac_config_status_args="$ac_config_status_args --quiet"
16405   exec 5>/dev/null
16406   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
16407   exec 5>>config.log
16408   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16409   # would make configure fail if this is the last instruction.
16410   $ac_cs_success || as_fn_exit 1
16411 fi
16412 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16413   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16414 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
16415 fi
16416