]> granicus.if.org Git - postgresql/blob - configure
Execute 18 tests for src/bin/scripts/t/090..
[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 XMLLINT
634 DBTOEPUB
635 COLLATEINDEX
636 DOCBOOKSTYLE
637 have_docbook
638 JADE
639 NSGMLS
640 TCL_SHLIB_LD_LIBS
641 TCL_SHARED_BUILD
642 TCL_LIB_SPEC
643 TCL_LIBS
644 TCL_LIB_FILE
645 TCL_INCLUDE_SPEC
646 TCL_CONFIG_SH
647 TCLSH
648 XGETTEXT
649 MSGMERGE
650 MSGFMT_FLAGS
651 MSGFMT
652 HAVE_POSIX_SIGNALS
653 LDAP_LIBS_BE
654 LDAP_LIBS_FE
655 PTHREAD_CFLAGS
656 PTHREAD_LIBS
657 acx_pthread_config
658 have_win32_dbghelp
659 HAVE_IPV6
660 LIBOBJS
661 UUID_LIBS
662 ZIC
663 python_enable_shared
664 python_additional_libs
665 python_libspec
666 python_libdir
667 python_includespec
668 python_version
669 python_majorversion
670 PYTHON
671 perl_embed_ldflags
672 perl_useshrplib
673 perl_privlibexp
674 perl_archlibexp
675 PERL
676 FLEXFLAGS
677 FLEX
678 BISONFLAGS
679 BISON
680 MKDIR_P
681 AWK
682 LN_S
683 TAR
684 install_bin
685 INSTALL_DATA
686 INSTALL_SCRIPT
687 INSTALL_PROGRAM
688 WINDRES
689 DLLWRAP
690 DLLTOOL
691 AR
692 STRIP_SHARED_LIB
693 STRIP_STATIC_LIB
694 STRIP
695 RANLIB
696 ld_R_works
697 with_gnu_ld
698 LD
699 LDFLAGS_SL
700 LDFLAGS_EX
701 ELF_SYS
702 EGREP
703 GREP
704 with_zlib
705 with_system_tzdata
706 with_libxslt
707 with_libxml
708 XML2_CONFIG
709 UUID_EXTRA_OBJS
710 with_uuid
711 with_selinux
712 with_openssl
713 krb_srvtab
714 with_python
715 with_perl
716 with_tcl
717 enable_thread_safety
718 INCLUDES
719 autodepend
720 TAS
721 GCC
722 CPP
723 CFLAGS_VECTOR
724 SUN_STUDIO_CC
725 OBJEXT
726 EXEEXT
727 ac_ct_CC
728 CPPFLAGS
729 LDFLAGS
730 CFLAGS
731 CC
732 enable_tap_tests
733 enable_dtrace
734 DTRACEFLAGS
735 DTRACE
736 enable_coverage
737 GENHTML
738 LCOV
739 GCOV
740 enable_debug
741 enable_rpath
742 default_port
743 WANTED_LANGUAGES
744 enable_nls
745 PORTNAME
746 host_os
747 host_vendor
748 host_cpu
749 host
750 build_os
751 build_vendor
752 build_cpu
753 build
754 PG_MAJORVERSION
755 configure_args
756 target_alias
757 host_alias
758 build_alias
759 LIBS
760 ECHO_T
761 ECHO_N
762 ECHO_C
763 DEFS
764 mandir
765 localedir
766 libdir
767 psdir
768 pdfdir
769 dvidir
770 htmldir
771 infodir
772 docdir
773 oldincludedir
774 includedir
775 localstatedir
776 sharedstatedir
777 sysconfdir
778 datadir
779 datarootdir
780 libexecdir
781 sbindir
782 bindir
783 program_transform_name
784 prefix
785 exec_prefix
786 PACKAGE_URL
787 PACKAGE_BUGREPORT
788 PACKAGE_STRING
789 PACKAGE_VERSION
790 PACKAGE_TARNAME
791 PACKAGE_NAME
792 PATH_SEPARATOR
793 SHELL'
794 ac_subst_files=''
795 ac_user_opts='
796 enable_option_checking
797 with_extra_version
798 with_template
799 with_includes
800 with_libraries
801 with_libs
802 enable_integer_datetimes
803 enable_nls
804 with_pgport
805 enable_rpath
806 enable_spinlocks
807 enable_atomics
808 enable_debug
809 enable_profiling
810 enable_coverage
811 enable_dtrace
812 enable_tap_tests
813 with_blocksize
814 with_segsize
815 with_wal_blocksize
816 with_wal_segsize
817 with_CC
818 enable_depend
819 enable_cassert
820 enable_thread_safety
821 with_tcl
822 with_tclconfig
823 with_perl
824 with_python
825 with_gssapi
826 with_krb_srvnam
827 with_pam
828 with_ldap
829 with_bonjour
830 with_openssl
831 with_selinux
832 with_readline
833 with_libedit_preferred
834 with_uuid
835 with_ossp_uuid
836 with_libxml
837 with_libxslt
838 with_system_tzdata
839 with_zlib
840 with_gnu_ld
841 enable_largefile
842 enable_float4_byval
843 enable_float8_byval
844 '
845       ac_precious_vars='build_alias
846 host_alias
847 target_alias
848 CC
849 CFLAGS
850 LDFLAGS
851 LIBS
852 CPPFLAGS
853 CPP
854 LDFLAGS_EX
855 LDFLAGS_SL
856 DOCBOOKSTYLE'
857
858
859 # Initialize some variables set by options.
860 ac_init_help=
861 ac_init_version=false
862 ac_unrecognized_opts=
863 ac_unrecognized_sep=
864 # The variables have the same names as the options, with
865 # dashes changed to underlines.
866 cache_file=/dev/null
867 exec_prefix=NONE
868 no_create=
869 no_recursion=
870 prefix=NONE
871 program_prefix=NONE
872 program_suffix=NONE
873 program_transform_name=s,x,x,
874 silent=
875 site=
876 srcdir=
877 verbose=
878 x_includes=NONE
879 x_libraries=NONE
880
881 # Installation directory options.
882 # These are left unexpanded so users can "make install exec_prefix=/foo"
883 # and all the variables that are supposed to be based on exec_prefix
884 # by default will actually change.
885 # Use braces instead of parens because sh, perl, etc. also accept them.
886 # (The list follows the same order as the GNU Coding Standards.)
887 bindir='${exec_prefix}/bin'
888 sbindir='${exec_prefix}/sbin'
889 libexecdir='${exec_prefix}/libexec'
890 datarootdir='${prefix}/share'
891 datadir='${datarootdir}'
892 sysconfdir='${prefix}/etc'
893 sharedstatedir='${prefix}/com'
894 localstatedir='${prefix}/var'
895 includedir='${prefix}/include'
896 oldincludedir='/usr/include'
897 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
898 infodir='${datarootdir}/info'
899 htmldir='${docdir}'
900 dvidir='${docdir}'
901 pdfdir='${docdir}'
902 psdir='${docdir}'
903 libdir='${exec_prefix}/lib'
904 localedir='${datarootdir}/locale'
905 mandir='${datarootdir}/man'
906
907 ac_prev=
908 ac_dashdash=
909 for ac_option
910 do
911   # If the previous option needs an argument, assign it.
912   if test -n "$ac_prev"; then
913     eval $ac_prev=\$ac_option
914     ac_prev=
915     continue
916   fi
917
918   case $ac_option in
919   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
920   *=)   ac_optarg= ;;
921   *)    ac_optarg=yes ;;
922   esac
923
924   # Accept the important Cygnus configure options, so we can diagnose typos.
925
926   case $ac_dashdash$ac_option in
927   --)
928     ac_dashdash=yes ;;
929
930   -bindir | --bindir | --bindi | --bind | --bin | --bi)
931     ac_prev=bindir ;;
932   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
933     bindir=$ac_optarg ;;
934
935   -build | --build | --buil | --bui | --bu)
936     ac_prev=build_alias ;;
937   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
938     build_alias=$ac_optarg ;;
939
940   -cache-file | --cache-file | --cache-fil | --cache-fi \
941   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
942     ac_prev=cache_file ;;
943   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
944   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
945     cache_file=$ac_optarg ;;
946
947   --config-cache | -C)
948     cache_file=config.cache ;;
949
950   -datadir | --datadir | --datadi | --datad)
951     ac_prev=datadir ;;
952   -datadir=* | --datadir=* | --datadi=* | --datad=*)
953     datadir=$ac_optarg ;;
954
955   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
956   | --dataroo | --dataro | --datar)
957     ac_prev=datarootdir ;;
958   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
959   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
960     datarootdir=$ac_optarg ;;
961
962   -disable-* | --disable-*)
963     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
964     # Reject names that are not valid shell variable names.
965     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
966       as_fn_error $? "invalid feature name: $ac_useropt"
967     ac_useropt_orig=$ac_useropt
968     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
969     case $ac_user_opts in
970       *"
971 "enable_$ac_useropt"
972 "*) ;;
973       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
974          ac_unrecognized_sep=', ';;
975     esac
976     eval enable_$ac_useropt=no ;;
977
978   -docdir | --docdir | --docdi | --doc | --do)
979     ac_prev=docdir ;;
980   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
981     docdir=$ac_optarg ;;
982
983   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
984     ac_prev=dvidir ;;
985   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
986     dvidir=$ac_optarg ;;
987
988   -enable-* | --enable-*)
989     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
990     # Reject names that are not valid shell variable names.
991     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
992       as_fn_error $? "invalid feature name: $ac_useropt"
993     ac_useropt_orig=$ac_useropt
994     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
995     case $ac_user_opts in
996       *"
997 "enable_$ac_useropt"
998 "*) ;;
999       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1000          ac_unrecognized_sep=', ';;
1001     esac
1002     eval enable_$ac_useropt=\$ac_optarg ;;
1003
1004   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1005   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1006   | --exec | --exe | --ex)
1007     ac_prev=exec_prefix ;;
1008   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1009   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1010   | --exec=* | --exe=* | --ex=*)
1011     exec_prefix=$ac_optarg ;;
1012
1013   -gas | --gas | --ga | --g)
1014     # Obsolete; use --with-gas.
1015     with_gas=yes ;;
1016
1017   -help | --help | --hel | --he | -h)
1018     ac_init_help=long ;;
1019   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1020     ac_init_help=recursive ;;
1021   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1022     ac_init_help=short ;;
1023
1024   -host | --host | --hos | --ho)
1025     ac_prev=host_alias ;;
1026   -host=* | --host=* | --hos=* | --ho=*)
1027     host_alias=$ac_optarg ;;
1028
1029   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1030     ac_prev=htmldir ;;
1031   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1032   | --ht=*)
1033     htmldir=$ac_optarg ;;
1034
1035   -includedir | --includedir | --includedi | --included | --include \
1036   | --includ | --inclu | --incl | --inc)
1037     ac_prev=includedir ;;
1038   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1039   | --includ=* | --inclu=* | --incl=* | --inc=*)
1040     includedir=$ac_optarg ;;
1041
1042   -infodir | --infodir | --infodi | --infod | --info | --inf)
1043     ac_prev=infodir ;;
1044   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1045     infodir=$ac_optarg ;;
1046
1047   -libdir | --libdir | --libdi | --libd)
1048     ac_prev=libdir ;;
1049   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1050     libdir=$ac_optarg ;;
1051
1052   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1053   | --libexe | --libex | --libe)
1054     ac_prev=libexecdir ;;
1055   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1056   | --libexe=* | --libex=* | --libe=*)
1057     libexecdir=$ac_optarg ;;
1058
1059   -localedir | --localedir | --localedi | --localed | --locale)
1060     ac_prev=localedir ;;
1061   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1062     localedir=$ac_optarg ;;
1063
1064   -localstatedir | --localstatedir | --localstatedi | --localstated \
1065   | --localstate | --localstat | --localsta | --localst | --locals)
1066     ac_prev=localstatedir ;;
1067   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1068   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1069     localstatedir=$ac_optarg ;;
1070
1071   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1072     ac_prev=mandir ;;
1073   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1074     mandir=$ac_optarg ;;
1075
1076   -nfp | --nfp | --nf)
1077     # Obsolete; use --without-fp.
1078     with_fp=no ;;
1079
1080   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1081   | --no-cr | --no-c | -n)
1082     no_create=yes ;;
1083
1084   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1085   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1086     no_recursion=yes ;;
1087
1088   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1089   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1090   | --oldin | --oldi | --old | --ol | --o)
1091     ac_prev=oldincludedir ;;
1092   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1093   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1094   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1095     oldincludedir=$ac_optarg ;;
1096
1097   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1098     ac_prev=prefix ;;
1099   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1100     prefix=$ac_optarg ;;
1101
1102   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1103   | --program-pre | --program-pr | --program-p)
1104     ac_prev=program_prefix ;;
1105   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1106   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1107     program_prefix=$ac_optarg ;;
1108
1109   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1110   | --program-suf | --program-su | --program-s)
1111     ac_prev=program_suffix ;;
1112   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1113   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1114     program_suffix=$ac_optarg ;;
1115
1116   -program-transform-name | --program-transform-name \
1117   | --program-transform-nam | --program-transform-na \
1118   | --program-transform-n | --program-transform- \
1119   | --program-transform | --program-transfor \
1120   | --program-transfo | --program-transf \
1121   | --program-trans | --program-tran \
1122   | --progr-tra | --program-tr | --program-t)
1123     ac_prev=program_transform_name ;;
1124   -program-transform-name=* | --program-transform-name=* \
1125   | --program-transform-nam=* | --program-transform-na=* \
1126   | --program-transform-n=* | --program-transform-=* \
1127   | --program-transform=* | --program-transfor=* \
1128   | --program-transfo=* | --program-transf=* \
1129   | --program-trans=* | --program-tran=* \
1130   | --progr-tra=* | --program-tr=* | --program-t=*)
1131     program_transform_name=$ac_optarg ;;
1132
1133   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1134     ac_prev=pdfdir ;;
1135   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1136     pdfdir=$ac_optarg ;;
1137
1138   -psdir | --psdir | --psdi | --psd | --ps)
1139     ac_prev=psdir ;;
1140   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1141     psdir=$ac_optarg ;;
1142
1143   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1144   | -silent | --silent | --silen | --sile | --sil)
1145     silent=yes ;;
1146
1147   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1148     ac_prev=sbindir ;;
1149   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1150   | --sbi=* | --sb=*)
1151     sbindir=$ac_optarg ;;
1152
1153   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1154   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1155   | --sharedst | --shareds | --shared | --share | --shar \
1156   | --sha | --sh)
1157     ac_prev=sharedstatedir ;;
1158   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1159   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1160   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1161   | --sha=* | --sh=*)
1162     sharedstatedir=$ac_optarg ;;
1163
1164   -site | --site | --sit)
1165     ac_prev=site ;;
1166   -site=* | --site=* | --sit=*)
1167     site=$ac_optarg ;;
1168
1169   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1170     ac_prev=srcdir ;;
1171   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1172     srcdir=$ac_optarg ;;
1173
1174   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1175   | --syscon | --sysco | --sysc | --sys | --sy)
1176     ac_prev=sysconfdir ;;
1177   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1178   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1179     sysconfdir=$ac_optarg ;;
1180
1181   -target | --target | --targe | --targ | --tar | --ta | --t)
1182     ac_prev=target_alias ;;
1183   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1184     target_alias=$ac_optarg ;;
1185
1186   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1187     verbose=yes ;;
1188
1189   -version | --version | --versio | --versi | --vers | -V)
1190     ac_init_version=: ;;
1191
1192   -with-* | --with-*)
1193     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1194     # Reject names that are not valid shell variable names.
1195     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1196       as_fn_error $? "invalid package name: $ac_useropt"
1197     ac_useropt_orig=$ac_useropt
1198     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1199     case $ac_user_opts in
1200       *"
1201 "with_$ac_useropt"
1202 "*) ;;
1203       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1204          ac_unrecognized_sep=', ';;
1205     esac
1206     eval with_$ac_useropt=\$ac_optarg ;;
1207
1208   -without-* | --without-*)
1209     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1210     # Reject names that are not valid shell variable names.
1211     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1212       as_fn_error $? "invalid package name: $ac_useropt"
1213     ac_useropt_orig=$ac_useropt
1214     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1215     case $ac_user_opts in
1216       *"
1217 "with_$ac_useropt"
1218 "*) ;;
1219       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1220          ac_unrecognized_sep=', ';;
1221     esac
1222     eval with_$ac_useropt=no ;;
1223
1224   --x)
1225     # Obsolete; use --with-x.
1226     with_x=yes ;;
1227
1228   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1229   | --x-incl | --x-inc | --x-in | --x-i)
1230     ac_prev=x_includes ;;
1231   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1232   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1233     x_includes=$ac_optarg ;;
1234
1235   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1236   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1237     ac_prev=x_libraries ;;
1238   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1239   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1240     x_libraries=$ac_optarg ;;
1241
1242   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1243 Try \`$0 --help' for more information"
1244     ;;
1245
1246   *=*)
1247     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1248     # Reject names that are not valid shell variable names.
1249     case $ac_envvar in #(
1250       '' | [0-9]* | *[!_$as_cr_alnum]* )
1251       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1252     esac
1253     eval $ac_envvar=\$ac_optarg
1254     export $ac_envvar ;;
1255
1256   *)
1257     # FIXME: should be removed in autoconf 3.0.
1258     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1259     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1260       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1261     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1262     ;;
1263
1264   esac
1265 done
1266
1267 if test -n "$ac_prev"; then
1268   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1269   as_fn_error $? "missing argument to $ac_option"
1270 fi
1271
1272 if test -n "$ac_unrecognized_opts"; then
1273   case $enable_option_checking in
1274     no) ;;
1275     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1276     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1277   esac
1278 fi
1279
1280 # Check all directory arguments for consistency.
1281 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1282                 datadir sysconfdir sharedstatedir localstatedir includedir \
1283                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1284                 libdir localedir mandir
1285 do
1286   eval ac_val=\$$ac_var
1287   # Remove trailing slashes.
1288   case $ac_val in
1289     */ )
1290       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1291       eval $ac_var=\$ac_val;;
1292   esac
1293   # Be sure to have absolute directory names.
1294   case $ac_val in
1295     [\\/$]* | ?:[\\/]* )  continue;;
1296     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1297   esac
1298   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1299 done
1300
1301 # There might be people who depend on the old broken behavior: `$host'
1302 # used to hold the argument of --host etc.
1303 # FIXME: To remove some day.
1304 build=$build_alias
1305 host=$host_alias
1306 target=$target_alias
1307
1308 # FIXME: To remove some day.
1309 if test "x$host_alias" != x; then
1310   if test "x$build_alias" = x; then
1311     cross_compiling=maybe
1312   elif test "x$build_alias" != "x$host_alias"; then
1313     cross_compiling=yes
1314   fi
1315 fi
1316
1317 ac_tool_prefix=
1318 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1319
1320 test "$silent" = yes && exec 6>/dev/null
1321
1322
1323 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1324 ac_ls_di=`ls -di .` &&
1325 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1326   as_fn_error $? "working directory cannot be determined"
1327 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1328   as_fn_error $? "pwd does not report name of working directory"
1329
1330
1331 # Find the source files, if location was not specified.
1332 if test -z "$srcdir"; then
1333   ac_srcdir_defaulted=yes
1334   # Try the directory containing this script, then the parent directory.
1335   ac_confdir=`$as_dirname -- "$as_myself" ||
1336 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1337          X"$as_myself" : 'X\(//\)[^/]' \| \
1338          X"$as_myself" : 'X\(//\)$' \| \
1339          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1340 $as_echo X"$as_myself" |
1341     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1342             s//\1/
1343             q
1344           }
1345           /^X\(\/\/\)[^/].*/{
1346             s//\1/
1347             q
1348           }
1349           /^X\(\/\/\)$/{
1350             s//\1/
1351             q
1352           }
1353           /^X\(\/\).*/{
1354             s//\1/
1355             q
1356           }
1357           s/.*/./; q'`
1358   srcdir=$ac_confdir
1359   if test ! -r "$srcdir/$ac_unique_file"; then
1360     srcdir=..
1361   fi
1362 else
1363   ac_srcdir_defaulted=no
1364 fi
1365 if test ! -r "$srcdir/$ac_unique_file"; then
1366   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1367   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1368 fi
1369 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1370 ac_abs_confdir=`(
1371         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1372         pwd)`
1373 # When building in place, set srcdir=.
1374 if test "$ac_abs_confdir" = "$ac_pwd"; then
1375   srcdir=.
1376 fi
1377 # Remove unnecessary trailing slashes from srcdir.
1378 # Double slashes in file names in object file debugging info
1379 # mess up M-x gdb in Emacs.
1380 case $srcdir in
1381 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1382 esac
1383 for ac_var in $ac_precious_vars; do
1384   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1385   eval ac_env_${ac_var}_value=\$${ac_var}
1386   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1387   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1388 done
1389
1390 #
1391 # Report the --help message.
1392 #
1393 if test "$ac_init_help" = "long"; then
1394   # Omit some internal or obsolete options to make the list less imposing.
1395   # This message is too long to be a string in the A/UX 3.1 sh.
1396   cat <<_ACEOF
1397 \`configure' configures PostgreSQL 9.5devel to adapt to many kinds of systems.
1398
1399 Usage: $0 [OPTION]... [VAR=VALUE]...
1400
1401 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1402 VAR=VALUE.  See below for descriptions of some of the useful variables.
1403
1404 Defaults for the options are specified in brackets.
1405
1406 Configuration:
1407   -h, --help              display this help and exit
1408       --help=short        display options specific to this package
1409       --help=recursive    display the short help of all the included packages
1410   -V, --version           display version information and exit
1411   -q, --quiet, --silent   do not print \`checking ...' messages
1412       --cache-file=FILE   cache test results in FILE [disabled]
1413   -C, --config-cache      alias for \`--cache-file=config.cache'
1414   -n, --no-create         do not create output files
1415       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1416
1417 Installation directories:
1418   --prefix=PREFIX         install architecture-independent files in PREFIX
1419                           [$ac_default_prefix]
1420   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1421                           [PREFIX]
1422
1423 By default, \`make install' will install all the files in
1424 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1425 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1426 for instance \`--prefix=\$HOME'.
1427
1428 For better control, use the options below.
1429
1430 Fine tuning of the installation directories:
1431   --bindir=DIR            user executables [EPREFIX/bin]
1432   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1433   --libexecdir=DIR        program executables [EPREFIX/libexec]
1434   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1435   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1436   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1437   --libdir=DIR            object code libraries [EPREFIX/lib]
1438   --includedir=DIR        C header files [PREFIX/include]
1439   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1440   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1441   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1442   --infodir=DIR           info documentation [DATAROOTDIR/info]
1443   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1444   --mandir=DIR            man documentation [DATAROOTDIR/man]
1445   --docdir=DIR            documentation root [DATAROOTDIR/doc/postgresql]
1446   --htmldir=DIR           html documentation [DOCDIR]
1447   --dvidir=DIR            dvi documentation [DOCDIR]
1448   --pdfdir=DIR            pdf documentation [DOCDIR]
1449   --psdir=DIR             ps documentation [DOCDIR]
1450 _ACEOF
1451
1452   cat <<\_ACEOF
1453
1454 System types:
1455   --build=BUILD     configure for building on BUILD [guessed]
1456   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1457 _ACEOF
1458 fi
1459
1460 if test -n "$ac_init_help"; then
1461   case $ac_init_help in
1462      short | recursive ) echo "Configuration of PostgreSQL 9.5devel:";;
1463    esac
1464   cat <<\_ACEOF
1465
1466 Optional Features:
1467   --disable-option-checking  ignore unrecognized --enable/--with options
1468   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1469   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1470   --disable-integer-datetimes
1471                           disable 64-bit integer date/time support
1472   --enable-nls[=LANGUAGES]
1473                           enable Native Language Support
1474   --disable-rpath         do not embed shared library search path in
1475                           executables
1476   --disable-spinlocks     do not use spinlocks
1477   --disable-atomics       do not use atomic operations
1478   --enable-debug          build with debugging symbols (-g)
1479   --enable-profiling      build with profiling enabled
1480   --enable-coverage       build with coverage testing instrumentation
1481   --enable-dtrace         build with DTrace support
1482   --enable-tap-tests      enable TAP tests (requires Perl and IPC::Run)
1483   --enable-depend         turn on automatic dependency tracking
1484   --enable-cassert        enable assertion checks (for debugging)
1485   --disable-thread-safety disable thread-safety in client libraries
1486   --disable-largefile     omit support for large files
1487   --disable-float4-byval  disable float4 passed by value
1488   --disable-float8-byval  disable float8 passed by value
1489
1490 Optional Packages:
1491   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1492   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1493   --with-extra-version=STRING
1494                           append STRING to version
1495   --with-template=NAME    override operating system template
1496   --with-includes=DIRS    look for additional header files in DIRS
1497   --with-libraries=DIRS   look for additional libraries in DIRS
1498   --with-libs=DIRS        alternative spelling of --with-libraries
1499   --with-pgport=PORTNUM   set default port number [5432]
1500   --with-blocksize=BLOCKSIZE
1501                           set table block size in kB [8]
1502   --with-segsize=SEGSIZE  set table segment size in GB [1]
1503   --with-wal-blocksize=BLOCKSIZE
1504                           set WAL block size in kB [8]
1505   --with-wal-segsize=SEGSIZE
1506                           set WAL segment size in MB [16]
1507   --with-CC=CMD           set compiler (deprecated)
1508   --with-tcl              build Tcl modules (PL/Tcl)
1509   --with-tclconfig=DIR    tclConfig.sh is in DIR
1510   --with-perl             build Perl modules (PL/Perl)
1511   --with-python           build Python modules (PL/Python)
1512   --with-gssapi           build with GSSAPI support
1513   --with-krb-srvnam=NAME  default service principal name in Kerberos (GSSAPI)
1514                           [postgres]
1515   --with-pam              build with PAM support
1516   --with-ldap             build with LDAP support
1517   --with-bonjour          build with Bonjour support
1518   --with-openssl          build with OpenSSL support
1519   --with-selinux          build with SELinux support
1520   --without-readline      do not use GNU Readline nor BSD Libedit for editing
1521   --with-libedit-preferred
1522                           prefer BSD Libedit over GNU Readline
1523   --with-uuid=LIB         build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1524   --with-ossp-uuid        obsolete spelling of --with-uuid=ossp
1525   --with-libxml           build with XML support
1526   --with-libxslt          use XSLT support when building contrib/xml2
1527   --with-system-tzdata=DIR
1528                           use system time zone data in DIR
1529   --without-zlib          do not use Zlib
1530   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1531
1532 Some influential environment variables:
1533   CC          C compiler command
1534   CFLAGS      C compiler flags
1535   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1536               nonstandard directory <lib dir>
1537   LIBS        libraries to pass to the linker, e.g. -l<library>
1538   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1539               you have headers in a nonstandard directory <include dir>
1540   CPP         C preprocessor
1541   LDFLAGS_EX  extra linker flags for linking executables only
1542   LDFLAGS_SL  extra linker flags for linking shared libraries only
1543   DOCBOOKSTYLE
1544               location of DocBook stylesheets
1545
1546 Use these variables to override the choices made by `configure' or to help
1547 it to find libraries and programs with nonstandard names/locations.
1548
1549 Report bugs to <pgsql-bugs@postgresql.org>.
1550 _ACEOF
1551 ac_status=$?
1552 fi
1553
1554 if test "$ac_init_help" = "recursive"; then
1555   # If there are subdirs, report their specific --help.
1556   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1557     test -d "$ac_dir" ||
1558       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1559       continue
1560     ac_builddir=.
1561
1562 case "$ac_dir" in
1563 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1564 *)
1565   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1566   # A ".." for each directory in $ac_dir_suffix.
1567   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1568   case $ac_top_builddir_sub in
1569   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1570   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1571   esac ;;
1572 esac
1573 ac_abs_top_builddir=$ac_pwd
1574 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1575 # for backward compatibility:
1576 ac_top_builddir=$ac_top_build_prefix
1577
1578 case $srcdir in
1579   .)  # We are building in place.
1580     ac_srcdir=.
1581     ac_top_srcdir=$ac_top_builddir_sub
1582     ac_abs_top_srcdir=$ac_pwd ;;
1583   [\\/]* | ?:[\\/]* )  # Absolute name.
1584     ac_srcdir=$srcdir$ac_dir_suffix;
1585     ac_top_srcdir=$srcdir
1586     ac_abs_top_srcdir=$srcdir ;;
1587   *) # Relative name.
1588     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1589     ac_top_srcdir=$ac_top_build_prefix$srcdir
1590     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1591 esac
1592 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1593
1594     cd "$ac_dir" || { ac_status=$?; continue; }
1595     # Check for guested configure.
1596     if test -f "$ac_srcdir/configure.gnu"; then
1597       echo &&
1598       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1599     elif test -f "$ac_srcdir/configure"; then
1600       echo &&
1601       $SHELL "$ac_srcdir/configure" --help=recursive
1602     else
1603       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1604     fi || ac_status=$?
1605     cd "$ac_pwd" || { ac_status=$?; break; }
1606   done
1607 fi
1608
1609 test -n "$ac_init_help" && exit $ac_status
1610 if $ac_init_version; then
1611   cat <<\_ACEOF
1612 PostgreSQL configure 9.5devel
1613 generated by GNU Autoconf 2.69
1614
1615 Copyright (C) 2012 Free Software Foundation, Inc.
1616 This configure script is free software; the Free Software Foundation
1617 gives unlimited permission to copy, distribute and modify it.
1618
1619 Copyright (c) 1996-2014, PostgreSQL Global Development Group
1620 _ACEOF
1621   exit
1622 fi
1623
1624 ## ------------------------ ##
1625 ## Autoconf initialization. ##
1626 ## ------------------------ ##
1627
1628 # ac_fn_c_try_compile LINENO
1629 # --------------------------
1630 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1631 ac_fn_c_try_compile ()
1632 {
1633   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1634   rm -f conftest.$ac_objext
1635   if { { ac_try="$ac_compile"
1636 case "(($ac_try" in
1637   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1638   *) ac_try_echo=$ac_try;;
1639 esac
1640 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1641 $as_echo "$ac_try_echo"; } >&5
1642   (eval "$ac_compile") 2>conftest.err
1643   ac_status=$?
1644   if test -s conftest.err; then
1645     grep -v '^ *+' conftest.err >conftest.er1
1646     cat conftest.er1 >&5
1647     mv -f conftest.er1 conftest.err
1648   fi
1649   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1650   test $ac_status = 0; } && {
1651          test -z "$ac_c_werror_flag" ||
1652          test ! -s conftest.err
1653        } && test -s conftest.$ac_objext; then :
1654   ac_retval=0
1655 else
1656   $as_echo "$as_me: failed program was:" >&5
1657 sed 's/^/| /' conftest.$ac_ext >&5
1658
1659         ac_retval=1
1660 fi
1661   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1662   as_fn_set_status $ac_retval
1663
1664 } # ac_fn_c_try_compile
1665
1666 # ac_fn_c_try_link LINENO
1667 # -----------------------
1668 # Try to link conftest.$ac_ext, and return whether this succeeded.
1669 ac_fn_c_try_link ()
1670 {
1671   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1672   rm -f conftest.$ac_objext conftest$ac_exeext
1673   if { { ac_try="$ac_link"
1674 case "(($ac_try" in
1675   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1676   *) ac_try_echo=$ac_try;;
1677 esac
1678 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1679 $as_echo "$ac_try_echo"; } >&5
1680   (eval "$ac_link") 2>conftest.err
1681   ac_status=$?
1682   if test -s conftest.err; then
1683     grep -v '^ *+' conftest.err >conftest.er1
1684     cat conftest.er1 >&5
1685     mv -f conftest.er1 conftest.err
1686   fi
1687   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1688   test $ac_status = 0; } && {
1689          test -z "$ac_c_werror_flag" ||
1690          test ! -s conftest.err
1691        } && test -s conftest$ac_exeext && {
1692          test "$cross_compiling" = yes ||
1693          test -x conftest$ac_exeext
1694        }; then :
1695   ac_retval=0
1696 else
1697   $as_echo "$as_me: failed program was:" >&5
1698 sed 's/^/| /' conftest.$ac_ext >&5
1699
1700         ac_retval=1
1701 fi
1702   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1703   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1704   # interfere with the next link command; also delete a directory that is
1705   # left behind by Apple's compiler.  We do this before executing the actions.
1706   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1707   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1708   as_fn_set_status $ac_retval
1709
1710 } # ac_fn_c_try_link
1711
1712 # ac_fn_c_try_cpp LINENO
1713 # ----------------------
1714 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1715 ac_fn_c_try_cpp ()
1716 {
1717   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1718   if { { ac_try="$ac_cpp conftest.$ac_ext"
1719 case "(($ac_try" in
1720   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1721   *) ac_try_echo=$ac_try;;
1722 esac
1723 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1724 $as_echo "$ac_try_echo"; } >&5
1725   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1726   ac_status=$?
1727   if test -s conftest.err; then
1728     grep -v '^ *+' conftest.err >conftest.er1
1729     cat conftest.er1 >&5
1730     mv -f conftest.er1 conftest.err
1731   fi
1732   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1733   test $ac_status = 0; } > conftest.i && {
1734          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1735          test ! -s conftest.err
1736        }; then :
1737   ac_retval=0
1738 else
1739   $as_echo "$as_me: failed program was:" >&5
1740 sed 's/^/| /' conftest.$ac_ext >&5
1741
1742     ac_retval=1
1743 fi
1744   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1745   as_fn_set_status $ac_retval
1746
1747 } # ac_fn_c_try_cpp
1748
1749 # ac_fn_c_check_func LINENO FUNC VAR
1750 # ----------------------------------
1751 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1752 ac_fn_c_check_func ()
1753 {
1754   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1755   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1756 $as_echo_n "checking for $2... " >&6; }
1757 if eval \${$3+:} false; then :
1758   $as_echo_n "(cached) " >&6
1759 else
1760   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1761 /* end confdefs.h.  */
1762 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1763    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1764 #define $2 innocuous_$2
1765
1766 /* System header to define __stub macros and hopefully few prototypes,
1767     which can conflict with char $2 (); below.
1768     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1769     <limits.h> exists even on freestanding compilers.  */
1770
1771 #ifdef __STDC__
1772 # include <limits.h>
1773 #else
1774 # include <assert.h>
1775 #endif
1776
1777 #undef $2
1778
1779 /* Override any GCC internal prototype to avoid an error.
1780    Use char because int might match the return type of a GCC
1781    builtin and then its argument prototype would still apply.  */
1782 #ifdef __cplusplus
1783 extern "C"
1784 #endif
1785 char $2 ();
1786 /* The GNU C library defines this for functions which it implements
1787     to always fail with ENOSYS.  Some functions are actually named
1788     something starting with __ and the normal name is an alias.  */
1789 #if defined __stub_$2 || defined __stub___$2
1790 choke me
1791 #endif
1792
1793 int
1794 main ()
1795 {
1796 return $2 ();
1797   ;
1798   return 0;
1799 }
1800 _ACEOF
1801 if ac_fn_c_try_link "$LINENO"; then :
1802   eval "$3=yes"
1803 else
1804   eval "$3=no"
1805 fi
1806 rm -f core conftest.err conftest.$ac_objext \
1807     conftest$ac_exeext conftest.$ac_ext
1808 fi
1809 eval ac_res=\$$3
1810                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1811 $as_echo "$ac_res" >&6; }
1812   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1813
1814 } # ac_fn_c_check_func
1815
1816 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1817 # -------------------------------------------------------
1818 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1819 # the include files in INCLUDES and setting the cache variable VAR
1820 # accordingly.
1821 ac_fn_c_check_header_mongrel ()
1822 {
1823   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1824   if eval \${$3+:} false; then :
1825   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1826 $as_echo_n "checking for $2... " >&6; }
1827 if eval \${$3+:} false; then :
1828   $as_echo_n "(cached) " >&6
1829 fi
1830 eval ac_res=\$$3
1831                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1832 $as_echo "$ac_res" >&6; }
1833 else
1834   # Is the header compilable?
1835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1836 $as_echo_n "checking $2 usability... " >&6; }
1837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1838 /* end confdefs.h.  */
1839 $4
1840 #include <$2>
1841 _ACEOF
1842 if ac_fn_c_try_compile "$LINENO"; then :
1843   ac_header_compiler=yes
1844 else
1845   ac_header_compiler=no
1846 fi
1847 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1849 $as_echo "$ac_header_compiler" >&6; }
1850
1851 # Is the header present?
1852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1853 $as_echo_n "checking $2 presence... " >&6; }
1854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1855 /* end confdefs.h.  */
1856 #include <$2>
1857 _ACEOF
1858 if ac_fn_c_try_cpp "$LINENO"; then :
1859   ac_header_preproc=yes
1860 else
1861   ac_header_preproc=no
1862 fi
1863 rm -f conftest.err conftest.i conftest.$ac_ext
1864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1865 $as_echo "$ac_header_preproc" >&6; }
1866
1867 # So?  What about this header?
1868 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1869   yes:no: )
1870     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1871 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1872     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1873 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1874     ;;
1875   no:yes:* )
1876     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1877 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1878     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1879 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1880     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1881 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1882     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1883 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1884     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1885 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1886 ( $as_echo "## ---------------------------------------- ##
1887 ## Report this to pgsql-bugs@postgresql.org ##
1888 ## ---------------------------------------- ##"
1889      ) | sed "s/^/$as_me: WARNING:     /" >&2
1890     ;;
1891 esac
1892   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1893 $as_echo_n "checking for $2... " >&6; }
1894 if eval \${$3+:} false; then :
1895   $as_echo_n "(cached) " >&6
1896 else
1897   eval "$3=\$ac_header_compiler"
1898 fi
1899 eval ac_res=\$$3
1900                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1901 $as_echo "$ac_res" >&6; }
1902 fi
1903   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1904
1905 } # ac_fn_c_check_header_mongrel
1906
1907 # ac_fn_c_try_run LINENO
1908 # ----------------------
1909 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1910 # that executables *can* be run.
1911 ac_fn_c_try_run ()
1912 {
1913   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1914   if { { ac_try="$ac_link"
1915 case "(($ac_try" in
1916   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1917   *) ac_try_echo=$ac_try;;
1918 esac
1919 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1920 $as_echo "$ac_try_echo"; } >&5
1921   (eval "$ac_link") 2>&5
1922   ac_status=$?
1923   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1924   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1925   { { case "(($ac_try" in
1926   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1927   *) ac_try_echo=$ac_try;;
1928 esac
1929 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1930 $as_echo "$ac_try_echo"; } >&5
1931   (eval "$ac_try") 2>&5
1932   ac_status=$?
1933   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1934   test $ac_status = 0; }; }; then :
1935   ac_retval=0
1936 else
1937   $as_echo "$as_me: program exited with status $ac_status" >&5
1938        $as_echo "$as_me: failed program was:" >&5
1939 sed 's/^/| /' conftest.$ac_ext >&5
1940
1941        ac_retval=$ac_status
1942 fi
1943   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1944   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1945   as_fn_set_status $ac_retval
1946
1947 } # ac_fn_c_try_run
1948
1949 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1950 # -------------------------------------------------------
1951 # Tests whether HEADER exists and can be compiled using the include files in
1952 # INCLUDES, setting the cache variable VAR accordingly.
1953 ac_fn_c_check_header_compile ()
1954 {
1955   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1956   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1957 $as_echo_n "checking for $2... " >&6; }
1958 if eval \${$3+:} false; then :
1959   $as_echo_n "(cached) " >&6
1960 else
1961   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1962 /* end confdefs.h.  */
1963 $4
1964 #include <$2>
1965 _ACEOF
1966 if ac_fn_c_try_compile "$LINENO"; then :
1967   eval "$3=yes"
1968 else
1969   eval "$3=no"
1970 fi
1971 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1972 fi
1973 eval ac_res=\$$3
1974                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1975 $as_echo "$ac_res" >&6; }
1976   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1977
1978 } # ac_fn_c_check_header_compile
1979
1980 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
1981 # ----------------------------------------------------
1982 # Tries to find if the field MEMBER exists in type AGGR, after including
1983 # INCLUDES, setting cache variable VAR accordingly.
1984 ac_fn_c_check_member ()
1985 {
1986   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1987   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
1988 $as_echo_n "checking for $2.$3... " >&6; }
1989 if eval \${$4+:} false; then :
1990   $as_echo_n "(cached) " >&6
1991 else
1992   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1993 /* end confdefs.h.  */
1994 $5
1995 int
1996 main ()
1997 {
1998 static $2 ac_aggr;
1999 if (ac_aggr.$3)
2000 return 0;
2001   ;
2002   return 0;
2003 }
2004 _ACEOF
2005 if ac_fn_c_try_compile "$LINENO"; then :
2006   eval "$4=yes"
2007 else
2008   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2009 /* end confdefs.h.  */
2010 $5
2011 int
2012 main ()
2013 {
2014 static $2 ac_aggr;
2015 if (sizeof ac_aggr.$3)
2016 return 0;
2017   ;
2018   return 0;
2019 }
2020 _ACEOF
2021 if ac_fn_c_try_compile "$LINENO"; then :
2022   eval "$4=yes"
2023 else
2024   eval "$4=no"
2025 fi
2026 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2027 fi
2028 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2029 fi
2030 eval ac_res=\$$4
2031                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2032 $as_echo "$ac_res" >&6; }
2033   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2034
2035 } # ac_fn_c_check_member
2036
2037 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2038 # -------------------------------------------
2039 # Tests whether TYPE exists after having included INCLUDES, setting cache
2040 # variable VAR accordingly.
2041 ac_fn_c_check_type ()
2042 {
2043   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2044   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2045 $as_echo_n "checking for $2... " >&6; }
2046 if eval \${$3+:} false; then :
2047   $as_echo_n "(cached) " >&6
2048 else
2049   eval "$3=no"
2050   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2051 /* end confdefs.h.  */
2052 $4
2053 int
2054 main ()
2055 {
2056 if (sizeof ($2))
2057          return 0;
2058   ;
2059   return 0;
2060 }
2061 _ACEOF
2062 if ac_fn_c_try_compile "$LINENO"; then :
2063   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2064 /* end confdefs.h.  */
2065 $4
2066 int
2067 main ()
2068 {
2069 if (sizeof (($2)))
2070             return 0;
2071   ;
2072   return 0;
2073 }
2074 _ACEOF
2075 if ac_fn_c_try_compile "$LINENO"; then :
2076
2077 else
2078   eval "$3=yes"
2079 fi
2080 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2081 fi
2082 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2083 fi
2084 eval ac_res=\$$3
2085                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2086 $as_echo "$ac_res" >&6; }
2087   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2088
2089 } # ac_fn_c_check_type
2090
2091 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2092 # --------------------------------------------
2093 # Tries to find the compile-time value of EXPR in a program that includes
2094 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2095 # computed
2096 ac_fn_c_compute_int ()
2097 {
2098   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2099   if test "$cross_compiling" = yes; then
2100     # Depending upon the size, compute the lo and hi bounds.
2101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2102 /* end confdefs.h.  */
2103 $4
2104 int
2105 main ()
2106 {
2107 static int test_array [1 - 2 * !(($2) >= 0)];
2108 test_array [0] = 0;
2109 return test_array [0];
2110
2111   ;
2112   return 0;
2113 }
2114 _ACEOF
2115 if ac_fn_c_try_compile "$LINENO"; then :
2116   ac_lo=0 ac_mid=0
2117   while :; do
2118     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2119 /* end confdefs.h.  */
2120 $4
2121 int
2122 main ()
2123 {
2124 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2125 test_array [0] = 0;
2126 return test_array [0];
2127
2128   ;
2129   return 0;
2130 }
2131 _ACEOF
2132 if ac_fn_c_try_compile "$LINENO"; then :
2133   ac_hi=$ac_mid; break
2134 else
2135   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2136                         if test $ac_lo -le $ac_mid; then
2137                           ac_lo= ac_hi=
2138                           break
2139                         fi
2140                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2141 fi
2142 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2143   done
2144 else
2145   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2146 /* end confdefs.h.  */
2147 $4
2148 int
2149 main ()
2150 {
2151 static int test_array [1 - 2 * !(($2) < 0)];
2152 test_array [0] = 0;
2153 return test_array [0];
2154
2155   ;
2156   return 0;
2157 }
2158 _ACEOF
2159 if ac_fn_c_try_compile "$LINENO"; then :
2160   ac_hi=-1 ac_mid=-1
2161   while :; do
2162     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2163 /* end confdefs.h.  */
2164 $4
2165 int
2166 main ()
2167 {
2168 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2169 test_array [0] = 0;
2170 return test_array [0];
2171
2172   ;
2173   return 0;
2174 }
2175 _ACEOF
2176 if ac_fn_c_try_compile "$LINENO"; then :
2177   ac_lo=$ac_mid; break
2178 else
2179   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2180                         if test $ac_mid -le $ac_hi; then
2181                           ac_lo= ac_hi=
2182                           break
2183                         fi
2184                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2185 fi
2186 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2187   done
2188 else
2189   ac_lo= ac_hi=
2190 fi
2191 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2192 fi
2193 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2194 # Binary search between lo and hi bounds.
2195 while test "x$ac_lo" != "x$ac_hi"; do
2196   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2197   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2198 /* end confdefs.h.  */
2199 $4
2200 int
2201 main ()
2202 {
2203 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2204 test_array [0] = 0;
2205 return test_array [0];
2206
2207   ;
2208   return 0;
2209 }
2210 _ACEOF
2211 if ac_fn_c_try_compile "$LINENO"; then :
2212   ac_hi=$ac_mid
2213 else
2214   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2215 fi
2216 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2217 done
2218 case $ac_lo in #((
2219 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2220 '') ac_retval=1 ;;
2221 esac
2222   else
2223     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2224 /* end confdefs.h.  */
2225 $4
2226 static long int longval () { return $2; }
2227 static unsigned long int ulongval () { return $2; }
2228 #include <stdio.h>
2229 #include <stdlib.h>
2230 int
2231 main ()
2232 {
2233
2234   FILE *f = fopen ("conftest.val", "w");
2235   if (! f)
2236     return 1;
2237   if (($2) < 0)
2238     {
2239       long int i = longval ();
2240       if (i != ($2))
2241         return 1;
2242       fprintf (f, "%ld", i);
2243     }
2244   else
2245     {
2246       unsigned long int i = ulongval ();
2247       if (i != ($2))
2248         return 1;
2249       fprintf (f, "%lu", i);
2250     }
2251   /* Do not output a trailing newline, as this causes \r\n confusion
2252      on some platforms.  */
2253   return ferror (f) || fclose (f) != 0;
2254
2255   ;
2256   return 0;
2257 }
2258 _ACEOF
2259 if ac_fn_c_try_run "$LINENO"; then :
2260   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2261 else
2262   ac_retval=1
2263 fi
2264 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2265   conftest.$ac_objext conftest.beam conftest.$ac_ext
2266 rm -f conftest.val
2267
2268   fi
2269   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2270   as_fn_set_status $ac_retval
2271
2272 } # ac_fn_c_compute_int
2273
2274 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2275 # ---------------------------------------------
2276 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2277 # accordingly.
2278 ac_fn_c_check_decl ()
2279 {
2280   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2281   as_decl_name=`echo $2|sed 's/ *(.*//'`
2282   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2283   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2284 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2285 if eval \${$3+:} false; then :
2286   $as_echo_n "(cached) " >&6
2287 else
2288   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2289 /* end confdefs.h.  */
2290 $4
2291 int
2292 main ()
2293 {
2294 #ifndef $as_decl_name
2295 #ifdef __cplusplus
2296   (void) $as_decl_use;
2297 #else
2298   (void) $as_decl_name;
2299 #endif
2300 #endif
2301
2302   ;
2303   return 0;
2304 }
2305 _ACEOF
2306 if ac_fn_c_try_compile "$LINENO"; then :
2307   eval "$3=yes"
2308 else
2309   eval "$3=no"
2310 fi
2311 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2312 fi
2313 eval ac_res=\$$3
2314                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2315 $as_echo "$ac_res" >&6; }
2316   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2317
2318 } # ac_fn_c_check_decl
2319 cat >config.log <<_ACEOF
2320 This file contains any messages produced by compilers while
2321 running configure, to aid debugging if configure makes a mistake.
2322
2323 It was created by PostgreSQL $as_me 9.5devel, which was
2324 generated by GNU Autoconf 2.69.  Invocation command line was
2325
2326   $ $0 $@
2327
2328 _ACEOF
2329 exec 5>>config.log
2330 {
2331 cat <<_ASUNAME
2332 ## --------- ##
2333 ## Platform. ##
2334 ## --------- ##
2335
2336 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2337 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2338 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2339 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2340 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2341
2342 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2343 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2344
2345 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2346 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2347 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2348 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2349 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2350 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2351 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2352
2353 _ASUNAME
2354
2355 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2356 for as_dir in $PATH
2357 do
2358   IFS=$as_save_IFS
2359   test -z "$as_dir" && as_dir=.
2360     $as_echo "PATH: $as_dir"
2361   done
2362 IFS=$as_save_IFS
2363
2364 } >&5
2365
2366 cat >&5 <<_ACEOF
2367
2368
2369 ## ----------- ##
2370 ## Core tests. ##
2371 ## ----------- ##
2372
2373 _ACEOF
2374
2375
2376 # Keep a trace of the command line.
2377 # Strip out --no-create and --no-recursion so they do not pile up.
2378 # Strip out --silent because we don't want to record it for future runs.
2379 # Also quote any args containing shell meta-characters.
2380 # Make two passes to allow for proper duplicate-argument suppression.
2381 ac_configure_args=
2382 ac_configure_args0=
2383 ac_configure_args1=
2384 ac_must_keep_next=false
2385 for ac_pass in 1 2
2386 do
2387   for ac_arg
2388   do
2389     case $ac_arg in
2390     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2391     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2392     | -silent | --silent | --silen | --sile | --sil)
2393       continue ;;
2394     *\'*)
2395       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2396     esac
2397     case $ac_pass in
2398     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2399     2)
2400       as_fn_append ac_configure_args1 " '$ac_arg'"
2401       if test $ac_must_keep_next = true; then
2402         ac_must_keep_next=false # Got value, back to normal.
2403       else
2404         case $ac_arg in
2405           *=* | --config-cache | -C | -disable-* | --disable-* \
2406           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2407           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2408           | -with-* | --with-* | -without-* | --without-* | --x)
2409             case "$ac_configure_args0 " in
2410               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2411             esac
2412             ;;
2413           -* ) ac_must_keep_next=true ;;
2414         esac
2415       fi
2416       as_fn_append ac_configure_args " '$ac_arg'"
2417       ;;
2418     esac
2419   done
2420 done
2421 { ac_configure_args0=; unset ac_configure_args0;}
2422 { ac_configure_args1=; unset ac_configure_args1;}
2423
2424 # When interrupted or exit'd, cleanup temporary files, and complete
2425 # config.log.  We remove comments because anyway the quotes in there
2426 # would cause problems or look ugly.
2427 # WARNING: Use '\'' to represent an apostrophe within the trap.
2428 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2429 trap 'exit_status=$?
2430   # Save into config.log some information that might help in debugging.
2431   {
2432     echo
2433
2434     $as_echo "## ---------------- ##
2435 ## Cache variables. ##
2436 ## ---------------- ##"
2437     echo
2438     # The following way of writing the cache mishandles newlines in values,
2439 (
2440   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2441     eval ac_val=\$$ac_var
2442     case $ac_val in #(
2443     *${as_nl}*)
2444       case $ac_var in #(
2445       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2446 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2447       esac
2448       case $ac_var in #(
2449       _ | IFS | as_nl) ;; #(
2450       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2451       *) { eval $ac_var=; unset $ac_var;} ;;
2452       esac ;;
2453     esac
2454   done
2455   (set) 2>&1 |
2456     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2457     *${as_nl}ac_space=\ *)
2458       sed -n \
2459         "s/'\''/'\''\\\\'\'''\''/g;
2460           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2461       ;; #(
2462     *)
2463       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2464       ;;
2465     esac |
2466     sort
2467 )
2468     echo
2469
2470     $as_echo "## ----------------- ##
2471 ## Output variables. ##
2472 ## ----------------- ##"
2473     echo
2474     for ac_var in $ac_subst_vars
2475     do
2476       eval ac_val=\$$ac_var
2477       case $ac_val in
2478       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2479       esac
2480       $as_echo "$ac_var='\''$ac_val'\''"
2481     done | sort
2482     echo
2483
2484     if test -n "$ac_subst_files"; then
2485       $as_echo "## ------------------- ##
2486 ## File substitutions. ##
2487 ## ------------------- ##"
2488       echo
2489       for ac_var in $ac_subst_files
2490       do
2491         eval ac_val=\$$ac_var
2492         case $ac_val in
2493         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2494         esac
2495         $as_echo "$ac_var='\''$ac_val'\''"
2496       done | sort
2497       echo
2498     fi
2499
2500     if test -s confdefs.h; then
2501       $as_echo "## ----------- ##
2502 ## confdefs.h. ##
2503 ## ----------- ##"
2504       echo
2505       cat confdefs.h
2506       echo
2507     fi
2508     test "$ac_signal" != 0 &&
2509       $as_echo "$as_me: caught signal $ac_signal"
2510     $as_echo "$as_me: exit $exit_status"
2511   } >&5
2512   rm -f core *.core core.conftest.* &&
2513     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2514     exit $exit_status
2515 ' 0
2516 for ac_signal in 1 2 13 15; do
2517   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2518 done
2519 ac_signal=0
2520
2521 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2522 rm -f -r conftest* confdefs.h
2523
2524 $as_echo "/* confdefs.h */" > confdefs.h
2525
2526 # Predefined preprocessor variables.
2527
2528 cat >>confdefs.h <<_ACEOF
2529 #define PACKAGE_NAME "$PACKAGE_NAME"
2530 _ACEOF
2531
2532 cat >>confdefs.h <<_ACEOF
2533 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2534 _ACEOF
2535
2536 cat >>confdefs.h <<_ACEOF
2537 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2538 _ACEOF
2539
2540 cat >>confdefs.h <<_ACEOF
2541 #define PACKAGE_STRING "$PACKAGE_STRING"
2542 _ACEOF
2543
2544 cat >>confdefs.h <<_ACEOF
2545 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2546 _ACEOF
2547
2548 cat >>confdefs.h <<_ACEOF
2549 #define PACKAGE_URL "$PACKAGE_URL"
2550 _ACEOF
2551
2552
2553 # Let the site file select an alternate cache file if it wants to.
2554 # Prefer an explicitly selected file to automatically selected ones.
2555 ac_site_file1=NONE
2556 ac_site_file2=NONE
2557 if test -n "$CONFIG_SITE"; then
2558   # We do not want a PATH search for config.site.
2559   case $CONFIG_SITE in #((
2560     -*)  ac_site_file1=./$CONFIG_SITE;;
2561     */*) ac_site_file1=$CONFIG_SITE;;
2562     *)   ac_site_file1=./$CONFIG_SITE;;
2563   esac
2564 elif test "x$prefix" != xNONE; then
2565   ac_site_file1=$prefix/share/config.site
2566   ac_site_file2=$prefix/etc/config.site
2567 else
2568   ac_site_file1=$ac_default_prefix/share/config.site
2569   ac_site_file2=$ac_default_prefix/etc/config.site
2570 fi
2571 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2572 do
2573   test "x$ac_site_file" = xNONE && continue
2574   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2575     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2576 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2577     sed 's/^/| /' "$ac_site_file" >&5
2578     . "$ac_site_file" \
2579       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2580 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2581 as_fn_error $? "failed to load site script $ac_site_file
2582 See \`config.log' for more details" "$LINENO" 5; }
2583   fi
2584 done
2585
2586 if test -r "$cache_file"; then
2587   # Some versions of bash will fail to source /dev/null (special files
2588   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2589   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2590     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2591 $as_echo "$as_me: loading cache $cache_file" >&6;}
2592     case $cache_file in
2593       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2594       *)                      . "./$cache_file";;
2595     esac
2596   fi
2597 else
2598   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2599 $as_echo "$as_me: creating cache $cache_file" >&6;}
2600   >$cache_file
2601 fi
2602
2603 # Check that the precious variables saved in the cache have kept the same
2604 # value.
2605 ac_cache_corrupted=false
2606 for ac_var in $ac_precious_vars; do
2607   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2608   eval ac_new_set=\$ac_env_${ac_var}_set
2609   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2610   eval ac_new_val=\$ac_env_${ac_var}_value
2611   case $ac_old_set,$ac_new_set in
2612     set,)
2613       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2614 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2615       ac_cache_corrupted=: ;;
2616     ,set)
2617       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2618 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2619       ac_cache_corrupted=: ;;
2620     ,);;
2621     *)
2622       if test "x$ac_old_val" != "x$ac_new_val"; then
2623         # differences in whitespace do not lead to failure.
2624         ac_old_val_w=`echo x $ac_old_val`
2625         ac_new_val_w=`echo x $ac_new_val`
2626         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2627           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2628 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2629           ac_cache_corrupted=:
2630         else
2631           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2632 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2633           eval $ac_var=\$ac_old_val
2634         fi
2635         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2636 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2637         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2638 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2639       fi;;
2640   esac
2641   # Pass precious variables to config.status.
2642   if test "$ac_new_set" = set; then
2643     case $ac_new_val in
2644     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2645     *) ac_arg=$ac_var=$ac_new_val ;;
2646     esac
2647     case " $ac_configure_args " in
2648       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2649       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2650     esac
2651   fi
2652 done
2653 if $ac_cache_corrupted; then
2654   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2655 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2656   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2657 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2658   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2659 fi
2660 ## -------------------- ##
2661 ## Main body of script. ##
2662 ## -------------------- ##
2663
2664 ac_ext=c
2665 ac_cpp='$CPP $CPPFLAGS'
2666 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2667 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2668 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2669
2670
2671
2672
2673
2674
2675 ac_aux_dir=
2676 for ac_dir in config "$srcdir"/config; do
2677   if 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/install.sh"; then
2682     ac_aux_dir=$ac_dir
2683     ac_install_sh="$ac_aux_dir/install.sh -c"
2684     break
2685   elif test -f "$ac_dir/shtool"; then
2686     ac_aux_dir=$ac_dir
2687     ac_install_sh="$ac_aux_dir/shtool install -c"
2688     break
2689   fi
2690 done
2691 if test -z "$ac_aux_dir"; then
2692   as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2693 fi
2694
2695 # These three variables are undocumented and unsupported,
2696 # and are intended to be withdrawn in a future Autoconf release.
2697 # They can cause serious problems if a builder's source tree is in a directory
2698 # whose full name contains unusual characters.
2699 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2700 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2701 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2702
2703
2704
2705 configure_args=$ac_configure_args
2706
2707
2708 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\.[0-9][0-9]*\)'`
2709
2710
2711 cat >>confdefs.h <<_ACEOF
2712 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2713 _ACEOF
2714
2715
2716
2717
2718
2719 # Check whether --with-extra-version was given.
2720 if test "${with_extra_version+set}" = set; then :
2721   withval=$with_extra_version;
2722   case $withval in
2723     yes)
2724       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2725       ;;
2726     no)
2727       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2728       ;;
2729     *)
2730       PG_VERSION="$PACKAGE_VERSION$withval"
2731       ;;
2732   esac
2733
2734 else
2735   PG_VERSION="$PACKAGE_VERSION"
2736 fi
2737
2738
2739
2740 cat >>confdefs.h <<_ACEOF
2741 #define PG_VERSION "$PG_VERSION"
2742 _ACEOF
2743
2744
2745 # Make sure we can run config.sub.
2746 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2747   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2748
2749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2750 $as_echo_n "checking build system type... " >&6; }
2751 if ${ac_cv_build+:} false; then :
2752   $as_echo_n "(cached) " >&6
2753 else
2754   ac_build_alias=$build_alias
2755 test "x$ac_build_alias" = x &&
2756   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2757 test "x$ac_build_alias" = x &&
2758   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2759 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2760   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2761
2762 fi
2763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2764 $as_echo "$ac_cv_build" >&6; }
2765 case $ac_cv_build in
2766 *-*-*) ;;
2767 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2768 esac
2769 build=$ac_cv_build
2770 ac_save_IFS=$IFS; IFS='-'
2771 set x $ac_cv_build
2772 shift
2773 build_cpu=$1
2774 build_vendor=$2
2775 shift; shift
2776 # Remember, the first character of IFS is used to create $*,
2777 # except with old shells:
2778 build_os=$*
2779 IFS=$ac_save_IFS
2780 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2781
2782
2783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2784 $as_echo_n "checking host system type... " >&6; }
2785 if ${ac_cv_host+:} false; then :
2786   $as_echo_n "(cached) " >&6
2787 else
2788   if test "x$host_alias" = x; then
2789   ac_cv_host=$ac_cv_build
2790 else
2791   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2792     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2793 fi
2794
2795 fi
2796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2797 $as_echo "$ac_cv_host" >&6; }
2798 case $ac_cv_host in
2799 *-*-*) ;;
2800 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2801 esac
2802 host=$ac_cv_host
2803 ac_save_IFS=$IFS; IFS='-'
2804 set x $ac_cv_host
2805 shift
2806 host_cpu=$1
2807 host_vendor=$2
2808 shift; shift
2809 # Remember, the first character of IFS is used to create $*,
2810 # except with old shells:
2811 host_os=$*
2812 IFS=$ac_save_IFS
2813 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2814
2815
2816
2817 template=
2818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2819 $as_echo_n "checking which template to use... " >&6; }
2820
2821
2822
2823
2824 # Check whether --with-template was given.
2825 if test "${with_template+set}" = set; then :
2826   withval=$with_template;
2827   case $withval in
2828     yes)
2829       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2830       ;;
2831     no)
2832       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2833       ;;
2834     *)
2835
2836   case $withval in
2837     list)   echo; ls "$srcdir/src/template"; exit;;
2838     *)      if test -f "$srcdir/src/template/$with_template" ; then
2839               template=$withval
2840             else
2841               as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2842             fi;;
2843   esac
2844
2845       ;;
2846   esac
2847
2848 else
2849
2850 # --with-template not given
2851
2852 case $host_os in
2853      aix*) template=aix ;;
2854   cygwin*) template=cygwin ;;
2855   darwin*) template=darwin ;;
2856 dragonfly*) template=netbsd ;;
2857  freebsd*) template=freebsd ;;
2858     hpux*) template=hpux ;;
2859  linux*|gnu*|k*bsd*-gnu)
2860            template=linux ;;
2861    mingw*) template=win32 ;;
2862   netbsd*) template=netbsd ;;
2863  openbsd*) template=openbsd ;;
2864      sco*) template=sco ;;
2865  solaris*) template=solaris ;;
2866    sysv5*) template=unixware ;;
2867 esac
2868
2869   if test x"$template" = x"" ; then
2870     as_fn_error $? "
2871 *******************************************************************
2872 PostgreSQL has apparently not been ported to your platform yet.
2873 To try a manual configuration, look into the src/template directory
2874 for a similar platform and use the '--with-template=' option.
2875
2876 Please also contact <pgsql-bugs@postgresql.org> to see about
2877 rectifying this.  Include the above 'checking host system type...'
2878 line.
2879 *******************************************************************
2880 " "$LINENO" 5
2881   fi
2882
2883
2884 fi
2885
2886
2887
2888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
2889 $as_echo "$template" >&6; }
2890
2891 PORTNAME=$template
2892
2893
2894 # Initialize default assumption that we do not need separate assembly code
2895 # for TAS (test-and-set).  This can be overridden by the template file
2896 # when it's executed.
2897 need_tas=no
2898 tas_file=dummy.s
2899
2900
2901
2902 ##
2903 ## Command line options
2904 ##
2905
2906 #
2907 # Add non-standard directories to the include path
2908 #
2909
2910
2911
2912 # Check whether --with-includes was given.
2913 if test "${with_includes+set}" = set; then :
2914   withval=$with_includes;
2915   case $withval in
2916     yes)
2917       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
2918       ;;
2919     no)
2920       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
2921       ;;
2922     *)
2923
2924       ;;
2925   esac
2926
2927 fi
2928
2929
2930
2931
2932 #
2933 # Add non-standard directories to the library search path
2934 #
2935
2936
2937
2938 # Check whether --with-libraries was given.
2939 if test "${with_libraries+set}" = set; then :
2940   withval=$with_libraries;
2941   case $withval in
2942     yes)
2943       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
2944       ;;
2945     no)
2946       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
2947       ;;
2948     *)
2949       LIBRARY_DIRS=$withval
2950       ;;
2951   esac
2952
2953 fi
2954
2955
2956
2957
2958
2959
2960 # Check whether --with-libs was given.
2961 if test "${with_libs+set}" = set; then :
2962   withval=$with_libs;
2963   case $withval in
2964     yes)
2965       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
2966       ;;
2967     no)
2968       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
2969       ;;
2970     *)
2971       LIBRARY_DIRS=$withval
2972       ;;
2973   esac
2974
2975 fi
2976
2977
2978
2979
2980 #
2981 # 64-bit integer date/time storage: enabled by default.
2982 #
2983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with 64-bit integer date/time support" >&5
2984 $as_echo_n "checking whether to build with 64-bit integer date/time support... " >&6; }
2985
2986
2987 # Check whether --enable-integer-datetimes was given.
2988 if test "${enable_integer_datetimes+set}" = set; then :
2989   enableval=$enable_integer_datetimes;
2990   case $enableval in
2991     yes)
2992
2993 $as_echo "#define USE_INTEGER_DATETIMES 1" >>confdefs.h
2994
2995       ;;
2996     no)
2997       :
2998       ;;
2999     *)
3000       as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3001       ;;
3002   esac
3003
3004 else
3005   enable_integer_datetimes=yes
3006
3007 $as_echo "#define USE_INTEGER_DATETIMES 1" >>confdefs.h
3008
3009 fi
3010
3011
3012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_integer_datetimes" >&5
3013 $as_echo "$enable_integer_datetimes" >&6; }
3014
3015
3016 #
3017 # NLS
3018 #
3019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3020 $as_echo_n "checking whether NLS is wanted... " >&6; }
3021
3022
3023 # Check whether --enable-nls was given.
3024 if test "${enable_nls+set}" = set; then :
3025   enableval=$enable_nls;
3026   case $enableval in
3027     yes)
3028       :
3029       ;;
3030     no)
3031       :
3032       ;;
3033     *)
3034       enable_nls=yes
3035 WANTED_LANGUAGES=$enableval
3036       ;;
3037   esac
3038
3039 else
3040   enable_nls=no
3041 fi
3042
3043
3044
3045 if test "$enable_nls" = yes; then
3046
3047 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3048
3049 fi
3050
3051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3052 $as_echo "$enable_nls" >&6; }
3053
3054
3055
3056 #
3057 # Default port number (--with-pgport), default 5432
3058 #
3059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3060 $as_echo_n "checking for default port number... " >&6; }
3061
3062
3063
3064 # Check whether --with-pgport was given.
3065 if test "${with_pgport+set}" = set; then :
3066   withval=$with_pgport;
3067   case $withval in
3068     yes)
3069       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3070       ;;
3071     no)
3072       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3073       ;;
3074     *)
3075       default_port=$withval
3076       ;;
3077   esac
3078
3079 else
3080   default_port=5432
3081 fi
3082
3083
3084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3085 $as_echo "$default_port" >&6; }
3086 # Need both of these because some places want an integer and some a string
3087
3088 cat >>confdefs.h <<_ACEOF
3089 #define DEF_PGPORT ${default_port}
3090 _ACEOF
3091
3092
3093 cat >>confdefs.h <<_ACEOF
3094 #define DEF_PGPORT_STR "${default_port}"
3095 _ACEOF
3096
3097
3098
3099 #
3100 # '-rpath'-like feature can be disabled
3101 #
3102
3103
3104 # Check whether --enable-rpath was given.
3105 if test "${enable_rpath+set}" = set; then :
3106   enableval=$enable_rpath;
3107   case $enableval in
3108     yes)
3109       :
3110       ;;
3111     no)
3112       :
3113       ;;
3114     *)
3115       as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3116       ;;
3117   esac
3118
3119 else
3120   enable_rpath=yes
3121
3122 fi
3123
3124
3125
3126
3127 #
3128 # Spinlocks
3129 #
3130
3131
3132 # Check whether --enable-spinlocks was given.
3133 if test "${enable_spinlocks+set}" = set; then :
3134   enableval=$enable_spinlocks;
3135   case $enableval in
3136     yes)
3137       :
3138       ;;
3139     no)
3140       :
3141       ;;
3142     *)
3143       as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3144       ;;
3145   esac
3146
3147 else
3148   enable_spinlocks=yes
3149
3150 fi
3151
3152
3153
3154 #
3155 # Atomic operations
3156 #
3157
3158
3159 # Check whether --enable-atomics was given.
3160 if test "${enable_atomics+set}" = set; then :
3161   enableval=$enable_atomics;
3162   case $enableval in
3163     yes)
3164       :
3165       ;;
3166     no)
3167       :
3168       ;;
3169     *)
3170       as_fn_error $? "no argument expected for --enable-atomics option" "$LINENO" 5
3171       ;;
3172   esac
3173
3174 else
3175   enable_atomics=yes
3176
3177 fi
3178
3179
3180
3181 #
3182 # --enable-debug adds -g to compiler flags
3183 #
3184
3185
3186 # Check whether --enable-debug was given.
3187 if test "${enable_debug+set}" = set; then :
3188   enableval=$enable_debug;
3189   case $enableval in
3190     yes)
3191       :
3192       ;;
3193     no)
3194       :
3195       ;;
3196     *)
3197       as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3198       ;;
3199   esac
3200
3201 else
3202   enable_debug=no
3203
3204 fi
3205
3206
3207
3208
3209 #
3210 # --enable-profiling enables gcc profiling
3211 #
3212
3213
3214 # Check whether --enable-profiling was given.
3215 if test "${enable_profiling+set}" = set; then :
3216   enableval=$enable_profiling;
3217   case $enableval in
3218     yes)
3219       :
3220       ;;
3221     no)
3222       :
3223       ;;
3224     *)
3225       as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3226       ;;
3227   esac
3228
3229 else
3230   enable_profiling=no
3231
3232 fi
3233
3234
3235
3236 #
3237 # --enable-coverage enables generation of code coverage metrics with gcov
3238 #
3239
3240
3241 # Check whether --enable-coverage was given.
3242 if test "${enable_coverage+set}" = set; then :
3243   enableval=$enable_coverage;
3244   case $enableval in
3245     yes)
3246       for ac_prog in gcov
3247 do
3248   # Extract the first word of "$ac_prog", so it can be a program name with args.
3249 set dummy $ac_prog; ac_word=$2
3250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3251 $as_echo_n "checking for $ac_word... " >&6; }
3252 if ${ac_cv_prog_GCOV+:} false; then :
3253   $as_echo_n "(cached) " >&6
3254 else
3255   if test -n "$GCOV"; then
3256   ac_cv_prog_GCOV="$GCOV" # Let the user override the test.
3257 else
3258 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3259 for as_dir in $PATH
3260 do
3261   IFS=$as_save_IFS
3262   test -z "$as_dir" && as_dir=.
3263     for ac_exec_ext in '' $ac_executable_extensions; do
3264   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3265     ac_cv_prog_GCOV="$ac_prog"
3266     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3267     break 2
3268   fi
3269 done
3270   done
3271 IFS=$as_save_IFS
3272
3273 fi
3274 fi
3275 GCOV=$ac_cv_prog_GCOV
3276 if test -n "$GCOV"; then
3277   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3278 $as_echo "$GCOV" >&6; }
3279 else
3280   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3281 $as_echo "no" >&6; }
3282 fi
3283
3284
3285   test -n "$GCOV" && break
3286 done
3287
3288 if test -z "$GCOV"; then
3289   as_fn_error $? "gcov not found" "$LINENO" 5
3290 fi
3291 for ac_prog in lcov
3292 do
3293   # Extract the first word of "$ac_prog", so it can be a program name with args.
3294 set dummy $ac_prog; ac_word=$2
3295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3296 $as_echo_n "checking for $ac_word... " >&6; }
3297 if ${ac_cv_prog_LCOV+:} false; then :
3298   $as_echo_n "(cached) " >&6
3299 else
3300   if test -n "$LCOV"; then
3301   ac_cv_prog_LCOV="$LCOV" # Let the user override the test.
3302 else
3303 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3304 for as_dir in $PATH
3305 do
3306   IFS=$as_save_IFS
3307   test -z "$as_dir" && as_dir=.
3308     for ac_exec_ext in '' $ac_executable_extensions; do
3309   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3310     ac_cv_prog_LCOV="$ac_prog"
3311     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3312     break 2
3313   fi
3314 done
3315   done
3316 IFS=$as_save_IFS
3317
3318 fi
3319 fi
3320 LCOV=$ac_cv_prog_LCOV
3321 if test -n "$LCOV"; then
3322   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3323 $as_echo "$LCOV" >&6; }
3324 else
3325   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3326 $as_echo "no" >&6; }
3327 fi
3328
3329
3330   test -n "$LCOV" && break
3331 done
3332
3333 if test -z "$LCOV"; then
3334   as_fn_error $? "lcov not found" "$LINENO" 5
3335 fi
3336 for ac_prog in genhtml
3337 do
3338   # Extract the first word of "$ac_prog", so it can be a program name with args.
3339 set dummy $ac_prog; ac_word=$2
3340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3341 $as_echo_n "checking for $ac_word... " >&6; }
3342 if ${ac_cv_prog_GENHTML+:} false; then :
3343   $as_echo_n "(cached) " >&6
3344 else
3345   if test -n "$GENHTML"; then
3346   ac_cv_prog_GENHTML="$GENHTML" # Let the user override the test.
3347 else
3348 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3349 for as_dir in $PATH
3350 do
3351   IFS=$as_save_IFS
3352   test -z "$as_dir" && as_dir=.
3353     for ac_exec_ext in '' $ac_executable_extensions; do
3354   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3355     ac_cv_prog_GENHTML="$ac_prog"
3356     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3357     break 2
3358   fi
3359 done
3360   done
3361 IFS=$as_save_IFS
3362
3363 fi
3364 fi
3365 GENHTML=$ac_cv_prog_GENHTML
3366 if test -n "$GENHTML"; then
3367   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3368 $as_echo "$GENHTML" >&6; }
3369 else
3370   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3371 $as_echo "no" >&6; }
3372 fi
3373
3374
3375   test -n "$GENHTML" && break
3376 done
3377
3378 if test -z "$GENHTML"; then
3379   as_fn_error $? "genhtml not found" "$LINENO" 5
3380 fi
3381       ;;
3382     no)
3383       :
3384       ;;
3385     *)
3386       as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3387       ;;
3388   esac
3389
3390 else
3391   enable_coverage=no
3392
3393 fi
3394
3395
3396
3397
3398 #
3399 # DTrace
3400 #
3401
3402
3403 # Check whether --enable-dtrace was given.
3404 if test "${enable_dtrace+set}" = set; then :
3405   enableval=$enable_dtrace;
3406   case $enableval in
3407     yes)
3408       for ac_prog in dtrace
3409 do
3410   # Extract the first word of "$ac_prog", so it can be a program name with args.
3411 set dummy $ac_prog; ac_word=$2
3412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3413 $as_echo_n "checking for $ac_word... " >&6; }
3414 if ${ac_cv_prog_DTRACE+:} false; then :
3415   $as_echo_n "(cached) " >&6
3416 else
3417   if test -n "$DTRACE"; then
3418   ac_cv_prog_DTRACE="$DTRACE" # Let the user override the test.
3419 else
3420 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3421 for as_dir in $PATH
3422 do
3423   IFS=$as_save_IFS
3424   test -z "$as_dir" && as_dir=.
3425     for ac_exec_ext in '' $ac_executable_extensions; do
3426   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3427     ac_cv_prog_DTRACE="$ac_prog"
3428     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3429     break 2
3430   fi
3431 done
3432   done
3433 IFS=$as_save_IFS
3434
3435 fi
3436 fi
3437 DTRACE=$ac_cv_prog_DTRACE
3438 if test -n "$DTRACE"; then
3439   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3440 $as_echo "$DTRACE" >&6; }
3441 else
3442   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3443 $as_echo "no" >&6; }
3444 fi
3445
3446
3447   test -n "$DTRACE" && break
3448 done
3449
3450 if test -z "$DTRACE"; then
3451   as_fn_error $? "dtrace not found" "$LINENO" 5
3452 fi
3453
3454       ;;
3455     no)
3456       :
3457       ;;
3458     *)
3459       as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3460       ;;
3461   esac
3462
3463 else
3464   enable_dtrace=no
3465
3466 fi
3467
3468
3469
3470
3471 #
3472 # TAP tests
3473 #
3474
3475
3476 # Check whether --enable-tap-tests was given.
3477 if test "${enable_tap_tests+set}" = set; then :
3478   enableval=$enable_tap_tests;
3479   case $enableval in
3480     yes)
3481       :
3482       ;;
3483     no)
3484       :
3485       ;;
3486     *)
3487       as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3488       ;;
3489   esac
3490
3491 else
3492   enable_tap_tests=no
3493
3494 fi
3495
3496
3497
3498
3499 #
3500 # Block size
3501 #
3502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3503 $as_echo_n "checking for block size... " >&6; }
3504
3505
3506
3507 # Check whether --with-blocksize was given.
3508 if test "${with_blocksize+set}" = set; then :
3509   withval=$with_blocksize;
3510   case $withval in
3511     yes)
3512       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3513       ;;
3514     no)
3515       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3516       ;;
3517     *)
3518       blocksize=$withval
3519       ;;
3520   esac
3521
3522 else
3523   blocksize=8
3524 fi
3525
3526
3527 case ${blocksize} in
3528   1) BLCKSZ=1024;;
3529   2) BLCKSZ=2048;;
3530   4) BLCKSZ=4096;;
3531   8) BLCKSZ=8192;;
3532  16) BLCKSZ=16384;;
3533  32) BLCKSZ=32768;;
3534   *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3535 esac
3536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3537 $as_echo "${blocksize}kB" >&6; }
3538
3539
3540 cat >>confdefs.h <<_ACEOF
3541 #define BLCKSZ ${BLCKSZ}
3542 _ACEOF
3543
3544
3545 #
3546 # Relation segment size
3547 #
3548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3549 $as_echo_n "checking for segment size... " >&6; }
3550
3551
3552
3553 # Check whether --with-segsize was given.
3554 if test "${with_segsize+set}" = set; then :
3555   withval=$with_segsize;
3556   case $withval in
3557     yes)
3558       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3559       ;;
3560     no)
3561       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3562       ;;
3563     *)
3564       segsize=$withval
3565       ;;
3566   esac
3567
3568 else
3569   segsize=1
3570 fi
3571
3572
3573 # this expression is set up to avoid unnecessary integer overflow
3574 # blocksize is already guaranteed to be a factor of 1024
3575 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3576 test $? -eq 0 || exit 1
3577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3578 $as_echo "${segsize}GB" >&6; }
3579
3580
3581 cat >>confdefs.h <<_ACEOF
3582 #define RELSEG_SIZE ${RELSEG_SIZE}
3583 _ACEOF
3584
3585
3586 #
3587 # WAL block size
3588 #
3589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3590 $as_echo_n "checking for WAL block size... " >&6; }
3591
3592
3593
3594 # Check whether --with-wal-blocksize was given.
3595 if test "${with_wal_blocksize+set}" = set; then :
3596   withval=$with_wal_blocksize;
3597   case $withval in
3598     yes)
3599       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3600       ;;
3601     no)
3602       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3603       ;;
3604     *)
3605       wal_blocksize=$withval
3606       ;;
3607   esac
3608
3609 else
3610   wal_blocksize=8
3611 fi
3612
3613
3614 case ${wal_blocksize} in
3615   1) XLOG_BLCKSZ=1024;;
3616   2) XLOG_BLCKSZ=2048;;
3617   4) XLOG_BLCKSZ=4096;;
3618   8) XLOG_BLCKSZ=8192;;
3619  16) XLOG_BLCKSZ=16384;;
3620  32) XLOG_BLCKSZ=32768;;
3621  64) XLOG_BLCKSZ=65536;;
3622   *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3623 esac
3624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3625 $as_echo "${wal_blocksize}kB" >&6; }
3626
3627
3628 cat >>confdefs.h <<_ACEOF
3629 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3630 _ACEOF
3631
3632
3633 #
3634 # WAL segment size
3635 #
3636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL segment size" >&5
3637 $as_echo_n "checking for WAL segment size... " >&6; }
3638
3639
3640
3641 # Check whether --with-wal-segsize was given.
3642 if test "${with_wal_segsize+set}" = set; then :
3643   withval=$with_wal_segsize;
3644   case $withval in
3645     yes)
3646       as_fn_error $? "argument required for --with-wal-segsize option" "$LINENO" 5
3647       ;;
3648     no)
3649       as_fn_error $? "argument required for --with-wal-segsize option" "$LINENO" 5
3650       ;;
3651     *)
3652       wal_segsize=$withval
3653       ;;
3654   esac
3655
3656 else
3657   wal_segsize=16
3658 fi
3659
3660
3661 case ${wal_segsize} in
3662   1) ;;
3663   2) ;;
3664   4) ;;
3665   8) ;;
3666  16) ;;
3667  32) ;;
3668  64) ;;
3669   *) as_fn_error $? "Invalid WAL segment size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3670 esac
3671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_segsize}MB" >&5
3672 $as_echo "${wal_segsize}MB" >&6; }
3673
3674
3675 cat >>confdefs.h <<_ACEOF
3676 #define XLOG_SEG_SIZE (${wal_segsize} * 1024 * 1024)
3677 _ACEOF
3678
3679
3680 #
3681 # C compiler
3682 #
3683
3684 # For historical reasons you can also use --with-CC to specify the C compiler
3685 # to use, although the standard way to do this is to set the CC environment
3686 # variable.
3687
3688
3689
3690 # Check whether --with-CC was given.
3691 if test "${with_CC+set}" = set; then :
3692   withval=$with_CC;
3693   case $withval in
3694     yes)
3695       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3696       ;;
3697     no)
3698       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3699       ;;
3700     *)
3701       CC=$with_CC
3702       ;;
3703   esac
3704
3705 fi
3706
3707
3708
3709 case $template in
3710   aix) pgac_cc_list="gcc xlc";;
3711     *) pgac_cc_list="gcc cc";;
3712 esac
3713
3714 ac_ext=c
3715 ac_cpp='$CPP $CPPFLAGS'
3716 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3717 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3718 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3719 if test -n "$ac_tool_prefix"; then
3720   for ac_prog in $pgac_cc_list
3721   do
3722     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3723 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3725 $as_echo_n "checking for $ac_word... " >&6; }
3726 if ${ac_cv_prog_CC+:} false; then :
3727   $as_echo_n "(cached) " >&6
3728 else
3729   if test -n "$CC"; then
3730   ac_cv_prog_CC="$CC" # Let the user override the test.
3731 else
3732 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3733 for as_dir in $PATH
3734 do
3735   IFS=$as_save_IFS
3736   test -z "$as_dir" && as_dir=.
3737     for ac_exec_ext in '' $ac_executable_extensions; do
3738   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3739     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3740     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3741     break 2
3742   fi
3743 done
3744   done
3745 IFS=$as_save_IFS
3746
3747 fi
3748 fi
3749 CC=$ac_cv_prog_CC
3750 if test -n "$CC"; then
3751   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3752 $as_echo "$CC" >&6; }
3753 else
3754   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3755 $as_echo "no" >&6; }
3756 fi
3757
3758
3759     test -n "$CC" && break
3760   done
3761 fi
3762 if test -z "$CC"; then
3763   ac_ct_CC=$CC
3764   for ac_prog in $pgac_cc_list
3765 do
3766   # Extract the first word of "$ac_prog", so it can be a program name with args.
3767 set dummy $ac_prog; ac_word=$2
3768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3769 $as_echo_n "checking for $ac_word... " >&6; }
3770 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3771   $as_echo_n "(cached) " >&6
3772 else
3773   if test -n "$ac_ct_CC"; then
3774   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3775 else
3776 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3777 for as_dir in $PATH
3778 do
3779   IFS=$as_save_IFS
3780   test -z "$as_dir" && as_dir=.
3781     for ac_exec_ext in '' $ac_executable_extensions; do
3782   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3783     ac_cv_prog_ac_ct_CC="$ac_prog"
3784     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3785     break 2
3786   fi
3787 done
3788   done
3789 IFS=$as_save_IFS
3790
3791 fi
3792 fi
3793 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3794 if test -n "$ac_ct_CC"; then
3795   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3796 $as_echo "$ac_ct_CC" >&6; }
3797 else
3798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3799 $as_echo "no" >&6; }
3800 fi
3801
3802
3803   test -n "$ac_ct_CC" && break
3804 done
3805
3806   if test "x$ac_ct_CC" = x; then
3807     CC=""
3808   else
3809     case $cross_compiling:$ac_tool_warned in
3810 yes:)
3811 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3812 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3813 ac_tool_warned=yes ;;
3814 esac
3815     CC=$ac_ct_CC
3816   fi
3817 fi
3818
3819
3820 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3821 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3822 as_fn_error $? "no acceptable C compiler found in \$PATH
3823 See \`config.log' for more details" "$LINENO" 5; }
3824
3825 # Provide some information about the compiler.
3826 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3827 set X $ac_compile
3828 ac_compiler=$2
3829 for ac_option in --version -v -V -qversion; do
3830   { { ac_try="$ac_compiler $ac_option >&5"
3831 case "(($ac_try" in
3832   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3833   *) ac_try_echo=$ac_try;;
3834 esac
3835 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3836 $as_echo "$ac_try_echo"; } >&5
3837   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3838   ac_status=$?
3839   if test -s conftest.err; then
3840     sed '10a\
3841 ... rest of stderr output deleted ...
3842          10q' conftest.err >conftest.er1
3843     cat conftest.er1 >&5
3844   fi
3845   rm -f conftest.er1 conftest.err
3846   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3847   test $ac_status = 0; }
3848 done
3849
3850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3851 /* end confdefs.h.  */
3852
3853 int
3854 main ()
3855 {
3856
3857   ;
3858   return 0;
3859 }
3860 _ACEOF
3861 ac_clean_files_save=$ac_clean_files
3862 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3863 # Try to create an executable without -o first, disregard a.out.
3864 # It will help us diagnose broken compilers, and finding out an intuition
3865 # of exeext.
3866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3867 $as_echo_n "checking whether the C compiler works... " >&6; }
3868 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3869
3870 # The possible output files:
3871 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3872
3873 ac_rmfiles=
3874 for ac_file in $ac_files
3875 do
3876   case $ac_file in
3877     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3878     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3879   esac
3880 done
3881 rm -f $ac_rmfiles
3882
3883 if { { ac_try="$ac_link_default"
3884 case "(($ac_try" in
3885   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3886   *) ac_try_echo=$ac_try;;
3887 esac
3888 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3889 $as_echo "$ac_try_echo"; } >&5
3890   (eval "$ac_link_default") 2>&5
3891   ac_status=$?
3892   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3893   test $ac_status = 0; }; then :
3894   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3895 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3896 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3897 # so that the user can short-circuit this test for compilers unknown to
3898 # Autoconf.
3899 for ac_file in $ac_files ''
3900 do
3901   test -f "$ac_file" || continue
3902   case $ac_file in
3903     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3904         ;;
3905     [ab].out )
3906         # We found the default executable, but exeext='' is most
3907         # certainly right.
3908         break;;
3909     *.* )
3910         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3911         then :; else
3912            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3913         fi
3914         # We set ac_cv_exeext here because the later test for it is not
3915         # safe: cross compilers may not add the suffix if given an `-o'
3916         # argument, so we may need to know it at that point already.
3917         # Even if this section looks crufty: it has the advantage of
3918         # actually working.
3919         break;;
3920     * )
3921         break;;
3922   esac
3923 done
3924 test "$ac_cv_exeext" = no && ac_cv_exeext=
3925
3926 else
3927   ac_file=''
3928 fi
3929 if test -z "$ac_file"; then :
3930   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3931 $as_echo "no" >&6; }
3932 $as_echo "$as_me: failed program was:" >&5
3933 sed 's/^/| /' conftest.$ac_ext >&5
3934
3935 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3936 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3937 as_fn_error 77 "C compiler cannot create executables
3938 See \`config.log' for more details" "$LINENO" 5; }
3939 else
3940   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3941 $as_echo "yes" >&6; }
3942 fi
3943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3944 $as_echo_n "checking for C compiler default output file name... " >&6; }
3945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3946 $as_echo "$ac_file" >&6; }
3947 ac_exeext=$ac_cv_exeext
3948
3949 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3950 ac_clean_files=$ac_clean_files_save
3951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3952 $as_echo_n "checking for suffix of executables... " >&6; }
3953 if { { ac_try="$ac_link"
3954 case "(($ac_try" in
3955   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3956   *) ac_try_echo=$ac_try;;
3957 esac
3958 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3959 $as_echo "$ac_try_echo"; } >&5
3960   (eval "$ac_link") 2>&5
3961   ac_status=$?
3962   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3963   test $ac_status = 0; }; then :
3964   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3965 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3966 # work properly (i.e., refer to `conftest.exe'), while it won't with
3967 # `rm'.
3968 for ac_file in conftest.exe conftest conftest.*; do
3969   test -f "$ac_file" || continue
3970   case $ac_file in
3971     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3972     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3973           break;;
3974     * ) break;;
3975   esac
3976 done
3977 else
3978   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3979 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3980 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3981 See \`config.log' for more details" "$LINENO" 5; }
3982 fi
3983 rm -f conftest conftest$ac_cv_exeext
3984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3985 $as_echo "$ac_cv_exeext" >&6; }
3986
3987 rm -f conftest.$ac_ext
3988 EXEEXT=$ac_cv_exeext
3989 ac_exeext=$EXEEXT
3990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3991 /* end confdefs.h.  */
3992 #include <stdio.h>
3993 int
3994 main ()
3995 {
3996 FILE *f = fopen ("conftest.out", "w");
3997  return ferror (f) || fclose (f) != 0;
3998
3999   ;
4000   return 0;
4001 }
4002 _ACEOF
4003 ac_clean_files="$ac_clean_files conftest.out"
4004 # Check that the compiler produces executables we can run.  If not, either
4005 # the compiler is broken, or we cross compile.
4006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4007 $as_echo_n "checking whether we are cross compiling... " >&6; }
4008 if test "$cross_compiling" != yes; then
4009   { { ac_try="$ac_link"
4010 case "(($ac_try" in
4011   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4012   *) ac_try_echo=$ac_try;;
4013 esac
4014 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4015 $as_echo "$ac_try_echo"; } >&5
4016   (eval "$ac_link") 2>&5
4017   ac_status=$?
4018   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4019   test $ac_status = 0; }
4020   if { ac_try='./conftest$ac_cv_exeext'
4021   { { case "(($ac_try" in
4022   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4023   *) ac_try_echo=$ac_try;;
4024 esac
4025 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4026 $as_echo "$ac_try_echo"; } >&5
4027   (eval "$ac_try") 2>&5
4028   ac_status=$?
4029   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4030   test $ac_status = 0; }; }; then
4031     cross_compiling=no
4032   else
4033     if test "$cross_compiling" = maybe; then
4034         cross_compiling=yes
4035     else
4036         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4037 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4038 as_fn_error $? "cannot run C compiled programs.
4039 If you meant to cross compile, use \`--host'.
4040 See \`config.log' for more details" "$LINENO" 5; }
4041     fi
4042   fi
4043 fi
4044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4045 $as_echo "$cross_compiling" >&6; }
4046
4047 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4048 ac_clean_files=$ac_clean_files_save
4049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4050 $as_echo_n "checking for suffix of object files... " >&6; }
4051 if ${ac_cv_objext+:} false; then :
4052   $as_echo_n "(cached) " >&6
4053 else
4054   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4055 /* end confdefs.h.  */
4056
4057 int
4058 main ()
4059 {
4060
4061   ;
4062   return 0;
4063 }
4064 _ACEOF
4065 rm -f conftest.o conftest.obj
4066 if { { ac_try="$ac_compile"
4067 case "(($ac_try" in
4068   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4069   *) ac_try_echo=$ac_try;;
4070 esac
4071 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4072 $as_echo "$ac_try_echo"; } >&5
4073   (eval "$ac_compile") 2>&5
4074   ac_status=$?
4075   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4076   test $ac_status = 0; }; then :
4077   for ac_file in conftest.o conftest.obj conftest.*; do
4078   test -f "$ac_file" || continue;
4079   case $ac_file in
4080     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4081     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4082        break;;
4083   esac
4084 done
4085 else
4086   $as_echo "$as_me: failed program was:" >&5
4087 sed 's/^/| /' conftest.$ac_ext >&5
4088
4089 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4090 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4091 as_fn_error $? "cannot compute suffix of object files: cannot compile
4092 See \`config.log' for more details" "$LINENO" 5; }
4093 fi
4094 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4095 fi
4096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4097 $as_echo "$ac_cv_objext" >&6; }
4098 OBJEXT=$ac_cv_objext
4099 ac_objext=$OBJEXT
4100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4101 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4102 if ${ac_cv_c_compiler_gnu+:} false; then :
4103   $as_echo_n "(cached) " >&6
4104 else
4105   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4106 /* end confdefs.h.  */
4107
4108 int
4109 main ()
4110 {
4111 #ifndef __GNUC__
4112        choke me
4113 #endif
4114
4115   ;
4116   return 0;
4117 }
4118 _ACEOF
4119 if ac_fn_c_try_compile "$LINENO"; then :
4120   ac_compiler_gnu=yes
4121 else
4122   ac_compiler_gnu=no
4123 fi
4124 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4125 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4126
4127 fi
4128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4129 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4130 if test $ac_compiler_gnu = yes; then
4131   GCC=yes
4132 else
4133   GCC=
4134 fi
4135 ac_test_CFLAGS=${CFLAGS+set}
4136 ac_save_CFLAGS=$CFLAGS
4137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4138 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4139 if ${ac_cv_prog_cc_g+:} false; then :
4140   $as_echo_n "(cached) " >&6
4141 else
4142   ac_save_c_werror_flag=$ac_c_werror_flag
4143    ac_c_werror_flag=yes
4144    ac_cv_prog_cc_g=no
4145    CFLAGS="-g"
4146    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4147 /* end confdefs.h.  */
4148
4149 int
4150 main ()
4151 {
4152
4153   ;
4154   return 0;
4155 }
4156 _ACEOF
4157 if ac_fn_c_try_compile "$LINENO"; then :
4158   ac_cv_prog_cc_g=yes
4159 else
4160   CFLAGS=""
4161       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4162 /* end confdefs.h.  */
4163
4164 int
4165 main ()
4166 {
4167
4168   ;
4169   return 0;
4170 }
4171 _ACEOF
4172 if ac_fn_c_try_compile "$LINENO"; then :
4173
4174 else
4175   ac_c_werror_flag=$ac_save_c_werror_flag
4176          CFLAGS="-g"
4177          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4178 /* end confdefs.h.  */
4179
4180 int
4181 main ()
4182 {
4183
4184   ;
4185   return 0;
4186 }
4187 _ACEOF
4188 if ac_fn_c_try_compile "$LINENO"; then :
4189   ac_cv_prog_cc_g=yes
4190 fi
4191 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4192 fi
4193 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4194 fi
4195 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4196    ac_c_werror_flag=$ac_save_c_werror_flag
4197 fi
4198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4199 $as_echo "$ac_cv_prog_cc_g" >&6; }
4200 if test "$ac_test_CFLAGS" = set; then
4201   CFLAGS=$ac_save_CFLAGS
4202 elif test $ac_cv_prog_cc_g = yes; then
4203   if test "$GCC" = yes; then
4204     CFLAGS="-g -O2"
4205   else
4206     CFLAGS="-g"
4207   fi
4208 else
4209   if test "$GCC" = yes; then
4210     CFLAGS="-O2"
4211   else
4212     CFLAGS=
4213   fi
4214 fi
4215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4216 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4217 if ${ac_cv_prog_cc_c89+:} false; then :
4218   $as_echo_n "(cached) " >&6
4219 else
4220   ac_cv_prog_cc_c89=no
4221 ac_save_CC=$CC
4222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4223 /* end confdefs.h.  */
4224 #include <stdarg.h>
4225 #include <stdio.h>
4226 struct stat;
4227 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4228 struct buf { int x; };
4229 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4230 static char *e (p, i)
4231      char **p;
4232      int i;
4233 {
4234   return p[i];
4235 }
4236 static char *f (char * (*g) (char **, int), char **p, ...)
4237 {
4238   char *s;
4239   va_list v;
4240   va_start (v,p);
4241   s = g (p, va_arg (v,int));
4242   va_end (v);
4243   return s;
4244 }
4245
4246 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4247    function prototypes and stuff, but not '\xHH' hex character constants.
4248    These don't provoke an error unfortunately, instead are silently treated
4249    as 'x'.  The following induces an error, until -std is added to get
4250    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4251    array size at least.  It's necessary to write '\x00'==0 to get something
4252    that's true only with -std.  */
4253 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4254
4255 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4256    inside strings and character constants.  */
4257 #define FOO(x) 'x'
4258 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4259
4260 int test (int i, double x);
4261 struct s1 {int (*f) (int a);};
4262 struct s2 {int (*f) (double a);};
4263 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4264 int argc;
4265 char **argv;
4266 int
4267 main ()
4268 {
4269 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4270   ;
4271   return 0;
4272 }
4273 _ACEOF
4274 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4275         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4276 do
4277   CC="$ac_save_CC $ac_arg"
4278   if ac_fn_c_try_compile "$LINENO"; then :
4279   ac_cv_prog_cc_c89=$ac_arg
4280 fi
4281 rm -f core conftest.err conftest.$ac_objext
4282   test "x$ac_cv_prog_cc_c89" != "xno" && break
4283 done
4284 rm -f conftest.$ac_ext
4285 CC=$ac_save_CC
4286
4287 fi
4288 # AC_CACHE_VAL
4289 case "x$ac_cv_prog_cc_c89" in
4290   x)
4291     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4292 $as_echo "none needed" >&6; } ;;
4293   xno)
4294     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4295 $as_echo "unsupported" >&6; } ;;
4296   *)
4297     CC="$CC $ac_cv_prog_cc_c89"
4298     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4299 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4300 esac
4301 if test "x$ac_cv_prog_cc_c89" != xno; then :
4302
4303 fi
4304
4305 ac_ext=c
4306 ac_cpp='$CPP $CPPFLAGS'
4307 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4308 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4309 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4310
4311
4312 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4313 # but has idiosyncrasies of its own.  We assume icc will define
4314 # __INTEL_COMPILER regardless of CFLAGS.
4315
4316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4317 /* end confdefs.h.  */
4318
4319 int
4320 main ()
4321 {
4322 #ifndef __INTEL_COMPILER
4323 choke me
4324 #endif
4325   ;
4326   return 0;
4327 }
4328 _ACEOF
4329 if ac_fn_c_try_compile "$LINENO"; then :
4330   ICC=yes
4331 else
4332   ICC=no
4333 fi
4334 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4335
4336 # Check if it's Sun Studio compiler. We assume that
4337 # __SUNPRO_C will be defined for Sun Studio compilers
4338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4339 /* end confdefs.h.  */
4340
4341 int
4342 main ()
4343 {
4344 #ifndef __SUNPRO_C
4345 choke me
4346 #endif
4347   ;
4348   return 0;
4349 }
4350 _ACEOF
4351 if ac_fn_c_try_compile "$LINENO"; then :
4352   SUN_STUDIO_CC=yes
4353 else
4354   SUN_STUDIO_CC=no
4355 fi
4356 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4357
4358
4359
4360 unset CFLAGS
4361
4362 #
4363 # Read the template
4364 #
4365 . "$srcdir/src/template/$template" || exit
4366
4367 # CFLAGS are selected so:
4368 # If the user specifies something in the environment, that is used.
4369 # else:  If the template file set something, that is used.
4370 # else:  If coverage was enabled, don't set anything.
4371 # else:  If the compiler is GCC, then we use -O2.
4372 # else:  If the compiler is something else, then we use -O, unless debugging.
4373
4374 if test "$ac_env_CFLAGS_set" = set; then
4375   CFLAGS=$ac_env_CFLAGS_value
4376 elif test "${CFLAGS+set}" = set; then
4377   : # (keep what template set)
4378 elif test "$enable_coverage" = yes; then
4379   : # no optimization by default
4380 elif test "$GCC" = yes; then
4381   CFLAGS="-O2"
4382 else
4383   # if the user selected debug mode, don't use -O
4384   if test "$enable_debug" != yes; then
4385     CFLAGS="-O"
4386   fi
4387 fi
4388
4389 # set CFLAGS_VECTOR from the environment, if available
4390 if test "$ac_env_CFLAGS_VECTOR_set" = set; then
4391   CFLAGS_VECTOR=$ac_env_CFLAGS_VECTOR_value
4392 fi
4393
4394 # Some versions of GCC support some additional useful warning flags.
4395 # Check whether they are supported, and add them to CFLAGS if so.
4396 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
4397 # but has its own.  Also check other compiler-specific flags here.
4398
4399 if test "$GCC" = yes -a "$ICC" = no; then
4400   CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wpointer-arith"
4401   # These work in some but not all gcc versions
4402   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5
4403 $as_echo_n "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
4404 if ${pgac_cv_prog_cc_cflags__Wdeclaration_after_statement+:} false; then :
4405   $as_echo_n "(cached) " >&6
4406 else
4407   pgac_save_CFLAGS=$CFLAGS
4408 CFLAGS="$pgac_save_CFLAGS -Wdeclaration-after-statement"
4409 ac_save_c_werror_flag=$ac_c_werror_flag
4410 ac_c_werror_flag=yes
4411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4412 /* end confdefs.h.  */
4413
4414 int
4415 main ()
4416 {
4417
4418   ;
4419   return 0;
4420 }
4421 _ACEOF
4422 if ac_fn_c_try_compile "$LINENO"; then :
4423   pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=yes
4424 else
4425   pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=no
4426 fi
4427 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4428 ac_c_werror_flag=$ac_save_c_werror_flag
4429 CFLAGS="$pgac_save_CFLAGS"
4430 fi
4431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&5
4432 $as_echo "$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&6; }
4433 if test x"$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" = x"yes"; then
4434   CFLAGS="$CFLAGS -Wdeclaration-after-statement"
4435 fi
4436
4437   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wendif-labels" >&5
4438 $as_echo_n "checking whether $CC supports -Wendif-labels... " >&6; }
4439 if ${pgac_cv_prog_cc_cflags__Wendif_labels+:} false; then :
4440   $as_echo_n "(cached) " >&6
4441 else
4442   pgac_save_CFLAGS=$CFLAGS
4443 CFLAGS="$pgac_save_CFLAGS -Wendif-labels"
4444 ac_save_c_werror_flag=$ac_c_werror_flag
4445 ac_c_werror_flag=yes
4446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4447 /* end confdefs.h.  */
4448
4449 int
4450 main ()
4451 {
4452
4453   ;
4454   return 0;
4455 }
4456 _ACEOF
4457 if ac_fn_c_try_compile "$LINENO"; then :
4458   pgac_cv_prog_cc_cflags__Wendif_labels=yes
4459 else
4460   pgac_cv_prog_cc_cflags__Wendif_labels=no
4461 fi
4462 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4463 ac_c_werror_flag=$ac_save_c_werror_flag
4464 CFLAGS="$pgac_save_CFLAGS"
4465 fi
4466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wendif_labels" >&5
4467 $as_echo "$pgac_cv_prog_cc_cflags__Wendif_labels" >&6; }
4468 if test x"$pgac_cv_prog_cc_cflags__Wendif_labels" = x"yes"; then
4469   CFLAGS="$CFLAGS -Wendif-labels"
4470 fi
4471
4472   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wmissing-format-attribute" >&5
4473 $as_echo_n "checking whether $CC supports -Wmissing-format-attribute... " >&6; }
4474 if ${pgac_cv_prog_cc_cflags__Wmissing_format_attribute+:} false; then :
4475   $as_echo_n "(cached) " >&6
4476 else
4477   pgac_save_CFLAGS=$CFLAGS
4478 CFLAGS="$pgac_save_CFLAGS -Wmissing-format-attribute"
4479 ac_save_c_werror_flag=$ac_c_werror_flag
4480 ac_c_werror_flag=yes
4481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4482 /* end confdefs.h.  */
4483
4484 int
4485 main ()
4486 {
4487
4488   ;
4489   return 0;
4490 }
4491 _ACEOF
4492 if ac_fn_c_try_compile "$LINENO"; then :
4493   pgac_cv_prog_cc_cflags__Wmissing_format_attribute=yes
4494 else
4495   pgac_cv_prog_cc_cflags__Wmissing_format_attribute=no
4496 fi
4497 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4498 ac_c_werror_flag=$ac_save_c_werror_flag
4499 CFLAGS="$pgac_save_CFLAGS"
4500 fi
4501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wmissing_format_attribute" >&5
4502 $as_echo "$pgac_cv_prog_cc_cflags__Wmissing_format_attribute" >&6; }
4503 if test x"$pgac_cv_prog_cc_cflags__Wmissing_format_attribute" = x"yes"; then
4504   CFLAGS="$CFLAGS -Wmissing-format-attribute"
4505 fi
4506
4507   # This was included in -Wall/-Wformat in older GCC versions
4508   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wformat-security" >&5
4509 $as_echo_n "checking whether $CC supports -Wformat-security... " >&6; }
4510 if ${pgac_cv_prog_cc_cflags__Wformat_security+:} false; then :
4511   $as_echo_n "(cached) " >&6
4512 else
4513   pgac_save_CFLAGS=$CFLAGS
4514 CFLAGS="$pgac_save_CFLAGS -Wformat-security"
4515 ac_save_c_werror_flag=$ac_c_werror_flag
4516 ac_c_werror_flag=yes
4517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4518 /* end confdefs.h.  */
4519
4520 int
4521 main ()
4522 {
4523
4524   ;
4525   return 0;
4526 }
4527 _ACEOF
4528 if ac_fn_c_try_compile "$LINENO"; then :
4529   pgac_cv_prog_cc_cflags__Wformat_security=yes
4530 else
4531   pgac_cv_prog_cc_cflags__Wformat_security=no
4532 fi
4533 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4534 ac_c_werror_flag=$ac_save_c_werror_flag
4535 CFLAGS="$pgac_save_CFLAGS"
4536 fi
4537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wformat_security" >&5
4538 $as_echo "$pgac_cv_prog_cc_cflags__Wformat_security" >&6; }
4539 if test x"$pgac_cv_prog_cc_cflags__Wformat_security" = x"yes"; then
4540   CFLAGS="$CFLAGS -Wformat-security"
4541 fi
4542
4543   # Disable strict-aliasing rules; needed for gcc 3.3+
4544   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-strict-aliasing" >&5
4545 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4546 if ${pgac_cv_prog_cc_cflags__fno_strict_aliasing+:} false; then :
4547   $as_echo_n "(cached) " >&6
4548 else
4549   pgac_save_CFLAGS=$CFLAGS
4550 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4551 ac_save_c_werror_flag=$ac_c_werror_flag
4552 ac_c_werror_flag=yes
4553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4554 /* end confdefs.h.  */
4555
4556 int
4557 main ()
4558 {
4559
4560   ;
4561   return 0;
4562 }
4563 _ACEOF
4564 if ac_fn_c_try_compile "$LINENO"; then :
4565   pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4566 else
4567   pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4568 fi
4569 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4570 ac_c_werror_flag=$ac_save_c_werror_flag
4571 CFLAGS="$pgac_save_CFLAGS"
4572 fi
4573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4574 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4575 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4576   CFLAGS="$CFLAGS -fno-strict-aliasing"
4577 fi
4578
4579   # Disable optimizations that assume no overflow; needed for gcc 4.3+
4580   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fwrapv" >&5
4581 $as_echo_n "checking whether $CC supports -fwrapv... " >&6; }
4582 if ${pgac_cv_prog_cc_cflags__fwrapv+:} false; then :
4583   $as_echo_n "(cached) " >&6
4584 else
4585   pgac_save_CFLAGS=$CFLAGS
4586 CFLAGS="$pgac_save_CFLAGS -fwrapv"
4587 ac_save_c_werror_flag=$ac_c_werror_flag
4588 ac_c_werror_flag=yes
4589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4590 /* end confdefs.h.  */
4591
4592 int
4593 main ()
4594 {
4595
4596   ;
4597   return 0;
4598 }
4599 _ACEOF
4600 if ac_fn_c_try_compile "$LINENO"; then :
4601   pgac_cv_prog_cc_cflags__fwrapv=yes
4602 else
4603   pgac_cv_prog_cc_cflags__fwrapv=no
4604 fi
4605 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4606 ac_c_werror_flag=$ac_save_c_werror_flag
4607 CFLAGS="$pgac_save_CFLAGS"
4608 fi
4609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fwrapv" >&5
4610 $as_echo "$pgac_cv_prog_cc_cflags__fwrapv" >&6; }
4611 if test x"$pgac_cv_prog_cc_cflags__fwrapv" = x"yes"; then
4612   CFLAGS="$CFLAGS -fwrapv"
4613 fi
4614
4615   # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
4616   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fexcess-precision=standard" >&5
4617 $as_echo_n "checking whether $CC supports -fexcess-precision=standard... " >&6; }
4618 if ${pgac_cv_prog_cc_cflags__fexcess_precision_standard+:} false; then :
4619   $as_echo_n "(cached) " >&6
4620 else
4621   pgac_save_CFLAGS=$CFLAGS
4622 CFLAGS="$pgac_save_CFLAGS -fexcess-precision=standard"
4623 ac_save_c_werror_flag=$ac_c_werror_flag
4624 ac_c_werror_flag=yes
4625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4626 /* end confdefs.h.  */
4627
4628 int
4629 main ()
4630 {
4631
4632   ;
4633   return 0;
4634 }
4635 _ACEOF
4636 if ac_fn_c_try_compile "$LINENO"; then :
4637   pgac_cv_prog_cc_cflags__fexcess_precision_standard=yes
4638 else
4639   pgac_cv_prog_cc_cflags__fexcess_precision_standard=no
4640 fi
4641 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4642 ac_c_werror_flag=$ac_save_c_werror_flag
4643 CFLAGS="$pgac_save_CFLAGS"
4644 fi
4645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fexcess_precision_standard" >&5
4646 $as_echo "$pgac_cv_prog_cc_cflags__fexcess_precision_standard" >&6; }
4647 if test x"$pgac_cv_prog_cc_cflags__fexcess_precision_standard" = x"yes"; then
4648   CFLAGS="$CFLAGS -fexcess-precision=standard"
4649 fi
4650
4651   # Optimization flags for specific files that benefit from vectorization
4652   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -funroll-loops" >&5
4653 $as_echo_n "checking whether $CC supports -funroll-loops... " >&6; }
4654 if ${pgac_cv_prog_cc_cflags__funroll_loops+:} false; then :
4655   $as_echo_n "(cached) " >&6
4656 else
4657   pgac_save_CFLAGS=$CFLAGS
4658 CFLAGS="$pgac_save_CFLAGS -funroll-loops"
4659 ac_save_c_werror_flag=$ac_c_werror_flag
4660 ac_c_werror_flag=yes
4661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4662 /* end confdefs.h.  */
4663
4664 int
4665 main ()
4666 {
4667
4668   ;
4669   return 0;
4670 }
4671 _ACEOF
4672 if ac_fn_c_try_compile "$LINENO"; then :
4673   pgac_cv_prog_cc_cflags__funroll_loops=yes
4674 else
4675   pgac_cv_prog_cc_cflags__funroll_loops=no
4676 fi
4677 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4678 ac_c_werror_flag=$ac_save_c_werror_flag
4679 CFLAGS="$pgac_save_CFLAGS"
4680 fi
4681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__funroll_loops" >&5
4682 $as_echo "$pgac_cv_prog_cc_cflags__funroll_loops" >&6; }
4683 if test x"$pgac_cv_prog_cc_cflags__funroll_loops" = x"yes"; then
4684   CFLAGS_VECTOR="${CFLAGS_VECTOR} -funroll-loops"
4685 fi
4686
4687   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -ftree-vectorize" >&5
4688 $as_echo_n "checking whether $CC supports -ftree-vectorize... " >&6; }
4689 if ${pgac_cv_prog_cc_cflags__ftree_vectorize+:} false; then :
4690   $as_echo_n "(cached) " >&6
4691 else
4692   pgac_save_CFLAGS=$CFLAGS
4693 CFLAGS="$pgac_save_CFLAGS -ftree-vectorize"
4694 ac_save_c_werror_flag=$ac_c_werror_flag
4695 ac_c_werror_flag=yes
4696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4697 /* end confdefs.h.  */
4698
4699 int
4700 main ()
4701 {
4702
4703   ;
4704   return 0;
4705 }
4706 _ACEOF
4707 if ac_fn_c_try_compile "$LINENO"; then :
4708   pgac_cv_prog_cc_cflags__ftree_vectorize=yes
4709 else
4710   pgac_cv_prog_cc_cflags__ftree_vectorize=no
4711 fi
4712 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4713 ac_c_werror_flag=$ac_save_c_werror_flag
4714 CFLAGS="$pgac_save_CFLAGS"
4715 fi
4716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__ftree_vectorize" >&5
4717 $as_echo "$pgac_cv_prog_cc_cflags__ftree_vectorize" >&6; }
4718 if test x"$pgac_cv_prog_cc_cflags__ftree_vectorize" = x"yes"; then
4719   CFLAGS_VECTOR="${CFLAGS_VECTOR} -ftree-vectorize"
4720 fi
4721
4722 elif test "$ICC" = yes; then
4723   # Intel's compiler has a bug/misoptimization in checking for
4724   # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
4725   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mp1" >&5
4726 $as_echo_n "checking whether $CC supports -mp1... " >&6; }
4727 if ${pgac_cv_prog_cc_cflags__mp1+:} false; then :
4728   $as_echo_n "(cached) " >&6
4729 else
4730   pgac_save_CFLAGS=$CFLAGS
4731 CFLAGS="$pgac_save_CFLAGS -mp1"
4732 ac_save_c_werror_flag=$ac_c_werror_flag
4733 ac_c_werror_flag=yes
4734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4735 /* end confdefs.h.  */
4736
4737 int
4738 main ()
4739 {
4740
4741   ;
4742   return 0;
4743 }
4744 _ACEOF
4745 if ac_fn_c_try_compile "$LINENO"; then :
4746   pgac_cv_prog_cc_cflags__mp1=yes
4747 else
4748   pgac_cv_prog_cc_cflags__mp1=no
4749 fi
4750 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4751 ac_c_werror_flag=$ac_save_c_werror_flag
4752 CFLAGS="$pgac_save_CFLAGS"
4753 fi
4754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__mp1" >&5
4755 $as_echo "$pgac_cv_prog_cc_cflags__mp1" >&6; }
4756 if test x"$pgac_cv_prog_cc_cflags__mp1" = x"yes"; then
4757   CFLAGS="$CFLAGS -mp1"
4758 fi
4759
4760   # Make sure strict aliasing is off (though this is said to be the default)
4761   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-strict-aliasing" >&5
4762 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4763 if ${pgac_cv_prog_cc_cflags__fno_strict_aliasing+:} false; then :
4764   $as_echo_n "(cached) " >&6
4765 else
4766   pgac_save_CFLAGS=$CFLAGS
4767 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4768 ac_save_c_werror_flag=$ac_c_werror_flag
4769 ac_c_werror_flag=yes
4770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4771 /* end confdefs.h.  */
4772
4773 int
4774 main ()
4775 {
4776
4777   ;
4778   return 0;
4779 }
4780 _ACEOF
4781 if ac_fn_c_try_compile "$LINENO"; then :
4782   pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4783 else
4784   pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4785 fi
4786 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4787 ac_c_werror_flag=$ac_save_c_werror_flag
4788 CFLAGS="$pgac_save_CFLAGS"
4789 fi
4790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4791 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4792 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4793   CFLAGS="$CFLAGS -fno-strict-aliasing"
4794 fi
4795
4796 elif test "$PORTNAME" = "aix"; then
4797   # AIX's xlc has to have strict aliasing turned off too
4798   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -qnoansialias" >&5
4799 $as_echo_n "checking whether $CC supports -qnoansialias... " >&6; }
4800 if ${pgac_cv_prog_cc_cflags__qnoansialias+:} false; then :
4801   $as_echo_n "(cached) " >&6
4802 else
4803   pgac_save_CFLAGS=$CFLAGS
4804 CFLAGS="$pgac_save_CFLAGS -qnoansialias"
4805 ac_save_c_werror_flag=$ac_c_werror_flag
4806 ac_c_werror_flag=yes
4807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4808 /* end confdefs.h.  */
4809
4810 int
4811 main ()
4812 {
4813
4814   ;
4815   return 0;
4816 }
4817 _ACEOF
4818 if ac_fn_c_try_compile "$LINENO"; then :
4819   pgac_cv_prog_cc_cflags__qnoansialias=yes
4820 else
4821   pgac_cv_prog_cc_cflags__qnoansialias=no
4822 fi
4823 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4824 ac_c_werror_flag=$ac_save_c_werror_flag
4825 CFLAGS="$pgac_save_CFLAGS"
4826 fi
4827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__qnoansialias" >&5
4828 $as_echo "$pgac_cv_prog_cc_cflags__qnoansialias" >&6; }
4829 if test x"$pgac_cv_prog_cc_cflags__qnoansialias" = x"yes"; then
4830   CFLAGS="$CFLAGS -qnoansialias"
4831 fi
4832
4833 elif test "$PORTNAME" = "hpux"; then
4834   # On some versions of HP-UX, libm functions do not set errno by default.
4835   # Fix that by using +Olibmerrno if the compiler recognizes it.
4836   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports +Olibmerrno" >&5
4837 $as_echo_n "checking whether $CC supports +Olibmerrno... " >&6; }
4838 if ${pgac_cv_prog_cc_cflags_pOlibmerrno+:} false; then :
4839   $as_echo_n "(cached) " >&6
4840 else
4841   pgac_save_CFLAGS=$CFLAGS
4842 CFLAGS="$pgac_save_CFLAGS +Olibmerrno"
4843 ac_save_c_werror_flag=$ac_c_werror_flag
4844 ac_c_werror_flag=yes
4845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4846 /* end confdefs.h.  */
4847
4848 int
4849 main ()
4850 {
4851
4852   ;
4853   return 0;
4854 }
4855 _ACEOF
4856 if ac_fn_c_try_compile "$LINENO"; then :
4857   pgac_cv_prog_cc_cflags_pOlibmerrno=yes
4858 else
4859   pgac_cv_prog_cc_cflags_pOlibmerrno=no
4860 fi
4861 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4862 ac_c_werror_flag=$ac_save_c_werror_flag
4863 CFLAGS="$pgac_save_CFLAGS"
4864 fi
4865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags_pOlibmerrno" >&5
4866 $as_echo "$pgac_cv_prog_cc_cflags_pOlibmerrno" >&6; }
4867 if test x"$pgac_cv_prog_cc_cflags_pOlibmerrno" = x"yes"; then
4868   CFLAGS="$CFLAGS +Olibmerrno"
4869 fi
4870
4871 fi
4872
4873 CFLAGS_VECTOR=$CFLAGS_VECTOR
4874
4875
4876 # supply -g if --enable-debug
4877 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
4878   CFLAGS="$CFLAGS -g"
4879 fi
4880
4881 # enable code coverage if --enable-coverage
4882 if test "$enable_coverage" = yes; then
4883   if test "$GCC" = yes; then
4884     CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
4885   else
4886     as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
4887   fi
4888 fi
4889
4890 # enable profiling if --enable-profiling
4891 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
4892   if test "$GCC" = yes; then
4893
4894 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
4895
4896     CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
4897   else
4898     as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
4899   fi
4900 fi
4901
4902 # We already have this in Makefile.win32, but configure needs it too
4903 if test "$PORTNAME" = "win32"; then
4904   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
4905 fi
4906
4907 # Check if the compiler still works with the template settings
4908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
4909 $as_echo_n "checking whether the C compiler still works... " >&6; }
4910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4911 /* end confdefs.h.  */
4912
4913 int
4914 main ()
4915 {
4916 return 0;
4917   ;
4918   return 0;
4919 }
4920 _ACEOF
4921 if ac_fn_c_try_link "$LINENO"; then :
4922   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4923 $as_echo "yes" >&6; }
4924 else
4925   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4926 $as_echo "no" >&6; }
4927    as_fn_error $? "cannot proceed" "$LINENO" 5
4928 fi
4929 rm -f core conftest.err conftest.$ac_objext \
4930     conftest$ac_exeext conftest.$ac_ext
4931
4932 # Defend against gcc -ffast-math
4933 if test "$GCC" = yes; then
4934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4935 /* end confdefs.h.  */
4936
4937 int
4938 main ()
4939 {
4940 #ifdef __FAST_MATH__
4941 choke me
4942 #endif
4943   ;
4944   return 0;
4945 }
4946 _ACEOF
4947 if ac_fn_c_try_compile "$LINENO"; then :
4948
4949 else
4950   as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
4951 fi
4952 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4953 fi
4954
4955 ac_ext=c
4956 ac_cpp='$CPP $CPPFLAGS'
4957 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4958 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4959 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4961 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4962 # On Suns, sometimes $CPP names a directory.
4963 if test -n "$CPP" && test -d "$CPP"; then
4964   CPP=
4965 fi
4966 if test -z "$CPP"; then
4967   if ${ac_cv_prog_CPP+:} false; then :
4968   $as_echo_n "(cached) " >&6
4969 else
4970       # Double quotes because CPP needs to be expanded
4971     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4972     do
4973       ac_preproc_ok=false
4974 for ac_c_preproc_warn_flag in '' yes
4975 do
4976   # Use a header file that comes with gcc, so configuring glibc
4977   # with a fresh cross-compiler works.
4978   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4979   # <limits.h> exists even on freestanding compilers.
4980   # On the NeXT, cc -E runs the code through the compiler's parser,
4981   # not just through cpp. "Syntax error" is here to catch this case.
4982   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4983 /* end confdefs.h.  */
4984 #ifdef __STDC__
4985 # include <limits.h>
4986 #else
4987 # include <assert.h>
4988 #endif
4989                      Syntax error
4990 _ACEOF
4991 if ac_fn_c_try_cpp "$LINENO"; then :
4992
4993 else
4994   # Broken: fails on valid input.
4995 continue
4996 fi
4997 rm -f conftest.err conftest.i conftest.$ac_ext
4998
4999   # OK, works on sane cases.  Now check whether nonexistent headers
5000   # can be detected and how.
5001   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5002 /* end confdefs.h.  */
5003 #include <ac_nonexistent.h>
5004 _ACEOF
5005 if ac_fn_c_try_cpp "$LINENO"; then :
5006   # Broken: success on invalid input.
5007 continue
5008 else
5009   # Passes both tests.
5010 ac_preproc_ok=:
5011 break
5012 fi
5013 rm -f conftest.err conftest.i conftest.$ac_ext
5014
5015 done
5016 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5017 rm -f conftest.i conftest.err conftest.$ac_ext
5018 if $ac_preproc_ok; then :
5019   break
5020 fi
5021
5022     done
5023     ac_cv_prog_CPP=$CPP
5024
5025 fi
5026   CPP=$ac_cv_prog_CPP
5027 else
5028   ac_cv_prog_CPP=$CPP
5029 fi
5030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5031 $as_echo "$CPP" >&6; }
5032 ac_preproc_ok=false
5033 for ac_c_preproc_warn_flag in '' yes
5034 do
5035   # Use a header file that comes with gcc, so configuring glibc
5036   # with a fresh cross-compiler works.
5037   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5038   # <limits.h> exists even on freestanding compilers.
5039   # On the NeXT, cc -E runs the code through the compiler's parser,
5040   # not just through cpp. "Syntax error" is here to catch this case.
5041   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5042 /* end confdefs.h.  */
5043 #ifdef __STDC__
5044 # include <limits.h>
5045 #else
5046 # include <assert.h>
5047 #endif
5048                      Syntax error
5049 _ACEOF
5050 if ac_fn_c_try_cpp "$LINENO"; then :
5051
5052 else
5053   # Broken: fails on valid input.
5054 continue
5055 fi
5056 rm -f conftest.err conftest.i conftest.$ac_ext
5057
5058   # OK, works on sane cases.  Now check whether nonexistent headers
5059   # can be detected and how.
5060   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5061 /* end confdefs.h.  */
5062 #include <ac_nonexistent.h>
5063 _ACEOF
5064 if ac_fn_c_try_cpp "$LINENO"; then :
5065   # Broken: success on invalid input.
5066 continue
5067 else
5068   # Passes both tests.
5069 ac_preproc_ok=:
5070 break
5071 fi
5072 rm -f conftest.err conftest.i conftest.$ac_ext
5073
5074 done
5075 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5076 rm -f conftest.i conftest.err conftest.$ac_ext
5077 if $ac_preproc_ok; then :
5078
5079 else
5080   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5081 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5082 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5083 See \`config.log' for more details" "$LINENO" 5; }
5084 fi
5085
5086 ac_ext=c
5087 ac_cpp='$CPP $CPPFLAGS'
5088 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5089 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5090 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5091
5092
5093
5094
5095 #
5096 # Set up TAS assembly code if needed; the template file has now had its
5097 # chance to request this.
5098 #
5099 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
5100
5101
5102 if test "$need_tas" = yes ; then
5103   TAS=tas.o
5104 else
5105   TAS=""
5106 fi
5107
5108
5109
5110 #
5111 # Automatic dependency tracking
5112 #
5113
5114
5115 # Check whether --enable-depend was given.
5116 if test "${enable_depend+set}" = set; then :
5117   enableval=$enable_depend;
5118   case $enableval in
5119     yes)
5120       autodepend=yes
5121       ;;
5122     no)
5123       :
5124       ;;
5125     *)
5126       as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
5127       ;;
5128   esac
5129
5130 else
5131   enable_depend=no
5132
5133 fi
5134
5135
5136
5137
5138
5139 #
5140 # Enable assert checks
5141 #
5142
5143
5144 # Check whether --enable-cassert was given.
5145 if test "${enable_cassert+set}" = set; then :
5146   enableval=$enable_cassert;
5147   case $enableval in
5148     yes)
5149
5150 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
5151
5152       ;;
5153     no)
5154       :
5155       ;;
5156     *)
5157       as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
5158       ;;
5159   esac
5160
5161 else
5162   enable_cassert=no
5163
5164 fi
5165
5166
5167
5168
5169 #
5170 # Include directories
5171 #
5172 ac_save_IFS=$IFS
5173 IFS="${IFS}${PATH_SEPARATOR}"
5174 # SRCH_INC comes from the template file
5175 for dir in $with_includes $SRCH_INC; do
5176   if test -d "$dir"; then
5177     INCLUDES="$INCLUDES -I$dir"
5178   else
5179     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
5180 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
5181   fi
5182 done
5183 IFS=$ac_save_IFS
5184
5185
5186
5187 #
5188 # Library directories
5189 #
5190 ac_save_IFS=$IFS
5191 IFS="${IFS}${PATH_SEPARATOR}"
5192 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
5193 for dir in $LIBRARY_DIRS $SRCH_LIB; do
5194   if test -d "$dir"; then
5195     LIBDIRS="$LIBDIRS -L$dir"
5196   else
5197     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
5198 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
5199   fi
5200 done
5201 IFS=$ac_save_IFS
5202
5203 #
5204 # Enable thread-safe client libraries
5205 #
5206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
5207 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
5208
5209
5210 # Check whether --enable-thread-safety was given.
5211 if test "${enable_thread_safety+set}" = set; then :
5212   enableval=$enable_thread_safety;
5213   case $enableval in
5214     yes)
5215       :
5216       ;;
5217     no)
5218       :
5219       ;;
5220     *)
5221       as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
5222       ;;
5223   esac
5224
5225 else
5226   enable_thread_safety=yes
5227
5228 fi
5229
5230
5231 if test "$enable_thread_safety" = yes; then
5232
5233 $as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
5234
5235 fi
5236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
5237 $as_echo "$enable_thread_safety" >&6; }
5238
5239
5240 #
5241 # Optionally build Tcl modules (PL/Tcl)
5242 #
5243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
5244 $as_echo_n "checking whether to build with Tcl... " >&6; }
5245
5246
5247
5248 # Check whether --with-tcl was given.
5249 if test "${with_tcl+set}" = set; then :
5250   withval=$with_tcl;
5251   case $withval in
5252     yes)
5253       :
5254       ;;
5255     no)
5256       :
5257       ;;
5258     *)
5259       as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
5260       ;;
5261   esac
5262
5263 else
5264   with_tcl=no
5265
5266 fi
5267
5268
5269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
5270 $as_echo "$with_tcl" >&6; }
5271
5272
5273 # We see if the path to the Tcl/Tk configuration scripts is specified.
5274 # This will override the use of tclsh to find the paths to search.
5275
5276
5277
5278
5279 # Check whether --with-tclconfig was given.
5280 if test "${with_tclconfig+set}" = set; then :
5281   withval=$with_tclconfig;
5282   case $withval in
5283     yes)
5284       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
5285       ;;
5286     no)
5287       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
5288       ;;
5289     *)
5290
5291       ;;
5292   esac
5293
5294 fi
5295
5296
5297
5298 #
5299 # Optionally build Perl modules (PL/Perl)
5300 #
5301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
5302 $as_echo_n "checking whether to build Perl modules... " >&6; }
5303
5304
5305
5306 # Check whether --with-perl was given.
5307 if test "${with_perl+set}" = set; then :
5308   withval=$with_perl;
5309   case $withval in
5310     yes)
5311       :
5312       ;;
5313     no)
5314       :
5315       ;;
5316     *)
5317       as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
5318       ;;
5319   esac
5320
5321 else
5322   with_perl=no
5323
5324 fi
5325
5326
5327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
5328 $as_echo "$with_perl" >&6; }
5329
5330
5331 #
5332 # Optionally build Python modules (PL/Python)
5333 #
5334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
5335 $as_echo_n "checking whether to build Python modules... " >&6; }
5336
5337
5338
5339 # Check whether --with-python was given.
5340 if test "${with_python+set}" = set; then :
5341   withval=$with_python;
5342   case $withval in
5343     yes)
5344       :
5345       ;;
5346     no)
5347       :
5348       ;;
5349     *)
5350       as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
5351       ;;
5352   esac
5353
5354 else
5355   with_python=no
5356
5357 fi
5358
5359
5360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
5361 $as_echo "$with_python" >&6; }
5362
5363
5364 #
5365 # GSSAPI
5366 #
5367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
5368 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
5369
5370
5371
5372 # Check whether --with-gssapi was given.
5373 if test "${with_gssapi+set}" = set; then :
5374   withval=$with_gssapi;
5375   case $withval in
5376     yes)
5377
5378
5379 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
5380
5381   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
5382
5383       ;;
5384     no)
5385       :
5386       ;;
5387     *)
5388       as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
5389       ;;
5390   esac
5391
5392 else
5393   with_gssapi=no
5394
5395 fi
5396
5397
5398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
5399 $as_echo "$with_gssapi" >&6; }
5400
5401
5402
5403
5404
5405 #
5406 # Kerberos configuration parameters
5407 #
5408
5409
5410
5411 # Check whether --with-krb-srvnam was given.
5412 if test "${with_krb_srvnam+set}" = set; then :
5413   withval=$with_krb_srvnam;
5414   case $withval in
5415     yes)
5416       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
5417       ;;
5418     no)
5419       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
5420       ;;
5421     *)
5422
5423       ;;
5424   esac
5425
5426 else
5427   with_krb_srvnam="postgres"
5428 fi
5429
5430
5431
5432 cat >>confdefs.h <<_ACEOF
5433 #define PG_KRB_SRVNAM "$with_krb_srvnam"
5434 _ACEOF
5435
5436
5437
5438 #
5439 # PAM
5440 #
5441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
5442 $as_echo_n "checking whether to build with PAM support... " >&6; }
5443
5444
5445
5446 # Check whether --with-pam was given.
5447 if test "${with_pam+set}" = set; then :
5448   withval=$with_pam;
5449   case $withval in
5450     yes)
5451
5452 $as_echo "#define USE_PAM 1" >>confdefs.h
5453
5454       ;;
5455     no)
5456       :
5457       ;;
5458     *)
5459       as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
5460       ;;
5461   esac
5462
5463 else
5464   with_pam=no
5465
5466 fi
5467
5468
5469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
5470 $as_echo "$with_pam" >&6; }
5471
5472
5473 #
5474 # LDAP
5475 #
5476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
5477 $as_echo_n "checking whether to build with LDAP support... " >&6; }
5478
5479
5480
5481 # Check whether --with-ldap was given.
5482 if test "${with_ldap+set}" = set; then :
5483   withval=$with_ldap;
5484   case $withval in
5485     yes)
5486
5487 $as_echo "#define USE_LDAP 1" >>confdefs.h
5488
5489       ;;
5490     no)
5491       :
5492       ;;
5493     *)
5494       as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
5495       ;;
5496   esac
5497
5498 else
5499   with_ldap=no
5500
5501 fi
5502
5503
5504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
5505 $as_echo "$with_ldap" >&6; }
5506
5507
5508 #
5509 # Bonjour
5510 #
5511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
5512 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
5513
5514
5515
5516 # Check whether --with-bonjour was given.
5517 if test "${with_bonjour+set}" = set; then :
5518   withval=$with_bonjour;
5519   case $withval in
5520     yes)
5521
5522 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
5523
5524       ;;
5525     no)
5526       :
5527       ;;
5528     *)
5529       as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
5530       ;;
5531   esac
5532
5533 else
5534   with_bonjour=no
5535
5536 fi
5537
5538
5539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
5540 $as_echo "$with_bonjour" >&6; }
5541
5542
5543 #
5544 # OpenSSL
5545 #
5546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with OpenSSL support" >&5
5547 $as_echo_n "checking whether to build with OpenSSL support... " >&6; }
5548
5549
5550
5551 # Check whether --with-openssl was given.
5552 if test "${with_openssl+set}" = set; then :
5553   withval=$with_openssl;
5554   case $withval in
5555     yes)
5556
5557 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
5558
5559       ;;
5560     no)
5561       :
5562       ;;
5563     *)
5564       as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
5565       ;;
5566   esac
5567
5568 else
5569   with_openssl=no
5570
5571 fi
5572
5573
5574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_openssl" >&5
5575 $as_echo "$with_openssl" >&6; }
5576
5577
5578 #
5579 # SELinux
5580 #
5581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
5582 $as_echo_n "checking whether to build with SELinux support... " >&6; }
5583
5584
5585
5586 # Check whether --with-selinux was given.
5587 if test "${with_selinux+set}" = set; then :
5588   withval=$with_selinux;
5589   case $withval in
5590     yes)
5591       :
5592       ;;
5593     no)
5594       :
5595       ;;
5596     *)
5597       as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
5598       ;;
5599   esac
5600
5601 else
5602   with_selinux=no
5603
5604 fi
5605
5606
5607
5608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
5609 $as_echo "$with_selinux" >&6; }
5610
5611 #
5612 # Readline
5613 #
5614
5615
5616
5617 # Check whether --with-readline was given.
5618 if test "${with_readline+set}" = set; then :
5619   withval=$with_readline;
5620   case $withval in
5621     yes)
5622       :
5623       ;;
5624     no)
5625       :
5626       ;;
5627     *)
5628       as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
5629       ;;
5630   esac
5631
5632 else
5633   with_readline=yes
5634
5635 fi
5636
5637
5638 # readline on MinGW has problems with backslashes in psql and other bugs.
5639 # This is particularly a problem with non-US code pages.
5640 # Therefore disable its use until we understand the cause. 2004-07-20
5641 if test "$PORTNAME" = "win32"; then
5642   if test "$with_readline" = yes; then
5643     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
5644 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
5645     with_readline=no
5646   fi
5647 fi
5648
5649
5650 #
5651 # Prefer libedit
5652 #
5653
5654
5655
5656 # Check whether --with-libedit-preferred was given.
5657 if test "${with_libedit_preferred+set}" = set; then :
5658   withval=$with_libedit_preferred;
5659   case $withval in
5660     yes)
5661       :
5662       ;;
5663     no)
5664       :
5665       ;;
5666     *)
5667       as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
5668       ;;
5669   esac
5670
5671 else
5672   with_libedit_preferred=no
5673
5674 fi
5675
5676
5677
5678
5679 #
5680 # UUID library
5681 #
5682 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
5683 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
5684 # UUID library.  More than one of these might be present on a given platform,
5685 # so we make the user say which one she wants.
5686 #
5687
5688
5689
5690 # Check whether --with-uuid was given.
5691 if test "${with_uuid+set}" = set; then :
5692   withval=$with_uuid;
5693   case $withval in
5694     yes)
5695       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
5696       ;;
5697     no)
5698       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
5699       ;;
5700     *)
5701
5702       ;;
5703   esac
5704
5705 fi
5706
5707
5708 if test x"$with_uuid" = x"" ; then
5709   with_uuid=no
5710 fi
5711
5712
5713
5714 # Check whether --with-ossp-uuid was given.
5715 if test "${with_ossp_uuid+set}" = set; then :
5716   withval=$with_ossp_uuid;
5717   case $withval in
5718     yes)
5719       :
5720       ;;
5721     no)
5722       :
5723       ;;
5724     *)
5725       as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
5726       ;;
5727   esac
5728
5729 else
5730   with_ossp_uuid=no
5731
5732 fi
5733
5734
5735 if test "$with_ossp_uuid" = yes ; then
5736   with_uuid=ossp
5737 fi
5738
5739 if test "$with_uuid" = bsd ; then
5740
5741 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
5742
5743   UUID_EXTRA_OBJS="md5.o sha1.o"
5744 elif test "$with_uuid" = e2fs ; then
5745
5746 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
5747
5748   UUID_EXTRA_OBJS="md5.o sha1.o"
5749 elif test "$with_uuid" = ossp ; then
5750
5751 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
5752
5753   UUID_EXTRA_OBJS=""
5754 elif test "$with_uuid" = no ; then
5755   UUID_EXTRA_OBJS=""
5756 else
5757   as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
5758 fi
5759
5760
5761
5762
5763 #
5764 # XML
5765 #
5766
5767
5768
5769 # Check whether --with-libxml was given.
5770 if test "${with_libxml+set}" = set; then :
5771   withval=$with_libxml;
5772   case $withval in
5773     yes)
5774
5775 $as_echo "#define USE_LIBXML 1" >>confdefs.h
5776
5777       ;;
5778     no)
5779       :
5780       ;;
5781     *)
5782       as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
5783       ;;
5784   esac
5785
5786 else
5787   with_libxml=no
5788
5789 fi
5790
5791
5792
5793 if test "$with_libxml" = yes ; then
5794   for ac_prog in xml2-config
5795 do
5796   # Extract the first word of "$ac_prog", so it can be a program name with args.
5797 set dummy $ac_prog; ac_word=$2
5798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5799 $as_echo_n "checking for $ac_word... " >&6; }
5800 if ${ac_cv_prog_XML2_CONFIG+:} false; then :
5801   $as_echo_n "(cached) " >&6
5802 else
5803   if test -n "$XML2_CONFIG"; then
5804   ac_cv_prog_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test.
5805 else
5806 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5807 for as_dir in $PATH
5808 do
5809   IFS=$as_save_IFS
5810   test -z "$as_dir" && as_dir=.
5811     for ac_exec_ext in '' $ac_executable_extensions; do
5812   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5813     ac_cv_prog_XML2_CONFIG="$ac_prog"
5814     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5815     break 2
5816   fi
5817 done
5818   done
5819 IFS=$as_save_IFS
5820
5821 fi
5822 fi
5823 XML2_CONFIG=$ac_cv_prog_XML2_CONFIG
5824 if test -n "$XML2_CONFIG"; then
5825   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
5826 $as_echo "$XML2_CONFIG" >&6; }
5827 else
5828   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5829 $as_echo "no" >&6; }
5830 fi
5831
5832
5833   test -n "$XML2_CONFIG" && break
5834 done
5835
5836   if test -n "$XML2_CONFIG"; then
5837     for pgac_option in `$XML2_CONFIG --cflags`; do
5838       case $pgac_option in
5839         -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
5840       esac
5841     done
5842     for pgac_option in `$XML2_CONFIG --libs`; do
5843       case $pgac_option in
5844         -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5845       esac
5846     done
5847   fi
5848 fi
5849
5850
5851
5852 #
5853 # XSLT
5854 #
5855
5856
5857
5858 # Check whether --with-libxslt was given.
5859 if test "${with_libxslt+set}" = set; then :
5860   withval=$with_libxslt;
5861   case $withval in
5862     yes)
5863
5864 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
5865
5866       ;;
5867     no)
5868       :
5869       ;;
5870     *)
5871       as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
5872       ;;
5873   esac
5874
5875 else
5876   with_libxslt=no
5877
5878 fi
5879
5880
5881
5882
5883
5884
5885 #
5886 # tzdata
5887 #
5888
5889
5890
5891 # Check whether --with-system-tzdata was given.
5892 if test "${with_system_tzdata+set}" = set; then :
5893   withval=$with_system_tzdata;
5894   case $withval in
5895     yes)
5896       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
5897       ;;
5898     no)
5899       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
5900       ;;
5901     *)
5902
5903       ;;
5904   esac
5905
5906 fi
5907
5908
5909
5910
5911 #
5912 # Zlib
5913 #
5914
5915
5916
5917 # Check whether --with-zlib was given.
5918 if test "${with_zlib+set}" = set; then :
5919   withval=$with_zlib;
5920   case $withval in
5921     yes)
5922       :
5923       ;;
5924     no)
5925       :
5926       ;;
5927     *)
5928       as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
5929       ;;
5930   esac
5931
5932 else
5933   with_zlib=yes
5934
5935 fi
5936
5937
5938
5939
5940 #
5941 # Elf
5942 #
5943
5944 # Assume system is ELF if it predefines __ELF__ as 1,
5945 # otherwise believe host_os based default.
5946 case $host_os in
5947     freebsd1*|freebsd2*) elf=no;;
5948     freebsd3*|freebsd4*) elf=yes;;
5949 esac
5950
5951
5952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5953 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5954 if ${ac_cv_path_GREP+:} false; then :
5955   $as_echo_n "(cached) " >&6
5956 else
5957   if test -z "$GREP"; then
5958   ac_path_GREP_found=false
5959   # Loop through the user's path and test for each of PROGNAME-LIST
5960   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5961 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5962 do
5963   IFS=$as_save_IFS
5964   test -z "$as_dir" && as_dir=.
5965     for ac_prog in grep ggrep; do
5966     for ac_exec_ext in '' $ac_executable_extensions; do
5967       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5968       as_fn_executable_p "$ac_path_GREP" || continue
5969 # Check for GNU ac_path_GREP and select it if it is found.
5970   # Check for GNU $ac_path_GREP
5971 case `"$ac_path_GREP" --version 2>&1` in
5972 *GNU*)
5973   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5974 *)
5975   ac_count=0
5976   $as_echo_n 0123456789 >"conftest.in"
5977   while :
5978   do
5979     cat "conftest.in" "conftest.in" >"conftest.tmp"
5980     mv "conftest.tmp" "conftest.in"
5981     cp "conftest.in" "conftest.nl"
5982     $as_echo 'GREP' >> "conftest.nl"
5983     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5984     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5985     as_fn_arith $ac_count + 1 && ac_count=$as_val
5986     if test $ac_count -gt ${ac_path_GREP_max-0}; then
5987       # Best one so far, save it but keep looking for a better one
5988       ac_cv_path_GREP="$ac_path_GREP"
5989       ac_path_GREP_max=$ac_count
5990     fi
5991     # 10*(2^10) chars as input seems more than enough
5992     test $ac_count -gt 10 && break
5993   done
5994   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5995 esac
5996
5997       $ac_path_GREP_found && break 3
5998     done
5999   done
6000   done
6001 IFS=$as_save_IFS
6002   if test -z "$ac_cv_path_GREP"; then
6003     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6004   fi
6005 else
6006   ac_cv_path_GREP=$GREP
6007 fi
6008
6009 fi
6010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6011 $as_echo "$ac_cv_path_GREP" >&6; }
6012  GREP="$ac_cv_path_GREP"
6013
6014
6015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6016 $as_echo_n "checking for egrep... " >&6; }
6017 if ${ac_cv_path_EGREP+:} false; then :
6018   $as_echo_n "(cached) " >&6
6019 else
6020   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6021    then ac_cv_path_EGREP="$GREP -E"
6022    else
6023      if test -z "$EGREP"; then
6024   ac_path_EGREP_found=false
6025   # Loop through the user's path and test for each of PROGNAME-LIST
6026   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6027 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6028 do
6029   IFS=$as_save_IFS
6030   test -z "$as_dir" && as_dir=.
6031     for ac_prog in egrep; do
6032     for ac_exec_ext in '' $ac_executable_extensions; do
6033       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6034       as_fn_executable_p "$ac_path_EGREP" || continue
6035 # Check for GNU ac_path_EGREP and select it if it is found.
6036   # Check for GNU $ac_path_EGREP
6037 case `"$ac_path_EGREP" --version 2>&1` in
6038 *GNU*)
6039   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6040 *)
6041   ac_count=0
6042   $as_echo_n 0123456789 >"conftest.in"
6043   while :
6044   do
6045     cat "conftest.in" "conftest.in" >"conftest.tmp"
6046     mv "conftest.tmp" "conftest.in"
6047     cp "conftest.in" "conftest.nl"
6048     $as_echo 'EGREP' >> "conftest.nl"
6049     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6050     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6051     as_fn_arith $ac_count + 1 && ac_count=$as_val
6052     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6053       # Best one so far, save it but keep looking for a better one
6054       ac_cv_path_EGREP="$ac_path_EGREP"
6055       ac_path_EGREP_max=$ac_count
6056     fi
6057     # 10*(2^10) chars as input seems more than enough
6058     test $ac_count -gt 10 && break
6059   done
6060   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6061 esac
6062
6063       $ac_path_EGREP_found && break 3
6064     done
6065   done
6066   done
6067 IFS=$as_save_IFS
6068   if test -z "$ac_cv_path_EGREP"; then
6069     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6070   fi
6071 else
6072   ac_cv_path_EGREP=$EGREP
6073 fi
6074
6075    fi
6076 fi
6077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6078 $as_echo "$ac_cv_path_EGREP" >&6; }
6079  EGREP="$ac_cv_path_EGREP"
6080
6081
6082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6083 /* end confdefs.h.  */
6084 #if __ELF__
6085   yes
6086 #endif
6087
6088 _ACEOF
6089 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6090   $EGREP "yes" >/dev/null 2>&1; then :
6091   ELF_SYS=true
6092 else
6093   if test "X$elf" = "Xyes" ; then
6094   ELF_SYS=true
6095 else
6096   ELF_SYS=
6097 fi
6098 fi
6099 rm -f conftest*
6100
6101
6102
6103 #
6104 # Assignments
6105 #
6106
6107 CPPFLAGS="$CPPFLAGS $INCLUDES"
6108 LDFLAGS="$LDFLAGS $LIBDIRS"
6109
6110
6111
6112
6113
6114 # Check whether --with-gnu-ld was given.
6115 if test "${with_gnu_ld+set}" = set; then :
6116   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
6117 else
6118   with_gnu_ld=no
6119 fi
6120
6121 ac_prog=ld
6122 if test "$GCC" = yes; then
6123   # Check if gcc -print-prog-name=ld gives a path.
6124   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
6125 $as_echo_n "checking for ld used by GCC... " >&6; }
6126   case $host in
6127   *-*-mingw*)
6128     # gcc leaves a trailing carriage return which upsets mingw
6129     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6130   *)
6131     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6132   esac
6133   case "$ac_prog" in
6134     # Accept absolute paths.
6135     [\\/]* | [A-Za-z]:[\\/]*)
6136       re_direlt='/[^/][^/]*/\.\./'
6137       # Canonicalize the path of ld
6138       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
6139       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
6140         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
6141       done
6142       test -z "$LD" && LD="$ac_prog"
6143       ;;
6144   "")
6145     # If it fails, then pretend we aren't using GCC.
6146     ac_prog=ld
6147     ;;
6148   *)
6149     # If it is relative, then search for the first ld in PATH.
6150     with_gnu_ld=unknown
6151     ;;
6152   esac
6153 elif test "$with_gnu_ld" = yes; then
6154   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
6155 $as_echo_n "checking for GNU ld... " >&6; }
6156 else
6157   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
6158 $as_echo_n "checking for non-GNU ld... " >&6; }
6159 fi
6160 if ${ac_cv_path_LD+:} false; then :
6161   $as_echo_n "(cached) " >&6
6162 else
6163   if test -z "$LD"; then
6164   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
6165   for ac_dir in $PATH; do
6166     test -z "$ac_dir" && ac_dir=.
6167     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6168       ac_cv_path_LD="$ac_dir/$ac_prog"
6169       # Check to see if the program is GNU ld.  I'd rather use --version,
6170       # but apparently some GNU ld's only accept -v.
6171       # Break only if it was the GNU/non-GNU ld that we prefer.
6172       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
6173         test "$with_gnu_ld" != no && break
6174       else
6175         test "$with_gnu_ld" != yes && break
6176       fi
6177     fi
6178   done
6179   IFS="$ac_save_ifs"
6180 else
6181   ac_cv_path_LD="$LD" # Let the user override the test with a path.
6182 fi
6183 fi
6184
6185 LD="$ac_cv_path_LD"
6186 if test -n "$LD"; then
6187   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
6188 $as_echo "$LD" >&6; }
6189 else
6190   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6191 $as_echo "no" >&6; }
6192 fi
6193 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
6194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
6195 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
6196 if ${ac_cv_prog_gnu_ld+:} false; then :
6197   $as_echo_n "(cached) " >&6
6198 else
6199   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
6200 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
6201   ac_cv_prog_gnu_ld=yes
6202 else
6203   ac_cv_prog_gnu_ld=no
6204 fi
6205 fi
6206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
6207 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
6208 with_gnu_ld=$ac_cv_prog_gnu_ld
6209
6210
6211
6212
6213 case $host_os in sysv5*)
6214   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ld -R works" >&5
6215 $as_echo_n "checking whether ld -R works... " >&6; }
6216 if ${pgac_cv_prog_ld_R+:} false; then :
6217   $as_echo_n "(cached) " >&6
6218 else
6219
6220     pgac_save_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -Wl,-R/usr/lib"
6221     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6222 /* end confdefs.h.  */
6223
6224 int
6225 main ()
6226 {
6227
6228   ;
6229   return 0;
6230 }
6231 _ACEOF
6232 if ac_fn_c_try_link "$LINENO"; then :
6233   pgac_cv_prog_ld_R=yes
6234 else
6235   pgac_cv_prog_ld_R=no
6236 fi
6237 rm -f core conftest.err conftest.$ac_objext \
6238     conftest$ac_exeext conftest.$ac_ext
6239     LDFLAGS=$pgac_save_LDFLAGS
6240
6241 fi
6242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_ld_R" >&5
6243 $as_echo "$pgac_cv_prog_ld_R" >&6; }
6244   ld_R_works=$pgac_cv_prog_ld_R
6245
6246 esac
6247 if test -n "$ac_tool_prefix"; then
6248   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6249 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6251 $as_echo_n "checking for $ac_word... " >&6; }
6252 if ${ac_cv_prog_RANLIB+:} false; then :
6253   $as_echo_n "(cached) " >&6
6254 else
6255   if test -n "$RANLIB"; then
6256   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6257 else
6258 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6259 for as_dir in $PATH
6260 do
6261   IFS=$as_save_IFS
6262   test -z "$as_dir" && as_dir=.
6263     for ac_exec_ext in '' $ac_executable_extensions; do
6264   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6265     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6266     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6267     break 2
6268   fi
6269 done
6270   done
6271 IFS=$as_save_IFS
6272
6273 fi
6274 fi
6275 RANLIB=$ac_cv_prog_RANLIB
6276 if test -n "$RANLIB"; then
6277   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6278 $as_echo "$RANLIB" >&6; }
6279 else
6280   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6281 $as_echo "no" >&6; }
6282 fi
6283
6284
6285 fi
6286 if test -z "$ac_cv_prog_RANLIB"; then
6287   ac_ct_RANLIB=$RANLIB
6288   # Extract the first word of "ranlib", so it can be a program name with args.
6289 set dummy ranlib; ac_word=$2
6290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6291 $as_echo_n "checking for $ac_word... " >&6; }
6292 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6293   $as_echo_n "(cached) " >&6
6294 else
6295   if test -n "$ac_ct_RANLIB"; then
6296   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6297 else
6298 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6299 for as_dir in $PATH
6300 do
6301   IFS=$as_save_IFS
6302   test -z "$as_dir" && as_dir=.
6303     for ac_exec_ext in '' $ac_executable_extensions; do
6304   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6305     ac_cv_prog_ac_ct_RANLIB="ranlib"
6306     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6307     break 2
6308   fi
6309 done
6310   done
6311 IFS=$as_save_IFS
6312
6313 fi
6314 fi
6315 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6316 if test -n "$ac_ct_RANLIB"; then
6317   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6318 $as_echo "$ac_ct_RANLIB" >&6; }
6319 else
6320   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6321 $as_echo "no" >&6; }
6322 fi
6323
6324   if test "x$ac_ct_RANLIB" = x; then
6325     RANLIB=":"
6326   else
6327     case $cross_compiling:$ac_tool_warned in
6328 yes:)
6329 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6330 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6331 ac_tool_warned=yes ;;
6332 esac
6333     RANLIB=$ac_ct_RANLIB
6334   fi
6335 else
6336   RANLIB="$ac_cv_prog_RANLIB"
6337 fi
6338
6339
6340   if test -n "$ac_tool_prefix"; then
6341   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6342 set dummy ${ac_tool_prefix}strip; ac_word=$2
6343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6344 $as_echo_n "checking for $ac_word... " >&6; }
6345 if ${ac_cv_prog_STRIP+:} false; then :
6346   $as_echo_n "(cached) " >&6
6347 else
6348   if test -n "$STRIP"; then
6349   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6350 else
6351 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6352 for as_dir in $PATH
6353 do
6354   IFS=$as_save_IFS
6355   test -z "$as_dir" && as_dir=.
6356     for ac_exec_ext in '' $ac_executable_extensions; do
6357   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6358     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6359     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6360     break 2
6361   fi
6362 done
6363   done
6364 IFS=$as_save_IFS
6365
6366 fi
6367 fi
6368 STRIP=$ac_cv_prog_STRIP
6369 if test -n "$STRIP"; then
6370   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6371 $as_echo "$STRIP" >&6; }
6372 else
6373   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6374 $as_echo "no" >&6; }
6375 fi
6376
6377
6378 fi
6379 if test -z "$ac_cv_prog_STRIP"; then
6380   ac_ct_STRIP=$STRIP
6381   # Extract the first word of "strip", so it can be a program name with args.
6382 set dummy strip; ac_word=$2
6383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6384 $as_echo_n "checking for $ac_word... " >&6; }
6385 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
6386   $as_echo_n "(cached) " >&6
6387 else
6388   if test -n "$ac_ct_STRIP"; then
6389   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6390 else
6391 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6392 for as_dir in $PATH
6393 do
6394   IFS=$as_save_IFS
6395   test -z "$as_dir" && as_dir=.
6396     for ac_exec_ext in '' $ac_executable_extensions; do
6397   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6398     ac_cv_prog_ac_ct_STRIP="strip"
6399     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6400     break 2
6401   fi
6402 done
6403   done
6404 IFS=$as_save_IFS
6405
6406 fi
6407 fi
6408 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6409 if test -n "$ac_ct_STRIP"; then
6410   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6411 $as_echo "$ac_ct_STRIP" >&6; }
6412 else
6413   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6414 $as_echo "no" >&6; }
6415 fi
6416
6417   if test "x$ac_ct_STRIP" = x; then
6418     STRIP=":"
6419   else
6420     case $cross_compiling:$ac_tool_warned in
6421 yes:)
6422 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6423 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6424 ac_tool_warned=yes ;;
6425 esac
6426     STRIP=$ac_ct_STRIP
6427   fi
6428 else
6429   STRIP="$ac_cv_prog_STRIP"
6430 fi
6431
6432
6433   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
6434 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
6435   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
6436     STRIP_STATIC_LIB="$STRIP -x"
6437     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
6438     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6439 $as_echo "yes" >&6; }
6440   else
6441     case $host_os in
6442       darwin*)
6443         STRIP="$STRIP -x"
6444         STRIP_STATIC_LIB=$STRIP
6445         STRIP_SHARED_LIB=$STRIP
6446         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6447 $as_echo "yes" >&6; }
6448         ;;
6449       *)
6450         STRIP_STATIC_LIB=:
6451         STRIP_SHARED_LIB=:
6452         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6453 $as_echo "no" >&6; }
6454         ;;
6455     esac
6456   fi
6457
6458
6459
6460 if test -n "$ac_tool_prefix"; then
6461   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6462 set dummy ${ac_tool_prefix}ar; ac_word=$2
6463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6464 $as_echo_n "checking for $ac_word... " >&6; }
6465 if ${ac_cv_prog_AR+:} false; then :
6466   $as_echo_n "(cached) " >&6
6467 else
6468   if test -n "$AR"; then
6469   ac_cv_prog_AR="$AR" # Let the user override the test.
6470 else
6471 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6472 for as_dir in $PATH
6473 do
6474   IFS=$as_save_IFS
6475   test -z "$as_dir" && as_dir=.
6476     for ac_exec_ext in '' $ac_executable_extensions; do
6477   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6478     ac_cv_prog_AR="${ac_tool_prefix}ar"
6479     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6480     break 2
6481   fi
6482 done
6483   done
6484 IFS=$as_save_IFS
6485
6486 fi
6487 fi
6488 AR=$ac_cv_prog_AR
6489 if test -n "$AR"; then
6490   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6491 $as_echo "$AR" >&6; }
6492 else
6493   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6494 $as_echo "no" >&6; }
6495 fi
6496
6497
6498 fi
6499 if test -z "$ac_cv_prog_AR"; then
6500   ac_ct_AR=$AR
6501   # Extract the first word of "ar", so it can be a program name with args.
6502 set dummy ar; ac_word=$2
6503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6504 $as_echo_n "checking for $ac_word... " >&6; }
6505 if ${ac_cv_prog_ac_ct_AR+:} false; then :
6506   $as_echo_n "(cached) " >&6
6507 else
6508   if test -n "$ac_ct_AR"; then
6509   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6510 else
6511 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6512 for as_dir in $PATH
6513 do
6514   IFS=$as_save_IFS
6515   test -z "$as_dir" && as_dir=.
6516     for ac_exec_ext in '' $ac_executable_extensions; do
6517   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6518     ac_cv_prog_ac_ct_AR="ar"
6519     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6520     break 2
6521   fi
6522 done
6523   done
6524 IFS=$as_save_IFS
6525
6526 fi
6527 fi
6528 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6529 if test -n "$ac_ct_AR"; then
6530   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6531 $as_echo "$ac_ct_AR" >&6; }
6532 else
6533   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6534 $as_echo "no" >&6; }
6535 fi
6536
6537   if test "x$ac_ct_AR" = x; then
6538     AR="ar"
6539   else
6540     case $cross_compiling:$ac_tool_warned in
6541 yes:)
6542 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6543 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6544 ac_tool_warned=yes ;;
6545 esac
6546     AR=$ac_ct_AR
6547   fi
6548 else
6549   AR="$ac_cv_prog_AR"
6550 fi
6551
6552 if test "$PORTNAME" = "win32"; then
6553   if test -n "$ac_tool_prefix"; then
6554   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6555 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
6556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6557 $as_echo_n "checking for $ac_word... " >&6; }
6558 if ${ac_cv_prog_DLLTOOL+:} false; then :
6559   $as_echo_n "(cached) " >&6
6560 else
6561   if test -n "$DLLTOOL"; then
6562   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6563 else
6564 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6565 for as_dir in $PATH
6566 do
6567   IFS=$as_save_IFS
6568   test -z "$as_dir" && as_dir=.
6569     for ac_exec_ext in '' $ac_executable_extensions; do
6570   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6571     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
6572     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6573     break 2
6574   fi
6575 done
6576   done
6577 IFS=$as_save_IFS
6578
6579 fi
6580 fi
6581 DLLTOOL=$ac_cv_prog_DLLTOOL
6582 if test -n "$DLLTOOL"; then
6583   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
6584 $as_echo "$DLLTOOL" >&6; }
6585 else
6586   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6587 $as_echo "no" >&6; }
6588 fi
6589
6590
6591 fi
6592 if test -z "$ac_cv_prog_DLLTOOL"; then
6593   ac_ct_DLLTOOL=$DLLTOOL
6594   # Extract the first word of "dlltool", so it can be a program name with args.
6595 set dummy dlltool; ac_word=$2
6596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6597 $as_echo_n "checking for $ac_word... " >&6; }
6598 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
6599   $as_echo_n "(cached) " >&6
6600 else
6601   if test -n "$ac_ct_DLLTOOL"; then
6602   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6603 else
6604 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6605 for as_dir in $PATH
6606 do
6607   IFS=$as_save_IFS
6608   test -z "$as_dir" && as_dir=.
6609     for ac_exec_ext in '' $ac_executable_extensions; do
6610   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6611     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
6612     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6613     break 2
6614   fi
6615 done
6616   done
6617 IFS=$as_save_IFS
6618
6619 fi
6620 fi
6621 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6622 if test -n "$ac_ct_DLLTOOL"; then
6623   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
6624 $as_echo "$ac_ct_DLLTOOL" >&6; }
6625 else
6626   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6627 $as_echo "no" >&6; }
6628 fi
6629
6630   if test "x$ac_ct_DLLTOOL" = x; then
6631     DLLTOOL="dlltool"
6632   else
6633     case $cross_compiling:$ac_tool_warned in
6634 yes:)
6635 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6636 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6637 ac_tool_warned=yes ;;
6638 esac
6639     DLLTOOL=$ac_ct_DLLTOOL
6640   fi
6641 else
6642   DLLTOOL="$ac_cv_prog_DLLTOOL"
6643 fi
6644
6645   if test -n "$ac_tool_prefix"; then
6646   # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
6647 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
6648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6649 $as_echo_n "checking for $ac_word... " >&6; }
6650 if ${ac_cv_prog_DLLWRAP+:} false; then :
6651   $as_echo_n "(cached) " >&6
6652 else
6653   if test -n "$DLLWRAP"; then
6654   ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
6655 else
6656 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6657 for as_dir in $PATH
6658 do
6659   IFS=$as_save_IFS
6660   test -z "$as_dir" && as_dir=.
6661     for ac_exec_ext in '' $ac_executable_extensions; do
6662   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6663     ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
6664     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6665     break 2
6666   fi
6667 done
6668   done
6669 IFS=$as_save_IFS
6670
6671 fi
6672 fi
6673 DLLWRAP=$ac_cv_prog_DLLWRAP
6674 if test -n "$DLLWRAP"; then
6675   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5
6676 $as_echo "$DLLWRAP" >&6; }
6677 else
6678   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6679 $as_echo "no" >&6; }
6680 fi
6681
6682
6683 fi
6684 if test -z "$ac_cv_prog_DLLWRAP"; then
6685   ac_ct_DLLWRAP=$DLLWRAP
6686   # Extract the first word of "dllwrap", so it can be a program name with args.
6687 set dummy dllwrap; ac_word=$2
6688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6689 $as_echo_n "checking for $ac_word... " >&6; }
6690 if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then :
6691   $as_echo_n "(cached) " >&6
6692 else
6693   if test -n "$ac_ct_DLLWRAP"; then
6694   ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
6695 else
6696 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6697 for as_dir in $PATH
6698 do
6699   IFS=$as_save_IFS
6700   test -z "$as_dir" && as_dir=.
6701     for ac_exec_ext in '' $ac_executable_extensions; do
6702   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6703     ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
6704     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6705     break 2
6706   fi
6707 done
6708   done
6709 IFS=$as_save_IFS
6710
6711 fi
6712 fi
6713 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
6714 if test -n "$ac_ct_DLLWRAP"; then
6715   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5
6716 $as_echo "$ac_ct_DLLWRAP" >&6; }
6717 else
6718   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6719 $as_echo "no" >&6; }
6720 fi
6721
6722   if test "x$ac_ct_DLLWRAP" = x; then
6723     DLLWRAP="dllwrap"
6724   else
6725     case $cross_compiling:$ac_tool_warned in
6726 yes:)
6727 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6728 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6729 ac_tool_warned=yes ;;
6730 esac
6731     DLLWRAP=$ac_ct_DLLWRAP
6732   fi
6733 else
6734   DLLWRAP="$ac_cv_prog_DLLWRAP"
6735 fi
6736
6737   if test -n "$ac_tool_prefix"; then
6738   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6739 set dummy ${ac_tool_prefix}windres; ac_word=$2
6740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6741 $as_echo_n "checking for $ac_word... " >&6; }
6742 if ${ac_cv_prog_WINDRES+:} false; then :
6743   $as_echo_n "(cached) " >&6
6744 else
6745   if test -n "$WINDRES"; then
6746   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
6747 else
6748 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6749 for as_dir in $PATH
6750 do
6751   IFS=$as_save_IFS
6752   test -z "$as_dir" && as_dir=.
6753     for ac_exec_ext in '' $ac_executable_extensions; do
6754   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6755     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
6756     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6757     break 2
6758   fi
6759 done
6760   done
6761 IFS=$as_save_IFS
6762
6763 fi
6764 fi
6765 WINDRES=$ac_cv_prog_WINDRES
6766 if test -n "$WINDRES"; then
6767   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
6768 $as_echo "$WINDRES" >&6; }
6769 else
6770   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6771 $as_echo "no" >&6; }
6772 fi
6773
6774
6775 fi
6776 if test -z "$ac_cv_prog_WINDRES"; then
6777   ac_ct_WINDRES=$WINDRES
6778   # Extract the first word of "windres", so it can be a program name with args.
6779 set dummy windres; ac_word=$2
6780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6781 $as_echo_n "checking for $ac_word... " >&6; }
6782 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
6783   $as_echo_n "(cached) " >&6
6784 else
6785   if test -n "$ac_ct_WINDRES"; then
6786   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
6787 else
6788 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6789 for as_dir in $PATH
6790 do
6791   IFS=$as_save_IFS
6792   test -z "$as_dir" && as_dir=.
6793     for ac_exec_ext in '' $ac_executable_extensions; do
6794   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6795     ac_cv_prog_ac_ct_WINDRES="windres"
6796     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6797     break 2
6798   fi
6799 done
6800   done
6801 IFS=$as_save_IFS
6802
6803 fi
6804 fi
6805 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6806 if test -n "$ac_ct_WINDRES"; then
6807   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
6808 $as_echo "$ac_ct_WINDRES" >&6; }
6809 else
6810   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6811 $as_echo "no" >&6; }
6812 fi
6813
6814   if test "x$ac_ct_WINDRES" = x; then
6815     WINDRES="windres"
6816   else
6817     case $cross_compiling:$ac_tool_warned in
6818 yes:)
6819 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6820 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6821 ac_tool_warned=yes ;;
6822 esac
6823     WINDRES=$ac_ct_WINDRES
6824   fi
6825 else
6826   WINDRES="$ac_cv_prog_WINDRES"
6827 fi
6828
6829 fi
6830
6831 # Find a good install program.  We prefer a C program (faster),
6832 # so one script is as good as another.  But avoid the broken or
6833 # incompatible versions:
6834 # SysV /etc/install, /usr/sbin/install
6835 # SunOS /usr/etc/install
6836 # IRIX /sbin/install
6837 # AIX /bin/install
6838 # AmigaOS /C/install, which installs bootblocks on floppy discs
6839 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6840 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
6841 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6842 # OS/2's system install, which has a completely different semantic
6843 # ./install, which can be erroneously created by make from ./install.sh.
6844 # Reject install programs that cannot install multiple files.
6845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6846 $as_echo_n "checking for a BSD-compatible install... " >&6; }
6847 if test -z "$INSTALL"; then
6848 if ${ac_cv_path_install+:} false; then :
6849   $as_echo_n "(cached) " >&6
6850 else
6851   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6852 for as_dir in $PATH
6853 do
6854   IFS=$as_save_IFS
6855   test -z "$as_dir" && as_dir=.
6856     # Account for people who put trailing slashes in PATH elements.
6857 case $as_dir/ in #((
6858   ./ | .// | /[cC]/* | \
6859   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
6860   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
6861   /usr/ucb/* ) ;;
6862   *)
6863     # OSF1 and SCO ODT 3.0 have their own names for install.
6864     # Don't use installbsd from OSF since it installs stuff as root
6865     # by default.
6866     for ac_prog in ginstall scoinst install; do
6867       for ac_exec_ext in '' $ac_executable_extensions; do
6868         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
6869           if test $ac_prog = install &&
6870             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6871             # AIX install.  It has an incompatible calling convention.
6872             :
6873           elif test $ac_prog = install &&
6874             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6875             # program-specific install script used by HP pwplus--don't use.
6876             :
6877           else
6878             rm -rf conftest.one conftest.two conftest.dir
6879             echo one > conftest.one
6880             echo two > conftest.two
6881             mkdir conftest.dir
6882             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6883               test -s conftest.one && test -s conftest.two &&
6884               test -s conftest.dir/conftest.one &&
6885               test -s conftest.dir/conftest.two
6886             then
6887               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6888               break 3
6889             fi
6890           fi
6891         fi
6892       done
6893     done
6894     ;;
6895 esac
6896
6897   done
6898 IFS=$as_save_IFS
6899
6900 rm -rf conftest.one conftest.two conftest.dir
6901
6902 fi
6903   if test "${ac_cv_path_install+set}" = set; then
6904     INSTALL=$ac_cv_path_install
6905   else
6906     # As a last resort, use the slow shell script.  Don't cache a
6907     # value for INSTALL within a source directory, because that will
6908     # break other packages using the cache if that directory is
6909     # removed, or if the value is a relative name.
6910     INSTALL=$ac_install_sh
6911   fi
6912 fi
6913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6914 $as_echo "$INSTALL" >&6; }
6915
6916 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6917 # It thinks the first close brace ends the variable substitution.
6918 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6919
6920 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6921
6922 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6923
6924 # When Autoconf chooses install-sh as install program it tries to generate
6925 # a relative path to it in each makefile where it subsitutes it. This clashes
6926 # with our Makefile.global concept. This workaround helps.
6927 case $INSTALL in
6928   *install-sh*) install_bin='';;
6929   *) install_bin=$INSTALL;;
6930 esac
6931
6932
6933 # Extract the first word of "tar", so it can be a program name with args.
6934 set dummy tar; ac_word=$2
6935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6936 $as_echo_n "checking for $ac_word... " >&6; }
6937 if ${ac_cv_path_TAR+:} false; then :
6938   $as_echo_n "(cached) " >&6
6939 else
6940   case $TAR in
6941   [\\/]* | ?:[\\/]*)
6942   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
6943   ;;
6944   *)
6945   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6946 for as_dir in $PATH
6947 do
6948   IFS=$as_save_IFS
6949   test -z "$as_dir" && as_dir=.
6950     for ac_exec_ext in '' $ac_executable_extensions; do
6951   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6952     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
6953     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6954     break 2
6955   fi
6956 done
6957   done
6958 IFS=$as_save_IFS
6959
6960   ;;
6961 esac
6962 fi
6963 TAR=$ac_cv_path_TAR
6964 if test -n "$TAR"; then
6965   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
6966 $as_echo "$TAR" >&6; }
6967 else
6968   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6969 $as_echo "no" >&6; }
6970 fi
6971
6972
6973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
6974 $as_echo_n "checking whether ln -s works... " >&6; }
6975 LN_S=$as_ln_s
6976 if test "$LN_S" = "ln -s"; then
6977   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6978 $as_echo "yes" >&6; }
6979 else
6980   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
6981 $as_echo "no, using $LN_S" >&6; }
6982 fi
6983
6984 for ac_prog in gawk mawk nawk awk
6985 do
6986   # Extract the first word of "$ac_prog", so it can be a program name with args.
6987 set dummy $ac_prog; ac_word=$2
6988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6989 $as_echo_n "checking for $ac_word... " >&6; }
6990 if ${ac_cv_prog_AWK+:} false; then :
6991   $as_echo_n "(cached) " >&6
6992 else
6993   if test -n "$AWK"; then
6994   ac_cv_prog_AWK="$AWK" # Let the user override the test.
6995 else
6996 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6997 for as_dir in $PATH
6998 do
6999   IFS=$as_save_IFS
7000   test -z "$as_dir" && as_dir=.
7001     for ac_exec_ext in '' $ac_executable_extensions; do
7002   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7003     ac_cv_prog_AWK="$ac_prog"
7004     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7005     break 2
7006   fi
7007 done
7008   done
7009 IFS=$as_save_IFS
7010
7011 fi
7012 fi
7013 AWK=$ac_cv_prog_AWK
7014 if test -n "$AWK"; then
7015   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7016 $as_echo "$AWK" >&6; }
7017 else
7018   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7019 $as_echo "no" >&6; }
7020 fi
7021
7022
7023   test -n "$AWK" && break
7024 done
7025
7026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
7027 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
7028 if test -z "$MKDIR_P"; then
7029   if ${ac_cv_path_mkdir+:} false; then :
7030   $as_echo_n "(cached) " >&6
7031 else
7032   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7033 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
7034 do
7035   IFS=$as_save_IFS
7036   test -z "$as_dir" && as_dir=.
7037     for ac_prog in mkdir gmkdir; do
7038          for ac_exec_ext in '' $ac_executable_extensions; do
7039            as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
7040            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
7041              'mkdir (GNU coreutils) '* | \
7042              'mkdir (coreutils) '* | \
7043              'mkdir (fileutils) '4.1*)
7044                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
7045                break 3;;
7046            esac
7047          done
7048        done
7049   done
7050 IFS=$as_save_IFS
7051
7052 fi
7053
7054   test -d ./--version && rmdir ./--version
7055   if test "${ac_cv_path_mkdir+set}" = set; then
7056     MKDIR_P="$ac_cv_path_mkdir -p"
7057   else
7058     # As a last resort, use the slow shell script.  Don't cache a
7059     # value for MKDIR_P within a source directory, because that will
7060     # break other packages using the cache if that directory is
7061     # removed, or if the value is a relative name.
7062     MKDIR_P="$ac_install_sh -d"
7063   fi
7064 fi
7065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
7066 $as_echo "$MKDIR_P" >&6; }
7067
7068 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
7069 # a relative path to it in each makefile where it subsitutes it. This clashes
7070 # with our Makefile.global concept. This workaround helps.
7071 case $MKDIR_P in
7072   *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
7073 esac
7074
7075 # Let the user override the search
7076 if test -z "$BISON"; then
7077   for ac_prog in bison
7078 do
7079   # Extract the first word of "$ac_prog", so it can be a program name with args.
7080 set dummy $ac_prog; ac_word=$2
7081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7082 $as_echo_n "checking for $ac_word... " >&6; }
7083 if ${ac_cv_path_BISON+:} false; then :
7084   $as_echo_n "(cached) " >&6
7085 else
7086   case $BISON in
7087   [\\/]* | ?:[\\/]*)
7088   ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
7089   ;;
7090   *)
7091   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7092 for as_dir in $PATH
7093 do
7094   IFS=$as_save_IFS
7095   test -z "$as_dir" && as_dir=.
7096     for ac_exec_ext in '' $ac_executable_extensions; do
7097   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7098     ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
7099     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7100     break 2
7101   fi
7102 done
7103   done
7104 IFS=$as_save_IFS
7105
7106   ;;
7107 esac
7108 fi
7109 BISON=$ac_cv_path_BISON
7110 if test -n "$BISON"; then
7111   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
7112 $as_echo "$BISON" >&6; }
7113 else
7114   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7115 $as_echo "no" >&6; }
7116 fi
7117
7118
7119   test -n "$BISON" && break
7120 done
7121
7122 fi
7123
7124 if test "$BISON"; then
7125   pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
7126   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
7127 $as_echo "$as_me: using $pgac_bison_version" >&6;}
7128   if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
7129   then
7130     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7131 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
7132 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
7133 $as_echo "$as_me: WARNING:
7134 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
7135 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
7136     BISON=""
7137   fi
7138   # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
7139   # of the now preferred %name-prefix "base_yy", but the latter
7140   # doesn't work with Bison 2.3 or less.  So for now we silence the
7141   # deprecation warnings.
7142   if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
7143   then
7144     BISONFLAGS="$BISONFLAGS -Wno-deprecated"
7145   fi
7146 fi
7147
7148 if test -z "$BISON"; then
7149   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7150 *** Without Bison you will not be able to build PostgreSQL from Git nor
7151 *** change any of the parser definition files.  You can obtain Bison from
7152 *** a GNU mirror site.  (If you are using the official distribution of
7153 *** PostgreSQL then you do not need to worry about this, because the Bison
7154 *** output is pre-generated.)" >&5
7155 $as_echo "$as_me: WARNING:
7156 *** Without Bison you will not be able to build PostgreSQL from Git nor
7157 *** change any of the parser definition files.  You can obtain Bison from
7158 *** a GNU mirror site.  (If you are using the official distribution of
7159 *** PostgreSQL then you do not need to worry about this, because the Bison
7160 *** output is pre-generated.)" >&2;}
7161 fi
7162 # We don't need AC_SUBST(BISON) because AC_PATH_PROG did it
7163
7164
7165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
7166 $as_echo_n "checking for flex... " >&6; }
7167 if ${pgac_cv_path_flex+:} false; then :
7168   $as_echo_n "(cached) " >&6
7169 else
7170   # Let the user override the test
7171 if test -n "$FLEX"; then
7172   pgac_cv_path_flex=$FLEX
7173 else
7174   pgac_save_IFS=$IFS
7175   IFS=$PATH_SEPARATOR
7176   for pgac_dir in $PATH; do
7177     IFS=$pgac_save_IFS
7178     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
7179       pgac_dir=`pwd`
7180     fi
7181     for pgac_prog in flex lex; do
7182       pgac_candidate="$pgac_dir/$pgac_prog"
7183       if test -f "$pgac_candidate" \
7184         && $pgac_candidate --version </dev/null >/dev/null 2>&1
7185       then
7186         echo '%%'  > conftest.l
7187         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
7188           pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
7189           if echo "$pgac_flex_version" | sed 's/[.a-z]/ /g' | $AWK '{ if ($1 = 2 && $2 = 5 && $3 >= 31) exit 0; else exit 1;}'
7190           then
7191             pgac_cv_path_flex=$pgac_candidate
7192             break 2
7193           else
7194             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7195 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
7196 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
7197 $as_echo "$as_me: WARNING:
7198 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
7199 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
7200           fi
7201         fi
7202       fi
7203     done
7204   done
7205   rm -f conftest.l lex.yy.c
7206   : ${pgac_cv_path_flex=no}
7207 fi
7208
7209 fi
7210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
7211 $as_echo "$pgac_cv_path_flex" >&6; }
7212 if test x"$pgac_cv_path_flex" = x"no"; then
7213   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7214 *** Without Flex you will not be able to build PostgreSQL from Git nor
7215 *** change any of the scanner definition files.  You can obtain Flex from
7216 *** a GNU mirror site.  (If you are using the official distribution of
7217 *** PostgreSQL then you do not need to worry about this because the Flex
7218 *** output is pre-generated.)" >&5
7219 $as_echo "$as_me: WARNING:
7220 *** Without Flex you will not be able to build PostgreSQL from Git nor
7221 *** change any of the scanner definition files.  You can obtain Flex from
7222 *** a GNU mirror site.  (If you are using the official distribution of
7223 *** PostgreSQL then you do not need to worry about this because the Flex
7224 *** output is pre-generated.)" >&2;}
7225
7226   FLEX=
7227 else
7228   FLEX=$pgac_cv_path_flex
7229   pgac_flex_version=`$FLEX --version 2>/dev/null`
7230   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
7231 $as_echo "$as_me: using $pgac_flex_version" >&6;}
7232 fi
7233
7234
7235
7236
7237
7238 # Let the user override the search
7239 if test -z "$PERL"; then
7240   # Extract the first word of "perl", so it can be a program name with args.
7241 set dummy perl; ac_word=$2
7242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7243 $as_echo_n "checking for $ac_word... " >&6; }
7244 if ${ac_cv_path_PERL+:} false; then :
7245   $as_echo_n "(cached) " >&6
7246 else
7247   case $PERL in
7248   [\\/]* | ?:[\\/]*)
7249   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
7250   ;;
7251   *)
7252   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7253 for as_dir in $PATH
7254 do
7255   IFS=$as_save_IFS
7256   test -z "$as_dir" && as_dir=.
7257     for ac_exec_ext in '' $ac_executable_extensions; do
7258   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7259     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
7260     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7261     break 2
7262   fi
7263 done
7264   done
7265 IFS=$as_save_IFS
7266
7267   ;;
7268 esac
7269 fi
7270 PERL=$ac_cv_path_PERL
7271 if test -n "$PERL"; then
7272   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
7273 $as_echo "$PERL" >&6; }
7274 else
7275   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7276 $as_echo "no" >&6; }
7277 fi
7278
7279
7280 fi
7281
7282 if test "$PERL"; then
7283   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'`
7284   { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
7285 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
7286   if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
7287     $AWK '{ if ($1 = 5 && $2 >= 8) exit 1; else exit 0;}'
7288   then
7289     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7290 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7291 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
7292 $as_echo "$as_me: WARNING:
7293 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7294 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
7295     PERL=""
7296   fi
7297 fi
7298
7299 if test -z "$PERL"; then
7300   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7301 *** Without Perl you will not be able to build PostgreSQL from Git.
7302 *** You can obtain Perl from any CPAN mirror site.
7303 *** (If you are using the official distribution of PostgreSQL then you do not
7304 *** need to worry about this, because the Perl output is pre-generated.)" >&5
7305 $as_echo "$as_me: WARNING:
7306 *** Without Perl you will not be able to build PostgreSQL from Git.
7307 *** You can obtain Perl from any CPAN mirror site.
7308 *** (If you are using the official distribution of PostgreSQL then you do not
7309 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
7310 fi
7311
7312 if test "$with_perl" = yes; then
7313   if test -z "$PERL"; then
7314     as_fn_error $? "Perl not found" "$LINENO" 5
7315   fi
7316
7317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
7318 $as_echo_n "checking for Perl archlibexp... " >&6; }
7319 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
7320 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
7321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
7322 $as_echo "$perl_archlibexp" >&6; }
7323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
7324 $as_echo_n "checking for Perl privlibexp... " >&6; }
7325 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
7326 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
7327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
7328 $as_echo "$perl_privlibexp" >&6; }
7329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
7330 $as_echo_n "checking for Perl useshrplib... " >&6; }
7331 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
7332 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
7333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
7334 $as_echo "$perl_useshrplib" >&6; }
7335
7336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
7337 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
7338 if test "$PORTNAME" = "win32" ; then
7339 perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
7340 test -e "$perl_archlibexp/CORE/$perl_lib.lib" && perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
7341 else
7342 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
7343 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
7344 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
7345 fi
7346 if test -z "$perl_embed_ldflags" ; then
7347         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7348 $as_echo "no" >&6; }
7349         as_fn_error $? "could not determine flags for linking embedded Perl.
7350 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
7351 installed." "$LINENO" 5
7352 else
7353         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
7354 $as_echo "$perl_embed_ldflags" >&6; }
7355 fi
7356
7357 fi
7358
7359 if test "$with_python" = yes; then
7360   # Extract the first word of "python", so it can be a program name with args.
7361 set dummy python; ac_word=$2
7362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7363 $as_echo_n "checking for $ac_word... " >&6; }
7364 if ${ac_cv_path_PYTHON+:} false; then :
7365   $as_echo_n "(cached) " >&6
7366 else
7367   case $PYTHON in
7368   [\\/]* | ?:[\\/]*)
7369   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
7370   ;;
7371   *)
7372   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7373 for as_dir in $PATH
7374 do
7375   IFS=$as_save_IFS
7376   test -z "$as_dir" && as_dir=.
7377     for ac_exec_ext in '' $ac_executable_extensions; do
7378   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7379     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
7380     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7381     break 2
7382   fi
7383 done
7384   done
7385 IFS=$as_save_IFS
7386
7387   ;;
7388 esac
7389 fi
7390 PYTHON=$ac_cv_path_PYTHON
7391 if test -n "$PYTHON"; then
7392   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
7393 $as_echo "$PYTHON" >&6; }
7394 else
7395   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7396 $as_echo "no" >&6; }
7397 fi
7398
7399
7400 if test x"$PYTHON" = x""; then
7401   as_fn_error $? "Python not found" "$LINENO" 5
7402 fi
7403
7404
7405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python distutils module" >&5
7406 $as_echo_n "checking for Python distutils module... " >&6; }
7407 if "${PYTHON}" -c 'import distutils' 2>&5
7408 then
7409     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7410 $as_echo "yes" >&6; }
7411 else
7412     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7413 $as_echo "no" >&6; }
7414     as_fn_error $? "distutils module not found" "$LINENO" 5
7415 fi
7416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
7417 $as_echo_n "checking Python configuration directory... " >&6; }
7418 python_majorversion=`${PYTHON} -c "import sys; print(sys.version[0])"`
7419 python_version=`${PYTHON} -c "import sys; print(sys.version[:3])"`
7420 python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
7421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
7422 $as_echo "$python_configdir" >&6; }
7423
7424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directories" >&5
7425 $as_echo_n "checking Python include directories... " >&6; }
7426 python_includespec=`${PYTHON} -c "
7427 import distutils.sysconfig
7428 a = '-I' + distutils.sysconfig.get_python_inc(False)
7429 b = '-I' + distutils.sysconfig.get_python_inc(True)
7430 if a == b:
7431     print(a)
7432 else:
7433     print(a + ' ' + b)"`
7434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
7435 $as_echo "$python_includespec" >&6; }
7436
7437
7438
7439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
7440 $as_echo_n "checking how to link an embedded Python application... " >&6; }
7441
7442 python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
7443 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
7444 python_so=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('SO'))))"`
7445 ldlibrary=`echo "${python_ldlibrary}" | sed "s/${python_so}$//"`
7446 python_enable_shared=`${PYTHON} -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_vars().get('Py_ENABLE_SHARED',0))"`
7447
7448 if test x"${python_libdir}" != x"" -a x"${python_ldlibrary}" != x"" -a x"${python_ldlibrary}" != x"${ldlibrary}"
7449 then
7450         # New way: use the official shared library
7451         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
7452         python_libspec="-L${python_libdir} -l${ldlibrary}"
7453 else
7454         # Old way: use libpython from python_configdir
7455         python_libdir="${python_configdir}"
7456         # LDVERSION was introduced in Python 3.2.
7457         python_ldversion=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDVERSION'))))"`
7458         if test x"${python_ldversion}" = x""; then
7459                 python_ldversion=$python_version
7460         fi
7461         python_libspec="-L${python_libdir} -lpython${python_ldversion}"
7462 fi
7463
7464 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
7465
7466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
7467 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
7468
7469
7470 # threaded python is not supported on OpenBSD
7471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Python is compiled with thread support" >&5
7472 $as_echo_n "checking whether Python is compiled with thread support... " >&6; }
7473 pythreads=`${PYTHON} -c "import sys; print(int('thread' in sys.builtin_module_names))"`
7474 if test "$pythreads" = "1"; then
7475   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7476 $as_echo "yes" >&6; }
7477   case $host_os in
7478   openbsd*)
7479     as_fn_error $? "threaded Python not supported on this platform" "$LINENO" 5
7480     ;;
7481   esac
7482 else
7483   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7484 $as_echo "no" >&6; }
7485 fi
7486
7487
7488 fi
7489
7490 if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
7491   # Extract the first word of "zic", so it can be a program name with args.
7492 set dummy zic; ac_word=$2
7493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7494 $as_echo_n "checking for $ac_word... " >&6; }
7495 if ${ac_cv_path_ZIC+:} false; then :
7496   $as_echo_n "(cached) " >&6
7497 else
7498   case $ZIC in
7499   [\\/]* | ?:[\\/]*)
7500   ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
7501   ;;
7502   *)
7503   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7504 for as_dir in $PATH
7505 do
7506   IFS=$as_save_IFS
7507   test -z "$as_dir" && as_dir=.
7508     for ac_exec_ext in '' $ac_executable_extensions; do
7509   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7510     ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
7511     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7512     break 2
7513   fi
7514 done
7515   done
7516 IFS=$as_save_IFS
7517
7518   ;;
7519 esac
7520 fi
7521 ZIC=$ac_cv_path_ZIC
7522 if test -n "$ZIC"; then
7523   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
7524 $as_echo "$ZIC" >&6; }
7525 else
7526   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7527 $as_echo "no" >&6; }
7528 fi
7529
7530
7531   if test -z "$ZIC"; then
7532     as_fn_error $? "
7533 When cross-compiling, either use the option --with-system-tzdata to use
7534 existing time-zone data, or set the environment variable ZIC to a zic
7535 program to use during the build." "$LINENO" 5
7536   fi
7537 fi
7538
7539
7540 ##
7541 ## Libraries
7542 ##
7543 ## Most libraries are included only if they demonstrably provide a function
7544 ## we need, but libm is an exception: always include it, because there are
7545 ## too many compilers that play cute optimization games that will break
7546 ## probes for standard functions such as pow().
7547 ##
7548
7549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
7550 $as_echo_n "checking for main in -lm... " >&6; }
7551 if ${ac_cv_lib_m_main+:} false; then :
7552   $as_echo_n "(cached) " >&6
7553 else
7554   ac_check_lib_save_LIBS=$LIBS
7555 LIBS="-lm  $LIBS"
7556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7557 /* end confdefs.h.  */
7558
7559
7560 int
7561 main ()
7562 {
7563 return main ();
7564   ;
7565   return 0;
7566 }
7567 _ACEOF
7568 if ac_fn_c_try_link "$LINENO"; then :
7569   ac_cv_lib_m_main=yes
7570 else
7571   ac_cv_lib_m_main=no
7572 fi
7573 rm -f core conftest.err conftest.$ac_objext \
7574     conftest$ac_exeext conftest.$ac_ext
7575 LIBS=$ac_check_lib_save_LIBS
7576 fi
7577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
7578 $as_echo "$ac_cv_lib_m_main" >&6; }
7579 if test "x$ac_cv_lib_m_main" = xyes; then :
7580   cat >>confdefs.h <<_ACEOF
7581 #define HAVE_LIBM 1
7582 _ACEOF
7583
7584   LIBS="-lm $LIBS"
7585
7586 fi
7587
7588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
7589 $as_echo_n "checking for library containing setproctitle... " >&6; }
7590 if ${ac_cv_search_setproctitle+:} false; then :
7591   $as_echo_n "(cached) " >&6
7592 else
7593   ac_func_search_save_LIBS=$LIBS
7594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7595 /* end confdefs.h.  */
7596
7597 /* Override any GCC internal prototype to avoid an error.
7598    Use char because int might match the return type of a GCC
7599    builtin and then its argument prototype would still apply.  */
7600 #ifdef __cplusplus
7601 extern "C"
7602 #endif
7603 char setproctitle ();
7604 int
7605 main ()
7606 {
7607 return setproctitle ();
7608   ;
7609   return 0;
7610 }
7611 _ACEOF
7612 for ac_lib in '' util; do
7613   if test -z "$ac_lib"; then
7614     ac_res="none required"
7615   else
7616     ac_res=-l$ac_lib
7617     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7618   fi
7619   if ac_fn_c_try_link "$LINENO"; then :
7620   ac_cv_search_setproctitle=$ac_res
7621 fi
7622 rm -f core conftest.err conftest.$ac_objext \
7623     conftest$ac_exeext
7624   if ${ac_cv_search_setproctitle+:} false; then :
7625   break
7626 fi
7627 done
7628 if ${ac_cv_search_setproctitle+:} false; then :
7629
7630 else
7631   ac_cv_search_setproctitle=no
7632 fi
7633 rm conftest.$ac_ext
7634 LIBS=$ac_func_search_save_LIBS
7635 fi
7636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
7637 $as_echo "$ac_cv_search_setproctitle" >&6; }
7638 ac_res=$ac_cv_search_setproctitle
7639 if test "$ac_res" != no; then :
7640   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7641
7642 fi
7643
7644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
7645 $as_echo_n "checking for library containing dlopen... " >&6; }
7646 if ${ac_cv_search_dlopen+:} false; then :
7647   $as_echo_n "(cached) " >&6
7648 else
7649   ac_func_search_save_LIBS=$LIBS
7650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7651 /* end confdefs.h.  */
7652
7653 /* Override any GCC internal prototype to avoid an error.
7654    Use char because int might match the return type of a GCC
7655    builtin and then its argument prototype would still apply.  */
7656 #ifdef __cplusplus
7657 extern "C"
7658 #endif
7659 char dlopen ();
7660 int
7661 main ()
7662 {
7663 return dlopen ();
7664   ;
7665   return 0;
7666 }
7667 _ACEOF
7668 for ac_lib in '' dl; do
7669   if test -z "$ac_lib"; then
7670     ac_res="none required"
7671   else
7672     ac_res=-l$ac_lib
7673     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7674   fi
7675   if ac_fn_c_try_link "$LINENO"; then :
7676   ac_cv_search_dlopen=$ac_res
7677 fi
7678 rm -f core conftest.err conftest.$ac_objext \
7679     conftest$ac_exeext
7680   if ${ac_cv_search_dlopen+:} false; then :
7681   break
7682 fi
7683 done
7684 if ${ac_cv_search_dlopen+:} false; then :
7685
7686 else
7687   ac_cv_search_dlopen=no
7688 fi
7689 rm conftest.$ac_ext
7690 LIBS=$ac_func_search_save_LIBS
7691 fi
7692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
7693 $as_echo "$ac_cv_search_dlopen" >&6; }
7694 ac_res=$ac_cv_search_dlopen
7695 if test "$ac_res" != no; then :
7696   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7697
7698 fi
7699
7700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
7701 $as_echo_n "checking for library containing socket... " >&6; }
7702 if ${ac_cv_search_socket+:} false; then :
7703   $as_echo_n "(cached) " >&6
7704 else
7705   ac_func_search_save_LIBS=$LIBS
7706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7707 /* end confdefs.h.  */
7708
7709 /* Override any GCC internal prototype to avoid an error.
7710    Use char because int might match the return type of a GCC
7711    builtin and then its argument prototype would still apply.  */
7712 #ifdef __cplusplus
7713 extern "C"
7714 #endif
7715 char socket ();
7716 int
7717 main ()
7718 {
7719 return socket ();
7720   ;
7721   return 0;
7722 }
7723 _ACEOF
7724 for ac_lib in '' socket ws2_32; do
7725   if test -z "$ac_lib"; then
7726     ac_res="none required"
7727   else
7728     ac_res=-l$ac_lib
7729     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7730   fi
7731   if ac_fn_c_try_link "$LINENO"; then :
7732   ac_cv_search_socket=$ac_res
7733 fi
7734 rm -f core conftest.err conftest.$ac_objext \
7735     conftest$ac_exeext
7736   if ${ac_cv_search_socket+:} false; then :
7737   break
7738 fi
7739 done
7740 if ${ac_cv_search_socket+:} false; then :
7741
7742 else
7743   ac_cv_search_socket=no
7744 fi
7745 rm conftest.$ac_ext
7746 LIBS=$ac_func_search_save_LIBS
7747 fi
7748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
7749 $as_echo "$ac_cv_search_socket" >&6; }
7750 ac_res=$ac_cv_search_socket
7751 if test "$ac_res" != no; then :
7752   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7753
7754 fi
7755
7756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
7757 $as_echo_n "checking for library containing shl_load... " >&6; }
7758 if ${ac_cv_search_shl_load+:} false; then :
7759   $as_echo_n "(cached) " >&6
7760 else
7761   ac_func_search_save_LIBS=$LIBS
7762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7763 /* end confdefs.h.  */
7764
7765 /* Override any GCC internal prototype to avoid an error.
7766    Use char because int might match the return type of a GCC
7767    builtin and then its argument prototype would still apply.  */
7768 #ifdef __cplusplus
7769 extern "C"
7770 #endif
7771 char shl_load ();
7772 int
7773 main ()
7774 {
7775 return shl_load ();
7776   ;
7777   return 0;
7778 }
7779 _ACEOF
7780 for ac_lib in '' dld; do
7781   if test -z "$ac_lib"; then
7782     ac_res="none required"
7783   else
7784     ac_res=-l$ac_lib
7785     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7786   fi
7787   if ac_fn_c_try_link "$LINENO"; then :
7788   ac_cv_search_shl_load=$ac_res
7789 fi
7790 rm -f core conftest.err conftest.$ac_objext \
7791     conftest$ac_exeext
7792   if ${ac_cv_search_shl_load+:} false; then :
7793   break
7794 fi
7795 done
7796 if ${ac_cv_search_shl_load+:} false; then :
7797
7798 else
7799   ac_cv_search_shl_load=no
7800 fi
7801 rm conftest.$ac_ext
7802 LIBS=$ac_func_search_save_LIBS
7803 fi
7804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
7805 $as_echo "$ac_cv_search_shl_load" >&6; }
7806 ac_res=$ac_cv_search_shl_load
7807 if test "$ac_res" != no; then :
7808   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7809
7810 fi
7811
7812 # We only use libld in port/dynloader/aix.c
7813 case $host_os in
7814      aix*)
7815         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ldopen" >&5
7816 $as_echo_n "checking for library containing ldopen... " >&6; }
7817 if ${ac_cv_search_ldopen+:} false; then :
7818   $as_echo_n "(cached) " >&6
7819 else
7820   ac_func_search_save_LIBS=$LIBS
7821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7822 /* end confdefs.h.  */
7823
7824 /* Override any GCC internal prototype to avoid an error.
7825    Use char because int might match the return type of a GCC
7826    builtin and then its argument prototype would still apply.  */
7827 #ifdef __cplusplus
7828 extern "C"
7829 #endif
7830 char ldopen ();
7831 int
7832 main ()
7833 {
7834 return ldopen ();
7835   ;
7836   return 0;
7837 }
7838 _ACEOF
7839 for ac_lib in '' ld; do
7840   if test -z "$ac_lib"; then
7841     ac_res="none required"
7842   else
7843     ac_res=-l$ac_lib
7844     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7845   fi
7846   if ac_fn_c_try_link "$LINENO"; then :
7847   ac_cv_search_ldopen=$ac_res
7848 fi
7849 rm -f core conftest.err conftest.$ac_objext \
7850     conftest$ac_exeext
7851   if ${ac_cv_search_ldopen+:} false; then :
7852   break
7853 fi
7854 done
7855 if ${ac_cv_search_ldopen+:} false; then :
7856
7857 else
7858   ac_cv_search_ldopen=no
7859 fi
7860 rm conftest.$ac_ext
7861 LIBS=$ac_func_search_save_LIBS
7862 fi
7863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ldopen" >&5
7864 $as_echo "$ac_cv_search_ldopen" >&6; }
7865 ac_res=$ac_cv_search_ldopen
7866 if test "$ac_res" != no; then :
7867   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7868
7869 fi
7870
7871         ;;
7872 esac
7873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
7874 $as_echo_n "checking for library containing getopt_long... " >&6; }
7875 if ${ac_cv_search_getopt_long+:} false; then :
7876   $as_echo_n "(cached) " >&6
7877 else
7878   ac_func_search_save_LIBS=$LIBS
7879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7880 /* end confdefs.h.  */
7881
7882 /* Override any GCC internal prototype to avoid an error.
7883    Use char because int might match the return type of a GCC
7884    builtin and then its argument prototype would still apply.  */
7885 #ifdef __cplusplus
7886 extern "C"
7887 #endif
7888 char getopt_long ();
7889 int
7890 main ()
7891 {
7892 return getopt_long ();
7893   ;
7894   return 0;
7895 }
7896 _ACEOF
7897 for ac_lib in '' getopt gnugetopt; do
7898   if test -z "$ac_lib"; then
7899     ac_res="none required"
7900   else
7901     ac_res=-l$ac_lib
7902     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7903   fi
7904   if ac_fn_c_try_link "$LINENO"; then :
7905   ac_cv_search_getopt_long=$ac_res
7906 fi
7907 rm -f core conftest.err conftest.$ac_objext \
7908     conftest$ac_exeext
7909   if ${ac_cv_search_getopt_long+:} false; then :
7910   break
7911 fi
7912 done
7913 if ${ac_cv_search_getopt_long+:} false; then :
7914
7915 else
7916   ac_cv_search_getopt_long=no
7917 fi
7918 rm conftest.$ac_ext
7919 LIBS=$ac_func_search_save_LIBS
7920 fi
7921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
7922 $as_echo "$ac_cv_search_getopt_long" >&6; }
7923 ac_res=$ac_cv_search_getopt_long
7924 if test "$ac_res" != no; then :
7925   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7926
7927 fi
7928
7929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
7930 $as_echo_n "checking for library containing crypt... " >&6; }
7931 if ${ac_cv_search_crypt+:} false; then :
7932   $as_echo_n "(cached) " >&6
7933 else
7934   ac_func_search_save_LIBS=$LIBS
7935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7936 /* end confdefs.h.  */
7937
7938 /* Override any GCC internal prototype to avoid an error.
7939    Use char because int might match the return type of a GCC
7940    builtin and then its argument prototype would still apply.  */
7941 #ifdef __cplusplus
7942 extern "C"
7943 #endif
7944 char crypt ();
7945 int
7946 main ()
7947 {
7948 return crypt ();
7949   ;
7950   return 0;
7951 }
7952 _ACEOF
7953 for ac_lib in '' crypt; do
7954   if test -z "$ac_lib"; then
7955     ac_res="none required"
7956   else
7957     ac_res=-l$ac_lib
7958     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7959   fi
7960   if ac_fn_c_try_link "$LINENO"; then :
7961   ac_cv_search_crypt=$ac_res
7962 fi
7963 rm -f core conftest.err conftest.$ac_objext \
7964     conftest$ac_exeext
7965   if ${ac_cv_search_crypt+:} false; then :
7966   break
7967 fi
7968 done
7969 if ${ac_cv_search_crypt+:} false; then :
7970
7971 else
7972   ac_cv_search_crypt=no
7973 fi
7974 rm conftest.$ac_ext
7975 LIBS=$ac_func_search_save_LIBS
7976 fi
7977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
7978 $as_echo "$ac_cv_search_crypt" >&6; }
7979 ac_res=$ac_cv_search_crypt
7980 if test "$ac_res" != no; then :
7981   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7982
7983 fi
7984
7985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
7986 $as_echo_n "checking for library containing shm_open... " >&6; }
7987 if ${ac_cv_search_shm_open+:} false; then :
7988   $as_echo_n "(cached) " >&6
7989 else
7990   ac_func_search_save_LIBS=$LIBS
7991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7992 /* end confdefs.h.  */
7993
7994 /* Override any GCC internal prototype to avoid an error.
7995    Use char because int might match the return type of a GCC
7996    builtin and then its argument prototype would still apply.  */
7997 #ifdef __cplusplus
7998 extern "C"
7999 #endif
8000 char shm_open ();
8001 int
8002 main ()
8003 {
8004 return shm_open ();
8005   ;
8006   return 0;
8007 }
8008 _ACEOF
8009 for ac_lib in '' rt; do
8010   if test -z "$ac_lib"; then
8011     ac_res="none required"
8012   else
8013     ac_res=-l$ac_lib
8014     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8015   fi
8016   if ac_fn_c_try_link "$LINENO"; then :
8017   ac_cv_search_shm_open=$ac_res
8018 fi
8019 rm -f core conftest.err conftest.$ac_objext \
8020     conftest$ac_exeext
8021   if ${ac_cv_search_shm_open+:} false; then :
8022   break
8023 fi
8024 done
8025 if ${ac_cv_search_shm_open+:} false; then :
8026
8027 else
8028   ac_cv_search_shm_open=no
8029 fi
8030 rm conftest.$ac_ext
8031 LIBS=$ac_func_search_save_LIBS
8032 fi
8033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
8034 $as_echo "$ac_cv_search_shm_open" >&6; }
8035 ac_res=$ac_cv_search_shm_open
8036 if test "$ac_res" != no; then :
8037   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8038
8039 fi
8040
8041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
8042 $as_echo_n "checking for library containing shm_unlink... " >&6; }
8043 if ${ac_cv_search_shm_unlink+:} false; then :
8044   $as_echo_n "(cached) " >&6
8045 else
8046   ac_func_search_save_LIBS=$LIBS
8047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8048 /* end confdefs.h.  */
8049
8050 /* Override any GCC internal prototype to avoid an error.
8051    Use char because int might match the return type of a GCC
8052    builtin and then its argument prototype would still apply.  */
8053 #ifdef __cplusplus
8054 extern "C"
8055 #endif
8056 char shm_unlink ();
8057 int
8058 main ()
8059 {
8060 return shm_unlink ();
8061   ;
8062   return 0;
8063 }
8064 _ACEOF
8065 for ac_lib in '' rt; do
8066   if test -z "$ac_lib"; then
8067     ac_res="none required"
8068   else
8069     ac_res=-l$ac_lib
8070     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8071   fi
8072   if ac_fn_c_try_link "$LINENO"; then :
8073   ac_cv_search_shm_unlink=$ac_res
8074 fi
8075 rm -f core conftest.err conftest.$ac_objext \
8076     conftest$ac_exeext
8077   if ${ac_cv_search_shm_unlink+:} false; then :
8078   break
8079 fi
8080 done
8081 if ${ac_cv_search_shm_unlink+:} false; then :
8082
8083 else
8084   ac_cv_search_shm_unlink=no
8085 fi
8086 rm conftest.$ac_ext
8087 LIBS=$ac_func_search_save_LIBS
8088 fi
8089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
8090 $as_echo "$ac_cv_search_shm_unlink" >&6; }
8091 ac_res=$ac_cv_search_shm_unlink
8092 if test "$ac_res" != no; then :
8093   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8094
8095 fi
8096
8097 # Solaris:
8098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
8099 $as_echo_n "checking for library containing fdatasync... " >&6; }
8100 if ${ac_cv_search_fdatasync+:} false; then :
8101   $as_echo_n "(cached) " >&6
8102 else
8103   ac_func_search_save_LIBS=$LIBS
8104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8105 /* end confdefs.h.  */
8106
8107 /* Override any GCC internal prototype to avoid an error.
8108    Use char because int might match the return type of a GCC
8109    builtin and then its argument prototype would still apply.  */
8110 #ifdef __cplusplus
8111 extern "C"
8112 #endif
8113 char fdatasync ();
8114 int
8115 main ()
8116 {
8117 return fdatasync ();
8118   ;
8119   return 0;
8120 }
8121 _ACEOF
8122 for ac_lib in '' rt posix4; do
8123   if test -z "$ac_lib"; then
8124     ac_res="none required"
8125   else
8126     ac_res=-l$ac_lib
8127     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8128   fi
8129   if ac_fn_c_try_link "$LINENO"; then :
8130   ac_cv_search_fdatasync=$ac_res
8131 fi
8132 rm -f core conftest.err conftest.$ac_objext \
8133     conftest$ac_exeext
8134   if ${ac_cv_search_fdatasync+:} false; then :
8135   break
8136 fi
8137 done
8138 if ${ac_cv_search_fdatasync+:} false; then :
8139
8140 else
8141   ac_cv_search_fdatasync=no
8142 fi
8143 rm conftest.$ac_ext
8144 LIBS=$ac_func_search_save_LIBS
8145 fi
8146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
8147 $as_echo "$ac_cv_search_fdatasync" >&6; }
8148 ac_res=$ac_cv_search_fdatasync
8149 if test "$ac_res" != no; then :
8150   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8151
8152 fi
8153
8154 # Required for thread_test.c on Solaris 2.5:
8155 # Other ports use it too (HP-UX) so test unconditionally
8156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
8157 $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
8158 if ${ac_cv_search_gethostbyname_r+:} false; then :
8159   $as_echo_n "(cached) " >&6
8160 else
8161   ac_func_search_save_LIBS=$LIBS
8162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8163 /* end confdefs.h.  */
8164
8165 /* Override any GCC internal prototype to avoid an error.
8166    Use char because int might match the return type of a GCC
8167    builtin and then its argument prototype would still apply.  */
8168 #ifdef __cplusplus
8169 extern "C"
8170 #endif
8171 char gethostbyname_r ();
8172 int
8173 main ()
8174 {
8175 return gethostbyname_r ();
8176   ;
8177   return 0;
8178 }
8179 _ACEOF
8180 for ac_lib in '' nsl; do
8181   if test -z "$ac_lib"; then
8182     ac_res="none required"
8183   else
8184     ac_res=-l$ac_lib
8185     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8186   fi
8187   if ac_fn_c_try_link "$LINENO"; then :
8188   ac_cv_search_gethostbyname_r=$ac_res
8189 fi
8190 rm -f core conftest.err conftest.$ac_objext \
8191     conftest$ac_exeext
8192   if ${ac_cv_search_gethostbyname_r+:} false; then :
8193   break
8194 fi
8195 done
8196 if ${ac_cv_search_gethostbyname_r+:} false; then :
8197
8198 else
8199   ac_cv_search_gethostbyname_r=no
8200 fi
8201 rm conftest.$ac_ext
8202 LIBS=$ac_func_search_save_LIBS
8203 fi
8204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
8205 $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
8206 ac_res=$ac_cv_search_gethostbyname_r
8207 if test "$ac_res" != no; then :
8208   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8209
8210 fi
8211
8212 # Cygwin:
8213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
8214 $as_echo_n "checking for library containing shmget... " >&6; }
8215 if ${ac_cv_search_shmget+:} false; then :
8216   $as_echo_n "(cached) " >&6
8217 else
8218   ac_func_search_save_LIBS=$LIBS
8219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8220 /* end confdefs.h.  */
8221
8222 /* Override any GCC internal prototype to avoid an error.
8223    Use char because int might match the return type of a GCC
8224    builtin and then its argument prototype would still apply.  */
8225 #ifdef __cplusplus
8226 extern "C"
8227 #endif
8228 char shmget ();
8229 int
8230 main ()
8231 {
8232 return shmget ();
8233   ;
8234   return 0;
8235 }
8236 _ACEOF
8237 for ac_lib in '' cygipc; do
8238   if test -z "$ac_lib"; then
8239     ac_res="none required"
8240   else
8241     ac_res=-l$ac_lib
8242     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8243   fi
8244   if ac_fn_c_try_link "$LINENO"; then :
8245   ac_cv_search_shmget=$ac_res
8246 fi
8247 rm -f core conftest.err conftest.$ac_objext \
8248     conftest$ac_exeext
8249   if ${ac_cv_search_shmget+:} false; then :
8250   break
8251 fi
8252 done
8253 if ${ac_cv_search_shmget+:} false; then :
8254
8255 else
8256   ac_cv_search_shmget=no
8257 fi
8258 rm conftest.$ac_ext
8259 LIBS=$ac_func_search_save_LIBS
8260 fi
8261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
8262 $as_echo "$ac_cv_search_shmget" >&6; }
8263 ac_res=$ac_cv_search_shmget
8264 if test "$ac_res" != no; then :
8265   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8266
8267 fi
8268
8269
8270 if test "$with_readline" = yes; then
8271
8272
8273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
8274 $as_echo_n "checking for library containing readline... " >&6; }
8275 if ${pgac_cv_check_readline+:} false; then :
8276   $as_echo_n "(cached) " >&6
8277 else
8278   pgac_cv_check_readline=no
8279 pgac_save_LIBS=$LIBS
8280 if test x"$with_libedit_preferred" != x"yes"
8281 then    READLINE_ORDER="-lreadline -ledit"
8282 else    READLINE_ORDER="-ledit -lreadline"
8283 fi
8284 for pgac_rllib in $READLINE_ORDER ; do
8285   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
8286     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
8287     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8288 /* end confdefs.h.  */
8289
8290 /* Override any GCC internal prototype to avoid an error.
8291    Use char because int might match the return type of a GCC
8292    builtin and then its argument prototype would still apply.  */
8293 #ifdef __cplusplus
8294 extern "C"
8295 #endif
8296 char readline ();
8297 int
8298 main ()
8299 {
8300 return readline ();
8301   ;
8302   return 0;
8303 }
8304 _ACEOF
8305 if ac_fn_c_try_link "$LINENO"; then :
8306
8307       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
8308       # recognize dependent libraries; assume curses is needed if we didn't
8309       # find any dependency.
8310       case $host_os in
8311         netbsd* | openbsd* | irix*)
8312           if test x"$pgac_lib" = x"" ; then
8313             pgac_lib=" -lcurses"
8314           fi ;;
8315       esac
8316
8317       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
8318       break
8319
8320 fi
8321 rm -f core conftest.err conftest.$ac_objext \
8322     conftest$ac_exeext conftest.$ac_ext
8323   done
8324   if test "$pgac_cv_check_readline" != no ; then
8325     break
8326   fi
8327 done
8328 LIBS=$pgac_save_LIBS
8329
8330 fi
8331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
8332 $as_echo "$pgac_cv_check_readline" >&6; }
8333 if test "$pgac_cv_check_readline" != no ; then
8334   LIBS="$pgac_cv_check_readline $LIBS"
8335
8336 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
8337
8338 fi
8339
8340
8341   if test x"$pgac_cv_check_readline" = x"no"; then
8342     as_fn_error $? "readline library not found
8343 If you have readline already installed, see config.log for details on the
8344 failure.  It is possible the compiler isn't looking in the proper directory.
8345 Use --without-readline to disable readline support." "$LINENO" 5
8346   fi
8347 fi
8348
8349 if test "$with_zlib" = yes; then
8350   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
8351 $as_echo_n "checking for inflate in -lz... " >&6; }
8352 if ${ac_cv_lib_z_inflate+:} false; then :
8353   $as_echo_n "(cached) " >&6
8354 else
8355   ac_check_lib_save_LIBS=$LIBS
8356 LIBS="-lz  $LIBS"
8357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8358 /* end confdefs.h.  */
8359
8360 /* Override any GCC internal prototype to avoid an error.
8361    Use char because int might match the return type of a GCC
8362    builtin and then its argument prototype would still apply.  */
8363 #ifdef __cplusplus
8364 extern "C"
8365 #endif
8366 char inflate ();
8367 int
8368 main ()
8369 {
8370 return inflate ();
8371   ;
8372   return 0;
8373 }
8374 _ACEOF
8375 if ac_fn_c_try_link "$LINENO"; then :
8376   ac_cv_lib_z_inflate=yes
8377 else
8378   ac_cv_lib_z_inflate=no
8379 fi
8380 rm -f core conftest.err conftest.$ac_objext \
8381     conftest$ac_exeext conftest.$ac_ext
8382 LIBS=$ac_check_lib_save_LIBS
8383 fi
8384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
8385 $as_echo "$ac_cv_lib_z_inflate" >&6; }
8386 if test "x$ac_cv_lib_z_inflate" = xyes; then :
8387   cat >>confdefs.h <<_ACEOF
8388 #define HAVE_LIBZ 1
8389 _ACEOF
8390
8391   LIBS="-lz $LIBS"
8392
8393 else
8394   as_fn_error $? "zlib library not found
8395 If you have zlib already installed, see config.log for details on the
8396 failure.  It is possible the compiler isn't looking in the proper directory.
8397 Use --without-zlib to disable zlib support." "$LINENO" 5
8398 fi
8399
8400 fi
8401
8402 if test "$enable_spinlocks" = yes; then
8403
8404 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
8405
8406 else
8407   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
8408 *** Not using spinlocks will cause poor performance." >&5
8409 $as_echo "$as_me: WARNING:
8410 *** Not using spinlocks will cause poor performance." >&2;}
8411 fi
8412
8413 if test "$enable_atomics" = yes; then
8414
8415 $as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
8416
8417 else
8418   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
8419 *** Not using atomic operations will cause poor performance." >&5
8420 $as_echo "$as_me: WARNING:
8421 *** Not using atomic operations will cause poor performance." >&2;}
8422 fi
8423
8424 if test "$with_gssapi" = yes ; then
8425   if test "$PORTNAME" != "win32"; then
8426     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
8427 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
8428 if ${ac_cv_search_gss_init_sec_context+:} false; then :
8429   $as_echo_n "(cached) " >&6
8430 else
8431   ac_func_search_save_LIBS=$LIBS
8432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8433 /* end confdefs.h.  */
8434
8435 /* Override any GCC internal prototype to avoid an error.
8436    Use char because int might match the return type of a GCC
8437    builtin and then its argument prototype would still apply.  */
8438 #ifdef __cplusplus
8439 extern "C"
8440 #endif
8441 char gss_init_sec_context ();
8442 int
8443 main ()
8444 {
8445 return gss_init_sec_context ();
8446   ;
8447   return 0;
8448 }
8449 _ACEOF
8450 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
8451   if test -z "$ac_lib"; then
8452     ac_res="none required"
8453   else
8454     ac_res=-l$ac_lib
8455     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8456   fi
8457   if ac_fn_c_try_link "$LINENO"; then :
8458   ac_cv_search_gss_init_sec_context=$ac_res
8459 fi
8460 rm -f core conftest.err conftest.$ac_objext \
8461     conftest$ac_exeext
8462   if ${ac_cv_search_gss_init_sec_context+:} false; then :
8463   break
8464 fi
8465 done
8466 if ${ac_cv_search_gss_init_sec_context+:} false; then :
8467
8468 else
8469   ac_cv_search_gss_init_sec_context=no
8470 fi
8471 rm conftest.$ac_ext
8472 LIBS=$ac_func_search_save_LIBS
8473 fi
8474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
8475 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
8476 ac_res=$ac_cv_search_gss_init_sec_context
8477 if test "$ac_res" != no; then :
8478   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8479
8480 else
8481   as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
8482 fi
8483
8484   else
8485     LIBS="$LIBS -lgssapi32"
8486   fi
8487 fi
8488
8489 if test "$with_openssl" = yes ; then
8490     if test "$PORTNAME" != "win32"; then
8491      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
8492 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
8493 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
8494   $as_echo_n "(cached) " >&6
8495 else
8496   ac_check_lib_save_LIBS=$LIBS
8497 LIBS="-lcrypto  $LIBS"
8498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8499 /* end confdefs.h.  */
8500
8501 /* Override any GCC internal prototype to avoid an error.
8502    Use char because int might match the return type of a GCC
8503    builtin and then its argument prototype would still apply.  */
8504 #ifdef __cplusplus
8505 extern "C"
8506 #endif
8507 char CRYPTO_new_ex_data ();
8508 int
8509 main ()
8510 {
8511 return CRYPTO_new_ex_data ();
8512   ;
8513   return 0;
8514 }
8515 _ACEOF
8516 if ac_fn_c_try_link "$LINENO"; then :
8517   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
8518 else
8519   ac_cv_lib_crypto_CRYPTO_new_ex_data=no
8520 fi
8521 rm -f core conftest.err conftest.$ac_objext \
8522     conftest$ac_exeext conftest.$ac_ext
8523 LIBS=$ac_check_lib_save_LIBS
8524 fi
8525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
8526 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
8527 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
8528   cat >>confdefs.h <<_ACEOF
8529 #define HAVE_LIBCRYPTO 1
8530 _ACEOF
8531
8532   LIBS="-lcrypto $LIBS"
8533
8534 else
8535   as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
8536 fi
8537
8538      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5
8539 $as_echo_n "checking for SSL_library_init in -lssl... " >&6; }
8540 if ${ac_cv_lib_ssl_SSL_library_init+:} false; then :
8541   $as_echo_n "(cached) " >&6
8542 else
8543   ac_check_lib_save_LIBS=$LIBS
8544 LIBS="-lssl  $LIBS"
8545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8546 /* end confdefs.h.  */
8547
8548 /* Override any GCC internal prototype to avoid an error.
8549    Use char because int might match the return type of a GCC
8550    builtin and then its argument prototype would still apply.  */
8551 #ifdef __cplusplus
8552 extern "C"
8553 #endif
8554 char SSL_library_init ();
8555 int
8556 main ()
8557 {
8558 return SSL_library_init ();
8559   ;
8560   return 0;
8561 }
8562 _ACEOF
8563 if ac_fn_c_try_link "$LINENO"; then :
8564   ac_cv_lib_ssl_SSL_library_init=yes
8565 else
8566   ac_cv_lib_ssl_SSL_library_init=no
8567 fi
8568 rm -f core conftest.err conftest.$ac_objext \
8569     conftest$ac_exeext conftest.$ac_ext
8570 LIBS=$ac_check_lib_save_LIBS
8571 fi
8572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_library_init" >&5
8573 $as_echo "$ac_cv_lib_ssl_SSL_library_init" >&6; }
8574 if test "x$ac_cv_lib_ssl_SSL_library_init" = xyes; then :
8575   cat >>confdefs.h <<_ACEOF
8576 #define HAVE_LIBSSL 1
8577 _ACEOF
8578
8579   LIBS="-lssl $LIBS"
8580
8581 else
8582   as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
8583 fi
8584
8585   else
8586      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
8587 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
8588 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
8589   $as_echo_n "(cached) " >&6
8590 else
8591   ac_func_search_save_LIBS=$LIBS
8592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8593 /* end confdefs.h.  */
8594
8595 /* Override any GCC internal prototype to avoid an error.
8596    Use char because int might match the return type of a GCC
8597    builtin and then its argument prototype would still apply.  */
8598 #ifdef __cplusplus
8599 extern "C"
8600 #endif
8601 char CRYPTO_new_ex_data ();
8602 int
8603 main ()
8604 {
8605 return CRYPTO_new_ex_data ();
8606   ;
8607   return 0;
8608 }
8609 _ACEOF
8610 for ac_lib in '' eay32 crypto; do
8611   if test -z "$ac_lib"; then
8612     ac_res="none required"
8613   else
8614     ac_res=-l$ac_lib
8615     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8616   fi
8617   if ac_fn_c_try_link "$LINENO"; then :
8618   ac_cv_search_CRYPTO_new_ex_data=$ac_res
8619 fi
8620 rm -f core conftest.err conftest.$ac_objext \
8621     conftest$ac_exeext
8622   if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
8623   break
8624 fi
8625 done
8626 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
8627
8628 else
8629   ac_cv_search_CRYPTO_new_ex_data=no
8630 fi
8631 rm conftest.$ac_ext
8632 LIBS=$ac_func_search_save_LIBS
8633 fi
8634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
8635 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
8636 ac_res=$ac_cv_search_CRYPTO_new_ex_data
8637 if test "$ac_res" != no; then :
8638   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8639
8640 else
8641   as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
8642 fi
8643
8644      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_library_init" >&5
8645 $as_echo_n "checking for library containing SSL_library_init... " >&6; }
8646 if ${ac_cv_search_SSL_library_init+:} false; then :
8647   $as_echo_n "(cached) " >&6
8648 else
8649   ac_func_search_save_LIBS=$LIBS
8650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8651 /* end confdefs.h.  */
8652
8653 /* Override any GCC internal prototype to avoid an error.
8654    Use char because int might match the return type of a GCC
8655    builtin and then its argument prototype would still apply.  */
8656 #ifdef __cplusplus
8657 extern "C"
8658 #endif
8659 char SSL_library_init ();
8660 int
8661 main ()
8662 {
8663 return SSL_library_init ();
8664   ;
8665   return 0;
8666 }
8667 _ACEOF
8668 for ac_lib in '' ssleay32 ssl; do
8669   if test -z "$ac_lib"; then
8670     ac_res="none required"
8671   else
8672     ac_res=-l$ac_lib
8673     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8674   fi
8675   if ac_fn_c_try_link "$LINENO"; then :
8676   ac_cv_search_SSL_library_init=$ac_res
8677 fi
8678 rm -f core conftest.err conftest.$ac_objext \
8679     conftest$ac_exeext
8680   if ${ac_cv_search_SSL_library_init+:} false; then :
8681   break
8682 fi
8683 done
8684 if ${ac_cv_search_SSL_library_init+:} false; then :
8685
8686 else
8687   ac_cv_search_SSL_library_init=no
8688 fi
8689 rm conftest.$ac_ext
8690 LIBS=$ac_func_search_save_LIBS
8691 fi
8692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_library_init" >&5
8693 $as_echo "$ac_cv_search_SSL_library_init" >&6; }
8694 ac_res=$ac_cv_search_SSL_library_init
8695 if test "$ac_res" != no; then :
8696   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8697
8698 else
8699   as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
8700 fi
8701
8702   fi
8703   for ac_func in SSL_get_current_compression
8704 do :
8705   ac_fn_c_check_func "$LINENO" "SSL_get_current_compression" "ac_cv_func_SSL_get_current_compression"
8706 if test "x$ac_cv_func_SSL_get_current_compression" = xyes; then :
8707   cat >>confdefs.h <<_ACEOF
8708 #define HAVE_SSL_GET_CURRENT_COMPRESSION 1
8709 _ACEOF
8710
8711 fi
8712 done
8713
8714 fi
8715
8716 if test "$with_pam" = yes ; then
8717   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
8718 $as_echo_n "checking for pam_start in -lpam... " >&6; }
8719 if ${ac_cv_lib_pam_pam_start+:} false; then :
8720   $as_echo_n "(cached) " >&6
8721 else
8722   ac_check_lib_save_LIBS=$LIBS
8723 LIBS="-lpam  $LIBS"
8724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8725 /* end confdefs.h.  */
8726
8727 /* Override any GCC internal prototype to avoid an error.
8728    Use char because int might match the return type of a GCC
8729    builtin and then its argument prototype would still apply.  */
8730 #ifdef __cplusplus
8731 extern "C"
8732 #endif
8733 char pam_start ();
8734 int
8735 main ()
8736 {
8737 return pam_start ();
8738   ;
8739   return 0;
8740 }
8741 _ACEOF
8742 if ac_fn_c_try_link "$LINENO"; then :
8743   ac_cv_lib_pam_pam_start=yes
8744 else
8745   ac_cv_lib_pam_pam_start=no
8746 fi
8747 rm -f core conftest.err conftest.$ac_objext \
8748     conftest$ac_exeext conftest.$ac_ext
8749 LIBS=$ac_check_lib_save_LIBS
8750 fi
8751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
8752 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
8753 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
8754   cat >>confdefs.h <<_ACEOF
8755 #define HAVE_LIBPAM 1
8756 _ACEOF
8757
8758   LIBS="-lpam $LIBS"
8759
8760 else
8761   as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
8762 fi
8763
8764 fi
8765
8766 if test "$with_libxml" = yes ; then
8767   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
8768 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
8769 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
8770   $as_echo_n "(cached) " >&6
8771 else
8772   ac_check_lib_save_LIBS=$LIBS
8773 LIBS="-lxml2  $LIBS"
8774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8775 /* end confdefs.h.  */
8776
8777 /* Override any GCC internal prototype to avoid an error.
8778    Use char because int might match the return type of a GCC
8779    builtin and then its argument prototype would still apply.  */
8780 #ifdef __cplusplus
8781 extern "C"
8782 #endif
8783 char xmlSaveToBuffer ();
8784 int
8785 main ()
8786 {
8787 return xmlSaveToBuffer ();
8788   ;
8789   return 0;
8790 }
8791 _ACEOF
8792 if ac_fn_c_try_link "$LINENO"; then :
8793   ac_cv_lib_xml2_xmlSaveToBuffer=yes
8794 else
8795   ac_cv_lib_xml2_xmlSaveToBuffer=no
8796 fi
8797 rm -f core conftest.err conftest.$ac_objext \
8798     conftest$ac_exeext conftest.$ac_ext
8799 LIBS=$ac_check_lib_save_LIBS
8800 fi
8801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
8802 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
8803 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
8804   cat >>confdefs.h <<_ACEOF
8805 #define HAVE_LIBXML2 1
8806 _ACEOF
8807
8808   LIBS="-lxml2 $LIBS"
8809
8810 else
8811   as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
8812 fi
8813
8814 fi
8815
8816 if test "$with_libxslt" = yes ; then
8817   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
8818 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
8819 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
8820   $as_echo_n "(cached) " >&6
8821 else
8822   ac_check_lib_save_LIBS=$LIBS
8823 LIBS="-lxslt  $LIBS"
8824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8825 /* end confdefs.h.  */
8826
8827 /* Override any GCC internal prototype to avoid an error.
8828    Use char because int might match the return type of a GCC
8829    builtin and then its argument prototype would still apply.  */
8830 #ifdef __cplusplus
8831 extern "C"
8832 #endif
8833 char xsltCleanupGlobals ();
8834 int
8835 main ()
8836 {
8837 return xsltCleanupGlobals ();
8838   ;
8839   return 0;
8840 }
8841 _ACEOF
8842 if ac_fn_c_try_link "$LINENO"; then :
8843   ac_cv_lib_xslt_xsltCleanupGlobals=yes
8844 else
8845   ac_cv_lib_xslt_xsltCleanupGlobals=no
8846 fi
8847 rm -f core conftest.err conftest.$ac_objext \
8848     conftest$ac_exeext conftest.$ac_ext
8849 LIBS=$ac_check_lib_save_LIBS
8850 fi
8851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
8852 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
8853 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
8854   cat >>confdefs.h <<_ACEOF
8855 #define HAVE_LIBXSLT 1
8856 _ACEOF
8857
8858   LIBS="-lxslt $LIBS"
8859
8860 else
8861   as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
8862 fi
8863
8864 fi
8865
8866 # for contrib/sepgsql
8867 if test "$with_selinux" = yes; then
8868   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
8869 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
8870 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
8871   $as_echo_n "(cached) " >&6
8872 else
8873   ac_check_lib_save_LIBS=$LIBS
8874 LIBS="-lselinux  $LIBS"
8875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8876 /* end confdefs.h.  */
8877
8878 /* Override any GCC internal prototype to avoid an error.
8879    Use char because int might match the return type of a GCC
8880    builtin and then its argument prototype would still apply.  */
8881 #ifdef __cplusplus
8882 extern "C"
8883 #endif
8884 char security_compute_create_name ();
8885 int
8886 main ()
8887 {
8888 return security_compute_create_name ();
8889   ;
8890   return 0;
8891 }
8892 _ACEOF
8893 if ac_fn_c_try_link "$LINENO"; then :
8894   ac_cv_lib_selinux_security_compute_create_name=yes
8895 else
8896   ac_cv_lib_selinux_security_compute_create_name=no
8897 fi
8898 rm -f core conftest.err conftest.$ac_objext \
8899     conftest$ac_exeext conftest.$ac_ext
8900 LIBS=$ac_check_lib_save_LIBS
8901 fi
8902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
8903 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
8904 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
8905   cat >>confdefs.h <<_ACEOF
8906 #define HAVE_LIBSELINUX 1
8907 _ACEOF
8908
8909   LIBS="-lselinux $LIBS"
8910
8911 else
8912   as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
8913 fi
8914
8915 fi
8916
8917 # for contrib/uuid-ossp
8918 if test "$with_uuid" = bsd ; then
8919   # On BSD, the UUID functions are in libc
8920   ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
8921 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
8922   UUID_LIBS=""
8923 else
8924   as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
8925 fi
8926
8927 elif test "$with_uuid" = e2fs ; then
8928   # On OS X, the UUID functions are in libc
8929   ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
8930 if test "x$ac_cv_func_uuid_generate" = xyes; then :
8931   UUID_LIBS=""
8932 else
8933   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
8934 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
8935 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
8936   $as_echo_n "(cached) " >&6
8937 else
8938   ac_check_lib_save_LIBS=$LIBS
8939 LIBS="-luuid  $LIBS"
8940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8941 /* end confdefs.h.  */
8942
8943 /* Override any GCC internal prototype to avoid an error.
8944    Use char because int might match the return type of a GCC
8945    builtin and then its argument prototype would still apply.  */
8946 #ifdef __cplusplus
8947 extern "C"
8948 #endif
8949 char uuid_generate ();
8950 int
8951 main ()
8952 {
8953 return uuid_generate ();
8954   ;
8955   return 0;
8956 }
8957 _ACEOF
8958 if ac_fn_c_try_link "$LINENO"; then :
8959   ac_cv_lib_uuid_uuid_generate=yes
8960 else
8961   ac_cv_lib_uuid_uuid_generate=no
8962 fi
8963 rm -f core conftest.err conftest.$ac_objext \
8964     conftest$ac_exeext conftest.$ac_ext
8965 LIBS=$ac_check_lib_save_LIBS
8966 fi
8967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
8968 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
8969 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
8970   UUID_LIBS="-luuid"
8971 else
8972   as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
8973 fi
8974
8975 fi
8976
8977 elif test "$with_uuid" = ossp ; then
8978   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
8979 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
8980 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
8981   $as_echo_n "(cached) " >&6
8982 else
8983   ac_check_lib_save_LIBS=$LIBS
8984 LIBS="-lossp-uuid  $LIBS"
8985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8986 /* end confdefs.h.  */
8987
8988 /* Override any GCC internal prototype to avoid an error.
8989    Use char because int might match the return type of a GCC
8990    builtin and then its argument prototype would still apply.  */
8991 #ifdef __cplusplus
8992 extern "C"
8993 #endif
8994 char uuid_export ();
8995 int
8996 main ()
8997 {
8998 return uuid_export ();
8999   ;
9000   return 0;
9001 }
9002 _ACEOF
9003 if ac_fn_c_try_link "$LINENO"; then :
9004   ac_cv_lib_ossp_uuid_uuid_export=yes
9005 else
9006   ac_cv_lib_ossp_uuid_uuid_export=no
9007 fi
9008 rm -f core conftest.err conftest.$ac_objext \
9009     conftest$ac_exeext conftest.$ac_ext
9010 LIBS=$ac_check_lib_save_LIBS
9011 fi
9012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
9013 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
9014 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
9015   UUID_LIBS="-lossp-uuid"
9016 else
9017   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
9018 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
9019 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
9020   $as_echo_n "(cached) " >&6
9021 else
9022   ac_check_lib_save_LIBS=$LIBS
9023 LIBS="-luuid  $LIBS"
9024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9025 /* end confdefs.h.  */
9026
9027 /* Override any GCC internal prototype to avoid an error.
9028    Use char because int might match the return type of a GCC
9029    builtin and then its argument prototype would still apply.  */
9030 #ifdef __cplusplus
9031 extern "C"
9032 #endif
9033 char uuid_export ();
9034 int
9035 main ()
9036 {
9037 return uuid_export ();
9038   ;
9039   return 0;
9040 }
9041 _ACEOF
9042 if ac_fn_c_try_link "$LINENO"; then :
9043   ac_cv_lib_uuid_uuid_export=yes
9044 else
9045   ac_cv_lib_uuid_uuid_export=no
9046 fi
9047 rm -f core conftest.err conftest.$ac_objext \
9048     conftest$ac_exeext conftest.$ac_ext
9049 LIBS=$ac_check_lib_save_LIBS
9050 fi
9051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
9052 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
9053 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
9054   UUID_LIBS="-luuid"
9055 else
9056   as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
9057 fi
9058
9059 fi
9060
9061 fi
9062
9063
9064
9065 ##
9066 ## Header files
9067 ##
9068
9069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
9070 $as_echo_n "checking for ANSI C header files... " >&6; }
9071 if ${ac_cv_header_stdc+:} false; then :
9072   $as_echo_n "(cached) " >&6
9073 else
9074   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9075 /* end confdefs.h.  */
9076 #include <stdlib.h>
9077 #include <stdarg.h>
9078 #include <string.h>
9079 #include <float.h>
9080
9081 int
9082 main ()
9083 {
9084
9085   ;
9086   return 0;
9087 }
9088 _ACEOF
9089 if ac_fn_c_try_compile "$LINENO"; then :
9090   ac_cv_header_stdc=yes
9091 else
9092   ac_cv_header_stdc=no
9093 fi
9094 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9095
9096 if test $ac_cv_header_stdc = yes; then
9097   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9098   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9099 /* end confdefs.h.  */
9100 #include <string.h>
9101
9102 _ACEOF
9103 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9104   $EGREP "memchr" >/dev/null 2>&1; then :
9105
9106 else
9107   ac_cv_header_stdc=no
9108 fi
9109 rm -f conftest*
9110
9111 fi
9112
9113 if test $ac_cv_header_stdc = yes; then
9114   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9115   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9116 /* end confdefs.h.  */
9117 #include <stdlib.h>
9118
9119 _ACEOF
9120 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9121   $EGREP "free" >/dev/null 2>&1; then :
9122
9123 else
9124   ac_cv_header_stdc=no
9125 fi
9126 rm -f conftest*
9127
9128 fi
9129
9130 if test $ac_cv_header_stdc = yes; then
9131   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9132   if test "$cross_compiling" = yes; then :
9133   :
9134 else
9135   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9136 /* end confdefs.h.  */
9137 #include <ctype.h>
9138 #include <stdlib.h>
9139 #if ((' ' & 0x0FF) == 0x020)
9140 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9141 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9142 #else
9143 # define ISLOWER(c) \
9144                    (('a' <= (c) && (c) <= 'i') \
9145                      || ('j' <= (c) && (c) <= 'r') \
9146                      || ('s' <= (c) && (c) <= 'z'))
9147 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9148 #endif
9149
9150 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9151 int
9152 main ()
9153 {
9154   int i;
9155   for (i = 0; i < 256; i++)
9156     if (XOR (islower (i), ISLOWER (i))
9157         || toupper (i) != TOUPPER (i))
9158       return 2;
9159   return 0;
9160 }
9161 _ACEOF
9162 if ac_fn_c_try_run "$LINENO"; then :
9163
9164 else
9165   ac_cv_header_stdc=no
9166 fi
9167 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9168   conftest.$ac_objext conftest.beam conftest.$ac_ext
9169 fi
9170
9171 fi
9172 fi
9173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
9174 $as_echo "$ac_cv_header_stdc" >&6; }
9175 if test $ac_cv_header_stdc = yes; then
9176
9177 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
9178
9179 fi
9180
9181 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
9182 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
9183                   inttypes.h stdint.h unistd.h
9184 do :
9185   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9186 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
9187 "
9188 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9189   cat >>confdefs.h <<_ACEOF
9190 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9191 _ACEOF
9192
9193 fi
9194
9195 done
9196
9197
9198 for ac_header in atomic.h crypt.h dld.h fp_class.h getopt.h ieeefp.h ifaddrs.h langinfo.h mbarrier.h poll.h 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
9199 do :
9200   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9201 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9202 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9203   cat >>confdefs.h <<_ACEOF
9204 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9205 _ACEOF
9206
9207 fi
9208
9209 done
9210
9211
9212 # On BSD, test for net/if.h will fail unless sys/socket.h
9213 # is included first.
9214 for ac_header in net/if.h
9215 do :
9216   ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
9217 #ifdef HAVE_SYS_SOCKET_H
9218 #include <sys/socket.h>
9219 #endif
9220
9221 "
9222 if test "x$ac_cv_header_net_if_h" = xyes; then :
9223   cat >>confdefs.h <<_ACEOF
9224 #define HAVE_NET_IF_H 1
9225 _ACEOF
9226
9227 fi
9228
9229 done
9230
9231
9232 # On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
9233 # is included first.
9234 for ac_header in sys/ucred.h
9235 do :
9236   ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
9237 #include <sys/param.h>
9238
9239 "
9240 if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
9241   cat >>confdefs.h <<_ACEOF
9242 #define HAVE_SYS_UCRED_H 1
9243 _ACEOF
9244
9245 fi
9246
9247 done
9248
9249
9250 # At least on IRIX, test for netinet/tcp.h will fail unless
9251 # netinet/in.h is included first.
9252 for ac_header in netinet/in.h
9253 do :
9254   ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
9255 if test "x$ac_cv_header_netinet_in_h" = xyes; then :
9256   cat >>confdefs.h <<_ACEOF
9257 #define HAVE_NETINET_IN_H 1
9258 _ACEOF
9259
9260 fi
9261
9262 done
9263
9264 for ac_header in netinet/tcp.h
9265 do :
9266   ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
9267 #ifdef HAVE_NETINET_IN_H
9268 #include <netinet/in.h>
9269 #endif
9270
9271 "
9272 if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
9273   cat >>confdefs.h <<_ACEOF
9274 #define HAVE_NETINET_TCP_H 1
9275 _ACEOF
9276
9277 fi
9278
9279 done
9280
9281
9282 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
9283   for ac_header in readline/readline.h
9284 do :
9285   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
9286 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
9287   cat >>confdefs.h <<_ACEOF
9288 #define HAVE_READLINE_READLINE_H 1
9289 _ACEOF
9290
9291 else
9292   for ac_header in readline.h
9293 do :
9294   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
9295 if test "x$ac_cv_header_readline_h" = xyes; then :
9296   cat >>confdefs.h <<_ACEOF
9297 #define HAVE_READLINE_H 1
9298 _ACEOF
9299
9300 else
9301   as_fn_error $? "readline header not found
9302 If you have readline already installed, see config.log for details on the
9303 failure.  It is possible the compiler isn't looking in the proper directory.
9304 Use --without-readline to disable readline support." "$LINENO" 5
9305 fi
9306
9307 done
9308
9309 fi
9310
9311 done
9312
9313   for ac_header in readline/history.h
9314 do :
9315   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
9316 if test "x$ac_cv_header_readline_history_h" = xyes; then :
9317   cat >>confdefs.h <<_ACEOF
9318 #define HAVE_READLINE_HISTORY_H 1
9319 _ACEOF
9320
9321 else
9322   for ac_header in history.h
9323 do :
9324   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
9325 if test "x$ac_cv_header_history_h" = xyes; then :
9326   cat >>confdefs.h <<_ACEOF
9327 #define HAVE_HISTORY_H 1
9328 _ACEOF
9329
9330 else
9331   as_fn_error $? "history header not found
9332 If you have readline already installed, see config.log for details on the
9333 failure.  It is possible the compiler isn't looking in the proper directory.
9334 Use --without-readline to disable readline support." "$LINENO" 5
9335 fi
9336
9337 done
9338
9339 fi
9340
9341 done
9342
9343 fi
9344
9345 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
9346 # Some installations of libedit usurp /usr/include/readline/, which seems
9347 # bad practice, since in combined installations readline will have its headers
9348 # there.  We might have to resort to AC_EGREP checks to make sure we found
9349 # the proper header...
9350   for ac_header in editline/readline.h
9351 do :
9352   ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
9353 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
9354   cat >>confdefs.h <<_ACEOF
9355 #define HAVE_EDITLINE_READLINE_H 1
9356 _ACEOF
9357
9358 else
9359   for ac_header in readline.h
9360 do :
9361   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
9362 if test "x$ac_cv_header_readline_h" = xyes; then :
9363   cat >>confdefs.h <<_ACEOF
9364 #define HAVE_READLINE_H 1
9365 _ACEOF
9366
9367 else
9368   for ac_header in readline/readline.h
9369 do :
9370   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
9371 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
9372   cat >>confdefs.h <<_ACEOF
9373 #define HAVE_READLINE_READLINE_H 1
9374 _ACEOF
9375
9376 else
9377   as_fn_error $? "readline header not found
9378 If you have libedit already installed, see config.log for details on the
9379 failure.  It is possible the compiler isn't looking in the proper directory.
9380 Use --without-readline to disable libedit support." "$LINENO" 5
9381 fi
9382
9383 done
9384
9385 fi
9386
9387 done
9388
9389 fi
9390
9391 done
9392
9393 # Note: in a libedit installation, history.h is sometimes a dummy, and may
9394 # not be there at all.  Hence, don't complain if not found.  We must check
9395 # though, since in yet other versions it is an independent header.
9396   for ac_header in editline/history.h
9397 do :
9398   ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
9399 if test "x$ac_cv_header_editline_history_h" = xyes; then :
9400   cat >>confdefs.h <<_ACEOF
9401 #define HAVE_EDITLINE_HISTORY_H 1
9402 _ACEOF
9403
9404 else
9405   for ac_header in history.h
9406 do :
9407   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
9408 if test "x$ac_cv_header_history_h" = xyes; then :
9409   cat >>confdefs.h <<_ACEOF
9410 #define HAVE_HISTORY_H 1
9411 _ACEOF
9412
9413 else
9414   for ac_header in readline/history.h
9415 do :
9416   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
9417 if test "x$ac_cv_header_readline_history_h" = xyes; then :
9418   cat >>confdefs.h <<_ACEOF
9419 #define HAVE_READLINE_HISTORY_H 1
9420 _ACEOF
9421
9422 fi
9423
9424 done
9425
9426 fi
9427
9428 done
9429
9430 fi
9431
9432 done
9433
9434 fi
9435
9436 if test "$with_zlib" = yes; then
9437   ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
9438 if test "x$ac_cv_header_zlib_h" = xyes; then :
9439
9440 else
9441   as_fn_error $? "zlib header not found
9442 If you have zlib already installed, see config.log for details on the
9443 failure.  It is possible the compiler isn't looking in the proper directory.
9444 Use --without-zlib to disable zlib support." "$LINENO" 5
9445 fi
9446
9447
9448 fi
9449
9450 if test "$with_gssapi" = yes ; then
9451   for ac_header in gssapi/gssapi.h
9452 do :
9453   ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
9454 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
9455   cat >>confdefs.h <<_ACEOF
9456 #define HAVE_GSSAPI_GSSAPI_H 1
9457 _ACEOF
9458
9459 else
9460   for ac_header in gssapi.h
9461 do :
9462   ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
9463 if test "x$ac_cv_header_gssapi_h" = xyes; then :
9464   cat >>confdefs.h <<_ACEOF
9465 #define HAVE_GSSAPI_H 1
9466 _ACEOF
9467
9468 else
9469   as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
9470 fi
9471
9472 done
9473
9474 fi
9475
9476 done
9477
9478 fi
9479
9480 if test "$with_openssl" = yes ; then
9481   ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
9482 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
9483
9484 else
9485   as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
9486 fi
9487
9488
9489   ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
9490 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
9491
9492 else
9493   as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
9494 fi
9495
9496
9497 fi
9498
9499 if test "$with_pam" = yes ; then
9500   for ac_header in security/pam_appl.h
9501 do :
9502   ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
9503 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
9504   cat >>confdefs.h <<_ACEOF
9505 #define HAVE_SECURITY_PAM_APPL_H 1
9506 _ACEOF
9507
9508 else
9509   for ac_header in pam/pam_appl.h
9510 do :
9511   ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
9512 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
9513   cat >>confdefs.h <<_ACEOF
9514 #define HAVE_PAM_PAM_APPL_H 1
9515 _ACEOF
9516
9517 else
9518   as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
9519 fi
9520
9521 done
9522
9523 fi
9524
9525 done
9526
9527 fi
9528
9529 if test "$with_libxml" = yes ; then
9530   ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
9531 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
9532
9533 else
9534   as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
9535 fi
9536
9537
9538 fi
9539
9540 if test "$with_libxslt" = yes ; then
9541   ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
9542 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
9543
9544 else
9545   as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
9546 fi
9547
9548
9549 fi
9550
9551 if test "$with_ldap" = yes ; then
9552   if test "$PORTNAME" != "win32"; then
9553      for ac_header in ldap.h
9554 do :
9555   ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
9556 if test "x$ac_cv_header_ldap_h" = xyes; then :
9557   cat >>confdefs.h <<_ACEOF
9558 #define HAVE_LDAP_H 1
9559 _ACEOF
9560
9561 else
9562   as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
9563 fi
9564
9565 done
9566
9567      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
9568 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
9569 if ${pgac_cv_ldap_safe+:} false; then :
9570   $as_echo_n "(cached) " >&6
9571 else
9572   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9573 /* end confdefs.h.  */
9574 #include <ldap.h>
9575 #if !defined(LDAP_VENDOR_VERSION) || \
9576      (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
9577       LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
9578 choke me
9579 #endif
9580 int
9581 main ()
9582 {
9583
9584   ;
9585   return 0;
9586 }
9587 _ACEOF
9588 if ac_fn_c_try_compile "$LINENO"; then :
9589   pgac_cv_ldap_safe=yes
9590 else
9591   pgac_cv_ldap_safe=no
9592 fi
9593 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9594 fi
9595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
9596 $as_echo "$pgac_cv_ldap_safe" >&6; }
9597
9598 if test "$pgac_cv_ldap_safe" != yes; then
9599   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9600 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
9601 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
9602 *** also uses LDAP will crash on exit." >&5
9603 $as_echo "$as_me: WARNING:
9604 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
9605 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
9606 *** also uses LDAP will crash on exit." >&2;}
9607 fi
9608   else
9609      for ac_header in winldap.h
9610 do :
9611   ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
9612 #include <windows.h>
9613
9614 "
9615 if test "x$ac_cv_header_winldap_h" = xyes; then :
9616   cat >>confdefs.h <<_ACEOF
9617 #define HAVE_WINLDAP_H 1
9618 _ACEOF
9619
9620 else
9621   as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
9622 fi
9623
9624 done
9625
9626   fi
9627 fi
9628
9629 if test "$with_bonjour" = yes ; then
9630   ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
9631 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
9632
9633 else
9634   as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
9635 fi
9636
9637
9638 fi
9639
9640 # for contrib/uuid-ossp
9641 if test "$with_uuid" = bsd ; then
9642   for ac_header in uuid.h
9643 do :
9644   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
9645 if test "x$ac_cv_header_uuid_h" = xyes; then :
9646   cat >>confdefs.h <<_ACEOF
9647 #define HAVE_UUID_H 1
9648 _ACEOF
9649  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9650 /* end confdefs.h.  */
9651 #include <uuid.h>
9652
9653 _ACEOF
9654 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9655   $EGREP "uuid_to_string" >/dev/null 2>&1; then :
9656
9657 else
9658   as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
9659 fi
9660 rm -f conftest*
9661
9662 else
9663   as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
9664 fi
9665
9666 done
9667
9668 elif test "$with_uuid" = e2fs ; then
9669   for ac_header in uuid/uuid.h
9670 do :
9671   ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
9672 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
9673   cat >>confdefs.h <<_ACEOF
9674 #define HAVE_UUID_UUID_H 1
9675 _ACEOF
9676  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9677 /* end confdefs.h.  */
9678 #include <uuid/uuid.h>
9679
9680 _ACEOF
9681 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9682   $EGREP "uuid_generate" >/dev/null 2>&1; then :
9683
9684 else
9685   as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
9686 fi
9687 rm -f conftest*
9688
9689 else
9690   for ac_header in uuid.h
9691 do :
9692   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
9693 if test "x$ac_cv_header_uuid_h" = xyes; then :
9694   cat >>confdefs.h <<_ACEOF
9695 #define HAVE_UUID_H 1
9696 _ACEOF
9697  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9698 /* end confdefs.h.  */
9699 #include <uuid.h>
9700
9701 _ACEOF
9702 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9703   $EGREP "uuid_generate" >/dev/null 2>&1; then :
9704
9705 else
9706   as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
9707 fi
9708 rm -f conftest*
9709
9710 else
9711   as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
9712 fi
9713
9714 done
9715
9716 fi
9717
9718 done
9719
9720 elif test "$with_uuid" = ossp ; then
9721   for ac_header in ossp/uuid.h
9722 do :
9723   ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
9724 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
9725   cat >>confdefs.h <<_ACEOF
9726 #define HAVE_OSSP_UUID_H 1
9727 _ACEOF
9728  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9729 /* end confdefs.h.  */
9730 #include <ossp/uuid.h>
9731
9732 _ACEOF
9733 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9734   $EGREP "uuid_export" >/dev/null 2>&1; then :
9735
9736 else
9737   as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
9738 fi
9739 rm -f conftest*
9740
9741 else
9742   for ac_header in uuid.h
9743 do :
9744   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
9745 if test "x$ac_cv_header_uuid_h" = xyes; then :
9746   cat >>confdefs.h <<_ACEOF
9747 #define HAVE_UUID_H 1
9748 _ACEOF
9749  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9750 /* end confdefs.h.  */
9751 #include <uuid.h>
9752
9753 _ACEOF
9754 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9755   $EGREP "uuid_export" >/dev/null 2>&1; then :
9756
9757 else
9758   as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
9759 fi
9760 rm -f conftest*
9761
9762 else
9763   as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
9764 fi
9765
9766 done
9767
9768 fi
9769
9770 done
9771
9772 fi
9773
9774 if test "$PORTNAME" = "win32" ; then
9775    for ac_header in crtdefs.h
9776 do :
9777   ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
9778 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
9779   cat >>confdefs.h <<_ACEOF
9780 #define HAVE_CRTDEFS_H 1
9781 _ACEOF
9782
9783 fi
9784
9785 done
9786
9787 fi
9788
9789 ##
9790 ## Types, structures, compiler characteristics
9791 ##
9792
9793   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
9794 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
9795 if ${ac_cv_c_bigendian+:} false; then :
9796   $as_echo_n "(cached) " >&6
9797 else
9798   ac_cv_c_bigendian=unknown
9799     # See if we're dealing with a universal compiler.
9800     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9801 /* end confdefs.h.  */
9802 #ifndef __APPLE_CC__
9803                not a universal capable compiler
9804              #endif
9805              typedef int dummy;
9806
9807 _ACEOF
9808 if ac_fn_c_try_compile "$LINENO"; then :
9809
9810         # Check for potential -arch flags.  It is not universal unless
9811         # there are at least two -arch flags with different values.
9812         ac_arch=
9813         ac_prev=
9814         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
9815          if test -n "$ac_prev"; then
9816            case $ac_word in
9817              i?86 | x86_64 | ppc | ppc64)
9818                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
9819                  ac_arch=$ac_word
9820                else
9821                  ac_cv_c_bigendian=universal
9822                  break
9823                fi
9824                ;;
9825            esac
9826            ac_prev=
9827          elif test "x$ac_word" = "x-arch"; then
9828            ac_prev=arch
9829          fi
9830        done
9831 fi
9832 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9833     if test $ac_cv_c_bigendian = unknown; then
9834       # See if sys/param.h defines the BYTE_ORDER macro.
9835       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9836 /* end confdefs.h.  */
9837 #include <sys/types.h>
9838              #include <sys/param.h>
9839
9840 int
9841 main ()
9842 {
9843 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
9844                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
9845                      && LITTLE_ENDIAN)
9846               bogus endian macros
9847              #endif
9848
9849   ;
9850   return 0;
9851 }
9852 _ACEOF
9853 if ac_fn_c_try_compile "$LINENO"; then :
9854   # It does; now see whether it defined to BIG_ENDIAN or not.
9855          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9856 /* end confdefs.h.  */
9857 #include <sys/types.h>
9858                 #include <sys/param.h>
9859
9860 int
9861 main ()
9862 {
9863 #if BYTE_ORDER != BIG_ENDIAN
9864                  not big endian
9865                 #endif
9866
9867   ;
9868   return 0;
9869 }
9870 _ACEOF
9871 if ac_fn_c_try_compile "$LINENO"; then :
9872   ac_cv_c_bigendian=yes
9873 else
9874   ac_cv_c_bigendian=no
9875 fi
9876 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9877 fi
9878 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9879     fi
9880     if test $ac_cv_c_bigendian = unknown; then
9881       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
9882       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9883 /* end confdefs.h.  */
9884 #include <limits.h>
9885
9886 int
9887 main ()
9888 {
9889 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
9890               bogus endian macros
9891              #endif
9892
9893   ;
9894   return 0;
9895 }
9896 _ACEOF
9897 if ac_fn_c_try_compile "$LINENO"; then :
9898   # It does; now see whether it defined to _BIG_ENDIAN or not.
9899          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9900 /* end confdefs.h.  */
9901 #include <limits.h>
9902
9903 int
9904 main ()
9905 {
9906 #ifndef _BIG_ENDIAN
9907                  not big endian
9908                 #endif
9909
9910   ;
9911   return 0;
9912 }
9913 _ACEOF
9914 if ac_fn_c_try_compile "$LINENO"; then :
9915   ac_cv_c_bigendian=yes
9916 else
9917   ac_cv_c_bigendian=no
9918 fi
9919 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9920 fi
9921 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9922     fi
9923     if test $ac_cv_c_bigendian = unknown; then
9924       # Compile a test program.
9925       if test "$cross_compiling" = yes; then :
9926   # Try to guess by grepping values from an object file.
9927          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9928 /* end confdefs.h.  */
9929 short int ascii_mm[] =
9930                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
9931                 short int ascii_ii[] =
9932                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9933                 int use_ascii (int i) {
9934                   return ascii_mm[i] + ascii_ii[i];
9935                 }
9936                 short int ebcdic_ii[] =
9937                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
9938                 short int ebcdic_mm[] =
9939                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9940                 int use_ebcdic (int i) {
9941                   return ebcdic_mm[i] + ebcdic_ii[i];
9942                 }
9943                 extern int foo;
9944
9945 int
9946 main ()
9947 {
9948 return use_ascii (foo) == use_ebcdic (foo);
9949   ;
9950   return 0;
9951 }
9952 _ACEOF
9953 if ac_fn_c_try_compile "$LINENO"; then :
9954   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
9955               ac_cv_c_bigendian=yes
9956             fi
9957             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
9958               if test "$ac_cv_c_bigendian" = unknown; then
9959                 ac_cv_c_bigendian=no
9960               else
9961                 # finding both strings is unlikely to happen, but who knows?
9962                 ac_cv_c_bigendian=unknown
9963               fi
9964             fi
9965 fi
9966 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9967 else
9968   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9969 /* end confdefs.h.  */
9970 $ac_includes_default
9971 int
9972 main ()
9973 {
9974
9975              /* Are we little or big endian?  From Harbison&Steele.  */
9976              union
9977              {
9978                long int l;
9979                char c[sizeof (long int)];
9980              } u;
9981              u.l = 1;
9982              return u.c[sizeof (long int) - 1] == 1;
9983
9984   ;
9985   return 0;
9986 }
9987 _ACEOF
9988 if ac_fn_c_try_run "$LINENO"; then :
9989   ac_cv_c_bigendian=no
9990 else
9991   ac_cv_c_bigendian=yes
9992 fi
9993 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9994   conftest.$ac_objext conftest.beam conftest.$ac_ext
9995 fi
9996
9997     fi
9998 fi
9999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
10000 $as_echo "$ac_cv_c_bigendian" >&6; }
10001  case $ac_cv_c_bigendian in #(
10002    yes)
10003      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
10004 ;; #(
10005    no)
10006       ;; #(
10007    universal)
10008
10009 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
10010
10011      ;; #(
10012    *)
10013      as_fn_error $? "unknown endianness
10014  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
10015  esac
10016
10017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
10018 $as_echo_n "checking for inline... " >&6; }
10019 if ${ac_cv_c_inline+:} false; then :
10020   $as_echo_n "(cached) " >&6
10021 else
10022   ac_cv_c_inline=no
10023 for ac_kw in inline __inline__ __inline; do
10024   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10025 /* end confdefs.h.  */
10026 #ifndef __cplusplus
10027 typedef int foo_t;
10028 static $ac_kw foo_t static_foo () {return 0; }
10029 $ac_kw foo_t foo () {return 0; }
10030 #endif
10031
10032 _ACEOF
10033 if ac_fn_c_try_compile "$LINENO"; then :
10034   ac_cv_c_inline=$ac_kw
10035 fi
10036 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10037   test "$ac_cv_c_inline" != no && break
10038 done
10039
10040 fi
10041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
10042 $as_echo "$ac_cv_c_inline" >&6; }
10043
10044 case $ac_cv_c_inline in
10045   inline | yes) ;;
10046   *)
10047     case $ac_cv_c_inline in
10048       no) ac_val=;;
10049       *) ac_val=$ac_cv_c_inline;;
10050     esac
10051     cat >>confdefs.h <<_ACEOF
10052 #ifndef __cplusplus
10053 #define inline $ac_val
10054 #endif
10055 _ACEOF
10056     ;;
10057 esac
10058
10059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for quiet inline (no complaint if unreferenced)" >&5
10060 $as_echo_n "checking for quiet inline (no complaint if unreferenced)... " >&6; }
10061 if ${pgac_cv_c_inline_quietly+:} false; then :
10062   $as_echo_n "(cached) " >&6
10063 else
10064   pgac_cv_c_inline_quietly=no
10065   if test "$ac_cv_c_inline" != no; then
10066     pgac_c_inline_save_werror=$ac_c_werror_flag
10067     ac_c_werror_flag=yes
10068     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10069 /* end confdefs.h.  */
10070 #include "$srcdir/config/test_quiet_include.h"
10071 int
10072 main ()
10073 {
10074
10075   ;
10076   return 0;
10077 }
10078 _ACEOF
10079 if ac_fn_c_try_link "$LINENO"; then :
10080   pgac_cv_c_inline_quietly=yes
10081 fi
10082 rm -f core conftest.err conftest.$ac_objext \
10083     conftest$ac_exeext conftest.$ac_ext
10084     ac_c_werror_flag=$pgac_c_inline_save_werror
10085   fi
10086 fi
10087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_inline_quietly" >&5
10088 $as_echo "$pgac_cv_c_inline_quietly" >&6; }
10089 if test "$pgac_cv_c_inline_quietly" != no; then
10090
10091 cat >>confdefs.h <<_ACEOF
10092 #define PG_USE_INLINE 1
10093 _ACEOF
10094
10095 fi
10096
10097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
10098 $as_echo_n "checking for printf format archetype... " >&6; }
10099 if ${pgac_cv_printf_archetype+:} false; then :
10100   $as_echo_n "(cached) " >&6
10101 else
10102   ac_save_c_werror_flag=$ac_c_werror_flag
10103 ac_c_werror_flag=yes
10104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10105 /* end confdefs.h.  */
10106 extern int
10107 pgac_write(int ignore, const char *fmt,...)
10108 __attribute__((format(gnu_printf, 2, 3)));
10109 int
10110 main ()
10111 {
10112
10113   ;
10114   return 0;
10115 }
10116 _ACEOF
10117 if ac_fn_c_try_compile "$LINENO"; then :
10118   pgac_cv_printf_archetype=gnu_printf
10119 else
10120   pgac_cv_printf_archetype=printf
10121 fi
10122 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10123 ac_c_werror_flag=$ac_save_c_werror_flag
10124 fi
10125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
10126 $as_echo "$pgac_cv_printf_archetype" >&6; }
10127
10128 cat >>confdefs.h <<_ACEOF
10129 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
10130 _ACEOF
10131
10132
10133
10134   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array members" >&5
10135 $as_echo_n "checking for flexible array members... " >&6; }
10136 if ${ac_cv_c_flexmember+:} false; then :
10137   $as_echo_n "(cached) " >&6
10138 else
10139   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10140 /* end confdefs.h.  */
10141 #include <stdlib.h>
10142             #include <stdio.h>
10143             #include <stddef.h>
10144             struct s { int n; double d[]; };
10145 int
10146 main ()
10147 {
10148 int m = getchar ();
10149             struct s *p = malloc (offsetof (struct s, d)
10150                                   + m * sizeof (double));
10151             p->d[0] = 0.0;
10152             return p->d != (double *) NULL;
10153   ;
10154   return 0;
10155 }
10156 _ACEOF
10157 if ac_fn_c_try_compile "$LINENO"; then :
10158   ac_cv_c_flexmember=yes
10159 else
10160   ac_cv_c_flexmember=no
10161 fi
10162 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10163 fi
10164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
10165 $as_echo "$ac_cv_c_flexmember" >&6; }
10166   if test $ac_cv_c_flexmember = yes; then
10167
10168 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
10169
10170   else
10171     $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
10172
10173   fi
10174
10175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed types" >&5
10176 $as_echo_n "checking for signed types... " >&6; }
10177 if ${pgac_cv_c_signed+:} false; then :
10178   $as_echo_n "(cached) " >&6
10179 else
10180   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10181 /* end confdefs.h.  */
10182
10183 int
10184 main ()
10185 {
10186 signed char c; signed short s; signed int i;
10187   ;
10188   return 0;
10189 }
10190 _ACEOF
10191 if ac_fn_c_try_compile "$LINENO"; then :
10192   pgac_cv_c_signed=yes
10193 else
10194   pgac_cv_c_signed=no
10195 fi
10196 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10197 fi
10198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_signed" >&5
10199 $as_echo "$pgac_cv_c_signed" >&6; }
10200 if test x"$pgac_cv_c_signed" = xno ; then
10201
10202 $as_echo "#define signed /**/" >>confdefs.h
10203
10204 fi
10205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5
10206 $as_echo_n "checking for __func__... " >&6; }
10207 if ${pgac_cv_funcname_func_support+:} false; then :
10208   $as_echo_n "(cached) " >&6
10209 else
10210   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10211 /* end confdefs.h.  */
10212 #include <stdio.h>
10213 int
10214 main ()
10215 {
10216 printf("%s\n", __func__);
10217   ;
10218   return 0;
10219 }
10220 _ACEOF
10221 if ac_fn_c_try_compile "$LINENO"; then :
10222   pgac_cv_funcname_func_support=yes
10223 else
10224   pgac_cv_funcname_func_support=no
10225 fi
10226 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10227 fi
10228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_func_support" >&5
10229 $as_echo "$pgac_cv_funcname_func_support" >&6; }
10230 if test x"$pgac_cv_funcname_func_support" = xyes ; then
10231
10232 $as_echo "#define HAVE_FUNCNAME__FUNC 1" >>confdefs.h
10233
10234 else
10235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__" >&5
10236 $as_echo_n "checking for __FUNCTION__... " >&6; }
10237 if ${pgac_cv_funcname_function_support+:} false; then :
10238   $as_echo_n "(cached) " >&6
10239 else
10240   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10241 /* end confdefs.h.  */
10242 #include <stdio.h>
10243 int
10244 main ()
10245 {
10246 printf("%s\n", __FUNCTION__);
10247   ;
10248   return 0;
10249 }
10250 _ACEOF
10251 if ac_fn_c_try_compile "$LINENO"; then :
10252   pgac_cv_funcname_function_support=yes
10253 else
10254   pgac_cv_funcname_function_support=no
10255 fi
10256 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10257 fi
10258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_function_support" >&5
10259 $as_echo "$pgac_cv_funcname_function_support" >&6; }
10260 if test x"$pgac_cv_funcname_function_support" = xyes ; then
10261
10262 $as_echo "#define HAVE_FUNCNAME__FUNCTION 1" >>confdefs.h
10263
10264 fi
10265 fi
10266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
10267 $as_echo_n "checking for _Static_assert... " >&6; }
10268 if ${pgac_cv__static_assert+:} false; then :
10269   $as_echo_n "(cached) " >&6
10270 else
10271   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10272 /* end confdefs.h.  */
10273
10274 int
10275 main ()
10276 {
10277 ({ _Static_assert(1, "foo"); })
10278   ;
10279   return 0;
10280 }
10281 _ACEOF
10282 if ac_fn_c_try_link "$LINENO"; then :
10283   pgac_cv__static_assert=yes
10284 else
10285   pgac_cv__static_assert=no
10286 fi
10287 rm -f core conftest.err conftest.$ac_objext \
10288     conftest$ac_exeext conftest.$ac_ext
10289 fi
10290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
10291 $as_echo "$pgac_cv__static_assert" >&6; }
10292 if test x"$pgac_cv__static_assert" = xyes ; then
10293
10294 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
10295
10296 fi
10297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
10298 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
10299 if ${pgac_cv__types_compatible+:} false; then :
10300   $as_echo_n "(cached) " >&6
10301 else
10302   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10303 /* end confdefs.h.  */
10304
10305 int
10306 main ()
10307 {
10308  int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
10309   ;
10310   return 0;
10311 }
10312 _ACEOF
10313 if ac_fn_c_try_compile "$LINENO"; then :
10314   pgac_cv__types_compatible=yes
10315 else
10316   pgac_cv__types_compatible=no
10317 fi
10318 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10319 fi
10320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
10321 $as_echo "$pgac_cv__types_compatible" >&6; }
10322 if test x"$pgac_cv__types_compatible" = xyes ; then
10323
10324 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
10325
10326 fi
10327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
10328 $as_echo_n "checking for __builtin_constant_p... " >&6; }
10329 if ${pgac_cv__builtin_constant_p+:} false; then :
10330   $as_echo_n "(cached) " >&6
10331 else
10332   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10333 /* end confdefs.h.  */
10334 static int x; static int y[__builtin_constant_p(x) ? x : 1];
10335 int
10336 main ()
10337 {
10338
10339   ;
10340   return 0;
10341 }
10342 _ACEOF
10343 if ac_fn_c_try_compile "$LINENO"; then :
10344   pgac_cv__builtin_constant_p=yes
10345 else
10346   pgac_cv__builtin_constant_p=no
10347 fi
10348 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10349 fi
10350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
10351 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
10352 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
10353
10354 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
10355
10356 fi
10357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
10358 $as_echo_n "checking for __builtin_unreachable... " >&6; }
10359 if ${pgac_cv__builtin_unreachable+:} false; then :
10360   $as_echo_n "(cached) " >&6
10361 else
10362   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10363 /* end confdefs.h.  */
10364
10365 int
10366 main ()
10367 {
10368 __builtin_unreachable();
10369   ;
10370   return 0;
10371 }
10372 _ACEOF
10373 if ac_fn_c_try_link "$LINENO"; then :
10374   pgac_cv__builtin_unreachable=yes
10375 else
10376   pgac_cv__builtin_unreachable=no
10377 fi
10378 rm -f core conftest.err conftest.$ac_objext \
10379     conftest$ac_exeext conftest.$ac_ext
10380 fi
10381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
10382 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
10383 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
10384
10385 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
10386
10387 fi
10388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __VA_ARGS__" >&5
10389 $as_echo_n "checking for __VA_ARGS__... " >&6; }
10390 if ${pgac_cv__va_args+:} false; then :
10391   $as_echo_n "(cached) " >&6
10392 else
10393   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10394 /* end confdefs.h.  */
10395 #include <stdio.h>
10396 int
10397 main ()
10398 {
10399 #define debug(...) fprintf(stderr, __VA_ARGS__)
10400 debug("%s", "blarg");
10401
10402   ;
10403   return 0;
10404 }
10405 _ACEOF
10406 if ac_fn_c_try_compile "$LINENO"; then :
10407   pgac_cv__va_args=yes
10408 else
10409   pgac_cv__va_args=no
10410 fi
10411 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10412 fi
10413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__va_args" >&5
10414 $as_echo "$pgac_cv__va_args" >&6; }
10415 if test x"$pgac_cv__va_args" = xyes ; then
10416
10417 $as_echo "#define HAVE__VA_ARGS 1" >>confdefs.h
10418
10419 fi
10420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10421 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
10422 if ${ac_cv_struct_tm+:} false; then :
10423   $as_echo_n "(cached) " >&6
10424 else
10425   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10426 /* end confdefs.h.  */
10427 #include <sys/types.h>
10428 #include <time.h>
10429
10430 int
10431 main ()
10432 {
10433 struct tm tm;
10434                                      int *p = &tm.tm_sec;
10435                                      return !p;
10436   ;
10437   return 0;
10438 }
10439 _ACEOF
10440 if ac_fn_c_try_compile "$LINENO"; then :
10441   ac_cv_struct_tm=time.h
10442 else
10443   ac_cv_struct_tm=sys/time.h
10444 fi
10445 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10446 fi
10447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10448 $as_echo "$ac_cv_struct_tm" >&6; }
10449 if test $ac_cv_struct_tm = sys/time.h; then
10450
10451 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
10452
10453 fi
10454
10455 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
10456 #include <$ac_cv_struct_tm>
10457
10458 "
10459 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
10460
10461 cat >>confdefs.h <<_ACEOF
10462 #define HAVE_STRUCT_TM_TM_ZONE 1
10463 _ACEOF
10464
10465
10466 fi
10467
10468 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10469
10470 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
10471
10472 fi
10473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10474 $as_echo_n "checking for tzname... " >&6; }
10475 if ${ac_cv_var_tzname+:} false; then :
10476   $as_echo_n "(cached) " >&6
10477 else
10478   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10479 /* end confdefs.h.  */
10480 #include <time.h>
10481 #ifndef tzname /* For SGI.  */
10482 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
10483 #endif
10484
10485 int
10486 main ()
10487 {
10488 atoi(*tzname);
10489   ;
10490   return 0;
10491 }
10492 _ACEOF
10493 if ac_fn_c_try_link "$LINENO"; then :
10494   ac_cv_var_tzname=yes
10495 else
10496   ac_cv_var_tzname=no
10497 fi
10498 rm -f core conftest.err conftest.$ac_objext \
10499     conftest$ac_exeext conftest.$ac_ext
10500 fi
10501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10502 $as_echo "$ac_cv_var_tzname" >&6; }
10503 if test $ac_cv_var_tzname = yes; then
10504
10505 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
10506
10507 fi
10508
10509 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
10510 #include <sys/ipc.h>
10511 #include <sys/sem.h>
10512 "
10513 if test "x$ac_cv_type_union_semun" = xyes; then :
10514
10515 cat >>confdefs.h <<_ACEOF
10516 #define HAVE_UNION_SEMUN 1
10517 _ACEOF
10518
10519
10520 fi
10521
10522 ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
10523 #ifdef HAVE_SYS_UN_H
10524 #include <sys/un.h>
10525 #endif
10526
10527 "
10528 if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
10529
10530 $as_echo "#define HAVE_UNIX_SOCKETS 1" >>confdefs.h
10531
10532 fi
10533
10534 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
10535 #ifdef HAVE_SYS_SOCKET_H
10536 #include <sys/socket.h>
10537 #endif
10538
10539 "
10540 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
10541
10542 cat >>confdefs.h <<_ACEOF
10543 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
10544 _ACEOF
10545
10546
10547 fi
10548
10549 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
10550 #ifdef HAVE_SYS_SOCKET_H
10551 #include <sys/socket.h>
10552 #endif
10553
10554 "
10555 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
10556
10557 cat >>confdefs.h <<_ACEOF
10558 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
10559 _ACEOF
10560
10561
10562 fi
10563 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
10564 #ifdef HAVE_SYS_SOCKET_H
10565 #include <sys/socket.h>
10566 #endif
10567
10568 "
10569 if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
10570
10571 cat >>confdefs.h <<_ACEOF
10572 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
10573 _ACEOF
10574
10575
10576 fi
10577 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
10578 #ifdef HAVE_SYS_SOCKET_H
10579 #include <sys/socket.h>
10580 #endif
10581
10582 "
10583 if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
10584
10585 cat >>confdefs.h <<_ACEOF
10586 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
10587 _ACEOF
10588
10589
10590 fi
10591 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
10592 #ifdef HAVE_SYS_SOCKET_H
10593 #include <sys/socket.h>
10594 #endif
10595
10596 "
10597 if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
10598
10599 cat >>confdefs.h <<_ACEOF
10600 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
10601 _ACEOF
10602
10603
10604 fi
10605 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
10606 #ifdef HAVE_SYS_SOCKET_H
10607 #include <sys/socket.h>
10608 #endif
10609
10610 "
10611 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
10612
10613 cat >>confdefs.h <<_ACEOF
10614 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
10615 _ACEOF
10616
10617
10618 fi
10619
10620 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include <sys/types.h>
10621 #include <sys/socket.h>
10622 #include <netdb.h>
10623
10624 "
10625 if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
10626
10627 cat >>confdefs.h <<_ACEOF
10628 #define HAVE_STRUCT_ADDRINFO 1
10629 _ACEOF
10630
10631
10632 fi
10633
10634
10635   ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
10636 if test "x$ac_cv_type_intptr_t" = xyes; then :
10637
10638 $as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
10639
10640 else
10641   for ac_type in 'int' 'long int' 'long long int'; do
10642        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10643 /* end confdefs.h.  */
10644 $ac_includes_default
10645 int
10646 main ()
10647 {
10648 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
10649 test_array [0] = 0;
10650 return test_array [0];
10651
10652   ;
10653   return 0;
10654 }
10655 _ACEOF
10656 if ac_fn_c_try_compile "$LINENO"; then :
10657
10658 cat >>confdefs.h <<_ACEOF
10659 #define intptr_t $ac_type
10660 _ACEOF
10661
10662           ac_type=
10663 fi
10664 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10665        test -z "$ac_type" && break
10666      done
10667 fi
10668
10669
10670
10671   ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
10672 if test "x$ac_cv_type_uintptr_t" = xyes; then :
10673
10674 $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
10675
10676 else
10677   for ac_type in 'unsigned int' 'unsigned long int' \
10678         'unsigned long long int'; do
10679        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10680 /* end confdefs.h.  */
10681 $ac_includes_default
10682 int
10683 main ()
10684 {
10685 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
10686 test_array [0] = 0;
10687 return test_array [0];
10688
10689   ;
10690   return 0;
10691 }
10692 _ACEOF
10693 if ac_fn_c_try_compile "$LINENO"; then :
10694
10695 cat >>confdefs.h <<_ACEOF
10696 #define uintptr_t $ac_type
10697 _ACEOF
10698
10699           ac_type=
10700 fi
10701 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10702        test -z "$ac_type" && break
10703      done
10704 fi
10705
10706
10707
10708   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
10709 $as_echo_n "checking for unsigned long long int... " >&6; }
10710 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
10711   $as_echo_n "(cached) " >&6
10712 else
10713   ac_cv_type_unsigned_long_long_int=yes
10714      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
10715        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10716 /* end confdefs.h.  */
10717
10718   /* For now, do not test the preprocessor; as of 2007 there are too many
10719          implementations with broken preprocessors.  Perhaps this can
10720          be revisited in 2012.  In the meantime, code should not expect
10721          #if to work with literals wider than 32 bits.  */
10722       /* Test literals.  */
10723       long long int ll = 9223372036854775807ll;
10724       long long int nll = -9223372036854775807LL;
10725       unsigned long long int ull = 18446744073709551615ULL;
10726       /* Test constant expressions.   */
10727       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
10728                      ? 1 : -1)];
10729       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
10730                      ? 1 : -1)];
10731       int i = 63;
10732 int
10733 main ()
10734 {
10735 /* Test availability of runtime routines for shift and division.  */
10736       long long int llmax = 9223372036854775807ll;
10737       unsigned long long int ullmax = 18446744073709551615ull;
10738       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
10739               | (llmax / ll) | (llmax % ll)
10740               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
10741               | (ullmax / ull) | (ullmax % ull));
10742   ;
10743   return 0;
10744 }
10745
10746 _ACEOF
10747 if ac_fn_c_try_link "$LINENO"; then :
10748
10749 else
10750   ac_cv_type_unsigned_long_long_int=no
10751 fi
10752 rm -f core conftest.err conftest.$ac_objext \
10753     conftest$ac_exeext conftest.$ac_ext
10754      fi
10755 fi
10756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
10757 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
10758   if test $ac_cv_type_unsigned_long_long_int = yes; then
10759
10760 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
10761
10762   fi
10763
10764
10765
10766   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
10767 $as_echo_n "checking for long long int... " >&6; }
10768 if ${ac_cv_type_long_long_int+:} false; then :
10769   $as_echo_n "(cached) " >&6
10770 else
10771   ac_cv_type_long_long_int=yes
10772       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
10773         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
10774         if test $ac_cv_type_long_long_int = yes; then
10775                                   if test "$cross_compiling" = yes; then :
10776   :
10777 else
10778   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10779 /* end confdefs.h.  */
10780 #include <limits.h>
10781                  #ifndef LLONG_MAX
10782                  # define HALF \
10783                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
10784                  # define LLONG_MAX (HALF - 1 + HALF)
10785                  #endif
10786 int
10787 main ()
10788 {
10789 long long int n = 1;
10790                  int i;
10791                  for (i = 0; ; i++)
10792                    {
10793                      long long int m = n << i;
10794                      if (m >> i != n)
10795                        return 1;
10796                      if (LLONG_MAX / 2 < m)
10797                        break;
10798                    }
10799                  return 0;
10800   ;
10801   return 0;
10802 }
10803 _ACEOF
10804 if ac_fn_c_try_run "$LINENO"; then :
10805
10806 else
10807   ac_cv_type_long_long_int=no
10808 fi
10809 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10810   conftest.$ac_objext conftest.beam conftest.$ac_ext
10811 fi
10812
10813         fi
10814       fi
10815 fi
10816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
10817 $as_echo "$ac_cv_type_long_long_int" >&6; }
10818   if test $ac_cv_type_long_long_int = yes; then
10819
10820 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
10821
10822   fi
10823
10824
10825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
10826 $as_echo_n "checking for locale_t... " >&6; }
10827 if ${pgac_cv_type_locale_t+:} false; then :
10828   $as_echo_n "(cached) " >&6
10829 else
10830   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10831 /* end confdefs.h.  */
10832 #include <locale.h>
10833 locale_t x;
10834 int
10835 main ()
10836 {
10837
10838   ;
10839   return 0;
10840 }
10841 _ACEOF
10842 if ac_fn_c_try_compile "$LINENO"; then :
10843   pgac_cv_type_locale_t=yes
10844 else
10845   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10846 /* end confdefs.h.  */
10847 #include <xlocale.h>
10848 locale_t x;
10849 int
10850 main ()
10851 {
10852
10853   ;
10854   return 0;
10855 }
10856 _ACEOF
10857 if ac_fn_c_try_compile "$LINENO"; then :
10858   pgac_cv_type_locale_t='yes (in xlocale.h)'
10859 else
10860   pgac_cv_type_locale_t=no
10861 fi
10862 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10863 fi
10864 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10865 fi
10866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
10867 $as_echo "$pgac_cv_type_locale_t" >&6; }
10868 if test "$pgac_cv_type_locale_t" != no; then
10869
10870 $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
10871
10872 fi
10873 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
10874
10875 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
10876
10877 fi
10878
10879 ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
10880 #include <sys/param.h>
10881 #ifdef HAVE_SYS_UCRED_H
10882 #include <sys/ucred.h>
10883 #endif
10884 "
10885 if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
10886
10887 cat >>confdefs.h <<_ACEOF
10888 #define HAVE_STRUCT_CMSGCRED 1
10889 _ACEOF
10890
10891
10892 fi
10893
10894
10895 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
10896 #include <getopt.h>
10897 #endif
10898 "
10899 if test "x$ac_cv_type_struct_option" = xyes; then :
10900
10901 cat >>confdefs.h <<_ACEOF
10902 #define HAVE_STRUCT_OPTION 1
10903 _ACEOF
10904
10905
10906 fi
10907
10908
10909 if test "$with_zlib" = yes; then
10910   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
10911   # did not).  While we could work around the lack of z_streamp, it
10912   # seems unwise to encourage people to use such old zlib versions...
10913   ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
10914 "
10915 if test "x$ac_cv_type_z_streamp" = xyes; then :
10916
10917 else
10918   as_fn_error $? "zlib version is too old
10919 Use --without-zlib to disable zlib support." "$LINENO" 5
10920 fi
10921
10922 fi
10923
10924 # On PPC, check if assembler supports LWARX instruction's mutex hint bit
10925 case $host_cpu in
10926   ppc*|powerpc*)
10927     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports lwarx hint bit" >&5
10928 $as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
10929     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10930 /* end confdefs.h.  */
10931
10932 int
10933 main ()
10934 {
10935 int a = 0; int *p = &a; int r;
10936          __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
10937   ;
10938   return 0;
10939 }
10940 _ACEOF
10941 if ac_fn_c_try_compile "$LINENO"; then :
10942   pgac_cv_have_ppc_mutex_hint=yes
10943 else
10944   pgac_cv_have_ppc_mutex_hint=no
10945 fi
10946 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10947     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_ppc_mutex_hint" >&5
10948 $as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
10949     if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
10950
10951 $as_echo "#define HAVE_PPC_LWARX_MUTEX_HINT 1" >>confdefs.h
10952
10953     fi
10954   ;;
10955 esac
10956
10957 # Check largefile support.  You might think this is a system service not a
10958 # compiler characteristic, but you'd be wrong.  We must check this before
10959 # probing existence of related functions such as fseeko, since the largefile
10960 # defines can affect what is generated for that.
10961 if test "$PORTNAME" != "win32"; then
10962    # Check whether --enable-largefile was given.
10963 if test "${enable_largefile+set}" = set; then :
10964   enableval=$enable_largefile;
10965 fi
10966
10967 if test "$enable_largefile" != no; then
10968
10969   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
10970 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
10971 if ${ac_cv_sys_largefile_CC+:} false; then :
10972   $as_echo_n "(cached) " >&6
10973 else
10974   ac_cv_sys_largefile_CC=no
10975      if test "$GCC" != yes; then
10976        ac_save_CC=$CC
10977        while :; do
10978          # IRIX 6.2 and later do not support large files by default,
10979          # so use the C compiler's -n32 option if that helps.
10980          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10981 /* end confdefs.h.  */
10982 #include <sys/types.h>
10983  /* Check that off_t can represent 2**63 - 1 correctly.
10984     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10985     since some C++ compilers masquerading as C compilers
10986     incorrectly reject 9223372036854775807.  */
10987 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10988   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10989                        && LARGE_OFF_T % 2147483647 == 1)
10990                       ? 1 : -1];
10991 int
10992 main ()
10993 {
10994
10995   ;
10996   return 0;
10997 }
10998 _ACEOF
10999          if ac_fn_c_try_compile "$LINENO"; then :
11000   break
11001 fi
11002 rm -f core conftest.err conftest.$ac_objext
11003          CC="$CC -n32"
11004          if ac_fn_c_try_compile "$LINENO"; then :
11005   ac_cv_sys_largefile_CC=' -n32'; break
11006 fi
11007 rm -f core conftest.err conftest.$ac_objext
11008          break
11009        done
11010        CC=$ac_save_CC
11011        rm -f conftest.$ac_ext
11012     fi
11013 fi
11014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
11015 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
11016   if test "$ac_cv_sys_largefile_CC" != no; then
11017     CC=$CC$ac_cv_sys_largefile_CC
11018   fi
11019
11020   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
11021 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
11022 if ${ac_cv_sys_file_offset_bits+:} false; then :
11023   $as_echo_n "(cached) " >&6
11024 else
11025   while :; do
11026   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11027 /* end confdefs.h.  */
11028 #include <sys/types.h>
11029  /* Check that off_t can represent 2**63 - 1 correctly.
11030     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11031     since some C++ compilers masquerading as C compilers
11032     incorrectly reject 9223372036854775807.  */
11033 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11034   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11035                        && LARGE_OFF_T % 2147483647 == 1)
11036                       ? 1 : -1];
11037 int
11038 main ()
11039 {
11040
11041   ;
11042   return 0;
11043 }
11044 _ACEOF
11045 if ac_fn_c_try_compile "$LINENO"; then :
11046   ac_cv_sys_file_offset_bits=no; break
11047 fi
11048 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11049   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11050 /* end confdefs.h.  */
11051 #define _FILE_OFFSET_BITS 64
11052 #include <sys/types.h>
11053  /* Check that off_t can represent 2**63 - 1 correctly.
11054     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11055     since some C++ compilers masquerading as C compilers
11056     incorrectly reject 9223372036854775807.  */
11057 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11058   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11059                        && LARGE_OFF_T % 2147483647 == 1)
11060                       ? 1 : -1];
11061 int
11062 main ()
11063 {
11064
11065   ;
11066   return 0;
11067 }
11068 _ACEOF
11069 if ac_fn_c_try_compile "$LINENO"; then :
11070   ac_cv_sys_file_offset_bits=64; break
11071 fi
11072 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11073   ac_cv_sys_file_offset_bits=unknown
11074   break
11075 done
11076 fi
11077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
11078 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
11079 case $ac_cv_sys_file_offset_bits in #(
11080   no | unknown) ;;
11081   *)
11082 cat >>confdefs.h <<_ACEOF
11083 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
11084 _ACEOF
11085 ;;
11086 esac
11087 rm -rf conftest*
11088   if test $ac_cv_sys_file_offset_bits = unknown; then
11089     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
11090 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
11091 if ${ac_cv_sys_large_files+:} false; then :
11092   $as_echo_n "(cached) " >&6
11093 else
11094   while :; do
11095   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11096 /* end confdefs.h.  */
11097 #include <sys/types.h>
11098  /* Check that off_t can represent 2**63 - 1 correctly.
11099     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11100     since some C++ compilers masquerading as C compilers
11101     incorrectly reject 9223372036854775807.  */
11102 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11103   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11104                        && LARGE_OFF_T % 2147483647 == 1)
11105                       ? 1 : -1];
11106 int
11107 main ()
11108 {
11109
11110   ;
11111   return 0;
11112 }
11113 _ACEOF
11114 if ac_fn_c_try_compile "$LINENO"; then :
11115   ac_cv_sys_large_files=no; break
11116 fi
11117 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11118   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11119 /* end confdefs.h.  */
11120 #define _LARGE_FILES 1
11121 #include <sys/types.h>
11122  /* Check that off_t can represent 2**63 - 1 correctly.
11123     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11124     since some C++ compilers masquerading as C compilers
11125     incorrectly reject 9223372036854775807.  */
11126 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11127   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11128                        && LARGE_OFF_T % 2147483647 == 1)
11129                       ? 1 : -1];
11130 int
11131 main ()
11132 {
11133
11134   ;
11135   return 0;
11136 }
11137 _ACEOF
11138 if ac_fn_c_try_compile "$LINENO"; then :
11139   ac_cv_sys_large_files=1; break
11140 fi
11141 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11142   ac_cv_sys_large_files=unknown
11143   break
11144 done
11145 fi
11146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
11147 $as_echo "$ac_cv_sys_large_files" >&6; }
11148 case $ac_cv_sys_large_files in #(
11149   no | unknown) ;;
11150   *)
11151 cat >>confdefs.h <<_ACEOF
11152 #define _LARGE_FILES $ac_cv_sys_large_files
11153 _ACEOF
11154 ;;
11155 esac
11156 rm -rf conftest*
11157   fi
11158
11159
11160 fi
11161
11162
11163 fi
11164
11165 # Check for largefile support (must be after AC_SYS_LARGEFILE)
11166 # The cast to long int works around a bug in the HP C Compiler
11167 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11168 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11169 # This bug is HP SR number 8606223364.
11170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
11171 $as_echo_n "checking size of off_t... " >&6; }
11172 if ${ac_cv_sizeof_off_t+:} false; then :
11173   $as_echo_n "(cached) " >&6
11174 else
11175   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :
11176
11177 else
11178   if test "$ac_cv_type_off_t" = yes; then
11179      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11180 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11181 as_fn_error 77 "cannot compute sizeof (off_t)
11182 See \`config.log' for more details" "$LINENO" 5; }
11183    else
11184      ac_cv_sizeof_off_t=0
11185    fi
11186 fi
11187
11188 fi
11189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
11190 $as_echo "$ac_cv_sizeof_off_t" >&6; }
11191
11192
11193
11194 cat >>confdefs.h <<_ACEOF
11195 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
11196 _ACEOF
11197
11198
11199
11200 # If we don't have largefile support, can't handle segsize >= 2GB.
11201 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
11202    as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
11203 fi
11204
11205
11206 ##
11207 ## Functions, global variables
11208 ##
11209
11210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
11211 $as_echo_n "checking for int timezone... " >&6; }
11212 if ${pgac_cv_var_int_timezone+:} false; then :
11213   $as_echo_n "(cached) " >&6
11214 else
11215   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11216 /* end confdefs.h.  */
11217 #include <time.h>
11218 int res;
11219 int
11220 main ()
11221 {
11222 #ifndef __CYGWIN__
11223 res = timezone / 60;
11224 #else
11225 res = _timezone / 60;
11226 #endif
11227   ;
11228   return 0;
11229 }
11230 _ACEOF
11231 if ac_fn_c_try_link "$LINENO"; then :
11232   pgac_cv_var_int_timezone=yes
11233 else
11234   pgac_cv_var_int_timezone=no
11235 fi
11236 rm -f core conftest.err conftest.$ac_objext \
11237     conftest$ac_exeext conftest.$ac_ext
11238 fi
11239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
11240 $as_echo "$pgac_cv_var_int_timezone" >&6; }
11241 if test x"$pgac_cv_var_int_timezone" = xyes ; then
11242
11243 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
11244
11245 fi
11246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for accept()" >&5
11247 $as_echo_n "checking types of arguments for accept()... " >&6; }
11248  if ${ac_cv_func_accept_return+:} false; then :
11249   $as_echo_n "(cached) " >&6
11250 else
11251    if ${ac_cv_func_accept_arg1+:} false; then :
11252   $as_echo_n "(cached) " >&6
11253 else
11254     if ${ac_cv_func_accept_arg2+:} false; then :
11255   $as_echo_n "(cached) " >&6
11256 else
11257      if ${ac_cv_func_accept_arg3+:} false; then :
11258   $as_echo_n "(cached) " >&6
11259 else
11260       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL' 'SOCKET WSAAPI'; do
11261       for ac_cv_func_accept_arg1 in 'int' 'unsigned int' 'SOCKET'; do
11262        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
11263         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
11264          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11265 /* end confdefs.h.  */
11266 #ifdef HAVE_SYS_TYPES_H
11267 #include <sys/types.h>
11268 #endif
11269 #ifdef HAVE_SYS_SOCKET_H
11270 #include <sys/socket.h>
11271 #endif
11272 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
11273 int
11274 main ()
11275 {
11276
11277   ;
11278   return 0;
11279 }
11280 _ACEOF
11281 if ac_fn_c_try_compile "$LINENO"; then :
11282   ac_not_found=no; break 4
11283 else
11284   ac_not_found=yes
11285 fi
11286 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11287        done
11288       done
11289      done
11290     done
11291     if test "$ac_not_found" = yes; then
11292       as_fn_error $? "could not determine argument types" "$LINENO" 5
11293     fi
11294     if test "$ac_cv_func_accept_arg3" = "void"; then
11295       ac_cv_func_accept_arg3=int
11296     fi
11297
11298 fi
11299
11300 fi
11301
11302 fi
11303
11304 fi
11305  { $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
11306 $as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
11307
11308 cat >>confdefs.h <<_ACEOF
11309 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
11310 _ACEOF
11311
11312
11313 cat >>confdefs.h <<_ACEOF
11314 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
11315 _ACEOF
11316
11317
11318 cat >>confdefs.h <<_ACEOF
11319 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
11320 _ACEOF
11321
11322
11323 cat >>confdefs.h <<_ACEOF
11324 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
11325 _ACEOF
11326
11327
11328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
11329 $as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
11330 if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
11331   $as_echo_n "(cached) " >&6
11332 else
11333   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11334 /* end confdefs.h.  */
11335 #include <sys/time.h>
11336 int
11337 main ()
11338 {
11339 struct timeval *tp;
11340 struct timezone *tzp;
11341 gettimeofday(tp,tzp);
11342   ;
11343   return 0;
11344 }
11345 _ACEOF
11346 if ac_fn_c_try_compile "$LINENO"; then :
11347   pgac_cv_func_gettimeofday_1arg=no
11348 else
11349   pgac_cv_func_gettimeofday_1arg=yes
11350 fi
11351 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11352 fi
11353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5
11354 $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
11355 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
11356
11357 $as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
11358
11359 fi
11360
11361
11362 # Some versions of libedit contain strlcpy(), setproctitle(), and other
11363 # symbols that that library has no business exposing to the world.  Pending
11364 # acquisition of a clue by those developers, ignore libedit (including its
11365 # possible alias of libreadline) while checking for everything else.
11366 LIBS_including_readline="$LIBS"
11367 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
11368
11369 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
11370 do :
11371   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11372 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11373 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11374   cat >>confdefs.h <<_ACEOF
11375 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11376 _ACEOF
11377
11378 fi
11379 done
11380
11381
11382 ac_fn_c_check_func "$LINENO" "fseeko" "ac_cv_func_fseeko"
11383 if test "x$ac_cv_func_fseeko" = xyes; then :
11384   $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
11385
11386 else
11387   case " $LIBOBJS " in
11388   *" fseeko.$ac_objext "* ) ;;
11389   *) LIBOBJS="$LIBOBJS fseeko.$ac_objext"
11390  ;;
11391 esac
11392
11393 fi
11394
11395
11396 case $host_os in
11397         # NetBSD uses a custom fseeko/ftello built on fsetpos/fgetpos
11398         # Mingw uses macros to access Win32 API calls
11399         netbsd*|mingw*)
11400
11401 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
11402
11403                 ac_cv_func_fseeko=yes;;
11404         *)
11405                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
11406 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
11407 if ${ac_cv_sys_largefile_source+:} false; then :
11408   $as_echo_n "(cached) " >&6
11409 else
11410   while :; do
11411   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11412 /* end confdefs.h.  */
11413 #include <sys/types.h> /* for off_t */
11414      #include <stdio.h>
11415 int
11416 main ()
11417 {
11418 int (*fp) (FILE *, off_t, int) = fseeko;
11419      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
11420   ;
11421   return 0;
11422 }
11423 _ACEOF
11424 if ac_fn_c_try_link "$LINENO"; then :
11425   ac_cv_sys_largefile_source=no; break
11426 fi
11427 rm -f core conftest.err conftest.$ac_objext \
11428     conftest$ac_exeext conftest.$ac_ext
11429   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11430 /* end confdefs.h.  */
11431 #define _LARGEFILE_SOURCE 1
11432 #include <sys/types.h> /* for off_t */
11433      #include <stdio.h>
11434 int
11435 main ()
11436 {
11437 int (*fp) (FILE *, off_t, int) = fseeko;
11438      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
11439   ;
11440   return 0;
11441 }
11442 _ACEOF
11443 if ac_fn_c_try_link "$LINENO"; then :
11444   ac_cv_sys_largefile_source=1; break
11445 fi
11446 rm -f core conftest.err conftest.$ac_objext \
11447     conftest$ac_exeext conftest.$ac_ext
11448   ac_cv_sys_largefile_source=unknown
11449   break
11450 done
11451 fi
11452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
11453 $as_echo "$ac_cv_sys_largefile_source" >&6; }
11454 case $ac_cv_sys_largefile_source in #(
11455   no | unknown) ;;
11456   *)
11457 cat >>confdefs.h <<_ACEOF
11458 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
11459 _ACEOF
11460 ;;
11461 esac
11462 rm -rf conftest*
11463
11464 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
11465 # in glibc 2.1.3, but that breaks too many other things.
11466 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
11467 if test $ac_cv_sys_largefile_source != unknown; then
11468
11469 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
11470
11471 fi
11472 ;;
11473 esac
11474
11475 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
11476 # by calling it, 2009-04-02
11477 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
11478 if test "$PORTNAME" != "solaris"; then
11479 for ac_func in posix_fadvise
11480 do :
11481   ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
11482 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
11483   cat >>confdefs.h <<_ACEOF
11484 #define HAVE_POSIX_FADVISE 1
11485 _ACEOF
11486
11487 fi
11488 done
11489
11490 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
11491 "
11492 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
11493   ac_have_decl=1
11494 else
11495   ac_have_decl=0
11496 fi
11497
11498 cat >>confdefs.h <<_ACEOF
11499 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
11500 _ACEOF
11501
11502 fi
11503
11504 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
11505 "
11506 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
11507   ac_have_decl=1
11508 else
11509   ac_have_decl=0
11510 fi
11511
11512 cat >>confdefs.h <<_ACEOF
11513 #define HAVE_DECL_FDATASYNC $ac_have_decl
11514 _ACEOF
11515
11516 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
11517 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
11518   ac_have_decl=1
11519 else
11520   ac_have_decl=0
11521 fi
11522
11523 cat >>confdefs.h <<_ACEOF
11524 #define HAVE_DECL_STRLCAT $ac_have_decl
11525 _ACEOF
11526 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
11527 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
11528   ac_have_decl=1
11529 else
11530   ac_have_decl=0
11531 fi
11532
11533 cat >>confdefs.h <<_ACEOF
11534 #define HAVE_DECL_STRLCPY $ac_have_decl
11535 _ACEOF
11536
11537 # This is probably only present on Darwin, but may as well check always
11538 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
11539 "
11540 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
11541   ac_have_decl=1
11542 else
11543   ac_have_decl=0
11544 fi
11545
11546 cat >>confdefs.h <<_ACEOF
11547 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
11548 _ACEOF
11549
11550
11551 HAVE_IPV6=no
11552 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default
11553 #include <netinet/in.h>
11554 "
11555 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
11556
11557 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
11558
11559          HAVE_IPV6=yes
11560 fi
11561
11562
11563
11564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
11565 $as_echo_n "checking for PS_STRINGS... " >&6; }
11566 if ${pgac_cv_var_PS_STRINGS+:} false; then :
11567   $as_echo_n "(cached) " >&6
11568 else
11569   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11570 /* end confdefs.h.  */
11571 #include <machine/vmparam.h>
11572 #include <sys/exec.h>
11573
11574 int
11575 main ()
11576 {
11577 PS_STRINGS->ps_nargvstr = 1;
11578 PS_STRINGS->ps_argvstr = "foo";
11579   ;
11580   return 0;
11581 }
11582 _ACEOF
11583 if ac_fn_c_try_link "$LINENO"; then :
11584   pgac_cv_var_PS_STRINGS=yes
11585 else
11586   pgac_cv_var_PS_STRINGS=no
11587 fi
11588 rm -f core conftest.err conftest.$ac_objext \
11589     conftest$ac_exeext conftest.$ac_ext
11590 fi
11591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
11592 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
11593 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
11594
11595 $as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
11596
11597 fi
11598
11599
11600 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
11601 # is missing.  Yes, there are machines that have only one.  We may
11602 # also decide to use snprintf.c if snprintf() is present but does not
11603 # have all the features we need --- see below.
11604
11605 if test "$PORTNAME" = "win32"; then
11606   # Win32 gets snprintf.c built unconditionally.
11607   #
11608   # To properly translate all NLS languages strings, we must support the
11609   # *printf() %$ format, which allows *printf() arguments to be selected
11610   # by position in the translated string.
11611   #
11612   # libintl versions < 0.13 use the native *printf() functions, and Win32
11613   # *printf() doesn't understand %$, so we must use our /port versions,
11614   # which do understand %$. libintl versions >= 0.13 include their own
11615   # *printf versions on Win32.  The libintl 0.13 release note text is:
11616   #
11617   #   C format strings with positions, as they arise when a translator
11618   #   needs to reorder a sentence, are now supported on all platforms.
11619   #   On those few platforms (NetBSD and Woe32) for which the native
11620   #   printf()/fprintf()/... functions don't support such format
11621   #   strings, replacements are provided through <libintl.h>.
11622   #
11623   # We could use libintl >= 0.13's *printf() if we were sure that we had
11624   # a litint >= 0.13 at runtime, but seeing that there is no clean way
11625   # to guarantee that, it is best to just use our own, so we are sure to
11626   # get %$ support. In include/port.h we disable the *printf() macros
11627   # that might have been defined by libintl.
11628   #
11629   # We do this unconditionally whether NLS is used or not so we are sure
11630   # that all Win32 libraries and binaries behave the same.
11631   pgac_need_repl_snprintf=yes
11632 else
11633   pgac_need_repl_snprintf=no
11634   for ac_func in snprintf
11635 do :
11636   ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
11637 if test "x$ac_cv_func_snprintf" = xyes; then :
11638   cat >>confdefs.h <<_ACEOF
11639 #define HAVE_SNPRINTF 1
11640 _ACEOF
11641
11642 else
11643   pgac_need_repl_snprintf=yes
11644 fi
11645 done
11646
11647   for ac_func in vsnprintf
11648 do :
11649   ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
11650 if test "x$ac_cv_func_vsnprintf" = xyes; then :
11651   cat >>confdefs.h <<_ACEOF
11652 #define HAVE_VSNPRINTF 1
11653 _ACEOF
11654
11655 else
11656   pgac_need_repl_snprintf=yes
11657 fi
11658 done
11659
11660 fi
11661
11662
11663 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
11664 # include/c.h will provide declarations.  Note this is a separate test
11665 # from whether the functions exist in the C library --- there are
11666 # systems that have the functions but don't bother to declare them :-(
11667
11668 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11669 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
11670   ac_have_decl=1
11671 else
11672   ac_have_decl=0
11673 fi
11674
11675 cat >>confdefs.h <<_ACEOF
11676 #define HAVE_DECL_SNPRINTF $ac_have_decl
11677 _ACEOF
11678 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
11679 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
11680   ac_have_decl=1
11681 else
11682   ac_have_decl=0
11683 fi
11684
11685 cat >>confdefs.h <<_ACEOF
11686 #define HAVE_DECL_VSNPRINTF $ac_have_decl
11687 _ACEOF
11688
11689
11690
11691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf" >&5
11692 $as_echo_n "checking for isinf... " >&6; }
11693 if ${ac_cv_func_isinf+:} false; then :
11694   $as_echo_n "(cached) " >&6
11695 else
11696   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11697 /* end confdefs.h.  */
11698
11699 #include <math.h>
11700 double glob_double;
11701
11702 int
11703 main ()
11704 {
11705 return isinf(glob_double) ? 0 : 1;
11706   ;
11707   return 0;
11708 }
11709 _ACEOF
11710 if ac_fn_c_try_link "$LINENO"; then :
11711   ac_cv_func_isinf=yes
11712 else
11713   ac_cv_func_isinf=no
11714 fi
11715 rm -f core conftest.err conftest.$ac_objext \
11716     conftest$ac_exeext conftest.$ac_ext
11717 fi
11718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_isinf" >&5
11719 $as_echo "$ac_cv_func_isinf" >&6; }
11720
11721 if test $ac_cv_func_isinf = yes ; then
11722
11723 $as_echo "#define HAVE_ISINF 1" >>confdefs.h
11724
11725 else
11726   case " $LIBOBJS " in
11727   *" isinf.$ac_objext "* ) ;;
11728   *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
11729  ;;
11730 esac
11731
11732   # Look for a way to implement a substitute for isinf()
11733   for ac_func in fpclass fp_class fp_class_d class
11734 do :
11735   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11736 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11737 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11738   cat >>confdefs.h <<_ACEOF
11739 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11740 _ACEOF
11741  break
11742 fi
11743 done
11744
11745 fi
11746
11747 ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
11748 if test "x$ac_cv_func_crypt" = xyes; then :
11749   $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
11750
11751 else
11752   case " $LIBOBJS " in
11753   *" crypt.$ac_objext "* ) ;;
11754   *) LIBOBJS="$LIBOBJS crypt.$ac_objext"
11755  ;;
11756 esac
11757
11758 fi
11759
11760 ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
11761 if test "x$ac_cv_func_fls" = xyes; then :
11762   $as_echo "#define HAVE_FLS 1" >>confdefs.h
11763
11764 else
11765   case " $LIBOBJS " in
11766   *" fls.$ac_objext "* ) ;;
11767   *) LIBOBJS="$LIBOBJS fls.$ac_objext"
11768  ;;
11769 esac
11770
11771 fi
11772
11773 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
11774 if test "x$ac_cv_func_getopt" = xyes; then :
11775   $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
11776
11777 else
11778   case " $LIBOBJS " in
11779   *" getopt.$ac_objext "* ) ;;
11780   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
11781  ;;
11782 esac
11783
11784 fi
11785
11786 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
11787 if test "x$ac_cv_func_getrusage" = xyes; then :
11788   $as_echo "#define HAVE_GETRUSAGE 1" >>confdefs.h
11789
11790 else
11791   case " $LIBOBJS " in
11792   *" getrusage.$ac_objext "* ) ;;
11793   *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
11794  ;;
11795 esac
11796
11797 fi
11798
11799 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
11800 if test "x$ac_cv_func_inet_aton" = xyes; then :
11801   $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
11802
11803 else
11804   case " $LIBOBJS " in
11805   *" inet_aton.$ac_objext "* ) ;;
11806   *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
11807  ;;
11808 esac
11809
11810 fi
11811
11812 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
11813 if test "x$ac_cv_func_mkdtemp" = xyes; then :
11814   $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
11815
11816 else
11817   case " $LIBOBJS " in
11818   *" mkdtemp.$ac_objext "* ) ;;
11819   *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
11820  ;;
11821 esac
11822
11823 fi
11824
11825 ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
11826 if test "x$ac_cv_func_random" = xyes; then :
11827   $as_echo "#define HAVE_RANDOM 1" >>confdefs.h
11828
11829 else
11830   case " $LIBOBJS " in
11831   *" random.$ac_objext "* ) ;;
11832   *) LIBOBJS="$LIBOBJS random.$ac_objext"
11833  ;;
11834 esac
11835
11836 fi
11837
11838 ac_fn_c_check_func "$LINENO" "rint" "ac_cv_func_rint"
11839 if test "x$ac_cv_func_rint" = xyes; then :
11840   $as_echo "#define HAVE_RINT 1" >>confdefs.h
11841
11842 else
11843   case " $LIBOBJS " in
11844   *" rint.$ac_objext "* ) ;;
11845   *) LIBOBJS="$LIBOBJS rint.$ac_objext"
11846  ;;
11847 esac
11848
11849 fi
11850
11851 ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
11852 if test "x$ac_cv_func_srandom" = xyes; then :
11853   $as_echo "#define HAVE_SRANDOM 1" >>confdefs.h
11854
11855 else
11856   case " $LIBOBJS " in
11857   *" srandom.$ac_objext "* ) ;;
11858   *) LIBOBJS="$LIBOBJS srandom.$ac_objext"
11859  ;;
11860 esac
11861
11862 fi
11863
11864 ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
11865 if test "x$ac_cv_func_strerror" = xyes; then :
11866   $as_echo "#define HAVE_STRERROR 1" >>confdefs.h
11867
11868 else
11869   case " $LIBOBJS " in
11870   *" strerror.$ac_objext "* ) ;;
11871   *) LIBOBJS="$LIBOBJS strerror.$ac_objext"
11872  ;;
11873 esac
11874
11875 fi
11876
11877 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
11878 if test "x$ac_cv_func_strlcat" = xyes; then :
11879   $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
11880
11881 else
11882   case " $LIBOBJS " in
11883   *" strlcat.$ac_objext "* ) ;;
11884   *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
11885  ;;
11886 esac
11887
11888 fi
11889
11890 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
11891 if test "x$ac_cv_func_strlcpy" = xyes; then :
11892   $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
11893
11894 else
11895   case " $LIBOBJS " in
11896   *" strlcpy.$ac_objext "* ) ;;
11897   *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
11898  ;;
11899 esac
11900
11901 fi
11902
11903
11904
11905 case $host_os in
11906
11907         # Windows uses a specialised env handler
11908         # and doesn't need a replacement getpeereid because it doesn't use
11909         # Unix sockets.
11910         mingw*)
11911
11912 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
11913
11914
11915 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
11916
11917                 ac_cv_func_unsetenv=yes
11918                 ac_cv_func_getpeereid=yes;;
11919         *)
11920                 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
11921 if test "x$ac_cv_func_unsetenv" = xyes; then :
11922   $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
11923
11924 else
11925   case " $LIBOBJS " in
11926   *" unsetenv.$ac_objext "* ) ;;
11927   *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext"
11928  ;;
11929 esac
11930
11931 fi
11932
11933 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
11934 if test "x$ac_cv_func_getpeereid" = xyes; then :
11935   $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
11936
11937 else
11938   case " $LIBOBJS " in
11939   *" getpeereid.$ac_objext "* ) ;;
11940   *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
11941  ;;
11942 esac
11943
11944 fi
11945
11946
11947                 ;;
11948 esac
11949
11950 # System's version of getaddrinfo(), if any, may be used only if we found
11951 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
11952 # We use only our own getaddrinfo.c on Windows, but it's time to revisit that.
11953 if test x"$ac_cv_type_struct_addrinfo" = xyes && \
11954    test "$PORTNAME" != "win32"; then
11955   ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
11956 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
11957   $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
11958
11959 else
11960   case " $LIBOBJS " in
11961   *" getaddrinfo.$ac_objext "* ) ;;
11962   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
11963  ;;
11964 esac
11965
11966 fi
11967
11968
11969 else
11970   case " $LIBOBJS " in
11971   *" getaddrinfo.$ac_objext "* ) ;;
11972   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
11973  ;;
11974 esac
11975
11976 fi
11977
11978 # Similarly, use system's getopt_long() only if system provides struct option.
11979 if test x"$ac_cv_type_struct_option" = xyes ; then
11980   ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
11981 if test "x$ac_cv_func_getopt_long" = xyes; then :
11982   $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
11983
11984 else
11985   case " $LIBOBJS " in
11986   *" getopt_long.$ac_objext "* ) ;;
11987   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
11988  ;;
11989 esac
11990
11991 fi
11992
11993
11994 else
11995   case " $LIBOBJS " in
11996   *" getopt_long.$ac_objext "* ) ;;
11997   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
11998  ;;
11999 esac
12000
12001 fi
12002
12003 # Solaris' getopt() doesn't do what we want for long options, so always use
12004 # our version on that platform.
12005 if test "$PORTNAME" = "solaris"; then
12006   case " $LIBOBJS " in
12007   *" getopt.$ac_objext "* ) ;;
12008   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
12009  ;;
12010 esac
12011
12012 fi
12013
12014 # mingw has adopted a GNU-centric interpretation of optind/optreset,
12015 # so always use our version on Windows.
12016 if test "$PORTNAME" = "win32"; then
12017   case " $LIBOBJS " in
12018   *" getopt.$ac_objext "* ) ;;
12019   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
12020  ;;
12021 esac
12022
12023   case " $LIBOBJS " in
12024   *" getopt_long.$ac_objext "* ) ;;
12025   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
12026  ;;
12027 esac
12028
12029 fi
12030
12031 # Win32 support
12032 if test "$PORTNAME" = "win32"; then
12033   ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
12034 if test "x$ac_cv_func_gettimeofday" = xyes; then :
12035   $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
12036
12037 else
12038   case " $LIBOBJS " in
12039   *" gettimeofday.$ac_objext "* ) ;;
12040   *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
12041  ;;
12042 esac
12043
12044 fi
12045
12046
12047   case " $LIBOBJS " in
12048   *" kill.$ac_objext "* ) ;;
12049   *) LIBOBJS="$LIBOBJS kill.$ac_objext"
12050  ;;
12051 esac
12052
12053   case " $LIBOBJS " in
12054   *" open.$ac_objext "* ) ;;
12055   *) LIBOBJS="$LIBOBJS open.$ac_objext"
12056  ;;
12057 esac
12058
12059   case " $LIBOBJS " in
12060   *" system.$ac_objext "* ) ;;
12061   *) LIBOBJS="$LIBOBJS system.$ac_objext"
12062  ;;
12063 esac
12064
12065   case " $LIBOBJS " in
12066   *" win32env.$ac_objext "* ) ;;
12067   *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
12068  ;;
12069 esac
12070
12071   case " $LIBOBJS " in
12072   *" win32error.$ac_objext "* ) ;;
12073   *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
12074  ;;
12075 esac
12076
12077   case " $LIBOBJS " in
12078   *" win32setlocale.$ac_objext "* ) ;;
12079   *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
12080  ;;
12081 esac
12082
12083
12084 $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
12085
12086   ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
12087 #define WIN32_LEAN_AND_MEAN
12088 #include <windows.h>
12089 #include <string.h>
12090 #include <dbghelp.h>
12091 "
12092 if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
12093
12094 cat >>confdefs.h <<_ACEOF
12095 #define HAVE_MINIDUMP_TYPE 1
12096 _ACEOF
12097
12098 pgac_minidump_type=yes
12099 else
12100   pgac_minidump_type=no
12101 fi
12102
12103 fi
12104 if test x"$pgac_minidump_type" = x"yes" ; then
12105   have_win32_dbghelp=yes
12106
12107 else
12108   have_win32_dbghelp=no
12109
12110 fi
12111
12112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
12113 $as_echo_n "checking for sigsetjmp... " >&6; }
12114 if ${pgac_cv_func_sigsetjmp+:} false; then :
12115   $as_echo_n "(cached) " >&6
12116 else
12117   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12118 /* end confdefs.h.  */
12119 #include <setjmp.h>
12120 int
12121 main ()
12122 {
12123 sigjmp_buf x; sigsetjmp(x, 1);
12124   ;
12125   return 0;
12126 }
12127 _ACEOF
12128 if ac_fn_c_try_link "$LINENO"; then :
12129   pgac_cv_func_sigsetjmp=yes
12130 else
12131   pgac_cv_func_sigsetjmp=no
12132 fi
12133 rm -f core conftest.err conftest.$ac_objext \
12134     conftest$ac_exeext conftest.$ac_ext
12135 fi
12136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_sigsetjmp" >&5
12137 $as_echo "$pgac_cv_func_sigsetjmp" >&6; }
12138 if test x"$pgac_cv_func_sigsetjmp" = x"yes"; then
12139
12140 $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
12141
12142 fi
12143
12144 ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
12145 /* NetBSD declares sys_siglist in unistd.h.  */
12146 #ifdef HAVE_UNISTD_H
12147 # include <unistd.h>
12148 #endif
12149
12150 "
12151 if test "x$ac_cv_have_decl_sys_siglist" = xyes; then :
12152   ac_have_decl=1
12153 else
12154   ac_have_decl=0
12155 fi
12156
12157 cat >>confdefs.h <<_ACEOF
12158 #define HAVE_DECL_SYS_SIGLIST $ac_have_decl
12159 _ACEOF
12160
12161
12162
12163 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
12164 if test "x$ac_cv_func_syslog" = xyes; then :
12165   ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
12166 if test "x$ac_cv_header_syslog_h" = xyes; then :
12167
12168 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
12169
12170 fi
12171
12172
12173 fi
12174
12175
12176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
12177 $as_echo_n "checking for opterr... " >&6; }
12178 if ${pgac_cv_var_int_opterr+:} false; then :
12179   $as_echo_n "(cached) " >&6
12180 else
12181   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12182 /* end confdefs.h.  */
12183 #include <unistd.h>
12184 int
12185 main ()
12186 {
12187 extern int opterr; opterr = 1;
12188   ;
12189   return 0;
12190 }
12191 _ACEOF
12192 if ac_fn_c_try_link "$LINENO"; then :
12193   pgac_cv_var_int_opterr=yes
12194 else
12195   pgac_cv_var_int_opterr=no
12196 fi
12197 rm -f core conftest.err conftest.$ac_objext \
12198     conftest$ac_exeext conftest.$ac_ext
12199 fi
12200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
12201 $as_echo "$pgac_cv_var_int_opterr" >&6; }
12202 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
12203
12204 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
12205
12206 fi
12207
12208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
12209 $as_echo_n "checking for optreset... " >&6; }
12210 if ${pgac_cv_var_int_optreset+:} false; then :
12211   $as_echo_n "(cached) " >&6
12212 else
12213   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12214 /* end confdefs.h.  */
12215 #include <unistd.h>
12216 int
12217 main ()
12218 {
12219 extern int optreset; optreset = 1;
12220   ;
12221   return 0;
12222 }
12223 _ACEOF
12224 if ac_fn_c_try_link "$LINENO"; then :
12225   pgac_cv_var_int_optreset=yes
12226 else
12227   pgac_cv_var_int_optreset=no
12228 fi
12229 rm -f core conftest.err conftest.$ac_objext \
12230     conftest$ac_exeext conftest.$ac_ext
12231 fi
12232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
12233 $as_echo "$pgac_cv_var_int_optreset" >&6; }
12234 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
12235
12236 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
12237
12238 fi
12239
12240 for ac_func in strtoll strtoq
12241 do :
12242   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12243 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12244 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12245   cat >>confdefs.h <<_ACEOF
12246 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12247 _ACEOF
12248  break
12249 fi
12250 done
12251
12252 for ac_func in strtoull strtouq
12253 do :
12254   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12255 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12256 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12257   cat >>confdefs.h <<_ACEOF
12258 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12259 _ACEOF
12260  break
12261 fi
12262 done
12263
12264
12265 # Lastly, restore full LIBS list and check for readline/libedit symbols
12266 LIBS="$LIBS_including_readline"
12267
12268 if test "$with_readline" = yes; then
12269   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_append_character" >&5
12270 $as_echo_n "checking for rl_completion_append_character... " >&6; }
12271 if ${pgac_cv_var_rl_completion_append_character+:} false; then :
12272   $as_echo_n "(cached) " >&6
12273 else
12274   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12275 /* end confdefs.h.  */
12276 #include <stdio.h>
12277 #ifdef HAVE_READLINE_READLINE_H
12278 # include <readline/readline.h>
12279 #elif defined(HAVE_READLINE_H)
12280 # include <readline.h>
12281 #endif
12282
12283 int
12284 main ()
12285 {
12286 rl_completion_append_character = 'x';
12287   ;
12288   return 0;
12289 }
12290 _ACEOF
12291 if ac_fn_c_try_link "$LINENO"; then :
12292   pgac_cv_var_rl_completion_append_character=yes
12293 else
12294   pgac_cv_var_rl_completion_append_character=no
12295 fi
12296 rm -f core conftest.err conftest.$ac_objext \
12297     conftest$ac_exeext conftest.$ac_ext
12298 fi
12299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_append_character" >&5
12300 $as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
12301 if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
12302
12303 $as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
12304
12305 fi
12306   for ac_func in rl_completion_matches rl_filename_completion_function
12307 do :
12308   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12309 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12310 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12311   cat >>confdefs.h <<_ACEOF
12312 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12313 _ACEOF
12314
12315 fi
12316 done
12317
12318   for ac_func in append_history history_truncate_file
12319 do :
12320   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12321 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12322 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12323   cat >>confdefs.h <<_ACEOF
12324 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12325 _ACEOF
12326
12327 fi
12328 done
12329
12330 fi
12331
12332
12333 #
12334 # Pthreads
12335 #
12336 # For each platform, we need to know about any special compile and link
12337 # libraries, and whether the normal C function names are thread-safe.
12338 # See the comment at the top of src/port/thread.c for more information.
12339 # WIN32 doesn't need the pthread tests;  it always uses threads
12340 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then
12341
12342
12343
12344 ac_ext=c
12345 ac_cpp='$CPP $CPPFLAGS'
12346 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12347 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12348 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12349
12350 acx_pthread_ok=no
12351
12352 # We used to check for pthread.h first, but this fails if pthread.h
12353 # requires special compiler flags (e.g. on True64 or Sequent).
12354 # It gets checked for in the link test anyway.
12355
12356 # First of all, check if the user has set any of the PTHREAD_LIBS,
12357 # etcetera environment variables, and if threads linking works using
12358 # them:
12359 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
12360         save_CFLAGS="$CFLAGS"
12361         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
12362         save_LIBS="$LIBS"
12363         LIBS="$PTHREAD_LIBS $LIBS"
12364         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
12365 $as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
12366         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12367 /* end confdefs.h.  */
12368
12369 /* Override any GCC internal prototype to avoid an error.
12370    Use char because int might match the return type of a GCC
12371    builtin and then its argument prototype would still apply.  */
12372 #ifdef __cplusplus
12373 extern "C"
12374 #endif
12375 char pthread_join ();
12376 int
12377 main ()
12378 {
12379 return pthread_join ();
12380   ;
12381   return 0;
12382 }
12383 _ACEOF
12384 if ac_fn_c_try_link "$LINENO"; then :
12385   acx_pthread_ok=yes
12386 fi
12387 rm -f core conftest.err conftest.$ac_objext \
12388     conftest$ac_exeext conftest.$ac_ext
12389         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5
12390 $as_echo "$acx_pthread_ok" >&6; }
12391         if test x"$acx_pthread_ok" = xno; then
12392                 PTHREAD_LIBS=""
12393                 PTHREAD_CFLAGS=""
12394         fi
12395         LIBS="$save_LIBS"
12396         CFLAGS="$save_CFLAGS"
12397 fi
12398
12399 # We must check for the threads library under a number of different
12400 # names; the ordering is very important because some systems
12401 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
12402 # libraries is broken (non-POSIX).
12403
12404 # Create a list of thread flags to try.  Items starting with a "-" are
12405 # C compiler flags, and other items are library names, except for "none"
12406 # which indicates that we try without any flags at all, and "pthread-config"
12407 # which is a program returning the flags for the Pth emulation library.
12408
12409 acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config pthreadGC2"
12410
12411 # The ordering *is* (sometimes) important.  Some notes on the
12412 # individual items follow:
12413
12414 # pthreads: AIX (must check this before -lpthread)
12415 # none: in case threads are in libc; should be tried before -Kthread and
12416 #       other compiler flags to prevent continual compiler warnings
12417 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
12418 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
12419 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
12420 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
12421 # -pthreads: Solaris/gcc
12422 # -mthreads: Mingw32/gcc, Lynx/gcc
12423 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
12424 #      doesn't hurt to check since this sometimes defines pthreads too;
12425 #      also defines -D_REENTRANT)
12426 # pthread: Linux, etcetera
12427 # --thread-safe: KAI C++
12428 # pthread-config: use pthread-config program (for GNU Pth library)
12429
12430 case "${host_cpu}-${host_os}" in
12431         *solaris*)
12432
12433         # On Solaris (at least, for some versions), libc contains stubbed
12434         # (non-functional) versions of the pthreads routines, so link-based
12435         # tests will erroneously succeed.  (We need to link with -pthread or
12436         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
12437         # a function called by this macro, so we could check for that, but
12438         # who knows whether they'll stub that too in a future libc.)  So,
12439         # we'll just look for -pthreads and -lpthread first:
12440
12441         acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
12442         ;;
12443 esac
12444
12445 if test x"$acx_pthread_ok" = xno; then
12446 for flag in $acx_pthread_flags; do
12447
12448         tryPTHREAD_CFLAGS=""
12449         tryPTHREAD_LIBS=""
12450         case $flag in
12451                 none)
12452                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
12453 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
12454                 ;;
12455
12456                 -*)
12457                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
12458 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
12459                 tryPTHREAD_CFLAGS="$flag"
12460                 ;;
12461
12462                 pthread-config)
12463                 # skip this if we already have flags defined, for PostgreSQL
12464                 if test x"$PTHREAD_CFLAGS" != x -o x"$PTHREAD_LIBS" != x; then continue; fi
12465                 # Extract the first word of "pthread-config", so it can be a program name with args.
12466 set dummy pthread-config; ac_word=$2
12467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12468 $as_echo_n "checking for $ac_word... " >&6; }
12469 if ${ac_cv_prog_acx_pthread_config+:} false; then :
12470   $as_echo_n "(cached) " >&6
12471 else
12472   if test -n "$acx_pthread_config"; then
12473   ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
12474 else
12475 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12476 for as_dir in $PATH
12477 do
12478   IFS=$as_save_IFS
12479   test -z "$as_dir" && as_dir=.
12480     for ac_exec_ext in '' $ac_executable_extensions; do
12481   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12482     ac_cv_prog_acx_pthread_config="yes"
12483     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12484     break 2
12485   fi
12486 done
12487   done
12488 IFS=$as_save_IFS
12489
12490   test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
12491 fi
12492 fi
12493 acx_pthread_config=$ac_cv_prog_acx_pthread_config
12494 if test -n "$acx_pthread_config"; then
12495   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_config" >&5
12496 $as_echo "$acx_pthread_config" >&6; }
12497 else
12498   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12499 $as_echo "no" >&6; }
12500 fi
12501
12502
12503                 if test x"$acx_pthread_config" = xno; then continue; fi
12504                 tryPTHREAD_CFLAGS="`pthread-config --cflags`"
12505                 tryPTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
12506                 ;;
12507
12508                 *)
12509                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
12510 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
12511                 tryPTHREAD_LIBS="-l$flag"
12512                 ;;
12513         esac
12514
12515         save_LIBS="$LIBS"
12516         save_CFLAGS="$CFLAGS"
12517         LIBS="$tryPTHREAD_LIBS $PTHREAD_LIBS $LIBS"
12518         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
12519
12520         # Check for various functions.  We must include pthread.h,
12521         # since some functions may be macros.  (On the Sequent, we
12522         # need a special flag -Kthread to make this header compile.)
12523         # We check for pthread_join because it is in -lpthread on IRIX
12524         # while pthread_create is in libc.  We check for pthread_attr_init
12525         # due to DEC craziness with -lpthreads.  We check for
12526         # pthread_cleanup_push because it is one of the few pthread
12527         # functions on Solaris that doesn't have a non-functional libc stub.
12528         # We try pthread_create on general principles.
12529         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12530 /* end confdefs.h.  */
12531 #include <pthread.h>
12532 int
12533 main ()
12534 {
12535 pthread_t th; pthread_join(th, 0);
12536                      pthread_attr_init(0); pthread_cleanup_push(0, 0);
12537                      pthread_create(0,0,0,0); pthread_cleanup_pop(0);
12538   ;
12539   return 0;
12540 }
12541 _ACEOF
12542 if ac_fn_c_try_link "$LINENO"; then :
12543   acx_pthread_ok=yes
12544 else
12545   acx_pthread_ok=no
12546 fi
12547 rm -f core conftest.err conftest.$ac_objext \
12548     conftest$ac_exeext conftest.$ac_ext
12549
12550         if test "x$acx_pthread_ok" = xyes; then
12551             # Don't use options that are ignored by the compiler.
12552             # We find them by checking stderror.
12553             cat >conftest.$ac_ext <<_ACEOF
12554 int
12555 main (int argc, char **argv)
12556 {
12557   (void) argc;
12558   (void) argv;
12559   return 0;
12560 }
12561 _ACEOF
12562             rm -f conftest.$ac_objext conftest$ac_exeext
12563             # Check both linking and compiling, because they might tolerate different options.
12564             if test "`(eval $ac_link 2>&1 1>&5)`" = "" && test "`(eval $ac_compile 2>&1 1>&5)`" = ""; then
12565                 # The original macro breaks out of the loop at this point,
12566                 # but we continue trying flags because Linux needs -lpthread
12567                 # too to build libpq successfully.  The test above only
12568                 # tests for building binaries, not shared libraries.
12569                 PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
12570                 PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
12571             else   acx_pthread_ok=no
12572             fi
12573         fi
12574
12575         LIBS="$save_LIBS"
12576         CFLAGS="$save_CFLAGS"
12577
12578         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5
12579 $as_echo "$acx_pthread_ok" >&6; }
12580 done
12581 fi
12582
12583 # The original macro has a bunch of other tests here, which we have removed
12584 # because (a) Postgres doesn't need them, and (b) $acx_pthread_ok is not
12585 # meaningful at this point.
12586
12587
12588
12589
12590 ac_ext=c
12591 ac_cpp='$CPP $CPPFLAGS'
12592 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12593 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12594 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12595
12596         # set thread flags
12597
12598 # Some platforms use these, so just define them.  They can't hurt if they
12599 # are not supported.  For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
12600 # enables 5-arg getpwuid_r, among other things.
12601 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
12602
12603 # Check for *_r functions
12604 _CFLAGS="$CFLAGS"
12605 _LIBS="$LIBS"
12606 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
12607 LIBS="$LIBS $PTHREAD_LIBS"
12608
12609 if test "$PORTNAME" != "win32"; then
12610 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
12611 if test "x$ac_cv_header_pthread_h" = xyes; then :
12612
12613 else
12614   as_fn_error $? "
12615 pthread.h not found;  use --disable-thread-safety to disable thread safety" "$LINENO" 5
12616 fi
12617
12618
12619 fi
12620
12621 for ac_func in strerror_r getpwuid_r gethostbyname_r
12622 do :
12623   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12624 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12625 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12626   cat >>confdefs.h <<_ACEOF
12627 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12628 _ACEOF
12629
12630 fi
12631 done
12632
12633
12634 # Do test here with the proper thread flags
12635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpwuid_r takes a fifth argument" >&5
12636 $as_echo_n "checking whether getpwuid_r takes a fifth argument... " >&6; }
12637 if ${pgac_cv_func_getpwuid_r_5arg+:} false; then :
12638   $as_echo_n "(cached) " >&6
12639 else
12640   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12641 /* end confdefs.h.  */
12642 #include <sys/types.h>
12643 #include <pwd.h>
12644 int
12645 main ()
12646 {
12647 uid_t uid;
12648 struct passwd *space;
12649 char *buf;
12650 size_t bufsize;
12651 struct passwd **result;
12652 getpwuid_r(uid, space, buf, bufsize, result);
12653   ;
12654   return 0;
12655 }
12656 _ACEOF
12657 if ac_fn_c_try_compile "$LINENO"; then :
12658   pgac_cv_func_getpwuid_r_5arg=yes
12659 else
12660   pgac_cv_func_getpwuid_r_5arg=no
12661 fi
12662 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12663 fi
12664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_getpwuid_r_5arg" >&5
12665 $as_echo "$pgac_cv_func_getpwuid_r_5arg" >&6; }
12666 if test x"$pgac_cv_func_getpwuid_r_5arg" = xyes ; then
12667
12668 $as_echo "#define GETPWUID_R_5ARG 1" >>confdefs.h
12669
12670 fi
12671
12672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
12673 $as_echo_n "checking whether strerror_r returns int... " >&6; }
12674 if ${pgac_cv_func_strerror_r_int+:} false; then :
12675   $as_echo_n "(cached) " >&6
12676 else
12677   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12678 /* end confdefs.h.  */
12679 #include <string.h>
12680 int
12681 main ()
12682 {
12683 #ifndef _AIX
12684 int strerror_r(int, char *, size_t);
12685 #else
12686 /* Older AIX has 'int' for the third argument so we don't test the args. */
12687 int strerror_r();
12688 #endif
12689   ;
12690   return 0;
12691 }
12692 _ACEOF
12693 if ac_fn_c_try_compile "$LINENO"; then :
12694   pgac_cv_func_strerror_r_int=yes
12695 else
12696   pgac_cv_func_strerror_r_int=no
12697 fi
12698 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12699 fi
12700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
12701 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
12702 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
12703
12704 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
12705
12706 fi
12707
12708
12709 CFLAGS="$_CFLAGS"
12710 LIBS="$_LIBS"
12711
12712 else
12713 # do not use values from template file
12714 PTHREAD_CFLAGS=
12715 PTHREAD_LIBS=
12716 fi
12717
12718
12719
12720
12721
12722 # We can test for libldap_r only after we know PTHREAD_LIBS
12723 if test "$with_ldap" = yes ; then
12724   _LIBS="$LIBS"
12725   if test "$PORTNAME" != "win32"; then
12726     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
12727 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
12728 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
12729   $as_echo_n "(cached) " >&6
12730 else
12731   ac_check_lib_save_LIBS=$LIBS
12732 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
12733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12734 /* end confdefs.h.  */
12735
12736 /* Override any GCC internal prototype to avoid an error.
12737    Use char because int might match the return type of a GCC
12738    builtin and then its argument prototype would still apply.  */
12739 #ifdef __cplusplus
12740 extern "C"
12741 #endif
12742 char ldap_bind ();
12743 int
12744 main ()
12745 {
12746 return ldap_bind ();
12747   ;
12748   return 0;
12749 }
12750 _ACEOF
12751 if ac_fn_c_try_link "$LINENO"; then :
12752   ac_cv_lib_ldap_ldap_bind=yes
12753 else
12754   ac_cv_lib_ldap_ldap_bind=no
12755 fi
12756 rm -f core conftest.err conftest.$ac_objext \
12757     conftest$ac_exeext conftest.$ac_ext
12758 LIBS=$ac_check_lib_save_LIBS
12759 fi
12760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
12761 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
12762 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
12763   cat >>confdefs.h <<_ACEOF
12764 #define HAVE_LIBLDAP 1
12765 _ACEOF
12766
12767   LIBS="-lldap $LIBS"
12768
12769 else
12770   as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
12771 fi
12772
12773     LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
12774     if test "$enable_thread_safety" = yes; then
12775       # on some platforms ldap_r fails to link without PTHREAD_LIBS
12776       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_simple_bind in -lldap_r" >&5
12777 $as_echo_n "checking for ldap_simple_bind in -lldap_r... " >&6; }
12778 if ${ac_cv_lib_ldap_r_ldap_simple_bind+:} false; then :
12779   $as_echo_n "(cached) " >&6
12780 else
12781   ac_check_lib_save_LIBS=$LIBS
12782 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
12783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12784 /* end confdefs.h.  */
12785
12786 /* Override any GCC internal prototype to avoid an error.
12787    Use char because int might match the return type of a GCC
12788    builtin and then its argument prototype would still apply.  */
12789 #ifdef __cplusplus
12790 extern "C"
12791 #endif
12792 char ldap_simple_bind ();
12793 int
12794 main ()
12795 {
12796 return ldap_simple_bind ();
12797   ;
12798   return 0;
12799 }
12800 _ACEOF
12801 if ac_fn_c_try_link "$LINENO"; then :
12802   ac_cv_lib_ldap_r_ldap_simple_bind=yes
12803 else
12804   ac_cv_lib_ldap_r_ldap_simple_bind=no
12805 fi
12806 rm -f core conftest.err conftest.$ac_objext \
12807     conftest$ac_exeext conftest.$ac_ext
12808 LIBS=$ac_check_lib_save_LIBS
12809 fi
12810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
12811 $as_echo "$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
12812 if test "x$ac_cv_lib_ldap_r_ldap_simple_bind" = xyes; then :
12813   cat >>confdefs.h <<_ACEOF
12814 #define HAVE_LIBLDAP_R 1
12815 _ACEOF
12816
12817   LIBS="-lldap_r $LIBS"
12818
12819 else
12820   as_fn_error $? "library 'ldap_r' is required for LDAP" "$LINENO" 5
12821 fi
12822
12823       LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
12824     else
12825       LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
12826     fi
12827   else
12828     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
12829 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
12830 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
12831   $as_echo_n "(cached) " >&6
12832 else
12833   ac_check_lib_save_LIBS=$LIBS
12834 LIBS="-lwldap32  $LIBS"
12835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12836 /* end confdefs.h.  */
12837
12838 /* Override any GCC internal prototype to avoid an error.
12839    Use char because int might match the return type of a GCC
12840    builtin and then its argument prototype would still apply.  */
12841 #ifdef __cplusplus
12842 extern "C"
12843 #endif
12844 char ldap_bind ();
12845 int
12846 main ()
12847 {
12848 return ldap_bind ();
12849   ;
12850   return 0;
12851 }
12852 _ACEOF
12853 if ac_fn_c_try_link "$LINENO"; then :
12854   ac_cv_lib_wldap32_ldap_bind=yes
12855 else
12856   ac_cv_lib_wldap32_ldap_bind=no
12857 fi
12858 rm -f core conftest.err conftest.$ac_objext \
12859     conftest$ac_exeext conftest.$ac_ext
12860 LIBS=$ac_check_lib_save_LIBS
12861 fi
12862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
12863 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
12864 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
12865   cat >>confdefs.h <<_ACEOF
12866 #define HAVE_LIBWLDAP32 1
12867 _ACEOF
12868
12869   LIBS="-lwldap32 $LIBS"
12870
12871 else
12872   as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
12873 fi
12874
12875     LDAP_LIBS_FE="-lwldap32"
12876     LDAP_LIBS_BE="-lwldap32"
12877   fi
12878   LIBS="$_LIBS"
12879 fi
12880
12881
12882
12883
12884 # This test makes sure that run tests work at all.  Sometimes a shared
12885 # library is found by the linker, but the runtime linker can't find it.
12886 # This check should come after all modifications of compiler or linker
12887 # variables, and before any other run tests.
12888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
12889 $as_echo_n "checking test program... " >&6; }
12890 if test "$cross_compiling" = yes; then :
12891   { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
12892 $as_echo "cross-compiling" >&6; }
12893 else
12894   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12895 /* end confdefs.h.  */
12896 int main() { return 0; }
12897 _ACEOF
12898 if ac_fn_c_try_run "$LINENO"; then :
12899   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
12900 $as_echo "ok" >&6; }
12901 else
12902   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
12903 $as_echo "failed" >&6; }
12904 as_fn_error $? "
12905 Could not execute a simple test program.  This may be a problem
12906 related to locating shared libraries.  Check the file 'config.log'
12907 for the exact reason." "$LINENO" 5
12908 fi
12909 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12910   conftest.$ac_objext conftest.beam conftest.$ac_ext
12911 fi
12912
12913
12914 # --------------------
12915 # Run tests below here
12916 # --------------------
12917
12918 # Force use of our snprintf if system's doesn't do arg control
12919 # See comment above at snprintf test for details.
12920 if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
12921   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports argument control" >&5
12922 $as_echo_n "checking whether snprintf supports argument control... " >&6; }
12923 if ${pgac_cv_snprintf_arg_control+:} false; then :
12924   $as_echo_n "(cached) " >&6
12925 else
12926   if test "$cross_compiling" = yes; then :
12927   pgac_cv_snprintf_arg_control=cross
12928 else
12929   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12930 /* end confdefs.h.  */
12931 #include <stdio.h>
12932 #include <string.h>
12933
12934 int main()
12935 {
12936   char buf[100];
12937
12938   /* can it swap arguments? */
12939   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
12940   if (strcmp(buf, "4 3") != 0)
12941     return 1;
12942   return 0;
12943 }
12944 _ACEOF
12945 if ac_fn_c_try_run "$LINENO"; then :
12946   pgac_cv_snprintf_arg_control=yes
12947 else
12948   pgac_cv_snprintf_arg_control=no
12949 fi
12950 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12951   conftest.$ac_objext conftest.beam conftest.$ac_ext
12952 fi
12953
12954
12955 fi
12956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_arg_control" >&5
12957 $as_echo "$pgac_cv_snprintf_arg_control" >&6; }
12958
12959   if test $pgac_cv_snprintf_arg_control != yes ; then
12960     pgac_need_repl_snprintf=yes
12961   fi
12962 fi
12963
12964
12965
12966
12967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
12968 $as_echo_n "checking whether long int is 64 bits... " >&6; }
12969 if ${pgac_cv_type_long_int_64+:} false; then :
12970   $as_echo_n "(cached) " >&6
12971 else
12972   if test "$cross_compiling" = yes; then :
12973   # If cross-compiling, check the size reported by the compiler and
12974 # trust that the arithmetic works.
12975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12976 /* end confdefs.h.  */
12977
12978 int
12979 main ()
12980 {
12981 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
12982 test_array [0] = 0;
12983 return test_array [0];
12984
12985   ;
12986   return 0;
12987 }
12988 _ACEOF
12989 if ac_fn_c_try_compile "$LINENO"; then :
12990   pgac_cv_type_long_int_64=yes
12991 else
12992   pgac_cv_type_long_int_64=no
12993 fi
12994 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12995 else
12996   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12997 /* end confdefs.h.  */
12998 typedef long int ac_int64;
12999
13000 /*
13001  * These are globals to discourage the compiler from folding all the
13002  * arithmetic tests down to compile-time constants.
13003  */
13004 ac_int64 a = 20000001;
13005 ac_int64 b = 40000005;
13006
13007 int does_int64_work()
13008 {
13009   ac_int64 c,d;
13010
13011   if (sizeof(ac_int64) != 8)
13012     return 0;                   /* definitely not the right size */
13013
13014   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
13015   c = a * b;
13016   d = (c + b) / b;
13017   if (d != a+1)
13018     return 0;
13019   return 1;
13020 }
13021 main() {
13022   exit(! does_int64_work());
13023 }
13024 _ACEOF
13025 if ac_fn_c_try_run "$LINENO"; then :
13026   pgac_cv_type_long_int_64=yes
13027 else
13028   pgac_cv_type_long_int_64=no
13029 fi
13030 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13031   conftest.$ac_objext conftest.beam conftest.$ac_ext
13032 fi
13033
13034 fi
13035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
13036 $as_echo "$pgac_cv_type_long_int_64" >&6; }
13037
13038 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
13039 if test x"$pgac_cv_type_long_int_64" = xyes ; then
13040
13041 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
13042
13043 fi
13044
13045
13046 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
13047   pg_int64_type="long int"
13048 else
13049   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
13050 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
13051 if ${pgac_cv_type_long_long_int_64+:} false; then :
13052   $as_echo_n "(cached) " >&6
13053 else
13054   if test "$cross_compiling" = yes; then :
13055   # If cross-compiling, check the size reported by the compiler and
13056 # trust that the arithmetic works.
13057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13058 /* end confdefs.h.  */
13059
13060 int
13061 main ()
13062 {
13063 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
13064 test_array [0] = 0;
13065 return test_array [0];
13066
13067   ;
13068   return 0;
13069 }
13070 _ACEOF
13071 if ac_fn_c_try_compile "$LINENO"; then :
13072   pgac_cv_type_long_long_int_64=yes
13073 else
13074   pgac_cv_type_long_long_int_64=no
13075 fi
13076 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13077 else
13078   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13079 /* end confdefs.h.  */
13080 typedef long long int ac_int64;
13081
13082 /*
13083  * These are globals to discourage the compiler from folding all the
13084  * arithmetic tests down to compile-time constants.
13085  */
13086 ac_int64 a = 20000001;
13087 ac_int64 b = 40000005;
13088
13089 int does_int64_work()
13090 {
13091   ac_int64 c,d;
13092
13093   if (sizeof(ac_int64) != 8)
13094     return 0;                   /* definitely not the right size */
13095
13096   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
13097   c = a * b;
13098   d = (c + b) / b;
13099   if (d != a+1)
13100     return 0;
13101   return 1;
13102 }
13103 main() {
13104   exit(! does_int64_work());
13105 }
13106 _ACEOF
13107 if ac_fn_c_try_run "$LINENO"; then :
13108   pgac_cv_type_long_long_int_64=yes
13109 else
13110   pgac_cv_type_long_long_int_64=no
13111 fi
13112 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13113   conftest.$ac_objext conftest.beam conftest.$ac_ext
13114 fi
13115
13116 fi
13117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
13118 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
13119
13120 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
13121 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
13122
13123 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
13124
13125 fi
13126
13127   if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
13128     pg_int64_type="long long int"
13129   else
13130     as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
13131   fi
13132 fi
13133
13134
13135 cat >>confdefs.h <<_ACEOF
13136 #define PG_INT64_TYPE $pg_int64_type
13137 _ACEOF
13138
13139
13140
13141 if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
13142   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13143 /* end confdefs.h.  */
13144
13145 #define INT64CONST(x)  x##LL
13146 long long int foo = INT64CONST(0x1234567890123456);
13147
13148 int
13149 main ()
13150 {
13151
13152   ;
13153   return 0;
13154 }
13155 _ACEOF
13156 if ac_fn_c_try_compile "$LINENO"; then :
13157
13158 $as_echo "#define HAVE_LL_CONSTANTS 1" >>confdefs.h
13159
13160 fi
13161 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13162 fi
13163
13164
13165 # If we found "long int" is 64 bits, assume snprintf handles it.  If
13166 # we found we need to use "long long int", better check.  We cope with
13167 # snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
13168 # work, fall back to our own snprintf emulation (which we know uses %lld).
13169
13170 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
13171   if test $pgac_need_repl_snprintf = no; then
13172     { $as_echo "$as_me:${as_lineno-$LINENO}: checking snprintf length modifier for long long int" >&5
13173 $as_echo_n "checking snprintf length modifier for long long int... " >&6; }
13174 if ${pgac_cv_snprintf_long_long_int_modifier+:} false; then :
13175   $as_echo_n "(cached) " >&6
13176 else
13177   for pgac_modifier in 'll' 'q' 'I64'; do
13178 if test "$cross_compiling" = yes; then :
13179   pgac_cv_snprintf_long_long_int_modifier=cross; break
13180 else
13181   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13182 /* end confdefs.h.  */
13183 #include <stdio.h>
13184 typedef long long int ac_int64;
13185 #define INT64_FORMAT "%${pgac_modifier}d"
13186
13187 ac_int64 a = 20000001;
13188 ac_int64 b = 40000005;
13189
13190 int does_int64_snprintf_work()
13191 {
13192   ac_int64 c;
13193   char buf[100];
13194
13195   if (sizeof(ac_int64) != 8)
13196     return 0;                   /* doesn't look like the right size */
13197
13198   c = a * b;
13199   snprintf(buf, 100, INT64_FORMAT, c);
13200   if (strcmp(buf, "800000140000005") != 0)
13201     return 0;                   /* either multiply or snprintf is busted */
13202   return 1;
13203 }
13204 main() {
13205   exit(! does_int64_snprintf_work());
13206 }
13207 _ACEOF
13208 if ac_fn_c_try_run "$LINENO"; then :
13209   pgac_cv_snprintf_long_long_int_modifier=$pgac_modifier; break
13210 fi
13211 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13212   conftest.$ac_objext conftest.beam conftest.$ac_ext
13213 fi
13214
13215 done
13216 fi
13217
13218 LONG_LONG_INT_MODIFIER=''
13219
13220 case $pgac_cv_snprintf_long_long_int_modifier in
13221   cross) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot test (not on host machine)" >&5
13222 $as_echo "cannot test (not on host machine)" >&6; };;
13223   ?*)    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_long_long_int_modifier" >&5
13224 $as_echo "$pgac_cv_snprintf_long_long_int_modifier" >&6; }
13225          LONG_LONG_INT_MODIFIER=$pgac_cv_snprintf_long_long_int_modifier;;
13226   *)     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13227 $as_echo "none" >&6; };;
13228 esac
13229     if test "$LONG_LONG_INT_MODIFIER" = ""; then
13230       # Force usage of our own snprintf, since system snprintf is broken
13231       pgac_need_repl_snprintf=yes
13232       LONG_LONG_INT_MODIFIER='ll'
13233     fi
13234   else
13235     # Here if we previously decided we needed to use our own snprintf
13236     LONG_LONG_INT_MODIFIER='ll'
13237   fi
13238 else
13239   # Here if we are not using 'long long int' at all
13240   LONG_LONG_INT_MODIFIER='l'
13241 fi
13242
13243 INT64_MODIFIER="\"$LONG_LONG_INT_MODIFIER\""
13244
13245
13246 cat >>confdefs.h <<_ACEOF
13247 #define INT64_MODIFIER $INT64_MODIFIER
13248 _ACEOF
13249
13250
13251 # Also force use of our snprintf if the system's doesn't support the %z flag.
13252 if test "$pgac_need_repl_snprintf" = no; then
13253   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports the %z modifier" >&5
13254 $as_echo_n "checking whether snprintf supports the %z modifier... " >&6; }
13255 if ${pgac_cv_snprintf_size_t_support+:} false; then :
13256   $as_echo_n "(cached) " >&6
13257 else
13258   if test "$cross_compiling" = yes; then :
13259   pgac_cv_snprintf_size_t_support=cross
13260 else
13261   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13262 /* end confdefs.h.  */
13263 #include <stdio.h>
13264 #include <string.h>
13265
13266 int main()
13267 {
13268   char bufz[100];
13269   char buf64[100];
13270
13271   /*
13272    * Print the largest unsigned number fitting in a size_t using both %zu
13273    * and the previously-determined format for 64-bit integers.  Note that
13274    * we don't run this code unless we know snprintf handles 64-bit ints.
13275    */
13276   bufz[0] = '\0';  /* in case snprintf fails to emit anything */
13277   snprintf(bufz, sizeof(bufz), "%zu", ~((size_t) 0));
13278   snprintf(buf64, sizeof(buf64), "%" INT64_MODIFIER "u",
13279     (unsigned PG_INT64_TYPE) ~((size_t) 0));
13280   if (strcmp(bufz, buf64) != 0)
13281     return 1;
13282   return 0;
13283 }
13284 _ACEOF
13285 if ac_fn_c_try_run "$LINENO"; then :
13286   pgac_cv_snprintf_size_t_support=yes
13287 else
13288   pgac_cv_snprintf_size_t_support=no
13289 fi
13290 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13291   conftest.$ac_objext conftest.beam conftest.$ac_ext
13292 fi
13293
13294
13295 fi
13296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_size_t_support" >&5
13297 $as_echo "$pgac_cv_snprintf_size_t_support" >&6; }
13298
13299   if test "$pgac_cv_snprintf_size_t_support" != yes; then
13300     pgac_need_repl_snprintf=yes
13301   fi
13302 fi
13303
13304 # Now we have checked all the reasons to replace snprintf
13305 if test $pgac_need_repl_snprintf = yes; then
13306
13307 $as_echo "#define USE_REPL_SNPRINTF 1" >>confdefs.h
13308
13309   case " $LIBOBJS " in
13310   *" snprintf.$ac_objext "* ) ;;
13311   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
13312  ;;
13313 esac
13314
13315 fi
13316
13317 # Check size of void *, size_t (enables tweaks for > 32bit address space)
13318 # The cast to long int works around a bug in the HP C Compiler
13319 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13320 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13321 # This bug is HP SR number 8606223364.
13322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
13323 $as_echo_n "checking size of void *... " >&6; }
13324 if ${ac_cv_sizeof_void_p+:} false; then :
13325   $as_echo_n "(cached) " >&6
13326 else
13327   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
13328
13329 else
13330   if test "$ac_cv_type_void_p" = yes; then
13331      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13332 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13333 as_fn_error 77 "cannot compute sizeof (void *)
13334 See \`config.log' for more details" "$LINENO" 5; }
13335    else
13336      ac_cv_sizeof_void_p=0
13337    fi
13338 fi
13339
13340 fi
13341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
13342 $as_echo "$ac_cv_sizeof_void_p" >&6; }
13343
13344
13345
13346 cat >>confdefs.h <<_ACEOF
13347 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
13348 _ACEOF
13349
13350
13351 # The cast to long int works around a bug in the HP C Compiler
13352 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13353 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13354 # This bug is HP SR number 8606223364.
13355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
13356 $as_echo_n "checking size of size_t... " >&6; }
13357 if ${ac_cv_sizeof_size_t+:} false; then :
13358   $as_echo_n "(cached) " >&6
13359 else
13360   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
13361
13362 else
13363   if test "$ac_cv_type_size_t" = yes; then
13364      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13365 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13366 as_fn_error 77 "cannot compute sizeof (size_t)
13367 See \`config.log' for more details" "$LINENO" 5; }
13368    else
13369      ac_cv_sizeof_size_t=0
13370    fi
13371 fi
13372
13373 fi
13374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
13375 $as_echo "$ac_cv_sizeof_size_t" >&6; }
13376
13377
13378
13379 cat >>confdefs.h <<_ACEOF
13380 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
13381 _ACEOF
13382
13383
13384 # The cast to long int works around a bug in the HP C Compiler
13385 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13386 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13387 # This bug is HP SR number 8606223364.
13388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
13389 $as_echo_n "checking size of long... " >&6; }
13390 if ${ac_cv_sizeof_long+:} false; then :
13391   $as_echo_n "(cached) " >&6
13392 else
13393   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
13394
13395 else
13396   if test "$ac_cv_type_long" = yes; then
13397      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13398 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13399 as_fn_error 77 "cannot compute sizeof (long)
13400 See \`config.log' for more details" "$LINENO" 5; }
13401    else
13402      ac_cv_sizeof_long=0
13403    fi
13404 fi
13405
13406 fi
13407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
13408 $as_echo "$ac_cv_sizeof_long" >&6; }
13409
13410
13411
13412 cat >>confdefs.h <<_ACEOF
13413 #define SIZEOF_LONG $ac_cv_sizeof_long
13414 _ACEOF
13415
13416
13417
13418 # Decide whether float4 is passed by value: user-selectable, enabled by default
13419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float4 passed by value" >&5
13420 $as_echo_n "checking whether to build with float4 passed by value... " >&6; }
13421
13422
13423 # Check whether --enable-float4-byval was given.
13424 if test "${enable_float4_byval+set}" = set; then :
13425   enableval=$enable_float4_byval;
13426   case $enableval in
13427     yes)
13428
13429 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
13430
13431                float4passbyval=true
13432       ;;
13433     no)
13434       float4passbyval=false
13435       ;;
13436     *)
13437       as_fn_error $? "no argument expected for --enable-float4-byval option" "$LINENO" 5
13438       ;;
13439   esac
13440
13441 else
13442   enable_float4_byval=yes
13443
13444 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
13445
13446                float4passbyval=true
13447 fi
13448
13449
13450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float4_byval" >&5
13451 $as_echo "$enable_float4_byval" >&6; }
13452
13453 cat >>confdefs.h <<_ACEOF
13454 #define FLOAT4PASSBYVAL $float4passbyval
13455 _ACEOF
13456
13457
13458 # Decide whether float8 is passed by value.
13459 # Note: this setting also controls int8 and related types such as timestamp.
13460 # If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
13461 # If not, trying to select it is an error.
13462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float8 passed by value" >&5
13463 $as_echo_n "checking whether to build with float8 passed by value... " >&6; }
13464 if test $ac_cv_sizeof_void_p -ge 8 ; then
13465
13466
13467 # Check whether --enable-float8-byval was given.
13468 if test "${enable_float8_byval+set}" = set; then :
13469   enableval=$enable_float8_byval;
13470   case $enableval in
13471     yes)
13472       :
13473       ;;
13474     no)
13475       :
13476       ;;
13477     *)
13478       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
13479       ;;
13480   esac
13481
13482 else
13483   enable_float8_byval=yes
13484
13485 fi
13486
13487
13488 else
13489
13490
13491 # Check whether --enable-float8-byval was given.
13492 if test "${enable_float8_byval+set}" = set; then :
13493   enableval=$enable_float8_byval;
13494   case $enableval in
13495     yes)
13496       :
13497       ;;
13498     no)
13499       :
13500       ;;
13501     *)
13502       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
13503       ;;
13504   esac
13505
13506 else
13507   enable_float8_byval=no
13508
13509 fi
13510
13511
13512   if test "$enable_float8_byval" = yes ; then
13513     as_fn_error $? "--enable-float8-byval is not supported on 32-bit platforms." "$LINENO" 5
13514   fi
13515 fi
13516 if test "$enable_float8_byval" = yes ; then
13517
13518 $as_echo "#define USE_FLOAT8_BYVAL 1" >>confdefs.h
13519
13520   float8passbyval=true
13521 else
13522   float8passbyval=false
13523 fi
13524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float8_byval" >&5
13525 $as_echo "$enable_float8_byval" >&6; }
13526
13527 cat >>confdefs.h <<_ACEOF
13528 #define FLOAT8PASSBYVAL $float8passbyval
13529 _ACEOF
13530
13531
13532 # Determine memory alignment requirements for the basic C data types.
13533
13534 # The cast to long int works around a bug in the HP C Compiler,
13535 # see AC_CHECK_SIZEOF for more information.
13536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
13537 $as_echo_n "checking alignment of short... " >&6; }
13538 if ${ac_cv_alignof_short+:} false; then :
13539   $as_echo_n "(cached) " >&6
13540 else
13541   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short"        "$ac_includes_default
13542 #ifndef offsetof
13543 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13544 #endif
13545 typedef struct { char x; short y; } ac__type_alignof_;"; then :
13546
13547 else
13548   if test "$ac_cv_type_short" = yes; then
13549      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13550 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13551 as_fn_error 77 "cannot compute alignment of short
13552 See \`config.log' for more details" "$LINENO" 5; }
13553    else
13554      ac_cv_alignof_short=0
13555    fi
13556 fi
13557
13558 fi
13559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
13560 $as_echo "$ac_cv_alignof_short" >&6; }
13561
13562
13563
13564 cat >>confdefs.h <<_ACEOF
13565 #define ALIGNOF_SHORT $ac_cv_alignof_short
13566 _ACEOF
13567
13568
13569 # The cast to long int works around a bug in the HP C Compiler,
13570 # see AC_CHECK_SIZEOF for more information.
13571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
13572 $as_echo_n "checking alignment of int... " >&6; }
13573 if ${ac_cv_alignof_int+:} false; then :
13574   $as_echo_n "(cached) " >&6
13575 else
13576   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int"        "$ac_includes_default
13577 #ifndef offsetof
13578 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13579 #endif
13580 typedef struct { char x; int y; } ac__type_alignof_;"; then :
13581
13582 else
13583   if test "$ac_cv_type_int" = yes; then
13584      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13585 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13586 as_fn_error 77 "cannot compute alignment of int
13587 See \`config.log' for more details" "$LINENO" 5; }
13588    else
13589      ac_cv_alignof_int=0
13590    fi
13591 fi
13592
13593 fi
13594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
13595 $as_echo "$ac_cv_alignof_int" >&6; }
13596
13597
13598
13599 cat >>confdefs.h <<_ACEOF
13600 #define ALIGNOF_INT $ac_cv_alignof_int
13601 _ACEOF
13602
13603
13604 # The cast to long int works around a bug in the HP C Compiler,
13605 # see AC_CHECK_SIZEOF for more information.
13606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
13607 $as_echo_n "checking alignment of long... " >&6; }
13608 if ${ac_cv_alignof_long+:} false; then :
13609   $as_echo_n "(cached) " >&6
13610 else
13611   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long"        "$ac_includes_default
13612 #ifndef offsetof
13613 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13614 #endif
13615 typedef struct { char x; long y; } ac__type_alignof_;"; then :
13616
13617 else
13618   if test "$ac_cv_type_long" = yes; then
13619      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13620 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13621 as_fn_error 77 "cannot compute alignment of long
13622 See \`config.log' for more details" "$LINENO" 5; }
13623    else
13624      ac_cv_alignof_long=0
13625    fi
13626 fi
13627
13628 fi
13629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
13630 $as_echo "$ac_cv_alignof_long" >&6; }
13631
13632
13633
13634 cat >>confdefs.h <<_ACEOF
13635 #define ALIGNOF_LONG $ac_cv_alignof_long
13636 _ACEOF
13637
13638
13639 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
13640   # The cast to long int works around a bug in the HP C Compiler,
13641 # see AC_CHECK_SIZEOF for more information.
13642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
13643 $as_echo_n "checking alignment of long long int... " >&6; }
13644 if ${ac_cv_alignof_long_long_int+:} false; then :
13645   $as_echo_n "(cached) " >&6
13646 else
13647   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int"        "$ac_includes_default
13648 #ifndef offsetof
13649 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13650 #endif
13651 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
13652
13653 else
13654   if test "$ac_cv_type_long_long_int" = yes; then
13655      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13656 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13657 as_fn_error 77 "cannot compute alignment of long long int
13658 See \`config.log' for more details" "$LINENO" 5; }
13659    else
13660      ac_cv_alignof_long_long_int=0
13661    fi
13662 fi
13663
13664 fi
13665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
13666 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
13667
13668
13669
13670 cat >>confdefs.h <<_ACEOF
13671 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
13672 _ACEOF
13673
13674
13675 fi
13676 # The cast to long int works around a bug in the HP C Compiler,
13677 # see AC_CHECK_SIZEOF for more information.
13678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
13679 $as_echo_n "checking alignment of double... " >&6; }
13680 if ${ac_cv_alignof_double+:} false; then :
13681   $as_echo_n "(cached) " >&6
13682 else
13683   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double"        "$ac_includes_default
13684 #ifndef offsetof
13685 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13686 #endif
13687 typedef struct { char x; double y; } ac__type_alignof_;"; then :
13688
13689 else
13690   if test "$ac_cv_type_double" = yes; then
13691      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13692 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13693 as_fn_error 77 "cannot compute alignment of double
13694 See \`config.log' for more details" "$LINENO" 5; }
13695    else
13696      ac_cv_alignof_double=0
13697    fi
13698 fi
13699
13700 fi
13701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
13702 $as_echo "$ac_cv_alignof_double" >&6; }
13703
13704
13705
13706 cat >>confdefs.h <<_ACEOF
13707 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
13708 _ACEOF
13709
13710
13711
13712 # Compute maximum alignment of any basic type.
13713 # We assume long's alignment is at least as strong as char, short, or int;
13714 # but we must check long long (if it exists) and double.
13715
13716 MAX_ALIGNOF=$ac_cv_alignof_long
13717 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
13718   MAX_ALIGNOF=$ac_cv_alignof_double
13719 fi
13720 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
13721   MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
13722 fi
13723
13724 cat >>confdefs.h <<_ACEOF
13725 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
13726 _ACEOF
13727
13728
13729
13730 # Some platforms predefine the types int8, int16, etc.  Only check
13731 # a (hopefully) representative subset.
13732 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
13733 "
13734 if test "x$ac_cv_type_int8" = xyes; then :
13735
13736 cat >>confdefs.h <<_ACEOF
13737 #define HAVE_INT8 1
13738 _ACEOF
13739
13740
13741 fi
13742 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
13743 "
13744 if test "x$ac_cv_type_uint8" = xyes; then :
13745
13746 cat >>confdefs.h <<_ACEOF
13747 #define HAVE_UINT8 1
13748 _ACEOF
13749
13750
13751 fi
13752 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
13753 "
13754 if test "x$ac_cv_type_int64" = xyes; then :
13755
13756 cat >>confdefs.h <<_ACEOF
13757 #define HAVE_INT64 1
13758 _ACEOF
13759
13760
13761 fi
13762 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
13763 "
13764 if test "x$ac_cv_type_uint64" = xyes; then :
13765
13766 cat >>confdefs.h <<_ACEOF
13767 #define HAVE_UINT64 1
13768 _ACEOF
13769
13770
13771 fi
13772
13773
13774 # We also check for sig_atomic_t, which *should* be defined per ANSI
13775 # C, but is missing on some old platforms.
13776 ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "#include <signal.h>
13777 "
13778 if test "x$ac_cv_type_sig_atomic_t" = xyes; then :
13779
13780 cat >>confdefs.h <<_ACEOF
13781 #define HAVE_SIG_ATOMIC_T 1
13782 _ACEOF
13783
13784
13785 fi
13786
13787
13788 # Check for various atomic operations now that we have checked how to declare
13789 # 64bit integers.
13790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
13791 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
13792 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
13793   $as_echo_n "(cached) " >&6
13794 else
13795   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13796 /* end confdefs.h.  */
13797
13798 int
13799 main ()
13800 {
13801 char lock = 0;
13802    __sync_lock_test_and_set(&lock, 1);
13803    __sync_lock_release(&lock);
13804   ;
13805   return 0;
13806 }
13807 _ACEOF
13808 if ac_fn_c_try_link "$LINENO"; then :
13809   pgac_cv_gcc_sync_char_tas="yes"
13810 else
13811   pgac_cv_gcc_sync_char_tas="no"
13812 fi
13813 rm -f core conftest.err conftest.$ac_objext \
13814     conftest$ac_exeext conftest.$ac_ext
13815 fi
13816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
13817 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
13818 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
13819
13820 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
13821
13822 fi
13823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
13824 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
13825 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
13826   $as_echo_n "(cached) " >&6
13827 else
13828   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13829 /* end confdefs.h.  */
13830
13831 int
13832 main ()
13833 {
13834 int lock = 0;
13835    __sync_lock_test_and_set(&lock, 1);
13836    __sync_lock_release(&lock);
13837   ;
13838   return 0;
13839 }
13840 _ACEOF
13841 if ac_fn_c_try_link "$LINENO"; then :
13842   pgac_cv_gcc_sync_int32_tas="yes"
13843 else
13844   pgac_cv_gcc_sync_int32_tas="no"
13845 fi
13846 rm -f core conftest.err conftest.$ac_objext \
13847     conftest$ac_exeext conftest.$ac_ext
13848 fi
13849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
13850 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
13851 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
13852
13853 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
13854
13855 fi
13856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
13857 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
13858 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
13859   $as_echo_n "(cached) " >&6
13860 else
13861   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13862 /* end confdefs.h.  */
13863
13864 int
13865 main ()
13866 {
13867 int val = 0;
13868    __sync_val_compare_and_swap(&val, 0, 37);
13869   ;
13870   return 0;
13871 }
13872 _ACEOF
13873 if ac_fn_c_try_link "$LINENO"; then :
13874   pgac_cv_gcc_sync_int32_cas="yes"
13875 else
13876   pgac_cv_gcc_sync_int32_cas="no"
13877 fi
13878 rm -f core conftest.err conftest.$ac_objext \
13879     conftest$ac_exeext conftest.$ac_ext
13880 fi
13881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
13882 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
13883 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
13884
13885 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
13886
13887 fi
13888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
13889 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
13890 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
13891   $as_echo_n "(cached) " >&6
13892 else
13893   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13894 /* end confdefs.h.  */
13895
13896 int
13897 main ()
13898 {
13899 PG_INT64_TYPE lock = 0;
13900    __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
13901   ;
13902   return 0;
13903 }
13904 _ACEOF
13905 if ac_fn_c_try_link "$LINENO"; then :
13906   pgac_cv_gcc_sync_int64_cas="yes"
13907 else
13908   pgac_cv_gcc_sync_int64_cas="no"
13909 fi
13910 rm -f core conftest.err conftest.$ac_objext \
13911     conftest$ac_exeext conftest.$ac_ext
13912 fi
13913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
13914 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
13915 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
13916
13917 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
13918
13919 fi
13920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
13921 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
13922 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
13923   $as_echo_n "(cached) " >&6
13924 else
13925   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13926 /* end confdefs.h.  */
13927
13928 int
13929 main ()
13930 {
13931 int val = 0;
13932    int expect = 0;
13933    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
13934   ;
13935   return 0;
13936 }
13937 _ACEOF
13938 if ac_fn_c_try_link "$LINENO"; then :
13939   pgac_cv_gcc_atomic_int32_cas="yes"
13940 else
13941   pgac_cv_gcc_atomic_int32_cas="no"
13942 fi
13943 rm -f core conftest.err conftest.$ac_objext \
13944     conftest$ac_exeext conftest.$ac_ext
13945 fi
13946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
13947 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
13948 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
13949
13950 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
13951
13952 fi
13953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
13954 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
13955 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
13956   $as_echo_n "(cached) " >&6
13957 else
13958   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13959 /* end confdefs.h.  */
13960
13961 int
13962 main ()
13963 {
13964 PG_INT64_TYPE val = 0;
13965    PG_INT64_TYPE expect = 0;
13966    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
13967   ;
13968   return 0;
13969 }
13970 _ACEOF
13971 if ac_fn_c_try_link "$LINENO"; then :
13972   pgac_cv_gcc_atomic_int64_cas="yes"
13973 else
13974   pgac_cv_gcc_atomic_int64_cas="no"
13975 fi
13976 rm -f core conftest.err conftest.$ac_objext \
13977     conftest$ac_exeext conftest.$ac_ext
13978 fi
13979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
13980 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
13981 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
13982
13983 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
13984
13985 fi
13986
13987 if test "$PORTNAME" != "win32"
13988 then
13989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for POSIX signal interface" >&5
13990 $as_echo_n "checking for POSIX signal interface... " >&6; }
13991 if ${pgac_cv_func_posix_signals+:} false; then :
13992   $as_echo_n "(cached) " >&6
13993 else
13994   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13995 /* end confdefs.h.  */
13996 #include <signal.h>
13997
13998 int
13999 main ()
14000 {
14001 struct sigaction act, oact;
14002 sigemptyset(&act.sa_mask);
14003 act.sa_flags = SA_RESTART;
14004 sigaction(0, &act, &oact);
14005   ;
14006   return 0;
14007 }
14008 _ACEOF
14009 if ac_fn_c_try_link "$LINENO"; then :
14010   pgac_cv_func_posix_signals=yes
14011 else
14012   pgac_cv_func_posix_signals=no
14013 fi
14014 rm -f core conftest.err conftest.$ac_objext \
14015     conftest$ac_exeext conftest.$ac_ext
14016 fi
14017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_posix_signals" >&5
14018 $as_echo "$pgac_cv_func_posix_signals" >&6; }
14019 if test x"$pgac_cv_func_posix_signals" = xyes ; then
14020
14021 $as_echo "#define HAVE_POSIX_SIGNALS 1" >>confdefs.h
14022
14023 fi
14024 HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
14025
14026 if test "$pgac_cv_func_posix_signals" != yes -a "$enable_thread_safety" = yes; then
14027   as_fn_error $? "
14028 Thread-safety requires POSIX signals, which are not supported by this
14029 operating system;  use --disable-thread-safety to disable thread safety." "$LINENO" 5
14030 fi
14031 fi
14032
14033
14034 # Select semaphore implementation type.
14035 if test "$PORTNAME" != "win32"; then
14036   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
14037
14038 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
14039
14040     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
14041   else
14042     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
14043
14044 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
14045
14046       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
14047     else
14048
14049 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
14050
14051       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
14052     fi
14053   fi
14054 else
14055
14056 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
14057
14058   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
14059 fi
14060
14061
14062 # Select shared-memory implementation type.
14063 if test "$PORTNAME" != "win32"; then
14064
14065 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
14066
14067   SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
14068 else
14069
14070 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
14071
14072   SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
14073 fi
14074
14075 # Select latch implementation type.
14076 if test "$PORTNAME" != "win32"; then
14077   LATCH_IMPLEMENTATION="src/backend/port/unix_latch.c"
14078 else
14079   LATCH_IMPLEMENTATION="src/backend/port/win32_latch.c"
14080 fi
14081
14082 # If not set in template file, set bytes to use libc memset()
14083 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
14084   MEMSET_LOOP_LIMIT=1024
14085 fi
14086
14087 cat >>confdefs.h <<_ACEOF
14088 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
14089 _ACEOF
14090
14091
14092
14093 if test "$enable_nls" = yes ; then
14094
14095   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
14096 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
14097 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
14098   $as_echo_n "(cached) " >&6
14099 else
14100   ac_func_search_save_LIBS=$LIBS
14101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14102 /* end confdefs.h.  */
14103
14104 /* Override any GCC internal prototype to avoid an error.
14105    Use char because int might match the return type of a GCC
14106    builtin and then its argument prototype would still apply.  */
14107 #ifdef __cplusplus
14108 extern "C"
14109 #endif
14110 char bind_textdomain_codeset ();
14111 int
14112 main ()
14113 {
14114 return bind_textdomain_codeset ();
14115   ;
14116   return 0;
14117 }
14118 _ACEOF
14119 for ac_lib in '' intl; do
14120   if test -z "$ac_lib"; then
14121     ac_res="none required"
14122   else
14123     ac_res=-l$ac_lib
14124     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14125   fi
14126   if ac_fn_c_try_link "$LINENO"; then :
14127   ac_cv_search_bind_textdomain_codeset=$ac_res
14128 fi
14129 rm -f core conftest.err conftest.$ac_objext \
14130     conftest$ac_exeext
14131   if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
14132   break
14133 fi
14134 done
14135 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
14136
14137 else
14138   ac_cv_search_bind_textdomain_codeset=no
14139 fi
14140 rm conftest.$ac_ext
14141 LIBS=$ac_func_search_save_LIBS
14142 fi
14143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
14144 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
14145 ac_res=$ac_cv_search_bind_textdomain_codeset
14146 if test "$ac_res" != no; then :
14147   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14148
14149 else
14150   as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
14151 fi
14152
14153   ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
14154 if test "x$ac_cv_header_libintl_h" = xyes; then :
14155
14156 else
14157   as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
14158 fi
14159
14160
14161   for ac_prog in msgfmt
14162 do
14163   # Extract the first word of "$ac_prog", so it can be a program name with args.
14164 set dummy $ac_prog; ac_word=$2
14165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14166 $as_echo_n "checking for $ac_word... " >&6; }
14167 if ${ac_cv_prog_MSGFMT+:} false; then :
14168   $as_echo_n "(cached) " >&6
14169 else
14170   if test -n "$MSGFMT"; then
14171   ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
14172 else
14173 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14174 for as_dir in $PATH
14175 do
14176   IFS=$as_save_IFS
14177   test -z "$as_dir" && as_dir=.
14178     for ac_exec_ext in '' $ac_executable_extensions; do
14179   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14180     ac_cv_prog_MSGFMT="$ac_prog"
14181     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14182     break 2
14183   fi
14184 done
14185   done
14186 IFS=$as_save_IFS
14187
14188 fi
14189 fi
14190 MSGFMT=$ac_cv_prog_MSGFMT
14191 if test -n "$MSGFMT"; then
14192   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
14193 $as_echo "$MSGFMT" >&6; }
14194 else
14195   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14196 $as_echo "no" >&6; }
14197 fi
14198
14199
14200   test -n "$MSGFMT" && break
14201 done
14202
14203   if test -z "$MSGFMT"; then
14204     as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
14205   fi
14206   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
14207 $as_echo_n "checking for msgfmt flags... " >&6; }
14208 if ${pgac_cv_msgfmt_flags+:} false; then :
14209   $as_echo_n "(cached) " >&6
14210 else
14211   if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
14212     pgac_cv_msgfmt_flags=-c
14213 fi
14214 fi
14215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
14216 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
14217   MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
14218
14219   for ac_prog in msgmerge
14220 do
14221   # Extract the first word of "$ac_prog", so it can be a program name with args.
14222 set dummy $ac_prog; ac_word=$2
14223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14224 $as_echo_n "checking for $ac_word... " >&6; }
14225 if ${ac_cv_prog_MSGMERGE+:} false; then :
14226   $as_echo_n "(cached) " >&6
14227 else
14228   if test -n "$MSGMERGE"; then
14229   ac_cv_prog_MSGMERGE="$MSGMERGE" # Let the user override the test.
14230 else
14231 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14232 for as_dir in $PATH
14233 do
14234   IFS=$as_save_IFS
14235   test -z "$as_dir" && as_dir=.
14236     for ac_exec_ext in '' $ac_executable_extensions; do
14237   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14238     ac_cv_prog_MSGMERGE="$ac_prog"
14239     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14240     break 2
14241   fi
14242 done
14243   done
14244 IFS=$as_save_IFS
14245
14246 fi
14247 fi
14248 MSGMERGE=$ac_cv_prog_MSGMERGE
14249 if test -n "$MSGMERGE"; then
14250   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
14251 $as_echo "$MSGMERGE" >&6; }
14252 else
14253   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14254 $as_echo "no" >&6; }
14255 fi
14256
14257
14258   test -n "$MSGMERGE" && break
14259 done
14260
14261   for ac_prog in xgettext
14262 do
14263   # Extract the first word of "$ac_prog", so it can be a program name with args.
14264 set dummy $ac_prog; ac_word=$2
14265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14266 $as_echo_n "checking for $ac_word... " >&6; }
14267 if ${ac_cv_prog_XGETTEXT+:} false; then :
14268   $as_echo_n "(cached) " >&6
14269 else
14270   if test -n "$XGETTEXT"; then
14271   ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test.
14272 else
14273 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14274 for as_dir in $PATH
14275 do
14276   IFS=$as_save_IFS
14277   test -z "$as_dir" && as_dir=.
14278     for ac_exec_ext in '' $ac_executable_extensions; do
14279   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14280     ac_cv_prog_XGETTEXT="$ac_prog"
14281     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14282     break 2
14283   fi
14284 done
14285   done
14286 IFS=$as_save_IFS
14287
14288 fi
14289 fi
14290 XGETTEXT=$ac_cv_prog_XGETTEXT
14291 if test -n "$XGETTEXT"; then
14292   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
14293 $as_echo "$XGETTEXT" >&6; }
14294 else
14295   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14296 $as_echo "no" >&6; }
14297 fi
14298
14299
14300   test -n "$XGETTEXT" && break
14301 done
14302
14303
14304 fi
14305
14306 # Check for Tcl configuration script tclConfig.sh
14307 if test "$with_tcl" = yes; then
14308     for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84 tclsh8.3 tclsh83
14309 do
14310   # Extract the first word of "$ac_prog", so it can be a program name with args.
14311 set dummy $ac_prog; ac_word=$2
14312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14313 $as_echo_n "checking for $ac_word... " >&6; }
14314 if ${ac_cv_path_TCLSH+:} false; then :
14315   $as_echo_n "(cached) " >&6
14316 else
14317   case $TCLSH in
14318   [\\/]* | ?:[\\/]*)
14319   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
14320   ;;
14321   *)
14322   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14323 for as_dir in $PATH
14324 do
14325   IFS=$as_save_IFS
14326   test -z "$as_dir" && as_dir=.
14327     for ac_exec_ext in '' $ac_executable_extensions; do
14328   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14329     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
14330     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14331     break 2
14332   fi
14333 done
14334   done
14335 IFS=$as_save_IFS
14336
14337   ;;
14338 esac
14339 fi
14340 TCLSH=$ac_cv_path_TCLSH
14341 if test -n "$TCLSH"; then
14342   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
14343 $as_echo "$TCLSH" >&6; }
14344 else
14345   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14346 $as_echo "no" >&6; }
14347 fi
14348
14349
14350   test -n "$TCLSH" && break
14351 done
14352
14353 if test x"$TCLSH" = x""; then
14354   as_fn_error $? "Tcl shell not found" "$LINENO" 5
14355 fi
14356
14357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
14358 $as_echo_n "checking for tclConfig.sh... " >&6; }
14359 # Let user override test
14360 if test -z "$TCL_CONFIG_SH"; then
14361     pgac_test_dirs="$with_tclconfig"
14362
14363     set X $pgac_test_dirs; shift
14364     if test $# -eq 0; then
14365         test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
14366         set X `echo 'puts $auto_path' | $TCLSH`; shift
14367     fi
14368
14369     for pgac_dir do
14370         if test -r "$pgac_dir/tclConfig.sh"; then
14371             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
14372             break
14373         fi
14374     done
14375 fi
14376
14377 if test -z "$TCL_CONFIG_SH"; then
14378     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14379 $as_echo "no" >&6; }
14380     as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
14381 else
14382     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
14383 $as_echo "$TCL_CONFIG_SH" >&6; }
14384 fi
14385
14386
14387
14388     . "$TCL_CONFIG_SH"
14389 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
14390 eval TCL_LIB_FILE=\"$TCL_LIB_FILE\"
14391 eval TCL_LIBS=\"$TCL_LIBS\"
14392 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
14393 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
14394
14395         # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
14396     ac_save_CPPFLAGS=$CPPFLAGS
14397     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
14398     ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
14399 if test "x$ac_cv_header_tcl_h" = xyes; then :
14400
14401 else
14402   as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
14403 fi
14404
14405
14406     CPPFLAGS=$ac_save_CPPFLAGS
14407 fi
14408
14409 # check for <perl.h>
14410 if test "$with_perl" = yes; then
14411   ac_save_CPPFLAGS=$CPPFLAGS
14412   CPPFLAGS="$CPPFLAGS -I$perl_archlibexp/CORE"
14413   ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
14414 "
14415 if test "x$ac_cv_header_perl_h" = xyes; then :
14416
14417 else
14418   as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
14419 fi
14420
14421
14422   # While we're at it, check that we can link to libperl.
14423   # On most platforms, if perl.h is there then libperl.so will be too, but at
14424   # this writing Debian packages them separately.  There is no known reason to
14425   # waste cycles on separate probes for the Tcl or Python libraries, though.
14426   pgac_save_LIBS=$LIBS
14427   LIBS="$perl_embed_ldflags"
14428   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
14429 $as_echo_n "checking for libperl... " >&6; }
14430   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14431 /* end confdefs.h.  */
14432
14433 #include <EXTERN.h>
14434 #include <perl.h>
14435
14436 int
14437 main ()
14438 {
14439 perl_alloc();
14440   ;
14441   return 0;
14442 }
14443 _ACEOF
14444 if ac_fn_c_try_link "$LINENO"; then :
14445   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14446 $as_echo "yes" >&6; }
14447 else
14448   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14449 $as_echo "no" >&6; }
14450      as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
14451 fi
14452 rm -f core conftest.err conftest.$ac_objext \
14453     conftest$ac_exeext conftest.$ac_ext
14454   LIBS=$pgac_save_LIBS
14455   CPPFLAGS=$ac_save_CPPFLAGS
14456 fi
14457
14458 # check for <Python.h>
14459 if test "$with_python" = yes; then
14460   ac_save_CPPFLAGS=$CPPFLAGS
14461   CPPFLAGS="$python_includespec $CPPFLAGS"
14462   ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
14463 if test "x$ac_cv_header_Python_h" = xyes; then :
14464
14465 else
14466   as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
14467 fi
14468
14469
14470   CPPFLAGS=$ac_save_CPPFLAGS
14471 fi
14472
14473 #
14474 # Check for DocBook and tools
14475 #
14476 for ac_prog in onsgmls nsgmls
14477 do
14478   # Extract the first word of "$ac_prog", so it can be a program name with args.
14479 set dummy $ac_prog; ac_word=$2
14480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14481 $as_echo_n "checking for $ac_word... " >&6; }
14482 if ${ac_cv_prog_NSGMLS+:} false; then :
14483   $as_echo_n "(cached) " >&6
14484 else
14485   if test -n "$NSGMLS"; then
14486   ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
14487 else
14488 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14489 for as_dir in $PATH
14490 do
14491   IFS=$as_save_IFS
14492   test -z "$as_dir" && as_dir=.
14493     for ac_exec_ext in '' $ac_executable_extensions; do
14494   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14495     ac_cv_prog_NSGMLS="$ac_prog"
14496     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14497     break 2
14498   fi
14499 done
14500   done
14501 IFS=$as_save_IFS
14502
14503 fi
14504 fi
14505 NSGMLS=$ac_cv_prog_NSGMLS
14506 if test -n "$NSGMLS"; then
14507   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NSGMLS" >&5
14508 $as_echo "$NSGMLS" >&6; }
14509 else
14510   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14511 $as_echo "no" >&6; }
14512 fi
14513
14514
14515   test -n "$NSGMLS" && break
14516 done
14517
14518 for ac_prog in openjade jade
14519 do
14520   # Extract the first word of "$ac_prog", so it can be a program name with args.
14521 set dummy $ac_prog; ac_word=$2
14522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14523 $as_echo_n "checking for $ac_word... " >&6; }
14524 if ${ac_cv_prog_JADE+:} false; then :
14525   $as_echo_n "(cached) " >&6
14526 else
14527   if test -n "$JADE"; then
14528   ac_cv_prog_JADE="$JADE" # Let the user override the test.
14529 else
14530 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14531 for as_dir in $PATH
14532 do
14533   IFS=$as_save_IFS
14534   test -z "$as_dir" && as_dir=.
14535     for ac_exec_ext in '' $ac_executable_extensions; do
14536   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14537     ac_cv_prog_JADE="$ac_prog"
14538     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14539     break 2
14540   fi
14541 done
14542   done
14543 IFS=$as_save_IFS
14544
14545 fi
14546 fi
14547 JADE=$ac_cv_prog_JADE
14548 if test -n "$JADE"; then
14549   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JADE" >&5
14550 $as_echo "$JADE" >&6; }
14551 else
14552   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14553 $as_echo "no" >&6; }
14554 fi
14555
14556
14557   test -n "$JADE" && break
14558 done
14559
14560
14561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook V4.2" >&5
14562 $as_echo_n "checking for DocBook V4.2... " >&6; }
14563 if ${pgac_cv_check_docbook+:} false; then :
14564   $as_echo_n "(cached) " >&6
14565 else
14566   cat >conftest.sgml <<EOF
14567 <!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
14568 <book>
14569  <title>test</title>
14570  <chapter>
14571   <title>random</title>
14572    <sect1>
14573     <title>testsect</title>
14574     <para>text</para>
14575   </sect1>
14576  </chapter>
14577 </book>
14578 EOF
14579
14580 pgac_cv_check_docbook=no
14581
14582 if test -n "$NSGMLS"; then
14583   $NSGMLS -s conftest.sgml 1>&5 2>&1
14584   if test $? -eq 0; then
14585     pgac_cv_check_docbook=yes
14586   fi
14587 fi
14588 rm -f conftest.sgml
14589 fi
14590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_docbook" >&5
14591 $as_echo "$pgac_cv_check_docbook" >&6; }
14592
14593 have_docbook=$pgac_cv_check_docbook
14594
14595
14596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook stylesheets" >&5
14597 $as_echo_n "checking for DocBook stylesheets... " >&6; }
14598 if ${pgac_cv_path_stylesheets+:} false; then :
14599   $as_echo_n "(cached) " >&6
14600 else
14601   if test -n "$DOCBOOKSTYLE"; then
14602   pgac_cv_path_stylesheets=$DOCBOOKSTYLE
14603 else
14604   for pgac_prefix in /usr /usr/local /opt /sw; do
14605     for pgac_infix in share lib; do
14606       for pgac_postfix in \
14607         sgml/stylesheets/nwalsh-modular \
14608         sgml/stylesheets/docbook \
14609         sgml/stylesheets/dsssl/docbook \
14610         sgml/docbook-dsssl \
14611         sgml/docbook/dsssl/modular \
14612         sgml/docbook/stylesheet/dsssl/modular \
14613         sgml/docbook/dsssl-stylesheets \
14614         sgml/dsssl/docbook-dsssl-nwalsh
14615       do
14616         pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
14617         if test -r "$pgac_candidate/html/docbook.dsl" \
14618            && test -r "$pgac_candidate/print/docbook.dsl"
14619         then
14620           pgac_cv_path_stylesheets=$pgac_candidate
14621           break 3
14622         fi
14623       done
14624     done
14625   done
14626 fi
14627 fi
14628
14629 DOCBOOKSTYLE=$pgac_cv_path_stylesheets
14630
14631 if test -n "$DOCBOOKSTYLE"; then
14632   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOCBOOKSTYLE" >&5
14633 $as_echo "$DOCBOOKSTYLE" >&6; }
14634 else
14635   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14636 $as_echo "no" >&6; }
14637 fi
14638 if test -n "$DOCBOOKSTYLE" -a -r "$DOCBOOKSTYLE/bin/collateindex.pl"; then
14639   COLLATEINDEX="$DOCBOOKSTYLE/bin/collateindex.pl"
14640
14641 else
14642   # Extract the first word of "collateindex.pl", so it can be a program name with args.
14643 set dummy collateindex.pl; ac_word=$2
14644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14645 $as_echo_n "checking for $ac_word... " >&6; }
14646 if ${ac_cv_path_COLLATEINDEX+:} false; then :
14647   $as_echo_n "(cached) " >&6
14648 else
14649   case $COLLATEINDEX in
14650   [\\/]* | ?:[\\/]*)
14651   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
14652   ;;
14653   *)
14654   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14655 for as_dir in $PATH
14656 do
14657   IFS=$as_save_IFS
14658   test -z "$as_dir" && as_dir=.
14659     for ac_exec_ext in '' $ac_executable_extensions; do
14660   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14661     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
14662     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14663     break 2
14664   fi
14665 done
14666   done
14667 IFS=$as_save_IFS
14668
14669   ;;
14670 esac
14671 fi
14672 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
14673 if test -n "$COLLATEINDEX"; then
14674   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COLLATEINDEX" >&5
14675 $as_echo "$COLLATEINDEX" >&6; }
14676 else
14677   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14678 $as_echo "no" >&6; }
14679 fi
14680
14681
14682 fi
14683 for ac_prog in dbtoepub
14684 do
14685   # Extract the first word of "$ac_prog", so it can be a program name with args.
14686 set dummy $ac_prog; ac_word=$2
14687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14688 $as_echo_n "checking for $ac_word... " >&6; }
14689 if ${ac_cv_prog_DBTOEPUB+:} false; then :
14690   $as_echo_n "(cached) " >&6
14691 else
14692   if test -n "$DBTOEPUB"; then
14693   ac_cv_prog_DBTOEPUB="$DBTOEPUB" # Let the user override the test.
14694 else
14695 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14696 for as_dir in $PATH
14697 do
14698   IFS=$as_save_IFS
14699   test -z "$as_dir" && as_dir=.
14700     for ac_exec_ext in '' $ac_executable_extensions; do
14701   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14702     ac_cv_prog_DBTOEPUB="$ac_prog"
14703     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14704     break 2
14705   fi
14706 done
14707   done
14708 IFS=$as_save_IFS
14709
14710 fi
14711 fi
14712 DBTOEPUB=$ac_cv_prog_DBTOEPUB
14713 if test -n "$DBTOEPUB"; then
14714   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
14715 $as_echo "$DBTOEPUB" >&6; }
14716 else
14717   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14718 $as_echo "no" >&6; }
14719 fi
14720
14721
14722   test -n "$DBTOEPUB" && break
14723 done
14724
14725 for ac_prog in xmllint
14726 do
14727   # Extract the first word of "$ac_prog", so it can be a program name with args.
14728 set dummy $ac_prog; ac_word=$2
14729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14730 $as_echo_n "checking for $ac_word... " >&6; }
14731 if ${ac_cv_prog_XMLLINT+:} false; then :
14732   $as_echo_n "(cached) " >&6
14733 else
14734   if test -n "$XMLLINT"; then
14735   ac_cv_prog_XMLLINT="$XMLLINT" # Let the user override the test.
14736 else
14737 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14738 for as_dir in $PATH
14739 do
14740   IFS=$as_save_IFS
14741   test -z "$as_dir" && as_dir=.
14742     for ac_exec_ext in '' $ac_executable_extensions; do
14743   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14744     ac_cv_prog_XMLLINT="$ac_prog"
14745     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14746     break 2
14747   fi
14748 done
14749   done
14750 IFS=$as_save_IFS
14751
14752 fi
14753 fi
14754 XMLLINT=$ac_cv_prog_XMLLINT
14755 if test -n "$XMLLINT"; then
14756   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
14757 $as_echo "$XMLLINT" >&6; }
14758 else
14759   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14760 $as_echo "no" >&6; }
14761 fi
14762
14763
14764   test -n "$XMLLINT" && break
14765 done
14766
14767 for ac_prog in xsltproc
14768 do
14769   # Extract the first word of "$ac_prog", so it can be a program name with args.
14770 set dummy $ac_prog; ac_word=$2
14771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14772 $as_echo_n "checking for $ac_word... " >&6; }
14773 if ${ac_cv_prog_XSLTPROC+:} false; then :
14774   $as_echo_n "(cached) " >&6
14775 else
14776   if test -n "$XSLTPROC"; then
14777   ac_cv_prog_XSLTPROC="$XSLTPROC" # Let the user override the test.
14778 else
14779 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14780 for as_dir in $PATH
14781 do
14782   IFS=$as_save_IFS
14783   test -z "$as_dir" && as_dir=.
14784     for ac_exec_ext in '' $ac_executable_extensions; do
14785   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14786     ac_cv_prog_XSLTPROC="$ac_prog"
14787     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14788     break 2
14789   fi
14790 done
14791   done
14792 IFS=$as_save_IFS
14793
14794 fi
14795 fi
14796 XSLTPROC=$ac_cv_prog_XSLTPROC
14797 if test -n "$XSLTPROC"; then
14798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
14799 $as_echo "$XSLTPROC" >&6; }
14800 else
14801   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14802 $as_echo "no" >&6; }
14803 fi
14804
14805
14806   test -n "$XSLTPROC" && break
14807 done
14808
14809 for ac_prog in osx sgml2xml sx
14810 do
14811   # Extract the first word of "$ac_prog", so it can be a program name with args.
14812 set dummy $ac_prog; ac_word=$2
14813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14814 $as_echo_n "checking for $ac_word... " >&6; }
14815 if ${ac_cv_prog_OSX+:} false; then :
14816   $as_echo_n "(cached) " >&6
14817 else
14818   if test -n "$OSX"; then
14819   ac_cv_prog_OSX="$OSX" # Let the user override the test.
14820 else
14821 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14822 for as_dir in $PATH
14823 do
14824   IFS=$as_save_IFS
14825   test -z "$as_dir" && as_dir=.
14826     for ac_exec_ext in '' $ac_executable_extensions; do
14827   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14828     ac_cv_prog_OSX="$ac_prog"
14829     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14830     break 2
14831   fi
14832 done
14833   done
14834 IFS=$as_save_IFS
14835
14836 fi
14837 fi
14838 OSX=$ac_cv_prog_OSX
14839 if test -n "$OSX"; then
14840   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OSX" >&5
14841 $as_echo "$OSX" >&6; }
14842 else
14843   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14844 $as_echo "no" >&6; }
14845 fi
14846
14847
14848   test -n "$OSX" && break
14849 done
14850
14851
14852 #
14853 # Check for test tools
14854 #
14855 if test "$enable_tap_tests" = yes; then
14856   for ac_prog in prove
14857 do
14858   # Extract the first word of "$ac_prog", so it can be a program name with args.
14859 set dummy $ac_prog; ac_word=$2
14860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14861 $as_echo_n "checking for $ac_word... " >&6; }
14862 if ${ac_cv_prog_PROVE+:} false; then :
14863   $as_echo_n "(cached) " >&6
14864 else
14865   if test -n "$PROVE"; then
14866   ac_cv_prog_PROVE="$PROVE" # Let the user override the test.
14867 else
14868 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14869 for as_dir in $PATH
14870 do
14871   IFS=$as_save_IFS
14872   test -z "$as_dir" && as_dir=.
14873     for ac_exec_ext in '' $ac_executable_extensions; do
14874   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14875     ac_cv_prog_PROVE="$ac_prog"
14876     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14877     break 2
14878   fi
14879 done
14880   done
14881 IFS=$as_save_IFS
14882
14883 fi
14884 fi
14885 PROVE=$ac_cv_prog_PROVE
14886 if test -n "$PROVE"; then
14887   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
14888 $as_echo "$PROVE" >&6; }
14889 else
14890   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14891 $as_echo "no" >&6; }
14892 fi
14893
14894
14895   test -n "$PROVE" && break
14896 done
14897
14898   if test -z "$PROVE"; then
14899     as_fn_error $? "prove not found" "$LINENO" 5
14900   fi
14901   if test -z "$PERL"; then
14902     as_fn_error $? "Perl not found" "$LINENO" 5
14903   fi
14904 fi
14905
14906 # Thread testing
14907
14908 # We have to run the thread test near the end so we have all our symbols
14909 # defined.  Cross compiling throws a warning.
14910 #
14911 if test "$enable_thread_safety" = yes; then
14912 if test "$PORTNAME" != "win32"
14913 then
14914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking thread safety of required library functions" >&5
14915 $as_echo_n "checking thread safety of required library functions... " >&6; }
14916
14917 _CFLAGS="$CFLAGS"
14918 _LIBS="$LIBS"
14919 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
14920 LIBS="$LIBS $PTHREAD_LIBS"
14921 if test "$cross_compiling" = yes; then :
14922   { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
14923 $as_echo "maybe" >&6; }
14924   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
14925 *** Skipping thread test program because of cross-compile build.
14926 *** Run the program in src/test/thread on the target machine.
14927 " >&5
14928 $as_echo "$as_me: WARNING:
14929 *** Skipping thread test program because of cross-compile build.
14930 *** Run the program in src/test/thread on the target machine.
14931 " >&2;}
14932 else
14933   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14934 /* end confdefs.h.  */
14935 #include "$srcdir/src/test/thread/thread_test.c"
14936 _ACEOF
14937 if ac_fn_c_try_run "$LINENO"; then :
14938   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14939 $as_echo "yes" >&6; }
14940 else
14941   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14942 $as_echo "no" >&6; }
14943   as_fn_error $? "thread test program failed
14944 This platform is not thread-safe.  Check the file 'config.log' or compile
14945 and run src/test/thread/thread_test for the exact reason.
14946 Use --disable-thread-safety to disable thread safety." "$LINENO" 5
14947 fi
14948 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14949   conftest.$ac_objext conftest.beam conftest.$ac_ext
14950 fi
14951
14952 CFLAGS="$_CFLAGS"
14953 LIBS="$_LIBS"
14954 else
14955 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** skipping thread test on Win32" >&5
14956 $as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
14957 fi
14958 fi
14959
14960 # If compiler will take -Wl,--as-needed (or various platform-specific
14961 # spellings thereof) then add that to LDFLAGS.  This is much easier than
14962 # trying to filter LIBS to the minimum for each executable.
14963 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
14964 # libreadline; therefore we postpone testing it until we know what library
14965 # dependencies readline has.  The test code will try to link with $LIBS.
14966 if test "$with_readline" = yes; then
14967   link_test_func=readline
14968 else
14969   link_test_func=exit
14970 fi
14971
14972 if test "$PORTNAME" = "darwin"; then
14973   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
14974 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
14975 if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
14976   $as_echo_n "(cached) " >&6
14977 else
14978   pgac_save_LDFLAGS=$LDFLAGS
14979 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
14980 if test "$cross_compiling" = yes; then :
14981   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
14982 else
14983   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14984 /* end confdefs.h.  */
14985 extern void $link_test_func (); void (*fptr) () = $link_test_func;
14986 int
14987 main ()
14988 {
14989
14990   ;
14991   return 0;
14992 }
14993 _ACEOF
14994 if ac_fn_c_try_run "$LINENO"; then :
14995   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
14996 else
14997   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
14998 fi
14999 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15000   conftest.$ac_objext conftest.beam conftest.$ac_ext
15001 fi
15002
15003 LDFLAGS="$pgac_save_LDFLAGS"
15004 fi
15005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
15006 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
15007 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
15008   LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
15009 fi
15010
15011 elif test "$PORTNAME" = "openbsd"; then
15012   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
15013 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
15014 if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
15015   $as_echo_n "(cached) " >&6
15016 else
15017   pgac_save_LDFLAGS=$LDFLAGS
15018 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
15019 if test "$cross_compiling" = yes; then :
15020   pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
15021 else
15022   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15023 /* end confdefs.h.  */
15024 extern void $link_test_func (); void (*fptr) () = $link_test_func;
15025 int
15026 main ()
15027 {
15028
15029   ;
15030   return 0;
15031 }
15032 _ACEOF
15033 if ac_fn_c_try_run "$LINENO"; then :
15034   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
15035 else
15036   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
15037 fi
15038 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15039   conftest.$ac_objext conftest.beam conftest.$ac_ext
15040 fi
15041
15042 LDFLAGS="$pgac_save_LDFLAGS"
15043 fi
15044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
15045 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
15046 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
15047   LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
15048 fi
15049
15050 else
15051   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
15052 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
15053 if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
15054   $as_echo_n "(cached) " >&6
15055 else
15056   pgac_save_LDFLAGS=$LDFLAGS
15057 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
15058 if test "$cross_compiling" = yes; then :
15059   pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
15060 else
15061   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15062 /* end confdefs.h.  */
15063 extern void $link_test_func (); void (*fptr) () = $link_test_func;
15064 int
15065 main ()
15066 {
15067
15068   ;
15069   return 0;
15070 }
15071 _ACEOF
15072 if ac_fn_c_try_run "$LINENO"; then :
15073   pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
15074 else
15075   pgac_cv_prog_cc_ldflags__Wl___as_needed=no
15076 fi
15077 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15078   conftest.$ac_objext conftest.beam conftest.$ac_ext
15079 fi
15080
15081 LDFLAGS="$pgac_save_LDFLAGS"
15082 fi
15083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
15084 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
15085 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
15086   LDFLAGS="$LDFLAGS -Wl,--as-needed"
15087 fi
15088
15089 fi
15090
15091 # Create compiler version string
15092 if test x"$GCC" = x"yes" ; then
15093   cc_string=`${CC} --version | sed q`
15094   case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
15095 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
15096   cc_string=`${CC} -V 2>&1 | sed q`
15097 else
15098   cc_string=$CC
15099 fi
15100
15101
15102 cat >>confdefs.h <<_ACEOF
15103 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
15104 _ACEOF
15105
15106
15107 # Supply a numeric version string for use by 3rd party add-ons
15108 # awk -F is a regex on some platforms, and not on others, so make "." a tab
15109 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
15110 tr '.' '        ' |
15111 $AWK '{printf "%d%02d%02d", $1, $2, (NF >= 3) ? $3 : 0}'`"
15112
15113 cat >>confdefs.h <<_ACEOF
15114 #define PG_VERSION_NUM $PG_VERSION_NUM
15115 _ACEOF
15116
15117
15118
15119 # Begin output steps
15120
15121 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
15122 $as_echo "$as_me: using compiler=$cc_string" >&6;}
15123 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
15124 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
15125 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
15126 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
15127 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
15128 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
15129
15130 # prepare build tree if outside source tree
15131 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
15132 # Note 2: /bin/pwd might be better than shell's built-in at getting
15133 #         a symlink-free name.
15134 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
15135   vpath_build=no
15136 else
15137   vpath_build=yes
15138   if test "$no_create" != yes; then
15139     $as_echo_n "preparing build tree... " >&6
15140     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
15141     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
15142       || as_fn_error $? "failed" "$LINENO" 5
15143     { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15144 $as_echo "done" >&6; }
15145   fi
15146 fi
15147
15148
15149
15150 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
15151
15152
15153 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}"
15154
15155
15156 if test "$PORTNAME" = "win32"; then
15157 ac_config_commands="$ac_config_commands check_win32_symlinks"
15158
15159 fi
15160
15161 ac_config_headers="$ac_config_headers src/include/pg_config.h"
15162
15163
15164 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
15165
15166
15167 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
15168
15169
15170 cat >confcache <<\_ACEOF
15171 # This file is a shell script that caches the results of configure
15172 # tests run on this system so they can be shared between configure
15173 # scripts and configure runs, see configure's option --config-cache.
15174 # It is not useful on other systems.  If it contains results you don't
15175 # want to keep, you may remove or edit it.
15176 #
15177 # config.status only pays attention to the cache file if you give it
15178 # the --recheck option to rerun configure.
15179 #
15180 # `ac_cv_env_foo' variables (set or unset) will be overridden when
15181 # loading this file, other *unset* `ac_cv_foo' will be assigned the
15182 # following values.
15183
15184 _ACEOF
15185
15186 # The following way of writing the cache mishandles newlines in values,
15187 # but we know of no workaround that is simple, portable, and efficient.
15188 # So, we kill variables containing newlines.
15189 # Ultrix sh set writes to stderr and can't be redirected directly,
15190 # and sets the high bit in the cache file unless we assign to the vars.
15191 (
15192   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15193     eval ac_val=\$$ac_var
15194     case $ac_val in #(
15195     *${as_nl}*)
15196       case $ac_var in #(
15197       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15198 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
15199       esac
15200       case $ac_var in #(
15201       _ | IFS | as_nl) ;; #(
15202       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15203       *) { eval $ac_var=; unset $ac_var;} ;;
15204       esac ;;
15205     esac
15206   done
15207
15208   (set) 2>&1 |
15209     case $as_nl`(ac_space=' '; set) 2>&1` in #(
15210     *${as_nl}ac_space=\ *)
15211       # `set' does not quote correctly, so add quotes: double-quote
15212       # substitution turns \\\\ into \\, and sed turns \\ into \.
15213       sed -n \
15214         "s/'/'\\\\''/g;
15215           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15216       ;; #(
15217     *)
15218       # `set' quotes correctly as required by POSIX, so do not add quotes.
15219       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
15220       ;;
15221     esac |
15222     sort
15223 ) |
15224   sed '
15225      /^ac_cv_env_/b end
15226      t clear
15227      :clear
15228      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15229      t end
15230      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15231      :end' >>confcache
15232 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15233   if test -w "$cache_file"; then
15234     if test "x$cache_file" != "x/dev/null"; then
15235       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15236 $as_echo "$as_me: updating cache $cache_file" >&6;}
15237       if test ! -f "$cache_file" || test -h "$cache_file"; then
15238         cat confcache >"$cache_file"
15239       else
15240         case $cache_file in #(
15241         */* | ?:*)
15242           mv -f confcache "$cache_file"$$ &&
15243           mv -f "$cache_file"$$ "$cache_file" ;; #(
15244         *)
15245           mv -f confcache "$cache_file" ;;
15246         esac
15247       fi
15248     fi
15249   else
15250     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15251 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
15252   fi
15253 fi
15254 rm -f confcache
15255
15256 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15257 # Let make expand exec_prefix.
15258 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15259
15260 DEFS=-DHAVE_CONFIG_H
15261
15262 ac_libobjs=
15263 ac_ltlibobjs=
15264 U=
15265 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15266   # 1. Remove the extension, and $U if already installed.
15267   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
15268   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
15269   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
15270   #    will be set to the directory where LIBOBJS objects are built.
15271   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15272   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
15273 done
15274 LIBOBJS=$ac_libobjs
15275
15276 LTLIBOBJS=$ac_ltlibobjs
15277
15278
15279
15280
15281 : "${CONFIG_STATUS=./config.status}"
15282 ac_write_fail=0
15283 ac_clean_files_save=$ac_clean_files
15284 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15285 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15286 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15287 as_write_fail=0
15288 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
15289 #! $SHELL
15290 # Generated by $as_me.
15291 # Run this file to recreate the current configuration.
15292 # Compiler output produced by configure, useful for debugging
15293 # configure, is in config.log if it exists.
15294
15295 debug=false
15296 ac_cs_recheck=false
15297 ac_cs_silent=false
15298
15299 SHELL=\${CONFIG_SHELL-$SHELL}
15300 export SHELL
15301 _ASEOF
15302 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15303 ## -------------------- ##
15304 ## M4sh Initialization. ##
15305 ## -------------------- ##
15306
15307 # Be more Bourne compatible
15308 DUALCASE=1; export DUALCASE # for MKS sh
15309 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
15310   emulate sh
15311   NULLCMD=:
15312   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
15313   # is contrary to our usage.  Disable this feature.
15314   alias -g '${1+"$@"}'='"$@"'
15315   setopt NO_GLOB_SUBST
15316 else
15317   case `(set -o) 2>/dev/null` in #(
15318   *posix*) :
15319     set -o posix ;; #(
15320   *) :
15321      ;;
15322 esac
15323 fi
15324
15325
15326 as_nl='
15327 '
15328 export as_nl
15329 # Printing a long string crashes Solaris 7 /usr/bin/printf.
15330 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15331 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15332 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15333 # Prefer a ksh shell builtin over an external printf program on Solaris,
15334 # but without wasting forks for bash or zsh.
15335 if test -z "$BASH_VERSION$ZSH_VERSION" \
15336     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15337   as_echo='print -r --'
15338   as_echo_n='print -rn --'
15339 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15340   as_echo='printf %s\n'
15341   as_echo_n='printf %s'
15342 else
15343   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15344     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15345     as_echo_n='/usr/ucb/echo -n'
15346   else
15347     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15348     as_echo_n_body='eval
15349       arg=$1;
15350       case $arg in #(
15351       *"$as_nl"*)
15352         expr "X$arg" : "X\\(.*\\)$as_nl";
15353         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15354       esac;
15355       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15356     '
15357     export as_echo_n_body
15358     as_echo_n='sh -c $as_echo_n_body as_echo'
15359   fi
15360   export as_echo_body
15361   as_echo='sh -c $as_echo_body as_echo'
15362 fi
15363
15364 # The user is always right.
15365 if test "${PATH_SEPARATOR+set}" != set; then
15366   PATH_SEPARATOR=:
15367   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15368     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15369       PATH_SEPARATOR=';'
15370   }
15371 fi
15372
15373
15374 # IFS
15375 # We need space, tab and new line, in precisely that order.  Quoting is
15376 # there to prevent editors from complaining about space-tab.
15377 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
15378 # splitting by setting IFS to empty value.)
15379 IFS=" ""        $as_nl"
15380
15381 # Find who we are.  Look in the path if we contain no directory separator.
15382 as_myself=
15383 case $0 in #((
15384   *[\\/]* ) as_myself=$0 ;;
15385   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15386 for as_dir in $PATH
15387 do
15388   IFS=$as_save_IFS
15389   test -z "$as_dir" && as_dir=.
15390     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15391   done
15392 IFS=$as_save_IFS
15393
15394      ;;
15395 esac
15396 # We did not find ourselves, most probably we were run as `sh COMMAND'
15397 # in which case we are not to be found in the path.
15398 if test "x$as_myself" = x; then
15399   as_myself=$0
15400 fi
15401 if test ! -f "$as_myself"; then
15402   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15403   exit 1
15404 fi
15405
15406 # Unset variables that we do not need and which cause bugs (e.g. in
15407 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
15408 # suppresses any "Segmentation fault" message there.  '((' could
15409 # trigger a bug in pdksh 5.2.14.
15410 for as_var in BASH_ENV ENV MAIL MAILPATH
15411 do eval test x\${$as_var+set} = xset \
15412   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
15413 done
15414 PS1='$ '
15415 PS2='> '
15416 PS4='+ '
15417
15418 # NLS nuisances.
15419 LC_ALL=C
15420 export LC_ALL
15421 LANGUAGE=C
15422 export LANGUAGE
15423
15424 # CDPATH.
15425 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15426
15427
15428 # as_fn_error STATUS ERROR [LINENO LOG_FD]
15429 # ----------------------------------------
15430 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15431 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
15432 # script with STATUS, using 1 if that was 0.
15433 as_fn_error ()
15434 {
15435   as_status=$1; test $as_status -eq 0 && as_status=1
15436   if test "$4"; then
15437     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15438     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
15439   fi
15440   $as_echo "$as_me: error: $2" >&2
15441   as_fn_exit $as_status
15442 } # as_fn_error
15443
15444
15445 # as_fn_set_status STATUS
15446 # -----------------------
15447 # Set $? to STATUS, without forking.
15448 as_fn_set_status ()
15449 {
15450   return $1
15451 } # as_fn_set_status
15452
15453 # as_fn_exit STATUS
15454 # -----------------
15455 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15456 as_fn_exit ()
15457 {
15458   set +e
15459   as_fn_set_status $1
15460   exit $1
15461 } # as_fn_exit
15462
15463 # as_fn_unset VAR
15464 # ---------------
15465 # Portably unset VAR.
15466 as_fn_unset ()
15467 {
15468   { eval $1=; unset $1;}
15469 }
15470 as_unset=as_fn_unset
15471 # as_fn_append VAR VALUE
15472 # ----------------------
15473 # Append the text in VALUE to the end of the definition contained in VAR. Take
15474 # advantage of any shell optimizations that allow amortized linear growth over
15475 # repeated appends, instead of the typical quadratic growth present in naive
15476 # implementations.
15477 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15478   eval 'as_fn_append ()
15479   {
15480     eval $1+=\$2
15481   }'
15482 else
15483   as_fn_append ()
15484   {
15485     eval $1=\$$1\$2
15486   }
15487 fi # as_fn_append
15488
15489 # as_fn_arith ARG...
15490 # ------------------
15491 # Perform arithmetic evaluation on the ARGs, and store the result in the
15492 # global $as_val. Take advantage of shells that can avoid forks. The arguments
15493 # must be portable across $(()) and expr.
15494 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15495   eval 'as_fn_arith ()
15496   {
15497     as_val=$(( $* ))
15498   }'
15499 else
15500   as_fn_arith ()
15501   {
15502     as_val=`expr "$@" || test $? -eq 1`
15503   }
15504 fi # as_fn_arith
15505
15506
15507 if expr a : '\(a\)' >/dev/null 2>&1 &&
15508    test "X`expr 00001 : '.*\(...\)'`" = X001; then
15509   as_expr=expr
15510 else
15511   as_expr=false
15512 fi
15513
15514 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15515   as_basename=basename
15516 else
15517   as_basename=false
15518 fi
15519
15520 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15521   as_dirname=dirname
15522 else
15523   as_dirname=false
15524 fi
15525
15526 as_me=`$as_basename -- "$0" ||
15527 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15528          X"$0" : 'X\(//\)$' \| \
15529          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
15530 $as_echo X/"$0" |
15531     sed '/^.*\/\([^/][^/]*\)\/*$/{
15532             s//\1/
15533             q
15534           }
15535           /^X\/\(\/\/\)$/{
15536             s//\1/
15537             q
15538           }
15539           /^X\/\(\/\).*/{
15540             s//\1/
15541             q
15542           }
15543           s/.*/./; q'`
15544
15545 # Avoid depending upon Character Ranges.
15546 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15547 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15548 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15549 as_cr_digits='0123456789'
15550 as_cr_alnum=$as_cr_Letters$as_cr_digits
15551
15552 ECHO_C= ECHO_N= ECHO_T=
15553 case `echo -n x` in #(((((
15554 -n*)
15555   case `echo 'xy\c'` in
15556   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
15557   xy)  ECHO_C='\c';;
15558   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
15559        ECHO_T=' ';;
15560   esac;;
15561 *)
15562   ECHO_N='-n';;
15563 esac
15564
15565 rm -f conf$$ conf$$.exe conf$$.file
15566 if test -d conf$$.dir; then
15567   rm -f conf$$.dir/conf$$.file
15568 else
15569   rm -f conf$$.dir
15570   mkdir conf$$.dir 2>/dev/null
15571 fi
15572 if (echo >conf$$.file) 2>/dev/null; then
15573   if ln -s conf$$.file conf$$ 2>/dev/null; then
15574     as_ln_s='ln -s'
15575     # ... but there are two gotchas:
15576     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15577     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
15578     # In both cases, we have to default to `cp -pR'.
15579     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
15580       as_ln_s='cp -pR'
15581   elif ln conf$$.file conf$$ 2>/dev/null; then
15582     as_ln_s=ln
15583   else
15584     as_ln_s='cp -pR'
15585   fi
15586 else
15587   as_ln_s='cp -pR'
15588 fi
15589 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15590 rmdir conf$$.dir 2>/dev/null
15591
15592
15593 # as_fn_mkdir_p
15594 # -------------
15595 # Create "$as_dir" as a directory, including parents if necessary.
15596 as_fn_mkdir_p ()
15597 {
15598
15599   case $as_dir in #(
15600   -*) as_dir=./$as_dir;;
15601   esac
15602   test -d "$as_dir" || eval $as_mkdir_p || {
15603     as_dirs=
15604     while :; do
15605       case $as_dir in #(
15606       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15607       *) as_qdir=$as_dir;;
15608       esac
15609       as_dirs="'$as_qdir' $as_dirs"
15610       as_dir=`$as_dirname -- "$as_dir" ||
15611 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15612          X"$as_dir" : 'X\(//\)[^/]' \| \
15613          X"$as_dir" : 'X\(//\)$' \| \
15614          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15615 $as_echo X"$as_dir" |
15616     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15617             s//\1/
15618             q
15619           }
15620           /^X\(\/\/\)[^/].*/{
15621             s//\1/
15622             q
15623           }
15624           /^X\(\/\/\)$/{
15625             s//\1/
15626             q
15627           }
15628           /^X\(\/\).*/{
15629             s//\1/
15630             q
15631           }
15632           s/.*/./; q'`
15633       test -d "$as_dir" && break
15634     done
15635     test -z "$as_dirs" || eval "mkdir $as_dirs"
15636   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
15637
15638
15639 } # as_fn_mkdir_p
15640 if mkdir -p . 2>/dev/null; then
15641   as_mkdir_p='mkdir -p "$as_dir"'
15642 else
15643   test -d ./-p && rmdir ./-p
15644   as_mkdir_p=false
15645 fi
15646
15647
15648 # as_fn_executable_p FILE
15649 # -----------------------
15650 # Test if FILE is an executable regular file.
15651 as_fn_executable_p ()
15652 {
15653   test -f "$1" && test -x "$1"
15654 } # as_fn_executable_p
15655 as_test_x='test -x'
15656 as_executable_p=as_fn_executable_p
15657
15658 # Sed expression to map a string onto a valid CPP name.
15659 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
15660
15661 # Sed expression to map a string onto a valid variable name.
15662 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
15663
15664
15665 exec 6>&1
15666 ## ----------------------------------- ##
15667 ## Main body of $CONFIG_STATUS script. ##
15668 ## ----------------------------------- ##
15669 _ASEOF
15670 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
15671
15672 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15673 # Save the log message, to keep $0 and so on meaningful, and to
15674 # report actual input values of CONFIG_FILES etc. instead of their
15675 # values after options handling.
15676 ac_log="
15677 This file was extended by PostgreSQL $as_me 9.5devel, which was
15678 generated by GNU Autoconf 2.69.  Invocation command line was
15679
15680   CONFIG_FILES    = $CONFIG_FILES
15681   CONFIG_HEADERS  = $CONFIG_HEADERS
15682   CONFIG_LINKS    = $CONFIG_LINKS
15683   CONFIG_COMMANDS = $CONFIG_COMMANDS
15684   $ $0 $@
15685
15686 on `(hostname || uname -n) 2>/dev/null | sed 1q`
15687 "
15688
15689 _ACEOF
15690
15691 case $ac_config_files in *"
15692 "*) set x $ac_config_files; shift; ac_config_files=$*;;
15693 esac
15694
15695 case $ac_config_headers in *"
15696 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15697 esac
15698
15699
15700 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15701 # Files that config.status was made for.
15702 config_files="$ac_config_files"
15703 config_headers="$ac_config_headers"
15704 config_links="$ac_config_links"
15705 config_commands="$ac_config_commands"
15706
15707 _ACEOF
15708
15709 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15710 ac_cs_usage="\
15711 \`$as_me' instantiates files and other configuration actions
15712 from templates according to the current configuration.  Unless the files
15713 and actions are specified as TAGs, all are instantiated by default.
15714
15715 Usage: $0 [OPTION]... [TAG]...
15716
15717   -h, --help       print this help, then exit
15718   -V, --version    print version number and configuration settings, then exit
15719       --config     print configuration, then exit
15720   -q, --quiet, --silent
15721                    do not print progress messages
15722   -d, --debug      don't remove temporary files
15723       --recheck    update $as_me by reconfiguring in the same conditions
15724       --file=FILE[:TEMPLATE]
15725                    instantiate the configuration file FILE
15726       --header=FILE[:TEMPLATE]
15727                    instantiate the configuration header FILE
15728
15729 Configuration files:
15730 $config_files
15731
15732 Configuration headers:
15733 $config_headers
15734
15735 Configuration links:
15736 $config_links
15737
15738 Configuration commands:
15739 $config_commands
15740
15741 Report bugs to <pgsql-bugs@postgresql.org>."
15742
15743 _ACEOF
15744 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15745 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
15746 ac_cs_version="\\
15747 PostgreSQL config.status 9.5devel
15748 configured by $0, generated by GNU Autoconf 2.69,
15749   with options \\"\$ac_cs_config\\"
15750
15751 Copyright (C) 2012 Free Software Foundation, Inc.
15752 This config.status script is free software; the Free Software Foundation
15753 gives unlimited permission to copy, distribute and modify it."
15754
15755 ac_pwd='$ac_pwd'
15756 srcdir='$srcdir'
15757 INSTALL='$INSTALL'
15758 MKDIR_P='$MKDIR_P'
15759 AWK='$AWK'
15760 test -n "\$AWK" || AWK=awk
15761 _ACEOF
15762
15763 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15764 # The default lists apply if the user does not specify any file.
15765 ac_need_defaults=:
15766 while test $# != 0
15767 do
15768   case $1 in
15769   --*=?*)
15770     ac_option=`expr "X$1" : 'X\([^=]*\)='`
15771     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
15772     ac_shift=:
15773     ;;
15774   --*=)
15775     ac_option=`expr "X$1" : 'X\([^=]*\)='`
15776     ac_optarg=
15777     ac_shift=:
15778     ;;
15779   *)
15780     ac_option=$1
15781     ac_optarg=$2
15782     ac_shift=shift
15783     ;;
15784   esac
15785
15786   case $ac_option in
15787   # Handling of the options.
15788   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15789     ac_cs_recheck=: ;;
15790   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
15791     $as_echo "$ac_cs_version"; exit ;;
15792   --config | --confi | --conf | --con | --co | --c )
15793     $as_echo "$ac_cs_config"; exit ;;
15794   --debug | --debu | --deb | --de | --d | -d )
15795     debug=: ;;
15796   --file | --fil | --fi | --f )
15797     $ac_shift
15798     case $ac_optarg in
15799     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15800     '') as_fn_error $? "missing file argument" ;;
15801     esac
15802     as_fn_append CONFIG_FILES " '$ac_optarg'"
15803     ac_need_defaults=false;;
15804   --header | --heade | --head | --hea )
15805     $ac_shift
15806     case $ac_optarg in
15807     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15808     esac
15809     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
15810     ac_need_defaults=false;;
15811   --he | --h)
15812     # Conflict between --help and --header
15813     as_fn_error $? "ambiguous option: \`$1'
15814 Try \`$0 --help' for more information.";;
15815   --help | --hel | -h )
15816     $as_echo "$ac_cs_usage"; exit ;;
15817   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15818   | -silent | --silent | --silen | --sile | --sil | --si | --s)
15819     ac_cs_silent=: ;;
15820
15821   # This is an error.
15822   -*) as_fn_error $? "unrecognized option: \`$1'
15823 Try \`$0 --help' for more information." ;;
15824
15825   *) as_fn_append ac_config_targets " $1"
15826      ac_need_defaults=false ;;
15827
15828   esac
15829   shift
15830 done
15831
15832 ac_configure_extra_args=
15833
15834 if $ac_cs_silent; then
15835   exec 6>/dev/null
15836   ac_configure_extra_args="$ac_configure_extra_args --silent"
15837 fi
15838
15839 _ACEOF
15840 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15841 if \$ac_cs_recheck; then
15842   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
15843   shift
15844   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15845   CONFIG_SHELL='$SHELL'
15846   export CONFIG_SHELL
15847   exec "\$@"
15848 fi
15849
15850 _ACEOF
15851 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15852 exec 5>>config.log
15853 {
15854   echo
15855   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15856 ## Running $as_me. ##
15857 _ASBOX
15858   $as_echo "$ac_log"
15859 } >&5
15860
15861 _ACEOF
15862 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15863 _ACEOF
15864
15865 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15866
15867 # Handling of arguments.
15868 for ac_config_target in $ac_config_targets
15869 do
15870   case $ac_config_target in
15871     "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
15872     "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
15873     "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
15874     "src/backend/port/dynloader.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
15875     "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
15876     "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
15877     "src/backend/port/pg_latch.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_latch.c:${LATCH_IMPLEMENTATION}" ;;
15878     "src/include/dynloader.h") CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
15879     "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
15880     "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
15881     "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
15882     "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
15883     "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
15884     "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
15885
15886   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
15887   esac
15888 done
15889
15890
15891 # If the user did not use the arguments to specify the items to instantiate,
15892 # then the envvar interface is used.  Set only those that are not.
15893 # We use the long form for the default assignment because of an extremely
15894 # bizarre bug on SunOS 4.1.3.
15895 if $ac_need_defaults; then
15896   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15897   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15898   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
15899   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
15900 fi
15901
15902 # Have a temporary directory for convenience.  Make it in the build tree
15903 # simply because there is no reason against having it here, and in addition,
15904 # creating and moving files from /tmp can sometimes cause problems.
15905 # Hook for its removal unless debugging.
15906 # Note that there is a small window in which the directory will not be cleaned:
15907 # after its creation but before its name has been assigned to `$tmp'.
15908 $debug ||
15909 {
15910   tmp= ac_tmp=
15911   trap 'exit_status=$?
15912   : "${ac_tmp:=$tmp}"
15913   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
15914 ' 0
15915   trap 'as_fn_exit 1' 1 2 13 15
15916 }
15917 # Create a (secure) tmp directory for tmp files.
15918
15919 {
15920   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
15921   test -d "$tmp"
15922 }  ||
15923 {
15924   tmp=./conf$$-$RANDOM
15925   (umask 077 && mkdir "$tmp")
15926 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
15927 ac_tmp=$tmp
15928
15929 # Set up the scripts for CONFIG_FILES section.
15930 # No need to generate them if there are no CONFIG_FILES.
15931 # This happens for instance with `./config.status config.h'.
15932 if test -n "$CONFIG_FILES"; then
15933
15934
15935 ac_cr=`echo X | tr X '\015'`
15936 # On cygwin, bash can eat \r inside `` if the user requested igncr.
15937 # But we know of no other shell where ac_cr would be empty at this
15938 # point, so we can use a bashism as a fallback.
15939 if test "x$ac_cr" = x; then
15940   eval ac_cr=\$\'\\r\'
15941 fi
15942 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15943 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
15944   ac_cs_awk_cr='\\r'
15945 else
15946   ac_cs_awk_cr=$ac_cr
15947 fi
15948
15949 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
15950 _ACEOF
15951
15952
15953 {
15954   echo "cat >conf$$subs.awk <<_ACEOF" &&
15955   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15956   echo "_ACEOF"
15957 } >conf$$subs.sh ||
15958   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15959 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
15960 ac_delim='%!_!# '
15961 for ac_last_try in false false false false false :; do
15962   . ./conf$$subs.sh ||
15963     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15964
15965   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15966   if test $ac_delim_n = $ac_delim_num; then
15967     break
15968   elif $ac_last_try; then
15969     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15970   else
15971     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15972   fi
15973 done
15974 rm -f conf$$subs.sh
15975
15976 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15977 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
15978 _ACEOF
15979 sed -n '
15980 h
15981 s/^/S["/; s/!.*/"]=/
15982 p
15983 g
15984 s/^[^!]*!//
15985 :repl
15986 t repl
15987 s/'"$ac_delim"'$//
15988 t delim
15989 :nl
15990 h
15991 s/\(.\{148\}\)..*/\1/
15992 t more1
15993 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15994 p
15995 n
15996 b repl
15997 :more1
15998 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15999 p
16000 g
16001 s/.\{148\}//
16002 t nl
16003 :delim
16004 h
16005 s/\(.\{148\}\)..*/\1/
16006 t more2
16007 s/["\\]/\\&/g; s/^/"/; s/$/"/
16008 p
16009 b
16010 :more2
16011 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16012 p
16013 g
16014 s/.\{148\}//
16015 t delim
16016 ' <conf$$subs.awk | sed '
16017 /^[^""]/{
16018   N
16019   s/\n//
16020 }
16021 ' >>$CONFIG_STATUS || ac_write_fail=1
16022 rm -f conf$$subs.awk
16023 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16024 _ACAWK
16025 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
16026   for (key in S) S_is_set[key] = 1
16027   FS = "\a"
16028
16029 }
16030 {
16031   line = $ 0
16032   nfields = split(line, field, "@")
16033   substed = 0
16034   len = length(field[1])
16035   for (i = 2; i < nfields; i++) {
16036     key = field[i]
16037     keylen = length(key)
16038     if (S_is_set[key]) {
16039       value = S[key]
16040       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16041       len += length(value) + length(field[++i])
16042       substed = 1
16043     } else
16044       len += 1 + keylen
16045   }
16046
16047   print line
16048 }
16049
16050 _ACAWK
16051 _ACEOF
16052 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16053 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16054   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16055 else
16056   cat
16057 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
16058   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
16059 _ACEOF
16060
16061 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16062 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
16063 # trailing colons and then remove the whole line if VPATH becomes empty
16064 # (actually we leave an empty line to preserve line numbers).
16065 if test "x$srcdir" = x.; then
16066   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
16067 h
16068 s///
16069 s/^/:/
16070 s/[      ]*$/:/
16071 s/:\$(srcdir):/:/g
16072 s/:\${srcdir}:/:/g
16073 s/:@srcdir@:/:/g
16074 s/^:*//
16075 s/:*$//
16076 x
16077 s/\(=[   ]*\).*/\1/
16078 G
16079 s/\n//
16080 s/^[^=]*=[       ]*$//
16081 }'
16082 fi
16083
16084 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16085 fi # test -n "$CONFIG_FILES"
16086
16087 # Set up the scripts for CONFIG_HEADERS section.
16088 # No need to generate them if there are no CONFIG_HEADERS.
16089 # This happens for instance with `./config.status Makefile'.
16090 if test -n "$CONFIG_HEADERS"; then
16091 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
16092 BEGIN {
16093 _ACEOF
16094
16095 # Transform confdefs.h into an awk script `defines.awk', embedded as
16096 # here-document in config.status, that substitutes the proper values into
16097 # config.h.in to produce config.h.
16098
16099 # Create a delimiter string that does not exist in confdefs.h, to ease
16100 # handling of long lines.
16101 ac_delim='%!_!# '
16102 for ac_last_try in false false :; do
16103   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16104   if test -z "$ac_tt"; then
16105     break
16106   elif $ac_last_try; then
16107     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
16108   else
16109     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16110   fi
16111 done
16112
16113 # For the awk script, D is an array of macro values keyed by name,
16114 # likewise P contains macro parameters if any.  Preserve backslash
16115 # newline sequences.
16116
16117 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16118 sed -n '
16119 s/.\{148\}/&'"$ac_delim"'/g
16120 t rset
16121 :rset
16122 s/^[     ]*#[    ]*define[       ][      ]*/ /
16123 t def
16124 d
16125 :def
16126 s/\\$//
16127 t bsnl
16128 s/["\\]/\\&/g
16129 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
16130 D["\1"]=" \3"/p
16131 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
16132 d
16133 :bsnl
16134 s/["\\]/\\&/g
16135 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
16136 D["\1"]=" \3\\\\\\n"\\/p
16137 t cont
16138 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16139 t cont
16140 d
16141 :cont
16142 n
16143 s/.\{148\}/&'"$ac_delim"'/g
16144 t clear
16145 :clear
16146 s/\\$//
16147 t bsnlc
16148 s/["\\]/\\&/g; s/^/"/; s/$/"/p
16149 d
16150 :bsnlc
16151 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16152 b cont
16153 ' <confdefs.h | sed '
16154 s/'"$ac_delim"'/"\\\
16155 "/g' >>$CONFIG_STATUS || ac_write_fail=1
16156
16157 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16158   for (key in D) D_is_set[key] = 1
16159   FS = "\a"
16160 }
16161 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16162   line = \$ 0
16163   split(line, arg, " ")
16164   if (arg[1] == "#") {
16165     defundef = arg[2]
16166     mac1 = arg[3]
16167   } else {
16168     defundef = substr(arg[1], 2)
16169     mac1 = arg[2]
16170   }
16171   split(mac1, mac2, "(") #)
16172   macro = mac2[1]
16173   prefix = substr(line, 1, index(line, defundef) - 1)
16174   if (D_is_set[macro]) {
16175     # Preserve the white space surrounding the "#".
16176     print prefix "define", macro P[macro] D[macro]
16177     next
16178   } else {
16179     # Replace #undef with comments.  This is necessary, for example,
16180     # in the case of _POSIX_SOURCE, which is predefined and required
16181     # on some systems where configure will not decide to define it.
16182     if (defundef == "undef") {
16183       print "/*", prefix defundef, macro, "*/"
16184       next
16185     }
16186   }
16187 }
16188 { print }
16189 _ACAWK
16190 _ACEOF
16191 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16192   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
16193 fi # test -n "$CONFIG_HEADERS"
16194
16195
16196 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
16197 shift
16198 for ac_tag
16199 do
16200   case $ac_tag in
16201   :[FHLC]) ac_mode=$ac_tag; continue;;
16202   esac
16203   case $ac_mode$ac_tag in
16204   :[FHL]*:*);;
16205   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
16206   :[FH]-) ac_tag=-:-;;
16207   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16208   esac
16209   ac_save_IFS=$IFS
16210   IFS=:
16211   set x $ac_tag
16212   IFS=$ac_save_IFS
16213   shift
16214   ac_file=$1
16215   shift
16216
16217   case $ac_mode in
16218   :L) ac_source=$1;;
16219   :[FH])
16220     ac_file_inputs=
16221     for ac_f
16222     do
16223       case $ac_f in
16224       -) ac_f="$ac_tmp/stdin";;
16225       *) # Look for the file first in the build tree, then in the source tree
16226          # (if the path is not absolute).  The absolute path cannot be DOS-style,
16227          # because $ac_f cannot contain `:'.
16228          test -f "$ac_f" ||
16229            case $ac_f in
16230            [\\/$]*) false;;
16231            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16232            esac ||
16233            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
16234       esac
16235       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16236       as_fn_append ac_file_inputs " '$ac_f'"
16237     done
16238
16239     # Let's still pretend it is `configure' which instantiates (i.e., don't
16240     # use $as_me), people would be surprised to read:
16241     #    /* config.h.  Generated by config.status.  */
16242     configure_input='Generated from '`
16243           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16244         `' by configure.'
16245     if test x"$ac_file" != x-; then
16246       configure_input="$ac_file.  $configure_input"
16247       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16248 $as_echo "$as_me: creating $ac_file" >&6;}
16249     fi
16250     # Neutralize special characters interpreted by sed in replacement strings.
16251     case $configure_input in #(
16252     *\&* | *\|* | *\\* )
16253        ac_sed_conf_input=`$as_echo "$configure_input" |
16254        sed 's/[\\\\&|]/\\\\&/g'`;; #(
16255     *) ac_sed_conf_input=$configure_input;;
16256     esac
16257
16258     case $ac_tag in
16259     *:-:* | *:-) cat >"$ac_tmp/stdin" \
16260       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
16261     esac
16262     ;;
16263   esac
16264
16265   ac_dir=`$as_dirname -- "$ac_file" ||
16266 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16267          X"$ac_file" : 'X\(//\)[^/]' \| \
16268          X"$ac_file" : 'X\(//\)$' \| \
16269          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
16270 $as_echo X"$ac_file" |
16271     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16272             s//\1/
16273             q
16274           }
16275           /^X\(\/\/\)[^/].*/{
16276             s//\1/
16277             q
16278           }
16279           /^X\(\/\/\)$/{
16280             s//\1/
16281             q
16282           }
16283           /^X\(\/\).*/{
16284             s//\1/
16285             q
16286           }
16287           s/.*/./; q'`
16288   as_dir="$ac_dir"; as_fn_mkdir_p
16289   ac_builddir=.
16290
16291 case "$ac_dir" in
16292 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16293 *)
16294   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
16295   # A ".." for each directory in $ac_dir_suffix.
16296   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
16297   case $ac_top_builddir_sub in
16298   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16299   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16300   esac ;;
16301 esac
16302 ac_abs_top_builddir=$ac_pwd
16303 ac_abs_builddir=$ac_pwd$ac_dir_suffix
16304 # for backward compatibility:
16305 ac_top_builddir=$ac_top_build_prefix
16306
16307 case $srcdir in
16308   .)  # We are building in place.
16309     ac_srcdir=.
16310     ac_top_srcdir=$ac_top_builddir_sub
16311     ac_abs_top_srcdir=$ac_pwd ;;
16312   [\\/]* | ?:[\\/]* )  # Absolute name.
16313     ac_srcdir=$srcdir$ac_dir_suffix;
16314     ac_top_srcdir=$srcdir
16315     ac_abs_top_srcdir=$srcdir ;;
16316   *) # Relative name.
16317     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16318     ac_top_srcdir=$ac_top_build_prefix$srcdir
16319     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
16320 esac
16321 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
16322
16323
16324   case $ac_mode in
16325   :F)
16326   #
16327   # CONFIG_FILE
16328   #
16329
16330   case $INSTALL in
16331   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16332   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
16333   esac
16334   ac_MKDIR_P=$MKDIR_P
16335   case $MKDIR_P in
16336   [\\/$]* | ?:[\\/]* ) ;;
16337   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16338   esac
16339 _ACEOF
16340
16341 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16342 # If the template does not know about datarootdir, expand it.
16343 # FIXME: This hack should be removed a few years after 2.60.
16344 ac_datarootdir_hack=; ac_datarootdir_seen=
16345 ac_sed_dataroot='
16346 /datarootdir/ {
16347   p
16348   q
16349 }
16350 /@datadir@/p
16351 /@docdir@/p
16352 /@infodir@/p
16353 /@localedir@/p
16354 /@mandir@/p'
16355 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
16356 *datarootdir*) ac_datarootdir_seen=yes;;
16357 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
16358   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16359 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
16360 _ACEOF
16361 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16362   ac_datarootdir_hack='
16363   s&@datadir@&$datadir&g
16364   s&@docdir@&$docdir&g
16365   s&@infodir@&$infodir&g
16366   s&@localedir@&$localedir&g
16367   s&@mandir@&$mandir&g
16368   s&\\\${datarootdir}&$datarootdir&g' ;;
16369 esac
16370 _ACEOF
16371
16372 # Neutralize VPATH when `$srcdir' = `.'.
16373 # Shell code in configure.ac might set extrasub.
16374 # FIXME: do we really want to maintain this feature?
16375 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16376 ac_sed_extra="$ac_vpsub
16377 $extrasub
16378 _ACEOF
16379 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16380 :t
16381 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16382 s|@configure_input@|$ac_sed_conf_input|;t t
16383 s&@top_builddir@&$ac_top_builddir_sub&;t t
16384 s&@top_build_prefix@&$ac_top_build_prefix&;t t
16385 s&@srcdir@&$ac_srcdir&;t t
16386 s&@abs_srcdir@&$ac_abs_srcdir&;t t
16387 s&@top_srcdir@&$ac_top_srcdir&;t t
16388 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16389 s&@builddir@&$ac_builddir&;t t
16390 s&@abs_builddir@&$ac_abs_builddir&;t t
16391 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16392 s&@INSTALL@&$ac_INSTALL&;t t
16393 s&@MKDIR_P@&$ac_MKDIR_P&;t t
16394 $ac_datarootdir_hack
16395 "
16396 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16397   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16398
16399 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
16400   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16401   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
16402       "$ac_tmp/out"`; test -z "$ac_out"; } &&
16403   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16404 which seems to be undefined.  Please make sure it is defined" >&5
16405 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16406 which seems to be undefined.  Please make sure it is defined" >&2;}
16407
16408   rm -f "$ac_tmp/stdin"
16409   case $ac_file in
16410   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16411   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
16412   esac \
16413   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16414  ;;
16415   :H)
16416   #
16417   # CONFIG_HEADER
16418   #
16419   if test x"$ac_file" != x-; then
16420     {
16421       $as_echo "/* $configure_input  */" \
16422       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16423     } >"$ac_tmp/config.h" \
16424       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16425     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
16426       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16427 $as_echo "$as_me: $ac_file is unchanged" >&6;}
16428     else
16429       rm -f "$ac_file"
16430       mv "$ac_tmp/config.h" "$ac_file" \
16431         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16432     fi
16433   else
16434     $as_echo "/* $configure_input  */" \
16435       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
16436       || as_fn_error $? "could not create -" "$LINENO" 5
16437   fi
16438  ;;
16439   :L)
16440   #
16441   # CONFIG_LINK
16442   #
16443
16444   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
16445     :
16446   else
16447     # Prefer the file from the source tree if names are identical.
16448     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
16449       ac_source=$srcdir/$ac_source
16450     fi
16451
16452     { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
16453 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
16454
16455     if test ! -r "$ac_source"; then
16456       as_fn_error $? "$ac_source: file not found" "$LINENO" 5
16457     fi
16458     rm -f "$ac_file"
16459
16460     # Try a relative symlink, then a hard link, then a copy.
16461     case $ac_source in
16462     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
16463         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
16464     esac
16465     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
16466       ln "$ac_source" "$ac_file" 2>/dev/null ||
16467       cp -p "$ac_source" "$ac_file" ||
16468       as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
16469   fi
16470  ;;
16471   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
16472 $as_echo "$as_me: executing $ac_file commands" >&6;}
16473  ;;
16474   esac
16475
16476
16477   case $ac_file$ac_mode in
16478     "check_win32_symlinks":C)
16479 # Links sometimes fail undetected on Mingw -
16480 # so here we detect it and warn the user
16481 for FILE in $CONFIG_LINKS
16482  do
16483         # test -e works for symlinks in the MinGW console
16484         test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
16485 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
16486  done
16487  ;;
16488     "src/include/pg_config.h":H)
16489 # Update timestamp for pg_config.h (see Makefile.global)
16490 echo >src/include/stamp-h
16491  ;;
16492     "src/include/pg_config_ext.h":H)
16493 # Update timestamp for pg_config_ext.h (see Makefile.global)
16494 echo >src/include/stamp-ext-h
16495  ;;
16496     "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
16497
16498   esac
16499 done # for ac_tag
16500
16501
16502 as_fn_exit 0
16503 _ACEOF
16504 ac_clean_files=$ac_clean_files_save
16505
16506 test $ac_write_fail = 0 ||
16507   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
16508
16509
16510 # configure is writing to config.log, and then calls config.status.
16511 # config.status does its own redirection, appending to config.log.
16512 # Unfortunately, on DOS this fails, as config.log is still kept open
16513 # by configure, so config.status won't be able to write to it; its
16514 # output is simply discarded.  So we exec the FD to /dev/null,
16515 # effectively closing config.log, so it can be properly (re)opened and
16516 # appended to by config.status.  When coming back to configure, we
16517 # need to make the FD available again.
16518 if test "$no_create" != yes; then
16519   ac_cs_success=:
16520   ac_config_status_args=
16521   test "$silent" = yes &&
16522     ac_config_status_args="$ac_config_status_args --quiet"
16523   exec 5>/dev/null
16524   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
16525   exec 5>>config.log
16526   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16527   # would make configure fail if this is the last instruction.
16528   $ac_cs_success || as_fn_exit 1
16529 fi
16530 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16531   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16532 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
16533 fi
16534