]> granicus.if.org Git - postgresql/blob - configure
Update comment.
[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_dtrace
733 DTRACEFLAGS
734 DTRACE
735 enable_coverage
736 GENHTML
737 LCOV
738 GCOV
739 enable_debug
740 enable_rpath
741 default_port
742 WANTED_LANGUAGES
743 enable_nls
744 PORTNAME
745 host_os
746 host_vendor
747 host_cpu
748 host
749 build_os
750 build_vendor
751 build_cpu
752 build
753 PG_MAJORVERSION
754 configure_args
755 target_alias
756 host_alias
757 build_alias
758 LIBS
759 ECHO_T
760 ECHO_N
761 ECHO_C
762 DEFS
763 mandir
764 localedir
765 libdir
766 psdir
767 pdfdir
768 dvidir
769 htmldir
770 infodir
771 docdir
772 oldincludedir
773 includedir
774 localstatedir
775 sharedstatedir
776 sysconfdir
777 datadir
778 datarootdir
779 libexecdir
780 sbindir
781 bindir
782 program_transform_name
783 prefix
784 exec_prefix
785 PACKAGE_URL
786 PACKAGE_BUGREPORT
787 PACKAGE_STRING
788 PACKAGE_VERSION
789 PACKAGE_TARNAME
790 PACKAGE_NAME
791 PATH_SEPARATOR
792 SHELL'
793 ac_subst_files=''
794 ac_user_opts='
795 enable_option_checking
796 with_extra_version
797 with_template
798 with_includes
799 with_libraries
800 with_libs
801 enable_integer_datetimes
802 enable_nls
803 with_pgport
804 enable_rpath
805 enable_spinlocks
806 enable_atomics
807 enable_debug
808 enable_profiling
809 enable_coverage
810 enable_dtrace
811 with_blocksize
812 with_segsize
813 with_wal_blocksize
814 with_wal_segsize
815 with_CC
816 enable_depend
817 enable_cassert
818 enable_thread_safety
819 with_tcl
820 with_tclconfig
821 with_perl
822 with_python
823 with_gssapi
824 with_krb_srvnam
825 with_pam
826 with_ldap
827 with_bonjour
828 with_openssl
829 with_selinux
830 with_readline
831 with_libedit_preferred
832 with_uuid
833 with_ossp_uuid
834 with_libxml
835 with_libxslt
836 with_system_tzdata
837 with_zlib
838 with_gnu_ld
839 enable_largefile
840 enable_float4_byval
841 enable_float8_byval
842 '
843       ac_precious_vars='build_alias
844 host_alias
845 target_alias
846 CC
847 CFLAGS
848 LDFLAGS
849 LIBS
850 CPPFLAGS
851 CPP
852 LDFLAGS_EX
853 LDFLAGS_SL
854 DOCBOOKSTYLE'
855
856
857 # Initialize some variables set by options.
858 ac_init_help=
859 ac_init_version=false
860 ac_unrecognized_opts=
861 ac_unrecognized_sep=
862 # The variables have the same names as the options, with
863 # dashes changed to underlines.
864 cache_file=/dev/null
865 exec_prefix=NONE
866 no_create=
867 no_recursion=
868 prefix=NONE
869 program_prefix=NONE
870 program_suffix=NONE
871 program_transform_name=s,x,x,
872 silent=
873 site=
874 srcdir=
875 verbose=
876 x_includes=NONE
877 x_libraries=NONE
878
879 # Installation directory options.
880 # These are left unexpanded so users can "make install exec_prefix=/foo"
881 # and all the variables that are supposed to be based on exec_prefix
882 # by default will actually change.
883 # Use braces instead of parens because sh, perl, etc. also accept them.
884 # (The list follows the same order as the GNU Coding Standards.)
885 bindir='${exec_prefix}/bin'
886 sbindir='${exec_prefix}/sbin'
887 libexecdir='${exec_prefix}/libexec'
888 datarootdir='${prefix}/share'
889 datadir='${datarootdir}'
890 sysconfdir='${prefix}/etc'
891 sharedstatedir='${prefix}/com'
892 localstatedir='${prefix}/var'
893 includedir='${prefix}/include'
894 oldincludedir='/usr/include'
895 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
896 infodir='${datarootdir}/info'
897 htmldir='${docdir}'
898 dvidir='${docdir}'
899 pdfdir='${docdir}'
900 psdir='${docdir}'
901 libdir='${exec_prefix}/lib'
902 localedir='${datarootdir}/locale'
903 mandir='${datarootdir}/man'
904
905 ac_prev=
906 ac_dashdash=
907 for ac_option
908 do
909   # If the previous option needs an argument, assign it.
910   if test -n "$ac_prev"; then
911     eval $ac_prev=\$ac_option
912     ac_prev=
913     continue
914   fi
915
916   case $ac_option in
917   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
918   *=)   ac_optarg= ;;
919   *)    ac_optarg=yes ;;
920   esac
921
922   # Accept the important Cygnus configure options, so we can diagnose typos.
923
924   case $ac_dashdash$ac_option in
925   --)
926     ac_dashdash=yes ;;
927
928   -bindir | --bindir | --bindi | --bind | --bin | --bi)
929     ac_prev=bindir ;;
930   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
931     bindir=$ac_optarg ;;
932
933   -build | --build | --buil | --bui | --bu)
934     ac_prev=build_alias ;;
935   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
936     build_alias=$ac_optarg ;;
937
938   -cache-file | --cache-file | --cache-fil | --cache-fi \
939   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
940     ac_prev=cache_file ;;
941   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
942   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
943     cache_file=$ac_optarg ;;
944
945   --config-cache | -C)
946     cache_file=config.cache ;;
947
948   -datadir | --datadir | --datadi | --datad)
949     ac_prev=datadir ;;
950   -datadir=* | --datadir=* | --datadi=* | --datad=*)
951     datadir=$ac_optarg ;;
952
953   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
954   | --dataroo | --dataro | --datar)
955     ac_prev=datarootdir ;;
956   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
957   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
958     datarootdir=$ac_optarg ;;
959
960   -disable-* | --disable-*)
961     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
962     # Reject names that are not valid shell variable names.
963     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
964       as_fn_error $? "invalid feature name: $ac_useropt"
965     ac_useropt_orig=$ac_useropt
966     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
967     case $ac_user_opts in
968       *"
969 "enable_$ac_useropt"
970 "*) ;;
971       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
972          ac_unrecognized_sep=', ';;
973     esac
974     eval enable_$ac_useropt=no ;;
975
976   -docdir | --docdir | --docdi | --doc | --do)
977     ac_prev=docdir ;;
978   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
979     docdir=$ac_optarg ;;
980
981   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
982     ac_prev=dvidir ;;
983   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
984     dvidir=$ac_optarg ;;
985
986   -enable-* | --enable-*)
987     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
988     # Reject names that are not valid shell variable names.
989     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
990       as_fn_error $? "invalid feature name: $ac_useropt"
991     ac_useropt_orig=$ac_useropt
992     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
993     case $ac_user_opts in
994       *"
995 "enable_$ac_useropt"
996 "*) ;;
997       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
998          ac_unrecognized_sep=', ';;
999     esac
1000     eval enable_$ac_useropt=\$ac_optarg ;;
1001
1002   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1003   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1004   | --exec | --exe | --ex)
1005     ac_prev=exec_prefix ;;
1006   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1007   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1008   | --exec=* | --exe=* | --ex=*)
1009     exec_prefix=$ac_optarg ;;
1010
1011   -gas | --gas | --ga | --g)
1012     # Obsolete; use --with-gas.
1013     with_gas=yes ;;
1014
1015   -help | --help | --hel | --he | -h)
1016     ac_init_help=long ;;
1017   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1018     ac_init_help=recursive ;;
1019   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1020     ac_init_help=short ;;
1021
1022   -host | --host | --hos | --ho)
1023     ac_prev=host_alias ;;
1024   -host=* | --host=* | --hos=* | --ho=*)
1025     host_alias=$ac_optarg ;;
1026
1027   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1028     ac_prev=htmldir ;;
1029   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1030   | --ht=*)
1031     htmldir=$ac_optarg ;;
1032
1033   -includedir | --includedir | --includedi | --included | --include \
1034   | --includ | --inclu | --incl | --inc)
1035     ac_prev=includedir ;;
1036   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1037   | --includ=* | --inclu=* | --incl=* | --inc=*)
1038     includedir=$ac_optarg ;;
1039
1040   -infodir | --infodir | --infodi | --infod | --info | --inf)
1041     ac_prev=infodir ;;
1042   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1043     infodir=$ac_optarg ;;
1044
1045   -libdir | --libdir | --libdi | --libd)
1046     ac_prev=libdir ;;
1047   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1048     libdir=$ac_optarg ;;
1049
1050   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1051   | --libexe | --libex | --libe)
1052     ac_prev=libexecdir ;;
1053   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1054   | --libexe=* | --libex=* | --libe=*)
1055     libexecdir=$ac_optarg ;;
1056
1057   -localedir | --localedir | --localedi | --localed | --locale)
1058     ac_prev=localedir ;;
1059   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1060     localedir=$ac_optarg ;;
1061
1062   -localstatedir | --localstatedir | --localstatedi | --localstated \
1063   | --localstate | --localstat | --localsta | --localst | --locals)
1064     ac_prev=localstatedir ;;
1065   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1066   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1067     localstatedir=$ac_optarg ;;
1068
1069   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1070     ac_prev=mandir ;;
1071   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1072     mandir=$ac_optarg ;;
1073
1074   -nfp | --nfp | --nf)
1075     # Obsolete; use --without-fp.
1076     with_fp=no ;;
1077
1078   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1079   | --no-cr | --no-c | -n)
1080     no_create=yes ;;
1081
1082   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1083   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1084     no_recursion=yes ;;
1085
1086   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1087   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1088   | --oldin | --oldi | --old | --ol | --o)
1089     ac_prev=oldincludedir ;;
1090   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1091   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1092   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1093     oldincludedir=$ac_optarg ;;
1094
1095   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1096     ac_prev=prefix ;;
1097   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1098     prefix=$ac_optarg ;;
1099
1100   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1101   | --program-pre | --program-pr | --program-p)
1102     ac_prev=program_prefix ;;
1103   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1104   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1105     program_prefix=$ac_optarg ;;
1106
1107   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1108   | --program-suf | --program-su | --program-s)
1109     ac_prev=program_suffix ;;
1110   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1111   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1112     program_suffix=$ac_optarg ;;
1113
1114   -program-transform-name | --program-transform-name \
1115   | --program-transform-nam | --program-transform-na \
1116   | --program-transform-n | --program-transform- \
1117   | --program-transform | --program-transfor \
1118   | --program-transfo | --program-transf \
1119   | --program-trans | --program-tran \
1120   | --progr-tra | --program-tr | --program-t)
1121     ac_prev=program_transform_name ;;
1122   -program-transform-name=* | --program-transform-name=* \
1123   | --program-transform-nam=* | --program-transform-na=* \
1124   | --program-transform-n=* | --program-transform-=* \
1125   | --program-transform=* | --program-transfor=* \
1126   | --program-transfo=* | --program-transf=* \
1127   | --program-trans=* | --program-tran=* \
1128   | --progr-tra=* | --program-tr=* | --program-t=*)
1129     program_transform_name=$ac_optarg ;;
1130
1131   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1132     ac_prev=pdfdir ;;
1133   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1134     pdfdir=$ac_optarg ;;
1135
1136   -psdir | --psdir | --psdi | --psd | --ps)
1137     ac_prev=psdir ;;
1138   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1139     psdir=$ac_optarg ;;
1140
1141   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1142   | -silent | --silent | --silen | --sile | --sil)
1143     silent=yes ;;
1144
1145   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1146     ac_prev=sbindir ;;
1147   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1148   | --sbi=* | --sb=*)
1149     sbindir=$ac_optarg ;;
1150
1151   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1152   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1153   | --sharedst | --shareds | --shared | --share | --shar \
1154   | --sha | --sh)
1155     ac_prev=sharedstatedir ;;
1156   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1157   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1158   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1159   | --sha=* | --sh=*)
1160     sharedstatedir=$ac_optarg ;;
1161
1162   -site | --site | --sit)
1163     ac_prev=site ;;
1164   -site=* | --site=* | --sit=*)
1165     site=$ac_optarg ;;
1166
1167   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1168     ac_prev=srcdir ;;
1169   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1170     srcdir=$ac_optarg ;;
1171
1172   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1173   | --syscon | --sysco | --sysc | --sys | --sy)
1174     ac_prev=sysconfdir ;;
1175   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1176   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1177     sysconfdir=$ac_optarg ;;
1178
1179   -target | --target | --targe | --targ | --tar | --ta | --t)
1180     ac_prev=target_alias ;;
1181   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1182     target_alias=$ac_optarg ;;
1183
1184   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1185     verbose=yes ;;
1186
1187   -version | --version | --versio | --versi | --vers | -V)
1188     ac_init_version=: ;;
1189
1190   -with-* | --with-*)
1191     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1192     # Reject names that are not valid shell variable names.
1193     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1194       as_fn_error $? "invalid package name: $ac_useropt"
1195     ac_useropt_orig=$ac_useropt
1196     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1197     case $ac_user_opts in
1198       *"
1199 "with_$ac_useropt"
1200 "*) ;;
1201       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1202          ac_unrecognized_sep=', ';;
1203     esac
1204     eval with_$ac_useropt=\$ac_optarg ;;
1205
1206   -without-* | --without-*)
1207     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1208     # Reject names that are not valid shell variable names.
1209     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1210       as_fn_error $? "invalid package name: $ac_useropt"
1211     ac_useropt_orig=$ac_useropt
1212     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1213     case $ac_user_opts in
1214       *"
1215 "with_$ac_useropt"
1216 "*) ;;
1217       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1218          ac_unrecognized_sep=', ';;
1219     esac
1220     eval with_$ac_useropt=no ;;
1221
1222   --x)
1223     # Obsolete; use --with-x.
1224     with_x=yes ;;
1225
1226   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1227   | --x-incl | --x-inc | --x-in | --x-i)
1228     ac_prev=x_includes ;;
1229   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1230   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1231     x_includes=$ac_optarg ;;
1232
1233   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1234   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1235     ac_prev=x_libraries ;;
1236   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1237   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1238     x_libraries=$ac_optarg ;;
1239
1240   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1241 Try \`$0 --help' for more information"
1242     ;;
1243
1244   *=*)
1245     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1246     # Reject names that are not valid shell variable names.
1247     case $ac_envvar in #(
1248       '' | [0-9]* | *[!_$as_cr_alnum]* )
1249       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1250     esac
1251     eval $ac_envvar=\$ac_optarg
1252     export $ac_envvar ;;
1253
1254   *)
1255     # FIXME: should be removed in autoconf 3.0.
1256     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1257     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1258       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1259     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1260     ;;
1261
1262   esac
1263 done
1264
1265 if test -n "$ac_prev"; then
1266   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1267   as_fn_error $? "missing argument to $ac_option"
1268 fi
1269
1270 if test -n "$ac_unrecognized_opts"; then
1271   case $enable_option_checking in
1272     no) ;;
1273     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1274     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1275   esac
1276 fi
1277
1278 # Check all directory arguments for consistency.
1279 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1280                 datadir sysconfdir sharedstatedir localstatedir includedir \
1281                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1282                 libdir localedir mandir
1283 do
1284   eval ac_val=\$$ac_var
1285   # Remove trailing slashes.
1286   case $ac_val in
1287     */ )
1288       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1289       eval $ac_var=\$ac_val;;
1290   esac
1291   # Be sure to have absolute directory names.
1292   case $ac_val in
1293     [\\/$]* | ?:[\\/]* )  continue;;
1294     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1295   esac
1296   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1297 done
1298
1299 # There might be people who depend on the old broken behavior: `$host'
1300 # used to hold the argument of --host etc.
1301 # FIXME: To remove some day.
1302 build=$build_alias
1303 host=$host_alias
1304 target=$target_alias
1305
1306 # FIXME: To remove some day.
1307 if test "x$host_alias" != x; then
1308   if test "x$build_alias" = x; then
1309     cross_compiling=maybe
1310   elif test "x$build_alias" != "x$host_alias"; then
1311     cross_compiling=yes
1312   fi
1313 fi
1314
1315 ac_tool_prefix=
1316 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1317
1318 test "$silent" = yes && exec 6>/dev/null
1319
1320
1321 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1322 ac_ls_di=`ls -di .` &&
1323 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1324   as_fn_error $? "working directory cannot be determined"
1325 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1326   as_fn_error $? "pwd does not report name of working directory"
1327
1328
1329 # Find the source files, if location was not specified.
1330 if test -z "$srcdir"; then
1331   ac_srcdir_defaulted=yes
1332   # Try the directory containing this script, then the parent directory.
1333   ac_confdir=`$as_dirname -- "$as_myself" ||
1334 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1335          X"$as_myself" : 'X\(//\)[^/]' \| \
1336          X"$as_myself" : 'X\(//\)$' \| \
1337          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1338 $as_echo X"$as_myself" |
1339     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1340             s//\1/
1341             q
1342           }
1343           /^X\(\/\/\)[^/].*/{
1344             s//\1/
1345             q
1346           }
1347           /^X\(\/\/\)$/{
1348             s//\1/
1349             q
1350           }
1351           /^X\(\/\).*/{
1352             s//\1/
1353             q
1354           }
1355           s/.*/./; q'`
1356   srcdir=$ac_confdir
1357   if test ! -r "$srcdir/$ac_unique_file"; then
1358     srcdir=..
1359   fi
1360 else
1361   ac_srcdir_defaulted=no
1362 fi
1363 if test ! -r "$srcdir/$ac_unique_file"; then
1364   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1365   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1366 fi
1367 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1368 ac_abs_confdir=`(
1369         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1370         pwd)`
1371 # When building in place, set srcdir=.
1372 if test "$ac_abs_confdir" = "$ac_pwd"; then
1373   srcdir=.
1374 fi
1375 # Remove unnecessary trailing slashes from srcdir.
1376 # Double slashes in file names in object file debugging info
1377 # mess up M-x gdb in Emacs.
1378 case $srcdir in
1379 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1380 esac
1381 for ac_var in $ac_precious_vars; do
1382   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1383   eval ac_env_${ac_var}_value=\$${ac_var}
1384   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1385   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1386 done
1387
1388 #
1389 # Report the --help message.
1390 #
1391 if test "$ac_init_help" = "long"; then
1392   # Omit some internal or obsolete options to make the list less imposing.
1393   # This message is too long to be a string in the A/UX 3.1 sh.
1394   cat <<_ACEOF
1395 \`configure' configures PostgreSQL 9.5devel to adapt to many kinds of systems.
1396
1397 Usage: $0 [OPTION]... [VAR=VALUE]...
1398
1399 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1400 VAR=VALUE.  See below for descriptions of some of the useful variables.
1401
1402 Defaults for the options are specified in brackets.
1403
1404 Configuration:
1405   -h, --help              display this help and exit
1406       --help=short        display options specific to this package
1407       --help=recursive    display the short help of all the included packages
1408   -V, --version           display version information and exit
1409   -q, --quiet, --silent   do not print \`checking ...' messages
1410       --cache-file=FILE   cache test results in FILE [disabled]
1411   -C, --config-cache      alias for \`--cache-file=config.cache'
1412   -n, --no-create         do not create output files
1413       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1414
1415 Installation directories:
1416   --prefix=PREFIX         install architecture-independent files in PREFIX
1417                           [$ac_default_prefix]
1418   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1419                           [PREFIX]
1420
1421 By default, \`make install' will install all the files in
1422 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1423 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1424 for instance \`--prefix=\$HOME'.
1425
1426 For better control, use the options below.
1427
1428 Fine tuning of the installation directories:
1429   --bindir=DIR            user executables [EPREFIX/bin]
1430   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1431   --libexecdir=DIR        program executables [EPREFIX/libexec]
1432   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1433   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1434   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1435   --libdir=DIR            object code libraries [EPREFIX/lib]
1436   --includedir=DIR        C header files [PREFIX/include]
1437   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1438   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1439   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1440   --infodir=DIR           info documentation [DATAROOTDIR/info]
1441   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1442   --mandir=DIR            man documentation [DATAROOTDIR/man]
1443   --docdir=DIR            documentation root [DATAROOTDIR/doc/postgresql]
1444   --htmldir=DIR           html documentation [DOCDIR]
1445   --dvidir=DIR            dvi documentation [DOCDIR]
1446   --pdfdir=DIR            pdf documentation [DOCDIR]
1447   --psdir=DIR             ps documentation [DOCDIR]
1448 _ACEOF
1449
1450   cat <<\_ACEOF
1451
1452 System types:
1453   --build=BUILD     configure for building on BUILD [guessed]
1454   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1455 _ACEOF
1456 fi
1457
1458 if test -n "$ac_init_help"; then
1459   case $ac_init_help in
1460      short | recursive ) echo "Configuration of PostgreSQL 9.5devel:";;
1461    esac
1462   cat <<\_ACEOF
1463
1464 Optional Features:
1465   --disable-option-checking  ignore unrecognized --enable/--with options
1466   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1467   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1468   --disable-integer-datetimes
1469                           disable 64-bit integer date/time support
1470   --enable-nls[=LANGUAGES]
1471                           enable Native Language Support
1472   --disable-rpath         do not embed shared library search path in
1473                           executables
1474   --disable-spinlocks     do not use spinlocks
1475   --disable-atomics       do not use atomic operations
1476   --enable-debug          build with debugging symbols (-g)
1477   --enable-profiling      build with profiling enabled
1478   --enable-coverage       build with coverage testing instrumentation
1479   --enable-dtrace         build with DTrace support
1480   --enable-depend         turn on automatic dependency tracking
1481   --enable-cassert        enable assertion checks (for debugging)
1482   --disable-thread-safety disable thread-safety in client libraries
1483   --disable-largefile     omit support for large files
1484   --disable-float4-byval  disable float4 passed by value
1485   --disable-float8-byval  disable float8 passed by value
1486
1487 Optional Packages:
1488   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1489   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1490   --with-extra-version=STRING
1491                           append STRING to version
1492   --with-template=NAME    override operating system template
1493   --with-includes=DIRS    look for additional header files in DIRS
1494   --with-libraries=DIRS   look for additional libraries in DIRS
1495   --with-libs=DIRS        alternative spelling of --with-libraries
1496   --with-pgport=PORTNUM   set default port number [5432]
1497   --with-blocksize=BLOCKSIZE
1498                           set table block size in kB [8]
1499   --with-segsize=SEGSIZE  set table segment size in GB [1]
1500   --with-wal-blocksize=BLOCKSIZE
1501                           set WAL block size in kB [8]
1502   --with-wal-segsize=SEGSIZE
1503                           set WAL segment size in MB [16]
1504   --with-CC=CMD           set compiler (deprecated)
1505   --with-tcl              build Tcl modules (PL/Tcl)
1506   --with-tclconfig=DIR    tclConfig.sh is in DIR
1507   --with-perl             build Perl modules (PL/Perl)
1508   --with-python           build Python modules (PL/Python)
1509   --with-gssapi           build with GSSAPI support
1510   --with-krb-srvnam=NAME  default service principal name in Kerberos (GSSAPI)
1511                           [postgres]
1512   --with-pam              build with PAM support
1513   --with-ldap             build with LDAP support
1514   --with-bonjour          build with Bonjour support
1515   --with-openssl          build with OpenSSL support
1516   --with-selinux          build with SELinux support
1517   --without-readline      do not use GNU Readline nor BSD Libedit for editing
1518   --with-libedit-preferred
1519                           prefer BSD Libedit over GNU Readline
1520   --with-uuid=LIB         build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1521   --with-ossp-uuid        obsolete spelling of --with-uuid=ossp
1522   --with-libxml           build with XML support
1523   --with-libxslt          use XSLT support when building contrib/xml2
1524   --with-system-tzdata=DIR
1525                           use system time zone data in DIR
1526   --without-zlib          do not use Zlib
1527   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1528
1529 Some influential environment variables:
1530   CC          C compiler command
1531   CFLAGS      C compiler flags
1532   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1533               nonstandard directory <lib dir>
1534   LIBS        libraries to pass to the linker, e.g. -l<library>
1535   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1536               you have headers in a nonstandard directory <include dir>
1537   CPP         C preprocessor
1538   LDFLAGS_EX  extra linker flags for linking executables only
1539   LDFLAGS_SL  extra linker flags for linking shared libraries only
1540   DOCBOOKSTYLE
1541               location of DocBook stylesheets
1542
1543 Use these variables to override the choices made by `configure' or to help
1544 it to find libraries and programs with nonstandard names/locations.
1545
1546 Report bugs to <pgsql-bugs@postgresql.org>.
1547 _ACEOF
1548 ac_status=$?
1549 fi
1550
1551 if test "$ac_init_help" = "recursive"; then
1552   # If there are subdirs, report their specific --help.
1553   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1554     test -d "$ac_dir" ||
1555       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1556       continue
1557     ac_builddir=.
1558
1559 case "$ac_dir" in
1560 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1561 *)
1562   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1563   # A ".." for each directory in $ac_dir_suffix.
1564   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1565   case $ac_top_builddir_sub in
1566   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1567   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1568   esac ;;
1569 esac
1570 ac_abs_top_builddir=$ac_pwd
1571 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1572 # for backward compatibility:
1573 ac_top_builddir=$ac_top_build_prefix
1574
1575 case $srcdir in
1576   .)  # We are building in place.
1577     ac_srcdir=.
1578     ac_top_srcdir=$ac_top_builddir_sub
1579     ac_abs_top_srcdir=$ac_pwd ;;
1580   [\\/]* | ?:[\\/]* )  # Absolute name.
1581     ac_srcdir=$srcdir$ac_dir_suffix;
1582     ac_top_srcdir=$srcdir
1583     ac_abs_top_srcdir=$srcdir ;;
1584   *) # Relative name.
1585     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1586     ac_top_srcdir=$ac_top_build_prefix$srcdir
1587     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1588 esac
1589 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1590
1591     cd "$ac_dir" || { ac_status=$?; continue; }
1592     # Check for guested configure.
1593     if test -f "$ac_srcdir/configure.gnu"; then
1594       echo &&
1595       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1596     elif test -f "$ac_srcdir/configure"; then
1597       echo &&
1598       $SHELL "$ac_srcdir/configure" --help=recursive
1599     else
1600       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1601     fi || ac_status=$?
1602     cd "$ac_pwd" || { ac_status=$?; break; }
1603   done
1604 fi
1605
1606 test -n "$ac_init_help" && exit $ac_status
1607 if $ac_init_version; then
1608   cat <<\_ACEOF
1609 PostgreSQL configure 9.5devel
1610 generated by GNU Autoconf 2.69
1611
1612 Copyright (C) 2012 Free Software Foundation, Inc.
1613 This configure script is free software; the Free Software Foundation
1614 gives unlimited permission to copy, distribute and modify it.
1615
1616 Copyright (c) 1996-2014, PostgreSQL Global Development Group
1617 _ACEOF
1618   exit
1619 fi
1620
1621 ## ------------------------ ##
1622 ## Autoconf initialization. ##
1623 ## ------------------------ ##
1624
1625 # ac_fn_c_try_compile LINENO
1626 # --------------------------
1627 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1628 ac_fn_c_try_compile ()
1629 {
1630   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1631   rm -f conftest.$ac_objext
1632   if { { ac_try="$ac_compile"
1633 case "(($ac_try" in
1634   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1635   *) ac_try_echo=$ac_try;;
1636 esac
1637 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1638 $as_echo "$ac_try_echo"; } >&5
1639   (eval "$ac_compile") 2>conftest.err
1640   ac_status=$?
1641   if test -s conftest.err; then
1642     grep -v '^ *+' conftest.err >conftest.er1
1643     cat conftest.er1 >&5
1644     mv -f conftest.er1 conftest.err
1645   fi
1646   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1647   test $ac_status = 0; } && {
1648          test -z "$ac_c_werror_flag" ||
1649          test ! -s conftest.err
1650        } && test -s conftest.$ac_objext; then :
1651   ac_retval=0
1652 else
1653   $as_echo "$as_me: failed program was:" >&5
1654 sed 's/^/| /' conftest.$ac_ext >&5
1655
1656         ac_retval=1
1657 fi
1658   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1659   as_fn_set_status $ac_retval
1660
1661 } # ac_fn_c_try_compile
1662
1663 # ac_fn_c_try_link LINENO
1664 # -----------------------
1665 # Try to link conftest.$ac_ext, and return whether this succeeded.
1666 ac_fn_c_try_link ()
1667 {
1668   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1669   rm -f conftest.$ac_objext conftest$ac_exeext
1670   if { { ac_try="$ac_link"
1671 case "(($ac_try" in
1672   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1673   *) ac_try_echo=$ac_try;;
1674 esac
1675 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1676 $as_echo "$ac_try_echo"; } >&5
1677   (eval "$ac_link") 2>conftest.err
1678   ac_status=$?
1679   if test -s conftest.err; then
1680     grep -v '^ *+' conftest.err >conftest.er1
1681     cat conftest.er1 >&5
1682     mv -f conftest.er1 conftest.err
1683   fi
1684   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1685   test $ac_status = 0; } && {
1686          test -z "$ac_c_werror_flag" ||
1687          test ! -s conftest.err
1688        } && test -s conftest$ac_exeext && {
1689          test "$cross_compiling" = yes ||
1690          test -x conftest$ac_exeext
1691        }; then :
1692   ac_retval=0
1693 else
1694   $as_echo "$as_me: failed program was:" >&5
1695 sed 's/^/| /' conftest.$ac_ext >&5
1696
1697         ac_retval=1
1698 fi
1699   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1700   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1701   # interfere with the next link command; also delete a directory that is
1702   # left behind by Apple's compiler.  We do this before executing the actions.
1703   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1704   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1705   as_fn_set_status $ac_retval
1706
1707 } # ac_fn_c_try_link
1708
1709 # ac_fn_c_try_cpp LINENO
1710 # ----------------------
1711 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1712 ac_fn_c_try_cpp ()
1713 {
1714   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1715   if { { ac_try="$ac_cpp conftest.$ac_ext"
1716 case "(($ac_try" in
1717   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1718   *) ac_try_echo=$ac_try;;
1719 esac
1720 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1721 $as_echo "$ac_try_echo"; } >&5
1722   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1723   ac_status=$?
1724   if test -s conftest.err; then
1725     grep -v '^ *+' conftest.err >conftest.er1
1726     cat conftest.er1 >&5
1727     mv -f conftest.er1 conftest.err
1728   fi
1729   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1730   test $ac_status = 0; } > conftest.i && {
1731          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1732          test ! -s conftest.err
1733        }; then :
1734   ac_retval=0
1735 else
1736   $as_echo "$as_me: failed program was:" >&5
1737 sed 's/^/| /' conftest.$ac_ext >&5
1738
1739     ac_retval=1
1740 fi
1741   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1742   as_fn_set_status $ac_retval
1743
1744 } # ac_fn_c_try_cpp
1745
1746 # ac_fn_c_check_func LINENO FUNC VAR
1747 # ----------------------------------
1748 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1749 ac_fn_c_check_func ()
1750 {
1751   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1752   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1753 $as_echo_n "checking for $2... " >&6; }
1754 if eval \${$3+:} false; then :
1755   $as_echo_n "(cached) " >&6
1756 else
1757   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1758 /* end confdefs.h.  */
1759 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1760    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1761 #define $2 innocuous_$2
1762
1763 /* System header to define __stub macros and hopefully few prototypes,
1764     which can conflict with char $2 (); below.
1765     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1766     <limits.h> exists even on freestanding compilers.  */
1767
1768 #ifdef __STDC__
1769 # include <limits.h>
1770 #else
1771 # include <assert.h>
1772 #endif
1773
1774 #undef $2
1775
1776 /* Override any GCC internal prototype to avoid an error.
1777    Use char because int might match the return type of a GCC
1778    builtin and then its argument prototype would still apply.  */
1779 #ifdef __cplusplus
1780 extern "C"
1781 #endif
1782 char $2 ();
1783 /* The GNU C library defines this for functions which it implements
1784     to always fail with ENOSYS.  Some functions are actually named
1785     something starting with __ and the normal name is an alias.  */
1786 #if defined __stub_$2 || defined __stub___$2
1787 choke me
1788 #endif
1789
1790 int
1791 main ()
1792 {
1793 return $2 ();
1794   ;
1795   return 0;
1796 }
1797 _ACEOF
1798 if ac_fn_c_try_link "$LINENO"; then :
1799   eval "$3=yes"
1800 else
1801   eval "$3=no"
1802 fi
1803 rm -f core conftest.err conftest.$ac_objext \
1804     conftest$ac_exeext conftest.$ac_ext
1805 fi
1806 eval ac_res=\$$3
1807                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1808 $as_echo "$ac_res" >&6; }
1809   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1810
1811 } # ac_fn_c_check_func
1812
1813 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1814 # -------------------------------------------------------
1815 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1816 # the include files in INCLUDES and setting the cache variable VAR
1817 # accordingly.
1818 ac_fn_c_check_header_mongrel ()
1819 {
1820   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1821   if eval \${$3+:} false; then :
1822   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1823 $as_echo_n "checking for $2... " >&6; }
1824 if eval \${$3+:} false; then :
1825   $as_echo_n "(cached) " >&6
1826 fi
1827 eval ac_res=\$$3
1828                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1829 $as_echo "$ac_res" >&6; }
1830 else
1831   # Is the header compilable?
1832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1833 $as_echo_n "checking $2 usability... " >&6; }
1834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1835 /* end confdefs.h.  */
1836 $4
1837 #include <$2>
1838 _ACEOF
1839 if ac_fn_c_try_compile "$LINENO"; then :
1840   ac_header_compiler=yes
1841 else
1842   ac_header_compiler=no
1843 fi
1844 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1846 $as_echo "$ac_header_compiler" >&6; }
1847
1848 # Is the header present?
1849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1850 $as_echo_n "checking $2 presence... " >&6; }
1851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1852 /* end confdefs.h.  */
1853 #include <$2>
1854 _ACEOF
1855 if ac_fn_c_try_cpp "$LINENO"; then :
1856   ac_header_preproc=yes
1857 else
1858   ac_header_preproc=no
1859 fi
1860 rm -f conftest.err conftest.i conftest.$ac_ext
1861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1862 $as_echo "$ac_header_preproc" >&6; }
1863
1864 # So?  What about this header?
1865 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1866   yes:no: )
1867     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1868 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1869     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1870 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1871     ;;
1872   no:yes:* )
1873     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1874 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1875     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1876 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1877     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1878 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1879     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1880 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1881     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1882 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1883 ( $as_echo "## ---------------------------------------- ##
1884 ## Report this to pgsql-bugs@postgresql.org ##
1885 ## ---------------------------------------- ##"
1886      ) | sed "s/^/$as_me: WARNING:     /" >&2
1887     ;;
1888 esac
1889   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1890 $as_echo_n "checking for $2... " >&6; }
1891 if eval \${$3+:} false; then :
1892   $as_echo_n "(cached) " >&6
1893 else
1894   eval "$3=\$ac_header_compiler"
1895 fi
1896 eval ac_res=\$$3
1897                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1898 $as_echo "$ac_res" >&6; }
1899 fi
1900   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1901
1902 } # ac_fn_c_check_header_mongrel
1903
1904 # ac_fn_c_try_run LINENO
1905 # ----------------------
1906 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1907 # that executables *can* be run.
1908 ac_fn_c_try_run ()
1909 {
1910   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1911   if { { ac_try="$ac_link"
1912 case "(($ac_try" in
1913   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1914   *) ac_try_echo=$ac_try;;
1915 esac
1916 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1917 $as_echo "$ac_try_echo"; } >&5
1918   (eval "$ac_link") 2>&5
1919   ac_status=$?
1920   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1921   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1922   { { case "(($ac_try" in
1923   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1924   *) ac_try_echo=$ac_try;;
1925 esac
1926 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1927 $as_echo "$ac_try_echo"; } >&5
1928   (eval "$ac_try") 2>&5
1929   ac_status=$?
1930   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1931   test $ac_status = 0; }; }; then :
1932   ac_retval=0
1933 else
1934   $as_echo "$as_me: program exited with status $ac_status" >&5
1935        $as_echo "$as_me: failed program was:" >&5
1936 sed 's/^/| /' conftest.$ac_ext >&5
1937
1938        ac_retval=$ac_status
1939 fi
1940   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1941   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1942   as_fn_set_status $ac_retval
1943
1944 } # ac_fn_c_try_run
1945
1946 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1947 # -------------------------------------------------------
1948 # Tests whether HEADER exists and can be compiled using the include files in
1949 # INCLUDES, setting the cache variable VAR accordingly.
1950 ac_fn_c_check_header_compile ()
1951 {
1952   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1953   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1954 $as_echo_n "checking for $2... " >&6; }
1955 if eval \${$3+:} false; then :
1956   $as_echo_n "(cached) " >&6
1957 else
1958   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1959 /* end confdefs.h.  */
1960 $4
1961 #include <$2>
1962 _ACEOF
1963 if ac_fn_c_try_compile "$LINENO"; then :
1964   eval "$3=yes"
1965 else
1966   eval "$3=no"
1967 fi
1968 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1969 fi
1970 eval ac_res=\$$3
1971                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1972 $as_echo "$ac_res" >&6; }
1973   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1974
1975 } # ac_fn_c_check_header_compile
1976
1977 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
1978 # ----------------------------------------------------
1979 # Tries to find if the field MEMBER exists in type AGGR, after including
1980 # INCLUDES, setting cache variable VAR accordingly.
1981 ac_fn_c_check_member ()
1982 {
1983   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1984   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
1985 $as_echo_n "checking for $2.$3... " >&6; }
1986 if eval \${$4+:} false; then :
1987   $as_echo_n "(cached) " >&6
1988 else
1989   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1990 /* end confdefs.h.  */
1991 $5
1992 int
1993 main ()
1994 {
1995 static $2 ac_aggr;
1996 if (ac_aggr.$3)
1997 return 0;
1998   ;
1999   return 0;
2000 }
2001 _ACEOF
2002 if ac_fn_c_try_compile "$LINENO"; then :
2003   eval "$4=yes"
2004 else
2005   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2006 /* end confdefs.h.  */
2007 $5
2008 int
2009 main ()
2010 {
2011 static $2 ac_aggr;
2012 if (sizeof ac_aggr.$3)
2013 return 0;
2014   ;
2015   return 0;
2016 }
2017 _ACEOF
2018 if ac_fn_c_try_compile "$LINENO"; then :
2019   eval "$4=yes"
2020 else
2021   eval "$4=no"
2022 fi
2023 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2024 fi
2025 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2026 fi
2027 eval ac_res=\$$4
2028                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2029 $as_echo "$ac_res" >&6; }
2030   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2031
2032 } # ac_fn_c_check_member
2033
2034 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2035 # -------------------------------------------
2036 # Tests whether TYPE exists after having included INCLUDES, setting cache
2037 # variable VAR accordingly.
2038 ac_fn_c_check_type ()
2039 {
2040   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2041   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2042 $as_echo_n "checking for $2... " >&6; }
2043 if eval \${$3+:} false; then :
2044   $as_echo_n "(cached) " >&6
2045 else
2046   eval "$3=no"
2047   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2048 /* end confdefs.h.  */
2049 $4
2050 int
2051 main ()
2052 {
2053 if (sizeof ($2))
2054          return 0;
2055   ;
2056   return 0;
2057 }
2058 _ACEOF
2059 if ac_fn_c_try_compile "$LINENO"; then :
2060   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2061 /* end confdefs.h.  */
2062 $4
2063 int
2064 main ()
2065 {
2066 if (sizeof (($2)))
2067             return 0;
2068   ;
2069   return 0;
2070 }
2071 _ACEOF
2072 if ac_fn_c_try_compile "$LINENO"; then :
2073
2074 else
2075   eval "$3=yes"
2076 fi
2077 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2078 fi
2079 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2080 fi
2081 eval ac_res=\$$3
2082                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2083 $as_echo "$ac_res" >&6; }
2084   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2085
2086 } # ac_fn_c_check_type
2087
2088 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2089 # --------------------------------------------
2090 # Tries to find the compile-time value of EXPR in a program that includes
2091 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2092 # computed
2093 ac_fn_c_compute_int ()
2094 {
2095   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2096   if test "$cross_compiling" = yes; then
2097     # Depending upon the size, compute the lo and hi bounds.
2098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2099 /* end confdefs.h.  */
2100 $4
2101 int
2102 main ()
2103 {
2104 static int test_array [1 - 2 * !(($2) >= 0)];
2105 test_array [0] = 0;
2106 return test_array [0];
2107
2108   ;
2109   return 0;
2110 }
2111 _ACEOF
2112 if ac_fn_c_try_compile "$LINENO"; then :
2113   ac_lo=0 ac_mid=0
2114   while :; do
2115     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2116 /* end confdefs.h.  */
2117 $4
2118 int
2119 main ()
2120 {
2121 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2122 test_array [0] = 0;
2123 return test_array [0];
2124
2125   ;
2126   return 0;
2127 }
2128 _ACEOF
2129 if ac_fn_c_try_compile "$LINENO"; then :
2130   ac_hi=$ac_mid; break
2131 else
2132   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2133                         if test $ac_lo -le $ac_mid; then
2134                           ac_lo= ac_hi=
2135                           break
2136                         fi
2137                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2138 fi
2139 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2140   done
2141 else
2142   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2143 /* end confdefs.h.  */
2144 $4
2145 int
2146 main ()
2147 {
2148 static int test_array [1 - 2 * !(($2) < 0)];
2149 test_array [0] = 0;
2150 return test_array [0];
2151
2152   ;
2153   return 0;
2154 }
2155 _ACEOF
2156 if ac_fn_c_try_compile "$LINENO"; then :
2157   ac_hi=-1 ac_mid=-1
2158   while :; do
2159     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2160 /* end confdefs.h.  */
2161 $4
2162 int
2163 main ()
2164 {
2165 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2166 test_array [0] = 0;
2167 return test_array [0];
2168
2169   ;
2170   return 0;
2171 }
2172 _ACEOF
2173 if ac_fn_c_try_compile "$LINENO"; then :
2174   ac_lo=$ac_mid; break
2175 else
2176   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2177                         if test $ac_mid -le $ac_hi; then
2178                           ac_lo= ac_hi=
2179                           break
2180                         fi
2181                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2182 fi
2183 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2184   done
2185 else
2186   ac_lo= ac_hi=
2187 fi
2188 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2189 fi
2190 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2191 # Binary search between lo and hi bounds.
2192 while test "x$ac_lo" != "x$ac_hi"; do
2193   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2194   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2195 /* end confdefs.h.  */
2196 $4
2197 int
2198 main ()
2199 {
2200 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2201 test_array [0] = 0;
2202 return test_array [0];
2203
2204   ;
2205   return 0;
2206 }
2207 _ACEOF
2208 if ac_fn_c_try_compile "$LINENO"; then :
2209   ac_hi=$ac_mid
2210 else
2211   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2212 fi
2213 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2214 done
2215 case $ac_lo in #((
2216 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2217 '') ac_retval=1 ;;
2218 esac
2219   else
2220     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2221 /* end confdefs.h.  */
2222 $4
2223 static long int longval () { return $2; }
2224 static unsigned long int ulongval () { return $2; }
2225 #include <stdio.h>
2226 #include <stdlib.h>
2227 int
2228 main ()
2229 {
2230
2231   FILE *f = fopen ("conftest.val", "w");
2232   if (! f)
2233     return 1;
2234   if (($2) < 0)
2235     {
2236       long int i = longval ();
2237       if (i != ($2))
2238         return 1;
2239       fprintf (f, "%ld", i);
2240     }
2241   else
2242     {
2243       unsigned long int i = ulongval ();
2244       if (i != ($2))
2245         return 1;
2246       fprintf (f, "%lu", i);
2247     }
2248   /* Do not output a trailing newline, as this causes \r\n confusion
2249      on some platforms.  */
2250   return ferror (f) || fclose (f) != 0;
2251
2252   ;
2253   return 0;
2254 }
2255 _ACEOF
2256 if ac_fn_c_try_run "$LINENO"; then :
2257   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2258 else
2259   ac_retval=1
2260 fi
2261 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2262   conftest.$ac_objext conftest.beam conftest.$ac_ext
2263 rm -f conftest.val
2264
2265   fi
2266   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2267   as_fn_set_status $ac_retval
2268
2269 } # ac_fn_c_compute_int
2270
2271 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2272 # ---------------------------------------------
2273 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2274 # accordingly.
2275 ac_fn_c_check_decl ()
2276 {
2277   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2278   as_decl_name=`echo $2|sed 's/ *(.*//'`
2279   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2280   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2281 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2282 if eval \${$3+:} false; then :
2283   $as_echo_n "(cached) " >&6
2284 else
2285   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2286 /* end confdefs.h.  */
2287 $4
2288 int
2289 main ()
2290 {
2291 #ifndef $as_decl_name
2292 #ifdef __cplusplus
2293   (void) $as_decl_use;
2294 #else
2295   (void) $as_decl_name;
2296 #endif
2297 #endif
2298
2299   ;
2300   return 0;
2301 }
2302 _ACEOF
2303 if ac_fn_c_try_compile "$LINENO"; then :
2304   eval "$3=yes"
2305 else
2306   eval "$3=no"
2307 fi
2308 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2309 fi
2310 eval ac_res=\$$3
2311                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2312 $as_echo "$ac_res" >&6; }
2313   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2314
2315 } # ac_fn_c_check_decl
2316 cat >config.log <<_ACEOF
2317 This file contains any messages produced by compilers while
2318 running configure, to aid debugging if configure makes a mistake.
2319
2320 It was created by PostgreSQL $as_me 9.5devel, which was
2321 generated by GNU Autoconf 2.69.  Invocation command line was
2322
2323   $ $0 $@
2324
2325 _ACEOF
2326 exec 5>>config.log
2327 {
2328 cat <<_ASUNAME
2329 ## --------- ##
2330 ## Platform. ##
2331 ## --------- ##
2332
2333 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2334 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2335 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2336 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2337 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2338
2339 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2340 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2341
2342 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2343 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2344 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2345 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2346 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2347 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2348 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2349
2350 _ASUNAME
2351
2352 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2353 for as_dir in $PATH
2354 do
2355   IFS=$as_save_IFS
2356   test -z "$as_dir" && as_dir=.
2357     $as_echo "PATH: $as_dir"
2358   done
2359 IFS=$as_save_IFS
2360
2361 } >&5
2362
2363 cat >&5 <<_ACEOF
2364
2365
2366 ## ----------- ##
2367 ## Core tests. ##
2368 ## ----------- ##
2369
2370 _ACEOF
2371
2372
2373 # Keep a trace of the command line.
2374 # Strip out --no-create and --no-recursion so they do not pile up.
2375 # Strip out --silent because we don't want to record it for future runs.
2376 # Also quote any args containing shell meta-characters.
2377 # Make two passes to allow for proper duplicate-argument suppression.
2378 ac_configure_args=
2379 ac_configure_args0=
2380 ac_configure_args1=
2381 ac_must_keep_next=false
2382 for ac_pass in 1 2
2383 do
2384   for ac_arg
2385   do
2386     case $ac_arg in
2387     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2388     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2389     | -silent | --silent | --silen | --sile | --sil)
2390       continue ;;
2391     *\'*)
2392       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2393     esac
2394     case $ac_pass in
2395     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2396     2)
2397       as_fn_append ac_configure_args1 " '$ac_arg'"
2398       if test $ac_must_keep_next = true; then
2399         ac_must_keep_next=false # Got value, back to normal.
2400       else
2401         case $ac_arg in
2402           *=* | --config-cache | -C | -disable-* | --disable-* \
2403           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2404           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2405           | -with-* | --with-* | -without-* | --without-* | --x)
2406             case "$ac_configure_args0 " in
2407               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2408             esac
2409             ;;
2410           -* ) ac_must_keep_next=true ;;
2411         esac
2412       fi
2413       as_fn_append ac_configure_args " '$ac_arg'"
2414       ;;
2415     esac
2416   done
2417 done
2418 { ac_configure_args0=; unset ac_configure_args0;}
2419 { ac_configure_args1=; unset ac_configure_args1;}
2420
2421 # When interrupted or exit'd, cleanup temporary files, and complete
2422 # config.log.  We remove comments because anyway the quotes in there
2423 # would cause problems or look ugly.
2424 # WARNING: Use '\'' to represent an apostrophe within the trap.
2425 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2426 trap 'exit_status=$?
2427   # Save into config.log some information that might help in debugging.
2428   {
2429     echo
2430
2431     $as_echo "## ---------------- ##
2432 ## Cache variables. ##
2433 ## ---------------- ##"
2434     echo
2435     # The following way of writing the cache mishandles newlines in values,
2436 (
2437   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2438     eval ac_val=\$$ac_var
2439     case $ac_val in #(
2440     *${as_nl}*)
2441       case $ac_var in #(
2442       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2443 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2444       esac
2445       case $ac_var in #(
2446       _ | IFS | as_nl) ;; #(
2447       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2448       *) { eval $ac_var=; unset $ac_var;} ;;
2449       esac ;;
2450     esac
2451   done
2452   (set) 2>&1 |
2453     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2454     *${as_nl}ac_space=\ *)
2455       sed -n \
2456         "s/'\''/'\''\\\\'\'''\''/g;
2457           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2458       ;; #(
2459     *)
2460       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2461       ;;
2462     esac |
2463     sort
2464 )
2465     echo
2466
2467     $as_echo "## ----------------- ##
2468 ## Output variables. ##
2469 ## ----------------- ##"
2470     echo
2471     for ac_var in $ac_subst_vars
2472     do
2473       eval ac_val=\$$ac_var
2474       case $ac_val in
2475       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2476       esac
2477       $as_echo "$ac_var='\''$ac_val'\''"
2478     done | sort
2479     echo
2480
2481     if test -n "$ac_subst_files"; then
2482       $as_echo "## ------------------- ##
2483 ## File substitutions. ##
2484 ## ------------------- ##"
2485       echo
2486       for ac_var in $ac_subst_files
2487       do
2488         eval ac_val=\$$ac_var
2489         case $ac_val in
2490         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2491         esac
2492         $as_echo "$ac_var='\''$ac_val'\''"
2493       done | sort
2494       echo
2495     fi
2496
2497     if test -s confdefs.h; then
2498       $as_echo "## ----------- ##
2499 ## confdefs.h. ##
2500 ## ----------- ##"
2501       echo
2502       cat confdefs.h
2503       echo
2504     fi
2505     test "$ac_signal" != 0 &&
2506       $as_echo "$as_me: caught signal $ac_signal"
2507     $as_echo "$as_me: exit $exit_status"
2508   } >&5
2509   rm -f core *.core core.conftest.* &&
2510     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2511     exit $exit_status
2512 ' 0
2513 for ac_signal in 1 2 13 15; do
2514   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2515 done
2516 ac_signal=0
2517
2518 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2519 rm -f -r conftest* confdefs.h
2520
2521 $as_echo "/* confdefs.h */" > confdefs.h
2522
2523 # Predefined preprocessor variables.
2524
2525 cat >>confdefs.h <<_ACEOF
2526 #define PACKAGE_NAME "$PACKAGE_NAME"
2527 _ACEOF
2528
2529 cat >>confdefs.h <<_ACEOF
2530 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2531 _ACEOF
2532
2533 cat >>confdefs.h <<_ACEOF
2534 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2535 _ACEOF
2536
2537 cat >>confdefs.h <<_ACEOF
2538 #define PACKAGE_STRING "$PACKAGE_STRING"
2539 _ACEOF
2540
2541 cat >>confdefs.h <<_ACEOF
2542 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2543 _ACEOF
2544
2545 cat >>confdefs.h <<_ACEOF
2546 #define PACKAGE_URL "$PACKAGE_URL"
2547 _ACEOF
2548
2549
2550 # Let the site file select an alternate cache file if it wants to.
2551 # Prefer an explicitly selected file to automatically selected ones.
2552 ac_site_file1=NONE
2553 ac_site_file2=NONE
2554 if test -n "$CONFIG_SITE"; then
2555   # We do not want a PATH search for config.site.
2556   case $CONFIG_SITE in #((
2557     -*)  ac_site_file1=./$CONFIG_SITE;;
2558     */*) ac_site_file1=$CONFIG_SITE;;
2559     *)   ac_site_file1=./$CONFIG_SITE;;
2560   esac
2561 elif test "x$prefix" != xNONE; then
2562   ac_site_file1=$prefix/share/config.site
2563   ac_site_file2=$prefix/etc/config.site
2564 else
2565   ac_site_file1=$ac_default_prefix/share/config.site
2566   ac_site_file2=$ac_default_prefix/etc/config.site
2567 fi
2568 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2569 do
2570   test "x$ac_site_file" = xNONE && continue
2571   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2572     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2573 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2574     sed 's/^/| /' "$ac_site_file" >&5
2575     . "$ac_site_file" \
2576       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2577 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2578 as_fn_error $? "failed to load site script $ac_site_file
2579 See \`config.log' for more details" "$LINENO" 5; }
2580   fi
2581 done
2582
2583 if test -r "$cache_file"; then
2584   # Some versions of bash will fail to source /dev/null (special files
2585   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2586   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2587     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2588 $as_echo "$as_me: loading cache $cache_file" >&6;}
2589     case $cache_file in
2590       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2591       *)                      . "./$cache_file";;
2592     esac
2593   fi
2594 else
2595   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2596 $as_echo "$as_me: creating cache $cache_file" >&6;}
2597   >$cache_file
2598 fi
2599
2600 # Check that the precious variables saved in the cache have kept the same
2601 # value.
2602 ac_cache_corrupted=false
2603 for ac_var in $ac_precious_vars; do
2604   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2605   eval ac_new_set=\$ac_env_${ac_var}_set
2606   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2607   eval ac_new_val=\$ac_env_${ac_var}_value
2608   case $ac_old_set,$ac_new_set in
2609     set,)
2610       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2611 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2612       ac_cache_corrupted=: ;;
2613     ,set)
2614       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2615 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2616       ac_cache_corrupted=: ;;
2617     ,);;
2618     *)
2619       if test "x$ac_old_val" != "x$ac_new_val"; then
2620         # differences in whitespace do not lead to failure.
2621         ac_old_val_w=`echo x $ac_old_val`
2622         ac_new_val_w=`echo x $ac_new_val`
2623         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2624           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2625 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2626           ac_cache_corrupted=:
2627         else
2628           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2629 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2630           eval $ac_var=\$ac_old_val
2631         fi
2632         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2633 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2634         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2635 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2636       fi;;
2637   esac
2638   # Pass precious variables to config.status.
2639   if test "$ac_new_set" = set; then
2640     case $ac_new_val in
2641     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2642     *) ac_arg=$ac_var=$ac_new_val ;;
2643     esac
2644     case " $ac_configure_args " in
2645       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2646       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2647     esac
2648   fi
2649 done
2650 if $ac_cache_corrupted; then
2651   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2652 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2653   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2654 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2655   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2656 fi
2657 ## -------------------- ##
2658 ## Main body of script. ##
2659 ## -------------------- ##
2660
2661 ac_ext=c
2662 ac_cpp='$CPP $CPPFLAGS'
2663 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2664 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2665 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2666
2667
2668
2669
2670
2671
2672 ac_aux_dir=
2673 for ac_dir in config "$srcdir"/config; do
2674   if test -f "$ac_dir/install-sh"; then
2675     ac_aux_dir=$ac_dir
2676     ac_install_sh="$ac_aux_dir/install-sh -c"
2677     break
2678   elif test -f "$ac_dir/install.sh"; then
2679     ac_aux_dir=$ac_dir
2680     ac_install_sh="$ac_aux_dir/install.sh -c"
2681     break
2682   elif test -f "$ac_dir/shtool"; then
2683     ac_aux_dir=$ac_dir
2684     ac_install_sh="$ac_aux_dir/shtool install -c"
2685     break
2686   fi
2687 done
2688 if test -z "$ac_aux_dir"; then
2689   as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2690 fi
2691
2692 # These three variables are undocumented and unsupported,
2693 # and are intended to be withdrawn in a future Autoconf release.
2694 # They can cause serious problems if a builder's source tree is in a directory
2695 # whose full name contains unusual characters.
2696 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2697 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2698 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2699
2700
2701
2702 configure_args=$ac_configure_args
2703
2704
2705 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\.[0-9][0-9]*\)'`
2706
2707
2708 cat >>confdefs.h <<_ACEOF
2709 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2710 _ACEOF
2711
2712
2713
2714
2715
2716 # Check whether --with-extra-version was given.
2717 if test "${with_extra_version+set}" = set; then :
2718   withval=$with_extra_version;
2719   case $withval in
2720     yes)
2721       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2722       ;;
2723     no)
2724       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2725       ;;
2726     *)
2727       PG_VERSION="$PACKAGE_VERSION$withval"
2728       ;;
2729   esac
2730
2731 else
2732   PG_VERSION="$PACKAGE_VERSION"
2733 fi
2734
2735
2736
2737 cat >>confdefs.h <<_ACEOF
2738 #define PG_VERSION "$PG_VERSION"
2739 _ACEOF
2740
2741
2742 # Make sure we can run config.sub.
2743 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2744   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2745
2746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2747 $as_echo_n "checking build system type... " >&6; }
2748 if ${ac_cv_build+:} false; then :
2749   $as_echo_n "(cached) " >&6
2750 else
2751   ac_build_alias=$build_alias
2752 test "x$ac_build_alias" = x &&
2753   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2754 test "x$ac_build_alias" = x &&
2755   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2756 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2757   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2758
2759 fi
2760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2761 $as_echo "$ac_cv_build" >&6; }
2762 case $ac_cv_build in
2763 *-*-*) ;;
2764 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2765 esac
2766 build=$ac_cv_build
2767 ac_save_IFS=$IFS; IFS='-'
2768 set x $ac_cv_build
2769 shift
2770 build_cpu=$1
2771 build_vendor=$2
2772 shift; shift
2773 # Remember, the first character of IFS is used to create $*,
2774 # except with old shells:
2775 build_os=$*
2776 IFS=$ac_save_IFS
2777 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2778
2779
2780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2781 $as_echo_n "checking host system type... " >&6; }
2782 if ${ac_cv_host+:} false; then :
2783   $as_echo_n "(cached) " >&6
2784 else
2785   if test "x$host_alias" = x; then
2786   ac_cv_host=$ac_cv_build
2787 else
2788   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2789     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2790 fi
2791
2792 fi
2793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2794 $as_echo "$ac_cv_host" >&6; }
2795 case $ac_cv_host in
2796 *-*-*) ;;
2797 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2798 esac
2799 host=$ac_cv_host
2800 ac_save_IFS=$IFS; IFS='-'
2801 set x $ac_cv_host
2802 shift
2803 host_cpu=$1
2804 host_vendor=$2
2805 shift; shift
2806 # Remember, the first character of IFS is used to create $*,
2807 # except with old shells:
2808 host_os=$*
2809 IFS=$ac_save_IFS
2810 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2811
2812
2813
2814 template=
2815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2816 $as_echo_n "checking which template to use... " >&6; }
2817
2818
2819
2820
2821 # Check whether --with-template was given.
2822 if test "${with_template+set}" = set; then :
2823   withval=$with_template;
2824   case $withval in
2825     yes)
2826       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2827       ;;
2828     no)
2829       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2830       ;;
2831     *)
2832
2833   case $withval in
2834     list)   echo; ls "$srcdir/src/template"; exit;;
2835     *)      if test -f "$srcdir/src/template/$with_template" ; then
2836               template=$withval
2837             else
2838               as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2839             fi;;
2840   esac
2841
2842       ;;
2843   esac
2844
2845 else
2846
2847 # --with-template not given
2848
2849 case $host_os in
2850      aix*) template=aix ;;
2851   cygwin*) template=cygwin ;;
2852   darwin*) template=darwin ;;
2853 dragonfly*) template=netbsd ;;
2854  freebsd*) template=freebsd ;;
2855     hpux*) template=hpux ;;
2856  linux*|gnu*|k*bsd*-gnu)
2857            template=linux ;;
2858    mingw*) template=win32 ;;
2859   netbsd*) template=netbsd ;;
2860  openbsd*) template=openbsd ;;
2861      sco*) template=sco ;;
2862  solaris*) template=solaris ;;
2863    sysv5*) template=unixware ;;
2864 esac
2865
2866   if test x"$template" = x"" ; then
2867     as_fn_error $? "
2868 *******************************************************************
2869 PostgreSQL has apparently not been ported to your platform yet.
2870 To try a manual configuration, look into the src/template directory
2871 for a similar platform and use the '--with-template=' option.
2872
2873 Please also contact <pgsql-bugs@postgresql.org> to see about
2874 rectifying this.  Include the above 'checking host system type...'
2875 line.
2876 *******************************************************************
2877 " "$LINENO" 5
2878   fi
2879
2880
2881 fi
2882
2883
2884
2885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
2886 $as_echo "$template" >&6; }
2887
2888 PORTNAME=$template
2889
2890
2891 # Initialize default assumption that we do not need separate assembly code
2892 # for TAS (test-and-set).  This can be overridden by the template file
2893 # when it's executed.
2894 need_tas=no
2895 tas_file=dummy.s
2896
2897
2898
2899 ##
2900 ## Command line options
2901 ##
2902
2903 #
2904 # Add non-standard directories to the include path
2905 #
2906
2907
2908
2909 # Check whether --with-includes was given.
2910 if test "${with_includes+set}" = set; then :
2911   withval=$with_includes;
2912   case $withval in
2913     yes)
2914       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
2915       ;;
2916     no)
2917       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
2918       ;;
2919     *)
2920
2921       ;;
2922   esac
2923
2924 fi
2925
2926
2927
2928
2929 #
2930 # Add non-standard directories to the library search path
2931 #
2932
2933
2934
2935 # Check whether --with-libraries was given.
2936 if test "${with_libraries+set}" = set; then :
2937   withval=$with_libraries;
2938   case $withval in
2939     yes)
2940       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
2941       ;;
2942     no)
2943       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
2944       ;;
2945     *)
2946       LIBRARY_DIRS=$withval
2947       ;;
2948   esac
2949
2950 fi
2951
2952
2953
2954
2955
2956
2957 # Check whether --with-libs was given.
2958 if test "${with_libs+set}" = set; then :
2959   withval=$with_libs;
2960   case $withval in
2961     yes)
2962       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
2963       ;;
2964     no)
2965       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
2966       ;;
2967     *)
2968       LIBRARY_DIRS=$withval
2969       ;;
2970   esac
2971
2972 fi
2973
2974
2975
2976
2977 #
2978 # 64-bit integer date/time storage: enabled by default.
2979 #
2980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with 64-bit integer date/time support" >&5
2981 $as_echo_n "checking whether to build with 64-bit integer date/time support... " >&6; }
2982
2983
2984 # Check whether --enable-integer-datetimes was given.
2985 if test "${enable_integer_datetimes+set}" = set; then :
2986   enableval=$enable_integer_datetimes;
2987   case $enableval in
2988     yes)
2989
2990 $as_echo "#define USE_INTEGER_DATETIMES 1" >>confdefs.h
2991
2992       ;;
2993     no)
2994       :
2995       ;;
2996     *)
2997       as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
2998       ;;
2999   esac
3000
3001 else
3002   enable_integer_datetimes=yes
3003
3004 $as_echo "#define USE_INTEGER_DATETIMES 1" >>confdefs.h
3005
3006 fi
3007
3008
3009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_integer_datetimes" >&5
3010 $as_echo "$enable_integer_datetimes" >&6; }
3011
3012
3013 #
3014 # NLS
3015 #
3016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3017 $as_echo_n "checking whether NLS is wanted... " >&6; }
3018
3019
3020 # Check whether --enable-nls was given.
3021 if test "${enable_nls+set}" = set; then :
3022   enableval=$enable_nls;
3023   case $enableval in
3024     yes)
3025       :
3026       ;;
3027     no)
3028       :
3029       ;;
3030     *)
3031       enable_nls=yes
3032 WANTED_LANGUAGES=$enableval
3033       ;;
3034   esac
3035
3036 else
3037   enable_nls=no
3038 fi
3039
3040
3041
3042 if test "$enable_nls" = yes; then
3043
3044 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3045
3046 fi
3047
3048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3049 $as_echo "$enable_nls" >&6; }
3050
3051
3052
3053 #
3054 # Default port number (--with-pgport), default 5432
3055 #
3056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3057 $as_echo_n "checking for default port number... " >&6; }
3058
3059
3060
3061 # Check whether --with-pgport was given.
3062 if test "${with_pgport+set}" = set; then :
3063   withval=$with_pgport;
3064   case $withval in
3065     yes)
3066       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3067       ;;
3068     no)
3069       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3070       ;;
3071     *)
3072       default_port=$withval
3073       ;;
3074   esac
3075
3076 else
3077   default_port=5432
3078 fi
3079
3080
3081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3082 $as_echo "$default_port" >&6; }
3083 # Need both of these because some places want an integer and some a string
3084
3085 cat >>confdefs.h <<_ACEOF
3086 #define DEF_PGPORT ${default_port}
3087 _ACEOF
3088
3089
3090 cat >>confdefs.h <<_ACEOF
3091 #define DEF_PGPORT_STR "${default_port}"
3092 _ACEOF
3093
3094
3095
3096 #
3097 # '-rpath'-like feature can be disabled
3098 #
3099
3100
3101 # Check whether --enable-rpath was given.
3102 if test "${enable_rpath+set}" = set; then :
3103   enableval=$enable_rpath;
3104   case $enableval in
3105     yes)
3106       :
3107       ;;
3108     no)
3109       :
3110       ;;
3111     *)
3112       as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3113       ;;
3114   esac
3115
3116 else
3117   enable_rpath=yes
3118
3119 fi
3120
3121
3122
3123
3124 #
3125 # Spinlocks
3126 #
3127
3128
3129 # Check whether --enable-spinlocks was given.
3130 if test "${enable_spinlocks+set}" = set; then :
3131   enableval=$enable_spinlocks;
3132   case $enableval in
3133     yes)
3134       :
3135       ;;
3136     no)
3137       :
3138       ;;
3139     *)
3140       as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3141       ;;
3142   esac
3143
3144 else
3145   enable_spinlocks=yes
3146
3147 fi
3148
3149
3150
3151 #
3152 # Atomic operations
3153 #
3154
3155
3156 # Check whether --enable-atomics was given.
3157 if test "${enable_atomics+set}" = set; then :
3158   enableval=$enable_atomics;
3159   case $enableval in
3160     yes)
3161       :
3162       ;;
3163     no)
3164       :
3165       ;;
3166     *)
3167       as_fn_error $? "no argument expected for --enable-atomics option" "$LINENO" 5
3168       ;;
3169   esac
3170
3171 else
3172   enable_atomics=yes
3173
3174 fi
3175
3176
3177
3178 #
3179 # --enable-debug adds -g to compiler flags
3180 #
3181
3182
3183 # Check whether --enable-debug was given.
3184 if test "${enable_debug+set}" = set; then :
3185   enableval=$enable_debug;
3186   case $enableval in
3187     yes)
3188       :
3189       ;;
3190     no)
3191       :
3192       ;;
3193     *)
3194       as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3195       ;;
3196   esac
3197
3198 else
3199   enable_debug=no
3200
3201 fi
3202
3203
3204
3205
3206 #
3207 # --enable-profiling enables gcc profiling
3208 #
3209
3210
3211 # Check whether --enable-profiling was given.
3212 if test "${enable_profiling+set}" = set; then :
3213   enableval=$enable_profiling;
3214   case $enableval in
3215     yes)
3216       :
3217       ;;
3218     no)
3219       :
3220       ;;
3221     *)
3222       as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3223       ;;
3224   esac
3225
3226 else
3227   enable_profiling=no
3228
3229 fi
3230
3231
3232
3233 #
3234 # --enable-coverage enables generation of code coverage metrics with gcov
3235 #
3236
3237
3238 # Check whether --enable-coverage was given.
3239 if test "${enable_coverage+set}" = set; then :
3240   enableval=$enable_coverage;
3241   case $enableval in
3242     yes)
3243       for ac_prog in gcov
3244 do
3245   # Extract the first word of "$ac_prog", so it can be a program name with args.
3246 set dummy $ac_prog; ac_word=$2
3247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3248 $as_echo_n "checking for $ac_word... " >&6; }
3249 if ${ac_cv_prog_GCOV+:} false; then :
3250   $as_echo_n "(cached) " >&6
3251 else
3252   if test -n "$GCOV"; then
3253   ac_cv_prog_GCOV="$GCOV" # Let the user override the test.
3254 else
3255 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3256 for as_dir in $PATH
3257 do
3258   IFS=$as_save_IFS
3259   test -z "$as_dir" && as_dir=.
3260     for ac_exec_ext in '' $ac_executable_extensions; do
3261   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3262     ac_cv_prog_GCOV="$ac_prog"
3263     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3264     break 2
3265   fi
3266 done
3267   done
3268 IFS=$as_save_IFS
3269
3270 fi
3271 fi
3272 GCOV=$ac_cv_prog_GCOV
3273 if test -n "$GCOV"; then
3274   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3275 $as_echo "$GCOV" >&6; }
3276 else
3277   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3278 $as_echo "no" >&6; }
3279 fi
3280
3281
3282   test -n "$GCOV" && break
3283 done
3284
3285 if test -z "$GCOV"; then
3286   as_fn_error $? "gcov not found" "$LINENO" 5
3287 fi
3288 for ac_prog in lcov
3289 do
3290   # Extract the first word of "$ac_prog", so it can be a program name with args.
3291 set dummy $ac_prog; ac_word=$2
3292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3293 $as_echo_n "checking for $ac_word... " >&6; }
3294 if ${ac_cv_prog_LCOV+:} false; then :
3295   $as_echo_n "(cached) " >&6
3296 else
3297   if test -n "$LCOV"; then
3298   ac_cv_prog_LCOV="$LCOV" # Let the user override the test.
3299 else
3300 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3301 for as_dir in $PATH
3302 do
3303   IFS=$as_save_IFS
3304   test -z "$as_dir" && as_dir=.
3305     for ac_exec_ext in '' $ac_executable_extensions; do
3306   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3307     ac_cv_prog_LCOV="$ac_prog"
3308     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3309     break 2
3310   fi
3311 done
3312   done
3313 IFS=$as_save_IFS
3314
3315 fi
3316 fi
3317 LCOV=$ac_cv_prog_LCOV
3318 if test -n "$LCOV"; then
3319   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3320 $as_echo "$LCOV" >&6; }
3321 else
3322   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3323 $as_echo "no" >&6; }
3324 fi
3325
3326
3327   test -n "$LCOV" && break
3328 done
3329
3330 if test -z "$LCOV"; then
3331   as_fn_error $? "lcov not found" "$LINENO" 5
3332 fi
3333 for ac_prog in genhtml
3334 do
3335   # Extract the first word of "$ac_prog", so it can be a program name with args.
3336 set dummy $ac_prog; ac_word=$2
3337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3338 $as_echo_n "checking for $ac_word... " >&6; }
3339 if ${ac_cv_prog_GENHTML+:} false; then :
3340   $as_echo_n "(cached) " >&6
3341 else
3342   if test -n "$GENHTML"; then
3343   ac_cv_prog_GENHTML="$GENHTML" # Let the user override the test.
3344 else
3345 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3346 for as_dir in $PATH
3347 do
3348   IFS=$as_save_IFS
3349   test -z "$as_dir" && as_dir=.
3350     for ac_exec_ext in '' $ac_executable_extensions; do
3351   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3352     ac_cv_prog_GENHTML="$ac_prog"
3353     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3354     break 2
3355   fi
3356 done
3357   done
3358 IFS=$as_save_IFS
3359
3360 fi
3361 fi
3362 GENHTML=$ac_cv_prog_GENHTML
3363 if test -n "$GENHTML"; then
3364   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3365 $as_echo "$GENHTML" >&6; }
3366 else
3367   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3368 $as_echo "no" >&6; }
3369 fi
3370
3371
3372   test -n "$GENHTML" && break
3373 done
3374
3375 if test -z "$GENHTML"; then
3376   as_fn_error $? "genhtml not found" "$LINENO" 5
3377 fi
3378       ;;
3379     no)
3380       :
3381       ;;
3382     *)
3383       as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3384       ;;
3385   esac
3386
3387 else
3388   enable_coverage=no
3389
3390 fi
3391
3392
3393
3394
3395 #
3396 # DTrace
3397 #
3398
3399
3400 # Check whether --enable-dtrace was given.
3401 if test "${enable_dtrace+set}" = set; then :
3402   enableval=$enable_dtrace;
3403   case $enableval in
3404     yes)
3405       for ac_prog in dtrace
3406 do
3407   # Extract the first word of "$ac_prog", so it can be a program name with args.
3408 set dummy $ac_prog; ac_word=$2
3409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3410 $as_echo_n "checking for $ac_word... " >&6; }
3411 if ${ac_cv_prog_DTRACE+:} false; then :
3412   $as_echo_n "(cached) " >&6
3413 else
3414   if test -n "$DTRACE"; then
3415   ac_cv_prog_DTRACE="$DTRACE" # Let the user override the test.
3416 else
3417 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3418 for as_dir in $PATH
3419 do
3420   IFS=$as_save_IFS
3421   test -z "$as_dir" && as_dir=.
3422     for ac_exec_ext in '' $ac_executable_extensions; do
3423   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3424     ac_cv_prog_DTRACE="$ac_prog"
3425     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3426     break 2
3427   fi
3428 done
3429   done
3430 IFS=$as_save_IFS
3431
3432 fi
3433 fi
3434 DTRACE=$ac_cv_prog_DTRACE
3435 if test -n "$DTRACE"; then
3436   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3437 $as_echo "$DTRACE" >&6; }
3438 else
3439   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3440 $as_echo "no" >&6; }
3441 fi
3442
3443
3444   test -n "$DTRACE" && break
3445 done
3446
3447 if test -z "$DTRACE"; then
3448   as_fn_error $? "dtrace not found" "$LINENO" 5
3449 fi
3450
3451       ;;
3452     no)
3453       :
3454       ;;
3455     *)
3456       as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3457       ;;
3458   esac
3459
3460 else
3461   enable_dtrace=no
3462
3463 fi
3464
3465
3466
3467
3468 #
3469 # Block size
3470 #
3471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3472 $as_echo_n "checking for block size... " >&6; }
3473
3474
3475
3476 # Check whether --with-blocksize was given.
3477 if test "${with_blocksize+set}" = set; then :
3478   withval=$with_blocksize;
3479   case $withval in
3480     yes)
3481       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3482       ;;
3483     no)
3484       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3485       ;;
3486     *)
3487       blocksize=$withval
3488       ;;
3489   esac
3490
3491 else
3492   blocksize=8
3493 fi
3494
3495
3496 case ${blocksize} in
3497   1) BLCKSZ=1024;;
3498   2) BLCKSZ=2048;;
3499   4) BLCKSZ=4096;;
3500   8) BLCKSZ=8192;;
3501  16) BLCKSZ=16384;;
3502  32) BLCKSZ=32768;;
3503   *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3504 esac
3505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3506 $as_echo "${blocksize}kB" >&6; }
3507
3508
3509 cat >>confdefs.h <<_ACEOF
3510 #define BLCKSZ ${BLCKSZ}
3511 _ACEOF
3512
3513
3514 #
3515 # Relation segment size
3516 #
3517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3518 $as_echo_n "checking for segment size... " >&6; }
3519
3520
3521
3522 # Check whether --with-segsize was given.
3523 if test "${with_segsize+set}" = set; then :
3524   withval=$with_segsize;
3525   case $withval in
3526     yes)
3527       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3528       ;;
3529     no)
3530       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3531       ;;
3532     *)
3533       segsize=$withval
3534       ;;
3535   esac
3536
3537 else
3538   segsize=1
3539 fi
3540
3541
3542 # this expression is set up to avoid unnecessary integer overflow
3543 # blocksize is already guaranteed to be a factor of 1024
3544 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3545 test $? -eq 0 || exit 1
3546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3547 $as_echo "${segsize}GB" >&6; }
3548
3549
3550 cat >>confdefs.h <<_ACEOF
3551 #define RELSEG_SIZE ${RELSEG_SIZE}
3552 _ACEOF
3553
3554
3555 #
3556 # WAL block size
3557 #
3558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3559 $as_echo_n "checking for WAL block size... " >&6; }
3560
3561
3562
3563 # Check whether --with-wal-blocksize was given.
3564 if test "${with_wal_blocksize+set}" = set; then :
3565   withval=$with_wal_blocksize;
3566   case $withval in
3567     yes)
3568       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3569       ;;
3570     no)
3571       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3572       ;;
3573     *)
3574       wal_blocksize=$withval
3575       ;;
3576   esac
3577
3578 else
3579   wal_blocksize=8
3580 fi
3581
3582
3583 case ${wal_blocksize} in
3584   1) XLOG_BLCKSZ=1024;;
3585   2) XLOG_BLCKSZ=2048;;
3586   4) XLOG_BLCKSZ=4096;;
3587   8) XLOG_BLCKSZ=8192;;
3588  16) XLOG_BLCKSZ=16384;;
3589  32) XLOG_BLCKSZ=32768;;
3590  64) XLOG_BLCKSZ=65536;;
3591   *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3592 esac
3593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3594 $as_echo "${wal_blocksize}kB" >&6; }
3595
3596
3597 cat >>confdefs.h <<_ACEOF
3598 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3599 _ACEOF
3600
3601
3602 #
3603 # WAL segment size
3604 #
3605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL segment size" >&5
3606 $as_echo_n "checking for WAL segment size... " >&6; }
3607
3608
3609
3610 # Check whether --with-wal-segsize was given.
3611 if test "${with_wal_segsize+set}" = set; then :
3612   withval=$with_wal_segsize;
3613   case $withval in
3614     yes)
3615       as_fn_error $? "argument required for --with-wal-segsize option" "$LINENO" 5
3616       ;;
3617     no)
3618       as_fn_error $? "argument required for --with-wal-segsize option" "$LINENO" 5
3619       ;;
3620     *)
3621       wal_segsize=$withval
3622       ;;
3623   esac
3624
3625 else
3626   wal_segsize=16
3627 fi
3628
3629
3630 case ${wal_segsize} in
3631   1) ;;
3632   2) ;;
3633   4) ;;
3634   8) ;;
3635  16) ;;
3636  32) ;;
3637  64) ;;
3638   *) as_fn_error $? "Invalid WAL segment size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3639 esac
3640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_segsize}MB" >&5
3641 $as_echo "${wal_segsize}MB" >&6; }
3642
3643
3644 cat >>confdefs.h <<_ACEOF
3645 #define XLOG_SEG_SIZE (${wal_segsize} * 1024 * 1024)
3646 _ACEOF
3647
3648
3649 #
3650 # C compiler
3651 #
3652
3653 # For historical reasons you can also use --with-CC to specify the C compiler
3654 # to use, although the standard way to do this is to set the CC environment
3655 # variable.
3656
3657
3658
3659 # Check whether --with-CC was given.
3660 if test "${with_CC+set}" = set; then :
3661   withval=$with_CC;
3662   case $withval in
3663     yes)
3664       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3665       ;;
3666     no)
3667       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3668       ;;
3669     *)
3670       CC=$with_CC
3671       ;;
3672   esac
3673
3674 fi
3675
3676
3677
3678 case $template in
3679   aix) pgac_cc_list="gcc xlc";;
3680     *) pgac_cc_list="gcc cc";;
3681 esac
3682
3683 ac_ext=c
3684 ac_cpp='$CPP $CPPFLAGS'
3685 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3686 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3687 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3688 if test -n "$ac_tool_prefix"; then
3689   for ac_prog in $pgac_cc_list
3690   do
3691     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3692 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3694 $as_echo_n "checking for $ac_word... " >&6; }
3695 if ${ac_cv_prog_CC+:} false; then :
3696   $as_echo_n "(cached) " >&6
3697 else
3698   if test -n "$CC"; then
3699   ac_cv_prog_CC="$CC" # Let the user override the test.
3700 else
3701 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3702 for as_dir in $PATH
3703 do
3704   IFS=$as_save_IFS
3705   test -z "$as_dir" && as_dir=.
3706     for ac_exec_ext in '' $ac_executable_extensions; do
3707   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3708     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3709     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3710     break 2
3711   fi
3712 done
3713   done
3714 IFS=$as_save_IFS
3715
3716 fi
3717 fi
3718 CC=$ac_cv_prog_CC
3719 if test -n "$CC"; then
3720   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3721 $as_echo "$CC" >&6; }
3722 else
3723   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3724 $as_echo "no" >&6; }
3725 fi
3726
3727
3728     test -n "$CC" && break
3729   done
3730 fi
3731 if test -z "$CC"; then
3732   ac_ct_CC=$CC
3733   for ac_prog in $pgac_cc_list
3734 do
3735   # Extract the first word of "$ac_prog", so it can be a program name with args.
3736 set dummy $ac_prog; ac_word=$2
3737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3738 $as_echo_n "checking for $ac_word... " >&6; }
3739 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3740   $as_echo_n "(cached) " >&6
3741 else
3742   if test -n "$ac_ct_CC"; then
3743   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3744 else
3745 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3746 for as_dir in $PATH
3747 do
3748   IFS=$as_save_IFS
3749   test -z "$as_dir" && as_dir=.
3750     for ac_exec_ext in '' $ac_executable_extensions; do
3751   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3752     ac_cv_prog_ac_ct_CC="$ac_prog"
3753     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3754     break 2
3755   fi
3756 done
3757   done
3758 IFS=$as_save_IFS
3759
3760 fi
3761 fi
3762 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3763 if test -n "$ac_ct_CC"; then
3764   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3765 $as_echo "$ac_ct_CC" >&6; }
3766 else
3767   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3768 $as_echo "no" >&6; }
3769 fi
3770
3771
3772   test -n "$ac_ct_CC" && break
3773 done
3774
3775   if test "x$ac_ct_CC" = x; then
3776     CC=""
3777   else
3778     case $cross_compiling:$ac_tool_warned in
3779 yes:)
3780 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3781 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3782 ac_tool_warned=yes ;;
3783 esac
3784     CC=$ac_ct_CC
3785   fi
3786 fi
3787
3788
3789 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3790 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3791 as_fn_error $? "no acceptable C compiler found in \$PATH
3792 See \`config.log' for more details" "$LINENO" 5; }
3793
3794 # Provide some information about the compiler.
3795 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3796 set X $ac_compile
3797 ac_compiler=$2
3798 for ac_option in --version -v -V -qversion; do
3799   { { ac_try="$ac_compiler $ac_option >&5"
3800 case "(($ac_try" in
3801   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3802   *) ac_try_echo=$ac_try;;
3803 esac
3804 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3805 $as_echo "$ac_try_echo"; } >&5
3806   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3807   ac_status=$?
3808   if test -s conftest.err; then
3809     sed '10a\
3810 ... rest of stderr output deleted ...
3811          10q' conftest.err >conftest.er1
3812     cat conftest.er1 >&5
3813   fi
3814   rm -f conftest.er1 conftest.err
3815   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3816   test $ac_status = 0; }
3817 done
3818
3819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3820 /* end confdefs.h.  */
3821
3822 int
3823 main ()
3824 {
3825
3826   ;
3827   return 0;
3828 }
3829 _ACEOF
3830 ac_clean_files_save=$ac_clean_files
3831 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3832 # Try to create an executable without -o first, disregard a.out.
3833 # It will help us diagnose broken compilers, and finding out an intuition
3834 # of exeext.
3835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3836 $as_echo_n "checking whether the C compiler works... " >&6; }
3837 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3838
3839 # The possible output files:
3840 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3841
3842 ac_rmfiles=
3843 for ac_file in $ac_files
3844 do
3845   case $ac_file in
3846     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3847     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3848   esac
3849 done
3850 rm -f $ac_rmfiles
3851
3852 if { { ac_try="$ac_link_default"
3853 case "(($ac_try" in
3854   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3855   *) ac_try_echo=$ac_try;;
3856 esac
3857 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3858 $as_echo "$ac_try_echo"; } >&5
3859   (eval "$ac_link_default") 2>&5
3860   ac_status=$?
3861   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3862   test $ac_status = 0; }; then :
3863   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3864 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3865 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3866 # so that the user can short-circuit this test for compilers unknown to
3867 # Autoconf.
3868 for ac_file in $ac_files ''
3869 do
3870   test -f "$ac_file" || continue
3871   case $ac_file in
3872     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3873         ;;
3874     [ab].out )
3875         # We found the default executable, but exeext='' is most
3876         # certainly right.
3877         break;;
3878     *.* )
3879         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3880         then :; else
3881            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3882         fi
3883         # We set ac_cv_exeext here because the later test for it is not
3884         # safe: cross compilers may not add the suffix if given an `-o'
3885         # argument, so we may need to know it at that point already.
3886         # Even if this section looks crufty: it has the advantage of
3887         # actually working.
3888         break;;
3889     * )
3890         break;;
3891   esac
3892 done
3893 test "$ac_cv_exeext" = no && ac_cv_exeext=
3894
3895 else
3896   ac_file=''
3897 fi
3898 if test -z "$ac_file"; then :
3899   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3900 $as_echo "no" >&6; }
3901 $as_echo "$as_me: failed program was:" >&5
3902 sed 's/^/| /' conftest.$ac_ext >&5
3903
3904 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3905 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3906 as_fn_error 77 "C compiler cannot create executables
3907 See \`config.log' for more details" "$LINENO" 5; }
3908 else
3909   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3910 $as_echo "yes" >&6; }
3911 fi
3912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3913 $as_echo_n "checking for C compiler default output file name... " >&6; }
3914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3915 $as_echo "$ac_file" >&6; }
3916 ac_exeext=$ac_cv_exeext
3917
3918 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3919 ac_clean_files=$ac_clean_files_save
3920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3921 $as_echo_n "checking for suffix of executables... " >&6; }
3922 if { { ac_try="$ac_link"
3923 case "(($ac_try" in
3924   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3925   *) ac_try_echo=$ac_try;;
3926 esac
3927 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3928 $as_echo "$ac_try_echo"; } >&5
3929   (eval "$ac_link") 2>&5
3930   ac_status=$?
3931   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3932   test $ac_status = 0; }; then :
3933   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3934 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3935 # work properly (i.e., refer to `conftest.exe'), while it won't with
3936 # `rm'.
3937 for ac_file in conftest.exe conftest conftest.*; do
3938   test -f "$ac_file" || continue
3939   case $ac_file in
3940     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3941     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3942           break;;
3943     * ) break;;
3944   esac
3945 done
3946 else
3947   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3948 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3949 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3950 See \`config.log' for more details" "$LINENO" 5; }
3951 fi
3952 rm -f conftest conftest$ac_cv_exeext
3953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3954 $as_echo "$ac_cv_exeext" >&6; }
3955
3956 rm -f conftest.$ac_ext
3957 EXEEXT=$ac_cv_exeext
3958 ac_exeext=$EXEEXT
3959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3960 /* end confdefs.h.  */
3961 #include <stdio.h>
3962 int
3963 main ()
3964 {
3965 FILE *f = fopen ("conftest.out", "w");
3966  return ferror (f) || fclose (f) != 0;
3967
3968   ;
3969   return 0;
3970 }
3971 _ACEOF
3972 ac_clean_files="$ac_clean_files conftest.out"
3973 # Check that the compiler produces executables we can run.  If not, either
3974 # the compiler is broken, or we cross compile.
3975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3976 $as_echo_n "checking whether we are cross compiling... " >&6; }
3977 if test "$cross_compiling" != yes; then
3978   { { ac_try="$ac_link"
3979 case "(($ac_try" in
3980   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3981   *) ac_try_echo=$ac_try;;
3982 esac
3983 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3984 $as_echo "$ac_try_echo"; } >&5
3985   (eval "$ac_link") 2>&5
3986   ac_status=$?
3987   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3988   test $ac_status = 0; }
3989   if { ac_try='./conftest$ac_cv_exeext'
3990   { { case "(($ac_try" in
3991   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3992   *) ac_try_echo=$ac_try;;
3993 esac
3994 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3995 $as_echo "$ac_try_echo"; } >&5
3996   (eval "$ac_try") 2>&5
3997   ac_status=$?
3998   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3999   test $ac_status = 0; }; }; then
4000     cross_compiling=no
4001   else
4002     if test "$cross_compiling" = maybe; then
4003         cross_compiling=yes
4004     else
4005         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4006 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4007 as_fn_error $? "cannot run C compiled programs.
4008 If you meant to cross compile, use \`--host'.
4009 See \`config.log' for more details" "$LINENO" 5; }
4010     fi
4011   fi
4012 fi
4013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4014 $as_echo "$cross_compiling" >&6; }
4015
4016 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4017 ac_clean_files=$ac_clean_files_save
4018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4019 $as_echo_n "checking for suffix of object files... " >&6; }
4020 if ${ac_cv_objext+:} false; then :
4021   $as_echo_n "(cached) " >&6
4022 else
4023   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4024 /* end confdefs.h.  */
4025
4026 int
4027 main ()
4028 {
4029
4030   ;
4031   return 0;
4032 }
4033 _ACEOF
4034 rm -f conftest.o conftest.obj
4035 if { { ac_try="$ac_compile"
4036 case "(($ac_try" in
4037   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4038   *) ac_try_echo=$ac_try;;
4039 esac
4040 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4041 $as_echo "$ac_try_echo"; } >&5
4042   (eval "$ac_compile") 2>&5
4043   ac_status=$?
4044   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4045   test $ac_status = 0; }; then :
4046   for ac_file in conftest.o conftest.obj conftest.*; do
4047   test -f "$ac_file" || continue;
4048   case $ac_file in
4049     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4050     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4051        break;;
4052   esac
4053 done
4054 else
4055   $as_echo "$as_me: failed program was:" >&5
4056 sed 's/^/| /' conftest.$ac_ext >&5
4057
4058 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4059 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4060 as_fn_error $? "cannot compute suffix of object files: cannot compile
4061 See \`config.log' for more details" "$LINENO" 5; }
4062 fi
4063 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4064 fi
4065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4066 $as_echo "$ac_cv_objext" >&6; }
4067 OBJEXT=$ac_cv_objext
4068 ac_objext=$OBJEXT
4069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4070 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4071 if ${ac_cv_c_compiler_gnu+:} false; then :
4072   $as_echo_n "(cached) " >&6
4073 else
4074   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4075 /* end confdefs.h.  */
4076
4077 int
4078 main ()
4079 {
4080 #ifndef __GNUC__
4081        choke me
4082 #endif
4083
4084   ;
4085   return 0;
4086 }
4087 _ACEOF
4088 if ac_fn_c_try_compile "$LINENO"; then :
4089   ac_compiler_gnu=yes
4090 else
4091   ac_compiler_gnu=no
4092 fi
4093 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4094 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4095
4096 fi
4097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4098 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4099 if test $ac_compiler_gnu = yes; then
4100   GCC=yes
4101 else
4102   GCC=
4103 fi
4104 ac_test_CFLAGS=${CFLAGS+set}
4105 ac_save_CFLAGS=$CFLAGS
4106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4107 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4108 if ${ac_cv_prog_cc_g+:} false; then :
4109   $as_echo_n "(cached) " >&6
4110 else
4111   ac_save_c_werror_flag=$ac_c_werror_flag
4112    ac_c_werror_flag=yes
4113    ac_cv_prog_cc_g=no
4114    CFLAGS="-g"
4115    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4116 /* end confdefs.h.  */
4117
4118 int
4119 main ()
4120 {
4121
4122   ;
4123   return 0;
4124 }
4125 _ACEOF
4126 if ac_fn_c_try_compile "$LINENO"; then :
4127   ac_cv_prog_cc_g=yes
4128 else
4129   CFLAGS=""
4130       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4131 /* end confdefs.h.  */
4132
4133 int
4134 main ()
4135 {
4136
4137   ;
4138   return 0;
4139 }
4140 _ACEOF
4141 if ac_fn_c_try_compile "$LINENO"; then :
4142
4143 else
4144   ac_c_werror_flag=$ac_save_c_werror_flag
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 fi
4160 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4161 fi
4162 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4163 fi
4164 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4165    ac_c_werror_flag=$ac_save_c_werror_flag
4166 fi
4167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4168 $as_echo "$ac_cv_prog_cc_g" >&6; }
4169 if test "$ac_test_CFLAGS" = set; then
4170   CFLAGS=$ac_save_CFLAGS
4171 elif test $ac_cv_prog_cc_g = yes; then
4172   if test "$GCC" = yes; then
4173     CFLAGS="-g -O2"
4174   else
4175     CFLAGS="-g"
4176   fi
4177 else
4178   if test "$GCC" = yes; then
4179     CFLAGS="-O2"
4180   else
4181     CFLAGS=
4182   fi
4183 fi
4184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4185 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4186 if ${ac_cv_prog_cc_c89+:} false; then :
4187   $as_echo_n "(cached) " >&6
4188 else
4189   ac_cv_prog_cc_c89=no
4190 ac_save_CC=$CC
4191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4192 /* end confdefs.h.  */
4193 #include <stdarg.h>
4194 #include <stdio.h>
4195 struct stat;
4196 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4197 struct buf { int x; };
4198 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4199 static char *e (p, i)
4200      char **p;
4201      int i;
4202 {
4203   return p[i];
4204 }
4205 static char *f (char * (*g) (char **, int), char **p, ...)
4206 {
4207   char *s;
4208   va_list v;
4209   va_start (v,p);
4210   s = g (p, va_arg (v,int));
4211   va_end (v);
4212   return s;
4213 }
4214
4215 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4216    function prototypes and stuff, but not '\xHH' hex character constants.
4217    These don't provoke an error unfortunately, instead are silently treated
4218    as 'x'.  The following induces an error, until -std is added to get
4219    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4220    array size at least.  It's necessary to write '\x00'==0 to get something
4221    that's true only with -std.  */
4222 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4223
4224 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4225    inside strings and character constants.  */
4226 #define FOO(x) 'x'
4227 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4228
4229 int test (int i, double x);
4230 struct s1 {int (*f) (int a);};
4231 struct s2 {int (*f) (double a);};
4232 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4233 int argc;
4234 char **argv;
4235 int
4236 main ()
4237 {
4238 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4239   ;
4240   return 0;
4241 }
4242 _ACEOF
4243 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4244         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4245 do
4246   CC="$ac_save_CC $ac_arg"
4247   if ac_fn_c_try_compile "$LINENO"; then :
4248   ac_cv_prog_cc_c89=$ac_arg
4249 fi
4250 rm -f core conftest.err conftest.$ac_objext
4251   test "x$ac_cv_prog_cc_c89" != "xno" && break
4252 done
4253 rm -f conftest.$ac_ext
4254 CC=$ac_save_CC
4255
4256 fi
4257 # AC_CACHE_VAL
4258 case "x$ac_cv_prog_cc_c89" in
4259   x)
4260     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4261 $as_echo "none needed" >&6; } ;;
4262   xno)
4263     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4264 $as_echo "unsupported" >&6; } ;;
4265   *)
4266     CC="$CC $ac_cv_prog_cc_c89"
4267     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4268 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4269 esac
4270 if test "x$ac_cv_prog_cc_c89" != xno; then :
4271
4272 fi
4273
4274 ac_ext=c
4275 ac_cpp='$CPP $CPPFLAGS'
4276 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4277 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4278 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4279
4280
4281 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4282 # but has idiosyncrasies of its own.  We assume icc will define
4283 # __INTEL_COMPILER regardless of CFLAGS.
4284
4285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4286 /* end confdefs.h.  */
4287
4288 int
4289 main ()
4290 {
4291 #ifndef __INTEL_COMPILER
4292 choke me
4293 #endif
4294   ;
4295   return 0;
4296 }
4297 _ACEOF
4298 if ac_fn_c_try_compile "$LINENO"; then :
4299   ICC=yes
4300 else
4301   ICC=no
4302 fi
4303 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4304
4305 # Check if it's Sun Studio compiler. We assume that
4306 # __SUNPRO_C will be defined for Sun Studio compilers
4307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4308 /* end confdefs.h.  */
4309
4310 int
4311 main ()
4312 {
4313 #ifndef __SUNPRO_C
4314 choke me
4315 #endif
4316   ;
4317   return 0;
4318 }
4319 _ACEOF
4320 if ac_fn_c_try_compile "$LINENO"; then :
4321   SUN_STUDIO_CC=yes
4322 else
4323   SUN_STUDIO_CC=no
4324 fi
4325 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4326
4327
4328
4329 unset CFLAGS
4330
4331 #
4332 # Read the template
4333 #
4334 . "$srcdir/src/template/$template" || exit
4335
4336 # CFLAGS are selected so:
4337 # If the user specifies something in the environment, that is used.
4338 # else:  If the template file set something, that is used.
4339 # else:  If coverage was enabled, don't set anything.
4340 # else:  If the compiler is GCC, then we use -O2.
4341 # else:  If the compiler is something else, then we use -O, unless debugging.
4342
4343 if test "$ac_env_CFLAGS_set" = set; then
4344   CFLAGS=$ac_env_CFLAGS_value
4345 elif test "${CFLAGS+set}" = set; then
4346   : # (keep what template set)
4347 elif test "$enable_coverage" = yes; then
4348   : # no optimization by default
4349 elif test "$GCC" = yes; then
4350   CFLAGS="-O2"
4351 else
4352   # if the user selected debug mode, don't use -O
4353   if test "$enable_debug" != yes; then
4354     CFLAGS="-O"
4355   fi
4356 fi
4357
4358 # set CFLAGS_VECTOR from the environment, if available
4359 if test "$ac_env_CFLAGS_VECTOR_set" = set; then
4360   CFLAGS_VECTOR=$ac_env_CFLAGS_VECTOR_value
4361 fi
4362
4363 # Some versions of GCC support some additional useful warning flags.
4364 # Check whether they are supported, and add them to CFLAGS if so.
4365 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
4366 # but has its own.  Also check other compiler-specific flags here.
4367
4368 if test "$GCC" = yes -a "$ICC" = no; then
4369   CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wpointer-arith"
4370   # These work in some but not all gcc versions
4371   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5
4372 $as_echo_n "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
4373 if ${pgac_cv_prog_cc_cflags__Wdeclaration_after_statement+:} false; then :
4374   $as_echo_n "(cached) " >&6
4375 else
4376   pgac_save_CFLAGS=$CFLAGS
4377 CFLAGS="$pgac_save_CFLAGS -Wdeclaration-after-statement"
4378 ac_save_c_werror_flag=$ac_c_werror_flag
4379 ac_c_werror_flag=yes
4380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4381 /* end confdefs.h.  */
4382
4383 int
4384 main ()
4385 {
4386
4387   ;
4388   return 0;
4389 }
4390 _ACEOF
4391 if ac_fn_c_try_compile "$LINENO"; then :
4392   pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=yes
4393 else
4394   pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=no
4395 fi
4396 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4397 ac_c_werror_flag=$ac_save_c_werror_flag
4398 CFLAGS="$pgac_save_CFLAGS"
4399 fi
4400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&5
4401 $as_echo "$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&6; }
4402 if test x"$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" = x"yes"; then
4403   CFLAGS="$CFLAGS -Wdeclaration-after-statement"
4404 fi
4405
4406   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wendif-labels" >&5
4407 $as_echo_n "checking whether $CC supports -Wendif-labels... " >&6; }
4408 if ${pgac_cv_prog_cc_cflags__Wendif_labels+:} false; then :
4409   $as_echo_n "(cached) " >&6
4410 else
4411   pgac_save_CFLAGS=$CFLAGS
4412 CFLAGS="$pgac_save_CFLAGS -Wendif-labels"
4413 ac_save_c_werror_flag=$ac_c_werror_flag
4414 ac_c_werror_flag=yes
4415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4416 /* end confdefs.h.  */
4417
4418 int
4419 main ()
4420 {
4421
4422   ;
4423   return 0;
4424 }
4425 _ACEOF
4426 if ac_fn_c_try_compile "$LINENO"; then :
4427   pgac_cv_prog_cc_cflags__Wendif_labels=yes
4428 else
4429   pgac_cv_prog_cc_cflags__Wendif_labels=no
4430 fi
4431 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4432 ac_c_werror_flag=$ac_save_c_werror_flag
4433 CFLAGS="$pgac_save_CFLAGS"
4434 fi
4435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wendif_labels" >&5
4436 $as_echo "$pgac_cv_prog_cc_cflags__Wendif_labels" >&6; }
4437 if test x"$pgac_cv_prog_cc_cflags__Wendif_labels" = x"yes"; then
4438   CFLAGS="$CFLAGS -Wendif-labels"
4439 fi
4440
4441   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wmissing-format-attribute" >&5
4442 $as_echo_n "checking whether $CC supports -Wmissing-format-attribute... " >&6; }
4443 if ${pgac_cv_prog_cc_cflags__Wmissing_format_attribute+:} false; then :
4444   $as_echo_n "(cached) " >&6
4445 else
4446   pgac_save_CFLAGS=$CFLAGS
4447 CFLAGS="$pgac_save_CFLAGS -Wmissing-format-attribute"
4448 ac_save_c_werror_flag=$ac_c_werror_flag
4449 ac_c_werror_flag=yes
4450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4451 /* end confdefs.h.  */
4452
4453 int
4454 main ()
4455 {
4456
4457   ;
4458   return 0;
4459 }
4460 _ACEOF
4461 if ac_fn_c_try_compile "$LINENO"; then :
4462   pgac_cv_prog_cc_cflags__Wmissing_format_attribute=yes
4463 else
4464   pgac_cv_prog_cc_cflags__Wmissing_format_attribute=no
4465 fi
4466 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4467 ac_c_werror_flag=$ac_save_c_werror_flag
4468 CFLAGS="$pgac_save_CFLAGS"
4469 fi
4470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wmissing_format_attribute" >&5
4471 $as_echo "$pgac_cv_prog_cc_cflags__Wmissing_format_attribute" >&6; }
4472 if test x"$pgac_cv_prog_cc_cflags__Wmissing_format_attribute" = x"yes"; then
4473   CFLAGS="$CFLAGS -Wmissing-format-attribute"
4474 fi
4475
4476   # This was included in -Wall/-Wformat in older GCC versions
4477   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wformat-security" >&5
4478 $as_echo_n "checking whether $CC supports -Wformat-security... " >&6; }
4479 if ${pgac_cv_prog_cc_cflags__Wformat_security+:} false; then :
4480   $as_echo_n "(cached) " >&6
4481 else
4482   pgac_save_CFLAGS=$CFLAGS
4483 CFLAGS="$pgac_save_CFLAGS -Wformat-security"
4484 ac_save_c_werror_flag=$ac_c_werror_flag
4485 ac_c_werror_flag=yes
4486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4487 /* end confdefs.h.  */
4488
4489 int
4490 main ()
4491 {
4492
4493   ;
4494   return 0;
4495 }
4496 _ACEOF
4497 if ac_fn_c_try_compile "$LINENO"; then :
4498   pgac_cv_prog_cc_cflags__Wformat_security=yes
4499 else
4500   pgac_cv_prog_cc_cflags__Wformat_security=no
4501 fi
4502 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4503 ac_c_werror_flag=$ac_save_c_werror_flag
4504 CFLAGS="$pgac_save_CFLAGS"
4505 fi
4506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wformat_security" >&5
4507 $as_echo "$pgac_cv_prog_cc_cflags__Wformat_security" >&6; }
4508 if test x"$pgac_cv_prog_cc_cflags__Wformat_security" = x"yes"; then
4509   CFLAGS="$CFLAGS -Wformat-security"
4510 fi
4511
4512   # Disable strict-aliasing rules; needed for gcc 3.3+
4513   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-strict-aliasing" >&5
4514 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4515 if ${pgac_cv_prog_cc_cflags__fno_strict_aliasing+:} false; then :
4516   $as_echo_n "(cached) " >&6
4517 else
4518   pgac_save_CFLAGS=$CFLAGS
4519 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4520 ac_save_c_werror_flag=$ac_c_werror_flag
4521 ac_c_werror_flag=yes
4522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4523 /* end confdefs.h.  */
4524
4525 int
4526 main ()
4527 {
4528
4529   ;
4530   return 0;
4531 }
4532 _ACEOF
4533 if ac_fn_c_try_compile "$LINENO"; then :
4534   pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4535 else
4536   pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4537 fi
4538 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4539 ac_c_werror_flag=$ac_save_c_werror_flag
4540 CFLAGS="$pgac_save_CFLAGS"
4541 fi
4542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4543 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4544 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4545   CFLAGS="$CFLAGS -fno-strict-aliasing"
4546 fi
4547
4548   # Disable optimizations that assume no overflow; needed for gcc 4.3+
4549   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fwrapv" >&5
4550 $as_echo_n "checking whether $CC supports -fwrapv... " >&6; }
4551 if ${pgac_cv_prog_cc_cflags__fwrapv+:} false; then :
4552   $as_echo_n "(cached) " >&6
4553 else
4554   pgac_save_CFLAGS=$CFLAGS
4555 CFLAGS="$pgac_save_CFLAGS -fwrapv"
4556 ac_save_c_werror_flag=$ac_c_werror_flag
4557 ac_c_werror_flag=yes
4558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4559 /* end confdefs.h.  */
4560
4561 int
4562 main ()
4563 {
4564
4565   ;
4566   return 0;
4567 }
4568 _ACEOF
4569 if ac_fn_c_try_compile "$LINENO"; then :
4570   pgac_cv_prog_cc_cflags__fwrapv=yes
4571 else
4572   pgac_cv_prog_cc_cflags__fwrapv=no
4573 fi
4574 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4575 ac_c_werror_flag=$ac_save_c_werror_flag
4576 CFLAGS="$pgac_save_CFLAGS"
4577 fi
4578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fwrapv" >&5
4579 $as_echo "$pgac_cv_prog_cc_cflags__fwrapv" >&6; }
4580 if test x"$pgac_cv_prog_cc_cflags__fwrapv" = x"yes"; then
4581   CFLAGS="$CFLAGS -fwrapv"
4582 fi
4583
4584   # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
4585   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fexcess-precision=standard" >&5
4586 $as_echo_n "checking whether $CC supports -fexcess-precision=standard... " >&6; }
4587 if ${pgac_cv_prog_cc_cflags__fexcess_precision_standard+:} false; then :
4588   $as_echo_n "(cached) " >&6
4589 else
4590   pgac_save_CFLAGS=$CFLAGS
4591 CFLAGS="$pgac_save_CFLAGS -fexcess-precision=standard"
4592 ac_save_c_werror_flag=$ac_c_werror_flag
4593 ac_c_werror_flag=yes
4594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4595 /* end confdefs.h.  */
4596
4597 int
4598 main ()
4599 {
4600
4601   ;
4602   return 0;
4603 }
4604 _ACEOF
4605 if ac_fn_c_try_compile "$LINENO"; then :
4606   pgac_cv_prog_cc_cflags__fexcess_precision_standard=yes
4607 else
4608   pgac_cv_prog_cc_cflags__fexcess_precision_standard=no
4609 fi
4610 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4611 ac_c_werror_flag=$ac_save_c_werror_flag
4612 CFLAGS="$pgac_save_CFLAGS"
4613 fi
4614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fexcess_precision_standard" >&5
4615 $as_echo "$pgac_cv_prog_cc_cflags__fexcess_precision_standard" >&6; }
4616 if test x"$pgac_cv_prog_cc_cflags__fexcess_precision_standard" = x"yes"; then
4617   CFLAGS="$CFLAGS -fexcess-precision=standard"
4618 fi
4619
4620   # Optimization flags for specific files that benefit from vectorization
4621   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -funroll-loops" >&5
4622 $as_echo_n "checking whether $CC supports -funroll-loops... " >&6; }
4623 if ${pgac_cv_prog_cc_cflags__funroll_loops+:} false; then :
4624   $as_echo_n "(cached) " >&6
4625 else
4626   pgac_save_CFLAGS=$CFLAGS
4627 CFLAGS="$pgac_save_CFLAGS -funroll-loops"
4628 ac_save_c_werror_flag=$ac_c_werror_flag
4629 ac_c_werror_flag=yes
4630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4631 /* end confdefs.h.  */
4632
4633 int
4634 main ()
4635 {
4636
4637   ;
4638   return 0;
4639 }
4640 _ACEOF
4641 if ac_fn_c_try_compile "$LINENO"; then :
4642   pgac_cv_prog_cc_cflags__funroll_loops=yes
4643 else
4644   pgac_cv_prog_cc_cflags__funroll_loops=no
4645 fi
4646 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4647 ac_c_werror_flag=$ac_save_c_werror_flag
4648 CFLAGS="$pgac_save_CFLAGS"
4649 fi
4650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__funroll_loops" >&5
4651 $as_echo "$pgac_cv_prog_cc_cflags__funroll_loops" >&6; }
4652 if test x"$pgac_cv_prog_cc_cflags__funroll_loops" = x"yes"; then
4653   CFLAGS_VECTOR="${CFLAGS_VECTOR} -funroll-loops"
4654 fi
4655
4656   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -ftree-vectorize" >&5
4657 $as_echo_n "checking whether $CC supports -ftree-vectorize... " >&6; }
4658 if ${pgac_cv_prog_cc_cflags__ftree_vectorize+:} false; then :
4659   $as_echo_n "(cached) " >&6
4660 else
4661   pgac_save_CFLAGS=$CFLAGS
4662 CFLAGS="$pgac_save_CFLAGS -ftree-vectorize"
4663 ac_save_c_werror_flag=$ac_c_werror_flag
4664 ac_c_werror_flag=yes
4665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4666 /* end confdefs.h.  */
4667
4668 int
4669 main ()
4670 {
4671
4672   ;
4673   return 0;
4674 }
4675 _ACEOF
4676 if ac_fn_c_try_compile "$LINENO"; then :
4677   pgac_cv_prog_cc_cflags__ftree_vectorize=yes
4678 else
4679   pgac_cv_prog_cc_cflags__ftree_vectorize=no
4680 fi
4681 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4682 ac_c_werror_flag=$ac_save_c_werror_flag
4683 CFLAGS="$pgac_save_CFLAGS"
4684 fi
4685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__ftree_vectorize" >&5
4686 $as_echo "$pgac_cv_prog_cc_cflags__ftree_vectorize" >&6; }
4687 if test x"$pgac_cv_prog_cc_cflags__ftree_vectorize" = x"yes"; then
4688   CFLAGS_VECTOR="${CFLAGS_VECTOR} -ftree-vectorize"
4689 fi
4690
4691 elif test "$ICC" = yes; then
4692   # Intel's compiler has a bug/misoptimization in checking for
4693   # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
4694   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mp1" >&5
4695 $as_echo_n "checking whether $CC supports -mp1... " >&6; }
4696 if ${pgac_cv_prog_cc_cflags__mp1+:} false; then :
4697   $as_echo_n "(cached) " >&6
4698 else
4699   pgac_save_CFLAGS=$CFLAGS
4700 CFLAGS="$pgac_save_CFLAGS -mp1"
4701 ac_save_c_werror_flag=$ac_c_werror_flag
4702 ac_c_werror_flag=yes
4703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4704 /* end confdefs.h.  */
4705
4706 int
4707 main ()
4708 {
4709
4710   ;
4711   return 0;
4712 }
4713 _ACEOF
4714 if ac_fn_c_try_compile "$LINENO"; then :
4715   pgac_cv_prog_cc_cflags__mp1=yes
4716 else
4717   pgac_cv_prog_cc_cflags__mp1=no
4718 fi
4719 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4720 ac_c_werror_flag=$ac_save_c_werror_flag
4721 CFLAGS="$pgac_save_CFLAGS"
4722 fi
4723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__mp1" >&5
4724 $as_echo "$pgac_cv_prog_cc_cflags__mp1" >&6; }
4725 if test x"$pgac_cv_prog_cc_cflags__mp1" = x"yes"; then
4726   CFLAGS="$CFLAGS -mp1"
4727 fi
4728
4729   # Make sure strict aliasing is off (though this is said to be the default)
4730   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-strict-aliasing" >&5
4731 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4732 if ${pgac_cv_prog_cc_cflags__fno_strict_aliasing+:} false; then :
4733   $as_echo_n "(cached) " >&6
4734 else
4735   pgac_save_CFLAGS=$CFLAGS
4736 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4737 ac_save_c_werror_flag=$ac_c_werror_flag
4738 ac_c_werror_flag=yes
4739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4740 /* end confdefs.h.  */
4741
4742 int
4743 main ()
4744 {
4745
4746   ;
4747   return 0;
4748 }
4749 _ACEOF
4750 if ac_fn_c_try_compile "$LINENO"; then :
4751   pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4752 else
4753   pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4754 fi
4755 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4756 ac_c_werror_flag=$ac_save_c_werror_flag
4757 CFLAGS="$pgac_save_CFLAGS"
4758 fi
4759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4760 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4761 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4762   CFLAGS="$CFLAGS -fno-strict-aliasing"
4763 fi
4764
4765 elif test "$PORTNAME" = "aix"; then
4766   # AIX's xlc has to have strict aliasing turned off too
4767   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -qnoansialias" >&5
4768 $as_echo_n "checking whether $CC supports -qnoansialias... " >&6; }
4769 if ${pgac_cv_prog_cc_cflags__qnoansialias+:} false; then :
4770   $as_echo_n "(cached) " >&6
4771 else
4772   pgac_save_CFLAGS=$CFLAGS
4773 CFLAGS="$pgac_save_CFLAGS -qnoansialias"
4774 ac_save_c_werror_flag=$ac_c_werror_flag
4775 ac_c_werror_flag=yes
4776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4777 /* end confdefs.h.  */
4778
4779 int
4780 main ()
4781 {
4782
4783   ;
4784   return 0;
4785 }
4786 _ACEOF
4787 if ac_fn_c_try_compile "$LINENO"; then :
4788   pgac_cv_prog_cc_cflags__qnoansialias=yes
4789 else
4790   pgac_cv_prog_cc_cflags__qnoansialias=no
4791 fi
4792 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4793 ac_c_werror_flag=$ac_save_c_werror_flag
4794 CFLAGS="$pgac_save_CFLAGS"
4795 fi
4796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__qnoansialias" >&5
4797 $as_echo "$pgac_cv_prog_cc_cflags__qnoansialias" >&6; }
4798 if test x"$pgac_cv_prog_cc_cflags__qnoansialias" = x"yes"; then
4799   CFLAGS="$CFLAGS -qnoansialias"
4800 fi
4801
4802 elif test "$PORTNAME" = "hpux"; then
4803   # On some versions of HP-UX, libm functions do not set errno by default.
4804   # Fix that by using +Olibmerrno if the compiler recognizes it.
4805   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports +Olibmerrno" >&5
4806 $as_echo_n "checking whether $CC supports +Olibmerrno... " >&6; }
4807 if ${pgac_cv_prog_cc_cflags_pOlibmerrno+:} false; then :
4808   $as_echo_n "(cached) " >&6
4809 else
4810   pgac_save_CFLAGS=$CFLAGS
4811 CFLAGS="$pgac_save_CFLAGS +Olibmerrno"
4812 ac_save_c_werror_flag=$ac_c_werror_flag
4813 ac_c_werror_flag=yes
4814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4815 /* end confdefs.h.  */
4816
4817 int
4818 main ()
4819 {
4820
4821   ;
4822   return 0;
4823 }
4824 _ACEOF
4825 if ac_fn_c_try_compile "$LINENO"; then :
4826   pgac_cv_prog_cc_cflags_pOlibmerrno=yes
4827 else
4828   pgac_cv_prog_cc_cflags_pOlibmerrno=no
4829 fi
4830 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4831 ac_c_werror_flag=$ac_save_c_werror_flag
4832 CFLAGS="$pgac_save_CFLAGS"
4833 fi
4834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags_pOlibmerrno" >&5
4835 $as_echo "$pgac_cv_prog_cc_cflags_pOlibmerrno" >&6; }
4836 if test x"$pgac_cv_prog_cc_cflags_pOlibmerrno" = x"yes"; then
4837   CFLAGS="$CFLAGS +Olibmerrno"
4838 fi
4839
4840 fi
4841
4842 CFLAGS_VECTOR=$CFLAGS_VECTOR
4843
4844
4845 # supply -g if --enable-debug
4846 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
4847   CFLAGS="$CFLAGS -g"
4848 fi
4849
4850 # enable code coverage if --enable-coverage
4851 if test "$enable_coverage" = yes; then
4852   if test "$GCC" = yes; then
4853     CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
4854   else
4855     as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
4856   fi
4857 fi
4858
4859 # enable profiling if --enable-profiling
4860 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
4861   if test "$GCC" = yes; then
4862
4863 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
4864
4865     CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
4866   else
4867     as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
4868   fi
4869 fi
4870
4871 # We already have this in Makefile.win32, but configure needs it too
4872 if test "$PORTNAME" = "win32"; then
4873   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
4874 fi
4875
4876 # Check if the compiler still works with the template settings
4877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
4878 $as_echo_n "checking whether the C compiler still works... " >&6; }
4879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4880 /* end confdefs.h.  */
4881
4882 int
4883 main ()
4884 {
4885 return 0;
4886   ;
4887   return 0;
4888 }
4889 _ACEOF
4890 if ac_fn_c_try_link "$LINENO"; then :
4891   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4892 $as_echo "yes" >&6; }
4893 else
4894   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4895 $as_echo "no" >&6; }
4896    as_fn_error $? "cannot proceed" "$LINENO" 5
4897 fi
4898 rm -f core conftest.err conftest.$ac_objext \
4899     conftest$ac_exeext conftest.$ac_ext
4900
4901 # Defend against gcc -ffast-math
4902 if test "$GCC" = yes; then
4903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4904 /* end confdefs.h.  */
4905
4906 int
4907 main ()
4908 {
4909 #ifdef __FAST_MATH__
4910 choke me
4911 #endif
4912   ;
4913   return 0;
4914 }
4915 _ACEOF
4916 if ac_fn_c_try_compile "$LINENO"; then :
4917
4918 else
4919   as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
4920 fi
4921 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4922 fi
4923
4924 ac_ext=c
4925 ac_cpp='$CPP $CPPFLAGS'
4926 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4927 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4928 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4930 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4931 # On Suns, sometimes $CPP names a directory.
4932 if test -n "$CPP" && test -d "$CPP"; then
4933   CPP=
4934 fi
4935 if test -z "$CPP"; then
4936   if ${ac_cv_prog_CPP+:} false; then :
4937   $as_echo_n "(cached) " >&6
4938 else
4939       # Double quotes because CPP needs to be expanded
4940     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4941     do
4942       ac_preproc_ok=false
4943 for ac_c_preproc_warn_flag in '' yes
4944 do
4945   # Use a header file that comes with gcc, so configuring glibc
4946   # with a fresh cross-compiler works.
4947   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4948   # <limits.h> exists even on freestanding compilers.
4949   # On the NeXT, cc -E runs the code through the compiler's parser,
4950   # not just through cpp. "Syntax error" is here to catch this case.
4951   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4952 /* end confdefs.h.  */
4953 #ifdef __STDC__
4954 # include <limits.h>
4955 #else
4956 # include <assert.h>
4957 #endif
4958                      Syntax error
4959 _ACEOF
4960 if ac_fn_c_try_cpp "$LINENO"; then :
4961
4962 else
4963   # Broken: fails on valid input.
4964 continue
4965 fi
4966 rm -f conftest.err conftest.i conftest.$ac_ext
4967
4968   # OK, works on sane cases.  Now check whether nonexistent headers
4969   # can be detected and how.
4970   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4971 /* end confdefs.h.  */
4972 #include <ac_nonexistent.h>
4973 _ACEOF
4974 if ac_fn_c_try_cpp "$LINENO"; then :
4975   # Broken: success on invalid input.
4976 continue
4977 else
4978   # Passes both tests.
4979 ac_preproc_ok=:
4980 break
4981 fi
4982 rm -f conftest.err conftest.i conftest.$ac_ext
4983
4984 done
4985 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4986 rm -f conftest.i conftest.err conftest.$ac_ext
4987 if $ac_preproc_ok; then :
4988   break
4989 fi
4990
4991     done
4992     ac_cv_prog_CPP=$CPP
4993
4994 fi
4995   CPP=$ac_cv_prog_CPP
4996 else
4997   ac_cv_prog_CPP=$CPP
4998 fi
4999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5000 $as_echo "$CPP" >&6; }
5001 ac_preproc_ok=false
5002 for ac_c_preproc_warn_flag in '' yes
5003 do
5004   # Use a header file that comes with gcc, so configuring glibc
5005   # with a fresh cross-compiler works.
5006   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5007   # <limits.h> exists even on freestanding compilers.
5008   # On the NeXT, cc -E runs the code through the compiler's parser,
5009   # not just through cpp. "Syntax error" is here to catch this case.
5010   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5011 /* end confdefs.h.  */
5012 #ifdef __STDC__
5013 # include <limits.h>
5014 #else
5015 # include <assert.h>
5016 #endif
5017                      Syntax error
5018 _ACEOF
5019 if ac_fn_c_try_cpp "$LINENO"; then :
5020
5021 else
5022   # Broken: fails on valid input.
5023 continue
5024 fi
5025 rm -f conftest.err conftest.i conftest.$ac_ext
5026
5027   # OK, works on sane cases.  Now check whether nonexistent headers
5028   # can be detected and how.
5029   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5030 /* end confdefs.h.  */
5031 #include <ac_nonexistent.h>
5032 _ACEOF
5033 if ac_fn_c_try_cpp "$LINENO"; then :
5034   # Broken: success on invalid input.
5035 continue
5036 else
5037   # Passes both tests.
5038 ac_preproc_ok=:
5039 break
5040 fi
5041 rm -f conftest.err conftest.i conftest.$ac_ext
5042
5043 done
5044 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5045 rm -f conftest.i conftest.err conftest.$ac_ext
5046 if $ac_preproc_ok; then :
5047
5048 else
5049   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5050 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5051 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5052 See \`config.log' for more details" "$LINENO" 5; }
5053 fi
5054
5055 ac_ext=c
5056 ac_cpp='$CPP $CPPFLAGS'
5057 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5058 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5059 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5060
5061
5062
5063
5064 #
5065 # Set up TAS assembly code if needed; the template file has now had its
5066 # chance to request this.
5067 #
5068 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
5069
5070
5071 if test "$need_tas" = yes ; then
5072   TAS=tas.o
5073 else
5074   TAS=""
5075 fi
5076
5077
5078
5079 #
5080 # Automatic dependency tracking
5081 #
5082
5083
5084 # Check whether --enable-depend was given.
5085 if test "${enable_depend+set}" = set; then :
5086   enableval=$enable_depend;
5087   case $enableval in
5088     yes)
5089       autodepend=yes
5090       ;;
5091     no)
5092       :
5093       ;;
5094     *)
5095       as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
5096       ;;
5097   esac
5098
5099 else
5100   enable_depend=no
5101
5102 fi
5103
5104
5105
5106
5107
5108 #
5109 # Enable assert checks
5110 #
5111
5112
5113 # Check whether --enable-cassert was given.
5114 if test "${enable_cassert+set}" = set; then :
5115   enableval=$enable_cassert;
5116   case $enableval in
5117     yes)
5118
5119 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
5120
5121       ;;
5122     no)
5123       :
5124       ;;
5125     *)
5126       as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
5127       ;;
5128   esac
5129
5130 else
5131   enable_cassert=no
5132
5133 fi
5134
5135
5136
5137
5138 #
5139 # Include directories
5140 #
5141 ac_save_IFS=$IFS
5142 IFS="${IFS}${PATH_SEPARATOR}"
5143 # SRCH_INC comes from the template file
5144 for dir in $with_includes $SRCH_INC; do
5145   if test -d "$dir"; then
5146     INCLUDES="$INCLUDES -I$dir"
5147   else
5148     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
5149 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
5150   fi
5151 done
5152 IFS=$ac_save_IFS
5153
5154
5155
5156 #
5157 # Library directories
5158 #
5159 ac_save_IFS=$IFS
5160 IFS="${IFS}${PATH_SEPARATOR}"
5161 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
5162 for dir in $LIBRARY_DIRS $SRCH_LIB; do
5163   if test -d "$dir"; then
5164     LIBDIRS="$LIBDIRS -L$dir"
5165   else
5166     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
5167 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
5168   fi
5169 done
5170 IFS=$ac_save_IFS
5171
5172 #
5173 # Enable thread-safe client libraries
5174 #
5175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
5176 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
5177
5178
5179 # Check whether --enable-thread-safety was given.
5180 if test "${enable_thread_safety+set}" = set; then :
5181   enableval=$enable_thread_safety;
5182   case $enableval in
5183     yes)
5184       :
5185       ;;
5186     no)
5187       :
5188       ;;
5189     *)
5190       as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
5191       ;;
5192   esac
5193
5194 else
5195   enable_thread_safety=yes
5196
5197 fi
5198
5199
5200 if test "$enable_thread_safety" = yes; then
5201
5202 $as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
5203
5204 fi
5205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
5206 $as_echo "$enable_thread_safety" >&6; }
5207
5208
5209 #
5210 # Optionally build Tcl modules (PL/Tcl)
5211 #
5212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
5213 $as_echo_n "checking whether to build with Tcl... " >&6; }
5214
5215
5216
5217 # Check whether --with-tcl was given.
5218 if test "${with_tcl+set}" = set; then :
5219   withval=$with_tcl;
5220   case $withval in
5221     yes)
5222       :
5223       ;;
5224     no)
5225       :
5226       ;;
5227     *)
5228       as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
5229       ;;
5230   esac
5231
5232 else
5233   with_tcl=no
5234
5235 fi
5236
5237
5238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
5239 $as_echo "$with_tcl" >&6; }
5240
5241
5242 # We see if the path to the Tcl/Tk configuration scripts is specified.
5243 # This will override the use of tclsh to find the paths to search.
5244
5245
5246
5247
5248 # Check whether --with-tclconfig was given.
5249 if test "${with_tclconfig+set}" = set; then :
5250   withval=$with_tclconfig;
5251   case $withval in
5252     yes)
5253       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
5254       ;;
5255     no)
5256       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
5257       ;;
5258     *)
5259
5260       ;;
5261   esac
5262
5263 fi
5264
5265
5266
5267 #
5268 # Optionally build Perl modules (PL/Perl)
5269 #
5270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
5271 $as_echo_n "checking whether to build Perl modules... " >&6; }
5272
5273
5274
5275 # Check whether --with-perl was given.
5276 if test "${with_perl+set}" = set; then :
5277   withval=$with_perl;
5278   case $withval in
5279     yes)
5280       :
5281       ;;
5282     no)
5283       :
5284       ;;
5285     *)
5286       as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
5287       ;;
5288   esac
5289
5290 else
5291   with_perl=no
5292
5293 fi
5294
5295
5296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
5297 $as_echo "$with_perl" >&6; }
5298
5299
5300 #
5301 # Optionally build Python modules (PL/Python)
5302 #
5303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
5304 $as_echo_n "checking whether to build Python modules... " >&6; }
5305
5306
5307
5308 # Check whether --with-python was given.
5309 if test "${with_python+set}" = set; then :
5310   withval=$with_python;
5311   case $withval in
5312     yes)
5313       :
5314       ;;
5315     no)
5316       :
5317       ;;
5318     *)
5319       as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
5320       ;;
5321   esac
5322
5323 else
5324   with_python=no
5325
5326 fi
5327
5328
5329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
5330 $as_echo "$with_python" >&6; }
5331
5332
5333 #
5334 # GSSAPI
5335 #
5336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
5337 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
5338
5339
5340
5341 # Check whether --with-gssapi was given.
5342 if test "${with_gssapi+set}" = set; then :
5343   withval=$with_gssapi;
5344   case $withval in
5345     yes)
5346
5347
5348 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
5349
5350   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
5351
5352       ;;
5353     no)
5354       :
5355       ;;
5356     *)
5357       as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
5358       ;;
5359   esac
5360
5361 else
5362   with_gssapi=no
5363
5364 fi
5365
5366
5367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
5368 $as_echo "$with_gssapi" >&6; }
5369
5370
5371
5372
5373
5374 #
5375 # Kerberos configuration parameters
5376 #
5377
5378
5379
5380 # Check whether --with-krb-srvnam was given.
5381 if test "${with_krb_srvnam+set}" = set; then :
5382   withval=$with_krb_srvnam;
5383   case $withval in
5384     yes)
5385       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
5386       ;;
5387     no)
5388       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
5389       ;;
5390     *)
5391
5392       ;;
5393   esac
5394
5395 else
5396   with_krb_srvnam="postgres"
5397 fi
5398
5399
5400
5401 cat >>confdefs.h <<_ACEOF
5402 #define PG_KRB_SRVNAM "$with_krb_srvnam"
5403 _ACEOF
5404
5405
5406
5407 #
5408 # PAM
5409 #
5410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
5411 $as_echo_n "checking whether to build with PAM support... " >&6; }
5412
5413
5414
5415 # Check whether --with-pam was given.
5416 if test "${with_pam+set}" = set; then :
5417   withval=$with_pam;
5418   case $withval in
5419     yes)
5420
5421 $as_echo "#define USE_PAM 1" >>confdefs.h
5422
5423       ;;
5424     no)
5425       :
5426       ;;
5427     *)
5428       as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
5429       ;;
5430   esac
5431
5432 else
5433   with_pam=no
5434
5435 fi
5436
5437
5438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
5439 $as_echo "$with_pam" >&6; }
5440
5441
5442 #
5443 # LDAP
5444 #
5445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
5446 $as_echo_n "checking whether to build with LDAP support... " >&6; }
5447
5448
5449
5450 # Check whether --with-ldap was given.
5451 if test "${with_ldap+set}" = set; then :
5452   withval=$with_ldap;
5453   case $withval in
5454     yes)
5455
5456 $as_echo "#define USE_LDAP 1" >>confdefs.h
5457
5458       ;;
5459     no)
5460       :
5461       ;;
5462     *)
5463       as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
5464       ;;
5465   esac
5466
5467 else
5468   with_ldap=no
5469
5470 fi
5471
5472
5473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
5474 $as_echo "$with_ldap" >&6; }
5475
5476
5477 #
5478 # Bonjour
5479 #
5480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
5481 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
5482
5483
5484
5485 # Check whether --with-bonjour was given.
5486 if test "${with_bonjour+set}" = set; then :
5487   withval=$with_bonjour;
5488   case $withval in
5489     yes)
5490
5491 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
5492
5493       ;;
5494     no)
5495       :
5496       ;;
5497     *)
5498       as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
5499       ;;
5500   esac
5501
5502 else
5503   with_bonjour=no
5504
5505 fi
5506
5507
5508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
5509 $as_echo "$with_bonjour" >&6; }
5510
5511
5512 #
5513 # OpenSSL
5514 #
5515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with OpenSSL support" >&5
5516 $as_echo_n "checking whether to build with OpenSSL support... " >&6; }
5517
5518
5519
5520 # Check whether --with-openssl was given.
5521 if test "${with_openssl+set}" = set; then :
5522   withval=$with_openssl;
5523   case $withval in
5524     yes)
5525
5526 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
5527
5528       ;;
5529     no)
5530       :
5531       ;;
5532     *)
5533       as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
5534       ;;
5535   esac
5536
5537 else
5538   with_openssl=no
5539
5540 fi
5541
5542
5543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_openssl" >&5
5544 $as_echo "$with_openssl" >&6; }
5545
5546
5547 #
5548 # SELinux
5549 #
5550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
5551 $as_echo_n "checking whether to build with SELinux support... " >&6; }
5552
5553
5554
5555 # Check whether --with-selinux was given.
5556 if test "${with_selinux+set}" = set; then :
5557   withval=$with_selinux;
5558   case $withval in
5559     yes)
5560       :
5561       ;;
5562     no)
5563       :
5564       ;;
5565     *)
5566       as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
5567       ;;
5568   esac
5569
5570 else
5571   with_selinux=no
5572
5573 fi
5574
5575
5576
5577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
5578 $as_echo "$with_selinux" >&6; }
5579
5580 #
5581 # Readline
5582 #
5583
5584
5585
5586 # Check whether --with-readline was given.
5587 if test "${with_readline+set}" = set; then :
5588   withval=$with_readline;
5589   case $withval in
5590     yes)
5591       :
5592       ;;
5593     no)
5594       :
5595       ;;
5596     *)
5597       as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
5598       ;;
5599   esac
5600
5601 else
5602   with_readline=yes
5603
5604 fi
5605
5606
5607 # readline on MinGW has problems with backslashes in psql and other bugs.
5608 # This is particularly a problem with non-US code pages.
5609 # Therefore disable its use until we understand the cause. 2004-07-20
5610 if test "$PORTNAME" = "win32"; then
5611   if test "$with_readline" = yes; then
5612     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
5613 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
5614     with_readline=no
5615   fi
5616 fi
5617
5618
5619 #
5620 # Prefer libedit
5621 #
5622
5623
5624
5625 # Check whether --with-libedit-preferred was given.
5626 if test "${with_libedit_preferred+set}" = set; then :
5627   withval=$with_libedit_preferred;
5628   case $withval in
5629     yes)
5630       :
5631       ;;
5632     no)
5633       :
5634       ;;
5635     *)
5636       as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
5637       ;;
5638   esac
5639
5640 else
5641   with_libedit_preferred=no
5642
5643 fi
5644
5645
5646
5647
5648 #
5649 # UUID library
5650 #
5651 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
5652 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
5653 # UUID library.  More than one of these might be present on a given platform,
5654 # so we make the user say which one she wants.
5655 #
5656
5657
5658
5659 # Check whether --with-uuid was given.
5660 if test "${with_uuid+set}" = set; then :
5661   withval=$with_uuid;
5662   case $withval in
5663     yes)
5664       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
5665       ;;
5666     no)
5667       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
5668       ;;
5669     *)
5670
5671       ;;
5672   esac
5673
5674 fi
5675
5676
5677 if test x"$with_uuid" = x"" ; then
5678   with_uuid=no
5679 fi
5680
5681
5682
5683 # Check whether --with-ossp-uuid was given.
5684 if test "${with_ossp_uuid+set}" = set; then :
5685   withval=$with_ossp_uuid;
5686   case $withval in
5687     yes)
5688       :
5689       ;;
5690     no)
5691       :
5692       ;;
5693     *)
5694       as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
5695       ;;
5696   esac
5697
5698 else
5699   with_ossp_uuid=no
5700
5701 fi
5702
5703
5704 if test "$with_ossp_uuid" = yes ; then
5705   with_uuid=ossp
5706 fi
5707
5708 if test "$with_uuid" = bsd ; then
5709
5710 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
5711
5712   UUID_EXTRA_OBJS="md5.o sha1.o"
5713 elif test "$with_uuid" = e2fs ; then
5714
5715 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
5716
5717   UUID_EXTRA_OBJS="md5.o sha1.o"
5718 elif test "$with_uuid" = ossp ; then
5719
5720 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
5721
5722   UUID_EXTRA_OBJS=""
5723 elif test "$with_uuid" = no ; then
5724   UUID_EXTRA_OBJS=""
5725 else
5726   as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
5727 fi
5728
5729
5730
5731
5732 #
5733 # XML
5734 #
5735
5736
5737
5738 # Check whether --with-libxml was given.
5739 if test "${with_libxml+set}" = set; then :
5740   withval=$with_libxml;
5741   case $withval in
5742     yes)
5743
5744 $as_echo "#define USE_LIBXML 1" >>confdefs.h
5745
5746       ;;
5747     no)
5748       :
5749       ;;
5750     *)
5751       as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
5752       ;;
5753   esac
5754
5755 else
5756   with_libxml=no
5757
5758 fi
5759
5760
5761
5762 if test "$with_libxml" = yes ; then
5763   for ac_prog in xml2-config
5764 do
5765   # Extract the first word of "$ac_prog", so it can be a program name with args.
5766 set dummy $ac_prog; ac_word=$2
5767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5768 $as_echo_n "checking for $ac_word... " >&6; }
5769 if ${ac_cv_prog_XML2_CONFIG+:} false; then :
5770   $as_echo_n "(cached) " >&6
5771 else
5772   if test -n "$XML2_CONFIG"; then
5773   ac_cv_prog_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test.
5774 else
5775 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5776 for as_dir in $PATH
5777 do
5778   IFS=$as_save_IFS
5779   test -z "$as_dir" && as_dir=.
5780     for ac_exec_ext in '' $ac_executable_extensions; do
5781   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5782     ac_cv_prog_XML2_CONFIG="$ac_prog"
5783     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5784     break 2
5785   fi
5786 done
5787   done
5788 IFS=$as_save_IFS
5789
5790 fi
5791 fi
5792 XML2_CONFIG=$ac_cv_prog_XML2_CONFIG
5793 if test -n "$XML2_CONFIG"; then
5794   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
5795 $as_echo "$XML2_CONFIG" >&6; }
5796 else
5797   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5798 $as_echo "no" >&6; }
5799 fi
5800
5801
5802   test -n "$XML2_CONFIG" && break
5803 done
5804
5805   if test -n "$XML2_CONFIG"; then
5806     for pgac_option in `$XML2_CONFIG --cflags`; do
5807       case $pgac_option in
5808         -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
5809       esac
5810     done
5811     for pgac_option in `$XML2_CONFIG --libs`; do
5812       case $pgac_option in
5813         -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5814       esac
5815     done
5816   fi
5817 fi
5818
5819
5820
5821 #
5822 # XSLT
5823 #
5824
5825
5826
5827 # Check whether --with-libxslt was given.
5828 if test "${with_libxslt+set}" = set; then :
5829   withval=$with_libxslt;
5830   case $withval in
5831     yes)
5832
5833 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
5834
5835       ;;
5836     no)
5837       :
5838       ;;
5839     *)
5840       as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
5841       ;;
5842   esac
5843
5844 else
5845   with_libxslt=no
5846
5847 fi
5848
5849
5850
5851
5852
5853
5854 #
5855 # tzdata
5856 #
5857
5858
5859
5860 # Check whether --with-system-tzdata was given.
5861 if test "${with_system_tzdata+set}" = set; then :
5862   withval=$with_system_tzdata;
5863   case $withval in
5864     yes)
5865       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
5866       ;;
5867     no)
5868       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
5869       ;;
5870     *)
5871
5872       ;;
5873   esac
5874
5875 fi
5876
5877
5878
5879
5880 #
5881 # Zlib
5882 #
5883
5884
5885
5886 # Check whether --with-zlib was given.
5887 if test "${with_zlib+set}" = set; then :
5888   withval=$with_zlib;
5889   case $withval in
5890     yes)
5891       :
5892       ;;
5893     no)
5894       :
5895       ;;
5896     *)
5897       as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
5898       ;;
5899   esac
5900
5901 else
5902   with_zlib=yes
5903
5904 fi
5905
5906
5907
5908
5909 #
5910 # Elf
5911 #
5912
5913 # Assume system is ELF if it predefines __ELF__ as 1,
5914 # otherwise believe host_os based default.
5915 case $host_os in
5916     freebsd1*|freebsd2*) elf=no;;
5917     freebsd3*|freebsd4*) elf=yes;;
5918 esac
5919
5920
5921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5922 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5923 if ${ac_cv_path_GREP+:} false; then :
5924   $as_echo_n "(cached) " >&6
5925 else
5926   if test -z "$GREP"; then
5927   ac_path_GREP_found=false
5928   # Loop through the user's path and test for each of PROGNAME-LIST
5929   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5930 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5931 do
5932   IFS=$as_save_IFS
5933   test -z "$as_dir" && as_dir=.
5934     for ac_prog in grep ggrep; do
5935     for ac_exec_ext in '' $ac_executable_extensions; do
5936       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5937       as_fn_executable_p "$ac_path_GREP" || continue
5938 # Check for GNU ac_path_GREP and select it if it is found.
5939   # Check for GNU $ac_path_GREP
5940 case `"$ac_path_GREP" --version 2>&1` in
5941 *GNU*)
5942   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5943 *)
5944   ac_count=0
5945   $as_echo_n 0123456789 >"conftest.in"
5946   while :
5947   do
5948     cat "conftest.in" "conftest.in" >"conftest.tmp"
5949     mv "conftest.tmp" "conftest.in"
5950     cp "conftest.in" "conftest.nl"
5951     $as_echo 'GREP' >> "conftest.nl"
5952     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5953     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5954     as_fn_arith $ac_count + 1 && ac_count=$as_val
5955     if test $ac_count -gt ${ac_path_GREP_max-0}; then
5956       # Best one so far, save it but keep looking for a better one
5957       ac_cv_path_GREP="$ac_path_GREP"
5958       ac_path_GREP_max=$ac_count
5959     fi
5960     # 10*(2^10) chars as input seems more than enough
5961     test $ac_count -gt 10 && break
5962   done
5963   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5964 esac
5965
5966       $ac_path_GREP_found && break 3
5967     done
5968   done
5969   done
5970 IFS=$as_save_IFS
5971   if test -z "$ac_cv_path_GREP"; then
5972     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5973   fi
5974 else
5975   ac_cv_path_GREP=$GREP
5976 fi
5977
5978 fi
5979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5980 $as_echo "$ac_cv_path_GREP" >&6; }
5981  GREP="$ac_cv_path_GREP"
5982
5983
5984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5985 $as_echo_n "checking for egrep... " >&6; }
5986 if ${ac_cv_path_EGREP+:} false; then :
5987   $as_echo_n "(cached) " >&6
5988 else
5989   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5990    then ac_cv_path_EGREP="$GREP -E"
5991    else
5992      if test -z "$EGREP"; then
5993   ac_path_EGREP_found=false
5994   # Loop through the user's path and test for each of PROGNAME-LIST
5995   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5996 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5997 do
5998   IFS=$as_save_IFS
5999   test -z "$as_dir" && as_dir=.
6000     for ac_prog in egrep; do
6001     for ac_exec_ext in '' $ac_executable_extensions; do
6002       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6003       as_fn_executable_p "$ac_path_EGREP" || continue
6004 # Check for GNU ac_path_EGREP and select it if it is found.
6005   # Check for GNU $ac_path_EGREP
6006 case `"$ac_path_EGREP" --version 2>&1` in
6007 *GNU*)
6008   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6009 *)
6010   ac_count=0
6011   $as_echo_n 0123456789 >"conftest.in"
6012   while :
6013   do
6014     cat "conftest.in" "conftest.in" >"conftest.tmp"
6015     mv "conftest.tmp" "conftest.in"
6016     cp "conftest.in" "conftest.nl"
6017     $as_echo 'EGREP' >> "conftest.nl"
6018     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6019     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6020     as_fn_arith $ac_count + 1 && ac_count=$as_val
6021     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6022       # Best one so far, save it but keep looking for a better one
6023       ac_cv_path_EGREP="$ac_path_EGREP"
6024       ac_path_EGREP_max=$ac_count
6025     fi
6026     # 10*(2^10) chars as input seems more than enough
6027     test $ac_count -gt 10 && break
6028   done
6029   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6030 esac
6031
6032       $ac_path_EGREP_found && break 3
6033     done
6034   done
6035   done
6036 IFS=$as_save_IFS
6037   if test -z "$ac_cv_path_EGREP"; then
6038     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6039   fi
6040 else
6041   ac_cv_path_EGREP=$EGREP
6042 fi
6043
6044    fi
6045 fi
6046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6047 $as_echo "$ac_cv_path_EGREP" >&6; }
6048  EGREP="$ac_cv_path_EGREP"
6049
6050
6051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6052 /* end confdefs.h.  */
6053 #if __ELF__
6054   yes
6055 #endif
6056
6057 _ACEOF
6058 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6059   $EGREP "yes" >/dev/null 2>&1; then :
6060   ELF_SYS=true
6061 else
6062   if test "X$elf" = "Xyes" ; then
6063   ELF_SYS=true
6064 else
6065   ELF_SYS=
6066 fi
6067 fi
6068 rm -f conftest*
6069
6070
6071
6072 #
6073 # Assignments
6074 #
6075
6076 CPPFLAGS="$CPPFLAGS $INCLUDES"
6077 LDFLAGS="$LDFLAGS $LIBDIRS"
6078
6079
6080
6081
6082
6083 # Check whether --with-gnu-ld was given.
6084 if test "${with_gnu_ld+set}" = set; then :
6085   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
6086 else
6087   with_gnu_ld=no
6088 fi
6089
6090 ac_prog=ld
6091 if test "$GCC" = yes; then
6092   # Check if gcc -print-prog-name=ld gives a path.
6093   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
6094 $as_echo_n "checking for ld used by GCC... " >&6; }
6095   case $host in
6096   *-*-mingw*)
6097     # gcc leaves a trailing carriage return which upsets mingw
6098     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6099   *)
6100     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6101   esac
6102   case "$ac_prog" in
6103     # Accept absolute paths.
6104     [\\/]* | [A-Za-z]:[\\/]*)
6105       re_direlt='/[^/][^/]*/\.\./'
6106       # Canonicalize the path of ld
6107       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
6108       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
6109         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
6110       done
6111       test -z "$LD" && LD="$ac_prog"
6112       ;;
6113   "")
6114     # If it fails, then pretend we aren't using GCC.
6115     ac_prog=ld
6116     ;;
6117   *)
6118     # If it is relative, then search for the first ld in PATH.
6119     with_gnu_ld=unknown
6120     ;;
6121   esac
6122 elif test "$with_gnu_ld" = yes; then
6123   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
6124 $as_echo_n "checking for GNU ld... " >&6; }
6125 else
6126   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
6127 $as_echo_n "checking for non-GNU ld... " >&6; }
6128 fi
6129 if ${ac_cv_path_LD+:} false; then :
6130   $as_echo_n "(cached) " >&6
6131 else
6132   if test -z "$LD"; then
6133   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
6134   for ac_dir in $PATH; do
6135     test -z "$ac_dir" && ac_dir=.
6136     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6137       ac_cv_path_LD="$ac_dir/$ac_prog"
6138       # Check to see if the program is GNU ld.  I'd rather use --version,
6139       # but apparently some GNU ld's only accept -v.
6140       # Break only if it was the GNU/non-GNU ld that we prefer.
6141       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
6142         test "$with_gnu_ld" != no && break
6143       else
6144         test "$with_gnu_ld" != yes && break
6145       fi
6146     fi
6147   done
6148   IFS="$ac_save_ifs"
6149 else
6150   ac_cv_path_LD="$LD" # Let the user override the test with a path.
6151 fi
6152 fi
6153
6154 LD="$ac_cv_path_LD"
6155 if test -n "$LD"; then
6156   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
6157 $as_echo "$LD" >&6; }
6158 else
6159   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6160 $as_echo "no" >&6; }
6161 fi
6162 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
6163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
6164 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
6165 if ${ac_cv_prog_gnu_ld+:} false; then :
6166   $as_echo_n "(cached) " >&6
6167 else
6168   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
6169 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
6170   ac_cv_prog_gnu_ld=yes
6171 else
6172   ac_cv_prog_gnu_ld=no
6173 fi
6174 fi
6175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
6176 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
6177 with_gnu_ld=$ac_cv_prog_gnu_ld
6178
6179
6180
6181
6182 case $host_os in sysv5*)
6183   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ld -R works" >&5
6184 $as_echo_n "checking whether ld -R works... " >&6; }
6185 if ${pgac_cv_prog_ld_R+:} false; then :
6186   $as_echo_n "(cached) " >&6
6187 else
6188
6189     pgac_save_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -Wl,-R/usr/lib"
6190     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6191 /* end confdefs.h.  */
6192
6193 int
6194 main ()
6195 {
6196
6197   ;
6198   return 0;
6199 }
6200 _ACEOF
6201 if ac_fn_c_try_link "$LINENO"; then :
6202   pgac_cv_prog_ld_R=yes
6203 else
6204   pgac_cv_prog_ld_R=no
6205 fi
6206 rm -f core conftest.err conftest.$ac_objext \
6207     conftest$ac_exeext conftest.$ac_ext
6208     LDFLAGS=$pgac_save_LDFLAGS
6209
6210 fi
6211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_ld_R" >&5
6212 $as_echo "$pgac_cv_prog_ld_R" >&6; }
6213   ld_R_works=$pgac_cv_prog_ld_R
6214
6215 esac
6216 if test -n "$ac_tool_prefix"; then
6217   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6218 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6220 $as_echo_n "checking for $ac_word... " >&6; }
6221 if ${ac_cv_prog_RANLIB+:} false; then :
6222   $as_echo_n "(cached) " >&6
6223 else
6224   if test -n "$RANLIB"; then
6225   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6226 else
6227 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6228 for as_dir in $PATH
6229 do
6230   IFS=$as_save_IFS
6231   test -z "$as_dir" && as_dir=.
6232     for ac_exec_ext in '' $ac_executable_extensions; do
6233   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6234     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6235     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6236     break 2
6237   fi
6238 done
6239   done
6240 IFS=$as_save_IFS
6241
6242 fi
6243 fi
6244 RANLIB=$ac_cv_prog_RANLIB
6245 if test -n "$RANLIB"; then
6246   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6247 $as_echo "$RANLIB" >&6; }
6248 else
6249   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6250 $as_echo "no" >&6; }
6251 fi
6252
6253
6254 fi
6255 if test -z "$ac_cv_prog_RANLIB"; then
6256   ac_ct_RANLIB=$RANLIB
6257   # Extract the first word of "ranlib", so it can be a program name with args.
6258 set dummy ranlib; ac_word=$2
6259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6260 $as_echo_n "checking for $ac_word... " >&6; }
6261 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6262   $as_echo_n "(cached) " >&6
6263 else
6264   if test -n "$ac_ct_RANLIB"; then
6265   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6266 else
6267 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6268 for as_dir in $PATH
6269 do
6270   IFS=$as_save_IFS
6271   test -z "$as_dir" && as_dir=.
6272     for ac_exec_ext in '' $ac_executable_extensions; do
6273   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6274     ac_cv_prog_ac_ct_RANLIB="ranlib"
6275     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6276     break 2
6277   fi
6278 done
6279   done
6280 IFS=$as_save_IFS
6281
6282 fi
6283 fi
6284 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6285 if test -n "$ac_ct_RANLIB"; then
6286   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6287 $as_echo "$ac_ct_RANLIB" >&6; }
6288 else
6289   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6290 $as_echo "no" >&6; }
6291 fi
6292
6293   if test "x$ac_ct_RANLIB" = x; then
6294     RANLIB=":"
6295   else
6296     case $cross_compiling:$ac_tool_warned in
6297 yes:)
6298 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6299 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6300 ac_tool_warned=yes ;;
6301 esac
6302     RANLIB=$ac_ct_RANLIB
6303   fi
6304 else
6305   RANLIB="$ac_cv_prog_RANLIB"
6306 fi
6307
6308
6309   if test -n "$ac_tool_prefix"; then
6310   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6311 set dummy ${ac_tool_prefix}strip; ac_word=$2
6312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6313 $as_echo_n "checking for $ac_word... " >&6; }
6314 if ${ac_cv_prog_STRIP+:} false; then :
6315   $as_echo_n "(cached) " >&6
6316 else
6317   if test -n "$STRIP"; then
6318   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6319 else
6320 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6321 for as_dir in $PATH
6322 do
6323   IFS=$as_save_IFS
6324   test -z "$as_dir" && as_dir=.
6325     for ac_exec_ext in '' $ac_executable_extensions; do
6326   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6327     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6328     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6329     break 2
6330   fi
6331 done
6332   done
6333 IFS=$as_save_IFS
6334
6335 fi
6336 fi
6337 STRIP=$ac_cv_prog_STRIP
6338 if test -n "$STRIP"; then
6339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6340 $as_echo "$STRIP" >&6; }
6341 else
6342   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6343 $as_echo "no" >&6; }
6344 fi
6345
6346
6347 fi
6348 if test -z "$ac_cv_prog_STRIP"; then
6349   ac_ct_STRIP=$STRIP
6350   # Extract the first word of "strip", so it can be a program name with args.
6351 set dummy strip; ac_word=$2
6352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6353 $as_echo_n "checking for $ac_word... " >&6; }
6354 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
6355   $as_echo_n "(cached) " >&6
6356 else
6357   if test -n "$ac_ct_STRIP"; then
6358   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6359 else
6360 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6361 for as_dir in $PATH
6362 do
6363   IFS=$as_save_IFS
6364   test -z "$as_dir" && as_dir=.
6365     for ac_exec_ext in '' $ac_executable_extensions; do
6366   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6367     ac_cv_prog_ac_ct_STRIP="strip"
6368     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6369     break 2
6370   fi
6371 done
6372   done
6373 IFS=$as_save_IFS
6374
6375 fi
6376 fi
6377 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6378 if test -n "$ac_ct_STRIP"; then
6379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6380 $as_echo "$ac_ct_STRIP" >&6; }
6381 else
6382   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6383 $as_echo "no" >&6; }
6384 fi
6385
6386   if test "x$ac_ct_STRIP" = x; then
6387     STRIP=":"
6388   else
6389     case $cross_compiling:$ac_tool_warned in
6390 yes:)
6391 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6392 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6393 ac_tool_warned=yes ;;
6394 esac
6395     STRIP=$ac_ct_STRIP
6396   fi
6397 else
6398   STRIP="$ac_cv_prog_STRIP"
6399 fi
6400
6401
6402   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
6403 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
6404   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
6405     STRIP_STATIC_LIB="$STRIP -x"
6406     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
6407     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6408 $as_echo "yes" >&6; }
6409   else
6410     case $host_os in
6411       darwin*)
6412         STRIP="$STRIP -x"
6413         STRIP_STATIC_LIB=$STRIP
6414         STRIP_SHARED_LIB=$STRIP
6415         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6416 $as_echo "yes" >&6; }
6417         ;;
6418       *)
6419         STRIP_STATIC_LIB=:
6420         STRIP_SHARED_LIB=:
6421         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6422 $as_echo "no" >&6; }
6423         ;;
6424     esac
6425   fi
6426
6427
6428
6429 if test -n "$ac_tool_prefix"; then
6430   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6431 set dummy ${ac_tool_prefix}ar; ac_word=$2
6432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6433 $as_echo_n "checking for $ac_word... " >&6; }
6434 if ${ac_cv_prog_AR+:} false; then :
6435   $as_echo_n "(cached) " >&6
6436 else
6437   if test -n "$AR"; then
6438   ac_cv_prog_AR="$AR" # Let the user override the test.
6439 else
6440 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6441 for as_dir in $PATH
6442 do
6443   IFS=$as_save_IFS
6444   test -z "$as_dir" && as_dir=.
6445     for ac_exec_ext in '' $ac_executable_extensions; do
6446   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6447     ac_cv_prog_AR="${ac_tool_prefix}ar"
6448     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6449     break 2
6450   fi
6451 done
6452   done
6453 IFS=$as_save_IFS
6454
6455 fi
6456 fi
6457 AR=$ac_cv_prog_AR
6458 if test -n "$AR"; then
6459   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6460 $as_echo "$AR" >&6; }
6461 else
6462   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6463 $as_echo "no" >&6; }
6464 fi
6465
6466
6467 fi
6468 if test -z "$ac_cv_prog_AR"; then
6469   ac_ct_AR=$AR
6470   # Extract the first word of "ar", so it can be a program name with args.
6471 set dummy ar; ac_word=$2
6472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6473 $as_echo_n "checking for $ac_word... " >&6; }
6474 if ${ac_cv_prog_ac_ct_AR+:} false; then :
6475   $as_echo_n "(cached) " >&6
6476 else
6477   if test -n "$ac_ct_AR"; then
6478   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6479 else
6480 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6481 for as_dir in $PATH
6482 do
6483   IFS=$as_save_IFS
6484   test -z "$as_dir" && as_dir=.
6485     for ac_exec_ext in '' $ac_executable_extensions; do
6486   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6487     ac_cv_prog_ac_ct_AR="ar"
6488     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6489     break 2
6490   fi
6491 done
6492   done
6493 IFS=$as_save_IFS
6494
6495 fi
6496 fi
6497 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6498 if test -n "$ac_ct_AR"; then
6499   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6500 $as_echo "$ac_ct_AR" >&6; }
6501 else
6502   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6503 $as_echo "no" >&6; }
6504 fi
6505
6506   if test "x$ac_ct_AR" = x; then
6507     AR="ar"
6508   else
6509     case $cross_compiling:$ac_tool_warned in
6510 yes:)
6511 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6512 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6513 ac_tool_warned=yes ;;
6514 esac
6515     AR=$ac_ct_AR
6516   fi
6517 else
6518   AR="$ac_cv_prog_AR"
6519 fi
6520
6521 if test "$PORTNAME" = "win32"; then
6522   if test -n "$ac_tool_prefix"; then
6523   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6524 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
6525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6526 $as_echo_n "checking for $ac_word... " >&6; }
6527 if ${ac_cv_prog_DLLTOOL+:} false; then :
6528   $as_echo_n "(cached) " >&6
6529 else
6530   if test -n "$DLLTOOL"; then
6531   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6532 else
6533 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6534 for as_dir in $PATH
6535 do
6536   IFS=$as_save_IFS
6537   test -z "$as_dir" && as_dir=.
6538     for ac_exec_ext in '' $ac_executable_extensions; do
6539   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6540     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
6541     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6542     break 2
6543   fi
6544 done
6545   done
6546 IFS=$as_save_IFS
6547
6548 fi
6549 fi
6550 DLLTOOL=$ac_cv_prog_DLLTOOL
6551 if test -n "$DLLTOOL"; then
6552   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
6553 $as_echo "$DLLTOOL" >&6; }
6554 else
6555   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6556 $as_echo "no" >&6; }
6557 fi
6558
6559
6560 fi
6561 if test -z "$ac_cv_prog_DLLTOOL"; then
6562   ac_ct_DLLTOOL=$DLLTOOL
6563   # Extract the first word of "dlltool", so it can be a program name with args.
6564 set dummy dlltool; ac_word=$2
6565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6566 $as_echo_n "checking for $ac_word... " >&6; }
6567 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
6568   $as_echo_n "(cached) " >&6
6569 else
6570   if test -n "$ac_ct_DLLTOOL"; then
6571   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6572 else
6573 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6574 for as_dir in $PATH
6575 do
6576   IFS=$as_save_IFS
6577   test -z "$as_dir" && as_dir=.
6578     for ac_exec_ext in '' $ac_executable_extensions; do
6579   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6580     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
6581     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6582     break 2
6583   fi
6584 done
6585   done
6586 IFS=$as_save_IFS
6587
6588 fi
6589 fi
6590 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6591 if test -n "$ac_ct_DLLTOOL"; then
6592   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
6593 $as_echo "$ac_ct_DLLTOOL" >&6; }
6594 else
6595   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6596 $as_echo "no" >&6; }
6597 fi
6598
6599   if test "x$ac_ct_DLLTOOL" = x; then
6600     DLLTOOL="dlltool"
6601   else
6602     case $cross_compiling:$ac_tool_warned in
6603 yes:)
6604 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6605 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6606 ac_tool_warned=yes ;;
6607 esac
6608     DLLTOOL=$ac_ct_DLLTOOL
6609   fi
6610 else
6611   DLLTOOL="$ac_cv_prog_DLLTOOL"
6612 fi
6613
6614   if test -n "$ac_tool_prefix"; then
6615   # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
6616 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
6617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6618 $as_echo_n "checking for $ac_word... " >&6; }
6619 if ${ac_cv_prog_DLLWRAP+:} false; then :
6620   $as_echo_n "(cached) " >&6
6621 else
6622   if test -n "$DLLWRAP"; then
6623   ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
6624 else
6625 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6626 for as_dir in $PATH
6627 do
6628   IFS=$as_save_IFS
6629   test -z "$as_dir" && as_dir=.
6630     for ac_exec_ext in '' $ac_executable_extensions; do
6631   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6632     ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
6633     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6634     break 2
6635   fi
6636 done
6637   done
6638 IFS=$as_save_IFS
6639
6640 fi
6641 fi
6642 DLLWRAP=$ac_cv_prog_DLLWRAP
6643 if test -n "$DLLWRAP"; then
6644   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5
6645 $as_echo "$DLLWRAP" >&6; }
6646 else
6647   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6648 $as_echo "no" >&6; }
6649 fi
6650
6651
6652 fi
6653 if test -z "$ac_cv_prog_DLLWRAP"; then
6654   ac_ct_DLLWRAP=$DLLWRAP
6655   # Extract the first word of "dllwrap", so it can be a program name with args.
6656 set dummy dllwrap; ac_word=$2
6657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6658 $as_echo_n "checking for $ac_word... " >&6; }
6659 if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then :
6660   $as_echo_n "(cached) " >&6
6661 else
6662   if test -n "$ac_ct_DLLWRAP"; then
6663   ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
6664 else
6665 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6666 for as_dir in $PATH
6667 do
6668   IFS=$as_save_IFS
6669   test -z "$as_dir" && as_dir=.
6670     for ac_exec_ext in '' $ac_executable_extensions; do
6671   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6672     ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
6673     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6674     break 2
6675   fi
6676 done
6677   done
6678 IFS=$as_save_IFS
6679
6680 fi
6681 fi
6682 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
6683 if test -n "$ac_ct_DLLWRAP"; then
6684   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5
6685 $as_echo "$ac_ct_DLLWRAP" >&6; }
6686 else
6687   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6688 $as_echo "no" >&6; }
6689 fi
6690
6691   if test "x$ac_ct_DLLWRAP" = x; then
6692     DLLWRAP="dllwrap"
6693   else
6694     case $cross_compiling:$ac_tool_warned in
6695 yes:)
6696 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6697 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6698 ac_tool_warned=yes ;;
6699 esac
6700     DLLWRAP=$ac_ct_DLLWRAP
6701   fi
6702 else
6703   DLLWRAP="$ac_cv_prog_DLLWRAP"
6704 fi
6705
6706   if test -n "$ac_tool_prefix"; then
6707   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6708 set dummy ${ac_tool_prefix}windres; ac_word=$2
6709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6710 $as_echo_n "checking for $ac_word... " >&6; }
6711 if ${ac_cv_prog_WINDRES+:} false; then :
6712   $as_echo_n "(cached) " >&6
6713 else
6714   if test -n "$WINDRES"; then
6715   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
6716 else
6717 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6718 for as_dir in $PATH
6719 do
6720   IFS=$as_save_IFS
6721   test -z "$as_dir" && as_dir=.
6722     for ac_exec_ext in '' $ac_executable_extensions; do
6723   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6724     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
6725     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6726     break 2
6727   fi
6728 done
6729   done
6730 IFS=$as_save_IFS
6731
6732 fi
6733 fi
6734 WINDRES=$ac_cv_prog_WINDRES
6735 if test -n "$WINDRES"; then
6736   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
6737 $as_echo "$WINDRES" >&6; }
6738 else
6739   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6740 $as_echo "no" >&6; }
6741 fi
6742
6743
6744 fi
6745 if test -z "$ac_cv_prog_WINDRES"; then
6746   ac_ct_WINDRES=$WINDRES
6747   # Extract the first word of "windres", so it can be a program name with args.
6748 set dummy windres; ac_word=$2
6749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6750 $as_echo_n "checking for $ac_word... " >&6; }
6751 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
6752   $as_echo_n "(cached) " >&6
6753 else
6754   if test -n "$ac_ct_WINDRES"; then
6755   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
6756 else
6757 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6758 for as_dir in $PATH
6759 do
6760   IFS=$as_save_IFS
6761   test -z "$as_dir" && as_dir=.
6762     for ac_exec_ext in '' $ac_executable_extensions; do
6763   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6764     ac_cv_prog_ac_ct_WINDRES="windres"
6765     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6766     break 2
6767   fi
6768 done
6769   done
6770 IFS=$as_save_IFS
6771
6772 fi
6773 fi
6774 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6775 if test -n "$ac_ct_WINDRES"; then
6776   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
6777 $as_echo "$ac_ct_WINDRES" >&6; }
6778 else
6779   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6780 $as_echo "no" >&6; }
6781 fi
6782
6783   if test "x$ac_ct_WINDRES" = x; then
6784     WINDRES="windres"
6785   else
6786     case $cross_compiling:$ac_tool_warned in
6787 yes:)
6788 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6789 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6790 ac_tool_warned=yes ;;
6791 esac
6792     WINDRES=$ac_ct_WINDRES
6793   fi
6794 else
6795   WINDRES="$ac_cv_prog_WINDRES"
6796 fi
6797
6798 fi
6799
6800 # Find a good install program.  We prefer a C program (faster),
6801 # so one script is as good as another.  But avoid the broken or
6802 # incompatible versions:
6803 # SysV /etc/install, /usr/sbin/install
6804 # SunOS /usr/etc/install
6805 # IRIX /sbin/install
6806 # AIX /bin/install
6807 # AmigaOS /C/install, which installs bootblocks on floppy discs
6808 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6809 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
6810 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6811 # OS/2's system install, which has a completely different semantic
6812 # ./install, which can be erroneously created by make from ./install.sh.
6813 # Reject install programs that cannot install multiple files.
6814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6815 $as_echo_n "checking for a BSD-compatible install... " >&6; }
6816 if test -z "$INSTALL"; then
6817 if ${ac_cv_path_install+:} false; then :
6818   $as_echo_n "(cached) " >&6
6819 else
6820   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6821 for as_dir in $PATH
6822 do
6823   IFS=$as_save_IFS
6824   test -z "$as_dir" && as_dir=.
6825     # Account for people who put trailing slashes in PATH elements.
6826 case $as_dir/ in #((
6827   ./ | .// | /[cC]/* | \
6828   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
6829   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
6830   /usr/ucb/* ) ;;
6831   *)
6832     # OSF1 and SCO ODT 3.0 have their own names for install.
6833     # Don't use installbsd from OSF since it installs stuff as root
6834     # by default.
6835     for ac_prog in ginstall scoinst install; do
6836       for ac_exec_ext in '' $ac_executable_extensions; do
6837         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
6838           if test $ac_prog = install &&
6839             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6840             # AIX install.  It has an incompatible calling convention.
6841             :
6842           elif test $ac_prog = install &&
6843             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6844             # program-specific install script used by HP pwplus--don't use.
6845             :
6846           else
6847             rm -rf conftest.one conftest.two conftest.dir
6848             echo one > conftest.one
6849             echo two > conftest.two
6850             mkdir conftest.dir
6851             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6852               test -s conftest.one && test -s conftest.two &&
6853               test -s conftest.dir/conftest.one &&
6854               test -s conftest.dir/conftest.two
6855             then
6856               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6857               break 3
6858             fi
6859           fi
6860         fi
6861       done
6862     done
6863     ;;
6864 esac
6865
6866   done
6867 IFS=$as_save_IFS
6868
6869 rm -rf conftest.one conftest.two conftest.dir
6870
6871 fi
6872   if test "${ac_cv_path_install+set}" = set; then
6873     INSTALL=$ac_cv_path_install
6874   else
6875     # As a last resort, use the slow shell script.  Don't cache a
6876     # value for INSTALL within a source directory, because that will
6877     # break other packages using the cache if that directory is
6878     # removed, or if the value is a relative name.
6879     INSTALL=$ac_install_sh
6880   fi
6881 fi
6882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6883 $as_echo "$INSTALL" >&6; }
6884
6885 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6886 # It thinks the first close brace ends the variable substitution.
6887 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6888
6889 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6890
6891 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6892
6893 # When Autoconf chooses install-sh as install program it tries to generate
6894 # a relative path to it in each makefile where it subsitutes it. This clashes
6895 # with our Makefile.global concept. This workaround helps.
6896 case $INSTALL in
6897   *install-sh*) install_bin='';;
6898   *) install_bin=$INSTALL;;
6899 esac
6900
6901
6902 # Extract the first word of "tar", so it can be a program name with args.
6903 set dummy tar; ac_word=$2
6904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6905 $as_echo_n "checking for $ac_word... " >&6; }
6906 if ${ac_cv_path_TAR+:} false; then :
6907   $as_echo_n "(cached) " >&6
6908 else
6909   case $TAR in
6910   [\\/]* | ?:[\\/]*)
6911   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
6912   ;;
6913   *)
6914   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6915 for as_dir in $PATH
6916 do
6917   IFS=$as_save_IFS
6918   test -z "$as_dir" && as_dir=.
6919     for ac_exec_ext in '' $ac_executable_extensions; do
6920   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6921     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
6922     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6923     break 2
6924   fi
6925 done
6926   done
6927 IFS=$as_save_IFS
6928
6929   ;;
6930 esac
6931 fi
6932 TAR=$ac_cv_path_TAR
6933 if test -n "$TAR"; then
6934   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
6935 $as_echo "$TAR" >&6; }
6936 else
6937   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6938 $as_echo "no" >&6; }
6939 fi
6940
6941
6942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
6943 $as_echo_n "checking whether ln -s works... " >&6; }
6944 LN_S=$as_ln_s
6945 if test "$LN_S" = "ln -s"; then
6946   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6947 $as_echo "yes" >&6; }
6948 else
6949   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
6950 $as_echo "no, using $LN_S" >&6; }
6951 fi
6952
6953 for ac_prog in gawk mawk nawk awk
6954 do
6955   # Extract the first word of "$ac_prog", so it can be a program name with args.
6956 set dummy $ac_prog; ac_word=$2
6957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6958 $as_echo_n "checking for $ac_word... " >&6; }
6959 if ${ac_cv_prog_AWK+:} false; then :
6960   $as_echo_n "(cached) " >&6
6961 else
6962   if test -n "$AWK"; then
6963   ac_cv_prog_AWK="$AWK" # Let the user override the test.
6964 else
6965 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6966 for as_dir in $PATH
6967 do
6968   IFS=$as_save_IFS
6969   test -z "$as_dir" && as_dir=.
6970     for ac_exec_ext in '' $ac_executable_extensions; do
6971   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6972     ac_cv_prog_AWK="$ac_prog"
6973     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6974     break 2
6975   fi
6976 done
6977   done
6978 IFS=$as_save_IFS
6979
6980 fi
6981 fi
6982 AWK=$ac_cv_prog_AWK
6983 if test -n "$AWK"; then
6984   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6985 $as_echo "$AWK" >&6; }
6986 else
6987   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6988 $as_echo "no" >&6; }
6989 fi
6990
6991
6992   test -n "$AWK" && break
6993 done
6994
6995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6996 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6997 if test -z "$MKDIR_P"; then
6998   if ${ac_cv_path_mkdir+:} false; then :
6999   $as_echo_n "(cached) " >&6
7000 else
7001   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7002 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
7003 do
7004   IFS=$as_save_IFS
7005   test -z "$as_dir" && as_dir=.
7006     for ac_prog in mkdir gmkdir; do
7007          for ac_exec_ext in '' $ac_executable_extensions; do
7008            as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
7009            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
7010              'mkdir (GNU coreutils) '* | \
7011              'mkdir (coreutils) '* | \
7012              'mkdir (fileutils) '4.1*)
7013                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
7014                break 3;;
7015            esac
7016          done
7017        done
7018   done
7019 IFS=$as_save_IFS
7020
7021 fi
7022
7023   test -d ./--version && rmdir ./--version
7024   if test "${ac_cv_path_mkdir+set}" = set; then
7025     MKDIR_P="$ac_cv_path_mkdir -p"
7026   else
7027     # As a last resort, use the slow shell script.  Don't cache a
7028     # value for MKDIR_P within a source directory, because that will
7029     # break other packages using the cache if that directory is
7030     # removed, or if the value is a relative name.
7031     MKDIR_P="$ac_install_sh -d"
7032   fi
7033 fi
7034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
7035 $as_echo "$MKDIR_P" >&6; }
7036
7037 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
7038 # a relative path to it in each makefile where it subsitutes it. This clashes
7039 # with our Makefile.global concept. This workaround helps.
7040 case $MKDIR_P in
7041   *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
7042 esac
7043
7044 # Let the user override the search
7045 if test -z "$BISON"; then
7046   for ac_prog in bison
7047 do
7048   # Extract the first word of "$ac_prog", so it can be a program name with args.
7049 set dummy $ac_prog; ac_word=$2
7050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7051 $as_echo_n "checking for $ac_word... " >&6; }
7052 if ${ac_cv_path_BISON+:} false; then :
7053   $as_echo_n "(cached) " >&6
7054 else
7055   case $BISON in
7056   [\\/]* | ?:[\\/]*)
7057   ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
7058   ;;
7059   *)
7060   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7061 for as_dir in $PATH
7062 do
7063   IFS=$as_save_IFS
7064   test -z "$as_dir" && as_dir=.
7065     for ac_exec_ext in '' $ac_executable_extensions; do
7066   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7067     ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
7068     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7069     break 2
7070   fi
7071 done
7072   done
7073 IFS=$as_save_IFS
7074
7075   ;;
7076 esac
7077 fi
7078 BISON=$ac_cv_path_BISON
7079 if test -n "$BISON"; then
7080   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
7081 $as_echo "$BISON" >&6; }
7082 else
7083   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7084 $as_echo "no" >&6; }
7085 fi
7086
7087
7088   test -n "$BISON" && break
7089 done
7090
7091 fi
7092
7093 if test "$BISON"; then
7094   pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
7095   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
7096 $as_echo "$as_me: using $pgac_bison_version" >&6;}
7097   if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
7098   then
7099     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7100 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
7101 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
7102 $as_echo "$as_me: WARNING:
7103 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
7104 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
7105     BISON=""
7106   fi
7107   # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
7108   # of the now preferred %name-prefix "base_yy", but the latter
7109   # doesn't work with Bison 2.3 or less.  So for now we silence the
7110   # deprecation warnings.
7111   if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
7112   then
7113     BISONFLAGS="$BISONFLAGS -Wno-deprecated"
7114   fi
7115 fi
7116
7117 if test -z "$BISON"; then
7118   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7119 *** Without Bison you will not be able to build PostgreSQL from Git nor
7120 *** change any of the parser definition files.  You can obtain Bison from
7121 *** a GNU mirror site.  (If you are using the official distribution of
7122 *** PostgreSQL then you do not need to worry about this, because the Bison
7123 *** output is pre-generated.)" >&5
7124 $as_echo "$as_me: WARNING:
7125 *** Without Bison you will not be able to build PostgreSQL from Git nor
7126 *** change any of the parser definition files.  You can obtain Bison from
7127 *** a GNU mirror site.  (If you are using the official distribution of
7128 *** PostgreSQL then you do not need to worry about this, because the Bison
7129 *** output is pre-generated.)" >&2;}
7130 fi
7131 # We don't need AC_SUBST(BISON) because AC_PATH_PROG did it
7132
7133
7134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
7135 $as_echo_n "checking for flex... " >&6; }
7136 if ${pgac_cv_path_flex+:} false; then :
7137   $as_echo_n "(cached) " >&6
7138 else
7139   # Let the user override the test
7140 if test -n "$FLEX"; then
7141   pgac_cv_path_flex=$FLEX
7142 else
7143   pgac_save_IFS=$IFS
7144   IFS=$PATH_SEPARATOR
7145   for pgac_dir in $PATH; do
7146     IFS=$pgac_save_IFS
7147     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
7148       pgac_dir=`pwd`
7149     fi
7150     for pgac_prog in flex lex; do
7151       pgac_candidate="$pgac_dir/$pgac_prog"
7152       if test -f "$pgac_candidate" \
7153         && $pgac_candidate --version </dev/null >/dev/null 2>&1
7154       then
7155         echo '%%'  > conftest.l
7156         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
7157           pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
7158           if echo "$pgac_flex_version" | sed 's/[.a-z]/ /g' | $AWK '{ if ($1 = 2 && $2 = 5 && $3 >= 31) exit 0; else exit 1;}'
7159           then
7160             pgac_cv_path_flex=$pgac_candidate
7161             break 2
7162           else
7163             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7164 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
7165 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
7166 $as_echo "$as_me: WARNING:
7167 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
7168 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
7169           fi
7170         fi
7171       fi
7172     done
7173   done
7174   rm -f conftest.l lex.yy.c
7175   : ${pgac_cv_path_flex=no}
7176 fi
7177
7178 fi
7179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
7180 $as_echo "$pgac_cv_path_flex" >&6; }
7181 if test x"$pgac_cv_path_flex" = x"no"; then
7182   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7183 *** Without Flex you will not be able to build PostgreSQL from Git nor
7184 *** change any of the scanner definition files.  You can obtain Flex from
7185 *** a GNU mirror site.  (If you are using the official distribution of
7186 *** PostgreSQL then you do not need to worry about this because the Flex
7187 *** output is pre-generated.)" >&5
7188 $as_echo "$as_me: WARNING:
7189 *** Without Flex you will not be able to build PostgreSQL from Git nor
7190 *** change any of the scanner definition files.  You can obtain Flex from
7191 *** a GNU mirror site.  (If you are using the official distribution of
7192 *** PostgreSQL then you do not need to worry about this because the Flex
7193 *** output is pre-generated.)" >&2;}
7194
7195   FLEX=
7196 else
7197   FLEX=$pgac_cv_path_flex
7198   pgac_flex_version=`$FLEX --version 2>/dev/null`
7199   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
7200 $as_echo "$as_me: using $pgac_flex_version" >&6;}
7201 fi
7202
7203
7204
7205
7206
7207 # Let the user override the search
7208 if test -z "$PERL"; then
7209   # Extract the first word of "perl", so it can be a program name with args.
7210 set dummy perl; ac_word=$2
7211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7212 $as_echo_n "checking for $ac_word... " >&6; }
7213 if ${ac_cv_path_PERL+:} false; then :
7214   $as_echo_n "(cached) " >&6
7215 else
7216   case $PERL in
7217   [\\/]* | ?:[\\/]*)
7218   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
7219   ;;
7220   *)
7221   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7222 for as_dir in $PATH
7223 do
7224   IFS=$as_save_IFS
7225   test -z "$as_dir" && as_dir=.
7226     for ac_exec_ext in '' $ac_executable_extensions; do
7227   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7228     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
7229     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7230     break 2
7231   fi
7232 done
7233   done
7234 IFS=$as_save_IFS
7235
7236   ;;
7237 esac
7238 fi
7239 PERL=$ac_cv_path_PERL
7240 if test -n "$PERL"; then
7241   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
7242 $as_echo "$PERL" >&6; }
7243 else
7244   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7245 $as_echo "no" >&6; }
7246 fi
7247
7248
7249 fi
7250
7251 if test "$PERL"; then
7252   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'`
7253   { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
7254 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
7255   if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
7256     $AWK '{ if ($1 = 5 && $2 >= 8) exit 1; else exit 0;}'
7257   then
7258     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7259 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7260 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
7261 $as_echo "$as_me: WARNING:
7262 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7263 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
7264     PERL=""
7265   fi
7266 fi
7267
7268 if test -z "$PERL"; then
7269   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7270 *** Without Perl you will not be able to build PostgreSQL from Git.
7271 *** You can obtain Perl from any CPAN mirror site.
7272 *** (If you are using the official distribution of PostgreSQL then you do not
7273 *** need to worry about this, because the Perl output is pre-generated.)" >&5
7274 $as_echo "$as_me: WARNING:
7275 *** Without Perl you will not be able to build PostgreSQL from Git.
7276 *** You can obtain Perl from any CPAN mirror site.
7277 *** (If you are using the official distribution of PostgreSQL then you do not
7278 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
7279 fi
7280
7281 if test "$with_perl" = yes; then
7282   if test -z "$PERL"; then
7283     as_fn_error $? "Perl not found" "$LINENO" 5
7284   fi
7285
7286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
7287 $as_echo_n "checking for Perl archlibexp... " >&6; }
7288 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
7289 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
7290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
7291 $as_echo "$perl_archlibexp" >&6; }
7292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
7293 $as_echo_n "checking for Perl privlibexp... " >&6; }
7294 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
7295 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
7296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
7297 $as_echo "$perl_privlibexp" >&6; }
7298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
7299 $as_echo_n "checking for Perl useshrplib... " >&6; }
7300 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
7301 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
7302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
7303 $as_echo "$perl_useshrplib" >&6; }
7304
7305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
7306 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
7307 if test "$PORTNAME" = "win32" ; then
7308 perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
7309 test -e "$perl_archlibexp/CORE/$perl_lib.lib" && perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
7310 else
7311 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
7312 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
7313 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
7314 fi
7315 if test -z "$perl_embed_ldflags" ; then
7316         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7317 $as_echo "no" >&6; }
7318         as_fn_error $? "could not determine flags for linking embedded Perl.
7319 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
7320 installed." "$LINENO" 5
7321 else
7322         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
7323 $as_echo "$perl_embed_ldflags" >&6; }
7324 fi
7325
7326 fi
7327
7328 if test "$with_python" = yes; then
7329   # Extract the first word of "python", so it can be a program name with args.
7330 set dummy python; ac_word=$2
7331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7332 $as_echo_n "checking for $ac_word... " >&6; }
7333 if ${ac_cv_path_PYTHON+:} false; then :
7334   $as_echo_n "(cached) " >&6
7335 else
7336   case $PYTHON in
7337   [\\/]* | ?:[\\/]*)
7338   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
7339   ;;
7340   *)
7341   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7342 for as_dir in $PATH
7343 do
7344   IFS=$as_save_IFS
7345   test -z "$as_dir" && as_dir=.
7346     for ac_exec_ext in '' $ac_executable_extensions; do
7347   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7348     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
7349     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7350     break 2
7351   fi
7352 done
7353   done
7354 IFS=$as_save_IFS
7355
7356   ;;
7357 esac
7358 fi
7359 PYTHON=$ac_cv_path_PYTHON
7360 if test -n "$PYTHON"; then
7361   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
7362 $as_echo "$PYTHON" >&6; }
7363 else
7364   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7365 $as_echo "no" >&6; }
7366 fi
7367
7368
7369 if test x"$PYTHON" = x""; then
7370   as_fn_error $? "Python not found" "$LINENO" 5
7371 fi
7372
7373
7374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python distutils module" >&5
7375 $as_echo_n "checking for Python distutils module... " >&6; }
7376 if "${PYTHON}" -c 'import distutils' 2>&5
7377 then
7378     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7379 $as_echo "yes" >&6; }
7380 else
7381     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7382 $as_echo "no" >&6; }
7383     as_fn_error $? "distutils module not found" "$LINENO" 5
7384 fi
7385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
7386 $as_echo_n "checking Python configuration directory... " >&6; }
7387 python_majorversion=`${PYTHON} -c "import sys; print(sys.version[0])"`
7388 python_version=`${PYTHON} -c "import sys; print(sys.version[:3])"`
7389 python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
7390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
7391 $as_echo "$python_configdir" >&6; }
7392
7393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directories" >&5
7394 $as_echo_n "checking Python include directories... " >&6; }
7395 python_includespec=`${PYTHON} -c "
7396 import distutils.sysconfig
7397 a = '-I' + distutils.sysconfig.get_python_inc(False)
7398 b = '-I' + distutils.sysconfig.get_python_inc(True)
7399 if a == b:
7400     print(a)
7401 else:
7402     print(a + ' ' + b)"`
7403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
7404 $as_echo "$python_includespec" >&6; }
7405
7406
7407
7408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
7409 $as_echo_n "checking how to link an embedded Python application... " >&6; }
7410
7411 python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
7412 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
7413 python_so=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('SO'))))"`
7414 ldlibrary=`echo "${python_ldlibrary}" | sed "s/${python_so}$//"`
7415 python_enable_shared=`${PYTHON} -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_vars().get('Py_ENABLE_SHARED',0))"`
7416
7417 if test x"${python_libdir}" != x"" -a x"${python_ldlibrary}" != x"" -a x"${python_ldlibrary}" != x"${ldlibrary}"
7418 then
7419         # New way: use the official shared library
7420         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
7421         python_libspec="-L${python_libdir} -l${ldlibrary}"
7422 else
7423         # Old way: use libpython from python_configdir
7424         python_libdir="${python_configdir}"
7425         # LDVERSION was introduced in Python 3.2.
7426         python_ldversion=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDVERSION'))))"`
7427         if test x"${python_ldversion}" = x""; then
7428                 python_ldversion=$python_version
7429         fi
7430         python_libspec="-L${python_libdir} -lpython${python_ldversion}"
7431 fi
7432
7433 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
7434
7435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
7436 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
7437
7438
7439 # threaded python is not supported on OpenBSD
7440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Python is compiled with thread support" >&5
7441 $as_echo_n "checking whether Python is compiled with thread support... " >&6; }
7442 pythreads=`${PYTHON} -c "import sys; print(int('thread' in sys.builtin_module_names))"`
7443 if test "$pythreads" = "1"; then
7444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7445 $as_echo "yes" >&6; }
7446   case $host_os in
7447   openbsd*)
7448     as_fn_error $? "threaded Python not supported on this platform" "$LINENO" 5
7449     ;;
7450   esac
7451 else
7452   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7453 $as_echo "no" >&6; }
7454 fi
7455
7456
7457 fi
7458
7459 if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
7460   # Extract the first word of "zic", so it can be a program name with args.
7461 set dummy zic; ac_word=$2
7462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7463 $as_echo_n "checking for $ac_word... " >&6; }
7464 if ${ac_cv_path_ZIC+:} false; then :
7465   $as_echo_n "(cached) " >&6
7466 else
7467   case $ZIC in
7468   [\\/]* | ?:[\\/]*)
7469   ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
7470   ;;
7471   *)
7472   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7473 for as_dir in $PATH
7474 do
7475   IFS=$as_save_IFS
7476   test -z "$as_dir" && as_dir=.
7477     for ac_exec_ext in '' $ac_executable_extensions; do
7478   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7479     ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
7480     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7481     break 2
7482   fi
7483 done
7484   done
7485 IFS=$as_save_IFS
7486
7487   ;;
7488 esac
7489 fi
7490 ZIC=$ac_cv_path_ZIC
7491 if test -n "$ZIC"; then
7492   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
7493 $as_echo "$ZIC" >&6; }
7494 else
7495   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7496 $as_echo "no" >&6; }
7497 fi
7498
7499
7500   if test -z "$ZIC"; then
7501     as_fn_error $? "
7502 When cross-compiling, either use the option --with-system-tzdata to use
7503 existing time-zone data, or set the environment variable ZIC to a zic
7504 program to use during the build." "$LINENO" 5
7505   fi
7506 fi
7507
7508
7509 ##
7510 ## Libraries
7511 ##
7512 ## Most libraries are included only if they demonstrably provide a function
7513 ## we need, but libm is an exception: always include it, because there are
7514 ## too many compilers that play cute optimization games that will break
7515 ## probes for standard functions such as pow().
7516 ##
7517
7518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
7519 $as_echo_n "checking for main in -lm... " >&6; }
7520 if ${ac_cv_lib_m_main+:} false; then :
7521   $as_echo_n "(cached) " >&6
7522 else
7523   ac_check_lib_save_LIBS=$LIBS
7524 LIBS="-lm  $LIBS"
7525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7526 /* end confdefs.h.  */
7527
7528
7529 int
7530 main ()
7531 {
7532 return main ();
7533   ;
7534   return 0;
7535 }
7536 _ACEOF
7537 if ac_fn_c_try_link "$LINENO"; then :
7538   ac_cv_lib_m_main=yes
7539 else
7540   ac_cv_lib_m_main=no
7541 fi
7542 rm -f core conftest.err conftest.$ac_objext \
7543     conftest$ac_exeext conftest.$ac_ext
7544 LIBS=$ac_check_lib_save_LIBS
7545 fi
7546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
7547 $as_echo "$ac_cv_lib_m_main" >&6; }
7548 if test "x$ac_cv_lib_m_main" = xyes; then :
7549   cat >>confdefs.h <<_ACEOF
7550 #define HAVE_LIBM 1
7551 _ACEOF
7552
7553   LIBS="-lm $LIBS"
7554
7555 fi
7556
7557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
7558 $as_echo_n "checking for library containing setproctitle... " >&6; }
7559 if ${ac_cv_search_setproctitle+:} false; then :
7560   $as_echo_n "(cached) " >&6
7561 else
7562   ac_func_search_save_LIBS=$LIBS
7563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7564 /* end confdefs.h.  */
7565
7566 /* Override any GCC internal prototype to avoid an error.
7567    Use char because int might match the return type of a GCC
7568    builtin and then its argument prototype would still apply.  */
7569 #ifdef __cplusplus
7570 extern "C"
7571 #endif
7572 char setproctitle ();
7573 int
7574 main ()
7575 {
7576 return setproctitle ();
7577   ;
7578   return 0;
7579 }
7580 _ACEOF
7581 for ac_lib in '' util; do
7582   if test -z "$ac_lib"; then
7583     ac_res="none required"
7584   else
7585     ac_res=-l$ac_lib
7586     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7587   fi
7588   if ac_fn_c_try_link "$LINENO"; then :
7589   ac_cv_search_setproctitle=$ac_res
7590 fi
7591 rm -f core conftest.err conftest.$ac_objext \
7592     conftest$ac_exeext
7593   if ${ac_cv_search_setproctitle+:} false; then :
7594   break
7595 fi
7596 done
7597 if ${ac_cv_search_setproctitle+:} false; then :
7598
7599 else
7600   ac_cv_search_setproctitle=no
7601 fi
7602 rm conftest.$ac_ext
7603 LIBS=$ac_func_search_save_LIBS
7604 fi
7605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
7606 $as_echo "$ac_cv_search_setproctitle" >&6; }
7607 ac_res=$ac_cv_search_setproctitle
7608 if test "$ac_res" != no; then :
7609   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7610
7611 fi
7612
7613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
7614 $as_echo_n "checking for library containing dlopen... " >&6; }
7615 if ${ac_cv_search_dlopen+:} false; then :
7616   $as_echo_n "(cached) " >&6
7617 else
7618   ac_func_search_save_LIBS=$LIBS
7619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7620 /* end confdefs.h.  */
7621
7622 /* Override any GCC internal prototype to avoid an error.
7623    Use char because int might match the return type of a GCC
7624    builtin and then its argument prototype would still apply.  */
7625 #ifdef __cplusplus
7626 extern "C"
7627 #endif
7628 char dlopen ();
7629 int
7630 main ()
7631 {
7632 return dlopen ();
7633   ;
7634   return 0;
7635 }
7636 _ACEOF
7637 for ac_lib in '' dl; do
7638   if test -z "$ac_lib"; then
7639     ac_res="none required"
7640   else
7641     ac_res=-l$ac_lib
7642     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7643   fi
7644   if ac_fn_c_try_link "$LINENO"; then :
7645   ac_cv_search_dlopen=$ac_res
7646 fi
7647 rm -f core conftest.err conftest.$ac_objext \
7648     conftest$ac_exeext
7649   if ${ac_cv_search_dlopen+:} false; then :
7650   break
7651 fi
7652 done
7653 if ${ac_cv_search_dlopen+:} false; then :
7654
7655 else
7656   ac_cv_search_dlopen=no
7657 fi
7658 rm conftest.$ac_ext
7659 LIBS=$ac_func_search_save_LIBS
7660 fi
7661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
7662 $as_echo "$ac_cv_search_dlopen" >&6; }
7663 ac_res=$ac_cv_search_dlopen
7664 if test "$ac_res" != no; then :
7665   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7666
7667 fi
7668
7669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
7670 $as_echo_n "checking for library containing socket... " >&6; }
7671 if ${ac_cv_search_socket+:} false; then :
7672   $as_echo_n "(cached) " >&6
7673 else
7674   ac_func_search_save_LIBS=$LIBS
7675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7676 /* end confdefs.h.  */
7677
7678 /* Override any GCC internal prototype to avoid an error.
7679    Use char because int might match the return type of a GCC
7680    builtin and then its argument prototype would still apply.  */
7681 #ifdef __cplusplus
7682 extern "C"
7683 #endif
7684 char socket ();
7685 int
7686 main ()
7687 {
7688 return socket ();
7689   ;
7690   return 0;
7691 }
7692 _ACEOF
7693 for ac_lib in '' socket ws2_32; do
7694   if test -z "$ac_lib"; then
7695     ac_res="none required"
7696   else
7697     ac_res=-l$ac_lib
7698     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7699   fi
7700   if ac_fn_c_try_link "$LINENO"; then :
7701   ac_cv_search_socket=$ac_res
7702 fi
7703 rm -f core conftest.err conftest.$ac_objext \
7704     conftest$ac_exeext
7705   if ${ac_cv_search_socket+:} false; then :
7706   break
7707 fi
7708 done
7709 if ${ac_cv_search_socket+:} false; then :
7710
7711 else
7712   ac_cv_search_socket=no
7713 fi
7714 rm conftest.$ac_ext
7715 LIBS=$ac_func_search_save_LIBS
7716 fi
7717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
7718 $as_echo "$ac_cv_search_socket" >&6; }
7719 ac_res=$ac_cv_search_socket
7720 if test "$ac_res" != no; then :
7721   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7722
7723 fi
7724
7725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
7726 $as_echo_n "checking for library containing shl_load... " >&6; }
7727 if ${ac_cv_search_shl_load+:} false; then :
7728   $as_echo_n "(cached) " >&6
7729 else
7730   ac_func_search_save_LIBS=$LIBS
7731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7732 /* end confdefs.h.  */
7733
7734 /* Override any GCC internal prototype to avoid an error.
7735    Use char because int might match the return type of a GCC
7736    builtin and then its argument prototype would still apply.  */
7737 #ifdef __cplusplus
7738 extern "C"
7739 #endif
7740 char shl_load ();
7741 int
7742 main ()
7743 {
7744 return shl_load ();
7745   ;
7746   return 0;
7747 }
7748 _ACEOF
7749 for ac_lib in '' dld; do
7750   if test -z "$ac_lib"; then
7751     ac_res="none required"
7752   else
7753     ac_res=-l$ac_lib
7754     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7755   fi
7756   if ac_fn_c_try_link "$LINENO"; then :
7757   ac_cv_search_shl_load=$ac_res
7758 fi
7759 rm -f core conftest.err conftest.$ac_objext \
7760     conftest$ac_exeext
7761   if ${ac_cv_search_shl_load+:} false; then :
7762   break
7763 fi
7764 done
7765 if ${ac_cv_search_shl_load+:} false; then :
7766
7767 else
7768   ac_cv_search_shl_load=no
7769 fi
7770 rm conftest.$ac_ext
7771 LIBS=$ac_func_search_save_LIBS
7772 fi
7773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
7774 $as_echo "$ac_cv_search_shl_load" >&6; }
7775 ac_res=$ac_cv_search_shl_load
7776 if test "$ac_res" != no; then :
7777   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7778
7779 fi
7780
7781 # We only use libld in port/dynloader/aix.c
7782 case $host_os in
7783      aix*)
7784         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ldopen" >&5
7785 $as_echo_n "checking for library containing ldopen... " >&6; }
7786 if ${ac_cv_search_ldopen+:} false; then :
7787   $as_echo_n "(cached) " >&6
7788 else
7789   ac_func_search_save_LIBS=$LIBS
7790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7791 /* end confdefs.h.  */
7792
7793 /* Override any GCC internal prototype to avoid an error.
7794    Use char because int might match the return type of a GCC
7795    builtin and then its argument prototype would still apply.  */
7796 #ifdef __cplusplus
7797 extern "C"
7798 #endif
7799 char ldopen ();
7800 int
7801 main ()
7802 {
7803 return ldopen ();
7804   ;
7805   return 0;
7806 }
7807 _ACEOF
7808 for ac_lib in '' ld; do
7809   if test -z "$ac_lib"; then
7810     ac_res="none required"
7811   else
7812     ac_res=-l$ac_lib
7813     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7814   fi
7815   if ac_fn_c_try_link "$LINENO"; then :
7816   ac_cv_search_ldopen=$ac_res
7817 fi
7818 rm -f core conftest.err conftest.$ac_objext \
7819     conftest$ac_exeext
7820   if ${ac_cv_search_ldopen+:} false; then :
7821   break
7822 fi
7823 done
7824 if ${ac_cv_search_ldopen+:} false; then :
7825
7826 else
7827   ac_cv_search_ldopen=no
7828 fi
7829 rm conftest.$ac_ext
7830 LIBS=$ac_func_search_save_LIBS
7831 fi
7832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ldopen" >&5
7833 $as_echo "$ac_cv_search_ldopen" >&6; }
7834 ac_res=$ac_cv_search_ldopen
7835 if test "$ac_res" != no; then :
7836   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7837
7838 fi
7839
7840         ;;
7841 esac
7842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
7843 $as_echo_n "checking for library containing getopt_long... " >&6; }
7844 if ${ac_cv_search_getopt_long+:} false; then :
7845   $as_echo_n "(cached) " >&6
7846 else
7847   ac_func_search_save_LIBS=$LIBS
7848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7849 /* end confdefs.h.  */
7850
7851 /* Override any GCC internal prototype to avoid an error.
7852    Use char because int might match the return type of a GCC
7853    builtin and then its argument prototype would still apply.  */
7854 #ifdef __cplusplus
7855 extern "C"
7856 #endif
7857 char getopt_long ();
7858 int
7859 main ()
7860 {
7861 return getopt_long ();
7862   ;
7863   return 0;
7864 }
7865 _ACEOF
7866 for ac_lib in '' getopt gnugetopt; do
7867   if test -z "$ac_lib"; then
7868     ac_res="none required"
7869   else
7870     ac_res=-l$ac_lib
7871     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7872   fi
7873   if ac_fn_c_try_link "$LINENO"; then :
7874   ac_cv_search_getopt_long=$ac_res
7875 fi
7876 rm -f core conftest.err conftest.$ac_objext \
7877     conftest$ac_exeext
7878   if ${ac_cv_search_getopt_long+:} false; then :
7879   break
7880 fi
7881 done
7882 if ${ac_cv_search_getopt_long+:} false; then :
7883
7884 else
7885   ac_cv_search_getopt_long=no
7886 fi
7887 rm conftest.$ac_ext
7888 LIBS=$ac_func_search_save_LIBS
7889 fi
7890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
7891 $as_echo "$ac_cv_search_getopt_long" >&6; }
7892 ac_res=$ac_cv_search_getopt_long
7893 if test "$ac_res" != no; then :
7894   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7895
7896 fi
7897
7898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
7899 $as_echo_n "checking for library containing crypt... " >&6; }
7900 if ${ac_cv_search_crypt+:} false; then :
7901   $as_echo_n "(cached) " >&6
7902 else
7903   ac_func_search_save_LIBS=$LIBS
7904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7905 /* end confdefs.h.  */
7906
7907 /* Override any GCC internal prototype to avoid an error.
7908    Use char because int might match the return type of a GCC
7909    builtin and then its argument prototype would still apply.  */
7910 #ifdef __cplusplus
7911 extern "C"
7912 #endif
7913 char crypt ();
7914 int
7915 main ()
7916 {
7917 return crypt ();
7918   ;
7919   return 0;
7920 }
7921 _ACEOF
7922 for ac_lib in '' crypt; do
7923   if test -z "$ac_lib"; then
7924     ac_res="none required"
7925   else
7926     ac_res=-l$ac_lib
7927     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7928   fi
7929   if ac_fn_c_try_link "$LINENO"; then :
7930   ac_cv_search_crypt=$ac_res
7931 fi
7932 rm -f core conftest.err conftest.$ac_objext \
7933     conftest$ac_exeext
7934   if ${ac_cv_search_crypt+:} false; then :
7935   break
7936 fi
7937 done
7938 if ${ac_cv_search_crypt+:} false; then :
7939
7940 else
7941   ac_cv_search_crypt=no
7942 fi
7943 rm conftest.$ac_ext
7944 LIBS=$ac_func_search_save_LIBS
7945 fi
7946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
7947 $as_echo "$ac_cv_search_crypt" >&6; }
7948 ac_res=$ac_cv_search_crypt
7949 if test "$ac_res" != no; then :
7950   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7951
7952 fi
7953
7954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
7955 $as_echo_n "checking for library containing shm_open... " >&6; }
7956 if ${ac_cv_search_shm_open+:} false; then :
7957   $as_echo_n "(cached) " >&6
7958 else
7959   ac_func_search_save_LIBS=$LIBS
7960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7961 /* end confdefs.h.  */
7962
7963 /* Override any GCC internal prototype to avoid an error.
7964    Use char because int might match the return type of a GCC
7965    builtin and then its argument prototype would still apply.  */
7966 #ifdef __cplusplus
7967 extern "C"
7968 #endif
7969 char shm_open ();
7970 int
7971 main ()
7972 {
7973 return shm_open ();
7974   ;
7975   return 0;
7976 }
7977 _ACEOF
7978 for ac_lib in '' rt; do
7979   if test -z "$ac_lib"; then
7980     ac_res="none required"
7981   else
7982     ac_res=-l$ac_lib
7983     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7984   fi
7985   if ac_fn_c_try_link "$LINENO"; then :
7986   ac_cv_search_shm_open=$ac_res
7987 fi
7988 rm -f core conftest.err conftest.$ac_objext \
7989     conftest$ac_exeext
7990   if ${ac_cv_search_shm_open+:} false; then :
7991   break
7992 fi
7993 done
7994 if ${ac_cv_search_shm_open+:} false; then :
7995
7996 else
7997   ac_cv_search_shm_open=no
7998 fi
7999 rm conftest.$ac_ext
8000 LIBS=$ac_func_search_save_LIBS
8001 fi
8002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
8003 $as_echo "$ac_cv_search_shm_open" >&6; }
8004 ac_res=$ac_cv_search_shm_open
8005 if test "$ac_res" != no; then :
8006   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8007
8008 fi
8009
8010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
8011 $as_echo_n "checking for library containing shm_unlink... " >&6; }
8012 if ${ac_cv_search_shm_unlink+:} false; then :
8013   $as_echo_n "(cached) " >&6
8014 else
8015   ac_func_search_save_LIBS=$LIBS
8016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8017 /* end confdefs.h.  */
8018
8019 /* Override any GCC internal prototype to avoid an error.
8020    Use char because int might match the return type of a GCC
8021    builtin and then its argument prototype would still apply.  */
8022 #ifdef __cplusplus
8023 extern "C"
8024 #endif
8025 char shm_unlink ();
8026 int
8027 main ()
8028 {
8029 return shm_unlink ();
8030   ;
8031   return 0;
8032 }
8033 _ACEOF
8034 for ac_lib in '' rt; do
8035   if test -z "$ac_lib"; then
8036     ac_res="none required"
8037   else
8038     ac_res=-l$ac_lib
8039     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8040   fi
8041   if ac_fn_c_try_link "$LINENO"; then :
8042   ac_cv_search_shm_unlink=$ac_res
8043 fi
8044 rm -f core conftest.err conftest.$ac_objext \
8045     conftest$ac_exeext
8046   if ${ac_cv_search_shm_unlink+:} false; then :
8047   break
8048 fi
8049 done
8050 if ${ac_cv_search_shm_unlink+:} false; then :
8051
8052 else
8053   ac_cv_search_shm_unlink=no
8054 fi
8055 rm conftest.$ac_ext
8056 LIBS=$ac_func_search_save_LIBS
8057 fi
8058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
8059 $as_echo "$ac_cv_search_shm_unlink" >&6; }
8060 ac_res=$ac_cv_search_shm_unlink
8061 if test "$ac_res" != no; then :
8062   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8063
8064 fi
8065
8066 # Solaris:
8067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
8068 $as_echo_n "checking for library containing fdatasync... " >&6; }
8069 if ${ac_cv_search_fdatasync+:} false; then :
8070   $as_echo_n "(cached) " >&6
8071 else
8072   ac_func_search_save_LIBS=$LIBS
8073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8074 /* end confdefs.h.  */
8075
8076 /* Override any GCC internal prototype to avoid an error.
8077    Use char because int might match the return type of a GCC
8078    builtin and then its argument prototype would still apply.  */
8079 #ifdef __cplusplus
8080 extern "C"
8081 #endif
8082 char fdatasync ();
8083 int
8084 main ()
8085 {
8086 return fdatasync ();
8087   ;
8088   return 0;
8089 }
8090 _ACEOF
8091 for ac_lib in '' rt posix4; do
8092   if test -z "$ac_lib"; then
8093     ac_res="none required"
8094   else
8095     ac_res=-l$ac_lib
8096     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8097   fi
8098   if ac_fn_c_try_link "$LINENO"; then :
8099   ac_cv_search_fdatasync=$ac_res
8100 fi
8101 rm -f core conftest.err conftest.$ac_objext \
8102     conftest$ac_exeext
8103   if ${ac_cv_search_fdatasync+:} false; then :
8104   break
8105 fi
8106 done
8107 if ${ac_cv_search_fdatasync+:} false; then :
8108
8109 else
8110   ac_cv_search_fdatasync=no
8111 fi
8112 rm conftest.$ac_ext
8113 LIBS=$ac_func_search_save_LIBS
8114 fi
8115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
8116 $as_echo "$ac_cv_search_fdatasync" >&6; }
8117 ac_res=$ac_cv_search_fdatasync
8118 if test "$ac_res" != no; then :
8119   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8120
8121 fi
8122
8123 # Required for thread_test.c on Solaris 2.5:
8124 # Other ports use it too (HP-UX) so test unconditionally
8125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
8126 $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
8127 if ${ac_cv_search_gethostbyname_r+:} false; then :
8128   $as_echo_n "(cached) " >&6
8129 else
8130   ac_func_search_save_LIBS=$LIBS
8131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8132 /* end confdefs.h.  */
8133
8134 /* Override any GCC internal prototype to avoid an error.
8135    Use char because int might match the return type of a GCC
8136    builtin and then its argument prototype would still apply.  */
8137 #ifdef __cplusplus
8138 extern "C"
8139 #endif
8140 char gethostbyname_r ();
8141 int
8142 main ()
8143 {
8144 return gethostbyname_r ();
8145   ;
8146   return 0;
8147 }
8148 _ACEOF
8149 for ac_lib in '' nsl; do
8150   if test -z "$ac_lib"; then
8151     ac_res="none required"
8152   else
8153     ac_res=-l$ac_lib
8154     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8155   fi
8156   if ac_fn_c_try_link "$LINENO"; then :
8157   ac_cv_search_gethostbyname_r=$ac_res
8158 fi
8159 rm -f core conftest.err conftest.$ac_objext \
8160     conftest$ac_exeext
8161   if ${ac_cv_search_gethostbyname_r+:} false; then :
8162   break
8163 fi
8164 done
8165 if ${ac_cv_search_gethostbyname_r+:} false; then :
8166
8167 else
8168   ac_cv_search_gethostbyname_r=no
8169 fi
8170 rm conftest.$ac_ext
8171 LIBS=$ac_func_search_save_LIBS
8172 fi
8173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
8174 $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
8175 ac_res=$ac_cv_search_gethostbyname_r
8176 if test "$ac_res" != no; then :
8177   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8178
8179 fi
8180
8181 # Cygwin:
8182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
8183 $as_echo_n "checking for library containing shmget... " >&6; }
8184 if ${ac_cv_search_shmget+:} false; then :
8185   $as_echo_n "(cached) " >&6
8186 else
8187   ac_func_search_save_LIBS=$LIBS
8188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8189 /* end confdefs.h.  */
8190
8191 /* Override any GCC internal prototype to avoid an error.
8192    Use char because int might match the return type of a GCC
8193    builtin and then its argument prototype would still apply.  */
8194 #ifdef __cplusplus
8195 extern "C"
8196 #endif
8197 char shmget ();
8198 int
8199 main ()
8200 {
8201 return shmget ();
8202   ;
8203   return 0;
8204 }
8205 _ACEOF
8206 for ac_lib in '' cygipc; do
8207   if test -z "$ac_lib"; then
8208     ac_res="none required"
8209   else
8210     ac_res=-l$ac_lib
8211     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8212   fi
8213   if ac_fn_c_try_link "$LINENO"; then :
8214   ac_cv_search_shmget=$ac_res
8215 fi
8216 rm -f core conftest.err conftest.$ac_objext \
8217     conftest$ac_exeext
8218   if ${ac_cv_search_shmget+:} false; then :
8219   break
8220 fi
8221 done
8222 if ${ac_cv_search_shmget+:} false; then :
8223
8224 else
8225   ac_cv_search_shmget=no
8226 fi
8227 rm conftest.$ac_ext
8228 LIBS=$ac_func_search_save_LIBS
8229 fi
8230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
8231 $as_echo "$ac_cv_search_shmget" >&6; }
8232 ac_res=$ac_cv_search_shmget
8233 if test "$ac_res" != no; then :
8234   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8235
8236 fi
8237
8238
8239 if test "$with_readline" = yes; then
8240
8241
8242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
8243 $as_echo_n "checking for library containing readline... " >&6; }
8244 if ${pgac_cv_check_readline+:} false; then :
8245   $as_echo_n "(cached) " >&6
8246 else
8247   pgac_cv_check_readline=no
8248 pgac_save_LIBS=$LIBS
8249 if test x"$with_libedit_preferred" != x"yes"
8250 then    READLINE_ORDER="-lreadline -ledit"
8251 else    READLINE_ORDER="-ledit -lreadline"
8252 fi
8253 for pgac_rllib in $READLINE_ORDER ; do
8254   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
8255     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
8256     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8257 /* end confdefs.h.  */
8258
8259 /* Override any GCC internal prototype to avoid an error.
8260    Use char because int might match the return type of a GCC
8261    builtin and then its argument prototype would still apply.  */
8262 #ifdef __cplusplus
8263 extern "C"
8264 #endif
8265 char readline ();
8266 int
8267 main ()
8268 {
8269 return readline ();
8270   ;
8271   return 0;
8272 }
8273 _ACEOF
8274 if ac_fn_c_try_link "$LINENO"; then :
8275
8276       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
8277       # recognize dependent libraries; assume curses is needed if we didn't
8278       # find any dependency.
8279       case $host_os in
8280         netbsd* | openbsd* | irix*)
8281           if test x"$pgac_lib" = x"" ; then
8282             pgac_lib=" -lcurses"
8283           fi ;;
8284       esac
8285
8286       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
8287       break
8288
8289 fi
8290 rm -f core conftest.err conftest.$ac_objext \
8291     conftest$ac_exeext conftest.$ac_ext
8292   done
8293   if test "$pgac_cv_check_readline" != no ; then
8294     break
8295   fi
8296 done
8297 LIBS=$pgac_save_LIBS
8298
8299 fi
8300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
8301 $as_echo "$pgac_cv_check_readline" >&6; }
8302 if test "$pgac_cv_check_readline" != no ; then
8303   LIBS="$pgac_cv_check_readline $LIBS"
8304
8305 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
8306
8307 fi
8308
8309
8310   if test x"$pgac_cv_check_readline" = x"no"; then
8311     as_fn_error $? "readline library not found
8312 If you have readline already installed, see config.log for details on the
8313 failure.  It is possible the compiler isn't looking in the proper directory.
8314 Use --without-readline to disable readline support." "$LINENO" 5
8315   fi
8316 fi
8317
8318 if test "$with_zlib" = yes; then
8319   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
8320 $as_echo_n "checking for inflate in -lz... " >&6; }
8321 if ${ac_cv_lib_z_inflate+:} false; then :
8322   $as_echo_n "(cached) " >&6
8323 else
8324   ac_check_lib_save_LIBS=$LIBS
8325 LIBS="-lz  $LIBS"
8326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8327 /* end confdefs.h.  */
8328
8329 /* Override any GCC internal prototype to avoid an error.
8330    Use char because int might match the return type of a GCC
8331    builtin and then its argument prototype would still apply.  */
8332 #ifdef __cplusplus
8333 extern "C"
8334 #endif
8335 char inflate ();
8336 int
8337 main ()
8338 {
8339 return inflate ();
8340   ;
8341   return 0;
8342 }
8343 _ACEOF
8344 if ac_fn_c_try_link "$LINENO"; then :
8345   ac_cv_lib_z_inflate=yes
8346 else
8347   ac_cv_lib_z_inflate=no
8348 fi
8349 rm -f core conftest.err conftest.$ac_objext \
8350     conftest$ac_exeext conftest.$ac_ext
8351 LIBS=$ac_check_lib_save_LIBS
8352 fi
8353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
8354 $as_echo "$ac_cv_lib_z_inflate" >&6; }
8355 if test "x$ac_cv_lib_z_inflate" = xyes; then :
8356   cat >>confdefs.h <<_ACEOF
8357 #define HAVE_LIBZ 1
8358 _ACEOF
8359
8360   LIBS="-lz $LIBS"
8361
8362 else
8363   as_fn_error $? "zlib library not found
8364 If you have zlib already installed, see config.log for details on the
8365 failure.  It is possible the compiler isn't looking in the proper directory.
8366 Use --without-zlib to disable zlib support." "$LINENO" 5
8367 fi
8368
8369 fi
8370
8371 if test "$enable_spinlocks" = yes; then
8372
8373 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
8374
8375 else
8376   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
8377 *** Not using spinlocks will cause poor performance." >&5
8378 $as_echo "$as_me: WARNING:
8379 *** Not using spinlocks will cause poor performance." >&2;}
8380 fi
8381
8382 if test "$enable_atomics" = yes; then
8383
8384 $as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
8385
8386 else
8387   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
8388 *** Not using atomic operations will cause poor performance." >&5
8389 $as_echo "$as_me: WARNING:
8390 *** Not using atomic operations will cause poor performance." >&2;}
8391 fi
8392
8393 if test "$with_gssapi" = yes ; then
8394   if test "$PORTNAME" != "win32"; then
8395     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
8396 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
8397 if ${ac_cv_search_gss_init_sec_context+:} false; then :
8398   $as_echo_n "(cached) " >&6
8399 else
8400   ac_func_search_save_LIBS=$LIBS
8401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8402 /* end confdefs.h.  */
8403
8404 /* Override any GCC internal prototype to avoid an error.
8405    Use char because int might match the return type of a GCC
8406    builtin and then its argument prototype would still apply.  */
8407 #ifdef __cplusplus
8408 extern "C"
8409 #endif
8410 char gss_init_sec_context ();
8411 int
8412 main ()
8413 {
8414 return gss_init_sec_context ();
8415   ;
8416   return 0;
8417 }
8418 _ACEOF
8419 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
8420   if test -z "$ac_lib"; then
8421     ac_res="none required"
8422   else
8423     ac_res=-l$ac_lib
8424     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8425   fi
8426   if ac_fn_c_try_link "$LINENO"; then :
8427   ac_cv_search_gss_init_sec_context=$ac_res
8428 fi
8429 rm -f core conftest.err conftest.$ac_objext \
8430     conftest$ac_exeext
8431   if ${ac_cv_search_gss_init_sec_context+:} false; then :
8432   break
8433 fi
8434 done
8435 if ${ac_cv_search_gss_init_sec_context+:} false; then :
8436
8437 else
8438   ac_cv_search_gss_init_sec_context=no
8439 fi
8440 rm conftest.$ac_ext
8441 LIBS=$ac_func_search_save_LIBS
8442 fi
8443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
8444 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
8445 ac_res=$ac_cv_search_gss_init_sec_context
8446 if test "$ac_res" != no; then :
8447   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8448
8449 else
8450   as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
8451 fi
8452
8453   else
8454     LIBS="$LIBS -lgssapi32"
8455   fi
8456 fi
8457
8458 if test "$with_openssl" = yes ; then
8459     if test "$PORTNAME" != "win32"; then
8460      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
8461 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
8462 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
8463   $as_echo_n "(cached) " >&6
8464 else
8465   ac_check_lib_save_LIBS=$LIBS
8466 LIBS="-lcrypto  $LIBS"
8467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8468 /* end confdefs.h.  */
8469
8470 /* Override any GCC internal prototype to avoid an error.
8471    Use char because int might match the return type of a GCC
8472    builtin and then its argument prototype would still apply.  */
8473 #ifdef __cplusplus
8474 extern "C"
8475 #endif
8476 char CRYPTO_new_ex_data ();
8477 int
8478 main ()
8479 {
8480 return CRYPTO_new_ex_data ();
8481   ;
8482   return 0;
8483 }
8484 _ACEOF
8485 if ac_fn_c_try_link "$LINENO"; then :
8486   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
8487 else
8488   ac_cv_lib_crypto_CRYPTO_new_ex_data=no
8489 fi
8490 rm -f core conftest.err conftest.$ac_objext \
8491     conftest$ac_exeext conftest.$ac_ext
8492 LIBS=$ac_check_lib_save_LIBS
8493 fi
8494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
8495 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
8496 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
8497   cat >>confdefs.h <<_ACEOF
8498 #define HAVE_LIBCRYPTO 1
8499 _ACEOF
8500
8501   LIBS="-lcrypto $LIBS"
8502
8503 else
8504   as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
8505 fi
8506
8507      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5
8508 $as_echo_n "checking for SSL_library_init in -lssl... " >&6; }
8509 if ${ac_cv_lib_ssl_SSL_library_init+:} false; then :
8510   $as_echo_n "(cached) " >&6
8511 else
8512   ac_check_lib_save_LIBS=$LIBS
8513 LIBS="-lssl  $LIBS"
8514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8515 /* end confdefs.h.  */
8516
8517 /* Override any GCC internal prototype to avoid an error.
8518    Use char because int might match the return type of a GCC
8519    builtin and then its argument prototype would still apply.  */
8520 #ifdef __cplusplus
8521 extern "C"
8522 #endif
8523 char SSL_library_init ();
8524 int
8525 main ()
8526 {
8527 return SSL_library_init ();
8528   ;
8529   return 0;
8530 }
8531 _ACEOF
8532 if ac_fn_c_try_link "$LINENO"; then :
8533   ac_cv_lib_ssl_SSL_library_init=yes
8534 else
8535   ac_cv_lib_ssl_SSL_library_init=no
8536 fi
8537 rm -f core conftest.err conftest.$ac_objext \
8538     conftest$ac_exeext conftest.$ac_ext
8539 LIBS=$ac_check_lib_save_LIBS
8540 fi
8541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_library_init" >&5
8542 $as_echo "$ac_cv_lib_ssl_SSL_library_init" >&6; }
8543 if test "x$ac_cv_lib_ssl_SSL_library_init" = xyes; then :
8544   cat >>confdefs.h <<_ACEOF
8545 #define HAVE_LIBSSL 1
8546 _ACEOF
8547
8548   LIBS="-lssl $LIBS"
8549
8550 else
8551   as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
8552 fi
8553
8554   else
8555      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
8556 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
8557 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
8558   $as_echo_n "(cached) " >&6
8559 else
8560   ac_func_search_save_LIBS=$LIBS
8561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8562 /* end confdefs.h.  */
8563
8564 /* Override any GCC internal prototype to avoid an error.
8565    Use char because int might match the return type of a GCC
8566    builtin and then its argument prototype would still apply.  */
8567 #ifdef __cplusplus
8568 extern "C"
8569 #endif
8570 char CRYPTO_new_ex_data ();
8571 int
8572 main ()
8573 {
8574 return CRYPTO_new_ex_data ();
8575   ;
8576   return 0;
8577 }
8578 _ACEOF
8579 for ac_lib in '' eay32 crypto; do
8580   if test -z "$ac_lib"; then
8581     ac_res="none required"
8582   else
8583     ac_res=-l$ac_lib
8584     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8585   fi
8586   if ac_fn_c_try_link "$LINENO"; then :
8587   ac_cv_search_CRYPTO_new_ex_data=$ac_res
8588 fi
8589 rm -f core conftest.err conftest.$ac_objext \
8590     conftest$ac_exeext
8591   if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
8592   break
8593 fi
8594 done
8595 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
8596
8597 else
8598   ac_cv_search_CRYPTO_new_ex_data=no
8599 fi
8600 rm conftest.$ac_ext
8601 LIBS=$ac_func_search_save_LIBS
8602 fi
8603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
8604 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
8605 ac_res=$ac_cv_search_CRYPTO_new_ex_data
8606 if test "$ac_res" != no; then :
8607   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8608
8609 else
8610   as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
8611 fi
8612
8613      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_library_init" >&5
8614 $as_echo_n "checking for library containing SSL_library_init... " >&6; }
8615 if ${ac_cv_search_SSL_library_init+:} false; then :
8616   $as_echo_n "(cached) " >&6
8617 else
8618   ac_func_search_save_LIBS=$LIBS
8619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8620 /* end confdefs.h.  */
8621
8622 /* Override any GCC internal prototype to avoid an error.
8623    Use char because int might match the return type of a GCC
8624    builtin and then its argument prototype would still apply.  */
8625 #ifdef __cplusplus
8626 extern "C"
8627 #endif
8628 char SSL_library_init ();
8629 int
8630 main ()
8631 {
8632 return SSL_library_init ();
8633   ;
8634   return 0;
8635 }
8636 _ACEOF
8637 for ac_lib in '' ssleay32 ssl; do
8638   if test -z "$ac_lib"; then
8639     ac_res="none required"
8640   else
8641     ac_res=-l$ac_lib
8642     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8643   fi
8644   if ac_fn_c_try_link "$LINENO"; then :
8645   ac_cv_search_SSL_library_init=$ac_res
8646 fi
8647 rm -f core conftest.err conftest.$ac_objext \
8648     conftest$ac_exeext
8649   if ${ac_cv_search_SSL_library_init+:} false; then :
8650   break
8651 fi
8652 done
8653 if ${ac_cv_search_SSL_library_init+:} false; then :
8654
8655 else
8656   ac_cv_search_SSL_library_init=no
8657 fi
8658 rm conftest.$ac_ext
8659 LIBS=$ac_func_search_save_LIBS
8660 fi
8661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_library_init" >&5
8662 $as_echo "$ac_cv_search_SSL_library_init" >&6; }
8663 ac_res=$ac_cv_search_SSL_library_init
8664 if test "$ac_res" != no; then :
8665   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8666
8667 else
8668   as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
8669 fi
8670
8671   fi
8672   for ac_func in SSL_get_current_compression
8673 do :
8674   ac_fn_c_check_func "$LINENO" "SSL_get_current_compression" "ac_cv_func_SSL_get_current_compression"
8675 if test "x$ac_cv_func_SSL_get_current_compression" = xyes; then :
8676   cat >>confdefs.h <<_ACEOF
8677 #define HAVE_SSL_GET_CURRENT_COMPRESSION 1
8678 _ACEOF
8679
8680 fi
8681 done
8682
8683 fi
8684
8685 if test "$with_pam" = yes ; then
8686   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
8687 $as_echo_n "checking for pam_start in -lpam... " >&6; }
8688 if ${ac_cv_lib_pam_pam_start+:} false; then :
8689   $as_echo_n "(cached) " >&6
8690 else
8691   ac_check_lib_save_LIBS=$LIBS
8692 LIBS="-lpam  $LIBS"
8693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8694 /* end confdefs.h.  */
8695
8696 /* Override any GCC internal prototype to avoid an error.
8697    Use char because int might match the return type of a GCC
8698    builtin and then its argument prototype would still apply.  */
8699 #ifdef __cplusplus
8700 extern "C"
8701 #endif
8702 char pam_start ();
8703 int
8704 main ()
8705 {
8706 return pam_start ();
8707   ;
8708   return 0;
8709 }
8710 _ACEOF
8711 if ac_fn_c_try_link "$LINENO"; then :
8712   ac_cv_lib_pam_pam_start=yes
8713 else
8714   ac_cv_lib_pam_pam_start=no
8715 fi
8716 rm -f core conftest.err conftest.$ac_objext \
8717     conftest$ac_exeext conftest.$ac_ext
8718 LIBS=$ac_check_lib_save_LIBS
8719 fi
8720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
8721 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
8722 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
8723   cat >>confdefs.h <<_ACEOF
8724 #define HAVE_LIBPAM 1
8725 _ACEOF
8726
8727   LIBS="-lpam $LIBS"
8728
8729 else
8730   as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
8731 fi
8732
8733 fi
8734
8735 if test "$with_libxml" = yes ; then
8736   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
8737 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
8738 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
8739   $as_echo_n "(cached) " >&6
8740 else
8741   ac_check_lib_save_LIBS=$LIBS
8742 LIBS="-lxml2  $LIBS"
8743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8744 /* end confdefs.h.  */
8745
8746 /* Override any GCC internal prototype to avoid an error.
8747    Use char because int might match the return type of a GCC
8748    builtin and then its argument prototype would still apply.  */
8749 #ifdef __cplusplus
8750 extern "C"
8751 #endif
8752 char xmlSaveToBuffer ();
8753 int
8754 main ()
8755 {
8756 return xmlSaveToBuffer ();
8757   ;
8758   return 0;
8759 }
8760 _ACEOF
8761 if ac_fn_c_try_link "$LINENO"; then :
8762   ac_cv_lib_xml2_xmlSaveToBuffer=yes
8763 else
8764   ac_cv_lib_xml2_xmlSaveToBuffer=no
8765 fi
8766 rm -f core conftest.err conftest.$ac_objext \
8767     conftest$ac_exeext conftest.$ac_ext
8768 LIBS=$ac_check_lib_save_LIBS
8769 fi
8770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
8771 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
8772 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
8773   cat >>confdefs.h <<_ACEOF
8774 #define HAVE_LIBXML2 1
8775 _ACEOF
8776
8777   LIBS="-lxml2 $LIBS"
8778
8779 else
8780   as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
8781 fi
8782
8783 fi
8784
8785 if test "$with_libxslt" = yes ; then
8786   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
8787 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
8788 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
8789   $as_echo_n "(cached) " >&6
8790 else
8791   ac_check_lib_save_LIBS=$LIBS
8792 LIBS="-lxslt  $LIBS"
8793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8794 /* end confdefs.h.  */
8795
8796 /* Override any GCC internal prototype to avoid an error.
8797    Use char because int might match the return type of a GCC
8798    builtin and then its argument prototype would still apply.  */
8799 #ifdef __cplusplus
8800 extern "C"
8801 #endif
8802 char xsltCleanupGlobals ();
8803 int
8804 main ()
8805 {
8806 return xsltCleanupGlobals ();
8807   ;
8808   return 0;
8809 }
8810 _ACEOF
8811 if ac_fn_c_try_link "$LINENO"; then :
8812   ac_cv_lib_xslt_xsltCleanupGlobals=yes
8813 else
8814   ac_cv_lib_xslt_xsltCleanupGlobals=no
8815 fi
8816 rm -f core conftest.err conftest.$ac_objext \
8817     conftest$ac_exeext conftest.$ac_ext
8818 LIBS=$ac_check_lib_save_LIBS
8819 fi
8820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
8821 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
8822 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
8823   cat >>confdefs.h <<_ACEOF
8824 #define HAVE_LIBXSLT 1
8825 _ACEOF
8826
8827   LIBS="-lxslt $LIBS"
8828
8829 else
8830   as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
8831 fi
8832
8833 fi
8834
8835 # for contrib/sepgsql
8836 if test "$with_selinux" = yes; then
8837   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
8838 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
8839 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
8840   $as_echo_n "(cached) " >&6
8841 else
8842   ac_check_lib_save_LIBS=$LIBS
8843 LIBS="-lselinux  $LIBS"
8844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8845 /* end confdefs.h.  */
8846
8847 /* Override any GCC internal prototype to avoid an error.
8848    Use char because int might match the return type of a GCC
8849    builtin and then its argument prototype would still apply.  */
8850 #ifdef __cplusplus
8851 extern "C"
8852 #endif
8853 char security_compute_create_name ();
8854 int
8855 main ()
8856 {
8857 return security_compute_create_name ();
8858   ;
8859   return 0;
8860 }
8861 _ACEOF
8862 if ac_fn_c_try_link "$LINENO"; then :
8863   ac_cv_lib_selinux_security_compute_create_name=yes
8864 else
8865   ac_cv_lib_selinux_security_compute_create_name=no
8866 fi
8867 rm -f core conftest.err conftest.$ac_objext \
8868     conftest$ac_exeext conftest.$ac_ext
8869 LIBS=$ac_check_lib_save_LIBS
8870 fi
8871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
8872 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
8873 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
8874   cat >>confdefs.h <<_ACEOF
8875 #define HAVE_LIBSELINUX 1
8876 _ACEOF
8877
8878   LIBS="-lselinux $LIBS"
8879
8880 else
8881   as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
8882 fi
8883
8884 fi
8885
8886 # for contrib/uuid-ossp
8887 if test "$with_uuid" = bsd ; then
8888   # On BSD, the UUID functions are in libc
8889   ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
8890 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
8891   UUID_LIBS=""
8892 else
8893   as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
8894 fi
8895
8896 elif test "$with_uuid" = e2fs ; then
8897   # On OS X, the UUID functions are in libc
8898   ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
8899 if test "x$ac_cv_func_uuid_generate" = xyes; then :
8900   UUID_LIBS=""
8901 else
8902   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
8903 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
8904 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
8905   $as_echo_n "(cached) " >&6
8906 else
8907   ac_check_lib_save_LIBS=$LIBS
8908 LIBS="-luuid  $LIBS"
8909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8910 /* end confdefs.h.  */
8911
8912 /* Override any GCC internal prototype to avoid an error.
8913    Use char because int might match the return type of a GCC
8914    builtin and then its argument prototype would still apply.  */
8915 #ifdef __cplusplus
8916 extern "C"
8917 #endif
8918 char uuid_generate ();
8919 int
8920 main ()
8921 {
8922 return uuid_generate ();
8923   ;
8924   return 0;
8925 }
8926 _ACEOF
8927 if ac_fn_c_try_link "$LINENO"; then :
8928   ac_cv_lib_uuid_uuid_generate=yes
8929 else
8930   ac_cv_lib_uuid_uuid_generate=no
8931 fi
8932 rm -f core conftest.err conftest.$ac_objext \
8933     conftest$ac_exeext conftest.$ac_ext
8934 LIBS=$ac_check_lib_save_LIBS
8935 fi
8936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
8937 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
8938 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
8939   UUID_LIBS="-luuid"
8940 else
8941   as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
8942 fi
8943
8944 fi
8945
8946 elif test "$with_uuid" = ossp ; then
8947   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
8948 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
8949 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
8950   $as_echo_n "(cached) " >&6
8951 else
8952   ac_check_lib_save_LIBS=$LIBS
8953 LIBS="-lossp-uuid  $LIBS"
8954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8955 /* end confdefs.h.  */
8956
8957 /* Override any GCC internal prototype to avoid an error.
8958    Use char because int might match the return type of a GCC
8959    builtin and then its argument prototype would still apply.  */
8960 #ifdef __cplusplus
8961 extern "C"
8962 #endif
8963 char uuid_export ();
8964 int
8965 main ()
8966 {
8967 return uuid_export ();
8968   ;
8969   return 0;
8970 }
8971 _ACEOF
8972 if ac_fn_c_try_link "$LINENO"; then :
8973   ac_cv_lib_ossp_uuid_uuid_export=yes
8974 else
8975   ac_cv_lib_ossp_uuid_uuid_export=no
8976 fi
8977 rm -f core conftest.err conftest.$ac_objext \
8978     conftest$ac_exeext conftest.$ac_ext
8979 LIBS=$ac_check_lib_save_LIBS
8980 fi
8981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
8982 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
8983 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
8984   UUID_LIBS="-lossp-uuid"
8985 else
8986   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
8987 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
8988 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
8989   $as_echo_n "(cached) " >&6
8990 else
8991   ac_check_lib_save_LIBS=$LIBS
8992 LIBS="-luuid  $LIBS"
8993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8994 /* end confdefs.h.  */
8995
8996 /* Override any GCC internal prototype to avoid an error.
8997    Use char because int might match the return type of a GCC
8998    builtin and then its argument prototype would still apply.  */
8999 #ifdef __cplusplus
9000 extern "C"
9001 #endif
9002 char uuid_export ();
9003 int
9004 main ()
9005 {
9006 return uuid_export ();
9007   ;
9008   return 0;
9009 }
9010 _ACEOF
9011 if ac_fn_c_try_link "$LINENO"; then :
9012   ac_cv_lib_uuid_uuid_export=yes
9013 else
9014   ac_cv_lib_uuid_uuid_export=no
9015 fi
9016 rm -f core conftest.err conftest.$ac_objext \
9017     conftest$ac_exeext conftest.$ac_ext
9018 LIBS=$ac_check_lib_save_LIBS
9019 fi
9020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
9021 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
9022 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
9023   UUID_LIBS="-luuid"
9024 else
9025   as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
9026 fi
9027
9028 fi
9029
9030 fi
9031
9032
9033
9034 ##
9035 ## Header files
9036 ##
9037
9038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
9039 $as_echo_n "checking for ANSI C header files... " >&6; }
9040 if ${ac_cv_header_stdc+:} false; then :
9041   $as_echo_n "(cached) " >&6
9042 else
9043   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9044 /* end confdefs.h.  */
9045 #include <stdlib.h>
9046 #include <stdarg.h>
9047 #include <string.h>
9048 #include <float.h>
9049
9050 int
9051 main ()
9052 {
9053
9054   ;
9055   return 0;
9056 }
9057 _ACEOF
9058 if ac_fn_c_try_compile "$LINENO"; then :
9059   ac_cv_header_stdc=yes
9060 else
9061   ac_cv_header_stdc=no
9062 fi
9063 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9064
9065 if test $ac_cv_header_stdc = yes; then
9066   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9067   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9068 /* end confdefs.h.  */
9069 #include <string.h>
9070
9071 _ACEOF
9072 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9073   $EGREP "memchr" >/dev/null 2>&1; then :
9074
9075 else
9076   ac_cv_header_stdc=no
9077 fi
9078 rm -f conftest*
9079
9080 fi
9081
9082 if test $ac_cv_header_stdc = yes; then
9083   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9084   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9085 /* end confdefs.h.  */
9086 #include <stdlib.h>
9087
9088 _ACEOF
9089 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9090   $EGREP "free" >/dev/null 2>&1; then :
9091
9092 else
9093   ac_cv_header_stdc=no
9094 fi
9095 rm -f conftest*
9096
9097 fi
9098
9099 if test $ac_cv_header_stdc = yes; then
9100   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9101   if test "$cross_compiling" = yes; then :
9102   :
9103 else
9104   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9105 /* end confdefs.h.  */
9106 #include <ctype.h>
9107 #include <stdlib.h>
9108 #if ((' ' & 0x0FF) == 0x020)
9109 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9110 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9111 #else
9112 # define ISLOWER(c) \
9113                    (('a' <= (c) && (c) <= 'i') \
9114                      || ('j' <= (c) && (c) <= 'r') \
9115                      || ('s' <= (c) && (c) <= 'z'))
9116 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9117 #endif
9118
9119 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9120 int
9121 main ()
9122 {
9123   int i;
9124   for (i = 0; i < 256; i++)
9125     if (XOR (islower (i), ISLOWER (i))
9126         || toupper (i) != TOUPPER (i))
9127       return 2;
9128   return 0;
9129 }
9130 _ACEOF
9131 if ac_fn_c_try_run "$LINENO"; then :
9132
9133 else
9134   ac_cv_header_stdc=no
9135 fi
9136 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9137   conftest.$ac_objext conftest.beam conftest.$ac_ext
9138 fi
9139
9140 fi
9141 fi
9142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
9143 $as_echo "$ac_cv_header_stdc" >&6; }
9144 if test $ac_cv_header_stdc = yes; then
9145
9146 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
9147
9148 fi
9149
9150 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
9151 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
9152                   inttypes.h stdint.h unistd.h
9153 do :
9154   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9155 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
9156 "
9157 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9158   cat >>confdefs.h <<_ACEOF
9159 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9160 _ACEOF
9161
9162 fi
9163
9164 done
9165
9166
9167 for ac_header in atomic.h crypt.h dld.h fp_class.h getopt.h ieeefp.h ifaddrs.h langinfo.h poll.h pwd.h sys/ioctl.h sys/ipc.h sys/poll.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/socket.h sys/sockio.h sys/tas.h sys/time.h sys/un.h termios.h ucred.h utime.h wchar.h wctype.h
9168 do :
9169   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9170 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9171 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9172   cat >>confdefs.h <<_ACEOF
9173 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9174 _ACEOF
9175
9176 fi
9177
9178 done
9179
9180
9181 # On BSD, test for net/if.h will fail unless sys/socket.h
9182 # is included first.
9183 for ac_header in net/if.h
9184 do :
9185   ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
9186 #ifdef HAVE_SYS_SOCKET_H
9187 #include <sys/socket.h>
9188 #endif
9189
9190 "
9191 if test "x$ac_cv_header_net_if_h" = xyes; then :
9192   cat >>confdefs.h <<_ACEOF
9193 #define HAVE_NET_IF_H 1
9194 _ACEOF
9195
9196 fi
9197
9198 done
9199
9200
9201 # On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
9202 # is included first.
9203 for ac_header in sys/ucred.h
9204 do :
9205   ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
9206 #include <sys/param.h>
9207
9208 "
9209 if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
9210   cat >>confdefs.h <<_ACEOF
9211 #define HAVE_SYS_UCRED_H 1
9212 _ACEOF
9213
9214 fi
9215
9216 done
9217
9218
9219 # At least on IRIX, test for netinet/tcp.h will fail unless
9220 # netinet/in.h is included first.
9221 for ac_header in netinet/in.h
9222 do :
9223   ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
9224 if test "x$ac_cv_header_netinet_in_h" = xyes; then :
9225   cat >>confdefs.h <<_ACEOF
9226 #define HAVE_NETINET_IN_H 1
9227 _ACEOF
9228
9229 fi
9230
9231 done
9232
9233 for ac_header in netinet/tcp.h
9234 do :
9235   ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
9236 #ifdef HAVE_NETINET_IN_H
9237 #include <netinet/in.h>
9238 #endif
9239
9240 "
9241 if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
9242   cat >>confdefs.h <<_ACEOF
9243 #define HAVE_NETINET_TCP_H 1
9244 _ACEOF
9245
9246 fi
9247
9248 done
9249
9250
9251 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
9252   for ac_header in readline/readline.h
9253 do :
9254   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
9255 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
9256   cat >>confdefs.h <<_ACEOF
9257 #define HAVE_READLINE_READLINE_H 1
9258 _ACEOF
9259
9260 else
9261   for ac_header in readline.h
9262 do :
9263   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
9264 if test "x$ac_cv_header_readline_h" = xyes; then :
9265   cat >>confdefs.h <<_ACEOF
9266 #define HAVE_READLINE_H 1
9267 _ACEOF
9268
9269 else
9270   as_fn_error $? "readline header not found
9271 If you have readline already installed, see config.log for details on the
9272 failure.  It is possible the compiler isn't looking in the proper directory.
9273 Use --without-readline to disable readline support." "$LINENO" 5
9274 fi
9275
9276 done
9277
9278 fi
9279
9280 done
9281
9282   for ac_header in readline/history.h
9283 do :
9284   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
9285 if test "x$ac_cv_header_readline_history_h" = xyes; then :
9286   cat >>confdefs.h <<_ACEOF
9287 #define HAVE_READLINE_HISTORY_H 1
9288 _ACEOF
9289
9290 else
9291   for ac_header in history.h
9292 do :
9293   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
9294 if test "x$ac_cv_header_history_h" = xyes; then :
9295   cat >>confdefs.h <<_ACEOF
9296 #define HAVE_HISTORY_H 1
9297 _ACEOF
9298
9299 else
9300   as_fn_error $? "history header not found
9301 If you have readline already installed, see config.log for details on the
9302 failure.  It is possible the compiler isn't looking in the proper directory.
9303 Use --without-readline to disable readline support." "$LINENO" 5
9304 fi
9305
9306 done
9307
9308 fi
9309
9310 done
9311
9312 fi
9313
9314 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
9315 # Some installations of libedit usurp /usr/include/readline/, which seems
9316 # bad practice, since in combined installations readline will have its headers
9317 # there.  We might have to resort to AC_EGREP checks to make sure we found
9318 # the proper header...
9319   for ac_header in editline/readline.h
9320 do :
9321   ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
9322 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
9323   cat >>confdefs.h <<_ACEOF
9324 #define HAVE_EDITLINE_READLINE_H 1
9325 _ACEOF
9326
9327 else
9328   for ac_header in readline.h
9329 do :
9330   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
9331 if test "x$ac_cv_header_readline_h" = xyes; then :
9332   cat >>confdefs.h <<_ACEOF
9333 #define HAVE_READLINE_H 1
9334 _ACEOF
9335
9336 else
9337   for ac_header in readline/readline.h
9338 do :
9339   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
9340 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
9341   cat >>confdefs.h <<_ACEOF
9342 #define HAVE_READLINE_READLINE_H 1
9343 _ACEOF
9344
9345 else
9346   as_fn_error $? "readline header not found
9347 If you have libedit already installed, see config.log for details on the
9348 failure.  It is possible the compiler isn't looking in the proper directory.
9349 Use --without-readline to disable libedit support." "$LINENO" 5
9350 fi
9351
9352 done
9353
9354 fi
9355
9356 done
9357
9358 fi
9359
9360 done
9361
9362 # Note: in a libedit installation, history.h is sometimes a dummy, and may
9363 # not be there at all.  Hence, don't complain if not found.  We must check
9364 # though, since in yet other versions it is an independent header.
9365   for ac_header in editline/history.h
9366 do :
9367   ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
9368 if test "x$ac_cv_header_editline_history_h" = xyes; then :
9369   cat >>confdefs.h <<_ACEOF
9370 #define HAVE_EDITLINE_HISTORY_H 1
9371 _ACEOF
9372
9373 else
9374   for ac_header in history.h
9375 do :
9376   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
9377 if test "x$ac_cv_header_history_h" = xyes; then :
9378   cat >>confdefs.h <<_ACEOF
9379 #define HAVE_HISTORY_H 1
9380 _ACEOF
9381
9382 else
9383   for ac_header in readline/history.h
9384 do :
9385   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
9386 if test "x$ac_cv_header_readline_history_h" = xyes; then :
9387   cat >>confdefs.h <<_ACEOF
9388 #define HAVE_READLINE_HISTORY_H 1
9389 _ACEOF
9390
9391 fi
9392
9393 done
9394
9395 fi
9396
9397 done
9398
9399 fi
9400
9401 done
9402
9403 fi
9404
9405 if test "$with_zlib" = yes; then
9406   ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
9407 if test "x$ac_cv_header_zlib_h" = xyes; then :
9408
9409 else
9410   as_fn_error $? "zlib header not found
9411 If you have zlib already installed, see config.log for details on the
9412 failure.  It is possible the compiler isn't looking in the proper directory.
9413 Use --without-zlib to disable zlib support." "$LINENO" 5
9414 fi
9415
9416
9417 fi
9418
9419 if test "$with_gssapi" = yes ; then
9420   for ac_header in gssapi/gssapi.h
9421 do :
9422   ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
9423 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
9424   cat >>confdefs.h <<_ACEOF
9425 #define HAVE_GSSAPI_GSSAPI_H 1
9426 _ACEOF
9427
9428 else
9429   for ac_header in gssapi.h
9430 do :
9431   ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
9432 if test "x$ac_cv_header_gssapi_h" = xyes; then :
9433   cat >>confdefs.h <<_ACEOF
9434 #define HAVE_GSSAPI_H 1
9435 _ACEOF
9436
9437 else
9438   as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
9439 fi
9440
9441 done
9442
9443 fi
9444
9445 done
9446
9447 fi
9448
9449 if test "$with_openssl" = yes ; then
9450   ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
9451 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
9452
9453 else
9454   as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
9455 fi
9456
9457
9458   ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
9459 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
9460
9461 else
9462   as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
9463 fi
9464
9465
9466 fi
9467
9468 if test "$with_pam" = yes ; then
9469   for ac_header in security/pam_appl.h
9470 do :
9471   ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
9472 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
9473   cat >>confdefs.h <<_ACEOF
9474 #define HAVE_SECURITY_PAM_APPL_H 1
9475 _ACEOF
9476
9477 else
9478   for ac_header in pam/pam_appl.h
9479 do :
9480   ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
9481 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
9482   cat >>confdefs.h <<_ACEOF
9483 #define HAVE_PAM_PAM_APPL_H 1
9484 _ACEOF
9485
9486 else
9487   as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
9488 fi
9489
9490 done
9491
9492 fi
9493
9494 done
9495
9496 fi
9497
9498 if test "$with_libxml" = yes ; then
9499   ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
9500 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
9501
9502 else
9503   as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
9504 fi
9505
9506
9507 fi
9508
9509 if test "$with_libxslt" = yes ; then
9510   ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
9511 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
9512
9513 else
9514   as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
9515 fi
9516
9517
9518 fi
9519
9520 if test "$with_ldap" = yes ; then
9521   if test "$PORTNAME" != "win32"; then
9522      for ac_header in ldap.h
9523 do :
9524   ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
9525 if test "x$ac_cv_header_ldap_h" = xyes; then :
9526   cat >>confdefs.h <<_ACEOF
9527 #define HAVE_LDAP_H 1
9528 _ACEOF
9529
9530 else
9531   as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
9532 fi
9533
9534 done
9535
9536      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
9537 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
9538 if ${pgac_cv_ldap_safe+:} false; then :
9539   $as_echo_n "(cached) " >&6
9540 else
9541   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9542 /* end confdefs.h.  */
9543 #include <ldap.h>
9544 #if !defined(LDAP_VENDOR_VERSION) || \
9545      (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
9546       LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
9547 choke me
9548 #endif
9549 int
9550 main ()
9551 {
9552
9553   ;
9554   return 0;
9555 }
9556 _ACEOF
9557 if ac_fn_c_try_compile "$LINENO"; then :
9558   pgac_cv_ldap_safe=yes
9559 else
9560   pgac_cv_ldap_safe=no
9561 fi
9562 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9563 fi
9564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
9565 $as_echo "$pgac_cv_ldap_safe" >&6; }
9566
9567 if test "$pgac_cv_ldap_safe" != yes; then
9568   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9569 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
9570 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
9571 *** also uses LDAP will crash on exit." >&5
9572 $as_echo "$as_me: WARNING:
9573 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
9574 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
9575 *** also uses LDAP will crash on exit." >&2;}
9576 fi
9577   else
9578      for ac_header in winldap.h
9579 do :
9580   ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
9581 #include <windows.h>
9582
9583 "
9584 if test "x$ac_cv_header_winldap_h" = xyes; then :
9585   cat >>confdefs.h <<_ACEOF
9586 #define HAVE_WINLDAP_H 1
9587 _ACEOF
9588
9589 else
9590   as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
9591 fi
9592
9593 done
9594
9595   fi
9596 fi
9597
9598 if test "$with_bonjour" = yes ; then
9599   ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
9600 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
9601
9602 else
9603   as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
9604 fi
9605
9606
9607 fi
9608
9609 # for contrib/uuid-ossp
9610 if test "$with_uuid" = bsd ; then
9611   for ac_header in uuid.h
9612 do :
9613   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
9614 if test "x$ac_cv_header_uuid_h" = xyes; then :
9615   cat >>confdefs.h <<_ACEOF
9616 #define HAVE_UUID_H 1
9617 _ACEOF
9618  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9619 /* end confdefs.h.  */
9620 #include <uuid.h>
9621
9622 _ACEOF
9623 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9624   $EGREP "uuid_to_string" >/dev/null 2>&1; then :
9625
9626 else
9627   as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
9628 fi
9629 rm -f conftest*
9630
9631 else
9632   as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
9633 fi
9634
9635 done
9636
9637 elif test "$with_uuid" = e2fs ; then
9638   for ac_header in uuid/uuid.h
9639 do :
9640   ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
9641 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
9642   cat >>confdefs.h <<_ACEOF
9643 #define HAVE_UUID_UUID_H 1
9644 _ACEOF
9645  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9646 /* end confdefs.h.  */
9647 #include <uuid/uuid.h>
9648
9649 _ACEOF
9650 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9651   $EGREP "uuid_generate" >/dev/null 2>&1; then :
9652
9653 else
9654   as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
9655 fi
9656 rm -f conftest*
9657
9658 else
9659   for ac_header in uuid.h
9660 do :
9661   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
9662 if test "x$ac_cv_header_uuid_h" = xyes; then :
9663   cat >>confdefs.h <<_ACEOF
9664 #define HAVE_UUID_H 1
9665 _ACEOF
9666  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9667 /* end confdefs.h.  */
9668 #include <uuid.h>
9669
9670 _ACEOF
9671 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9672   $EGREP "uuid_generate" >/dev/null 2>&1; then :
9673
9674 else
9675   as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
9676 fi
9677 rm -f conftest*
9678
9679 else
9680   as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
9681 fi
9682
9683 done
9684
9685 fi
9686
9687 done
9688
9689 elif test "$with_uuid" = ossp ; then
9690   for ac_header in ossp/uuid.h
9691 do :
9692   ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
9693 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
9694   cat >>confdefs.h <<_ACEOF
9695 #define HAVE_OSSP_UUID_H 1
9696 _ACEOF
9697  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9698 /* end confdefs.h.  */
9699 #include <ossp/uuid.h>
9700
9701 _ACEOF
9702 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9703   $EGREP "uuid_export" >/dev/null 2>&1; then :
9704
9705 else
9706   as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
9707 fi
9708 rm -f conftest*
9709
9710 else
9711   for ac_header in uuid.h
9712 do :
9713   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
9714 if test "x$ac_cv_header_uuid_h" = xyes; then :
9715   cat >>confdefs.h <<_ACEOF
9716 #define HAVE_UUID_H 1
9717 _ACEOF
9718  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9719 /* end confdefs.h.  */
9720 #include <uuid.h>
9721
9722 _ACEOF
9723 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9724   $EGREP "uuid_export" >/dev/null 2>&1; then :
9725
9726 else
9727   as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
9728 fi
9729 rm -f conftest*
9730
9731 else
9732   as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
9733 fi
9734
9735 done
9736
9737 fi
9738
9739 done
9740
9741 fi
9742
9743 if test "$PORTNAME" = "win32" ; then
9744    for ac_header in crtdefs.h
9745 do :
9746   ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
9747 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
9748   cat >>confdefs.h <<_ACEOF
9749 #define HAVE_CRTDEFS_H 1
9750 _ACEOF
9751
9752 fi
9753
9754 done
9755
9756 fi
9757
9758 ##
9759 ## Types, structures, compiler characteristics
9760 ##
9761
9762   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
9763 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
9764 if ${ac_cv_c_bigendian+:} false; then :
9765   $as_echo_n "(cached) " >&6
9766 else
9767   ac_cv_c_bigendian=unknown
9768     # See if we're dealing with a universal compiler.
9769     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9770 /* end confdefs.h.  */
9771 #ifndef __APPLE_CC__
9772                not a universal capable compiler
9773              #endif
9774              typedef int dummy;
9775
9776 _ACEOF
9777 if ac_fn_c_try_compile "$LINENO"; then :
9778
9779         # Check for potential -arch flags.  It is not universal unless
9780         # there are at least two -arch flags with different values.
9781         ac_arch=
9782         ac_prev=
9783         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
9784          if test -n "$ac_prev"; then
9785            case $ac_word in
9786              i?86 | x86_64 | ppc | ppc64)
9787                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
9788                  ac_arch=$ac_word
9789                else
9790                  ac_cv_c_bigendian=universal
9791                  break
9792                fi
9793                ;;
9794            esac
9795            ac_prev=
9796          elif test "x$ac_word" = "x-arch"; then
9797            ac_prev=arch
9798          fi
9799        done
9800 fi
9801 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9802     if test $ac_cv_c_bigendian = unknown; then
9803       # See if sys/param.h defines the BYTE_ORDER macro.
9804       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9805 /* end confdefs.h.  */
9806 #include <sys/types.h>
9807              #include <sys/param.h>
9808
9809 int
9810 main ()
9811 {
9812 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
9813                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
9814                      && LITTLE_ENDIAN)
9815               bogus endian macros
9816              #endif
9817
9818   ;
9819   return 0;
9820 }
9821 _ACEOF
9822 if ac_fn_c_try_compile "$LINENO"; then :
9823   # It does; now see whether it defined to BIG_ENDIAN or not.
9824          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9825 /* end confdefs.h.  */
9826 #include <sys/types.h>
9827                 #include <sys/param.h>
9828
9829 int
9830 main ()
9831 {
9832 #if BYTE_ORDER != BIG_ENDIAN
9833                  not big endian
9834                 #endif
9835
9836   ;
9837   return 0;
9838 }
9839 _ACEOF
9840 if ac_fn_c_try_compile "$LINENO"; then :
9841   ac_cv_c_bigendian=yes
9842 else
9843   ac_cv_c_bigendian=no
9844 fi
9845 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9846 fi
9847 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9848     fi
9849     if test $ac_cv_c_bigendian = unknown; then
9850       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
9851       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9852 /* end confdefs.h.  */
9853 #include <limits.h>
9854
9855 int
9856 main ()
9857 {
9858 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
9859               bogus endian macros
9860              #endif
9861
9862   ;
9863   return 0;
9864 }
9865 _ACEOF
9866 if ac_fn_c_try_compile "$LINENO"; then :
9867   # It does; now see whether it defined to _BIG_ENDIAN or not.
9868          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9869 /* end confdefs.h.  */
9870 #include <limits.h>
9871
9872 int
9873 main ()
9874 {
9875 #ifndef _BIG_ENDIAN
9876                  not big endian
9877                 #endif
9878
9879   ;
9880   return 0;
9881 }
9882 _ACEOF
9883 if ac_fn_c_try_compile "$LINENO"; then :
9884   ac_cv_c_bigendian=yes
9885 else
9886   ac_cv_c_bigendian=no
9887 fi
9888 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9889 fi
9890 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9891     fi
9892     if test $ac_cv_c_bigendian = unknown; then
9893       # Compile a test program.
9894       if test "$cross_compiling" = yes; then :
9895   # Try to guess by grepping values from an object file.
9896          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9897 /* end confdefs.h.  */
9898 short int ascii_mm[] =
9899                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
9900                 short int ascii_ii[] =
9901                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9902                 int use_ascii (int i) {
9903                   return ascii_mm[i] + ascii_ii[i];
9904                 }
9905                 short int ebcdic_ii[] =
9906                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
9907                 short int ebcdic_mm[] =
9908                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9909                 int use_ebcdic (int i) {
9910                   return ebcdic_mm[i] + ebcdic_ii[i];
9911                 }
9912                 extern int foo;
9913
9914 int
9915 main ()
9916 {
9917 return use_ascii (foo) == use_ebcdic (foo);
9918   ;
9919   return 0;
9920 }
9921 _ACEOF
9922 if ac_fn_c_try_compile "$LINENO"; then :
9923   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
9924               ac_cv_c_bigendian=yes
9925             fi
9926             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
9927               if test "$ac_cv_c_bigendian" = unknown; then
9928                 ac_cv_c_bigendian=no
9929               else
9930                 # finding both strings is unlikely to happen, but who knows?
9931                 ac_cv_c_bigendian=unknown
9932               fi
9933             fi
9934 fi
9935 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9936 else
9937   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9938 /* end confdefs.h.  */
9939 $ac_includes_default
9940 int
9941 main ()
9942 {
9943
9944              /* Are we little or big endian?  From Harbison&Steele.  */
9945              union
9946              {
9947                long int l;
9948                char c[sizeof (long int)];
9949              } u;
9950              u.l = 1;
9951              return u.c[sizeof (long int) - 1] == 1;
9952
9953   ;
9954   return 0;
9955 }
9956 _ACEOF
9957 if ac_fn_c_try_run "$LINENO"; then :
9958   ac_cv_c_bigendian=no
9959 else
9960   ac_cv_c_bigendian=yes
9961 fi
9962 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9963   conftest.$ac_objext conftest.beam conftest.$ac_ext
9964 fi
9965
9966     fi
9967 fi
9968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
9969 $as_echo "$ac_cv_c_bigendian" >&6; }
9970  case $ac_cv_c_bigendian in #(
9971    yes)
9972      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
9973 ;; #(
9974    no)
9975       ;; #(
9976    universal)
9977
9978 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
9979
9980      ;; #(
9981    *)
9982      as_fn_error $? "unknown endianness
9983  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
9984  esac
9985
9986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
9987 $as_echo_n "checking for inline... " >&6; }
9988 if ${ac_cv_c_inline+:} false; then :
9989   $as_echo_n "(cached) " >&6
9990 else
9991   ac_cv_c_inline=no
9992 for ac_kw in inline __inline__ __inline; do
9993   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9994 /* end confdefs.h.  */
9995 #ifndef __cplusplus
9996 typedef int foo_t;
9997 static $ac_kw foo_t static_foo () {return 0; }
9998 $ac_kw foo_t foo () {return 0; }
9999 #endif
10000
10001 _ACEOF
10002 if ac_fn_c_try_compile "$LINENO"; then :
10003   ac_cv_c_inline=$ac_kw
10004 fi
10005 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10006   test "$ac_cv_c_inline" != no && break
10007 done
10008
10009 fi
10010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
10011 $as_echo "$ac_cv_c_inline" >&6; }
10012
10013 case $ac_cv_c_inline in
10014   inline | yes) ;;
10015   *)
10016     case $ac_cv_c_inline in
10017       no) ac_val=;;
10018       *) ac_val=$ac_cv_c_inline;;
10019     esac
10020     cat >>confdefs.h <<_ACEOF
10021 #ifndef __cplusplus
10022 #define inline $ac_val
10023 #endif
10024 _ACEOF
10025     ;;
10026 esac
10027
10028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for quiet inline (no complaint if unreferenced)" >&5
10029 $as_echo_n "checking for quiet inline (no complaint if unreferenced)... " >&6; }
10030 if ${pgac_cv_c_inline_quietly+:} false; then :
10031   $as_echo_n "(cached) " >&6
10032 else
10033   pgac_cv_c_inline_quietly=no
10034   if test "$ac_cv_c_inline" != no; then
10035     pgac_c_inline_save_werror=$ac_c_werror_flag
10036     ac_c_werror_flag=yes
10037     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10038 /* end confdefs.h.  */
10039 #include "$srcdir/config/test_quiet_include.h"
10040 int
10041 main ()
10042 {
10043
10044   ;
10045   return 0;
10046 }
10047 _ACEOF
10048 if ac_fn_c_try_link "$LINENO"; then :
10049   pgac_cv_c_inline_quietly=yes
10050 fi
10051 rm -f core conftest.err conftest.$ac_objext \
10052     conftest$ac_exeext conftest.$ac_ext
10053     ac_c_werror_flag=$pgac_c_inline_save_werror
10054   fi
10055 fi
10056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_inline_quietly" >&5
10057 $as_echo "$pgac_cv_c_inline_quietly" >&6; }
10058 if test "$pgac_cv_c_inline_quietly" != no; then
10059
10060 cat >>confdefs.h <<_ACEOF
10061 #define PG_USE_INLINE 1
10062 _ACEOF
10063
10064 fi
10065
10066
10067   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array members" >&5
10068 $as_echo_n "checking for flexible array members... " >&6; }
10069 if ${ac_cv_c_flexmember+:} false; then :
10070   $as_echo_n "(cached) " >&6
10071 else
10072   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10073 /* end confdefs.h.  */
10074 #include <stdlib.h>
10075             #include <stdio.h>
10076             #include <stddef.h>
10077             struct s { int n; double d[]; };
10078 int
10079 main ()
10080 {
10081 int m = getchar ();
10082             struct s *p = malloc (offsetof (struct s, d)
10083                                   + m * sizeof (double));
10084             p->d[0] = 0.0;
10085             return p->d != (double *) NULL;
10086   ;
10087   return 0;
10088 }
10089 _ACEOF
10090 if ac_fn_c_try_compile "$LINENO"; then :
10091   ac_cv_c_flexmember=yes
10092 else
10093   ac_cv_c_flexmember=no
10094 fi
10095 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10096 fi
10097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
10098 $as_echo "$ac_cv_c_flexmember" >&6; }
10099   if test $ac_cv_c_flexmember = yes; then
10100
10101 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
10102
10103   else
10104     $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
10105
10106   fi
10107
10108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed types" >&5
10109 $as_echo_n "checking for signed types... " >&6; }
10110 if ${pgac_cv_c_signed+:} false; then :
10111   $as_echo_n "(cached) " >&6
10112 else
10113   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10114 /* end confdefs.h.  */
10115
10116 int
10117 main ()
10118 {
10119 signed char c; signed short s; signed int i;
10120   ;
10121   return 0;
10122 }
10123 _ACEOF
10124 if ac_fn_c_try_compile "$LINENO"; then :
10125   pgac_cv_c_signed=yes
10126 else
10127   pgac_cv_c_signed=no
10128 fi
10129 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10130 fi
10131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_signed" >&5
10132 $as_echo "$pgac_cv_c_signed" >&6; }
10133 if test x"$pgac_cv_c_signed" = xno ; then
10134
10135 $as_echo "#define signed /**/" >>confdefs.h
10136
10137 fi
10138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5
10139 $as_echo_n "checking for __func__... " >&6; }
10140 if ${pgac_cv_funcname_func_support+:} false; then :
10141   $as_echo_n "(cached) " >&6
10142 else
10143   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10144 /* end confdefs.h.  */
10145 #include <stdio.h>
10146 int
10147 main ()
10148 {
10149 printf("%s\n", __func__);
10150   ;
10151   return 0;
10152 }
10153 _ACEOF
10154 if ac_fn_c_try_compile "$LINENO"; then :
10155   pgac_cv_funcname_func_support=yes
10156 else
10157   pgac_cv_funcname_func_support=no
10158 fi
10159 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10160 fi
10161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_func_support" >&5
10162 $as_echo "$pgac_cv_funcname_func_support" >&6; }
10163 if test x"$pgac_cv_funcname_func_support" = xyes ; then
10164
10165 $as_echo "#define HAVE_FUNCNAME__FUNC 1" >>confdefs.h
10166
10167 else
10168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__" >&5
10169 $as_echo_n "checking for __FUNCTION__... " >&6; }
10170 if ${pgac_cv_funcname_function_support+:} false; then :
10171   $as_echo_n "(cached) " >&6
10172 else
10173   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10174 /* end confdefs.h.  */
10175 #include <stdio.h>
10176 int
10177 main ()
10178 {
10179 printf("%s\n", __FUNCTION__);
10180   ;
10181   return 0;
10182 }
10183 _ACEOF
10184 if ac_fn_c_try_compile "$LINENO"; then :
10185   pgac_cv_funcname_function_support=yes
10186 else
10187   pgac_cv_funcname_function_support=no
10188 fi
10189 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10190 fi
10191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_function_support" >&5
10192 $as_echo "$pgac_cv_funcname_function_support" >&6; }
10193 if test x"$pgac_cv_funcname_function_support" = xyes ; then
10194
10195 $as_echo "#define HAVE_FUNCNAME__FUNCTION 1" >>confdefs.h
10196
10197 fi
10198 fi
10199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
10200 $as_echo_n "checking for _Static_assert... " >&6; }
10201 if ${pgac_cv__static_assert+:} false; then :
10202   $as_echo_n "(cached) " >&6
10203 else
10204   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10205 /* end confdefs.h.  */
10206
10207 int
10208 main ()
10209 {
10210 ({ _Static_assert(1, "foo"); })
10211   ;
10212   return 0;
10213 }
10214 _ACEOF
10215 if ac_fn_c_try_link "$LINENO"; then :
10216   pgac_cv__static_assert=yes
10217 else
10218   pgac_cv__static_assert=no
10219 fi
10220 rm -f core conftest.err conftest.$ac_objext \
10221     conftest$ac_exeext conftest.$ac_ext
10222 fi
10223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
10224 $as_echo "$pgac_cv__static_assert" >&6; }
10225 if test x"$pgac_cv__static_assert" = xyes ; then
10226
10227 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
10228
10229 fi
10230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
10231 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
10232 if ${pgac_cv__types_compatible+:} false; then :
10233   $as_echo_n "(cached) " >&6
10234 else
10235   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10236 /* end confdefs.h.  */
10237
10238 int
10239 main ()
10240 {
10241  int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
10242   ;
10243   return 0;
10244 }
10245 _ACEOF
10246 if ac_fn_c_try_compile "$LINENO"; then :
10247   pgac_cv__types_compatible=yes
10248 else
10249   pgac_cv__types_compatible=no
10250 fi
10251 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10252 fi
10253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
10254 $as_echo "$pgac_cv__types_compatible" >&6; }
10255 if test x"$pgac_cv__types_compatible" = xyes ; then
10256
10257 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
10258
10259 fi
10260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
10261 $as_echo_n "checking for __builtin_constant_p... " >&6; }
10262 if ${pgac_cv__builtin_constant_p+:} false; then :
10263   $as_echo_n "(cached) " >&6
10264 else
10265   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10266 /* end confdefs.h.  */
10267 static int x; static int y[__builtin_constant_p(x) ? x : 1];
10268 int
10269 main ()
10270 {
10271
10272   ;
10273   return 0;
10274 }
10275 _ACEOF
10276 if ac_fn_c_try_compile "$LINENO"; then :
10277   pgac_cv__builtin_constant_p=yes
10278 else
10279   pgac_cv__builtin_constant_p=no
10280 fi
10281 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10282 fi
10283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
10284 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
10285 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
10286
10287 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
10288
10289 fi
10290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
10291 $as_echo_n "checking for __builtin_unreachable... " >&6; }
10292 if ${pgac_cv__builtin_unreachable+:} false; then :
10293   $as_echo_n "(cached) " >&6
10294 else
10295   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10296 /* end confdefs.h.  */
10297
10298 int
10299 main ()
10300 {
10301 __builtin_unreachable();
10302   ;
10303   return 0;
10304 }
10305 _ACEOF
10306 if ac_fn_c_try_link "$LINENO"; then :
10307   pgac_cv__builtin_unreachable=yes
10308 else
10309   pgac_cv__builtin_unreachable=no
10310 fi
10311 rm -f core conftest.err conftest.$ac_objext \
10312     conftest$ac_exeext conftest.$ac_ext
10313 fi
10314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
10315 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
10316 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
10317
10318 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
10319
10320 fi
10321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __VA_ARGS__" >&5
10322 $as_echo_n "checking for __VA_ARGS__... " >&6; }
10323 if ${pgac_cv__va_args+:} false; then :
10324   $as_echo_n "(cached) " >&6
10325 else
10326   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10327 /* end confdefs.h.  */
10328 #include <stdio.h>
10329 int
10330 main ()
10331 {
10332 #define debug(...) fprintf(stderr, __VA_ARGS__)
10333 debug("%s", "blarg");
10334
10335   ;
10336   return 0;
10337 }
10338 _ACEOF
10339 if ac_fn_c_try_compile "$LINENO"; then :
10340   pgac_cv__va_args=yes
10341 else
10342   pgac_cv__va_args=no
10343 fi
10344 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10345 fi
10346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__va_args" >&5
10347 $as_echo "$pgac_cv__va_args" >&6; }
10348 if test x"$pgac_cv__va_args" = xyes ; then
10349
10350 $as_echo "#define HAVE__VA_ARGS 1" >>confdefs.h
10351
10352 fi
10353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10354 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
10355 if ${ac_cv_struct_tm+:} false; then :
10356   $as_echo_n "(cached) " >&6
10357 else
10358   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10359 /* end confdefs.h.  */
10360 #include <sys/types.h>
10361 #include <time.h>
10362
10363 int
10364 main ()
10365 {
10366 struct tm tm;
10367                                      int *p = &tm.tm_sec;
10368                                      return !p;
10369   ;
10370   return 0;
10371 }
10372 _ACEOF
10373 if ac_fn_c_try_compile "$LINENO"; then :
10374   ac_cv_struct_tm=time.h
10375 else
10376   ac_cv_struct_tm=sys/time.h
10377 fi
10378 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10379 fi
10380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10381 $as_echo "$ac_cv_struct_tm" >&6; }
10382 if test $ac_cv_struct_tm = sys/time.h; then
10383
10384 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
10385
10386 fi
10387
10388 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
10389 #include <$ac_cv_struct_tm>
10390
10391 "
10392 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
10393
10394 cat >>confdefs.h <<_ACEOF
10395 #define HAVE_STRUCT_TM_TM_ZONE 1
10396 _ACEOF
10397
10398
10399 fi
10400
10401 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10402
10403 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
10404
10405 fi
10406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10407 $as_echo_n "checking for tzname... " >&6; }
10408 if ${ac_cv_var_tzname+:} false; then :
10409   $as_echo_n "(cached) " >&6
10410 else
10411   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10412 /* end confdefs.h.  */
10413 #include <time.h>
10414 #ifndef tzname /* For SGI.  */
10415 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
10416 #endif
10417
10418 int
10419 main ()
10420 {
10421 atoi(*tzname);
10422   ;
10423   return 0;
10424 }
10425 _ACEOF
10426 if ac_fn_c_try_link "$LINENO"; then :
10427   ac_cv_var_tzname=yes
10428 else
10429   ac_cv_var_tzname=no
10430 fi
10431 rm -f core conftest.err conftest.$ac_objext \
10432     conftest$ac_exeext conftest.$ac_ext
10433 fi
10434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10435 $as_echo "$ac_cv_var_tzname" >&6; }
10436 if test $ac_cv_var_tzname = yes; then
10437
10438 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
10439
10440 fi
10441
10442 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
10443 #include <sys/ipc.h>
10444 #include <sys/sem.h>
10445 "
10446 if test "x$ac_cv_type_union_semun" = xyes; then :
10447
10448 cat >>confdefs.h <<_ACEOF
10449 #define HAVE_UNION_SEMUN 1
10450 _ACEOF
10451
10452
10453 fi
10454
10455 ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
10456 #ifdef HAVE_SYS_UN_H
10457 #include <sys/un.h>
10458 #endif
10459
10460 "
10461 if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
10462
10463 $as_echo "#define HAVE_UNIX_SOCKETS 1" >>confdefs.h
10464
10465 fi
10466
10467 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
10468 #ifdef HAVE_SYS_SOCKET_H
10469 #include <sys/socket.h>
10470 #endif
10471
10472 "
10473 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
10474
10475 cat >>confdefs.h <<_ACEOF
10476 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
10477 _ACEOF
10478
10479
10480 fi
10481
10482 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
10483 #ifdef HAVE_SYS_SOCKET_H
10484 #include <sys/socket.h>
10485 #endif
10486
10487 "
10488 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
10489
10490 cat >>confdefs.h <<_ACEOF
10491 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
10492 _ACEOF
10493
10494
10495 fi
10496 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
10497 #ifdef HAVE_SYS_SOCKET_H
10498 #include <sys/socket.h>
10499 #endif
10500
10501 "
10502 if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
10503
10504 cat >>confdefs.h <<_ACEOF
10505 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
10506 _ACEOF
10507
10508
10509 fi
10510 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
10511 #ifdef HAVE_SYS_SOCKET_H
10512 #include <sys/socket.h>
10513 #endif
10514
10515 "
10516 if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
10517
10518 cat >>confdefs.h <<_ACEOF
10519 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
10520 _ACEOF
10521
10522
10523 fi
10524 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
10525 #ifdef HAVE_SYS_SOCKET_H
10526 #include <sys/socket.h>
10527 #endif
10528
10529 "
10530 if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
10531
10532 cat >>confdefs.h <<_ACEOF
10533 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
10534 _ACEOF
10535
10536
10537 fi
10538 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
10539 #ifdef HAVE_SYS_SOCKET_H
10540 #include <sys/socket.h>
10541 #endif
10542
10543 "
10544 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
10545
10546 cat >>confdefs.h <<_ACEOF
10547 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
10548 _ACEOF
10549
10550
10551 fi
10552
10553 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include <sys/types.h>
10554 #include <sys/socket.h>
10555 #include <netdb.h>
10556
10557 "
10558 if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
10559
10560 cat >>confdefs.h <<_ACEOF
10561 #define HAVE_STRUCT_ADDRINFO 1
10562 _ACEOF
10563
10564
10565 fi
10566
10567
10568   ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
10569 if test "x$ac_cv_type_intptr_t" = xyes; then :
10570
10571 $as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
10572
10573 else
10574   for ac_type in 'int' 'long int' 'long long int'; do
10575        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10576 /* end confdefs.h.  */
10577 $ac_includes_default
10578 int
10579 main ()
10580 {
10581 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
10582 test_array [0] = 0;
10583 return test_array [0];
10584
10585   ;
10586   return 0;
10587 }
10588 _ACEOF
10589 if ac_fn_c_try_compile "$LINENO"; then :
10590
10591 cat >>confdefs.h <<_ACEOF
10592 #define intptr_t $ac_type
10593 _ACEOF
10594
10595           ac_type=
10596 fi
10597 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10598        test -z "$ac_type" && break
10599      done
10600 fi
10601
10602
10603
10604   ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
10605 if test "x$ac_cv_type_uintptr_t" = xyes; then :
10606
10607 $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
10608
10609 else
10610   for ac_type in 'unsigned int' 'unsigned long int' \
10611         'unsigned long long int'; do
10612        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10613 /* end confdefs.h.  */
10614 $ac_includes_default
10615 int
10616 main ()
10617 {
10618 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
10619 test_array [0] = 0;
10620 return test_array [0];
10621
10622   ;
10623   return 0;
10624 }
10625 _ACEOF
10626 if ac_fn_c_try_compile "$LINENO"; then :
10627
10628 cat >>confdefs.h <<_ACEOF
10629 #define uintptr_t $ac_type
10630 _ACEOF
10631
10632           ac_type=
10633 fi
10634 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10635        test -z "$ac_type" && break
10636      done
10637 fi
10638
10639
10640
10641   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
10642 $as_echo_n "checking for unsigned long long int... " >&6; }
10643 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
10644   $as_echo_n "(cached) " >&6
10645 else
10646   ac_cv_type_unsigned_long_long_int=yes
10647      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
10648        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10649 /* end confdefs.h.  */
10650
10651   /* For now, do not test the preprocessor; as of 2007 there are too many
10652          implementations with broken preprocessors.  Perhaps this can
10653          be revisited in 2012.  In the meantime, code should not expect
10654          #if to work with literals wider than 32 bits.  */
10655       /* Test literals.  */
10656       long long int ll = 9223372036854775807ll;
10657       long long int nll = -9223372036854775807LL;
10658       unsigned long long int ull = 18446744073709551615ULL;
10659       /* Test constant expressions.   */
10660       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
10661                      ? 1 : -1)];
10662       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
10663                      ? 1 : -1)];
10664       int i = 63;
10665 int
10666 main ()
10667 {
10668 /* Test availability of runtime routines for shift and division.  */
10669       long long int llmax = 9223372036854775807ll;
10670       unsigned long long int ullmax = 18446744073709551615ull;
10671       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
10672               | (llmax / ll) | (llmax % ll)
10673               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
10674               | (ullmax / ull) | (ullmax % ull));
10675   ;
10676   return 0;
10677 }
10678
10679 _ACEOF
10680 if ac_fn_c_try_link "$LINENO"; then :
10681
10682 else
10683   ac_cv_type_unsigned_long_long_int=no
10684 fi
10685 rm -f core conftest.err conftest.$ac_objext \
10686     conftest$ac_exeext conftest.$ac_ext
10687      fi
10688 fi
10689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
10690 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
10691   if test $ac_cv_type_unsigned_long_long_int = yes; then
10692
10693 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
10694
10695   fi
10696
10697
10698
10699   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
10700 $as_echo_n "checking for long long int... " >&6; }
10701 if ${ac_cv_type_long_long_int+:} false; then :
10702   $as_echo_n "(cached) " >&6
10703 else
10704   ac_cv_type_long_long_int=yes
10705       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
10706         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
10707         if test $ac_cv_type_long_long_int = yes; then
10708                                   if test "$cross_compiling" = yes; then :
10709   :
10710 else
10711   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10712 /* end confdefs.h.  */
10713 #include <limits.h>
10714                  #ifndef LLONG_MAX
10715                  # define HALF \
10716                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
10717                  # define LLONG_MAX (HALF - 1 + HALF)
10718                  #endif
10719 int
10720 main ()
10721 {
10722 long long int n = 1;
10723                  int i;
10724                  for (i = 0; ; i++)
10725                    {
10726                      long long int m = n << i;
10727                      if (m >> i != n)
10728                        return 1;
10729                      if (LLONG_MAX / 2 < m)
10730                        break;
10731                    }
10732                  return 0;
10733   ;
10734   return 0;
10735 }
10736 _ACEOF
10737 if ac_fn_c_try_run "$LINENO"; then :
10738
10739 else
10740   ac_cv_type_long_long_int=no
10741 fi
10742 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10743   conftest.$ac_objext conftest.beam conftest.$ac_ext
10744 fi
10745
10746         fi
10747       fi
10748 fi
10749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
10750 $as_echo "$ac_cv_type_long_long_int" >&6; }
10751   if test $ac_cv_type_long_long_int = yes; then
10752
10753 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
10754
10755   fi
10756
10757
10758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
10759 $as_echo_n "checking for locale_t... " >&6; }
10760 if ${pgac_cv_type_locale_t+:} false; then :
10761   $as_echo_n "(cached) " >&6
10762 else
10763   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10764 /* end confdefs.h.  */
10765 #include <locale.h>
10766 locale_t x;
10767 int
10768 main ()
10769 {
10770
10771   ;
10772   return 0;
10773 }
10774 _ACEOF
10775 if ac_fn_c_try_compile "$LINENO"; then :
10776   pgac_cv_type_locale_t=yes
10777 else
10778   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10779 /* end confdefs.h.  */
10780 #include <xlocale.h>
10781 locale_t x;
10782 int
10783 main ()
10784 {
10785
10786   ;
10787   return 0;
10788 }
10789 _ACEOF
10790 if ac_fn_c_try_compile "$LINENO"; then :
10791   pgac_cv_type_locale_t='yes (in xlocale.h)'
10792 else
10793   pgac_cv_type_locale_t=no
10794 fi
10795 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10796 fi
10797 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10798 fi
10799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
10800 $as_echo "$pgac_cv_type_locale_t" >&6; }
10801 if test "$pgac_cv_type_locale_t" != no; then
10802
10803 $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
10804
10805 fi
10806 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
10807
10808 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
10809
10810 fi
10811
10812 ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
10813 #include <sys/param.h>
10814 #ifdef HAVE_SYS_UCRED_H
10815 #include <sys/ucred.h>
10816 #endif
10817 "
10818 if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
10819
10820 cat >>confdefs.h <<_ACEOF
10821 #define HAVE_STRUCT_CMSGCRED 1
10822 _ACEOF
10823
10824
10825 fi
10826
10827
10828 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
10829 #include <getopt.h>
10830 #endif
10831 "
10832 if test "x$ac_cv_type_struct_option" = xyes; then :
10833
10834 cat >>confdefs.h <<_ACEOF
10835 #define HAVE_STRUCT_OPTION 1
10836 _ACEOF
10837
10838
10839 fi
10840
10841
10842 if test "$with_zlib" = yes; then
10843   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
10844   # did not).  While we could work around the lack of z_streamp, it
10845   # seems unwise to encourage people to use such old zlib versions...
10846   ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
10847 "
10848 if test "x$ac_cv_type_z_streamp" = xyes; then :
10849
10850 else
10851   as_fn_error $? "zlib version is too old
10852 Use --without-zlib to disable zlib support." "$LINENO" 5
10853 fi
10854
10855 fi
10856
10857 # On PPC, check if assembler supports LWARX instruction's mutex hint bit
10858 case $host_cpu in
10859   ppc*|powerpc*)
10860     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports lwarx hint bit" >&5
10861 $as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
10862     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10863 /* end confdefs.h.  */
10864
10865 int
10866 main ()
10867 {
10868 int a = 0; int *p = &a; int r;
10869          __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
10870   ;
10871   return 0;
10872 }
10873 _ACEOF
10874 if ac_fn_c_try_compile "$LINENO"; then :
10875   pgac_cv_have_ppc_mutex_hint=yes
10876 else
10877   pgac_cv_have_ppc_mutex_hint=no
10878 fi
10879 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10880     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_ppc_mutex_hint" >&5
10881 $as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
10882     if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
10883
10884 $as_echo "#define HAVE_PPC_LWARX_MUTEX_HINT 1" >>confdefs.h
10885
10886     fi
10887   ;;
10888 esac
10889
10890 # Check largefile support.  You might think this is a system service not a
10891 # compiler characteristic, but you'd be wrong.  We must check this before
10892 # probing existence of related functions such as fseeko, since the largefile
10893 # defines can affect what is generated for that.
10894 if test "$PORTNAME" != "win32"; then
10895    # Check whether --enable-largefile was given.
10896 if test "${enable_largefile+set}" = set; then :
10897   enableval=$enable_largefile;
10898 fi
10899
10900 if test "$enable_largefile" != no; then
10901
10902   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
10903 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
10904 if ${ac_cv_sys_largefile_CC+:} false; then :
10905   $as_echo_n "(cached) " >&6
10906 else
10907   ac_cv_sys_largefile_CC=no
10908      if test "$GCC" != yes; then
10909        ac_save_CC=$CC
10910        while :; do
10911          # IRIX 6.2 and later do not support large files by default,
10912          # so use the C compiler's -n32 option if that helps.
10913          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10914 /* end confdefs.h.  */
10915 #include <sys/types.h>
10916  /* Check that off_t can represent 2**63 - 1 correctly.
10917     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10918     since some C++ compilers masquerading as C compilers
10919     incorrectly reject 9223372036854775807.  */
10920 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10921   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10922                        && LARGE_OFF_T % 2147483647 == 1)
10923                       ? 1 : -1];
10924 int
10925 main ()
10926 {
10927
10928   ;
10929   return 0;
10930 }
10931 _ACEOF
10932          if ac_fn_c_try_compile "$LINENO"; then :
10933   break
10934 fi
10935 rm -f core conftest.err conftest.$ac_objext
10936          CC="$CC -n32"
10937          if ac_fn_c_try_compile "$LINENO"; then :
10938   ac_cv_sys_largefile_CC=' -n32'; break
10939 fi
10940 rm -f core conftest.err conftest.$ac_objext
10941          break
10942        done
10943        CC=$ac_save_CC
10944        rm -f conftest.$ac_ext
10945     fi
10946 fi
10947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
10948 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
10949   if test "$ac_cv_sys_largefile_CC" != no; then
10950     CC=$CC$ac_cv_sys_largefile_CC
10951   fi
10952
10953   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
10954 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
10955 if ${ac_cv_sys_file_offset_bits+:} false; then :
10956   $as_echo_n "(cached) " >&6
10957 else
10958   while :; do
10959   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10960 /* end confdefs.h.  */
10961 #include <sys/types.h>
10962  /* Check that off_t can represent 2**63 - 1 correctly.
10963     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10964     since some C++ compilers masquerading as C compilers
10965     incorrectly reject 9223372036854775807.  */
10966 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10967   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10968                        && LARGE_OFF_T % 2147483647 == 1)
10969                       ? 1 : -1];
10970 int
10971 main ()
10972 {
10973
10974   ;
10975   return 0;
10976 }
10977 _ACEOF
10978 if ac_fn_c_try_compile "$LINENO"; then :
10979   ac_cv_sys_file_offset_bits=no; break
10980 fi
10981 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10982   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10983 /* end confdefs.h.  */
10984 #define _FILE_OFFSET_BITS 64
10985 #include <sys/types.h>
10986  /* Check that off_t can represent 2**63 - 1 correctly.
10987     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10988     since some C++ compilers masquerading as C compilers
10989     incorrectly reject 9223372036854775807.  */
10990 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10991   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10992                        && LARGE_OFF_T % 2147483647 == 1)
10993                       ? 1 : -1];
10994 int
10995 main ()
10996 {
10997
10998   ;
10999   return 0;
11000 }
11001 _ACEOF
11002 if ac_fn_c_try_compile "$LINENO"; then :
11003   ac_cv_sys_file_offset_bits=64; break
11004 fi
11005 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11006   ac_cv_sys_file_offset_bits=unknown
11007   break
11008 done
11009 fi
11010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
11011 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
11012 case $ac_cv_sys_file_offset_bits in #(
11013   no | unknown) ;;
11014   *)
11015 cat >>confdefs.h <<_ACEOF
11016 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
11017 _ACEOF
11018 ;;
11019 esac
11020 rm -rf conftest*
11021   if test $ac_cv_sys_file_offset_bits = unknown; then
11022     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
11023 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
11024 if ${ac_cv_sys_large_files+:} false; then :
11025   $as_echo_n "(cached) " >&6
11026 else
11027   while :; do
11028   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11029 /* end confdefs.h.  */
11030 #include <sys/types.h>
11031  /* Check that off_t can represent 2**63 - 1 correctly.
11032     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11033     since some C++ compilers masquerading as C compilers
11034     incorrectly reject 9223372036854775807.  */
11035 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11036   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11037                        && LARGE_OFF_T % 2147483647 == 1)
11038                       ? 1 : -1];
11039 int
11040 main ()
11041 {
11042
11043   ;
11044   return 0;
11045 }
11046 _ACEOF
11047 if ac_fn_c_try_compile "$LINENO"; then :
11048   ac_cv_sys_large_files=no; break
11049 fi
11050 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11051   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11052 /* end confdefs.h.  */
11053 #define _LARGE_FILES 1
11054 #include <sys/types.h>
11055  /* Check that off_t can represent 2**63 - 1 correctly.
11056     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11057     since some C++ compilers masquerading as C compilers
11058     incorrectly reject 9223372036854775807.  */
11059 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11060   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11061                        && LARGE_OFF_T % 2147483647 == 1)
11062                       ? 1 : -1];
11063 int
11064 main ()
11065 {
11066
11067   ;
11068   return 0;
11069 }
11070 _ACEOF
11071 if ac_fn_c_try_compile "$LINENO"; then :
11072   ac_cv_sys_large_files=1; break
11073 fi
11074 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11075   ac_cv_sys_large_files=unknown
11076   break
11077 done
11078 fi
11079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
11080 $as_echo "$ac_cv_sys_large_files" >&6; }
11081 case $ac_cv_sys_large_files in #(
11082   no | unknown) ;;
11083   *)
11084 cat >>confdefs.h <<_ACEOF
11085 #define _LARGE_FILES $ac_cv_sys_large_files
11086 _ACEOF
11087 ;;
11088 esac
11089 rm -rf conftest*
11090   fi
11091
11092
11093 fi
11094
11095
11096 fi
11097
11098 # Check for largefile support (must be after AC_SYS_LARGEFILE)
11099 # The cast to long int works around a bug in the HP C Compiler
11100 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11101 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11102 # This bug is HP SR number 8606223364.
11103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
11104 $as_echo_n "checking size of off_t... " >&6; }
11105 if ${ac_cv_sizeof_off_t+:} false; then :
11106   $as_echo_n "(cached) " >&6
11107 else
11108   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :
11109
11110 else
11111   if test "$ac_cv_type_off_t" = yes; then
11112      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11113 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11114 as_fn_error 77 "cannot compute sizeof (off_t)
11115 See \`config.log' for more details" "$LINENO" 5; }
11116    else
11117      ac_cv_sizeof_off_t=0
11118    fi
11119 fi
11120
11121 fi
11122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
11123 $as_echo "$ac_cv_sizeof_off_t" >&6; }
11124
11125
11126
11127 cat >>confdefs.h <<_ACEOF
11128 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
11129 _ACEOF
11130
11131
11132
11133 # If we don't have largefile support, can't handle segsize >= 2GB.
11134 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
11135    as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
11136 fi
11137
11138
11139 ##
11140 ## Functions, global variables
11141 ##
11142
11143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
11144 $as_echo_n "checking for int timezone... " >&6; }
11145 if ${pgac_cv_var_int_timezone+:} false; then :
11146   $as_echo_n "(cached) " >&6
11147 else
11148   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11149 /* end confdefs.h.  */
11150 #include <time.h>
11151 int res;
11152 int
11153 main ()
11154 {
11155 #ifndef __CYGWIN__
11156 res = timezone / 60;
11157 #else
11158 res = _timezone / 60;
11159 #endif
11160   ;
11161   return 0;
11162 }
11163 _ACEOF
11164 if ac_fn_c_try_link "$LINENO"; then :
11165   pgac_cv_var_int_timezone=yes
11166 else
11167   pgac_cv_var_int_timezone=no
11168 fi
11169 rm -f core conftest.err conftest.$ac_objext \
11170     conftest$ac_exeext conftest.$ac_ext
11171 fi
11172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
11173 $as_echo "$pgac_cv_var_int_timezone" >&6; }
11174 if test x"$pgac_cv_var_int_timezone" = xyes ; then
11175
11176 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
11177
11178 fi
11179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for accept()" >&5
11180 $as_echo_n "checking types of arguments for accept()... " >&6; }
11181  if ${ac_cv_func_accept_return+:} false; then :
11182   $as_echo_n "(cached) " >&6
11183 else
11184    if ${ac_cv_func_accept_arg1+:} false; then :
11185   $as_echo_n "(cached) " >&6
11186 else
11187     if ${ac_cv_func_accept_arg2+:} false; then :
11188   $as_echo_n "(cached) " >&6
11189 else
11190      if ${ac_cv_func_accept_arg3+:} false; then :
11191   $as_echo_n "(cached) " >&6
11192 else
11193       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL' 'SOCKET WSAAPI'; do
11194       for ac_cv_func_accept_arg1 in 'int' 'unsigned int' 'SOCKET'; do
11195        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
11196         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
11197          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11198 /* end confdefs.h.  */
11199 #ifdef HAVE_SYS_TYPES_H
11200 #include <sys/types.h>
11201 #endif
11202 #ifdef HAVE_SYS_SOCKET_H
11203 #include <sys/socket.h>
11204 #endif
11205 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
11206 int
11207 main ()
11208 {
11209
11210   ;
11211   return 0;
11212 }
11213 _ACEOF
11214 if ac_fn_c_try_compile "$LINENO"; then :
11215   ac_not_found=no; break 4
11216 else
11217   ac_not_found=yes
11218 fi
11219 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11220        done
11221       done
11222      done
11223     done
11224     if test "$ac_not_found" = yes; then
11225       as_fn_error $? "could not determine argument types" "$LINENO" 5
11226     fi
11227     if test "$ac_cv_func_accept_arg3" = "void"; then
11228       ac_cv_func_accept_arg3=int
11229     fi
11230
11231 fi
11232
11233 fi
11234
11235 fi
11236
11237 fi
11238  { $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
11239 $as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
11240
11241 cat >>confdefs.h <<_ACEOF
11242 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
11243 _ACEOF
11244
11245
11246 cat >>confdefs.h <<_ACEOF
11247 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
11248 _ACEOF
11249
11250
11251 cat >>confdefs.h <<_ACEOF
11252 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
11253 _ACEOF
11254
11255
11256 cat >>confdefs.h <<_ACEOF
11257 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
11258 _ACEOF
11259
11260
11261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
11262 $as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
11263 if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
11264   $as_echo_n "(cached) " >&6
11265 else
11266   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11267 /* end confdefs.h.  */
11268 #include <sys/time.h>
11269 int
11270 main ()
11271 {
11272 struct timeval *tp;
11273 struct timezone *tzp;
11274 gettimeofday(tp,tzp);
11275   ;
11276   return 0;
11277 }
11278 _ACEOF
11279 if ac_fn_c_try_compile "$LINENO"; then :
11280   pgac_cv_func_gettimeofday_1arg=no
11281 else
11282   pgac_cv_func_gettimeofday_1arg=yes
11283 fi
11284 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11285 fi
11286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5
11287 $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
11288 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
11289
11290 $as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
11291
11292 fi
11293
11294
11295 # Some versions of libedit contain strlcpy(), setproctitle(), and other
11296 # symbols that that library has no business exposing to the world.  Pending
11297 # acquisition of a clue by those developers, ignore libedit (including its
11298 # possible alias of libreadline) while checking for everything else.
11299 LIBS_including_readline="$LIBS"
11300 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
11301
11302 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
11303 do :
11304   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11305 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11306 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11307   cat >>confdefs.h <<_ACEOF
11308 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11309 _ACEOF
11310
11311 fi
11312 done
11313
11314
11315 ac_fn_c_check_func "$LINENO" "fseeko" "ac_cv_func_fseeko"
11316 if test "x$ac_cv_func_fseeko" = xyes; then :
11317   $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
11318
11319 else
11320   case " $LIBOBJS " in
11321   *" fseeko.$ac_objext "* ) ;;
11322   *) LIBOBJS="$LIBOBJS fseeko.$ac_objext"
11323  ;;
11324 esac
11325
11326 fi
11327
11328
11329 case $host_os in
11330         # NetBSD uses a custom fseeko/ftello built on fsetpos/fgetpos
11331         # Mingw uses macros to access Win32 API calls
11332         netbsd*|mingw*)
11333
11334 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
11335
11336                 ac_cv_func_fseeko=yes;;
11337         *)
11338                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
11339 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
11340 if ${ac_cv_sys_largefile_source+:} false; then :
11341   $as_echo_n "(cached) " >&6
11342 else
11343   while :; do
11344   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11345 /* end confdefs.h.  */
11346 #include <sys/types.h> /* for off_t */
11347      #include <stdio.h>
11348 int
11349 main ()
11350 {
11351 int (*fp) (FILE *, off_t, int) = fseeko;
11352      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
11353   ;
11354   return 0;
11355 }
11356 _ACEOF
11357 if ac_fn_c_try_link "$LINENO"; then :
11358   ac_cv_sys_largefile_source=no; break
11359 fi
11360 rm -f core conftest.err conftest.$ac_objext \
11361     conftest$ac_exeext conftest.$ac_ext
11362   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11363 /* end confdefs.h.  */
11364 #define _LARGEFILE_SOURCE 1
11365 #include <sys/types.h> /* for off_t */
11366      #include <stdio.h>
11367 int
11368 main ()
11369 {
11370 int (*fp) (FILE *, off_t, int) = fseeko;
11371      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
11372   ;
11373   return 0;
11374 }
11375 _ACEOF
11376 if ac_fn_c_try_link "$LINENO"; then :
11377   ac_cv_sys_largefile_source=1; break
11378 fi
11379 rm -f core conftest.err conftest.$ac_objext \
11380     conftest$ac_exeext conftest.$ac_ext
11381   ac_cv_sys_largefile_source=unknown
11382   break
11383 done
11384 fi
11385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
11386 $as_echo "$ac_cv_sys_largefile_source" >&6; }
11387 case $ac_cv_sys_largefile_source in #(
11388   no | unknown) ;;
11389   *)
11390 cat >>confdefs.h <<_ACEOF
11391 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
11392 _ACEOF
11393 ;;
11394 esac
11395 rm -rf conftest*
11396
11397 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
11398 # in glibc 2.1.3, but that breaks too many other things.
11399 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
11400 if test $ac_cv_sys_largefile_source != unknown; then
11401
11402 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
11403
11404 fi
11405 ;;
11406 esac
11407
11408 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
11409 # by calling it, 2009-04-02
11410 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
11411 if test "$PORTNAME" != "solaris"; then
11412 for ac_func in posix_fadvise
11413 do :
11414   ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
11415 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
11416   cat >>confdefs.h <<_ACEOF
11417 #define HAVE_POSIX_FADVISE 1
11418 _ACEOF
11419
11420 fi
11421 done
11422
11423 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
11424 "
11425 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
11426   ac_have_decl=1
11427 else
11428   ac_have_decl=0
11429 fi
11430
11431 cat >>confdefs.h <<_ACEOF
11432 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
11433 _ACEOF
11434
11435 fi
11436
11437 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
11438 "
11439 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
11440   ac_have_decl=1
11441 else
11442   ac_have_decl=0
11443 fi
11444
11445 cat >>confdefs.h <<_ACEOF
11446 #define HAVE_DECL_FDATASYNC $ac_have_decl
11447 _ACEOF
11448
11449 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
11450 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
11451   ac_have_decl=1
11452 else
11453   ac_have_decl=0
11454 fi
11455
11456 cat >>confdefs.h <<_ACEOF
11457 #define HAVE_DECL_STRLCAT $ac_have_decl
11458 _ACEOF
11459 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
11460 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
11461   ac_have_decl=1
11462 else
11463   ac_have_decl=0
11464 fi
11465
11466 cat >>confdefs.h <<_ACEOF
11467 #define HAVE_DECL_STRLCPY $ac_have_decl
11468 _ACEOF
11469
11470 # This is probably only present on Darwin, but may as well check always
11471 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
11472 "
11473 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
11474   ac_have_decl=1
11475 else
11476   ac_have_decl=0
11477 fi
11478
11479 cat >>confdefs.h <<_ACEOF
11480 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
11481 _ACEOF
11482
11483
11484 HAVE_IPV6=no
11485 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default
11486 #include <netinet/in.h>
11487 "
11488 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
11489
11490 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
11491
11492          HAVE_IPV6=yes
11493 fi
11494
11495
11496
11497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
11498 $as_echo_n "checking for PS_STRINGS... " >&6; }
11499 if ${pgac_cv_var_PS_STRINGS+:} false; then :
11500   $as_echo_n "(cached) " >&6
11501 else
11502   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11503 /* end confdefs.h.  */
11504 #include <machine/vmparam.h>
11505 #include <sys/exec.h>
11506
11507 int
11508 main ()
11509 {
11510 PS_STRINGS->ps_nargvstr = 1;
11511 PS_STRINGS->ps_argvstr = "foo";
11512   ;
11513   return 0;
11514 }
11515 _ACEOF
11516 if ac_fn_c_try_link "$LINENO"; then :
11517   pgac_cv_var_PS_STRINGS=yes
11518 else
11519   pgac_cv_var_PS_STRINGS=no
11520 fi
11521 rm -f core conftest.err conftest.$ac_objext \
11522     conftest$ac_exeext conftest.$ac_ext
11523 fi
11524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
11525 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
11526 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
11527
11528 $as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
11529
11530 fi
11531
11532
11533 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
11534 # is missing.  Yes, there are machines that have only one.  We may
11535 # also decide to use snprintf.c if snprintf() is present but does not
11536 # have all the features we need --- see below.
11537
11538 if test "$PORTNAME" = "win32"; then
11539   # Win32 gets snprintf.c built unconditionally.
11540   #
11541   # To properly translate all NLS languages strings, we must support the
11542   # *printf() %$ format, which allows *printf() arguments to be selected
11543   # by position in the translated string.
11544   #
11545   # libintl versions < 0.13 use the native *printf() functions, and Win32
11546   # *printf() doesn't understand %$, so we must use our /port versions,
11547   # which do understand %$. libintl versions >= 0.13 include their own
11548   # *printf versions on Win32.  The libintl 0.13 release note text is:
11549   #
11550   #   C format strings with positions, as they arise when a translator
11551   #   needs to reorder a sentence, are now supported on all platforms.
11552   #   On those few platforms (NetBSD and Woe32) for which the native
11553   #   printf()/fprintf()/... functions don't support such format
11554   #   strings, replacements are provided through <libintl.h>.
11555   #
11556   # We could use libintl >= 0.13's *printf() if we were sure that we had
11557   # a litint >= 0.13 at runtime, but seeing that there is no clean way
11558   # to guarantee that, it is best to just use our own, so we are sure to
11559   # get %$ support. In include/port.h we disable the *printf() macros
11560   # that might have been defined by libintl.
11561   #
11562   # We do this unconditionally whether NLS is used or not so we are sure
11563   # that all Win32 libraries and binaries behave the same.
11564   pgac_need_repl_snprintf=yes
11565 else
11566   pgac_need_repl_snprintf=no
11567   for ac_func in snprintf
11568 do :
11569   ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
11570 if test "x$ac_cv_func_snprintf" = xyes; then :
11571   cat >>confdefs.h <<_ACEOF
11572 #define HAVE_SNPRINTF 1
11573 _ACEOF
11574
11575 else
11576   pgac_need_repl_snprintf=yes
11577 fi
11578 done
11579
11580   for ac_func in vsnprintf
11581 do :
11582   ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
11583 if test "x$ac_cv_func_vsnprintf" = xyes; then :
11584   cat >>confdefs.h <<_ACEOF
11585 #define HAVE_VSNPRINTF 1
11586 _ACEOF
11587
11588 else
11589   pgac_need_repl_snprintf=yes
11590 fi
11591 done
11592
11593 fi
11594
11595
11596 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
11597 # include/c.h will provide declarations.  Note this is a separate test
11598 # from whether the functions exist in the C library --- there are
11599 # systems that have the functions but don't bother to declare them :-(
11600
11601 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11602 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
11603   ac_have_decl=1
11604 else
11605   ac_have_decl=0
11606 fi
11607
11608 cat >>confdefs.h <<_ACEOF
11609 #define HAVE_DECL_SNPRINTF $ac_have_decl
11610 _ACEOF
11611 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
11612 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
11613   ac_have_decl=1
11614 else
11615   ac_have_decl=0
11616 fi
11617
11618 cat >>confdefs.h <<_ACEOF
11619 #define HAVE_DECL_VSNPRINTF $ac_have_decl
11620 _ACEOF
11621
11622
11623
11624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf" >&5
11625 $as_echo_n "checking for isinf... " >&6; }
11626 if ${ac_cv_func_isinf+:} false; then :
11627   $as_echo_n "(cached) " >&6
11628 else
11629   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11630 /* end confdefs.h.  */
11631
11632 #include <math.h>
11633 double glob_double;
11634
11635 int
11636 main ()
11637 {
11638 return isinf(glob_double) ? 0 : 1;
11639   ;
11640   return 0;
11641 }
11642 _ACEOF
11643 if ac_fn_c_try_link "$LINENO"; then :
11644   ac_cv_func_isinf=yes
11645 else
11646   ac_cv_func_isinf=no
11647 fi
11648 rm -f core conftest.err conftest.$ac_objext \
11649     conftest$ac_exeext conftest.$ac_ext
11650 fi
11651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_isinf" >&5
11652 $as_echo "$ac_cv_func_isinf" >&6; }
11653
11654 if test $ac_cv_func_isinf = yes ; then
11655
11656 $as_echo "#define HAVE_ISINF 1" >>confdefs.h
11657
11658 else
11659   case " $LIBOBJS " in
11660   *" isinf.$ac_objext "* ) ;;
11661   *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
11662  ;;
11663 esac
11664
11665   # Look for a way to implement a substitute for isinf()
11666   for ac_func in fpclass fp_class fp_class_d class
11667 do :
11668   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11669 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11670 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11671   cat >>confdefs.h <<_ACEOF
11672 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11673 _ACEOF
11674  break
11675 fi
11676 done
11677
11678 fi
11679
11680 ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
11681 if test "x$ac_cv_func_crypt" = xyes; then :
11682   $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
11683
11684 else
11685   case " $LIBOBJS " in
11686   *" crypt.$ac_objext "* ) ;;
11687   *) LIBOBJS="$LIBOBJS crypt.$ac_objext"
11688  ;;
11689 esac
11690
11691 fi
11692
11693 ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
11694 if test "x$ac_cv_func_fls" = xyes; then :
11695   $as_echo "#define HAVE_FLS 1" >>confdefs.h
11696
11697 else
11698   case " $LIBOBJS " in
11699   *" fls.$ac_objext "* ) ;;
11700   *) LIBOBJS="$LIBOBJS fls.$ac_objext"
11701  ;;
11702 esac
11703
11704 fi
11705
11706 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
11707 if test "x$ac_cv_func_getopt" = xyes; then :
11708   $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
11709
11710 else
11711   case " $LIBOBJS " in
11712   *" getopt.$ac_objext "* ) ;;
11713   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
11714  ;;
11715 esac
11716
11717 fi
11718
11719 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
11720 if test "x$ac_cv_func_getrusage" = xyes; then :
11721   $as_echo "#define HAVE_GETRUSAGE 1" >>confdefs.h
11722
11723 else
11724   case " $LIBOBJS " in
11725   *" getrusage.$ac_objext "* ) ;;
11726   *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
11727  ;;
11728 esac
11729
11730 fi
11731
11732 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
11733 if test "x$ac_cv_func_inet_aton" = xyes; then :
11734   $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
11735
11736 else
11737   case " $LIBOBJS " in
11738   *" inet_aton.$ac_objext "* ) ;;
11739   *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
11740  ;;
11741 esac
11742
11743 fi
11744
11745 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
11746 if test "x$ac_cv_func_mkdtemp" = xyes; then :
11747   $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
11748
11749 else
11750   case " $LIBOBJS " in
11751   *" mkdtemp.$ac_objext "* ) ;;
11752   *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
11753  ;;
11754 esac
11755
11756 fi
11757
11758 ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
11759 if test "x$ac_cv_func_random" = xyes; then :
11760   $as_echo "#define HAVE_RANDOM 1" >>confdefs.h
11761
11762 else
11763   case " $LIBOBJS " in
11764   *" random.$ac_objext "* ) ;;
11765   *) LIBOBJS="$LIBOBJS random.$ac_objext"
11766  ;;
11767 esac
11768
11769 fi
11770
11771 ac_fn_c_check_func "$LINENO" "rint" "ac_cv_func_rint"
11772 if test "x$ac_cv_func_rint" = xyes; then :
11773   $as_echo "#define HAVE_RINT 1" >>confdefs.h
11774
11775 else
11776   case " $LIBOBJS " in
11777   *" rint.$ac_objext "* ) ;;
11778   *) LIBOBJS="$LIBOBJS rint.$ac_objext"
11779  ;;
11780 esac
11781
11782 fi
11783
11784 ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
11785 if test "x$ac_cv_func_srandom" = xyes; then :
11786   $as_echo "#define HAVE_SRANDOM 1" >>confdefs.h
11787
11788 else
11789   case " $LIBOBJS " in
11790   *" srandom.$ac_objext "* ) ;;
11791   *) LIBOBJS="$LIBOBJS srandom.$ac_objext"
11792  ;;
11793 esac
11794
11795 fi
11796
11797 ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
11798 if test "x$ac_cv_func_strerror" = xyes; then :
11799   $as_echo "#define HAVE_STRERROR 1" >>confdefs.h
11800
11801 else
11802   case " $LIBOBJS " in
11803   *" strerror.$ac_objext "* ) ;;
11804   *) LIBOBJS="$LIBOBJS strerror.$ac_objext"
11805  ;;
11806 esac
11807
11808 fi
11809
11810 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
11811 if test "x$ac_cv_func_strlcat" = xyes; then :
11812   $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
11813
11814 else
11815   case " $LIBOBJS " in
11816   *" strlcat.$ac_objext "* ) ;;
11817   *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
11818  ;;
11819 esac
11820
11821 fi
11822
11823 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
11824 if test "x$ac_cv_func_strlcpy" = xyes; then :
11825   $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
11826
11827 else
11828   case " $LIBOBJS " in
11829   *" strlcpy.$ac_objext "* ) ;;
11830   *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
11831  ;;
11832 esac
11833
11834 fi
11835
11836
11837
11838 case $host_os in
11839
11840         # Windows uses a specialised env handler
11841         # and doesn't need a replacement getpeereid because it doesn't use
11842         # Unix sockets.
11843         mingw*)
11844
11845 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
11846
11847
11848 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
11849
11850                 ac_cv_func_unsetenv=yes
11851                 ac_cv_func_getpeereid=yes;;
11852         *)
11853                 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
11854 if test "x$ac_cv_func_unsetenv" = xyes; then :
11855   $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
11856
11857 else
11858   case " $LIBOBJS " in
11859   *" unsetenv.$ac_objext "* ) ;;
11860   *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext"
11861  ;;
11862 esac
11863
11864 fi
11865
11866 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
11867 if test "x$ac_cv_func_getpeereid" = xyes; then :
11868   $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
11869
11870 else
11871   case " $LIBOBJS " in
11872   *" getpeereid.$ac_objext "* ) ;;
11873   *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
11874  ;;
11875 esac
11876
11877 fi
11878
11879
11880                 ;;
11881 esac
11882
11883 # System's version of getaddrinfo(), if any, may be used only if we found
11884 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
11885 # We use only our own getaddrinfo.c on Windows, but it's time to revisit that.
11886 if test x"$ac_cv_type_struct_addrinfo" = xyes && \
11887    test "$PORTNAME" != "win32"; then
11888   ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
11889 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
11890   $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
11891
11892 else
11893   case " $LIBOBJS " in
11894   *" getaddrinfo.$ac_objext "* ) ;;
11895   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
11896  ;;
11897 esac
11898
11899 fi
11900
11901
11902 else
11903   case " $LIBOBJS " in
11904   *" getaddrinfo.$ac_objext "* ) ;;
11905   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
11906  ;;
11907 esac
11908
11909 fi
11910
11911 # Similarly, use system's getopt_long() only if system provides struct option.
11912 if test x"$ac_cv_type_struct_option" = xyes ; then
11913   ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
11914 if test "x$ac_cv_func_getopt_long" = xyes; then :
11915   $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
11916
11917 else
11918   case " $LIBOBJS " in
11919   *" getopt_long.$ac_objext "* ) ;;
11920   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
11921  ;;
11922 esac
11923
11924 fi
11925
11926
11927 else
11928   case " $LIBOBJS " in
11929   *" getopt_long.$ac_objext "* ) ;;
11930   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
11931  ;;
11932 esac
11933
11934 fi
11935
11936 # Solaris' getopt() doesn't do what we want for long options, so always use
11937 # our version on that platform.
11938 if test "$PORTNAME" = "solaris"; then
11939   case " $LIBOBJS " in
11940   *" getopt.$ac_objext "* ) ;;
11941   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
11942  ;;
11943 esac
11944
11945 fi
11946
11947 # mingw has adopted a GNU-centric interpretation of optind/optreset,
11948 # so always use our version on Windows.
11949 if test "$PORTNAME" = "win32"; then
11950   case " $LIBOBJS " in
11951   *" getopt.$ac_objext "* ) ;;
11952   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
11953  ;;
11954 esac
11955
11956   case " $LIBOBJS " in
11957   *" getopt_long.$ac_objext "* ) ;;
11958   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
11959  ;;
11960 esac
11961
11962 fi
11963
11964 # Win32 support
11965 if test "$PORTNAME" = "win32"; then
11966   ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
11967 if test "x$ac_cv_func_gettimeofday" = xyes; then :
11968   $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
11969
11970 else
11971   case " $LIBOBJS " in
11972   *" gettimeofday.$ac_objext "* ) ;;
11973   *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
11974  ;;
11975 esac
11976
11977 fi
11978
11979
11980   case " $LIBOBJS " in
11981   *" kill.$ac_objext "* ) ;;
11982   *) LIBOBJS="$LIBOBJS kill.$ac_objext"
11983  ;;
11984 esac
11985
11986   case " $LIBOBJS " in
11987   *" open.$ac_objext "* ) ;;
11988   *) LIBOBJS="$LIBOBJS open.$ac_objext"
11989  ;;
11990 esac
11991
11992   case " $LIBOBJS " in
11993   *" system.$ac_objext "* ) ;;
11994   *) LIBOBJS="$LIBOBJS system.$ac_objext"
11995  ;;
11996 esac
11997
11998   case " $LIBOBJS " in
11999   *" win32env.$ac_objext "* ) ;;
12000   *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
12001  ;;
12002 esac
12003
12004   case " $LIBOBJS " in
12005   *" win32error.$ac_objext "* ) ;;
12006   *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
12007  ;;
12008 esac
12009
12010   case " $LIBOBJS " in
12011   *" win32setlocale.$ac_objext "* ) ;;
12012   *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
12013  ;;
12014 esac
12015
12016
12017 $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
12018
12019   ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
12020 #define WIN32_LEAN_AND_MEAN
12021 #include <windows.h>
12022 #include <string.h>
12023 #include <dbghelp.h>
12024 "
12025 if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
12026
12027 cat >>confdefs.h <<_ACEOF
12028 #define HAVE_MINIDUMP_TYPE 1
12029 _ACEOF
12030
12031 pgac_minidump_type=yes
12032 else
12033   pgac_minidump_type=no
12034 fi
12035
12036 fi
12037 if test x"$pgac_minidump_type" = x"yes" ; then
12038   have_win32_dbghelp=yes
12039
12040 else
12041   have_win32_dbghelp=no
12042
12043 fi
12044
12045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
12046 $as_echo_n "checking for sigsetjmp... " >&6; }
12047 if ${pgac_cv_func_sigsetjmp+:} false; then :
12048   $as_echo_n "(cached) " >&6
12049 else
12050   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12051 /* end confdefs.h.  */
12052 #include <setjmp.h>
12053 int
12054 main ()
12055 {
12056 sigjmp_buf x; sigsetjmp(x, 1);
12057   ;
12058   return 0;
12059 }
12060 _ACEOF
12061 if ac_fn_c_try_link "$LINENO"; then :
12062   pgac_cv_func_sigsetjmp=yes
12063 else
12064   pgac_cv_func_sigsetjmp=no
12065 fi
12066 rm -f core conftest.err conftest.$ac_objext \
12067     conftest$ac_exeext conftest.$ac_ext
12068 fi
12069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_sigsetjmp" >&5
12070 $as_echo "$pgac_cv_func_sigsetjmp" >&6; }
12071 if test x"$pgac_cv_func_sigsetjmp" = x"yes"; then
12072
12073 $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
12074
12075 fi
12076
12077 ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
12078 /* NetBSD declares sys_siglist in unistd.h.  */
12079 #ifdef HAVE_UNISTD_H
12080 # include <unistd.h>
12081 #endif
12082
12083 "
12084 if test "x$ac_cv_have_decl_sys_siglist" = xyes; then :
12085   ac_have_decl=1
12086 else
12087   ac_have_decl=0
12088 fi
12089
12090 cat >>confdefs.h <<_ACEOF
12091 #define HAVE_DECL_SYS_SIGLIST $ac_have_decl
12092 _ACEOF
12093
12094
12095
12096 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
12097 if test "x$ac_cv_func_syslog" = xyes; then :
12098   ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
12099 if test "x$ac_cv_header_syslog_h" = xyes; then :
12100
12101 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
12102
12103 fi
12104
12105
12106 fi
12107
12108
12109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
12110 $as_echo_n "checking for opterr... " >&6; }
12111 if ${pgac_cv_var_int_opterr+:} false; then :
12112   $as_echo_n "(cached) " >&6
12113 else
12114   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12115 /* end confdefs.h.  */
12116 #include <unistd.h>
12117 int
12118 main ()
12119 {
12120 extern int opterr; opterr = 1;
12121   ;
12122   return 0;
12123 }
12124 _ACEOF
12125 if ac_fn_c_try_link "$LINENO"; then :
12126   pgac_cv_var_int_opterr=yes
12127 else
12128   pgac_cv_var_int_opterr=no
12129 fi
12130 rm -f core conftest.err conftest.$ac_objext \
12131     conftest$ac_exeext conftest.$ac_ext
12132 fi
12133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
12134 $as_echo "$pgac_cv_var_int_opterr" >&6; }
12135 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
12136
12137 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
12138
12139 fi
12140
12141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
12142 $as_echo_n "checking for optreset... " >&6; }
12143 if ${pgac_cv_var_int_optreset+:} false; then :
12144   $as_echo_n "(cached) " >&6
12145 else
12146   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12147 /* end confdefs.h.  */
12148 #include <unistd.h>
12149 int
12150 main ()
12151 {
12152 extern int optreset; optreset = 1;
12153   ;
12154   return 0;
12155 }
12156 _ACEOF
12157 if ac_fn_c_try_link "$LINENO"; then :
12158   pgac_cv_var_int_optreset=yes
12159 else
12160   pgac_cv_var_int_optreset=no
12161 fi
12162 rm -f core conftest.err conftest.$ac_objext \
12163     conftest$ac_exeext conftest.$ac_ext
12164 fi
12165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
12166 $as_echo "$pgac_cv_var_int_optreset" >&6; }
12167 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
12168
12169 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
12170
12171 fi
12172
12173 for ac_func in strtoll strtoq
12174 do :
12175   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12176 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12177 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12178   cat >>confdefs.h <<_ACEOF
12179 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12180 _ACEOF
12181  break
12182 fi
12183 done
12184
12185 for ac_func in strtoull strtouq
12186 do :
12187   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12188 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12189 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12190   cat >>confdefs.h <<_ACEOF
12191 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12192 _ACEOF
12193  break
12194 fi
12195 done
12196
12197
12198 # Lastly, restore full LIBS list and check for readline/libedit symbols
12199 LIBS="$LIBS_including_readline"
12200
12201 if test "$with_readline" = yes; then
12202   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_append_character" >&5
12203 $as_echo_n "checking for rl_completion_append_character... " >&6; }
12204 if ${pgac_cv_var_rl_completion_append_character+:} false; then :
12205   $as_echo_n "(cached) " >&6
12206 else
12207   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12208 /* end confdefs.h.  */
12209 #include <stdio.h>
12210 #ifdef HAVE_READLINE_READLINE_H
12211 # include <readline/readline.h>
12212 #elif defined(HAVE_READLINE_H)
12213 # include <readline.h>
12214 #endif
12215
12216 int
12217 main ()
12218 {
12219 rl_completion_append_character = 'x';
12220   ;
12221   return 0;
12222 }
12223 _ACEOF
12224 if ac_fn_c_try_link "$LINENO"; then :
12225   pgac_cv_var_rl_completion_append_character=yes
12226 else
12227   pgac_cv_var_rl_completion_append_character=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_rl_completion_append_character" >&5
12233 $as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
12234 if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
12235
12236 $as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
12237
12238 fi
12239   for ac_func in rl_completion_matches rl_filename_completion_function
12240 do :
12241   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12242 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12243 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12244   cat >>confdefs.h <<_ACEOF
12245 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12246 _ACEOF
12247
12248 fi
12249 done
12250
12251   for ac_func in append_history history_truncate_file
12252 do :
12253   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12254 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12255 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12256   cat >>confdefs.h <<_ACEOF
12257 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12258 _ACEOF
12259
12260 fi
12261 done
12262
12263 fi
12264
12265
12266 #
12267 # Pthreads
12268 #
12269 # For each platform, we need to know about any special compile and link
12270 # libraries, and whether the normal C function names are thread-safe.
12271 # See the comment at the top of src/port/thread.c for more information.
12272 # WIN32 doesn't need the pthread tests;  it always uses threads
12273 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then
12274
12275
12276
12277 ac_ext=c
12278 ac_cpp='$CPP $CPPFLAGS'
12279 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12280 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12281 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12282
12283 acx_pthread_ok=no
12284
12285 # We used to check for pthread.h first, but this fails if pthread.h
12286 # requires special compiler flags (e.g. on True64 or Sequent).
12287 # It gets checked for in the link test anyway.
12288
12289 # First of all, check if the user has set any of the PTHREAD_LIBS,
12290 # etcetera environment variables, and if threads linking works using
12291 # them:
12292 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
12293         save_CFLAGS="$CFLAGS"
12294         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
12295         save_LIBS="$LIBS"
12296         LIBS="$PTHREAD_LIBS $LIBS"
12297         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
12298 $as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
12299         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12300 /* end confdefs.h.  */
12301
12302 /* Override any GCC internal prototype to avoid an error.
12303    Use char because int might match the return type of a GCC
12304    builtin and then its argument prototype would still apply.  */
12305 #ifdef __cplusplus
12306 extern "C"
12307 #endif
12308 char pthread_join ();
12309 int
12310 main ()
12311 {
12312 return pthread_join ();
12313   ;
12314   return 0;
12315 }
12316 _ACEOF
12317 if ac_fn_c_try_link "$LINENO"; then :
12318   acx_pthread_ok=yes
12319 fi
12320 rm -f core conftest.err conftest.$ac_objext \
12321     conftest$ac_exeext conftest.$ac_ext
12322         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5
12323 $as_echo "$acx_pthread_ok" >&6; }
12324         if test x"$acx_pthread_ok" = xno; then
12325                 PTHREAD_LIBS=""
12326                 PTHREAD_CFLAGS=""
12327         fi
12328         LIBS="$save_LIBS"
12329         CFLAGS="$save_CFLAGS"
12330 fi
12331
12332 # We must check for the threads library under a number of different
12333 # names; the ordering is very important because some systems
12334 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
12335 # libraries is broken (non-POSIX).
12336
12337 # Create a list of thread flags to try.  Items starting with a "-" are
12338 # C compiler flags, and other items are library names, except for "none"
12339 # which indicates that we try without any flags at all, and "pthread-config"
12340 # which is a program returning the flags for the Pth emulation library.
12341
12342 acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config pthreadGC2"
12343
12344 # The ordering *is* (sometimes) important.  Some notes on the
12345 # individual items follow:
12346
12347 # pthreads: AIX (must check this before -lpthread)
12348 # none: in case threads are in libc; should be tried before -Kthread and
12349 #       other compiler flags to prevent continual compiler warnings
12350 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
12351 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
12352 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
12353 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
12354 # -pthreads: Solaris/gcc
12355 # -mthreads: Mingw32/gcc, Lynx/gcc
12356 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
12357 #      doesn't hurt to check since this sometimes defines pthreads too;
12358 #      also defines -D_REENTRANT)
12359 # pthread: Linux, etcetera
12360 # --thread-safe: KAI C++
12361 # pthread-config: use pthread-config program (for GNU Pth library)
12362
12363 case "${host_cpu}-${host_os}" in
12364         *solaris*)
12365
12366         # On Solaris (at least, for some versions), libc contains stubbed
12367         # (non-functional) versions of the pthreads routines, so link-based
12368         # tests will erroneously succeed.  (We need to link with -pthread or
12369         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
12370         # a function called by this macro, so we could check for that, but
12371         # who knows whether they'll stub that too in a future libc.)  So,
12372         # we'll just look for -pthreads and -lpthread first:
12373
12374         acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
12375         ;;
12376 esac
12377
12378 if test x"$acx_pthread_ok" = xno; then
12379 for flag in $acx_pthread_flags; do
12380
12381         tryPTHREAD_CFLAGS=""
12382         tryPTHREAD_LIBS=""
12383         case $flag in
12384                 none)
12385                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
12386 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
12387                 ;;
12388
12389                 -*)
12390                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
12391 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
12392                 tryPTHREAD_CFLAGS="$flag"
12393                 ;;
12394
12395                 pthread-config)
12396                 # skip this if we already have flags defined, for PostgreSQL
12397                 if test x"$PTHREAD_CFLAGS" != x -o x"$PTHREAD_LIBS" != x; then continue; fi
12398                 # Extract the first word of "pthread-config", so it can be a program name with args.
12399 set dummy pthread-config; ac_word=$2
12400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12401 $as_echo_n "checking for $ac_word... " >&6; }
12402 if ${ac_cv_prog_acx_pthread_config+:} false; then :
12403   $as_echo_n "(cached) " >&6
12404 else
12405   if test -n "$acx_pthread_config"; then
12406   ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
12407 else
12408 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12409 for as_dir in $PATH
12410 do
12411   IFS=$as_save_IFS
12412   test -z "$as_dir" && as_dir=.
12413     for ac_exec_ext in '' $ac_executable_extensions; do
12414   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12415     ac_cv_prog_acx_pthread_config="yes"
12416     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12417     break 2
12418   fi
12419 done
12420   done
12421 IFS=$as_save_IFS
12422
12423   test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
12424 fi
12425 fi
12426 acx_pthread_config=$ac_cv_prog_acx_pthread_config
12427 if test -n "$acx_pthread_config"; then
12428   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_config" >&5
12429 $as_echo "$acx_pthread_config" >&6; }
12430 else
12431   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12432 $as_echo "no" >&6; }
12433 fi
12434
12435
12436                 if test x"$acx_pthread_config" = xno; then continue; fi
12437                 tryPTHREAD_CFLAGS="`pthread-config --cflags`"
12438                 tryPTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
12439                 ;;
12440
12441                 *)
12442                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
12443 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
12444                 tryPTHREAD_LIBS="-l$flag"
12445                 ;;
12446         esac
12447
12448         save_LIBS="$LIBS"
12449         save_CFLAGS="$CFLAGS"
12450         LIBS="$tryPTHREAD_LIBS $PTHREAD_LIBS $LIBS"
12451         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
12452
12453         # Check for various functions.  We must include pthread.h,
12454         # since some functions may be macros.  (On the Sequent, we
12455         # need a special flag -Kthread to make this header compile.)
12456         # We check for pthread_join because it is in -lpthread on IRIX
12457         # while pthread_create is in libc.  We check for pthread_attr_init
12458         # due to DEC craziness with -lpthreads.  We check for
12459         # pthread_cleanup_push because it is one of the few pthread
12460         # functions on Solaris that doesn't have a non-functional libc stub.
12461         # We try pthread_create on general principles.
12462         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12463 /* end confdefs.h.  */
12464 #include <pthread.h>
12465 int
12466 main ()
12467 {
12468 pthread_t th; pthread_join(th, 0);
12469                      pthread_attr_init(0); pthread_cleanup_push(0, 0);
12470                      pthread_create(0,0,0,0); pthread_cleanup_pop(0);
12471   ;
12472   return 0;
12473 }
12474 _ACEOF
12475 if ac_fn_c_try_link "$LINENO"; then :
12476   acx_pthread_ok=yes
12477 else
12478   acx_pthread_ok=no
12479 fi
12480 rm -f core conftest.err conftest.$ac_objext \
12481     conftest$ac_exeext conftest.$ac_ext
12482
12483         if test "x$acx_pthread_ok" = xyes; then
12484             # Don't use options that are ignored by the compiler.
12485             # We find them by checking stderror.
12486             cat >conftest.$ac_ext <<_ACEOF
12487 int
12488 main (int argc, char **argv)
12489 {
12490   (void) argc;
12491   (void) argv;
12492   return 0;
12493 }
12494 _ACEOF
12495             rm -f conftest.$ac_objext conftest$ac_exeext
12496             # Check both linking and compiling, because they might tolerate different options.
12497             if test "`(eval $ac_link 2>&1 1>&5)`" = "" && test "`(eval $ac_compile 2>&1 1>&5)`" = ""; then
12498                 # The original macro breaks out of the loop at this point,
12499                 # but we continue trying flags because Linux needs -lpthread
12500                 # too to build libpq successfully.  The test above only
12501                 # tests for building binaries, not shared libraries.
12502                 PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
12503                 PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
12504             else   acx_pthread_ok=no
12505             fi
12506         fi
12507
12508         LIBS="$save_LIBS"
12509         CFLAGS="$save_CFLAGS"
12510
12511         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5
12512 $as_echo "$acx_pthread_ok" >&6; }
12513 done
12514 fi
12515
12516 # The original macro has a bunch of other tests here, which we have removed
12517 # because (a) Postgres doesn't need them, and (b) $acx_pthread_ok is not
12518 # meaningful at this point.
12519
12520
12521
12522
12523 ac_ext=c
12524 ac_cpp='$CPP $CPPFLAGS'
12525 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12526 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12527 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12528
12529         # set thread flags
12530
12531 # Some platforms use these, so just define them.  They can't hurt if they
12532 # are not supported.  For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
12533 # enables 5-arg getpwuid_r, among other things.
12534 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
12535
12536 # Check for *_r functions
12537 _CFLAGS="$CFLAGS"
12538 _LIBS="$LIBS"
12539 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
12540 LIBS="$LIBS $PTHREAD_LIBS"
12541
12542 if test "$PORTNAME" != "win32"; then
12543 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
12544 if test "x$ac_cv_header_pthread_h" = xyes; then :
12545
12546 else
12547   as_fn_error $? "
12548 pthread.h not found;  use --disable-thread-safety to disable thread safety" "$LINENO" 5
12549 fi
12550
12551
12552 fi
12553
12554 for ac_func in strerror_r getpwuid_r gethostbyname_r
12555 do :
12556   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12557 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12558 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12559   cat >>confdefs.h <<_ACEOF
12560 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12561 _ACEOF
12562
12563 fi
12564 done
12565
12566
12567 # Do test here with the proper thread flags
12568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpwuid_r takes a fifth argument" >&5
12569 $as_echo_n "checking whether getpwuid_r takes a fifth argument... " >&6; }
12570 if ${pgac_cv_func_getpwuid_r_5arg+:} false; then :
12571   $as_echo_n "(cached) " >&6
12572 else
12573   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12574 /* end confdefs.h.  */
12575 #include <sys/types.h>
12576 #include <pwd.h>
12577 int
12578 main ()
12579 {
12580 uid_t uid;
12581 struct passwd *space;
12582 char *buf;
12583 size_t bufsize;
12584 struct passwd **result;
12585 getpwuid_r(uid, space, buf, bufsize, result);
12586   ;
12587   return 0;
12588 }
12589 _ACEOF
12590 if ac_fn_c_try_compile "$LINENO"; then :
12591   pgac_cv_func_getpwuid_r_5arg=yes
12592 else
12593   pgac_cv_func_getpwuid_r_5arg=no
12594 fi
12595 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12596 fi
12597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_getpwuid_r_5arg" >&5
12598 $as_echo "$pgac_cv_func_getpwuid_r_5arg" >&6; }
12599 if test x"$pgac_cv_func_getpwuid_r_5arg" = xyes ; then
12600
12601 $as_echo "#define GETPWUID_R_5ARG 1" >>confdefs.h
12602
12603 fi
12604
12605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
12606 $as_echo_n "checking whether strerror_r returns int... " >&6; }
12607 if ${pgac_cv_func_strerror_r_int+:} false; then :
12608   $as_echo_n "(cached) " >&6
12609 else
12610   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12611 /* end confdefs.h.  */
12612 #include <string.h>
12613 int
12614 main ()
12615 {
12616 #ifndef _AIX
12617 int strerror_r(int, char *, size_t);
12618 #else
12619 /* Older AIX has 'int' for the third argument so we don't test the args. */
12620 int strerror_r();
12621 #endif
12622   ;
12623   return 0;
12624 }
12625 _ACEOF
12626 if ac_fn_c_try_compile "$LINENO"; then :
12627   pgac_cv_func_strerror_r_int=yes
12628 else
12629   pgac_cv_func_strerror_r_int=no
12630 fi
12631 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12632 fi
12633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
12634 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
12635 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
12636
12637 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
12638
12639 fi
12640
12641
12642 CFLAGS="$_CFLAGS"
12643 LIBS="$_LIBS"
12644
12645 else
12646 # do not use values from template file
12647 PTHREAD_CFLAGS=
12648 PTHREAD_LIBS=
12649 fi
12650
12651
12652
12653
12654
12655 # We can test for libldap_r only after we know PTHREAD_LIBS
12656 if test "$with_ldap" = yes ; then
12657   _LIBS="$LIBS"
12658   if test "$PORTNAME" != "win32"; then
12659     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
12660 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
12661 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
12662   $as_echo_n "(cached) " >&6
12663 else
12664   ac_check_lib_save_LIBS=$LIBS
12665 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
12666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12667 /* end confdefs.h.  */
12668
12669 /* Override any GCC internal prototype to avoid an error.
12670    Use char because int might match the return type of a GCC
12671    builtin and then its argument prototype would still apply.  */
12672 #ifdef __cplusplus
12673 extern "C"
12674 #endif
12675 char ldap_bind ();
12676 int
12677 main ()
12678 {
12679 return ldap_bind ();
12680   ;
12681   return 0;
12682 }
12683 _ACEOF
12684 if ac_fn_c_try_link "$LINENO"; then :
12685   ac_cv_lib_ldap_ldap_bind=yes
12686 else
12687   ac_cv_lib_ldap_ldap_bind=no
12688 fi
12689 rm -f core conftest.err conftest.$ac_objext \
12690     conftest$ac_exeext conftest.$ac_ext
12691 LIBS=$ac_check_lib_save_LIBS
12692 fi
12693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
12694 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
12695 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
12696   cat >>confdefs.h <<_ACEOF
12697 #define HAVE_LIBLDAP 1
12698 _ACEOF
12699
12700   LIBS="-lldap $LIBS"
12701
12702 else
12703   as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
12704 fi
12705
12706     LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
12707     if test "$enable_thread_safety" = yes; then
12708       # on some platforms ldap_r fails to link without PTHREAD_LIBS
12709       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_simple_bind in -lldap_r" >&5
12710 $as_echo_n "checking for ldap_simple_bind in -lldap_r... " >&6; }
12711 if ${ac_cv_lib_ldap_r_ldap_simple_bind+:} false; then :
12712   $as_echo_n "(cached) " >&6
12713 else
12714   ac_check_lib_save_LIBS=$LIBS
12715 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
12716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12717 /* end confdefs.h.  */
12718
12719 /* Override any GCC internal prototype to avoid an error.
12720    Use char because int might match the return type of a GCC
12721    builtin and then its argument prototype would still apply.  */
12722 #ifdef __cplusplus
12723 extern "C"
12724 #endif
12725 char ldap_simple_bind ();
12726 int
12727 main ()
12728 {
12729 return ldap_simple_bind ();
12730   ;
12731   return 0;
12732 }
12733 _ACEOF
12734 if ac_fn_c_try_link "$LINENO"; then :
12735   ac_cv_lib_ldap_r_ldap_simple_bind=yes
12736 else
12737   ac_cv_lib_ldap_r_ldap_simple_bind=no
12738 fi
12739 rm -f core conftest.err conftest.$ac_objext \
12740     conftest$ac_exeext conftest.$ac_ext
12741 LIBS=$ac_check_lib_save_LIBS
12742 fi
12743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
12744 $as_echo "$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
12745 if test "x$ac_cv_lib_ldap_r_ldap_simple_bind" = xyes; then :
12746   cat >>confdefs.h <<_ACEOF
12747 #define HAVE_LIBLDAP_R 1
12748 _ACEOF
12749
12750   LIBS="-lldap_r $LIBS"
12751
12752 else
12753   as_fn_error $? "library 'ldap_r' is required for LDAP" "$LINENO" 5
12754 fi
12755
12756       LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
12757     else
12758       LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
12759     fi
12760   else
12761     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
12762 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
12763 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
12764   $as_echo_n "(cached) " >&6
12765 else
12766   ac_check_lib_save_LIBS=$LIBS
12767 LIBS="-lwldap32  $LIBS"
12768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12769 /* end confdefs.h.  */
12770
12771 /* Override any GCC internal prototype to avoid an error.
12772    Use char because int might match the return type of a GCC
12773    builtin and then its argument prototype would still apply.  */
12774 #ifdef __cplusplus
12775 extern "C"
12776 #endif
12777 char ldap_bind ();
12778 int
12779 main ()
12780 {
12781 return ldap_bind ();
12782   ;
12783   return 0;
12784 }
12785 _ACEOF
12786 if ac_fn_c_try_link "$LINENO"; then :
12787   ac_cv_lib_wldap32_ldap_bind=yes
12788 else
12789   ac_cv_lib_wldap32_ldap_bind=no
12790 fi
12791 rm -f core conftest.err conftest.$ac_objext \
12792     conftest$ac_exeext conftest.$ac_ext
12793 LIBS=$ac_check_lib_save_LIBS
12794 fi
12795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
12796 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
12797 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
12798   cat >>confdefs.h <<_ACEOF
12799 #define HAVE_LIBWLDAP32 1
12800 _ACEOF
12801
12802   LIBS="-lwldap32 $LIBS"
12803
12804 else
12805   as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
12806 fi
12807
12808     LDAP_LIBS_FE="-lwldap32"
12809     LDAP_LIBS_BE="-lwldap32"
12810   fi
12811   LIBS="$_LIBS"
12812 fi
12813
12814
12815
12816
12817 # This test makes sure that run tests work at all.  Sometimes a shared
12818 # library is found by the linker, but the runtime linker can't find it.
12819 # This check should come after all modifications of compiler or linker
12820 # variables, and before any other run tests.
12821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
12822 $as_echo_n "checking test program... " >&6; }
12823 if test "$cross_compiling" = yes; then :
12824   { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
12825 $as_echo "cross-compiling" >&6; }
12826 else
12827   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12828 /* end confdefs.h.  */
12829 int main() { return 0; }
12830 _ACEOF
12831 if ac_fn_c_try_run "$LINENO"; then :
12832   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
12833 $as_echo "ok" >&6; }
12834 else
12835   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
12836 $as_echo "failed" >&6; }
12837 as_fn_error $? "
12838 Could not execute a simple test program.  This may be a problem
12839 related to locating shared libraries.  Check the file 'config.log'
12840 for the exact reason." "$LINENO" 5
12841 fi
12842 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12843   conftest.$ac_objext conftest.beam conftest.$ac_ext
12844 fi
12845
12846
12847 # --------------------
12848 # Run tests below here
12849 # --------------------
12850
12851 # Force use of our snprintf if system's doesn't do arg control
12852 # See comment above at snprintf test for details.
12853 if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
12854   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports argument control" >&5
12855 $as_echo_n "checking whether snprintf supports argument control... " >&6; }
12856 if ${pgac_cv_snprintf_arg_control+:} false; then :
12857   $as_echo_n "(cached) " >&6
12858 else
12859   if test "$cross_compiling" = yes; then :
12860   pgac_cv_snprintf_arg_control=cross
12861 else
12862   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12863 /* end confdefs.h.  */
12864 #include <stdio.h>
12865 #include <string.h>
12866
12867 int main()
12868 {
12869   char buf[100];
12870
12871   /* can it swap arguments? */
12872   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
12873   if (strcmp(buf, "4 3") != 0)
12874     return 1;
12875   return 0;
12876 }
12877 _ACEOF
12878 if ac_fn_c_try_run "$LINENO"; then :
12879   pgac_cv_snprintf_arg_control=yes
12880 else
12881   pgac_cv_snprintf_arg_control=no
12882 fi
12883 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12884   conftest.$ac_objext conftest.beam conftest.$ac_ext
12885 fi
12886
12887
12888 fi
12889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_arg_control" >&5
12890 $as_echo "$pgac_cv_snprintf_arg_control" >&6; }
12891
12892   if test $pgac_cv_snprintf_arg_control != yes ; then
12893     pgac_need_repl_snprintf=yes
12894   fi
12895 fi
12896
12897
12898
12899
12900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
12901 $as_echo_n "checking whether long int is 64 bits... " >&6; }
12902 if ${pgac_cv_type_long_int_64+:} false; then :
12903   $as_echo_n "(cached) " >&6
12904 else
12905   if test "$cross_compiling" = yes; then :
12906   # If cross-compiling, check the size reported by the compiler and
12907 # trust that the arithmetic works.
12908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12909 /* end confdefs.h.  */
12910
12911 int
12912 main ()
12913 {
12914 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
12915 test_array [0] = 0;
12916 return test_array [0];
12917
12918   ;
12919   return 0;
12920 }
12921 _ACEOF
12922 if ac_fn_c_try_compile "$LINENO"; then :
12923   pgac_cv_type_long_int_64=yes
12924 else
12925   pgac_cv_type_long_int_64=no
12926 fi
12927 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12928 else
12929   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12930 /* end confdefs.h.  */
12931 typedef long int ac_int64;
12932
12933 /*
12934  * These are globals to discourage the compiler from folding all the
12935  * arithmetic tests down to compile-time constants.
12936  */
12937 ac_int64 a = 20000001;
12938 ac_int64 b = 40000005;
12939
12940 int does_int64_work()
12941 {
12942   ac_int64 c,d;
12943
12944   if (sizeof(ac_int64) != 8)
12945     return 0;                   /* definitely not the right size */
12946
12947   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
12948   c = a * b;
12949   d = (c + b) / b;
12950   if (d != a+1)
12951     return 0;
12952   return 1;
12953 }
12954 main() {
12955   exit(! does_int64_work());
12956 }
12957 _ACEOF
12958 if ac_fn_c_try_run "$LINENO"; then :
12959   pgac_cv_type_long_int_64=yes
12960 else
12961   pgac_cv_type_long_int_64=no
12962 fi
12963 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12964   conftest.$ac_objext conftest.beam conftest.$ac_ext
12965 fi
12966
12967 fi
12968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
12969 $as_echo "$pgac_cv_type_long_int_64" >&6; }
12970
12971 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
12972 if test x"$pgac_cv_type_long_int_64" = xyes ; then
12973
12974 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
12975
12976 fi
12977
12978
12979 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
12980   pg_int64_type="long int"
12981 else
12982   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
12983 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
12984 if ${pgac_cv_type_long_long_int_64+:} false; then :
12985   $as_echo_n "(cached) " >&6
12986 else
12987   if test "$cross_compiling" = yes; then :
12988   # If cross-compiling, check the size reported by the compiler and
12989 # trust that the arithmetic works.
12990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12991 /* end confdefs.h.  */
12992
12993 int
12994 main ()
12995 {
12996 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
12997 test_array [0] = 0;
12998 return test_array [0];
12999
13000   ;
13001   return 0;
13002 }
13003 _ACEOF
13004 if ac_fn_c_try_compile "$LINENO"; then :
13005   pgac_cv_type_long_long_int_64=yes
13006 else
13007   pgac_cv_type_long_long_int_64=no
13008 fi
13009 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13010 else
13011   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13012 /* end confdefs.h.  */
13013 typedef long long int ac_int64;
13014
13015 /*
13016  * These are globals to discourage the compiler from folding all the
13017  * arithmetic tests down to compile-time constants.
13018  */
13019 ac_int64 a = 20000001;
13020 ac_int64 b = 40000005;
13021
13022 int does_int64_work()
13023 {
13024   ac_int64 c,d;
13025
13026   if (sizeof(ac_int64) != 8)
13027     return 0;                   /* definitely not the right size */
13028
13029   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
13030   c = a * b;
13031   d = (c + b) / b;
13032   if (d != a+1)
13033     return 0;
13034   return 1;
13035 }
13036 main() {
13037   exit(! does_int64_work());
13038 }
13039 _ACEOF
13040 if ac_fn_c_try_run "$LINENO"; then :
13041   pgac_cv_type_long_long_int_64=yes
13042 else
13043   pgac_cv_type_long_long_int_64=no
13044 fi
13045 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13046   conftest.$ac_objext conftest.beam conftest.$ac_ext
13047 fi
13048
13049 fi
13050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
13051 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
13052
13053 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
13054 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
13055
13056 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
13057
13058 fi
13059
13060   if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
13061     pg_int64_type="long long int"
13062   else
13063     as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
13064   fi
13065 fi
13066
13067
13068 cat >>confdefs.h <<_ACEOF
13069 #define PG_INT64_TYPE $pg_int64_type
13070 _ACEOF
13071
13072
13073
13074 if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
13075   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13076 /* end confdefs.h.  */
13077
13078 #define INT64CONST(x)  x##LL
13079 long long int foo = INT64CONST(0x1234567890123456);
13080
13081 int
13082 main ()
13083 {
13084
13085   ;
13086   return 0;
13087 }
13088 _ACEOF
13089 if ac_fn_c_try_compile "$LINENO"; then :
13090
13091 $as_echo "#define HAVE_LL_CONSTANTS 1" >>confdefs.h
13092
13093 fi
13094 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13095 fi
13096
13097
13098 # If we found "long int" is 64 bits, assume snprintf handles it.  If
13099 # we found we need to use "long long int", better check.  We cope with
13100 # snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
13101 # work, fall back to our own snprintf emulation (which we know uses %lld).
13102
13103 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
13104   if test $pgac_need_repl_snprintf = no; then
13105     { $as_echo "$as_me:${as_lineno-$LINENO}: checking snprintf length modifier for long long int" >&5
13106 $as_echo_n "checking snprintf length modifier for long long int... " >&6; }
13107 if ${pgac_cv_snprintf_long_long_int_modifier+:} false; then :
13108   $as_echo_n "(cached) " >&6
13109 else
13110   for pgac_modifier in 'll' 'q' 'I64'; do
13111 if test "$cross_compiling" = yes; then :
13112   pgac_cv_snprintf_long_long_int_modifier=cross; break
13113 else
13114   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13115 /* end confdefs.h.  */
13116 #include <stdio.h>
13117 typedef long long int ac_int64;
13118 #define INT64_FORMAT "%${pgac_modifier}d"
13119
13120 ac_int64 a = 20000001;
13121 ac_int64 b = 40000005;
13122
13123 int does_int64_snprintf_work()
13124 {
13125   ac_int64 c;
13126   char buf[100];
13127
13128   if (sizeof(ac_int64) != 8)
13129     return 0;                   /* doesn't look like the right size */
13130
13131   c = a * b;
13132   snprintf(buf, 100, INT64_FORMAT, c);
13133   if (strcmp(buf, "800000140000005") != 0)
13134     return 0;                   /* either multiply or snprintf is busted */
13135   return 1;
13136 }
13137 main() {
13138   exit(! does_int64_snprintf_work());
13139 }
13140 _ACEOF
13141 if ac_fn_c_try_run "$LINENO"; then :
13142   pgac_cv_snprintf_long_long_int_modifier=$pgac_modifier; break
13143 fi
13144 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13145   conftest.$ac_objext conftest.beam conftest.$ac_ext
13146 fi
13147
13148 done
13149 fi
13150
13151 LONG_LONG_INT_MODIFIER=''
13152
13153 case $pgac_cv_snprintf_long_long_int_modifier in
13154   cross) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot test (not on host machine)" >&5
13155 $as_echo "cannot test (not on host machine)" >&6; };;
13156   ?*)    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_long_long_int_modifier" >&5
13157 $as_echo "$pgac_cv_snprintf_long_long_int_modifier" >&6; }
13158          LONG_LONG_INT_MODIFIER=$pgac_cv_snprintf_long_long_int_modifier;;
13159   *)     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13160 $as_echo "none" >&6; };;
13161 esac
13162     if test "$LONG_LONG_INT_MODIFIER" = ""; then
13163       # Force usage of our own snprintf, since system snprintf is broken
13164       pgac_need_repl_snprintf=yes
13165       LONG_LONG_INT_MODIFIER='ll'
13166     fi
13167   else
13168     # Here if we previously decided we needed to use our own snprintf
13169     LONG_LONG_INT_MODIFIER='ll'
13170   fi
13171 else
13172   # Here if we are not using 'long long int' at all
13173   LONG_LONG_INT_MODIFIER='l'
13174 fi
13175
13176 INT64_MODIFIER="\"$LONG_LONG_INT_MODIFIER\""
13177
13178
13179 cat >>confdefs.h <<_ACEOF
13180 #define INT64_MODIFIER $INT64_MODIFIER
13181 _ACEOF
13182
13183
13184 # Also force use of our snprintf if the system's doesn't support the %z flag.
13185 if test "$pgac_need_repl_snprintf" = no; then
13186   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports the %z modifier" >&5
13187 $as_echo_n "checking whether snprintf supports the %z modifier... " >&6; }
13188 if ${pgac_cv_snprintf_size_t_support+:} false; then :
13189   $as_echo_n "(cached) " >&6
13190 else
13191   if test "$cross_compiling" = yes; then :
13192   pgac_cv_snprintf_size_t_support=cross
13193 else
13194   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13195 /* end confdefs.h.  */
13196 #include <stdio.h>
13197 #include <string.h>
13198
13199 int main()
13200 {
13201   char bufz[100];
13202   char buf64[100];
13203
13204   /*
13205    * Print the largest unsigned number fitting in a size_t using both %zu
13206    * and the previously-determined format for 64-bit integers.  Note that
13207    * we don't run this code unless we know snprintf handles 64-bit ints.
13208    */
13209   bufz[0] = '\0';  /* in case snprintf fails to emit anything */
13210   snprintf(bufz, sizeof(bufz), "%zu", ~((size_t) 0));
13211   snprintf(buf64, sizeof(buf64), "%" INT64_MODIFIER "u",
13212     (unsigned PG_INT64_TYPE) ~((size_t) 0));
13213   if (strcmp(bufz, buf64) != 0)
13214     return 1;
13215   return 0;
13216 }
13217 _ACEOF
13218 if ac_fn_c_try_run "$LINENO"; then :
13219   pgac_cv_snprintf_size_t_support=yes
13220 else
13221   pgac_cv_snprintf_size_t_support=no
13222 fi
13223 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13224   conftest.$ac_objext conftest.beam conftest.$ac_ext
13225 fi
13226
13227
13228 fi
13229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_size_t_support" >&5
13230 $as_echo "$pgac_cv_snprintf_size_t_support" >&6; }
13231
13232   if test "$pgac_cv_snprintf_size_t_support" != yes; then
13233     pgac_need_repl_snprintf=yes
13234   fi
13235 fi
13236
13237 # Now we have checked all the reasons to replace snprintf
13238 if test $pgac_need_repl_snprintf = yes; then
13239
13240 $as_echo "#define USE_REPL_SNPRINTF 1" >>confdefs.h
13241
13242   case " $LIBOBJS " in
13243   *" snprintf.$ac_objext "* ) ;;
13244   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
13245  ;;
13246 esac
13247
13248 fi
13249
13250 # Check size of void *, size_t (enables tweaks for > 32bit address space)
13251 # The cast to long int works around a bug in the HP C Compiler
13252 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13253 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13254 # This bug is HP SR number 8606223364.
13255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
13256 $as_echo_n "checking size of void *... " >&6; }
13257 if ${ac_cv_sizeof_void_p+:} false; then :
13258   $as_echo_n "(cached) " >&6
13259 else
13260   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
13261
13262 else
13263   if test "$ac_cv_type_void_p" = yes; then
13264      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13265 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13266 as_fn_error 77 "cannot compute sizeof (void *)
13267 See \`config.log' for more details" "$LINENO" 5; }
13268    else
13269      ac_cv_sizeof_void_p=0
13270    fi
13271 fi
13272
13273 fi
13274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
13275 $as_echo "$ac_cv_sizeof_void_p" >&6; }
13276
13277
13278
13279 cat >>confdefs.h <<_ACEOF
13280 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
13281 _ACEOF
13282
13283
13284 # The cast to long int works around a bug in the HP C Compiler
13285 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13286 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13287 # This bug is HP SR number 8606223364.
13288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
13289 $as_echo_n "checking size of size_t... " >&6; }
13290 if ${ac_cv_sizeof_size_t+:} false; then :
13291   $as_echo_n "(cached) " >&6
13292 else
13293   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
13294
13295 else
13296   if test "$ac_cv_type_size_t" = yes; then
13297      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13298 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13299 as_fn_error 77 "cannot compute sizeof (size_t)
13300 See \`config.log' for more details" "$LINENO" 5; }
13301    else
13302      ac_cv_sizeof_size_t=0
13303    fi
13304 fi
13305
13306 fi
13307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
13308 $as_echo "$ac_cv_sizeof_size_t" >&6; }
13309
13310
13311
13312 cat >>confdefs.h <<_ACEOF
13313 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
13314 _ACEOF
13315
13316
13317 # The cast to long int works around a bug in the HP C Compiler
13318 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13319 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13320 # This bug is HP SR number 8606223364.
13321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
13322 $as_echo_n "checking size of long... " >&6; }
13323 if ${ac_cv_sizeof_long+:} false; then :
13324   $as_echo_n "(cached) " >&6
13325 else
13326   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
13327
13328 else
13329   if test "$ac_cv_type_long" = yes; then
13330      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13331 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13332 as_fn_error 77 "cannot compute sizeof (long)
13333 See \`config.log' for more details" "$LINENO" 5; }
13334    else
13335      ac_cv_sizeof_long=0
13336    fi
13337 fi
13338
13339 fi
13340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
13341 $as_echo "$ac_cv_sizeof_long" >&6; }
13342
13343
13344
13345 cat >>confdefs.h <<_ACEOF
13346 #define SIZEOF_LONG $ac_cv_sizeof_long
13347 _ACEOF
13348
13349
13350
13351 # Decide whether float4 is passed by value: user-selectable, enabled by default
13352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float4 passed by value" >&5
13353 $as_echo_n "checking whether to build with float4 passed by value... " >&6; }
13354
13355
13356 # Check whether --enable-float4-byval was given.
13357 if test "${enable_float4_byval+set}" = set; then :
13358   enableval=$enable_float4_byval;
13359   case $enableval in
13360     yes)
13361
13362 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
13363
13364                float4passbyval=true
13365       ;;
13366     no)
13367       float4passbyval=false
13368       ;;
13369     *)
13370       as_fn_error $? "no argument expected for --enable-float4-byval option" "$LINENO" 5
13371       ;;
13372   esac
13373
13374 else
13375   enable_float4_byval=yes
13376
13377 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
13378
13379                float4passbyval=true
13380 fi
13381
13382
13383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float4_byval" >&5
13384 $as_echo "$enable_float4_byval" >&6; }
13385
13386 cat >>confdefs.h <<_ACEOF
13387 #define FLOAT4PASSBYVAL $float4passbyval
13388 _ACEOF
13389
13390
13391 # Decide whether float8 is passed by value.
13392 # Note: this setting also controls int8 and related types such as timestamp.
13393 # If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
13394 # If not, trying to select it is an error.
13395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float8 passed by value" >&5
13396 $as_echo_n "checking whether to build with float8 passed by value... " >&6; }
13397 if test $ac_cv_sizeof_void_p -ge 8 ; then
13398
13399
13400 # Check whether --enable-float8-byval was given.
13401 if test "${enable_float8_byval+set}" = set; then :
13402   enableval=$enable_float8_byval;
13403   case $enableval in
13404     yes)
13405       :
13406       ;;
13407     no)
13408       :
13409       ;;
13410     *)
13411       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
13412       ;;
13413   esac
13414
13415 else
13416   enable_float8_byval=yes
13417
13418 fi
13419
13420
13421 else
13422
13423
13424 # Check whether --enable-float8-byval was given.
13425 if test "${enable_float8_byval+set}" = set; then :
13426   enableval=$enable_float8_byval;
13427   case $enableval in
13428     yes)
13429       :
13430       ;;
13431     no)
13432       :
13433       ;;
13434     *)
13435       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
13436       ;;
13437   esac
13438
13439 else
13440   enable_float8_byval=no
13441
13442 fi
13443
13444
13445   if test "$enable_float8_byval" = yes ; then
13446     as_fn_error $? "--enable-float8-byval is not supported on 32-bit platforms." "$LINENO" 5
13447   fi
13448 fi
13449 if test "$enable_float8_byval" = yes ; then
13450
13451 $as_echo "#define USE_FLOAT8_BYVAL 1" >>confdefs.h
13452
13453   float8passbyval=true
13454 else
13455   float8passbyval=false
13456 fi
13457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float8_byval" >&5
13458 $as_echo "$enable_float8_byval" >&6; }
13459
13460 cat >>confdefs.h <<_ACEOF
13461 #define FLOAT8PASSBYVAL $float8passbyval
13462 _ACEOF
13463
13464
13465 # Determine memory alignment requirements for the basic C data types.
13466
13467 # The cast to long int works around a bug in the HP C Compiler,
13468 # see AC_CHECK_SIZEOF for more information.
13469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
13470 $as_echo_n "checking alignment of short... " >&6; }
13471 if ${ac_cv_alignof_short+:} false; then :
13472   $as_echo_n "(cached) " >&6
13473 else
13474   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short"        "$ac_includes_default
13475 #ifndef offsetof
13476 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13477 #endif
13478 typedef struct { char x; short y; } ac__type_alignof_;"; then :
13479
13480 else
13481   if test "$ac_cv_type_short" = yes; then
13482      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13483 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13484 as_fn_error 77 "cannot compute alignment of short
13485 See \`config.log' for more details" "$LINENO" 5; }
13486    else
13487      ac_cv_alignof_short=0
13488    fi
13489 fi
13490
13491 fi
13492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
13493 $as_echo "$ac_cv_alignof_short" >&6; }
13494
13495
13496
13497 cat >>confdefs.h <<_ACEOF
13498 #define ALIGNOF_SHORT $ac_cv_alignof_short
13499 _ACEOF
13500
13501
13502 # The cast to long int works around a bug in the HP C Compiler,
13503 # see AC_CHECK_SIZEOF for more information.
13504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
13505 $as_echo_n "checking alignment of int... " >&6; }
13506 if ${ac_cv_alignof_int+:} false; then :
13507   $as_echo_n "(cached) " >&6
13508 else
13509   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int"        "$ac_includes_default
13510 #ifndef offsetof
13511 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13512 #endif
13513 typedef struct { char x; int y; } ac__type_alignof_;"; then :
13514
13515 else
13516   if test "$ac_cv_type_int" = yes; then
13517      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13518 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13519 as_fn_error 77 "cannot compute alignment of int
13520 See \`config.log' for more details" "$LINENO" 5; }
13521    else
13522      ac_cv_alignof_int=0
13523    fi
13524 fi
13525
13526 fi
13527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
13528 $as_echo "$ac_cv_alignof_int" >&6; }
13529
13530
13531
13532 cat >>confdefs.h <<_ACEOF
13533 #define ALIGNOF_INT $ac_cv_alignof_int
13534 _ACEOF
13535
13536
13537 # The cast to long int works around a bug in the HP C Compiler,
13538 # see AC_CHECK_SIZEOF for more information.
13539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
13540 $as_echo_n "checking alignment of long... " >&6; }
13541 if ${ac_cv_alignof_long+:} false; then :
13542   $as_echo_n "(cached) " >&6
13543 else
13544   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long"        "$ac_includes_default
13545 #ifndef offsetof
13546 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13547 #endif
13548 typedef struct { char x; long y; } ac__type_alignof_;"; then :
13549
13550 else
13551   if test "$ac_cv_type_long" = yes; then
13552      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13553 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13554 as_fn_error 77 "cannot compute alignment of long
13555 See \`config.log' for more details" "$LINENO" 5; }
13556    else
13557      ac_cv_alignof_long=0
13558    fi
13559 fi
13560
13561 fi
13562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
13563 $as_echo "$ac_cv_alignof_long" >&6; }
13564
13565
13566
13567 cat >>confdefs.h <<_ACEOF
13568 #define ALIGNOF_LONG $ac_cv_alignof_long
13569 _ACEOF
13570
13571
13572 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
13573   # The cast to long int works around a bug in the HP C Compiler,
13574 # see AC_CHECK_SIZEOF for more information.
13575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
13576 $as_echo_n "checking alignment of long long int... " >&6; }
13577 if ${ac_cv_alignof_long_long_int+:} false; then :
13578   $as_echo_n "(cached) " >&6
13579 else
13580   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int"        "$ac_includes_default
13581 #ifndef offsetof
13582 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13583 #endif
13584 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
13585
13586 else
13587   if test "$ac_cv_type_long_long_int" = yes; then
13588      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13589 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13590 as_fn_error 77 "cannot compute alignment of long long int
13591 See \`config.log' for more details" "$LINENO" 5; }
13592    else
13593      ac_cv_alignof_long_long_int=0
13594    fi
13595 fi
13596
13597 fi
13598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
13599 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
13600
13601
13602
13603 cat >>confdefs.h <<_ACEOF
13604 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
13605 _ACEOF
13606
13607
13608 fi
13609 # The cast to long int works around a bug in the HP C Compiler,
13610 # see AC_CHECK_SIZEOF for more information.
13611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
13612 $as_echo_n "checking alignment of double... " >&6; }
13613 if ${ac_cv_alignof_double+:} false; then :
13614   $as_echo_n "(cached) " >&6
13615 else
13616   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double"        "$ac_includes_default
13617 #ifndef offsetof
13618 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13619 #endif
13620 typedef struct { char x; double y; } ac__type_alignof_;"; then :
13621
13622 else
13623   if test "$ac_cv_type_double" = yes; then
13624      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13625 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13626 as_fn_error 77 "cannot compute alignment of double
13627 See \`config.log' for more details" "$LINENO" 5; }
13628    else
13629      ac_cv_alignof_double=0
13630    fi
13631 fi
13632
13633 fi
13634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
13635 $as_echo "$ac_cv_alignof_double" >&6; }
13636
13637
13638
13639 cat >>confdefs.h <<_ACEOF
13640 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
13641 _ACEOF
13642
13643
13644
13645 # Compute maximum alignment of any basic type.
13646 # We assume long's alignment is at least as strong as char, short, or int;
13647 # but we must check long long (if it exists) and double.
13648
13649 MAX_ALIGNOF=$ac_cv_alignof_long
13650 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
13651   MAX_ALIGNOF=$ac_cv_alignof_double
13652 fi
13653 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
13654   MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
13655 fi
13656
13657 cat >>confdefs.h <<_ACEOF
13658 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
13659 _ACEOF
13660
13661
13662
13663 # Some platforms predefine the types int8, int16, etc.  Only check
13664 # a (hopefully) representative subset.
13665 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
13666 "
13667 if test "x$ac_cv_type_int8" = xyes; then :
13668
13669 cat >>confdefs.h <<_ACEOF
13670 #define HAVE_INT8 1
13671 _ACEOF
13672
13673
13674 fi
13675 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
13676 "
13677 if test "x$ac_cv_type_uint8" = xyes; then :
13678
13679 cat >>confdefs.h <<_ACEOF
13680 #define HAVE_UINT8 1
13681 _ACEOF
13682
13683
13684 fi
13685 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
13686 "
13687 if test "x$ac_cv_type_int64" = xyes; then :
13688
13689 cat >>confdefs.h <<_ACEOF
13690 #define HAVE_INT64 1
13691 _ACEOF
13692
13693
13694 fi
13695 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
13696 "
13697 if test "x$ac_cv_type_uint64" = xyes; then :
13698
13699 cat >>confdefs.h <<_ACEOF
13700 #define HAVE_UINT64 1
13701 _ACEOF
13702
13703
13704 fi
13705
13706
13707 # We also check for sig_atomic_t, which *should* be defined per ANSI
13708 # C, but is missing on some old platforms.
13709 ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "#include <signal.h>
13710 "
13711 if test "x$ac_cv_type_sig_atomic_t" = xyes; then :
13712
13713 cat >>confdefs.h <<_ACEOF
13714 #define HAVE_SIG_ATOMIC_T 1
13715 _ACEOF
13716
13717
13718 fi
13719
13720
13721 # Check for various atomic operations now that we have checked how to declare
13722 # 64bit integers.
13723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
13724 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
13725 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
13726   $as_echo_n "(cached) " >&6
13727 else
13728   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13729 /* end confdefs.h.  */
13730
13731 int
13732 main ()
13733 {
13734 char lock = 0;
13735    __sync_lock_test_and_set(&lock, 1);
13736    __sync_lock_release(&lock);
13737   ;
13738   return 0;
13739 }
13740 _ACEOF
13741 if ac_fn_c_try_link "$LINENO"; then :
13742   pgac_cv_gcc_sync_char_tas="yes"
13743 else
13744   pgac_cv_gcc_sync_char_tas="no"
13745 fi
13746 rm -f core conftest.err conftest.$ac_objext \
13747     conftest$ac_exeext conftest.$ac_ext
13748 fi
13749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
13750 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
13751 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
13752
13753 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
13754
13755 fi
13756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
13757 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
13758 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
13759   $as_echo_n "(cached) " >&6
13760 else
13761   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13762 /* end confdefs.h.  */
13763
13764 int
13765 main ()
13766 {
13767 int lock = 0;
13768    __sync_lock_test_and_set(&lock, 1);
13769    __sync_lock_release(&lock);
13770   ;
13771   return 0;
13772 }
13773 _ACEOF
13774 if ac_fn_c_try_link "$LINENO"; then :
13775   pgac_cv_gcc_sync_int32_tas="yes"
13776 else
13777   pgac_cv_gcc_sync_int32_tas="no"
13778 fi
13779 rm -f core conftest.err conftest.$ac_objext \
13780     conftest$ac_exeext conftest.$ac_ext
13781 fi
13782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
13783 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
13784 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
13785
13786 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
13787
13788 fi
13789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
13790 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
13791 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
13792   $as_echo_n "(cached) " >&6
13793 else
13794   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13795 /* end confdefs.h.  */
13796
13797 int
13798 main ()
13799 {
13800 int val = 0;
13801    __sync_val_compare_and_swap(&val, 0, 37);
13802   ;
13803   return 0;
13804 }
13805 _ACEOF
13806 if ac_fn_c_try_link "$LINENO"; then :
13807   pgac_cv_gcc_sync_int32_cas="yes"
13808 else
13809   pgac_cv_gcc_sync_int32_cas="no"
13810 fi
13811 rm -f core conftest.err conftest.$ac_objext \
13812     conftest$ac_exeext conftest.$ac_ext
13813 fi
13814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
13815 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
13816 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
13817
13818 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
13819
13820 fi
13821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
13822 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
13823 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
13824   $as_echo_n "(cached) " >&6
13825 else
13826   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13827 /* end confdefs.h.  */
13828
13829 int
13830 main ()
13831 {
13832 PG_INT64_TYPE lock = 0;
13833    __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
13834   ;
13835   return 0;
13836 }
13837 _ACEOF
13838 if ac_fn_c_try_link "$LINENO"; then :
13839   pgac_cv_gcc_sync_int64_cas="yes"
13840 else
13841   pgac_cv_gcc_sync_int64_cas="no"
13842 fi
13843 rm -f core conftest.err conftest.$ac_objext \
13844     conftest$ac_exeext conftest.$ac_ext
13845 fi
13846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
13847 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
13848 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
13849
13850 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
13851
13852 fi
13853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
13854 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
13855 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
13856   $as_echo_n "(cached) " >&6
13857 else
13858   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13859 /* end confdefs.h.  */
13860
13861 int
13862 main ()
13863 {
13864 int val = 0;
13865    int expect = 0;
13866    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
13867   ;
13868   return 0;
13869 }
13870 _ACEOF
13871 if ac_fn_c_try_link "$LINENO"; then :
13872   pgac_cv_gcc_atomic_int32_cas="yes"
13873 else
13874   pgac_cv_gcc_atomic_int32_cas="no"
13875 fi
13876 rm -f core conftest.err conftest.$ac_objext \
13877     conftest$ac_exeext conftest.$ac_ext
13878 fi
13879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
13880 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
13881 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
13882
13883 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
13884
13885 fi
13886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
13887 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
13888 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
13889   $as_echo_n "(cached) " >&6
13890 else
13891   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13892 /* end confdefs.h.  */
13893
13894 int
13895 main ()
13896 {
13897 PG_INT64_TYPE val = 0;
13898    PG_INT64_TYPE expect = 0;
13899    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
13900   ;
13901   return 0;
13902 }
13903 _ACEOF
13904 if ac_fn_c_try_link "$LINENO"; then :
13905   pgac_cv_gcc_atomic_int64_cas="yes"
13906 else
13907   pgac_cv_gcc_atomic_int64_cas="no"
13908 fi
13909 rm -f core conftest.err conftest.$ac_objext \
13910     conftest$ac_exeext conftest.$ac_ext
13911 fi
13912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
13913 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
13914 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
13915
13916 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
13917
13918 fi
13919
13920 if test "$PORTNAME" != "win32"
13921 then
13922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for POSIX signal interface" >&5
13923 $as_echo_n "checking for POSIX signal interface... " >&6; }
13924 if ${pgac_cv_func_posix_signals+:} false; then :
13925   $as_echo_n "(cached) " >&6
13926 else
13927   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13928 /* end confdefs.h.  */
13929 #include <signal.h>
13930
13931 int
13932 main ()
13933 {
13934 struct sigaction act, oact;
13935 sigemptyset(&act.sa_mask);
13936 act.sa_flags = SA_RESTART;
13937 sigaction(0, &act, &oact);
13938   ;
13939   return 0;
13940 }
13941 _ACEOF
13942 if ac_fn_c_try_link "$LINENO"; then :
13943   pgac_cv_func_posix_signals=yes
13944 else
13945   pgac_cv_func_posix_signals=no
13946 fi
13947 rm -f core conftest.err conftest.$ac_objext \
13948     conftest$ac_exeext conftest.$ac_ext
13949 fi
13950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_posix_signals" >&5
13951 $as_echo "$pgac_cv_func_posix_signals" >&6; }
13952 if test x"$pgac_cv_func_posix_signals" = xyes ; then
13953
13954 $as_echo "#define HAVE_POSIX_SIGNALS 1" >>confdefs.h
13955
13956 fi
13957 HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
13958
13959 if test "$pgac_cv_func_posix_signals" != yes -a "$enable_thread_safety" = yes; then
13960   as_fn_error $? "
13961 Thread-safety requires POSIX signals, which are not supported by this
13962 operating system;  use --disable-thread-safety to disable thread safety." "$LINENO" 5
13963 fi
13964 fi
13965
13966
13967 # Select semaphore implementation type.
13968 if test "$PORTNAME" != "win32"; then
13969   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
13970
13971 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
13972
13973     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
13974   else
13975     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
13976
13977 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
13978
13979       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
13980     else
13981
13982 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
13983
13984       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
13985     fi
13986   fi
13987 else
13988
13989 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
13990
13991   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
13992 fi
13993
13994
13995 # Select shared-memory implementation type.
13996 if test "$PORTNAME" != "win32"; then
13997
13998 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
13999
14000   SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
14001 else
14002
14003 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
14004
14005   SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
14006 fi
14007
14008 # Select latch implementation type.
14009 if test "$PORTNAME" != "win32"; then
14010   LATCH_IMPLEMENTATION="src/backend/port/unix_latch.c"
14011 else
14012   LATCH_IMPLEMENTATION="src/backend/port/win32_latch.c"
14013 fi
14014
14015 # If not set in template file, set bytes to use libc memset()
14016 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
14017   MEMSET_LOOP_LIMIT=1024
14018 fi
14019
14020 cat >>confdefs.h <<_ACEOF
14021 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
14022 _ACEOF
14023
14024
14025
14026 if test "$enable_nls" = yes ; then
14027
14028   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
14029 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
14030 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
14031   $as_echo_n "(cached) " >&6
14032 else
14033   ac_func_search_save_LIBS=$LIBS
14034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14035 /* end confdefs.h.  */
14036
14037 /* Override any GCC internal prototype to avoid an error.
14038    Use char because int might match the return type of a GCC
14039    builtin and then its argument prototype would still apply.  */
14040 #ifdef __cplusplus
14041 extern "C"
14042 #endif
14043 char bind_textdomain_codeset ();
14044 int
14045 main ()
14046 {
14047 return bind_textdomain_codeset ();
14048   ;
14049   return 0;
14050 }
14051 _ACEOF
14052 for ac_lib in '' intl; do
14053   if test -z "$ac_lib"; then
14054     ac_res="none required"
14055   else
14056     ac_res=-l$ac_lib
14057     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14058   fi
14059   if ac_fn_c_try_link "$LINENO"; then :
14060   ac_cv_search_bind_textdomain_codeset=$ac_res
14061 fi
14062 rm -f core conftest.err conftest.$ac_objext \
14063     conftest$ac_exeext
14064   if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
14065   break
14066 fi
14067 done
14068 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
14069
14070 else
14071   ac_cv_search_bind_textdomain_codeset=no
14072 fi
14073 rm conftest.$ac_ext
14074 LIBS=$ac_func_search_save_LIBS
14075 fi
14076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
14077 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
14078 ac_res=$ac_cv_search_bind_textdomain_codeset
14079 if test "$ac_res" != no; then :
14080   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14081
14082 else
14083   as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
14084 fi
14085
14086   ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
14087 if test "x$ac_cv_header_libintl_h" = xyes; then :
14088
14089 else
14090   as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
14091 fi
14092
14093
14094   for ac_prog in msgfmt
14095 do
14096   # Extract the first word of "$ac_prog", so it can be a program name with args.
14097 set dummy $ac_prog; ac_word=$2
14098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14099 $as_echo_n "checking for $ac_word... " >&6; }
14100 if ${ac_cv_prog_MSGFMT+:} false; then :
14101   $as_echo_n "(cached) " >&6
14102 else
14103   if test -n "$MSGFMT"; then
14104   ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
14105 else
14106 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14107 for as_dir in $PATH
14108 do
14109   IFS=$as_save_IFS
14110   test -z "$as_dir" && as_dir=.
14111     for ac_exec_ext in '' $ac_executable_extensions; do
14112   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14113     ac_cv_prog_MSGFMT="$ac_prog"
14114     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14115     break 2
14116   fi
14117 done
14118   done
14119 IFS=$as_save_IFS
14120
14121 fi
14122 fi
14123 MSGFMT=$ac_cv_prog_MSGFMT
14124 if test -n "$MSGFMT"; then
14125   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
14126 $as_echo "$MSGFMT" >&6; }
14127 else
14128   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14129 $as_echo "no" >&6; }
14130 fi
14131
14132
14133   test -n "$MSGFMT" && break
14134 done
14135
14136   if test -z "$MSGFMT"; then
14137     as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
14138   fi
14139   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
14140 $as_echo_n "checking for msgfmt flags... " >&6; }
14141 if ${pgac_cv_msgfmt_flags+:} false; then :
14142   $as_echo_n "(cached) " >&6
14143 else
14144   if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
14145     pgac_cv_msgfmt_flags=-c
14146 fi
14147 fi
14148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
14149 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
14150   MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
14151
14152   for ac_prog in msgmerge
14153 do
14154   # Extract the first word of "$ac_prog", so it can be a program name with args.
14155 set dummy $ac_prog; ac_word=$2
14156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14157 $as_echo_n "checking for $ac_word... " >&6; }
14158 if ${ac_cv_prog_MSGMERGE+:} false; then :
14159   $as_echo_n "(cached) " >&6
14160 else
14161   if test -n "$MSGMERGE"; then
14162   ac_cv_prog_MSGMERGE="$MSGMERGE" # Let the user override the test.
14163 else
14164 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14165 for as_dir in $PATH
14166 do
14167   IFS=$as_save_IFS
14168   test -z "$as_dir" && as_dir=.
14169     for ac_exec_ext in '' $ac_executable_extensions; do
14170   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14171     ac_cv_prog_MSGMERGE="$ac_prog"
14172     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14173     break 2
14174   fi
14175 done
14176   done
14177 IFS=$as_save_IFS
14178
14179 fi
14180 fi
14181 MSGMERGE=$ac_cv_prog_MSGMERGE
14182 if test -n "$MSGMERGE"; then
14183   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
14184 $as_echo "$MSGMERGE" >&6; }
14185 else
14186   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14187 $as_echo "no" >&6; }
14188 fi
14189
14190
14191   test -n "$MSGMERGE" && break
14192 done
14193
14194   for ac_prog in xgettext
14195 do
14196   # Extract the first word of "$ac_prog", so it can be a program name with args.
14197 set dummy $ac_prog; ac_word=$2
14198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14199 $as_echo_n "checking for $ac_word... " >&6; }
14200 if ${ac_cv_prog_XGETTEXT+:} false; then :
14201   $as_echo_n "(cached) " >&6
14202 else
14203   if test -n "$XGETTEXT"; then
14204   ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test.
14205 else
14206 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14207 for as_dir in $PATH
14208 do
14209   IFS=$as_save_IFS
14210   test -z "$as_dir" && as_dir=.
14211     for ac_exec_ext in '' $ac_executable_extensions; do
14212   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14213     ac_cv_prog_XGETTEXT="$ac_prog"
14214     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14215     break 2
14216   fi
14217 done
14218   done
14219 IFS=$as_save_IFS
14220
14221 fi
14222 fi
14223 XGETTEXT=$ac_cv_prog_XGETTEXT
14224 if test -n "$XGETTEXT"; then
14225   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
14226 $as_echo "$XGETTEXT" >&6; }
14227 else
14228   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14229 $as_echo "no" >&6; }
14230 fi
14231
14232
14233   test -n "$XGETTEXT" && break
14234 done
14235
14236
14237 fi
14238
14239 # Check for Tcl configuration script tclConfig.sh
14240 if test "$with_tcl" = yes; then
14241     for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84 tclsh8.3 tclsh83
14242 do
14243   # Extract the first word of "$ac_prog", so it can be a program name with args.
14244 set dummy $ac_prog; ac_word=$2
14245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14246 $as_echo_n "checking for $ac_word... " >&6; }
14247 if ${ac_cv_path_TCLSH+:} false; then :
14248   $as_echo_n "(cached) " >&6
14249 else
14250   case $TCLSH in
14251   [\\/]* | ?:[\\/]*)
14252   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
14253   ;;
14254   *)
14255   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14256 for as_dir in $PATH
14257 do
14258   IFS=$as_save_IFS
14259   test -z "$as_dir" && as_dir=.
14260     for ac_exec_ext in '' $ac_executable_extensions; do
14261   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14262     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
14263     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14264     break 2
14265   fi
14266 done
14267   done
14268 IFS=$as_save_IFS
14269
14270   ;;
14271 esac
14272 fi
14273 TCLSH=$ac_cv_path_TCLSH
14274 if test -n "$TCLSH"; then
14275   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
14276 $as_echo "$TCLSH" >&6; }
14277 else
14278   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14279 $as_echo "no" >&6; }
14280 fi
14281
14282
14283   test -n "$TCLSH" && break
14284 done
14285
14286 if test x"$TCLSH" = x""; then
14287   as_fn_error $? "Tcl shell not found" "$LINENO" 5
14288 fi
14289
14290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
14291 $as_echo_n "checking for tclConfig.sh... " >&6; }
14292 # Let user override test
14293 if test -z "$TCL_CONFIG_SH"; then
14294     pgac_test_dirs="$with_tclconfig"
14295
14296     set X $pgac_test_dirs; shift
14297     if test $# -eq 0; then
14298         test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
14299         set X `echo 'puts $auto_path' | $TCLSH`; shift
14300     fi
14301
14302     for pgac_dir do
14303         if test -r "$pgac_dir/tclConfig.sh"; then
14304             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
14305             break
14306         fi
14307     done
14308 fi
14309
14310 if test -z "$TCL_CONFIG_SH"; then
14311     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14312 $as_echo "no" >&6; }
14313     as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
14314 else
14315     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
14316 $as_echo "$TCL_CONFIG_SH" >&6; }
14317 fi
14318
14319
14320
14321     . "$TCL_CONFIG_SH"
14322 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
14323 eval TCL_LIB_FILE=\"$TCL_LIB_FILE\"
14324 eval TCL_LIBS=\"$TCL_LIBS\"
14325 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
14326 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
14327
14328         # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
14329     ac_save_CPPFLAGS=$CPPFLAGS
14330     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
14331     ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
14332 if test "x$ac_cv_header_tcl_h" = xyes; then :
14333
14334 else
14335   as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
14336 fi
14337
14338
14339     CPPFLAGS=$ac_save_CPPFLAGS
14340 fi
14341
14342 # check for <perl.h>
14343 if test "$with_perl" = yes; then
14344   ac_save_CPPFLAGS=$CPPFLAGS
14345   CPPFLAGS="$CPPFLAGS -I$perl_archlibexp/CORE"
14346   ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
14347 "
14348 if test "x$ac_cv_header_perl_h" = xyes; then :
14349
14350 else
14351   as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
14352 fi
14353
14354
14355   # While we're at it, check that we can link to libperl.
14356   # On most platforms, if perl.h is there then libperl.so will be too, but at
14357   # this writing Debian packages them separately.  There is no known reason to
14358   # waste cycles on separate probes for the Tcl or Python libraries, though.
14359   pgac_save_LIBS=$LIBS
14360   LIBS="$perl_embed_ldflags"
14361   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
14362 $as_echo_n "checking for libperl... " >&6; }
14363   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14364 /* end confdefs.h.  */
14365
14366 #include <EXTERN.h>
14367 #include <perl.h>
14368
14369 int
14370 main ()
14371 {
14372 perl_alloc();
14373   ;
14374   return 0;
14375 }
14376 _ACEOF
14377 if ac_fn_c_try_link "$LINENO"; then :
14378   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14379 $as_echo "yes" >&6; }
14380 else
14381   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14382 $as_echo "no" >&6; }
14383      as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
14384 fi
14385 rm -f core conftest.err conftest.$ac_objext \
14386     conftest$ac_exeext conftest.$ac_ext
14387   LIBS=$pgac_save_LIBS
14388   CPPFLAGS=$ac_save_CPPFLAGS
14389 fi
14390
14391 # check for <Python.h>
14392 if test "$with_python" = yes; then
14393   ac_save_CPPFLAGS=$CPPFLAGS
14394   CPPFLAGS="$python_includespec $CPPFLAGS"
14395   ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
14396 if test "x$ac_cv_header_Python_h" = xyes; then :
14397
14398 else
14399   as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
14400 fi
14401
14402
14403   CPPFLAGS=$ac_save_CPPFLAGS
14404 fi
14405
14406 #
14407 # Check for DocBook and tools
14408 #
14409 for ac_prog in onsgmls nsgmls
14410 do
14411   # Extract the first word of "$ac_prog", so it can be a program name with args.
14412 set dummy $ac_prog; ac_word=$2
14413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14414 $as_echo_n "checking for $ac_word... " >&6; }
14415 if ${ac_cv_prog_NSGMLS+:} false; then :
14416   $as_echo_n "(cached) " >&6
14417 else
14418   if test -n "$NSGMLS"; then
14419   ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
14420 else
14421 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14422 for as_dir in $PATH
14423 do
14424   IFS=$as_save_IFS
14425   test -z "$as_dir" && as_dir=.
14426     for ac_exec_ext in '' $ac_executable_extensions; do
14427   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14428     ac_cv_prog_NSGMLS="$ac_prog"
14429     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14430     break 2
14431   fi
14432 done
14433   done
14434 IFS=$as_save_IFS
14435
14436 fi
14437 fi
14438 NSGMLS=$ac_cv_prog_NSGMLS
14439 if test -n "$NSGMLS"; then
14440   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NSGMLS" >&5
14441 $as_echo "$NSGMLS" >&6; }
14442 else
14443   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14444 $as_echo "no" >&6; }
14445 fi
14446
14447
14448   test -n "$NSGMLS" && break
14449 done
14450
14451 for ac_prog in openjade jade
14452 do
14453   # Extract the first word of "$ac_prog", so it can be a program name with args.
14454 set dummy $ac_prog; ac_word=$2
14455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14456 $as_echo_n "checking for $ac_word... " >&6; }
14457 if ${ac_cv_prog_JADE+:} false; then :
14458   $as_echo_n "(cached) " >&6
14459 else
14460   if test -n "$JADE"; then
14461   ac_cv_prog_JADE="$JADE" # Let the user override the test.
14462 else
14463 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14464 for as_dir in $PATH
14465 do
14466   IFS=$as_save_IFS
14467   test -z "$as_dir" && as_dir=.
14468     for ac_exec_ext in '' $ac_executable_extensions; do
14469   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14470     ac_cv_prog_JADE="$ac_prog"
14471     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14472     break 2
14473   fi
14474 done
14475   done
14476 IFS=$as_save_IFS
14477
14478 fi
14479 fi
14480 JADE=$ac_cv_prog_JADE
14481 if test -n "$JADE"; then
14482   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JADE" >&5
14483 $as_echo "$JADE" >&6; }
14484 else
14485   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14486 $as_echo "no" >&6; }
14487 fi
14488
14489
14490   test -n "$JADE" && break
14491 done
14492
14493
14494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook V4.2" >&5
14495 $as_echo_n "checking for DocBook V4.2... " >&6; }
14496 if ${pgac_cv_check_docbook+:} false; then :
14497   $as_echo_n "(cached) " >&6
14498 else
14499   cat >conftest.sgml <<EOF
14500 <!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
14501 <book>
14502  <title>test</title>
14503  <chapter>
14504   <title>random</title>
14505    <sect1>
14506     <title>testsect</title>
14507     <para>text</para>
14508   </sect1>
14509  </chapter>
14510 </book>
14511 EOF
14512
14513 pgac_cv_check_docbook=no
14514
14515 if test -n "$NSGMLS"; then
14516   $NSGMLS -s conftest.sgml 1>&5 2>&1
14517   if test $? -eq 0; then
14518     pgac_cv_check_docbook=yes
14519   fi
14520 fi
14521 rm -f conftest.sgml
14522 fi
14523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_docbook" >&5
14524 $as_echo "$pgac_cv_check_docbook" >&6; }
14525
14526 have_docbook=$pgac_cv_check_docbook
14527
14528
14529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook stylesheets" >&5
14530 $as_echo_n "checking for DocBook stylesheets... " >&6; }
14531 if ${pgac_cv_path_stylesheets+:} false; then :
14532   $as_echo_n "(cached) " >&6
14533 else
14534   if test -n "$DOCBOOKSTYLE"; then
14535   pgac_cv_path_stylesheets=$DOCBOOKSTYLE
14536 else
14537   for pgac_prefix in /usr /usr/local /opt /sw; do
14538     for pgac_infix in share lib; do
14539       for pgac_postfix in \
14540         sgml/stylesheets/nwalsh-modular \
14541         sgml/stylesheets/docbook \
14542         sgml/stylesheets/dsssl/docbook \
14543         sgml/docbook-dsssl \
14544         sgml/docbook/dsssl/modular \
14545         sgml/docbook/stylesheet/dsssl/modular \
14546         sgml/docbook/dsssl-stylesheets \
14547         sgml/dsssl/docbook-dsssl-nwalsh
14548       do
14549         pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
14550         if test -r "$pgac_candidate/html/docbook.dsl" \
14551            && test -r "$pgac_candidate/print/docbook.dsl"
14552         then
14553           pgac_cv_path_stylesheets=$pgac_candidate
14554           break 3
14555         fi
14556       done
14557     done
14558   done
14559 fi
14560 fi
14561
14562 DOCBOOKSTYLE=$pgac_cv_path_stylesheets
14563
14564 if test -n "$DOCBOOKSTYLE"; then
14565   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOCBOOKSTYLE" >&5
14566 $as_echo "$DOCBOOKSTYLE" >&6; }
14567 else
14568   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14569 $as_echo "no" >&6; }
14570 fi
14571 if test -n "$DOCBOOKSTYLE" -a -r "$DOCBOOKSTYLE/bin/collateindex.pl"; then
14572   COLLATEINDEX="$DOCBOOKSTYLE/bin/collateindex.pl"
14573
14574 else
14575   # Extract the first word of "collateindex.pl", so it can be a program name with args.
14576 set dummy collateindex.pl; ac_word=$2
14577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14578 $as_echo_n "checking for $ac_word... " >&6; }
14579 if ${ac_cv_path_COLLATEINDEX+:} false; then :
14580   $as_echo_n "(cached) " >&6
14581 else
14582   case $COLLATEINDEX in
14583   [\\/]* | ?:[\\/]*)
14584   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
14585   ;;
14586   *)
14587   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14588 for as_dir in $PATH
14589 do
14590   IFS=$as_save_IFS
14591   test -z "$as_dir" && as_dir=.
14592     for ac_exec_ext in '' $ac_executable_extensions; do
14593   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14594     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
14595     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14596     break 2
14597   fi
14598 done
14599   done
14600 IFS=$as_save_IFS
14601
14602   ;;
14603 esac
14604 fi
14605 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
14606 if test -n "$COLLATEINDEX"; then
14607   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COLLATEINDEX" >&5
14608 $as_echo "$COLLATEINDEX" >&6; }
14609 else
14610   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14611 $as_echo "no" >&6; }
14612 fi
14613
14614
14615 fi
14616 for ac_prog in dbtoepub
14617 do
14618   # Extract the first word of "$ac_prog", so it can be a program name with args.
14619 set dummy $ac_prog; ac_word=$2
14620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14621 $as_echo_n "checking for $ac_word... " >&6; }
14622 if ${ac_cv_prog_DBTOEPUB+:} false; then :
14623   $as_echo_n "(cached) " >&6
14624 else
14625   if test -n "$DBTOEPUB"; then
14626   ac_cv_prog_DBTOEPUB="$DBTOEPUB" # Let the user override the test.
14627 else
14628 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14629 for as_dir in $PATH
14630 do
14631   IFS=$as_save_IFS
14632   test -z "$as_dir" && as_dir=.
14633     for ac_exec_ext in '' $ac_executable_extensions; do
14634   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14635     ac_cv_prog_DBTOEPUB="$ac_prog"
14636     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14637     break 2
14638   fi
14639 done
14640   done
14641 IFS=$as_save_IFS
14642
14643 fi
14644 fi
14645 DBTOEPUB=$ac_cv_prog_DBTOEPUB
14646 if test -n "$DBTOEPUB"; then
14647   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
14648 $as_echo "$DBTOEPUB" >&6; }
14649 else
14650   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14651 $as_echo "no" >&6; }
14652 fi
14653
14654
14655   test -n "$DBTOEPUB" && break
14656 done
14657
14658 for ac_prog in xmllint
14659 do
14660   # Extract the first word of "$ac_prog", so it can be a program name with args.
14661 set dummy $ac_prog; ac_word=$2
14662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14663 $as_echo_n "checking for $ac_word... " >&6; }
14664 if ${ac_cv_prog_XMLLINT+:} false; then :
14665   $as_echo_n "(cached) " >&6
14666 else
14667   if test -n "$XMLLINT"; then
14668   ac_cv_prog_XMLLINT="$XMLLINT" # Let the user override the test.
14669 else
14670 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14671 for as_dir in $PATH
14672 do
14673   IFS=$as_save_IFS
14674   test -z "$as_dir" && as_dir=.
14675     for ac_exec_ext in '' $ac_executable_extensions; do
14676   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14677     ac_cv_prog_XMLLINT="$ac_prog"
14678     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14679     break 2
14680   fi
14681 done
14682   done
14683 IFS=$as_save_IFS
14684
14685 fi
14686 fi
14687 XMLLINT=$ac_cv_prog_XMLLINT
14688 if test -n "$XMLLINT"; then
14689   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
14690 $as_echo "$XMLLINT" >&6; }
14691 else
14692   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14693 $as_echo "no" >&6; }
14694 fi
14695
14696
14697   test -n "$XMLLINT" && break
14698 done
14699
14700 for ac_prog in xsltproc
14701 do
14702   # Extract the first word of "$ac_prog", so it can be a program name with args.
14703 set dummy $ac_prog; ac_word=$2
14704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14705 $as_echo_n "checking for $ac_word... " >&6; }
14706 if ${ac_cv_prog_XSLTPROC+:} false; then :
14707   $as_echo_n "(cached) " >&6
14708 else
14709   if test -n "$XSLTPROC"; then
14710   ac_cv_prog_XSLTPROC="$XSLTPROC" # Let the user override the test.
14711 else
14712 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14713 for as_dir in $PATH
14714 do
14715   IFS=$as_save_IFS
14716   test -z "$as_dir" && as_dir=.
14717     for ac_exec_ext in '' $ac_executable_extensions; do
14718   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14719     ac_cv_prog_XSLTPROC="$ac_prog"
14720     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14721     break 2
14722   fi
14723 done
14724   done
14725 IFS=$as_save_IFS
14726
14727 fi
14728 fi
14729 XSLTPROC=$ac_cv_prog_XSLTPROC
14730 if test -n "$XSLTPROC"; then
14731   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
14732 $as_echo "$XSLTPROC" >&6; }
14733 else
14734   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14735 $as_echo "no" >&6; }
14736 fi
14737
14738
14739   test -n "$XSLTPROC" && break
14740 done
14741
14742 for ac_prog in osx sgml2xml sx
14743 do
14744   # Extract the first word of "$ac_prog", so it can be a program name with args.
14745 set dummy $ac_prog; ac_word=$2
14746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14747 $as_echo_n "checking for $ac_word... " >&6; }
14748 if ${ac_cv_prog_OSX+:} false; then :
14749   $as_echo_n "(cached) " >&6
14750 else
14751   if test -n "$OSX"; then
14752   ac_cv_prog_OSX="$OSX" # Let the user override the test.
14753 else
14754 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14755 for as_dir in $PATH
14756 do
14757   IFS=$as_save_IFS
14758   test -z "$as_dir" && as_dir=.
14759     for ac_exec_ext in '' $ac_executable_extensions; do
14760   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14761     ac_cv_prog_OSX="$ac_prog"
14762     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14763     break 2
14764   fi
14765 done
14766   done
14767 IFS=$as_save_IFS
14768
14769 fi
14770 fi
14771 OSX=$ac_cv_prog_OSX
14772 if test -n "$OSX"; then
14773   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OSX" >&5
14774 $as_echo "$OSX" >&6; }
14775 else
14776   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14777 $as_echo "no" >&6; }
14778 fi
14779
14780
14781   test -n "$OSX" && break
14782 done
14783
14784
14785 #
14786 # Check for test tools
14787 #
14788 for ac_prog in prove
14789 do
14790   # Extract the first word of "$ac_prog", so it can be a program name with args.
14791 set dummy $ac_prog; ac_word=$2
14792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14793 $as_echo_n "checking for $ac_word... " >&6; }
14794 if ${ac_cv_prog_PROVE+:} false; then :
14795   $as_echo_n "(cached) " >&6
14796 else
14797   if test -n "$PROVE"; then
14798   ac_cv_prog_PROVE="$PROVE" # Let the user override the test.
14799 else
14800 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14801 for as_dir in $PATH
14802 do
14803   IFS=$as_save_IFS
14804   test -z "$as_dir" && as_dir=.
14805     for ac_exec_ext in '' $ac_executable_extensions; do
14806   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14807     ac_cv_prog_PROVE="$ac_prog"
14808     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14809     break 2
14810   fi
14811 done
14812   done
14813 IFS=$as_save_IFS
14814
14815 fi
14816 fi
14817 PROVE=$ac_cv_prog_PROVE
14818 if test -n "$PROVE"; then
14819   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
14820 $as_echo "$PROVE" >&6; }
14821 else
14822   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14823 $as_echo "no" >&6; }
14824 fi
14825
14826
14827   test -n "$PROVE" && break
14828 done
14829
14830
14831 # Thread testing
14832
14833 # We have to run the thread test near the end so we have all our symbols
14834 # defined.  Cross compiling throws a warning.
14835 #
14836 if test "$enable_thread_safety" = yes; then
14837 if test "$PORTNAME" != "win32"
14838 then
14839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking thread safety of required library functions" >&5
14840 $as_echo_n "checking thread safety of required library functions... " >&6; }
14841
14842 _CFLAGS="$CFLAGS"
14843 _LIBS="$LIBS"
14844 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
14845 LIBS="$LIBS $PTHREAD_LIBS"
14846 if test "$cross_compiling" = yes; then :
14847   { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
14848 $as_echo "maybe" >&6; }
14849   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
14850 *** Skipping thread test program because of cross-compile build.
14851 *** Run the program in src/test/thread on the target machine.
14852 " >&5
14853 $as_echo "$as_me: WARNING:
14854 *** Skipping thread test program because of cross-compile build.
14855 *** Run the program in src/test/thread on the target machine.
14856 " >&2;}
14857 else
14858   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14859 /* end confdefs.h.  */
14860 #include "$srcdir/src/test/thread/thread_test.c"
14861 _ACEOF
14862 if ac_fn_c_try_run "$LINENO"; then :
14863   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14864 $as_echo "yes" >&6; }
14865 else
14866   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14867 $as_echo "no" >&6; }
14868   as_fn_error $? "thread test program failed
14869 This platform is not thread-safe.  Check the file 'config.log' or compile
14870 and run src/test/thread/thread_test for the exact reason.
14871 Use --disable-thread-safety to disable thread safety." "$LINENO" 5
14872 fi
14873 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14874   conftest.$ac_objext conftest.beam conftest.$ac_ext
14875 fi
14876
14877 CFLAGS="$_CFLAGS"
14878 LIBS="$_LIBS"
14879 else
14880 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** skipping thread test on Win32" >&5
14881 $as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
14882 fi
14883 fi
14884
14885 # If compiler will take -Wl,--as-needed (or various platform-specific
14886 # spellings thereof) then add that to LDFLAGS.  This is much easier than
14887 # trying to filter LIBS to the minimum for each executable.
14888 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
14889 # libreadline; therefore we postpone testing it until we know what library
14890 # dependencies readline has.  The test code will try to link with $LIBS.
14891 if test "$with_readline" = yes; then
14892   link_test_func=readline
14893 else
14894   link_test_func=exit
14895 fi
14896
14897 if test "$PORTNAME" = "darwin"; then
14898   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
14899 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
14900 if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
14901   $as_echo_n "(cached) " >&6
14902 else
14903   pgac_save_LDFLAGS=$LDFLAGS
14904 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
14905 if test "$cross_compiling" = yes; then :
14906   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
14907 else
14908   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14909 /* end confdefs.h.  */
14910 extern void $link_test_func (); void (*fptr) () = $link_test_func;
14911 int
14912 main ()
14913 {
14914
14915   ;
14916   return 0;
14917 }
14918 _ACEOF
14919 if ac_fn_c_try_run "$LINENO"; then :
14920   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
14921 else
14922   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
14923 fi
14924 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14925   conftest.$ac_objext conftest.beam conftest.$ac_ext
14926 fi
14927
14928 LDFLAGS="$pgac_save_LDFLAGS"
14929 fi
14930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
14931 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
14932 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
14933   LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
14934 fi
14935
14936 elif test "$PORTNAME" = "openbsd"; then
14937   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
14938 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
14939 if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
14940   $as_echo_n "(cached) " >&6
14941 else
14942   pgac_save_LDFLAGS=$LDFLAGS
14943 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
14944 if test "$cross_compiling" = yes; then :
14945   pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
14946 else
14947   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14948 /* end confdefs.h.  */
14949 extern void $link_test_func (); void (*fptr) () = $link_test_func;
14950 int
14951 main ()
14952 {
14953
14954   ;
14955   return 0;
14956 }
14957 _ACEOF
14958 if ac_fn_c_try_run "$LINENO"; then :
14959   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
14960 else
14961   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
14962 fi
14963 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14964   conftest.$ac_objext conftest.beam conftest.$ac_ext
14965 fi
14966
14967 LDFLAGS="$pgac_save_LDFLAGS"
14968 fi
14969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
14970 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
14971 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
14972   LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
14973 fi
14974
14975 else
14976   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
14977 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
14978 if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
14979   $as_echo_n "(cached) " >&6
14980 else
14981   pgac_save_LDFLAGS=$LDFLAGS
14982 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
14983 if test "$cross_compiling" = yes; then :
14984   pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
14985 else
14986   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14987 /* end confdefs.h.  */
14988 extern void $link_test_func (); void (*fptr) () = $link_test_func;
14989 int
14990 main ()
14991 {
14992
14993   ;
14994   return 0;
14995 }
14996 _ACEOF
14997 if ac_fn_c_try_run "$LINENO"; then :
14998   pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
14999 else
15000   pgac_cv_prog_cc_ldflags__Wl___as_needed=no
15001 fi
15002 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15003   conftest.$ac_objext conftest.beam conftest.$ac_ext
15004 fi
15005
15006 LDFLAGS="$pgac_save_LDFLAGS"
15007 fi
15008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
15009 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
15010 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
15011   LDFLAGS="$LDFLAGS -Wl,--as-needed"
15012 fi
15013
15014 fi
15015
15016 # Create compiler version string
15017 if test x"$GCC" = x"yes" ; then
15018   cc_string=`${CC} --version | sed q`
15019   case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
15020 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
15021   cc_string=`${CC} -V 2>&1 | sed q`
15022 else
15023   cc_string=$CC
15024 fi
15025
15026
15027 cat >>confdefs.h <<_ACEOF
15028 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
15029 _ACEOF
15030
15031
15032 # Supply a numeric version string for use by 3rd party add-ons
15033 # awk -F is a regex on some platforms, and not on others, so make "." a tab
15034 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
15035 tr '.' '        ' |
15036 $AWK '{printf "%d%02d%02d", $1, $2, (NF >= 3) ? $3 : 0}'`"
15037
15038 cat >>confdefs.h <<_ACEOF
15039 #define PG_VERSION_NUM $PG_VERSION_NUM
15040 _ACEOF
15041
15042
15043
15044 # Begin output steps
15045
15046 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
15047 $as_echo "$as_me: using compiler=$cc_string" >&6;}
15048 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
15049 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
15050 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
15051 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
15052 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
15053 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
15054
15055 # prepare build tree if outside source tree
15056 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
15057 # Note 2: /bin/pwd might be better than shell's built-in at getting
15058 #         a symlink-free name.
15059 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
15060   vpath_build=no
15061 else
15062   vpath_build=yes
15063   if test "$no_create" != yes; then
15064     $as_echo_n "preparing build tree... " >&6
15065     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
15066     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
15067       || as_fn_error $? "failed" "$LINENO" 5
15068     { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15069 $as_echo "done" >&6; }
15070   fi
15071 fi
15072
15073
15074
15075 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
15076
15077
15078 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}"
15079
15080
15081 if test "$PORTNAME" = "win32"; then
15082 ac_config_commands="$ac_config_commands check_win32_symlinks"
15083
15084 fi
15085
15086 ac_config_headers="$ac_config_headers src/include/pg_config.h"
15087
15088
15089 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
15090
15091
15092 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
15093
15094
15095 cat >confcache <<\_ACEOF
15096 # This file is a shell script that caches the results of configure
15097 # tests run on this system so they can be shared between configure
15098 # scripts and configure runs, see configure's option --config-cache.
15099 # It is not useful on other systems.  If it contains results you don't
15100 # want to keep, you may remove or edit it.
15101 #
15102 # config.status only pays attention to the cache file if you give it
15103 # the --recheck option to rerun configure.
15104 #
15105 # `ac_cv_env_foo' variables (set or unset) will be overridden when
15106 # loading this file, other *unset* `ac_cv_foo' will be assigned the
15107 # following values.
15108
15109 _ACEOF
15110
15111 # The following way of writing the cache mishandles newlines in values,
15112 # but we know of no workaround that is simple, portable, and efficient.
15113 # So, we kill variables containing newlines.
15114 # Ultrix sh set writes to stderr and can't be redirected directly,
15115 # and sets the high bit in the cache file unless we assign to the vars.
15116 (
15117   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15118     eval ac_val=\$$ac_var
15119     case $ac_val in #(
15120     *${as_nl}*)
15121       case $ac_var in #(
15122       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15123 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
15124       esac
15125       case $ac_var in #(
15126       _ | IFS | as_nl) ;; #(
15127       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15128       *) { eval $ac_var=; unset $ac_var;} ;;
15129       esac ;;
15130     esac
15131   done
15132
15133   (set) 2>&1 |
15134     case $as_nl`(ac_space=' '; set) 2>&1` in #(
15135     *${as_nl}ac_space=\ *)
15136       # `set' does not quote correctly, so add quotes: double-quote
15137       # substitution turns \\\\ into \\, and sed turns \\ into \.
15138       sed -n \
15139         "s/'/'\\\\''/g;
15140           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15141       ;; #(
15142     *)
15143       # `set' quotes correctly as required by POSIX, so do not add quotes.
15144       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
15145       ;;
15146     esac |
15147     sort
15148 ) |
15149   sed '
15150      /^ac_cv_env_/b end
15151      t clear
15152      :clear
15153      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15154      t end
15155      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15156      :end' >>confcache
15157 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15158   if test -w "$cache_file"; then
15159     if test "x$cache_file" != "x/dev/null"; then
15160       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15161 $as_echo "$as_me: updating cache $cache_file" >&6;}
15162       if test ! -f "$cache_file" || test -h "$cache_file"; then
15163         cat confcache >"$cache_file"
15164       else
15165         case $cache_file in #(
15166         */* | ?:*)
15167           mv -f confcache "$cache_file"$$ &&
15168           mv -f "$cache_file"$$ "$cache_file" ;; #(
15169         *)
15170           mv -f confcache "$cache_file" ;;
15171         esac
15172       fi
15173     fi
15174   else
15175     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15176 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
15177   fi
15178 fi
15179 rm -f confcache
15180
15181 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15182 # Let make expand exec_prefix.
15183 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15184
15185 DEFS=-DHAVE_CONFIG_H
15186
15187 ac_libobjs=
15188 ac_ltlibobjs=
15189 U=
15190 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15191   # 1. Remove the extension, and $U if already installed.
15192   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
15193   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
15194   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
15195   #    will be set to the directory where LIBOBJS objects are built.
15196   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15197   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
15198 done
15199 LIBOBJS=$ac_libobjs
15200
15201 LTLIBOBJS=$ac_ltlibobjs
15202
15203
15204
15205
15206 : "${CONFIG_STATUS=./config.status}"
15207 ac_write_fail=0
15208 ac_clean_files_save=$ac_clean_files
15209 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15210 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15211 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15212 as_write_fail=0
15213 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
15214 #! $SHELL
15215 # Generated by $as_me.
15216 # Run this file to recreate the current configuration.
15217 # Compiler output produced by configure, useful for debugging
15218 # configure, is in config.log if it exists.
15219
15220 debug=false
15221 ac_cs_recheck=false
15222 ac_cs_silent=false
15223
15224 SHELL=\${CONFIG_SHELL-$SHELL}
15225 export SHELL
15226 _ASEOF
15227 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15228 ## -------------------- ##
15229 ## M4sh Initialization. ##
15230 ## -------------------- ##
15231
15232 # Be more Bourne compatible
15233 DUALCASE=1; export DUALCASE # for MKS sh
15234 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
15235   emulate sh
15236   NULLCMD=:
15237   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
15238   # is contrary to our usage.  Disable this feature.
15239   alias -g '${1+"$@"}'='"$@"'
15240   setopt NO_GLOB_SUBST
15241 else
15242   case `(set -o) 2>/dev/null` in #(
15243   *posix*) :
15244     set -o posix ;; #(
15245   *) :
15246      ;;
15247 esac
15248 fi
15249
15250
15251 as_nl='
15252 '
15253 export as_nl
15254 # Printing a long string crashes Solaris 7 /usr/bin/printf.
15255 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15256 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15257 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15258 # Prefer a ksh shell builtin over an external printf program on Solaris,
15259 # but without wasting forks for bash or zsh.
15260 if test -z "$BASH_VERSION$ZSH_VERSION" \
15261     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15262   as_echo='print -r --'
15263   as_echo_n='print -rn --'
15264 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15265   as_echo='printf %s\n'
15266   as_echo_n='printf %s'
15267 else
15268   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15269     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15270     as_echo_n='/usr/ucb/echo -n'
15271   else
15272     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15273     as_echo_n_body='eval
15274       arg=$1;
15275       case $arg in #(
15276       *"$as_nl"*)
15277         expr "X$arg" : "X\\(.*\\)$as_nl";
15278         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15279       esac;
15280       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15281     '
15282     export as_echo_n_body
15283     as_echo_n='sh -c $as_echo_n_body as_echo'
15284   fi
15285   export as_echo_body
15286   as_echo='sh -c $as_echo_body as_echo'
15287 fi
15288
15289 # The user is always right.
15290 if test "${PATH_SEPARATOR+set}" != set; then
15291   PATH_SEPARATOR=:
15292   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15293     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15294       PATH_SEPARATOR=';'
15295   }
15296 fi
15297
15298
15299 # IFS
15300 # We need space, tab and new line, in precisely that order.  Quoting is
15301 # there to prevent editors from complaining about space-tab.
15302 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
15303 # splitting by setting IFS to empty value.)
15304 IFS=" ""        $as_nl"
15305
15306 # Find who we are.  Look in the path if we contain no directory separator.
15307 as_myself=
15308 case $0 in #((
15309   *[\\/]* ) as_myself=$0 ;;
15310   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15311 for as_dir in $PATH
15312 do
15313   IFS=$as_save_IFS
15314   test -z "$as_dir" && as_dir=.
15315     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15316   done
15317 IFS=$as_save_IFS
15318
15319      ;;
15320 esac
15321 # We did not find ourselves, most probably we were run as `sh COMMAND'
15322 # in which case we are not to be found in the path.
15323 if test "x$as_myself" = x; then
15324   as_myself=$0
15325 fi
15326 if test ! -f "$as_myself"; then
15327   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15328   exit 1
15329 fi
15330
15331 # Unset variables that we do not need and which cause bugs (e.g. in
15332 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
15333 # suppresses any "Segmentation fault" message there.  '((' could
15334 # trigger a bug in pdksh 5.2.14.
15335 for as_var in BASH_ENV ENV MAIL MAILPATH
15336 do eval test x\${$as_var+set} = xset \
15337   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
15338 done
15339 PS1='$ '
15340 PS2='> '
15341 PS4='+ '
15342
15343 # NLS nuisances.
15344 LC_ALL=C
15345 export LC_ALL
15346 LANGUAGE=C
15347 export LANGUAGE
15348
15349 # CDPATH.
15350 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15351
15352
15353 # as_fn_error STATUS ERROR [LINENO LOG_FD]
15354 # ----------------------------------------
15355 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15356 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
15357 # script with STATUS, using 1 if that was 0.
15358 as_fn_error ()
15359 {
15360   as_status=$1; test $as_status -eq 0 && as_status=1
15361   if test "$4"; then
15362     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15363     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
15364   fi
15365   $as_echo "$as_me: error: $2" >&2
15366   as_fn_exit $as_status
15367 } # as_fn_error
15368
15369
15370 # as_fn_set_status STATUS
15371 # -----------------------
15372 # Set $? to STATUS, without forking.
15373 as_fn_set_status ()
15374 {
15375   return $1
15376 } # as_fn_set_status
15377
15378 # as_fn_exit STATUS
15379 # -----------------
15380 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15381 as_fn_exit ()
15382 {
15383   set +e
15384   as_fn_set_status $1
15385   exit $1
15386 } # as_fn_exit
15387
15388 # as_fn_unset VAR
15389 # ---------------
15390 # Portably unset VAR.
15391 as_fn_unset ()
15392 {
15393   { eval $1=; unset $1;}
15394 }
15395 as_unset=as_fn_unset
15396 # as_fn_append VAR VALUE
15397 # ----------------------
15398 # Append the text in VALUE to the end of the definition contained in VAR. Take
15399 # advantage of any shell optimizations that allow amortized linear growth over
15400 # repeated appends, instead of the typical quadratic growth present in naive
15401 # implementations.
15402 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15403   eval 'as_fn_append ()
15404   {
15405     eval $1+=\$2
15406   }'
15407 else
15408   as_fn_append ()
15409   {
15410     eval $1=\$$1\$2
15411   }
15412 fi # as_fn_append
15413
15414 # as_fn_arith ARG...
15415 # ------------------
15416 # Perform arithmetic evaluation on the ARGs, and store the result in the
15417 # global $as_val. Take advantage of shells that can avoid forks. The arguments
15418 # must be portable across $(()) and expr.
15419 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15420   eval 'as_fn_arith ()
15421   {
15422     as_val=$(( $* ))
15423   }'
15424 else
15425   as_fn_arith ()
15426   {
15427     as_val=`expr "$@" || test $? -eq 1`
15428   }
15429 fi # as_fn_arith
15430
15431
15432 if expr a : '\(a\)' >/dev/null 2>&1 &&
15433    test "X`expr 00001 : '.*\(...\)'`" = X001; then
15434   as_expr=expr
15435 else
15436   as_expr=false
15437 fi
15438
15439 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15440   as_basename=basename
15441 else
15442   as_basename=false
15443 fi
15444
15445 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15446   as_dirname=dirname
15447 else
15448   as_dirname=false
15449 fi
15450
15451 as_me=`$as_basename -- "$0" ||
15452 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15453          X"$0" : 'X\(//\)$' \| \
15454          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
15455 $as_echo X/"$0" |
15456     sed '/^.*\/\([^/][^/]*\)\/*$/{
15457             s//\1/
15458             q
15459           }
15460           /^X\/\(\/\/\)$/{
15461             s//\1/
15462             q
15463           }
15464           /^X\/\(\/\).*/{
15465             s//\1/
15466             q
15467           }
15468           s/.*/./; q'`
15469
15470 # Avoid depending upon Character Ranges.
15471 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15472 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15473 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15474 as_cr_digits='0123456789'
15475 as_cr_alnum=$as_cr_Letters$as_cr_digits
15476
15477 ECHO_C= ECHO_N= ECHO_T=
15478 case `echo -n x` in #(((((
15479 -n*)
15480   case `echo 'xy\c'` in
15481   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
15482   xy)  ECHO_C='\c';;
15483   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
15484        ECHO_T=' ';;
15485   esac;;
15486 *)
15487   ECHO_N='-n';;
15488 esac
15489
15490 rm -f conf$$ conf$$.exe conf$$.file
15491 if test -d conf$$.dir; then
15492   rm -f conf$$.dir/conf$$.file
15493 else
15494   rm -f conf$$.dir
15495   mkdir conf$$.dir 2>/dev/null
15496 fi
15497 if (echo >conf$$.file) 2>/dev/null; then
15498   if ln -s conf$$.file conf$$ 2>/dev/null; then
15499     as_ln_s='ln -s'
15500     # ... but there are two gotchas:
15501     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15502     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
15503     # In both cases, we have to default to `cp -pR'.
15504     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
15505       as_ln_s='cp -pR'
15506   elif ln conf$$.file conf$$ 2>/dev/null; then
15507     as_ln_s=ln
15508   else
15509     as_ln_s='cp -pR'
15510   fi
15511 else
15512   as_ln_s='cp -pR'
15513 fi
15514 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15515 rmdir conf$$.dir 2>/dev/null
15516
15517
15518 # as_fn_mkdir_p
15519 # -------------
15520 # Create "$as_dir" as a directory, including parents if necessary.
15521 as_fn_mkdir_p ()
15522 {
15523
15524   case $as_dir in #(
15525   -*) as_dir=./$as_dir;;
15526   esac
15527   test -d "$as_dir" || eval $as_mkdir_p || {
15528     as_dirs=
15529     while :; do
15530       case $as_dir in #(
15531       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15532       *) as_qdir=$as_dir;;
15533       esac
15534       as_dirs="'$as_qdir' $as_dirs"
15535       as_dir=`$as_dirname -- "$as_dir" ||
15536 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15537          X"$as_dir" : 'X\(//\)[^/]' \| \
15538          X"$as_dir" : 'X\(//\)$' \| \
15539          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15540 $as_echo X"$as_dir" |
15541     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15542             s//\1/
15543             q
15544           }
15545           /^X\(\/\/\)[^/].*/{
15546             s//\1/
15547             q
15548           }
15549           /^X\(\/\/\)$/{
15550             s//\1/
15551             q
15552           }
15553           /^X\(\/\).*/{
15554             s//\1/
15555             q
15556           }
15557           s/.*/./; q'`
15558       test -d "$as_dir" && break
15559     done
15560     test -z "$as_dirs" || eval "mkdir $as_dirs"
15561   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
15562
15563
15564 } # as_fn_mkdir_p
15565 if mkdir -p . 2>/dev/null; then
15566   as_mkdir_p='mkdir -p "$as_dir"'
15567 else
15568   test -d ./-p && rmdir ./-p
15569   as_mkdir_p=false
15570 fi
15571
15572
15573 # as_fn_executable_p FILE
15574 # -----------------------
15575 # Test if FILE is an executable regular file.
15576 as_fn_executable_p ()
15577 {
15578   test -f "$1" && test -x "$1"
15579 } # as_fn_executable_p
15580 as_test_x='test -x'
15581 as_executable_p=as_fn_executable_p
15582
15583 # Sed expression to map a string onto a valid CPP name.
15584 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
15585
15586 # Sed expression to map a string onto a valid variable name.
15587 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
15588
15589
15590 exec 6>&1
15591 ## ----------------------------------- ##
15592 ## Main body of $CONFIG_STATUS script. ##
15593 ## ----------------------------------- ##
15594 _ASEOF
15595 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
15596
15597 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15598 # Save the log message, to keep $0 and so on meaningful, and to
15599 # report actual input values of CONFIG_FILES etc. instead of their
15600 # values after options handling.
15601 ac_log="
15602 This file was extended by PostgreSQL $as_me 9.5devel, which was
15603 generated by GNU Autoconf 2.69.  Invocation command line was
15604
15605   CONFIG_FILES    = $CONFIG_FILES
15606   CONFIG_HEADERS  = $CONFIG_HEADERS
15607   CONFIG_LINKS    = $CONFIG_LINKS
15608   CONFIG_COMMANDS = $CONFIG_COMMANDS
15609   $ $0 $@
15610
15611 on `(hostname || uname -n) 2>/dev/null | sed 1q`
15612 "
15613
15614 _ACEOF
15615
15616 case $ac_config_files in *"
15617 "*) set x $ac_config_files; shift; ac_config_files=$*;;
15618 esac
15619
15620 case $ac_config_headers in *"
15621 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15622 esac
15623
15624
15625 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15626 # Files that config.status was made for.
15627 config_files="$ac_config_files"
15628 config_headers="$ac_config_headers"
15629 config_links="$ac_config_links"
15630 config_commands="$ac_config_commands"
15631
15632 _ACEOF
15633
15634 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15635 ac_cs_usage="\
15636 \`$as_me' instantiates files and other configuration actions
15637 from templates according to the current configuration.  Unless the files
15638 and actions are specified as TAGs, all are instantiated by default.
15639
15640 Usage: $0 [OPTION]... [TAG]...
15641
15642   -h, --help       print this help, then exit
15643   -V, --version    print version number and configuration settings, then exit
15644       --config     print configuration, then exit
15645   -q, --quiet, --silent
15646                    do not print progress messages
15647   -d, --debug      don't remove temporary files
15648       --recheck    update $as_me by reconfiguring in the same conditions
15649       --file=FILE[:TEMPLATE]
15650                    instantiate the configuration file FILE
15651       --header=FILE[:TEMPLATE]
15652                    instantiate the configuration header FILE
15653
15654 Configuration files:
15655 $config_files
15656
15657 Configuration headers:
15658 $config_headers
15659
15660 Configuration links:
15661 $config_links
15662
15663 Configuration commands:
15664 $config_commands
15665
15666 Report bugs to <pgsql-bugs@postgresql.org>."
15667
15668 _ACEOF
15669 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15670 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
15671 ac_cs_version="\\
15672 PostgreSQL config.status 9.5devel
15673 configured by $0, generated by GNU Autoconf 2.69,
15674   with options \\"\$ac_cs_config\\"
15675
15676 Copyright (C) 2012 Free Software Foundation, Inc.
15677 This config.status script is free software; the Free Software Foundation
15678 gives unlimited permission to copy, distribute and modify it."
15679
15680 ac_pwd='$ac_pwd'
15681 srcdir='$srcdir'
15682 INSTALL='$INSTALL'
15683 MKDIR_P='$MKDIR_P'
15684 AWK='$AWK'
15685 test -n "\$AWK" || AWK=awk
15686 _ACEOF
15687
15688 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15689 # The default lists apply if the user does not specify any file.
15690 ac_need_defaults=:
15691 while test $# != 0
15692 do
15693   case $1 in
15694   --*=?*)
15695     ac_option=`expr "X$1" : 'X\([^=]*\)='`
15696     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
15697     ac_shift=:
15698     ;;
15699   --*=)
15700     ac_option=`expr "X$1" : 'X\([^=]*\)='`
15701     ac_optarg=
15702     ac_shift=:
15703     ;;
15704   *)
15705     ac_option=$1
15706     ac_optarg=$2
15707     ac_shift=shift
15708     ;;
15709   esac
15710
15711   case $ac_option in
15712   # Handling of the options.
15713   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15714     ac_cs_recheck=: ;;
15715   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
15716     $as_echo "$ac_cs_version"; exit ;;
15717   --config | --confi | --conf | --con | --co | --c )
15718     $as_echo "$ac_cs_config"; exit ;;
15719   --debug | --debu | --deb | --de | --d | -d )
15720     debug=: ;;
15721   --file | --fil | --fi | --f )
15722     $ac_shift
15723     case $ac_optarg in
15724     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15725     '') as_fn_error $? "missing file argument" ;;
15726     esac
15727     as_fn_append CONFIG_FILES " '$ac_optarg'"
15728     ac_need_defaults=false;;
15729   --header | --heade | --head | --hea )
15730     $ac_shift
15731     case $ac_optarg in
15732     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15733     esac
15734     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
15735     ac_need_defaults=false;;
15736   --he | --h)
15737     # Conflict between --help and --header
15738     as_fn_error $? "ambiguous option: \`$1'
15739 Try \`$0 --help' for more information.";;
15740   --help | --hel | -h )
15741     $as_echo "$ac_cs_usage"; exit ;;
15742   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15743   | -silent | --silent | --silen | --sile | --sil | --si | --s)
15744     ac_cs_silent=: ;;
15745
15746   # This is an error.
15747   -*) as_fn_error $? "unrecognized option: \`$1'
15748 Try \`$0 --help' for more information." ;;
15749
15750   *) as_fn_append ac_config_targets " $1"
15751      ac_need_defaults=false ;;
15752
15753   esac
15754   shift
15755 done
15756
15757 ac_configure_extra_args=
15758
15759 if $ac_cs_silent; then
15760   exec 6>/dev/null
15761   ac_configure_extra_args="$ac_configure_extra_args --silent"
15762 fi
15763
15764 _ACEOF
15765 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15766 if \$ac_cs_recheck; then
15767   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
15768   shift
15769   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15770   CONFIG_SHELL='$SHELL'
15771   export CONFIG_SHELL
15772   exec "\$@"
15773 fi
15774
15775 _ACEOF
15776 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15777 exec 5>>config.log
15778 {
15779   echo
15780   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15781 ## Running $as_me. ##
15782 _ASBOX
15783   $as_echo "$ac_log"
15784 } >&5
15785
15786 _ACEOF
15787 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15788 _ACEOF
15789
15790 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15791
15792 # Handling of arguments.
15793 for ac_config_target in $ac_config_targets
15794 do
15795   case $ac_config_target in
15796     "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
15797     "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
15798     "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
15799     "src/backend/port/dynloader.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
15800     "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
15801     "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
15802     "src/backend/port/pg_latch.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_latch.c:${LATCH_IMPLEMENTATION}" ;;
15803     "src/include/dynloader.h") CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
15804     "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
15805     "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
15806     "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
15807     "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
15808     "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
15809     "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
15810
15811   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
15812   esac
15813 done
15814
15815
15816 # If the user did not use the arguments to specify the items to instantiate,
15817 # then the envvar interface is used.  Set only those that are not.
15818 # We use the long form for the default assignment because of an extremely
15819 # bizarre bug on SunOS 4.1.3.
15820 if $ac_need_defaults; then
15821   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15822   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15823   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
15824   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
15825 fi
15826
15827 # Have a temporary directory for convenience.  Make it in the build tree
15828 # simply because there is no reason against having it here, and in addition,
15829 # creating and moving files from /tmp can sometimes cause problems.
15830 # Hook for its removal unless debugging.
15831 # Note that there is a small window in which the directory will not be cleaned:
15832 # after its creation but before its name has been assigned to `$tmp'.
15833 $debug ||
15834 {
15835   tmp= ac_tmp=
15836   trap 'exit_status=$?
15837   : "${ac_tmp:=$tmp}"
15838   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
15839 ' 0
15840   trap 'as_fn_exit 1' 1 2 13 15
15841 }
15842 # Create a (secure) tmp directory for tmp files.
15843
15844 {
15845   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
15846   test -d "$tmp"
15847 }  ||
15848 {
15849   tmp=./conf$$-$RANDOM
15850   (umask 077 && mkdir "$tmp")
15851 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
15852 ac_tmp=$tmp
15853
15854 # Set up the scripts for CONFIG_FILES section.
15855 # No need to generate them if there are no CONFIG_FILES.
15856 # This happens for instance with `./config.status config.h'.
15857 if test -n "$CONFIG_FILES"; then
15858
15859
15860 ac_cr=`echo X | tr X '\015'`
15861 # On cygwin, bash can eat \r inside `` if the user requested igncr.
15862 # But we know of no other shell where ac_cr would be empty at this
15863 # point, so we can use a bashism as a fallback.
15864 if test "x$ac_cr" = x; then
15865   eval ac_cr=\$\'\\r\'
15866 fi
15867 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15868 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
15869   ac_cs_awk_cr='\\r'
15870 else
15871   ac_cs_awk_cr=$ac_cr
15872 fi
15873
15874 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
15875 _ACEOF
15876
15877
15878 {
15879   echo "cat >conf$$subs.awk <<_ACEOF" &&
15880   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15881   echo "_ACEOF"
15882 } >conf$$subs.sh ||
15883   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15884 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
15885 ac_delim='%!_!# '
15886 for ac_last_try in false false false false false :; do
15887   . ./conf$$subs.sh ||
15888     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15889
15890   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15891   if test $ac_delim_n = $ac_delim_num; then
15892     break
15893   elif $ac_last_try; then
15894     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15895   else
15896     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15897   fi
15898 done
15899 rm -f conf$$subs.sh
15900
15901 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15902 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
15903 _ACEOF
15904 sed -n '
15905 h
15906 s/^/S["/; s/!.*/"]=/
15907 p
15908 g
15909 s/^[^!]*!//
15910 :repl
15911 t repl
15912 s/'"$ac_delim"'$//
15913 t delim
15914 :nl
15915 h
15916 s/\(.\{148\}\)..*/\1/
15917 t more1
15918 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15919 p
15920 n
15921 b repl
15922 :more1
15923 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15924 p
15925 g
15926 s/.\{148\}//
15927 t nl
15928 :delim
15929 h
15930 s/\(.\{148\}\)..*/\1/
15931 t more2
15932 s/["\\]/\\&/g; s/^/"/; s/$/"/
15933 p
15934 b
15935 :more2
15936 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15937 p
15938 g
15939 s/.\{148\}//
15940 t delim
15941 ' <conf$$subs.awk | sed '
15942 /^[^""]/{
15943   N
15944   s/\n//
15945 }
15946 ' >>$CONFIG_STATUS || ac_write_fail=1
15947 rm -f conf$$subs.awk
15948 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15949 _ACAWK
15950 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
15951   for (key in S) S_is_set[key] = 1
15952   FS = "\a"
15953
15954 }
15955 {
15956   line = $ 0
15957   nfields = split(line, field, "@")
15958   substed = 0
15959   len = length(field[1])
15960   for (i = 2; i < nfields; i++) {
15961     key = field[i]
15962     keylen = length(key)
15963     if (S_is_set[key]) {
15964       value = S[key]
15965       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15966       len += length(value) + length(field[++i])
15967       substed = 1
15968     } else
15969       len += 1 + keylen
15970   }
15971
15972   print line
15973 }
15974
15975 _ACAWK
15976 _ACEOF
15977 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15978 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15979   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15980 else
15981   cat
15982 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
15983   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
15984 _ACEOF
15985
15986 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15987 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
15988 # trailing colons and then remove the whole line if VPATH becomes empty
15989 # (actually we leave an empty line to preserve line numbers).
15990 if test "x$srcdir" = x.; then
15991   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
15992 h
15993 s///
15994 s/^/:/
15995 s/[      ]*$/:/
15996 s/:\$(srcdir):/:/g
15997 s/:\${srcdir}:/:/g
15998 s/:@srcdir@:/:/g
15999 s/^:*//
16000 s/:*$//
16001 x
16002 s/\(=[   ]*\).*/\1/
16003 G
16004 s/\n//
16005 s/^[^=]*=[       ]*$//
16006 }'
16007 fi
16008
16009 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16010 fi # test -n "$CONFIG_FILES"
16011
16012 # Set up the scripts for CONFIG_HEADERS section.
16013 # No need to generate them if there are no CONFIG_HEADERS.
16014 # This happens for instance with `./config.status Makefile'.
16015 if test -n "$CONFIG_HEADERS"; then
16016 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
16017 BEGIN {
16018 _ACEOF
16019
16020 # Transform confdefs.h into an awk script `defines.awk', embedded as
16021 # here-document in config.status, that substitutes the proper values into
16022 # config.h.in to produce config.h.
16023
16024 # Create a delimiter string that does not exist in confdefs.h, to ease
16025 # handling of long lines.
16026 ac_delim='%!_!# '
16027 for ac_last_try in false false :; do
16028   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16029   if test -z "$ac_tt"; then
16030     break
16031   elif $ac_last_try; then
16032     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
16033   else
16034     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16035   fi
16036 done
16037
16038 # For the awk script, D is an array of macro values keyed by name,
16039 # likewise P contains macro parameters if any.  Preserve backslash
16040 # newline sequences.
16041
16042 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16043 sed -n '
16044 s/.\{148\}/&'"$ac_delim"'/g
16045 t rset
16046 :rset
16047 s/^[     ]*#[    ]*define[       ][      ]*/ /
16048 t def
16049 d
16050 :def
16051 s/\\$//
16052 t bsnl
16053 s/["\\]/\\&/g
16054 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
16055 D["\1"]=" \3"/p
16056 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
16057 d
16058 :bsnl
16059 s/["\\]/\\&/g
16060 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
16061 D["\1"]=" \3\\\\\\n"\\/p
16062 t cont
16063 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16064 t cont
16065 d
16066 :cont
16067 n
16068 s/.\{148\}/&'"$ac_delim"'/g
16069 t clear
16070 :clear
16071 s/\\$//
16072 t bsnlc
16073 s/["\\]/\\&/g; s/^/"/; s/$/"/p
16074 d
16075 :bsnlc
16076 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16077 b cont
16078 ' <confdefs.h | sed '
16079 s/'"$ac_delim"'/"\\\
16080 "/g' >>$CONFIG_STATUS || ac_write_fail=1
16081
16082 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16083   for (key in D) D_is_set[key] = 1
16084   FS = "\a"
16085 }
16086 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16087   line = \$ 0
16088   split(line, arg, " ")
16089   if (arg[1] == "#") {
16090     defundef = arg[2]
16091     mac1 = arg[3]
16092   } else {
16093     defundef = substr(arg[1], 2)
16094     mac1 = arg[2]
16095   }
16096   split(mac1, mac2, "(") #)
16097   macro = mac2[1]
16098   prefix = substr(line, 1, index(line, defundef) - 1)
16099   if (D_is_set[macro]) {
16100     # Preserve the white space surrounding the "#".
16101     print prefix "define", macro P[macro] D[macro]
16102     next
16103   } else {
16104     # Replace #undef with comments.  This is necessary, for example,
16105     # in the case of _POSIX_SOURCE, which is predefined and required
16106     # on some systems where configure will not decide to define it.
16107     if (defundef == "undef") {
16108       print "/*", prefix defundef, macro, "*/"
16109       next
16110     }
16111   }
16112 }
16113 { print }
16114 _ACAWK
16115 _ACEOF
16116 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16117   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
16118 fi # test -n "$CONFIG_HEADERS"
16119
16120
16121 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
16122 shift
16123 for ac_tag
16124 do
16125   case $ac_tag in
16126   :[FHLC]) ac_mode=$ac_tag; continue;;
16127   esac
16128   case $ac_mode$ac_tag in
16129   :[FHL]*:*);;
16130   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
16131   :[FH]-) ac_tag=-:-;;
16132   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16133   esac
16134   ac_save_IFS=$IFS
16135   IFS=:
16136   set x $ac_tag
16137   IFS=$ac_save_IFS
16138   shift
16139   ac_file=$1
16140   shift
16141
16142   case $ac_mode in
16143   :L) ac_source=$1;;
16144   :[FH])
16145     ac_file_inputs=
16146     for ac_f
16147     do
16148       case $ac_f in
16149       -) ac_f="$ac_tmp/stdin";;
16150       *) # Look for the file first in the build tree, then in the source tree
16151          # (if the path is not absolute).  The absolute path cannot be DOS-style,
16152          # because $ac_f cannot contain `:'.
16153          test -f "$ac_f" ||
16154            case $ac_f in
16155            [\\/$]*) false;;
16156            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16157            esac ||
16158            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
16159       esac
16160       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16161       as_fn_append ac_file_inputs " '$ac_f'"
16162     done
16163
16164     # Let's still pretend it is `configure' which instantiates (i.e., don't
16165     # use $as_me), people would be surprised to read:
16166     #    /* config.h.  Generated by config.status.  */
16167     configure_input='Generated from '`
16168           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16169         `' by configure.'
16170     if test x"$ac_file" != x-; then
16171       configure_input="$ac_file.  $configure_input"
16172       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16173 $as_echo "$as_me: creating $ac_file" >&6;}
16174     fi
16175     # Neutralize special characters interpreted by sed in replacement strings.
16176     case $configure_input in #(
16177     *\&* | *\|* | *\\* )
16178        ac_sed_conf_input=`$as_echo "$configure_input" |
16179        sed 's/[\\\\&|]/\\\\&/g'`;; #(
16180     *) ac_sed_conf_input=$configure_input;;
16181     esac
16182
16183     case $ac_tag in
16184     *:-:* | *:-) cat >"$ac_tmp/stdin" \
16185       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
16186     esac
16187     ;;
16188   esac
16189
16190   ac_dir=`$as_dirname -- "$ac_file" ||
16191 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16192          X"$ac_file" : 'X\(//\)[^/]' \| \
16193          X"$ac_file" : 'X\(//\)$' \| \
16194          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
16195 $as_echo X"$ac_file" |
16196     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16197             s//\1/
16198             q
16199           }
16200           /^X\(\/\/\)[^/].*/{
16201             s//\1/
16202             q
16203           }
16204           /^X\(\/\/\)$/{
16205             s//\1/
16206             q
16207           }
16208           /^X\(\/\).*/{
16209             s//\1/
16210             q
16211           }
16212           s/.*/./; q'`
16213   as_dir="$ac_dir"; as_fn_mkdir_p
16214   ac_builddir=.
16215
16216 case "$ac_dir" in
16217 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16218 *)
16219   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
16220   # A ".." for each directory in $ac_dir_suffix.
16221   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
16222   case $ac_top_builddir_sub in
16223   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16224   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16225   esac ;;
16226 esac
16227 ac_abs_top_builddir=$ac_pwd
16228 ac_abs_builddir=$ac_pwd$ac_dir_suffix
16229 # for backward compatibility:
16230 ac_top_builddir=$ac_top_build_prefix
16231
16232 case $srcdir in
16233   .)  # We are building in place.
16234     ac_srcdir=.
16235     ac_top_srcdir=$ac_top_builddir_sub
16236     ac_abs_top_srcdir=$ac_pwd ;;
16237   [\\/]* | ?:[\\/]* )  # Absolute name.
16238     ac_srcdir=$srcdir$ac_dir_suffix;
16239     ac_top_srcdir=$srcdir
16240     ac_abs_top_srcdir=$srcdir ;;
16241   *) # Relative name.
16242     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16243     ac_top_srcdir=$ac_top_build_prefix$srcdir
16244     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
16245 esac
16246 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
16247
16248
16249   case $ac_mode in
16250   :F)
16251   #
16252   # CONFIG_FILE
16253   #
16254
16255   case $INSTALL in
16256   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16257   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
16258   esac
16259   ac_MKDIR_P=$MKDIR_P
16260   case $MKDIR_P in
16261   [\\/$]* | ?:[\\/]* ) ;;
16262   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16263   esac
16264 _ACEOF
16265
16266 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16267 # If the template does not know about datarootdir, expand it.
16268 # FIXME: This hack should be removed a few years after 2.60.
16269 ac_datarootdir_hack=; ac_datarootdir_seen=
16270 ac_sed_dataroot='
16271 /datarootdir/ {
16272   p
16273   q
16274 }
16275 /@datadir@/p
16276 /@docdir@/p
16277 /@infodir@/p
16278 /@localedir@/p
16279 /@mandir@/p'
16280 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
16281 *datarootdir*) ac_datarootdir_seen=yes;;
16282 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
16283   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16284 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
16285 _ACEOF
16286 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16287   ac_datarootdir_hack='
16288   s&@datadir@&$datadir&g
16289   s&@docdir@&$docdir&g
16290   s&@infodir@&$infodir&g
16291   s&@localedir@&$localedir&g
16292   s&@mandir@&$mandir&g
16293   s&\\\${datarootdir}&$datarootdir&g' ;;
16294 esac
16295 _ACEOF
16296
16297 # Neutralize VPATH when `$srcdir' = `.'.
16298 # Shell code in configure.ac might set extrasub.
16299 # FIXME: do we really want to maintain this feature?
16300 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16301 ac_sed_extra="$ac_vpsub
16302 $extrasub
16303 _ACEOF
16304 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16305 :t
16306 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16307 s|@configure_input@|$ac_sed_conf_input|;t t
16308 s&@top_builddir@&$ac_top_builddir_sub&;t t
16309 s&@top_build_prefix@&$ac_top_build_prefix&;t t
16310 s&@srcdir@&$ac_srcdir&;t t
16311 s&@abs_srcdir@&$ac_abs_srcdir&;t t
16312 s&@top_srcdir@&$ac_top_srcdir&;t t
16313 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16314 s&@builddir@&$ac_builddir&;t t
16315 s&@abs_builddir@&$ac_abs_builddir&;t t
16316 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16317 s&@INSTALL@&$ac_INSTALL&;t t
16318 s&@MKDIR_P@&$ac_MKDIR_P&;t t
16319 $ac_datarootdir_hack
16320 "
16321 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16322   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16323
16324 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
16325   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16326   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
16327       "$ac_tmp/out"`; test -z "$ac_out"; } &&
16328   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16329 which seems to be undefined.  Please make sure it is defined" >&5
16330 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16331 which seems to be undefined.  Please make sure it is defined" >&2;}
16332
16333   rm -f "$ac_tmp/stdin"
16334   case $ac_file in
16335   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16336   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
16337   esac \
16338   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16339  ;;
16340   :H)
16341   #
16342   # CONFIG_HEADER
16343   #
16344   if test x"$ac_file" != x-; then
16345     {
16346       $as_echo "/* $configure_input  */" \
16347       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16348     } >"$ac_tmp/config.h" \
16349       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16350     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
16351       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16352 $as_echo "$as_me: $ac_file is unchanged" >&6;}
16353     else
16354       rm -f "$ac_file"
16355       mv "$ac_tmp/config.h" "$ac_file" \
16356         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16357     fi
16358   else
16359     $as_echo "/* $configure_input  */" \
16360       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
16361       || as_fn_error $? "could not create -" "$LINENO" 5
16362   fi
16363  ;;
16364   :L)
16365   #
16366   # CONFIG_LINK
16367   #
16368
16369   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
16370     :
16371   else
16372     # Prefer the file from the source tree if names are identical.
16373     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
16374       ac_source=$srcdir/$ac_source
16375     fi
16376
16377     { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
16378 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
16379
16380     if test ! -r "$ac_source"; then
16381       as_fn_error $? "$ac_source: file not found" "$LINENO" 5
16382     fi
16383     rm -f "$ac_file"
16384
16385     # Try a relative symlink, then a hard link, then a copy.
16386     case $ac_source in
16387     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
16388         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
16389     esac
16390     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
16391       ln "$ac_source" "$ac_file" 2>/dev/null ||
16392       cp -p "$ac_source" "$ac_file" ||
16393       as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
16394   fi
16395  ;;
16396   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
16397 $as_echo "$as_me: executing $ac_file commands" >&6;}
16398  ;;
16399   esac
16400
16401
16402   case $ac_file$ac_mode in
16403     "check_win32_symlinks":C)
16404 # Links sometimes fail undetected on Mingw -
16405 # so here we detect it and warn the user
16406 for FILE in $CONFIG_LINKS
16407  do
16408         # test -e works for symlinks in the MinGW console
16409         test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
16410 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
16411  done
16412  ;;
16413     "src/include/pg_config.h":H)
16414 # Update timestamp for pg_config.h (see Makefile.global)
16415 echo >src/include/stamp-h
16416  ;;
16417     "src/include/pg_config_ext.h":H)
16418 # Update timestamp for pg_config_ext.h (see Makefile.global)
16419 echo >src/include/stamp-ext-h
16420  ;;
16421     "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
16422
16423   esac
16424 done # for ac_tag
16425
16426
16427 as_fn_exit 0
16428 _ACEOF
16429 ac_clean_files=$ac_clean_files_save
16430
16431 test $ac_write_fail = 0 ||
16432   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
16433
16434
16435 # configure is writing to config.log, and then calls config.status.
16436 # config.status does its own redirection, appending to config.log.
16437 # Unfortunately, on DOS this fails, as config.log is still kept open
16438 # by configure, so config.status won't be able to write to it; its
16439 # output is simply discarded.  So we exec the FD to /dev/null,
16440 # effectively closing config.log, so it can be properly (re)opened and
16441 # appended to by config.status.  When coming back to configure, we
16442 # need to make the FD available again.
16443 if test "$no_create" != yes; then
16444   ac_cs_success=:
16445   ac_config_status_args=
16446   test "$silent" = yes &&
16447     ac_config_status_args="$ac_config_status_args --quiet"
16448   exec 5>/dev/null
16449   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
16450   exec 5>>config.log
16451   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16452   # would make configure fail if this is the last instruction.
16453   $ac_cs_success || as_fn_exit 1
16454 fi
16455 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16456   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16457 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
16458 fi
16459