]> granicus.if.org Git - postgresql/blob - configure
Fix whitespace
[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.4devel.
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-2013, 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.4devel'
586 PACKAGE_STRING='PostgreSQL 9.4devel'
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 OSX
631 XSLTPROC
632 COLLATEINDEX
633 DOCBOOKSTYLE
634 have_docbook
635 JADE
636 NSGMLS
637 TCL_SHLIB_LD_LIBS
638 TCL_SHARED_BUILD
639 TCL_LIB_SPEC
640 TCL_LIBS
641 TCL_LIB_FILE
642 TCL_INCLUDE_SPEC
643 TCL_CONFIG_SH
644 TCLSH
645 XGETTEXT
646 MSGMERGE
647 MSGFMT_FLAGS
648 MSGFMT
649 HAVE_POSIX_SIGNALS
650 LDAP_LIBS_BE
651 LDAP_LIBS_FE
652 PTHREAD_CFLAGS
653 PTHREAD_LIBS
654 PTHREAD_CC
655 acx_pthread_config
656 have_win32_dbghelp
657 HAVE_IPV6
658 LIBOBJS
659 OSSP_UUID_LIBS
660 ZIC
661 python_enable_shared
662 python_additional_libs
663 python_libspec
664 python_libdir
665 python_includespec
666 python_version
667 python_majorversion
668 PYTHON
669 perl_embed_ldflags
670 perl_useshrplib
671 perl_privlibexp
672 perl_archlibexp
673 PERL
674 FLEXFLAGS
675 FLEX
676 BISONFLAGS
677 BISON
678 MKDIR_P
679 AWK
680 LN_S
681 TAR
682 install_bin
683 INSTALL_DATA
684 INSTALL_SCRIPT
685 INSTALL_PROGRAM
686 WINDRES
687 DLLWRAP
688 DLLTOOL
689 AR
690 STRIP_SHARED_LIB
691 STRIP_STATIC_LIB
692 STRIP
693 RANLIB
694 ld_R_works
695 with_gnu_ld
696 LD
697 LDFLAGS_SL
698 LDFLAGS_EX
699 ELF_SYS
700 EGREP
701 GREP
702 with_zlib
703 with_system_tzdata
704 with_libxslt
705 with_libxml
706 XML2_CONFIG
707 with_ossp_uuid
708 with_selinux
709 with_openssl
710 krb_srvtab
711 with_python
712 with_perl
713 with_tcl
714 enable_thread_safety
715 INCLUDES
716 autodepend
717 TAS
718 GCC
719 CPP
720 CFLAGS_VECTOR
721 SUN_STUDIO_CC
722 OBJEXT
723 EXEEXT
724 ac_ct_CC
725 CPPFLAGS
726 LDFLAGS
727 CFLAGS
728 CC
729 enable_dtrace
730 DTRACEFLAGS
731 DTRACE
732 enable_coverage
733 GENHTML
734 LCOV
735 GCOV
736 enable_debug
737 enable_rpath
738 default_port
739 WANTED_LANGUAGES
740 enable_nls
741 PORTNAME
742 host_os
743 host_vendor
744 host_cpu
745 host
746 build_os
747 build_vendor
748 build_cpu
749 build
750 PG_MAJORVERSION
751 configure_args
752 target_alias
753 host_alias
754 build_alias
755 LIBS
756 ECHO_T
757 ECHO_N
758 ECHO_C
759 DEFS
760 mandir
761 localedir
762 libdir
763 psdir
764 pdfdir
765 dvidir
766 htmldir
767 infodir
768 docdir
769 oldincludedir
770 includedir
771 localstatedir
772 sharedstatedir
773 sysconfdir
774 datadir
775 datarootdir
776 libexecdir
777 sbindir
778 bindir
779 program_transform_name
780 prefix
781 exec_prefix
782 PACKAGE_URL
783 PACKAGE_BUGREPORT
784 PACKAGE_STRING
785 PACKAGE_VERSION
786 PACKAGE_TARNAME
787 PACKAGE_NAME
788 PATH_SEPARATOR
789 SHELL'
790 ac_subst_files=''
791 ac_user_opts='
792 enable_option_checking
793 with_extra_version
794 with_template
795 with_includes
796 with_libraries
797 with_libs
798 enable_integer_datetimes
799 enable_nls
800 with_pgport
801 enable_rpath
802 enable_spinlocks
803 enable_debug
804 enable_profiling
805 enable_coverage
806 enable_dtrace
807 with_blocksize
808 with_segsize
809 with_wal_blocksize
810 with_wal_segsize
811 with_CC
812 enable_depend
813 enable_cassert
814 enable_thread_safety
815 with_tcl
816 with_tclconfig
817 with_perl
818 with_python
819 with_gssapi
820 with_krb5
821 with_krb_srvnam
822 with_pam
823 with_ldap
824 with_bonjour
825 with_openssl
826 with_selinux
827 with_readline
828 with_libedit_preferred
829 with_ossp_uuid
830 with_libxml
831 with_libxslt
832 with_system_tzdata
833 with_zlib
834 with_gnu_ld
835 enable_largefile
836 enable_float4_byval
837 enable_float8_byval
838 '
839       ac_precious_vars='build_alias
840 host_alias
841 target_alias
842 CC
843 CFLAGS
844 LDFLAGS
845 LIBS
846 CPPFLAGS
847 CPP
848 LDFLAGS_EX
849 LDFLAGS_SL
850 DOCBOOKSTYLE'
851
852
853 # Initialize some variables set by options.
854 ac_init_help=
855 ac_init_version=false
856 ac_unrecognized_opts=
857 ac_unrecognized_sep=
858 # The variables have the same names as the options, with
859 # dashes changed to underlines.
860 cache_file=/dev/null
861 exec_prefix=NONE
862 no_create=
863 no_recursion=
864 prefix=NONE
865 program_prefix=NONE
866 program_suffix=NONE
867 program_transform_name=s,x,x,
868 silent=
869 site=
870 srcdir=
871 verbose=
872 x_includes=NONE
873 x_libraries=NONE
874
875 # Installation directory options.
876 # These are left unexpanded so users can "make install exec_prefix=/foo"
877 # and all the variables that are supposed to be based on exec_prefix
878 # by default will actually change.
879 # Use braces instead of parens because sh, perl, etc. also accept them.
880 # (The list follows the same order as the GNU Coding Standards.)
881 bindir='${exec_prefix}/bin'
882 sbindir='${exec_prefix}/sbin'
883 libexecdir='${exec_prefix}/libexec'
884 datarootdir='${prefix}/share'
885 datadir='${datarootdir}'
886 sysconfdir='${prefix}/etc'
887 sharedstatedir='${prefix}/com'
888 localstatedir='${prefix}/var'
889 includedir='${prefix}/include'
890 oldincludedir='/usr/include'
891 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
892 infodir='${datarootdir}/info'
893 htmldir='${docdir}'
894 dvidir='${docdir}'
895 pdfdir='${docdir}'
896 psdir='${docdir}'
897 libdir='${exec_prefix}/lib'
898 localedir='${datarootdir}/locale'
899 mandir='${datarootdir}/man'
900
901 ac_prev=
902 ac_dashdash=
903 for ac_option
904 do
905   # If the previous option needs an argument, assign it.
906   if test -n "$ac_prev"; then
907     eval $ac_prev=\$ac_option
908     ac_prev=
909     continue
910   fi
911
912   case $ac_option in
913   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
914   *=)   ac_optarg= ;;
915   *)    ac_optarg=yes ;;
916   esac
917
918   # Accept the important Cygnus configure options, so we can diagnose typos.
919
920   case $ac_dashdash$ac_option in
921   --)
922     ac_dashdash=yes ;;
923
924   -bindir | --bindir | --bindi | --bind | --bin | --bi)
925     ac_prev=bindir ;;
926   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
927     bindir=$ac_optarg ;;
928
929   -build | --build | --buil | --bui | --bu)
930     ac_prev=build_alias ;;
931   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
932     build_alias=$ac_optarg ;;
933
934   -cache-file | --cache-file | --cache-fil | --cache-fi \
935   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
936     ac_prev=cache_file ;;
937   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
938   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
939     cache_file=$ac_optarg ;;
940
941   --config-cache | -C)
942     cache_file=config.cache ;;
943
944   -datadir | --datadir | --datadi | --datad)
945     ac_prev=datadir ;;
946   -datadir=* | --datadir=* | --datadi=* | --datad=*)
947     datadir=$ac_optarg ;;
948
949   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
950   | --dataroo | --dataro | --datar)
951     ac_prev=datarootdir ;;
952   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
953   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
954     datarootdir=$ac_optarg ;;
955
956   -disable-* | --disable-*)
957     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
958     # Reject names that are not valid shell variable names.
959     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
960       as_fn_error $? "invalid feature name: $ac_useropt"
961     ac_useropt_orig=$ac_useropt
962     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
963     case $ac_user_opts in
964       *"
965 "enable_$ac_useropt"
966 "*) ;;
967       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
968          ac_unrecognized_sep=', ';;
969     esac
970     eval enable_$ac_useropt=no ;;
971
972   -docdir | --docdir | --docdi | --doc | --do)
973     ac_prev=docdir ;;
974   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
975     docdir=$ac_optarg ;;
976
977   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
978     ac_prev=dvidir ;;
979   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
980     dvidir=$ac_optarg ;;
981
982   -enable-* | --enable-*)
983     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
984     # Reject names that are not valid shell variable names.
985     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
986       as_fn_error $? "invalid feature name: $ac_useropt"
987     ac_useropt_orig=$ac_useropt
988     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
989     case $ac_user_opts in
990       *"
991 "enable_$ac_useropt"
992 "*) ;;
993       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
994          ac_unrecognized_sep=', ';;
995     esac
996     eval enable_$ac_useropt=\$ac_optarg ;;
997
998   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
999   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1000   | --exec | --exe | --ex)
1001     ac_prev=exec_prefix ;;
1002   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1003   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1004   | --exec=* | --exe=* | --ex=*)
1005     exec_prefix=$ac_optarg ;;
1006
1007   -gas | --gas | --ga | --g)
1008     # Obsolete; use --with-gas.
1009     with_gas=yes ;;
1010
1011   -help | --help | --hel | --he | -h)
1012     ac_init_help=long ;;
1013   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1014     ac_init_help=recursive ;;
1015   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1016     ac_init_help=short ;;
1017
1018   -host | --host | --hos | --ho)
1019     ac_prev=host_alias ;;
1020   -host=* | --host=* | --hos=* | --ho=*)
1021     host_alias=$ac_optarg ;;
1022
1023   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1024     ac_prev=htmldir ;;
1025   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1026   | --ht=*)
1027     htmldir=$ac_optarg ;;
1028
1029   -includedir | --includedir | --includedi | --included | --include \
1030   | --includ | --inclu | --incl | --inc)
1031     ac_prev=includedir ;;
1032   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1033   | --includ=* | --inclu=* | --incl=* | --inc=*)
1034     includedir=$ac_optarg ;;
1035
1036   -infodir | --infodir | --infodi | --infod | --info | --inf)
1037     ac_prev=infodir ;;
1038   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1039     infodir=$ac_optarg ;;
1040
1041   -libdir | --libdir | --libdi | --libd)
1042     ac_prev=libdir ;;
1043   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1044     libdir=$ac_optarg ;;
1045
1046   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1047   | --libexe | --libex | --libe)
1048     ac_prev=libexecdir ;;
1049   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1050   | --libexe=* | --libex=* | --libe=*)
1051     libexecdir=$ac_optarg ;;
1052
1053   -localedir | --localedir | --localedi | --localed | --locale)
1054     ac_prev=localedir ;;
1055   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1056     localedir=$ac_optarg ;;
1057
1058   -localstatedir | --localstatedir | --localstatedi | --localstated \
1059   | --localstate | --localstat | --localsta | --localst | --locals)
1060     ac_prev=localstatedir ;;
1061   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1062   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1063     localstatedir=$ac_optarg ;;
1064
1065   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1066     ac_prev=mandir ;;
1067   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1068     mandir=$ac_optarg ;;
1069
1070   -nfp | --nfp | --nf)
1071     # Obsolete; use --without-fp.
1072     with_fp=no ;;
1073
1074   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1075   | --no-cr | --no-c | -n)
1076     no_create=yes ;;
1077
1078   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1079   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1080     no_recursion=yes ;;
1081
1082   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1083   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1084   | --oldin | --oldi | --old | --ol | --o)
1085     ac_prev=oldincludedir ;;
1086   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1087   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1088   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1089     oldincludedir=$ac_optarg ;;
1090
1091   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1092     ac_prev=prefix ;;
1093   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1094     prefix=$ac_optarg ;;
1095
1096   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1097   | --program-pre | --program-pr | --program-p)
1098     ac_prev=program_prefix ;;
1099   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1100   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1101     program_prefix=$ac_optarg ;;
1102
1103   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1104   | --program-suf | --program-su | --program-s)
1105     ac_prev=program_suffix ;;
1106   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1107   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1108     program_suffix=$ac_optarg ;;
1109
1110   -program-transform-name | --program-transform-name \
1111   | --program-transform-nam | --program-transform-na \
1112   | --program-transform-n | --program-transform- \
1113   | --program-transform | --program-transfor \
1114   | --program-transfo | --program-transf \
1115   | --program-trans | --program-tran \
1116   | --progr-tra | --program-tr | --program-t)
1117     ac_prev=program_transform_name ;;
1118   -program-transform-name=* | --program-transform-name=* \
1119   | --program-transform-nam=* | --program-transform-na=* \
1120   | --program-transform-n=* | --program-transform-=* \
1121   | --program-transform=* | --program-transfor=* \
1122   | --program-transfo=* | --program-transf=* \
1123   | --program-trans=* | --program-tran=* \
1124   | --progr-tra=* | --program-tr=* | --program-t=*)
1125     program_transform_name=$ac_optarg ;;
1126
1127   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1128     ac_prev=pdfdir ;;
1129   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1130     pdfdir=$ac_optarg ;;
1131
1132   -psdir | --psdir | --psdi | --psd | --ps)
1133     ac_prev=psdir ;;
1134   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1135     psdir=$ac_optarg ;;
1136
1137   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1138   | -silent | --silent | --silen | --sile | --sil)
1139     silent=yes ;;
1140
1141   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1142     ac_prev=sbindir ;;
1143   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1144   | --sbi=* | --sb=*)
1145     sbindir=$ac_optarg ;;
1146
1147   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1148   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1149   | --sharedst | --shareds | --shared | --share | --shar \
1150   | --sha | --sh)
1151     ac_prev=sharedstatedir ;;
1152   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1153   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1154   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1155   | --sha=* | --sh=*)
1156     sharedstatedir=$ac_optarg ;;
1157
1158   -site | --site | --sit)
1159     ac_prev=site ;;
1160   -site=* | --site=* | --sit=*)
1161     site=$ac_optarg ;;
1162
1163   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1164     ac_prev=srcdir ;;
1165   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1166     srcdir=$ac_optarg ;;
1167
1168   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1169   | --syscon | --sysco | --sysc | --sys | --sy)
1170     ac_prev=sysconfdir ;;
1171   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1172   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1173     sysconfdir=$ac_optarg ;;
1174
1175   -target | --target | --targe | --targ | --tar | --ta | --t)
1176     ac_prev=target_alias ;;
1177   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1178     target_alias=$ac_optarg ;;
1179
1180   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1181     verbose=yes ;;
1182
1183   -version | --version | --versio | --versi | --vers | -V)
1184     ac_init_version=: ;;
1185
1186   -with-* | --with-*)
1187     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1188     # Reject names that are not valid shell variable names.
1189     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1190       as_fn_error $? "invalid package name: $ac_useropt"
1191     ac_useropt_orig=$ac_useropt
1192     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1193     case $ac_user_opts in
1194       *"
1195 "with_$ac_useropt"
1196 "*) ;;
1197       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1198          ac_unrecognized_sep=', ';;
1199     esac
1200     eval with_$ac_useropt=\$ac_optarg ;;
1201
1202   -without-* | --without-*)
1203     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1204     # Reject names that are not valid shell variable names.
1205     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1206       as_fn_error $? "invalid package name: $ac_useropt"
1207     ac_useropt_orig=$ac_useropt
1208     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1209     case $ac_user_opts in
1210       *"
1211 "with_$ac_useropt"
1212 "*) ;;
1213       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1214          ac_unrecognized_sep=', ';;
1215     esac
1216     eval with_$ac_useropt=no ;;
1217
1218   --x)
1219     # Obsolete; use --with-x.
1220     with_x=yes ;;
1221
1222   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1223   | --x-incl | --x-inc | --x-in | --x-i)
1224     ac_prev=x_includes ;;
1225   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1226   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1227     x_includes=$ac_optarg ;;
1228
1229   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1230   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1231     ac_prev=x_libraries ;;
1232   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1233   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1234     x_libraries=$ac_optarg ;;
1235
1236   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1237 Try \`$0 --help' for more information"
1238     ;;
1239
1240   *=*)
1241     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1242     # Reject names that are not valid shell variable names.
1243     case $ac_envvar in #(
1244       '' | [0-9]* | *[!_$as_cr_alnum]* )
1245       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1246     esac
1247     eval $ac_envvar=\$ac_optarg
1248     export $ac_envvar ;;
1249
1250   *)
1251     # FIXME: should be removed in autoconf 3.0.
1252     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1253     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1254       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1255     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1256     ;;
1257
1258   esac
1259 done
1260
1261 if test -n "$ac_prev"; then
1262   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1263   as_fn_error $? "missing argument to $ac_option"
1264 fi
1265
1266 if test -n "$ac_unrecognized_opts"; then
1267   case $enable_option_checking in
1268     no) ;;
1269     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1270     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1271   esac
1272 fi
1273
1274 # Check all directory arguments for consistency.
1275 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1276                 datadir sysconfdir sharedstatedir localstatedir includedir \
1277                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1278                 libdir localedir mandir
1279 do
1280   eval ac_val=\$$ac_var
1281   # Remove trailing slashes.
1282   case $ac_val in
1283     */ )
1284       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1285       eval $ac_var=\$ac_val;;
1286   esac
1287   # Be sure to have absolute directory names.
1288   case $ac_val in
1289     [\\/$]* | ?:[\\/]* )  continue;;
1290     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1291   esac
1292   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1293 done
1294
1295 # There might be people who depend on the old broken behavior: `$host'
1296 # used to hold the argument of --host etc.
1297 # FIXME: To remove some day.
1298 build=$build_alias
1299 host=$host_alias
1300 target=$target_alias
1301
1302 # FIXME: To remove some day.
1303 if test "x$host_alias" != x; then
1304   if test "x$build_alias" = x; then
1305     cross_compiling=maybe
1306   elif test "x$build_alias" != "x$host_alias"; then
1307     cross_compiling=yes
1308   fi
1309 fi
1310
1311 ac_tool_prefix=
1312 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1313
1314 test "$silent" = yes && exec 6>/dev/null
1315
1316
1317 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1318 ac_ls_di=`ls -di .` &&
1319 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1320   as_fn_error $? "working directory cannot be determined"
1321 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1322   as_fn_error $? "pwd does not report name of working directory"
1323
1324
1325 # Find the source files, if location was not specified.
1326 if test -z "$srcdir"; then
1327   ac_srcdir_defaulted=yes
1328   # Try the directory containing this script, then the parent directory.
1329   ac_confdir=`$as_dirname -- "$as_myself" ||
1330 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1331          X"$as_myself" : 'X\(//\)[^/]' \| \
1332          X"$as_myself" : 'X\(//\)$' \| \
1333          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1334 $as_echo X"$as_myself" |
1335     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1336             s//\1/
1337             q
1338           }
1339           /^X\(\/\/\)[^/].*/{
1340             s//\1/
1341             q
1342           }
1343           /^X\(\/\/\)$/{
1344             s//\1/
1345             q
1346           }
1347           /^X\(\/\).*/{
1348             s//\1/
1349             q
1350           }
1351           s/.*/./; q'`
1352   srcdir=$ac_confdir
1353   if test ! -r "$srcdir/$ac_unique_file"; then
1354     srcdir=..
1355   fi
1356 else
1357   ac_srcdir_defaulted=no
1358 fi
1359 if test ! -r "$srcdir/$ac_unique_file"; then
1360   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1361   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1362 fi
1363 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1364 ac_abs_confdir=`(
1365         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1366         pwd)`
1367 # When building in place, set srcdir=.
1368 if test "$ac_abs_confdir" = "$ac_pwd"; then
1369   srcdir=.
1370 fi
1371 # Remove unnecessary trailing slashes from srcdir.
1372 # Double slashes in file names in object file debugging info
1373 # mess up M-x gdb in Emacs.
1374 case $srcdir in
1375 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1376 esac
1377 for ac_var in $ac_precious_vars; do
1378   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1379   eval ac_env_${ac_var}_value=\$${ac_var}
1380   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1381   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1382 done
1383
1384 #
1385 # Report the --help message.
1386 #
1387 if test "$ac_init_help" = "long"; then
1388   # Omit some internal or obsolete options to make the list less imposing.
1389   # This message is too long to be a string in the A/UX 3.1 sh.
1390   cat <<_ACEOF
1391 \`configure' configures PostgreSQL 9.4devel to adapt to many kinds of systems.
1392
1393 Usage: $0 [OPTION]... [VAR=VALUE]...
1394
1395 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1396 VAR=VALUE.  See below for descriptions of some of the useful variables.
1397
1398 Defaults for the options are specified in brackets.
1399
1400 Configuration:
1401   -h, --help              display this help and exit
1402       --help=short        display options specific to this package
1403       --help=recursive    display the short help of all the included packages
1404   -V, --version           display version information and exit
1405   -q, --quiet, --silent   do not print \`checking ...' messages
1406       --cache-file=FILE   cache test results in FILE [disabled]
1407   -C, --config-cache      alias for \`--cache-file=config.cache'
1408   -n, --no-create         do not create output files
1409       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1410
1411 Installation directories:
1412   --prefix=PREFIX         install architecture-independent files in PREFIX
1413                           [$ac_default_prefix]
1414   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1415                           [PREFIX]
1416
1417 By default, \`make install' will install all the files in
1418 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1419 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1420 for instance \`--prefix=\$HOME'.
1421
1422 For better control, use the options below.
1423
1424 Fine tuning of the installation directories:
1425   --bindir=DIR            user executables [EPREFIX/bin]
1426   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1427   --libexecdir=DIR        program executables [EPREFIX/libexec]
1428   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1429   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1430   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1431   --libdir=DIR            object code libraries [EPREFIX/lib]
1432   --includedir=DIR        C header files [PREFIX/include]
1433   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1434   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1435   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1436   --infodir=DIR           info documentation [DATAROOTDIR/info]
1437   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1438   --mandir=DIR            man documentation [DATAROOTDIR/man]
1439   --docdir=DIR            documentation root [DATAROOTDIR/doc/postgresql]
1440   --htmldir=DIR           html documentation [DOCDIR]
1441   --dvidir=DIR            dvi documentation [DOCDIR]
1442   --pdfdir=DIR            pdf documentation [DOCDIR]
1443   --psdir=DIR             ps documentation [DOCDIR]
1444 _ACEOF
1445
1446   cat <<\_ACEOF
1447
1448 System types:
1449   --build=BUILD     configure for building on BUILD [guessed]
1450   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1451 _ACEOF
1452 fi
1453
1454 if test -n "$ac_init_help"; then
1455   case $ac_init_help in
1456      short | recursive ) echo "Configuration of PostgreSQL 9.4devel:";;
1457    esac
1458   cat <<\_ACEOF
1459
1460 Optional Features:
1461   --disable-option-checking  ignore unrecognized --enable/--with options
1462   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1463   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1464   --disable-integer-datetimes
1465                           disable 64-bit integer date/time support
1466   --enable-nls[=LANGUAGES]
1467                           enable Native Language Support
1468   --disable-rpath         do not embed shared library search path in
1469                           executables
1470   --disable-spinlocks     do not use spinlocks
1471   --enable-debug          build with debugging symbols (-g)
1472   --enable-profiling      build with profiling enabled
1473   --enable-coverage       build with coverage testing instrumentation
1474   --enable-dtrace         build with DTrace support
1475   --enable-depend         turn on automatic dependency tracking
1476   --enable-cassert        enable assertion checks (for debugging)
1477   --disable-thread-safety disable thread-safety in client libraries
1478   --disable-largefile     omit support for large files
1479   --disable-float4-byval  disable float4 passed by value
1480   --disable-float8-byval  disable float8 passed by value
1481
1482 Optional Packages:
1483   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1484   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1485   --with-extra-version=STRING
1486                           append STRING to version
1487   --with-template=NAME    override operating system template
1488   --with-includes=DIRS    look for additional header files in DIRS
1489   --with-libraries=DIRS   look for additional libraries in DIRS
1490   --with-libs=DIRS        alternative spelling of --with-libraries
1491   --with-pgport=PORTNUM   set default port number [5432]
1492   --with-blocksize=BLOCKSIZE
1493                           set table block size in kB [8]
1494   --with-segsize=SEGSIZE  set table segment size in GB [1]
1495   --with-wal-blocksize=BLOCKSIZE
1496                           set WAL block size in kB [8]
1497   --with-wal-segsize=SEGSIZE
1498                           set WAL segment size in MB [16]
1499   --with-CC=CMD           set compiler (deprecated)
1500   --with-tcl              build Tcl modules (PL/Tcl)
1501   --with-tclconfig=DIR    tclConfig.sh is in DIR
1502   --with-perl             build Perl modules (PL/Perl)
1503   --with-python           build Python modules (PL/Python)
1504   --with-gssapi           build with GSSAPI support
1505   --with-krb5             build with Kerberos 5 support
1506   --with-krb-srvnam=NAME  default service principal name in Kerberos
1507                           [postgres]
1508   --with-pam              build with PAM support
1509   --with-ldap             build with LDAP support
1510   --with-bonjour          build with Bonjour support
1511   --with-openssl          build with OpenSSL support
1512   --with-selinux          build with SELinux support
1513   --without-readline      do not use GNU Readline nor BSD Libedit for editing
1514   --with-libedit-preferred
1515                           prefer BSD Libedit over GNU Readline
1516   --with-ossp-uuid        build contrib/uuid-ossp, requires OSSP UUID library
1517   --with-libxml           build with XML support
1518   --with-libxslt          use XSLT support when building contrib/xml2
1519   --with-system-tzdata=DIR
1520                           use system time zone data in DIR
1521   --without-zlib          do not use Zlib
1522   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1523
1524 Some influential environment variables:
1525   CC          C compiler command
1526   CFLAGS      C compiler flags
1527   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1528               nonstandard directory <lib dir>
1529   LIBS        libraries to pass to the linker, e.g. -l<library>
1530   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1531               you have headers in a nonstandard directory <include dir>
1532   CPP         C preprocessor
1533   LDFLAGS_EX  extra linker flags for linking executables only
1534   LDFLAGS_SL  extra linker flags for linking shared libraries only
1535   DOCBOOKSTYLE
1536               location of DocBook stylesheets
1537
1538 Use these variables to override the choices made by `configure' or to help
1539 it to find libraries and programs with nonstandard names/locations.
1540
1541 Report bugs to <pgsql-bugs@postgresql.org>.
1542 _ACEOF
1543 ac_status=$?
1544 fi
1545
1546 if test "$ac_init_help" = "recursive"; then
1547   # If there are subdirs, report their specific --help.
1548   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1549     test -d "$ac_dir" ||
1550       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1551       continue
1552     ac_builddir=.
1553
1554 case "$ac_dir" in
1555 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1556 *)
1557   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1558   # A ".." for each directory in $ac_dir_suffix.
1559   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1560   case $ac_top_builddir_sub in
1561   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1562   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1563   esac ;;
1564 esac
1565 ac_abs_top_builddir=$ac_pwd
1566 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1567 # for backward compatibility:
1568 ac_top_builddir=$ac_top_build_prefix
1569
1570 case $srcdir in
1571   .)  # We are building in place.
1572     ac_srcdir=.
1573     ac_top_srcdir=$ac_top_builddir_sub
1574     ac_abs_top_srcdir=$ac_pwd ;;
1575   [\\/]* | ?:[\\/]* )  # Absolute name.
1576     ac_srcdir=$srcdir$ac_dir_suffix;
1577     ac_top_srcdir=$srcdir
1578     ac_abs_top_srcdir=$srcdir ;;
1579   *) # Relative name.
1580     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1581     ac_top_srcdir=$ac_top_build_prefix$srcdir
1582     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1583 esac
1584 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1585
1586     cd "$ac_dir" || { ac_status=$?; continue; }
1587     # Check for guested configure.
1588     if test -f "$ac_srcdir/configure.gnu"; then
1589       echo &&
1590       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1591     elif test -f "$ac_srcdir/configure"; then
1592       echo &&
1593       $SHELL "$ac_srcdir/configure" --help=recursive
1594     else
1595       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1596     fi || ac_status=$?
1597     cd "$ac_pwd" || { ac_status=$?; break; }
1598   done
1599 fi
1600
1601 test -n "$ac_init_help" && exit $ac_status
1602 if $ac_init_version; then
1603   cat <<\_ACEOF
1604 PostgreSQL configure 9.4devel
1605 generated by GNU Autoconf 2.69
1606
1607 Copyright (C) 2012 Free Software Foundation, Inc.
1608 This configure script is free software; the Free Software Foundation
1609 gives unlimited permission to copy, distribute and modify it.
1610
1611 Copyright (c) 1996-2013, PostgreSQL Global Development Group
1612 _ACEOF
1613   exit
1614 fi
1615
1616 ## ------------------------ ##
1617 ## Autoconf initialization. ##
1618 ## ------------------------ ##
1619
1620 # ac_fn_c_try_compile LINENO
1621 # --------------------------
1622 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1623 ac_fn_c_try_compile ()
1624 {
1625   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1626   rm -f conftest.$ac_objext
1627   if { { ac_try="$ac_compile"
1628 case "(($ac_try" in
1629   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1630   *) ac_try_echo=$ac_try;;
1631 esac
1632 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1633 $as_echo "$ac_try_echo"; } >&5
1634   (eval "$ac_compile") 2>conftest.err
1635   ac_status=$?
1636   if test -s conftest.err; then
1637     grep -v '^ *+' conftest.err >conftest.er1
1638     cat conftest.er1 >&5
1639     mv -f conftest.er1 conftest.err
1640   fi
1641   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1642   test $ac_status = 0; } && {
1643          test -z "$ac_c_werror_flag" ||
1644          test ! -s conftest.err
1645        } && test -s conftest.$ac_objext; then :
1646   ac_retval=0
1647 else
1648   $as_echo "$as_me: failed program was:" >&5
1649 sed 's/^/| /' conftest.$ac_ext >&5
1650
1651         ac_retval=1
1652 fi
1653   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1654   as_fn_set_status $ac_retval
1655
1656 } # ac_fn_c_try_compile
1657
1658 # ac_fn_c_try_link LINENO
1659 # -----------------------
1660 # Try to link conftest.$ac_ext, and return whether this succeeded.
1661 ac_fn_c_try_link ()
1662 {
1663   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1664   rm -f conftest.$ac_objext conftest$ac_exeext
1665   if { { ac_try="$ac_link"
1666 case "(($ac_try" in
1667   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1668   *) ac_try_echo=$ac_try;;
1669 esac
1670 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1671 $as_echo "$ac_try_echo"; } >&5
1672   (eval "$ac_link") 2>conftest.err
1673   ac_status=$?
1674   if test -s conftest.err; then
1675     grep -v '^ *+' conftest.err >conftest.er1
1676     cat conftest.er1 >&5
1677     mv -f conftest.er1 conftest.err
1678   fi
1679   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1680   test $ac_status = 0; } && {
1681          test -z "$ac_c_werror_flag" ||
1682          test ! -s conftest.err
1683        } && test -s conftest$ac_exeext && {
1684          test "$cross_compiling" = yes ||
1685          test -x conftest$ac_exeext
1686        }; then :
1687   ac_retval=0
1688 else
1689   $as_echo "$as_me: failed program was:" >&5
1690 sed 's/^/| /' conftest.$ac_ext >&5
1691
1692         ac_retval=1
1693 fi
1694   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1695   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1696   # interfere with the next link command; also delete a directory that is
1697   # left behind by Apple's compiler.  We do this before executing the actions.
1698   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1699   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1700   as_fn_set_status $ac_retval
1701
1702 } # ac_fn_c_try_link
1703
1704 # ac_fn_c_try_cpp LINENO
1705 # ----------------------
1706 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1707 ac_fn_c_try_cpp ()
1708 {
1709   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1710   if { { ac_try="$ac_cpp conftest.$ac_ext"
1711 case "(($ac_try" in
1712   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1713   *) ac_try_echo=$ac_try;;
1714 esac
1715 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1716 $as_echo "$ac_try_echo"; } >&5
1717   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1718   ac_status=$?
1719   if test -s conftest.err; then
1720     grep -v '^ *+' conftest.err >conftest.er1
1721     cat conftest.er1 >&5
1722     mv -f conftest.er1 conftest.err
1723   fi
1724   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1725   test $ac_status = 0; } > conftest.i && {
1726          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1727          test ! -s conftest.err
1728        }; then :
1729   ac_retval=0
1730 else
1731   $as_echo "$as_me: failed program was:" >&5
1732 sed 's/^/| /' conftest.$ac_ext >&5
1733
1734     ac_retval=1
1735 fi
1736   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1737   as_fn_set_status $ac_retval
1738
1739 } # ac_fn_c_try_cpp
1740
1741 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1742 # -------------------------------------------------------
1743 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1744 # the include files in INCLUDES and setting the cache variable VAR
1745 # accordingly.
1746 ac_fn_c_check_header_mongrel ()
1747 {
1748   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1749   if eval \${$3+:} false; then :
1750   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1751 $as_echo_n "checking for $2... " >&6; }
1752 if eval \${$3+:} false; then :
1753   $as_echo_n "(cached) " >&6
1754 fi
1755 eval ac_res=\$$3
1756                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1757 $as_echo "$ac_res" >&6; }
1758 else
1759   # Is the header compilable?
1760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1761 $as_echo_n "checking $2 usability... " >&6; }
1762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1763 /* end confdefs.h.  */
1764 $4
1765 #include <$2>
1766 _ACEOF
1767 if ac_fn_c_try_compile "$LINENO"; then :
1768   ac_header_compiler=yes
1769 else
1770   ac_header_compiler=no
1771 fi
1772 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1774 $as_echo "$ac_header_compiler" >&6; }
1775
1776 # Is the header present?
1777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1778 $as_echo_n "checking $2 presence... " >&6; }
1779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1780 /* end confdefs.h.  */
1781 #include <$2>
1782 _ACEOF
1783 if ac_fn_c_try_cpp "$LINENO"; then :
1784   ac_header_preproc=yes
1785 else
1786   ac_header_preproc=no
1787 fi
1788 rm -f conftest.err conftest.i conftest.$ac_ext
1789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1790 $as_echo "$ac_header_preproc" >&6; }
1791
1792 # So?  What about this header?
1793 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1794   yes:no: )
1795     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1796 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1797     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1798 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1799     ;;
1800   no:yes:* )
1801     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1802 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1803     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1804 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1805     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1806 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1807     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1808 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1809     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1810 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1811 ( $as_echo "## ---------------------------------------- ##
1812 ## Report this to pgsql-bugs@postgresql.org ##
1813 ## ---------------------------------------- ##"
1814      ) | sed "s/^/$as_me: WARNING:     /" >&2
1815     ;;
1816 esac
1817   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1818 $as_echo_n "checking for $2... " >&6; }
1819 if eval \${$3+:} false; then :
1820   $as_echo_n "(cached) " >&6
1821 else
1822   eval "$3=\$ac_header_compiler"
1823 fi
1824 eval ac_res=\$$3
1825                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1826 $as_echo "$ac_res" >&6; }
1827 fi
1828   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1829
1830 } # ac_fn_c_check_header_mongrel
1831
1832 # ac_fn_c_try_run LINENO
1833 # ----------------------
1834 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1835 # that executables *can* be run.
1836 ac_fn_c_try_run ()
1837 {
1838   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1839   if { { ac_try="$ac_link"
1840 case "(($ac_try" in
1841   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1842   *) ac_try_echo=$ac_try;;
1843 esac
1844 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1845 $as_echo "$ac_try_echo"; } >&5
1846   (eval "$ac_link") 2>&5
1847   ac_status=$?
1848   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1849   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1850   { { case "(($ac_try" in
1851   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1852   *) ac_try_echo=$ac_try;;
1853 esac
1854 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1855 $as_echo "$ac_try_echo"; } >&5
1856   (eval "$ac_try") 2>&5
1857   ac_status=$?
1858   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1859   test $ac_status = 0; }; }; then :
1860   ac_retval=0
1861 else
1862   $as_echo "$as_me: program exited with status $ac_status" >&5
1863        $as_echo "$as_me: failed program was:" >&5
1864 sed 's/^/| /' conftest.$ac_ext >&5
1865
1866        ac_retval=$ac_status
1867 fi
1868   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1869   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1870   as_fn_set_status $ac_retval
1871
1872 } # ac_fn_c_try_run
1873
1874 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1875 # -------------------------------------------------------
1876 # Tests whether HEADER exists and can be compiled using the include files in
1877 # INCLUDES, setting the cache variable VAR accordingly.
1878 ac_fn_c_check_header_compile ()
1879 {
1880   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1881   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1882 $as_echo_n "checking for $2... " >&6; }
1883 if eval \${$3+:} false; then :
1884   $as_echo_n "(cached) " >&6
1885 else
1886   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1887 /* end confdefs.h.  */
1888 $4
1889 #include <$2>
1890 _ACEOF
1891 if ac_fn_c_try_compile "$LINENO"; then :
1892   eval "$3=yes"
1893 else
1894   eval "$3=no"
1895 fi
1896 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1897 fi
1898 eval ac_res=\$$3
1899                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1900 $as_echo "$ac_res" >&6; }
1901   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1902
1903 } # ac_fn_c_check_header_compile
1904
1905 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
1906 # ----------------------------------------------------
1907 # Tries to find if the field MEMBER exists in type AGGR, after including
1908 # INCLUDES, setting cache variable VAR accordingly.
1909 ac_fn_c_check_member ()
1910 {
1911   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1912   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
1913 $as_echo_n "checking for $2.$3... " >&6; }
1914 if eval \${$4+:} false; then :
1915   $as_echo_n "(cached) " >&6
1916 else
1917   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1918 /* end confdefs.h.  */
1919 $5
1920 int
1921 main ()
1922 {
1923 static $2 ac_aggr;
1924 if (ac_aggr.$3)
1925 return 0;
1926   ;
1927   return 0;
1928 }
1929 _ACEOF
1930 if ac_fn_c_try_compile "$LINENO"; then :
1931   eval "$4=yes"
1932 else
1933   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1934 /* end confdefs.h.  */
1935 $5
1936 int
1937 main ()
1938 {
1939 static $2 ac_aggr;
1940 if (sizeof ac_aggr.$3)
1941 return 0;
1942   ;
1943   return 0;
1944 }
1945 _ACEOF
1946 if ac_fn_c_try_compile "$LINENO"; then :
1947   eval "$4=yes"
1948 else
1949   eval "$4=no"
1950 fi
1951 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1952 fi
1953 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1954 fi
1955 eval ac_res=\$$4
1956                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1957 $as_echo "$ac_res" >&6; }
1958   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1959
1960 } # ac_fn_c_check_member
1961
1962 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1963 # -------------------------------------------
1964 # Tests whether TYPE exists after having included INCLUDES, setting cache
1965 # variable VAR accordingly.
1966 ac_fn_c_check_type ()
1967 {
1968   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1969   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1970 $as_echo_n "checking for $2... " >&6; }
1971 if eval \${$3+:} false; then :
1972   $as_echo_n "(cached) " >&6
1973 else
1974   eval "$3=no"
1975   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1976 /* end confdefs.h.  */
1977 $4
1978 int
1979 main ()
1980 {
1981 if (sizeof ($2))
1982          return 0;
1983   ;
1984   return 0;
1985 }
1986 _ACEOF
1987 if ac_fn_c_try_compile "$LINENO"; then :
1988   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1989 /* end confdefs.h.  */
1990 $4
1991 int
1992 main ()
1993 {
1994 if (sizeof (($2)))
1995             return 0;
1996   ;
1997   return 0;
1998 }
1999 _ACEOF
2000 if ac_fn_c_try_compile "$LINENO"; then :
2001
2002 else
2003   eval "$3=yes"
2004 fi
2005 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2006 fi
2007 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2008 fi
2009 eval ac_res=\$$3
2010                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2011 $as_echo "$ac_res" >&6; }
2012   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2013
2014 } # ac_fn_c_check_type
2015
2016 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2017 # --------------------------------------------
2018 # Tries to find the compile-time value of EXPR in a program that includes
2019 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2020 # computed
2021 ac_fn_c_compute_int ()
2022 {
2023   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2024   if test "$cross_compiling" = yes; then
2025     # Depending upon the size, compute the lo and hi bounds.
2026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2027 /* end confdefs.h.  */
2028 $4
2029 int
2030 main ()
2031 {
2032 static int test_array [1 - 2 * !(($2) >= 0)];
2033 test_array [0] = 0;
2034 return test_array [0];
2035
2036   ;
2037   return 0;
2038 }
2039 _ACEOF
2040 if ac_fn_c_try_compile "$LINENO"; then :
2041   ac_lo=0 ac_mid=0
2042   while :; do
2043     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2044 /* end confdefs.h.  */
2045 $4
2046 int
2047 main ()
2048 {
2049 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2050 test_array [0] = 0;
2051 return test_array [0];
2052
2053   ;
2054   return 0;
2055 }
2056 _ACEOF
2057 if ac_fn_c_try_compile "$LINENO"; then :
2058   ac_hi=$ac_mid; break
2059 else
2060   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2061                         if test $ac_lo -le $ac_mid; then
2062                           ac_lo= ac_hi=
2063                           break
2064                         fi
2065                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2066 fi
2067 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2068   done
2069 else
2070   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2071 /* end confdefs.h.  */
2072 $4
2073 int
2074 main ()
2075 {
2076 static int test_array [1 - 2 * !(($2) < 0)];
2077 test_array [0] = 0;
2078 return test_array [0];
2079
2080   ;
2081   return 0;
2082 }
2083 _ACEOF
2084 if ac_fn_c_try_compile "$LINENO"; then :
2085   ac_hi=-1 ac_mid=-1
2086   while :; do
2087     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2088 /* end confdefs.h.  */
2089 $4
2090 int
2091 main ()
2092 {
2093 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2094 test_array [0] = 0;
2095 return test_array [0];
2096
2097   ;
2098   return 0;
2099 }
2100 _ACEOF
2101 if ac_fn_c_try_compile "$LINENO"; then :
2102   ac_lo=$ac_mid; break
2103 else
2104   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2105                         if test $ac_mid -le $ac_hi; then
2106                           ac_lo= ac_hi=
2107                           break
2108                         fi
2109                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2110 fi
2111 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2112   done
2113 else
2114   ac_lo= ac_hi=
2115 fi
2116 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2117 fi
2118 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2119 # Binary search between lo and hi bounds.
2120 while test "x$ac_lo" != "x$ac_hi"; do
2121   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2122   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2123 /* end confdefs.h.  */
2124 $4
2125 int
2126 main ()
2127 {
2128 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2129 test_array [0] = 0;
2130 return test_array [0];
2131
2132   ;
2133   return 0;
2134 }
2135 _ACEOF
2136 if ac_fn_c_try_compile "$LINENO"; then :
2137   ac_hi=$ac_mid
2138 else
2139   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2140 fi
2141 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2142 done
2143 case $ac_lo in #((
2144 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2145 '') ac_retval=1 ;;
2146 esac
2147   else
2148     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2149 /* end confdefs.h.  */
2150 $4
2151 static long int longval () { return $2; }
2152 static unsigned long int ulongval () { return $2; }
2153 #include <stdio.h>
2154 #include <stdlib.h>
2155 int
2156 main ()
2157 {
2158
2159   FILE *f = fopen ("conftest.val", "w");
2160   if (! f)
2161     return 1;
2162   if (($2) < 0)
2163     {
2164       long int i = longval ();
2165       if (i != ($2))
2166         return 1;
2167       fprintf (f, "%ld", i);
2168     }
2169   else
2170     {
2171       unsigned long int i = ulongval ();
2172       if (i != ($2))
2173         return 1;
2174       fprintf (f, "%lu", i);
2175     }
2176   /* Do not output a trailing newline, as this causes \r\n confusion
2177      on some platforms.  */
2178   return ferror (f) || fclose (f) != 0;
2179
2180   ;
2181   return 0;
2182 }
2183 _ACEOF
2184 if ac_fn_c_try_run "$LINENO"; then :
2185   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2186 else
2187   ac_retval=1
2188 fi
2189 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2190   conftest.$ac_objext conftest.beam conftest.$ac_ext
2191 rm -f conftest.val
2192
2193   fi
2194   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2195   as_fn_set_status $ac_retval
2196
2197 } # ac_fn_c_compute_int
2198
2199 # ac_fn_c_check_func LINENO FUNC VAR
2200 # ----------------------------------
2201 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2202 ac_fn_c_check_func ()
2203 {
2204   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2205   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2206 $as_echo_n "checking for $2... " >&6; }
2207 if eval \${$3+:} false; then :
2208   $as_echo_n "(cached) " >&6
2209 else
2210   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2211 /* end confdefs.h.  */
2212 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2213    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2214 #define $2 innocuous_$2
2215
2216 /* System header to define __stub macros and hopefully few prototypes,
2217     which can conflict with char $2 (); below.
2218     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2219     <limits.h> exists even on freestanding compilers.  */
2220
2221 #ifdef __STDC__
2222 # include <limits.h>
2223 #else
2224 # include <assert.h>
2225 #endif
2226
2227 #undef $2
2228
2229 /* Override any GCC internal prototype to avoid an error.
2230    Use char because int might match the return type of a GCC
2231    builtin and then its argument prototype would still apply.  */
2232 #ifdef __cplusplus
2233 extern "C"
2234 #endif
2235 char $2 ();
2236 /* The GNU C library defines this for functions which it implements
2237     to always fail with ENOSYS.  Some functions are actually named
2238     something starting with __ and the normal name is an alias.  */
2239 #if defined __stub_$2 || defined __stub___$2
2240 choke me
2241 #endif
2242
2243 int
2244 main ()
2245 {
2246 return $2 ();
2247   ;
2248   return 0;
2249 }
2250 _ACEOF
2251 if ac_fn_c_try_link "$LINENO"; then :
2252   eval "$3=yes"
2253 else
2254   eval "$3=no"
2255 fi
2256 rm -f core conftest.err conftest.$ac_objext \
2257     conftest$ac_exeext conftest.$ac_ext
2258 fi
2259 eval ac_res=\$$3
2260                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2261 $as_echo "$ac_res" >&6; }
2262   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2263
2264 } # ac_fn_c_check_func
2265
2266 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2267 # ---------------------------------------------
2268 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2269 # accordingly.
2270 ac_fn_c_check_decl ()
2271 {
2272   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2273   as_decl_name=`echo $2|sed 's/ *(.*//'`
2274   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2275   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2276 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2277 if eval \${$3+:} false; then :
2278   $as_echo_n "(cached) " >&6
2279 else
2280   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2281 /* end confdefs.h.  */
2282 $4
2283 int
2284 main ()
2285 {
2286 #ifndef $as_decl_name
2287 #ifdef __cplusplus
2288   (void) $as_decl_use;
2289 #else
2290   (void) $as_decl_name;
2291 #endif
2292 #endif
2293
2294   ;
2295   return 0;
2296 }
2297 _ACEOF
2298 if ac_fn_c_try_compile "$LINENO"; then :
2299   eval "$3=yes"
2300 else
2301   eval "$3=no"
2302 fi
2303 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2304 fi
2305 eval ac_res=\$$3
2306                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2307 $as_echo "$ac_res" >&6; }
2308   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2309
2310 } # ac_fn_c_check_decl
2311 cat >config.log <<_ACEOF
2312 This file contains any messages produced by compilers while
2313 running configure, to aid debugging if configure makes a mistake.
2314
2315 It was created by PostgreSQL $as_me 9.4devel, which was
2316 generated by GNU Autoconf 2.69.  Invocation command line was
2317
2318   $ $0 $@
2319
2320 _ACEOF
2321 exec 5>>config.log
2322 {
2323 cat <<_ASUNAME
2324 ## --------- ##
2325 ## Platform. ##
2326 ## --------- ##
2327
2328 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2329 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2330 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2331 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2332 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2333
2334 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2335 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2336
2337 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2338 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2339 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2340 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2341 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2342 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2343 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2344
2345 _ASUNAME
2346
2347 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2348 for as_dir in $PATH
2349 do
2350   IFS=$as_save_IFS
2351   test -z "$as_dir" && as_dir=.
2352     $as_echo "PATH: $as_dir"
2353   done
2354 IFS=$as_save_IFS
2355
2356 } >&5
2357
2358 cat >&5 <<_ACEOF
2359
2360
2361 ## ----------- ##
2362 ## Core tests. ##
2363 ## ----------- ##
2364
2365 _ACEOF
2366
2367
2368 # Keep a trace of the command line.
2369 # Strip out --no-create and --no-recursion so they do not pile up.
2370 # Strip out --silent because we don't want to record it for future runs.
2371 # Also quote any args containing shell meta-characters.
2372 # Make two passes to allow for proper duplicate-argument suppression.
2373 ac_configure_args=
2374 ac_configure_args0=
2375 ac_configure_args1=
2376 ac_must_keep_next=false
2377 for ac_pass in 1 2
2378 do
2379   for ac_arg
2380   do
2381     case $ac_arg in
2382     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2383     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2384     | -silent | --silent | --silen | --sile | --sil)
2385       continue ;;
2386     *\'*)
2387       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2388     esac
2389     case $ac_pass in
2390     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2391     2)
2392       as_fn_append ac_configure_args1 " '$ac_arg'"
2393       if test $ac_must_keep_next = true; then
2394         ac_must_keep_next=false # Got value, back to normal.
2395       else
2396         case $ac_arg in
2397           *=* | --config-cache | -C | -disable-* | --disable-* \
2398           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2399           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2400           | -with-* | --with-* | -without-* | --without-* | --x)
2401             case "$ac_configure_args0 " in
2402               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2403             esac
2404             ;;
2405           -* ) ac_must_keep_next=true ;;
2406         esac
2407       fi
2408       as_fn_append ac_configure_args " '$ac_arg'"
2409       ;;
2410     esac
2411   done
2412 done
2413 { ac_configure_args0=; unset ac_configure_args0;}
2414 { ac_configure_args1=; unset ac_configure_args1;}
2415
2416 # When interrupted or exit'd, cleanup temporary files, and complete
2417 # config.log.  We remove comments because anyway the quotes in there
2418 # would cause problems or look ugly.
2419 # WARNING: Use '\'' to represent an apostrophe within the trap.
2420 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2421 trap 'exit_status=$?
2422   # Save into config.log some information that might help in debugging.
2423   {
2424     echo
2425
2426     $as_echo "## ---------------- ##
2427 ## Cache variables. ##
2428 ## ---------------- ##"
2429     echo
2430     # The following way of writing the cache mishandles newlines in values,
2431 (
2432   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2433     eval ac_val=\$$ac_var
2434     case $ac_val in #(
2435     *${as_nl}*)
2436       case $ac_var in #(
2437       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2438 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2439       esac
2440       case $ac_var in #(
2441       _ | IFS | as_nl) ;; #(
2442       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2443       *) { eval $ac_var=; unset $ac_var;} ;;
2444       esac ;;
2445     esac
2446   done
2447   (set) 2>&1 |
2448     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2449     *${as_nl}ac_space=\ *)
2450       sed -n \
2451         "s/'\''/'\''\\\\'\'''\''/g;
2452           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2453       ;; #(
2454     *)
2455       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2456       ;;
2457     esac |
2458     sort
2459 )
2460     echo
2461
2462     $as_echo "## ----------------- ##
2463 ## Output variables. ##
2464 ## ----------------- ##"
2465     echo
2466     for ac_var in $ac_subst_vars
2467     do
2468       eval ac_val=\$$ac_var
2469       case $ac_val in
2470       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2471       esac
2472       $as_echo "$ac_var='\''$ac_val'\''"
2473     done | sort
2474     echo
2475
2476     if test -n "$ac_subst_files"; then
2477       $as_echo "## ------------------- ##
2478 ## File substitutions. ##
2479 ## ------------------- ##"
2480       echo
2481       for ac_var in $ac_subst_files
2482       do
2483         eval ac_val=\$$ac_var
2484         case $ac_val in
2485         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2486         esac
2487         $as_echo "$ac_var='\''$ac_val'\''"
2488       done | sort
2489       echo
2490     fi
2491
2492     if test -s confdefs.h; then
2493       $as_echo "## ----------- ##
2494 ## confdefs.h. ##
2495 ## ----------- ##"
2496       echo
2497       cat confdefs.h
2498       echo
2499     fi
2500     test "$ac_signal" != 0 &&
2501       $as_echo "$as_me: caught signal $ac_signal"
2502     $as_echo "$as_me: exit $exit_status"
2503   } >&5
2504   rm -f core *.core core.conftest.* &&
2505     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2506     exit $exit_status
2507 ' 0
2508 for ac_signal in 1 2 13 15; do
2509   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2510 done
2511 ac_signal=0
2512
2513 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2514 rm -f -r conftest* confdefs.h
2515
2516 $as_echo "/* confdefs.h */" > confdefs.h
2517
2518 # Predefined preprocessor variables.
2519
2520 cat >>confdefs.h <<_ACEOF
2521 #define PACKAGE_NAME "$PACKAGE_NAME"
2522 _ACEOF
2523
2524 cat >>confdefs.h <<_ACEOF
2525 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2526 _ACEOF
2527
2528 cat >>confdefs.h <<_ACEOF
2529 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2530 _ACEOF
2531
2532 cat >>confdefs.h <<_ACEOF
2533 #define PACKAGE_STRING "$PACKAGE_STRING"
2534 _ACEOF
2535
2536 cat >>confdefs.h <<_ACEOF
2537 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2538 _ACEOF
2539
2540 cat >>confdefs.h <<_ACEOF
2541 #define PACKAGE_URL "$PACKAGE_URL"
2542 _ACEOF
2543
2544
2545 # Let the site file select an alternate cache file if it wants to.
2546 # Prefer an explicitly selected file to automatically selected ones.
2547 ac_site_file1=NONE
2548 ac_site_file2=NONE
2549 if test -n "$CONFIG_SITE"; then
2550   # We do not want a PATH search for config.site.
2551   case $CONFIG_SITE in #((
2552     -*)  ac_site_file1=./$CONFIG_SITE;;
2553     */*) ac_site_file1=$CONFIG_SITE;;
2554     *)   ac_site_file1=./$CONFIG_SITE;;
2555   esac
2556 elif test "x$prefix" != xNONE; then
2557   ac_site_file1=$prefix/share/config.site
2558   ac_site_file2=$prefix/etc/config.site
2559 else
2560   ac_site_file1=$ac_default_prefix/share/config.site
2561   ac_site_file2=$ac_default_prefix/etc/config.site
2562 fi
2563 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2564 do
2565   test "x$ac_site_file" = xNONE && continue
2566   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2567     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2568 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2569     sed 's/^/| /' "$ac_site_file" >&5
2570     . "$ac_site_file" \
2571       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2572 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2573 as_fn_error $? "failed to load site script $ac_site_file
2574 See \`config.log' for more details" "$LINENO" 5; }
2575   fi
2576 done
2577
2578 if test -r "$cache_file"; then
2579   # Some versions of bash will fail to source /dev/null (special files
2580   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2581   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2582     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2583 $as_echo "$as_me: loading cache $cache_file" >&6;}
2584     case $cache_file in
2585       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2586       *)                      . "./$cache_file";;
2587     esac
2588   fi
2589 else
2590   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2591 $as_echo "$as_me: creating cache $cache_file" >&6;}
2592   >$cache_file
2593 fi
2594
2595 # Check that the precious variables saved in the cache have kept the same
2596 # value.
2597 ac_cache_corrupted=false
2598 for ac_var in $ac_precious_vars; do
2599   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2600   eval ac_new_set=\$ac_env_${ac_var}_set
2601   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2602   eval ac_new_val=\$ac_env_${ac_var}_value
2603   case $ac_old_set,$ac_new_set in
2604     set,)
2605       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2606 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2607       ac_cache_corrupted=: ;;
2608     ,set)
2609       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2610 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2611       ac_cache_corrupted=: ;;
2612     ,);;
2613     *)
2614       if test "x$ac_old_val" != "x$ac_new_val"; then
2615         # differences in whitespace do not lead to failure.
2616         ac_old_val_w=`echo x $ac_old_val`
2617         ac_new_val_w=`echo x $ac_new_val`
2618         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2619           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2620 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2621           ac_cache_corrupted=:
2622         else
2623           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2624 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2625           eval $ac_var=\$ac_old_val
2626         fi
2627         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2628 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2629         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2630 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2631       fi;;
2632   esac
2633   # Pass precious variables to config.status.
2634   if test "$ac_new_set" = set; then
2635     case $ac_new_val in
2636     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2637     *) ac_arg=$ac_var=$ac_new_val ;;
2638     esac
2639     case " $ac_configure_args " in
2640       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2641       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2642     esac
2643   fi
2644 done
2645 if $ac_cache_corrupted; then
2646   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2647 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2648   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2649 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2650   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2651 fi
2652 ## -------------------- ##
2653 ## Main body of script. ##
2654 ## -------------------- ##
2655
2656 ac_ext=c
2657 ac_cpp='$CPP $CPPFLAGS'
2658 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2659 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2660 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2661
2662
2663
2664
2665
2666
2667 ac_aux_dir=
2668 for ac_dir in config "$srcdir"/config; do
2669   if test -f "$ac_dir/install-sh"; then
2670     ac_aux_dir=$ac_dir
2671     ac_install_sh="$ac_aux_dir/install-sh -c"
2672     break
2673   elif test -f "$ac_dir/install.sh"; then
2674     ac_aux_dir=$ac_dir
2675     ac_install_sh="$ac_aux_dir/install.sh -c"
2676     break
2677   elif test -f "$ac_dir/shtool"; then
2678     ac_aux_dir=$ac_dir
2679     ac_install_sh="$ac_aux_dir/shtool install -c"
2680     break
2681   fi
2682 done
2683 if test -z "$ac_aux_dir"; then
2684   as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2685 fi
2686
2687 # These three variables are undocumented and unsupported,
2688 # and are intended to be withdrawn in a future Autoconf release.
2689 # They can cause serious problems if a builder's source tree is in a directory
2690 # whose full name contains unusual characters.
2691 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2692 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2693 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2694
2695
2696
2697 configure_args=$ac_configure_args
2698
2699
2700 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\.[0-9][0-9]*\)'`
2701
2702
2703 cat >>confdefs.h <<_ACEOF
2704 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2705 _ACEOF
2706
2707
2708
2709
2710
2711 # Check whether --with-extra-version was given.
2712 if test "${with_extra_version+set}" = set; then :
2713   withval=$with_extra_version;
2714   case $withval in
2715     yes)
2716       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2717       ;;
2718     no)
2719       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2720       ;;
2721     *)
2722       PG_VERSION="$PACKAGE_VERSION$withval"
2723       ;;
2724   esac
2725
2726 else
2727   PG_VERSION="$PACKAGE_VERSION"
2728 fi
2729
2730
2731
2732 cat >>confdefs.h <<_ACEOF
2733 #define PG_VERSION "$PG_VERSION"
2734 _ACEOF
2735
2736
2737 # Make sure we can run config.sub.
2738 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2739   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2740
2741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2742 $as_echo_n "checking build system type... " >&6; }
2743 if ${ac_cv_build+:} false; then :
2744   $as_echo_n "(cached) " >&6
2745 else
2746   ac_build_alias=$build_alias
2747 test "x$ac_build_alias" = x &&
2748   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2749 test "x$ac_build_alias" = x &&
2750   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2751 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2752   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2753
2754 fi
2755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2756 $as_echo "$ac_cv_build" >&6; }
2757 case $ac_cv_build in
2758 *-*-*) ;;
2759 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2760 esac
2761 build=$ac_cv_build
2762 ac_save_IFS=$IFS; IFS='-'
2763 set x $ac_cv_build
2764 shift
2765 build_cpu=$1
2766 build_vendor=$2
2767 shift; shift
2768 # Remember, the first character of IFS is used to create $*,
2769 # except with old shells:
2770 build_os=$*
2771 IFS=$ac_save_IFS
2772 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2773
2774
2775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2776 $as_echo_n "checking host system type... " >&6; }
2777 if ${ac_cv_host+:} false; then :
2778   $as_echo_n "(cached) " >&6
2779 else
2780   if test "x$host_alias" = x; then
2781   ac_cv_host=$ac_cv_build
2782 else
2783   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2784     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2785 fi
2786
2787 fi
2788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2789 $as_echo "$ac_cv_host" >&6; }
2790 case $ac_cv_host in
2791 *-*-*) ;;
2792 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2793 esac
2794 host=$ac_cv_host
2795 ac_save_IFS=$IFS; IFS='-'
2796 set x $ac_cv_host
2797 shift
2798 host_cpu=$1
2799 host_vendor=$2
2800 shift; shift
2801 # Remember, the first character of IFS is used to create $*,
2802 # except with old shells:
2803 host_os=$*
2804 IFS=$ac_save_IFS
2805 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2806
2807
2808
2809 template=
2810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2811 $as_echo_n "checking which template to use... " >&6; }
2812
2813
2814
2815
2816 # Check whether --with-template was given.
2817 if test "${with_template+set}" = set; then :
2818   withval=$with_template;
2819   case $withval in
2820     yes)
2821       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2822       ;;
2823     no)
2824       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2825       ;;
2826     *)
2827
2828   case $withval in
2829     list)   echo; ls "$srcdir/src/template"; exit;;
2830     *)      if test -f "$srcdir/src/template/$with_template" ; then
2831               template=$withval
2832             else
2833               as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2834             fi;;
2835   esac
2836
2837       ;;
2838   esac
2839
2840 else
2841
2842 # --with-template not given
2843
2844 case $host_os in
2845      aix*) template=aix ;;
2846   cygwin*) template=cygwin ;;
2847   darwin*) template=darwin ;;
2848 dragonfly*) template=netbsd ;;
2849  freebsd*) template=freebsd ;;
2850     hpux*) template=hpux ;;
2851  linux*|gnu*|k*bsd*-gnu)
2852            template=linux ;;
2853    mingw*) template=win32 ;;
2854   netbsd*) template=netbsd ;;
2855  openbsd*) template=openbsd ;;
2856      osf*) template=osf ;;
2857      sco*) template=sco ;;
2858  solaris*) template=solaris ;;
2859    sysv5*) template=unixware ;;
2860 esac
2861
2862   if test x"$template" = x"" ; then
2863     as_fn_error $? "
2864 *******************************************************************
2865 PostgreSQL has apparently not been ported to your platform yet.
2866 To try a manual configuration, look into the src/template directory
2867 for a similar platform and use the '--with-template=' option.
2868
2869 Please also contact <pgsql-bugs@postgresql.org> to see about
2870 rectifying this.  Include the above 'checking host system type...'
2871 line.
2872 *******************************************************************
2873 " "$LINENO" 5
2874   fi
2875
2876
2877 fi
2878
2879
2880
2881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
2882 $as_echo "$template" >&6; }
2883
2884 PORTNAME=$template
2885
2886
2887 # Initialize default assumption that we do not need separate assembly code
2888 # for TAS (test-and-set).  This can be overridden by the template file
2889 # when it's executed.
2890 need_tas=no
2891 tas_file=dummy.s
2892
2893
2894
2895 ##
2896 ## Command line options
2897 ##
2898
2899 #
2900 # Add non-standard directories to the include path
2901 #
2902
2903
2904
2905 # Check whether --with-includes was given.
2906 if test "${with_includes+set}" = set; then :
2907   withval=$with_includes;
2908   case $withval in
2909     yes)
2910       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
2911       ;;
2912     no)
2913       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
2914       ;;
2915     *)
2916
2917       ;;
2918   esac
2919
2920 fi
2921
2922
2923
2924
2925 #
2926 # Add non-standard directories to the library search path
2927 #
2928
2929
2930
2931 # Check whether --with-libraries was given.
2932 if test "${with_libraries+set}" = set; then :
2933   withval=$with_libraries;
2934   case $withval in
2935     yes)
2936       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
2937       ;;
2938     no)
2939       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
2940       ;;
2941     *)
2942       LIBRARY_DIRS=$withval
2943       ;;
2944   esac
2945
2946 fi
2947
2948
2949
2950
2951
2952
2953 # Check whether --with-libs was given.
2954 if test "${with_libs+set}" = set; then :
2955   withval=$with_libs;
2956   case $withval in
2957     yes)
2958       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
2959       ;;
2960     no)
2961       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
2962       ;;
2963     *)
2964       LIBRARY_DIRS=$withval
2965       ;;
2966   esac
2967
2968 fi
2969
2970
2971
2972
2973 #
2974 # 64-bit integer date/time storage: enabled by default.
2975 #
2976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with 64-bit integer date/time support" >&5
2977 $as_echo_n "checking whether to build with 64-bit integer date/time support... " >&6; }
2978
2979
2980 # Check whether --enable-integer-datetimes was given.
2981 if test "${enable_integer_datetimes+set}" = set; then :
2982   enableval=$enable_integer_datetimes;
2983   case $enableval in
2984     yes)
2985
2986 $as_echo "#define USE_INTEGER_DATETIMES 1" >>confdefs.h
2987
2988       ;;
2989     no)
2990       :
2991       ;;
2992     *)
2993       as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
2994       ;;
2995   esac
2996
2997 else
2998   enable_integer_datetimes=yes
2999
3000 $as_echo "#define USE_INTEGER_DATETIMES 1" >>confdefs.h
3001
3002 fi
3003
3004
3005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_integer_datetimes" >&5
3006 $as_echo "$enable_integer_datetimes" >&6; }
3007
3008
3009 #
3010 # NLS
3011 #
3012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3013 $as_echo_n "checking whether NLS is wanted... " >&6; }
3014
3015
3016 # Check whether --enable-nls was given.
3017 if test "${enable_nls+set}" = set; then :
3018   enableval=$enable_nls;
3019   case $enableval in
3020     yes)
3021       :
3022       ;;
3023     no)
3024       :
3025       ;;
3026     *)
3027       enable_nls=yes
3028 WANTED_LANGUAGES=$enableval
3029       ;;
3030   esac
3031
3032 else
3033   enable_nls=no
3034 fi
3035
3036
3037
3038 if test "$enable_nls" = yes; then
3039
3040 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3041
3042 fi
3043
3044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3045 $as_echo "$enable_nls" >&6; }
3046
3047
3048
3049 #
3050 # Default port number (--with-pgport), default 5432
3051 #
3052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3053 $as_echo_n "checking for default port number... " >&6; }
3054
3055
3056
3057 # Check whether --with-pgport was given.
3058 if test "${with_pgport+set}" = set; then :
3059   withval=$with_pgport;
3060   case $withval in
3061     yes)
3062       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3063       ;;
3064     no)
3065       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3066       ;;
3067     *)
3068       default_port=$withval
3069       ;;
3070   esac
3071
3072 else
3073   default_port=5432
3074 fi
3075
3076
3077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3078 $as_echo "$default_port" >&6; }
3079 # Need both of these because some places want an integer and some a string
3080
3081 cat >>confdefs.h <<_ACEOF
3082 #define DEF_PGPORT ${default_port}
3083 _ACEOF
3084
3085
3086 cat >>confdefs.h <<_ACEOF
3087 #define DEF_PGPORT_STR "${default_port}"
3088 _ACEOF
3089
3090
3091
3092 #
3093 # '-rpath'-like feature can be disabled
3094 #
3095
3096
3097 # Check whether --enable-rpath was given.
3098 if test "${enable_rpath+set}" = set; then :
3099   enableval=$enable_rpath;
3100   case $enableval in
3101     yes)
3102       :
3103       ;;
3104     no)
3105       :
3106       ;;
3107     *)
3108       as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3109       ;;
3110   esac
3111
3112 else
3113   enable_rpath=yes
3114
3115 fi
3116
3117
3118
3119
3120 #
3121 # Spinlocks
3122 #
3123
3124
3125 # Check whether --enable-spinlocks was given.
3126 if test "${enable_spinlocks+set}" = set; then :
3127   enableval=$enable_spinlocks;
3128   case $enableval in
3129     yes)
3130       :
3131       ;;
3132     no)
3133       :
3134       ;;
3135     *)
3136       as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3137       ;;
3138   esac
3139
3140 else
3141   enable_spinlocks=yes
3142
3143 fi
3144
3145
3146
3147 #
3148 # --enable-debug adds -g to compiler flags
3149 #
3150
3151
3152 # Check whether --enable-debug was given.
3153 if test "${enable_debug+set}" = set; then :
3154   enableval=$enable_debug;
3155   case $enableval in
3156     yes)
3157       :
3158       ;;
3159     no)
3160       :
3161       ;;
3162     *)
3163       as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3164       ;;
3165   esac
3166
3167 else
3168   enable_debug=no
3169
3170 fi
3171
3172
3173
3174
3175 #
3176 # --enable-profiling enables gcc profiling
3177 #
3178
3179
3180 # Check whether --enable-profiling was given.
3181 if test "${enable_profiling+set}" = set; then :
3182   enableval=$enable_profiling;
3183   case $enableval in
3184     yes)
3185       :
3186       ;;
3187     no)
3188       :
3189       ;;
3190     *)
3191       as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3192       ;;
3193   esac
3194
3195 else
3196   enable_profiling=no
3197
3198 fi
3199
3200
3201
3202 #
3203 # --enable-coverage enables generation of code coverage metrics with gcov
3204 #
3205
3206
3207 # Check whether --enable-coverage was given.
3208 if test "${enable_coverage+set}" = set; then :
3209   enableval=$enable_coverage;
3210   case $enableval in
3211     yes)
3212       for ac_prog in gcov
3213 do
3214   # Extract the first word of "$ac_prog", so it can be a program name with args.
3215 set dummy $ac_prog; ac_word=$2
3216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3217 $as_echo_n "checking for $ac_word... " >&6; }
3218 if ${ac_cv_prog_GCOV+:} false; then :
3219   $as_echo_n "(cached) " >&6
3220 else
3221   if test -n "$GCOV"; then
3222   ac_cv_prog_GCOV="$GCOV" # Let the user override the test.
3223 else
3224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3225 for as_dir in $PATH
3226 do
3227   IFS=$as_save_IFS
3228   test -z "$as_dir" && as_dir=.
3229     for ac_exec_ext in '' $ac_executable_extensions; do
3230   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3231     ac_cv_prog_GCOV="$ac_prog"
3232     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3233     break 2
3234   fi
3235 done
3236   done
3237 IFS=$as_save_IFS
3238
3239 fi
3240 fi
3241 GCOV=$ac_cv_prog_GCOV
3242 if test -n "$GCOV"; then
3243   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3244 $as_echo "$GCOV" >&6; }
3245 else
3246   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3247 $as_echo "no" >&6; }
3248 fi
3249
3250
3251   test -n "$GCOV" && break
3252 done
3253
3254 if test -z "$GCOV"; then
3255   as_fn_error $? "gcov not found" "$LINENO" 5
3256 fi
3257 for ac_prog in lcov
3258 do
3259   # Extract the first word of "$ac_prog", so it can be a program name with args.
3260 set dummy $ac_prog; ac_word=$2
3261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3262 $as_echo_n "checking for $ac_word... " >&6; }
3263 if ${ac_cv_prog_LCOV+:} false; then :
3264   $as_echo_n "(cached) " >&6
3265 else
3266   if test -n "$LCOV"; then
3267   ac_cv_prog_LCOV="$LCOV" # Let the user override the test.
3268 else
3269 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3270 for as_dir in $PATH
3271 do
3272   IFS=$as_save_IFS
3273   test -z "$as_dir" && as_dir=.
3274     for ac_exec_ext in '' $ac_executable_extensions; do
3275   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3276     ac_cv_prog_LCOV="$ac_prog"
3277     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3278     break 2
3279   fi
3280 done
3281   done
3282 IFS=$as_save_IFS
3283
3284 fi
3285 fi
3286 LCOV=$ac_cv_prog_LCOV
3287 if test -n "$LCOV"; then
3288   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3289 $as_echo "$LCOV" >&6; }
3290 else
3291   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3292 $as_echo "no" >&6; }
3293 fi
3294
3295
3296   test -n "$LCOV" && break
3297 done
3298
3299 if test -z "$LCOV"; then
3300   as_fn_error $? "lcov not found" "$LINENO" 5
3301 fi
3302 for ac_prog in genhtml
3303 do
3304   # Extract the first word of "$ac_prog", so it can be a program name with args.
3305 set dummy $ac_prog; ac_word=$2
3306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3307 $as_echo_n "checking for $ac_word... " >&6; }
3308 if ${ac_cv_prog_GENHTML+:} false; then :
3309   $as_echo_n "(cached) " >&6
3310 else
3311   if test -n "$GENHTML"; then
3312   ac_cv_prog_GENHTML="$GENHTML" # Let the user override the test.
3313 else
3314 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3315 for as_dir in $PATH
3316 do
3317   IFS=$as_save_IFS
3318   test -z "$as_dir" && as_dir=.
3319     for ac_exec_ext in '' $ac_executable_extensions; do
3320   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3321     ac_cv_prog_GENHTML="$ac_prog"
3322     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3323     break 2
3324   fi
3325 done
3326   done
3327 IFS=$as_save_IFS
3328
3329 fi
3330 fi
3331 GENHTML=$ac_cv_prog_GENHTML
3332 if test -n "$GENHTML"; then
3333   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3334 $as_echo "$GENHTML" >&6; }
3335 else
3336   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3337 $as_echo "no" >&6; }
3338 fi
3339
3340
3341   test -n "$GENHTML" && break
3342 done
3343
3344 if test -z "$GENHTML"; then
3345   as_fn_error $? "genhtml not found" "$LINENO" 5
3346 fi
3347       ;;
3348     no)
3349       :
3350       ;;
3351     *)
3352       as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3353       ;;
3354   esac
3355
3356 else
3357   enable_coverage=no
3358
3359 fi
3360
3361
3362
3363
3364 #
3365 # DTrace
3366 #
3367
3368
3369 # Check whether --enable-dtrace was given.
3370 if test "${enable_dtrace+set}" = set; then :
3371   enableval=$enable_dtrace;
3372   case $enableval in
3373     yes)
3374       for ac_prog in dtrace
3375 do
3376   # Extract the first word of "$ac_prog", so it can be a program name with args.
3377 set dummy $ac_prog; ac_word=$2
3378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3379 $as_echo_n "checking for $ac_word... " >&6; }
3380 if ${ac_cv_prog_DTRACE+:} false; then :
3381   $as_echo_n "(cached) " >&6
3382 else
3383   if test -n "$DTRACE"; then
3384   ac_cv_prog_DTRACE="$DTRACE" # Let the user override the test.
3385 else
3386 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3387 for as_dir in $PATH
3388 do
3389   IFS=$as_save_IFS
3390   test -z "$as_dir" && as_dir=.
3391     for ac_exec_ext in '' $ac_executable_extensions; do
3392   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3393     ac_cv_prog_DTRACE="$ac_prog"
3394     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3395     break 2
3396   fi
3397 done
3398   done
3399 IFS=$as_save_IFS
3400
3401 fi
3402 fi
3403 DTRACE=$ac_cv_prog_DTRACE
3404 if test -n "$DTRACE"; then
3405   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3406 $as_echo "$DTRACE" >&6; }
3407 else
3408   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3409 $as_echo "no" >&6; }
3410 fi
3411
3412
3413   test -n "$DTRACE" && break
3414 done
3415
3416 if test -z "$DTRACE"; then
3417   as_fn_error $? "dtrace not found" "$LINENO" 5
3418 fi
3419
3420       ;;
3421     no)
3422       :
3423       ;;
3424     *)
3425       as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3426       ;;
3427   esac
3428
3429 else
3430   enable_dtrace=no
3431
3432 fi
3433
3434
3435
3436
3437 #
3438 # Block size
3439 #
3440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3441 $as_echo_n "checking for block size... " >&6; }
3442
3443
3444
3445 # Check whether --with-blocksize was given.
3446 if test "${with_blocksize+set}" = set; then :
3447   withval=$with_blocksize;
3448   case $withval in
3449     yes)
3450       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3451       ;;
3452     no)
3453       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3454       ;;
3455     *)
3456       blocksize=$withval
3457       ;;
3458   esac
3459
3460 else
3461   blocksize=8
3462 fi
3463
3464
3465 case ${blocksize} in
3466   1) BLCKSZ=1024;;
3467   2) BLCKSZ=2048;;
3468   4) BLCKSZ=4096;;
3469   8) BLCKSZ=8192;;
3470  16) BLCKSZ=16384;;
3471  32) BLCKSZ=32768;;
3472   *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3473 esac
3474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3475 $as_echo "${blocksize}kB" >&6; }
3476
3477
3478 cat >>confdefs.h <<_ACEOF
3479 #define BLCKSZ ${BLCKSZ}
3480 _ACEOF
3481
3482
3483 #
3484 # Relation segment size
3485 #
3486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3487 $as_echo_n "checking for segment size... " >&6; }
3488
3489
3490
3491 # Check whether --with-segsize was given.
3492 if test "${with_segsize+set}" = set; then :
3493   withval=$with_segsize;
3494   case $withval in
3495     yes)
3496       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3497       ;;
3498     no)
3499       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3500       ;;
3501     *)
3502       segsize=$withval
3503       ;;
3504   esac
3505
3506 else
3507   segsize=1
3508 fi
3509
3510
3511 # this expression is set up to avoid unnecessary integer overflow
3512 # blocksize is already guaranteed to be a factor of 1024
3513 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3514 test $? -eq 0 || exit 1
3515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3516 $as_echo "${segsize}GB" >&6; }
3517
3518
3519 cat >>confdefs.h <<_ACEOF
3520 #define RELSEG_SIZE ${RELSEG_SIZE}
3521 _ACEOF
3522
3523
3524 #
3525 # WAL block size
3526 #
3527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3528 $as_echo_n "checking for WAL block size... " >&6; }
3529
3530
3531
3532 # Check whether --with-wal-blocksize was given.
3533 if test "${with_wal_blocksize+set}" = set; then :
3534   withval=$with_wal_blocksize;
3535   case $withval in
3536     yes)
3537       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3538       ;;
3539     no)
3540       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3541       ;;
3542     *)
3543       wal_blocksize=$withval
3544       ;;
3545   esac
3546
3547 else
3548   wal_blocksize=8
3549 fi
3550
3551
3552 case ${wal_blocksize} in
3553   1) XLOG_BLCKSZ=1024;;
3554   2) XLOG_BLCKSZ=2048;;
3555   4) XLOG_BLCKSZ=4096;;
3556   8) XLOG_BLCKSZ=8192;;
3557  16) XLOG_BLCKSZ=16384;;
3558  32) XLOG_BLCKSZ=32768;;
3559  64) XLOG_BLCKSZ=65536;;
3560   *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3561 esac
3562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3563 $as_echo "${wal_blocksize}kB" >&6; }
3564
3565
3566 cat >>confdefs.h <<_ACEOF
3567 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3568 _ACEOF
3569
3570
3571 #
3572 # WAL segment size
3573 #
3574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL segment size" >&5
3575 $as_echo_n "checking for WAL segment size... " >&6; }
3576
3577
3578
3579 # Check whether --with-wal-segsize was given.
3580 if test "${with_wal_segsize+set}" = set; then :
3581   withval=$with_wal_segsize;
3582   case $withval in
3583     yes)
3584       as_fn_error $? "argument required for --with-wal-segsize option" "$LINENO" 5
3585       ;;
3586     no)
3587       as_fn_error $? "argument required for --with-wal-segsize option" "$LINENO" 5
3588       ;;
3589     *)
3590       wal_segsize=$withval
3591       ;;
3592   esac
3593
3594 else
3595   wal_segsize=16
3596 fi
3597
3598
3599 case ${wal_segsize} in
3600   1) ;;
3601   2) ;;
3602   4) ;;
3603   8) ;;
3604  16) ;;
3605  32) ;;
3606  64) ;;
3607   *) as_fn_error $? "Invalid WAL segment size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3608 esac
3609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_segsize}MB" >&5
3610 $as_echo "${wal_segsize}MB" >&6; }
3611
3612
3613 cat >>confdefs.h <<_ACEOF
3614 #define XLOG_SEG_SIZE (${wal_segsize} * 1024 * 1024)
3615 _ACEOF
3616
3617
3618 #
3619 # C compiler
3620 #
3621
3622 # For historical reasons you can also use --with-CC to specify the C compiler
3623 # to use, although the standard way to do this is to set the CC environment
3624 # variable.
3625
3626
3627
3628 # Check whether --with-CC was given.
3629 if test "${with_CC+set}" = set; then :
3630   withval=$with_CC;
3631   case $withval in
3632     yes)
3633       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3634       ;;
3635     no)
3636       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3637       ;;
3638     *)
3639       CC=$with_CC
3640       ;;
3641   esac
3642
3643 fi
3644
3645
3646
3647 case $template in
3648   aix) pgac_cc_list="gcc xlc";;
3649     *) pgac_cc_list="gcc cc";;
3650 esac
3651
3652 ac_ext=c
3653 ac_cpp='$CPP $CPPFLAGS'
3654 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3655 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3656 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3657 if test -n "$ac_tool_prefix"; then
3658   for ac_prog in $pgac_cc_list
3659   do
3660     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3661 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3663 $as_echo_n "checking for $ac_word... " >&6; }
3664 if ${ac_cv_prog_CC+:} false; then :
3665   $as_echo_n "(cached) " >&6
3666 else
3667   if test -n "$CC"; then
3668   ac_cv_prog_CC="$CC" # Let the user override the test.
3669 else
3670 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3671 for as_dir in $PATH
3672 do
3673   IFS=$as_save_IFS
3674   test -z "$as_dir" && as_dir=.
3675     for ac_exec_ext in '' $ac_executable_extensions; do
3676   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3677     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3678     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3679     break 2
3680   fi
3681 done
3682   done
3683 IFS=$as_save_IFS
3684
3685 fi
3686 fi
3687 CC=$ac_cv_prog_CC
3688 if test -n "$CC"; then
3689   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3690 $as_echo "$CC" >&6; }
3691 else
3692   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3693 $as_echo "no" >&6; }
3694 fi
3695
3696
3697     test -n "$CC" && break
3698   done
3699 fi
3700 if test -z "$CC"; then
3701   ac_ct_CC=$CC
3702   for ac_prog in $pgac_cc_list
3703 do
3704   # Extract the first word of "$ac_prog", so it can be a program name with args.
3705 set dummy $ac_prog; ac_word=$2
3706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3707 $as_echo_n "checking for $ac_word... " >&6; }
3708 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3709   $as_echo_n "(cached) " >&6
3710 else
3711   if test -n "$ac_ct_CC"; then
3712   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3713 else
3714 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3715 for as_dir in $PATH
3716 do
3717   IFS=$as_save_IFS
3718   test -z "$as_dir" && as_dir=.
3719     for ac_exec_ext in '' $ac_executable_extensions; do
3720   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3721     ac_cv_prog_ac_ct_CC="$ac_prog"
3722     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3723     break 2
3724   fi
3725 done
3726   done
3727 IFS=$as_save_IFS
3728
3729 fi
3730 fi
3731 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3732 if test -n "$ac_ct_CC"; then
3733   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3734 $as_echo "$ac_ct_CC" >&6; }
3735 else
3736   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3737 $as_echo "no" >&6; }
3738 fi
3739
3740
3741   test -n "$ac_ct_CC" && break
3742 done
3743
3744   if test "x$ac_ct_CC" = x; then
3745     CC=""
3746   else
3747     case $cross_compiling:$ac_tool_warned in
3748 yes:)
3749 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3750 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3751 ac_tool_warned=yes ;;
3752 esac
3753     CC=$ac_ct_CC
3754   fi
3755 fi
3756
3757
3758 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3759 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3760 as_fn_error $? "no acceptable C compiler found in \$PATH
3761 See \`config.log' for more details" "$LINENO" 5; }
3762
3763 # Provide some information about the compiler.
3764 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3765 set X $ac_compile
3766 ac_compiler=$2
3767 for ac_option in --version -v -V -qversion; do
3768   { { ac_try="$ac_compiler $ac_option >&5"
3769 case "(($ac_try" in
3770   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3771   *) ac_try_echo=$ac_try;;
3772 esac
3773 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3774 $as_echo "$ac_try_echo"; } >&5
3775   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3776   ac_status=$?
3777   if test -s conftest.err; then
3778     sed '10a\
3779 ... rest of stderr output deleted ...
3780          10q' conftest.err >conftest.er1
3781     cat conftest.er1 >&5
3782   fi
3783   rm -f conftest.er1 conftest.err
3784   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3785   test $ac_status = 0; }
3786 done
3787
3788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3789 /* end confdefs.h.  */
3790
3791 int
3792 main ()
3793 {
3794
3795   ;
3796   return 0;
3797 }
3798 _ACEOF
3799 ac_clean_files_save=$ac_clean_files
3800 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3801 # Try to create an executable without -o first, disregard a.out.
3802 # It will help us diagnose broken compilers, and finding out an intuition
3803 # of exeext.
3804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3805 $as_echo_n "checking whether the C compiler works... " >&6; }
3806 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3807
3808 # The possible output files:
3809 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3810
3811 ac_rmfiles=
3812 for ac_file in $ac_files
3813 do
3814   case $ac_file in
3815     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3816     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3817   esac
3818 done
3819 rm -f $ac_rmfiles
3820
3821 if { { ac_try="$ac_link_default"
3822 case "(($ac_try" in
3823   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3824   *) ac_try_echo=$ac_try;;
3825 esac
3826 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3827 $as_echo "$ac_try_echo"; } >&5
3828   (eval "$ac_link_default") 2>&5
3829   ac_status=$?
3830   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3831   test $ac_status = 0; }; then :
3832   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3833 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3834 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3835 # so that the user can short-circuit this test for compilers unknown to
3836 # Autoconf.
3837 for ac_file in $ac_files ''
3838 do
3839   test -f "$ac_file" || continue
3840   case $ac_file in
3841     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3842         ;;
3843     [ab].out )
3844         # We found the default executable, but exeext='' is most
3845         # certainly right.
3846         break;;
3847     *.* )
3848         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3849         then :; else
3850            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3851         fi
3852         # We set ac_cv_exeext here because the later test for it is not
3853         # safe: cross compilers may not add the suffix if given an `-o'
3854         # argument, so we may need to know it at that point already.
3855         # Even if this section looks crufty: it has the advantage of
3856         # actually working.
3857         break;;
3858     * )
3859         break;;
3860   esac
3861 done
3862 test "$ac_cv_exeext" = no && ac_cv_exeext=
3863
3864 else
3865   ac_file=''
3866 fi
3867 if test -z "$ac_file"; then :
3868   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3869 $as_echo "no" >&6; }
3870 $as_echo "$as_me: failed program was:" >&5
3871 sed 's/^/| /' conftest.$ac_ext >&5
3872
3873 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3874 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3875 as_fn_error 77 "C compiler cannot create executables
3876 See \`config.log' for more details" "$LINENO" 5; }
3877 else
3878   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3879 $as_echo "yes" >&6; }
3880 fi
3881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3882 $as_echo_n "checking for C compiler default output file name... " >&6; }
3883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3884 $as_echo "$ac_file" >&6; }
3885 ac_exeext=$ac_cv_exeext
3886
3887 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3888 ac_clean_files=$ac_clean_files_save
3889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3890 $as_echo_n "checking for suffix of executables... " >&6; }
3891 if { { ac_try="$ac_link"
3892 case "(($ac_try" in
3893   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3894   *) ac_try_echo=$ac_try;;
3895 esac
3896 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3897 $as_echo "$ac_try_echo"; } >&5
3898   (eval "$ac_link") 2>&5
3899   ac_status=$?
3900   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3901   test $ac_status = 0; }; then :
3902   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3903 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3904 # work properly (i.e., refer to `conftest.exe'), while it won't with
3905 # `rm'.
3906 for ac_file in conftest.exe conftest conftest.*; do
3907   test -f "$ac_file" || continue
3908   case $ac_file in
3909     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3910     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3911           break;;
3912     * ) break;;
3913   esac
3914 done
3915 else
3916   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3917 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3918 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3919 See \`config.log' for more details" "$LINENO" 5; }
3920 fi
3921 rm -f conftest conftest$ac_cv_exeext
3922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3923 $as_echo "$ac_cv_exeext" >&6; }
3924
3925 rm -f conftest.$ac_ext
3926 EXEEXT=$ac_cv_exeext
3927 ac_exeext=$EXEEXT
3928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3929 /* end confdefs.h.  */
3930 #include <stdio.h>
3931 int
3932 main ()
3933 {
3934 FILE *f = fopen ("conftest.out", "w");
3935  return ferror (f) || fclose (f) != 0;
3936
3937   ;
3938   return 0;
3939 }
3940 _ACEOF
3941 ac_clean_files="$ac_clean_files conftest.out"
3942 # Check that the compiler produces executables we can run.  If not, either
3943 # the compiler is broken, or we cross compile.
3944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3945 $as_echo_n "checking whether we are cross compiling... " >&6; }
3946 if test "$cross_compiling" != yes; then
3947   { { ac_try="$ac_link"
3948 case "(($ac_try" in
3949   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3950   *) ac_try_echo=$ac_try;;
3951 esac
3952 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3953 $as_echo "$ac_try_echo"; } >&5
3954   (eval "$ac_link") 2>&5
3955   ac_status=$?
3956   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3957   test $ac_status = 0; }
3958   if { ac_try='./conftest$ac_cv_exeext'
3959   { { case "(($ac_try" in
3960   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3961   *) ac_try_echo=$ac_try;;
3962 esac
3963 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3964 $as_echo "$ac_try_echo"; } >&5
3965   (eval "$ac_try") 2>&5
3966   ac_status=$?
3967   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3968   test $ac_status = 0; }; }; then
3969     cross_compiling=no
3970   else
3971     if test "$cross_compiling" = maybe; then
3972         cross_compiling=yes
3973     else
3974         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3975 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3976 as_fn_error $? "cannot run C compiled programs.
3977 If you meant to cross compile, use \`--host'.
3978 See \`config.log' for more details" "$LINENO" 5; }
3979     fi
3980   fi
3981 fi
3982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3983 $as_echo "$cross_compiling" >&6; }
3984
3985 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3986 ac_clean_files=$ac_clean_files_save
3987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3988 $as_echo_n "checking for suffix of object files... " >&6; }
3989 if ${ac_cv_objext+:} false; then :
3990   $as_echo_n "(cached) " >&6
3991 else
3992   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3993 /* end confdefs.h.  */
3994
3995 int
3996 main ()
3997 {
3998
3999   ;
4000   return 0;
4001 }
4002 _ACEOF
4003 rm -f conftest.o conftest.obj
4004 if { { ac_try="$ac_compile"
4005 case "(($ac_try" in
4006   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4007   *) ac_try_echo=$ac_try;;
4008 esac
4009 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4010 $as_echo "$ac_try_echo"; } >&5
4011   (eval "$ac_compile") 2>&5
4012   ac_status=$?
4013   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4014   test $ac_status = 0; }; then :
4015   for ac_file in conftest.o conftest.obj conftest.*; do
4016   test -f "$ac_file" || continue;
4017   case $ac_file in
4018     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4019     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4020        break;;
4021   esac
4022 done
4023 else
4024   $as_echo "$as_me: failed program was:" >&5
4025 sed 's/^/| /' conftest.$ac_ext >&5
4026
4027 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4028 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4029 as_fn_error $? "cannot compute suffix of object files: cannot compile
4030 See \`config.log' for more details" "$LINENO" 5; }
4031 fi
4032 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4033 fi
4034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4035 $as_echo "$ac_cv_objext" >&6; }
4036 OBJEXT=$ac_cv_objext
4037 ac_objext=$OBJEXT
4038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4039 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4040 if ${ac_cv_c_compiler_gnu+:} false; then :
4041   $as_echo_n "(cached) " >&6
4042 else
4043   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4044 /* end confdefs.h.  */
4045
4046 int
4047 main ()
4048 {
4049 #ifndef __GNUC__
4050        choke me
4051 #endif
4052
4053   ;
4054   return 0;
4055 }
4056 _ACEOF
4057 if ac_fn_c_try_compile "$LINENO"; then :
4058   ac_compiler_gnu=yes
4059 else
4060   ac_compiler_gnu=no
4061 fi
4062 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4063 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4064
4065 fi
4066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4067 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4068 if test $ac_compiler_gnu = yes; then
4069   GCC=yes
4070 else
4071   GCC=
4072 fi
4073 ac_test_CFLAGS=${CFLAGS+set}
4074 ac_save_CFLAGS=$CFLAGS
4075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4076 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4077 if ${ac_cv_prog_cc_g+:} false; then :
4078   $as_echo_n "(cached) " >&6
4079 else
4080   ac_save_c_werror_flag=$ac_c_werror_flag
4081    ac_c_werror_flag=yes
4082    ac_cv_prog_cc_g=no
4083    CFLAGS="-g"
4084    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4085 /* end confdefs.h.  */
4086
4087 int
4088 main ()
4089 {
4090
4091   ;
4092   return 0;
4093 }
4094 _ACEOF
4095 if ac_fn_c_try_compile "$LINENO"; then :
4096   ac_cv_prog_cc_g=yes
4097 else
4098   CFLAGS=""
4099       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4100 /* end confdefs.h.  */
4101
4102 int
4103 main ()
4104 {
4105
4106   ;
4107   return 0;
4108 }
4109 _ACEOF
4110 if ac_fn_c_try_compile "$LINENO"; then :
4111
4112 else
4113   ac_c_werror_flag=$ac_save_c_werror_flag
4114          CFLAGS="-g"
4115          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4116 /* end confdefs.h.  */
4117
4118 int
4119 main ()
4120 {
4121
4122   ;
4123   return 0;
4124 }
4125 _ACEOF
4126 if ac_fn_c_try_compile "$LINENO"; then :
4127   ac_cv_prog_cc_g=yes
4128 fi
4129 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4130 fi
4131 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4132 fi
4133 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4134    ac_c_werror_flag=$ac_save_c_werror_flag
4135 fi
4136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4137 $as_echo "$ac_cv_prog_cc_g" >&6; }
4138 if test "$ac_test_CFLAGS" = set; then
4139   CFLAGS=$ac_save_CFLAGS
4140 elif test $ac_cv_prog_cc_g = yes; then
4141   if test "$GCC" = yes; then
4142     CFLAGS="-g -O2"
4143   else
4144     CFLAGS="-g"
4145   fi
4146 else
4147   if test "$GCC" = yes; then
4148     CFLAGS="-O2"
4149   else
4150     CFLAGS=
4151   fi
4152 fi
4153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4154 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4155 if ${ac_cv_prog_cc_c89+:} false; then :
4156   $as_echo_n "(cached) " >&6
4157 else
4158   ac_cv_prog_cc_c89=no
4159 ac_save_CC=$CC
4160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4161 /* end confdefs.h.  */
4162 #include <stdarg.h>
4163 #include <stdio.h>
4164 struct stat;
4165 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4166 struct buf { int x; };
4167 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4168 static char *e (p, i)
4169      char **p;
4170      int i;
4171 {
4172   return p[i];
4173 }
4174 static char *f (char * (*g) (char **, int), char **p, ...)
4175 {
4176   char *s;
4177   va_list v;
4178   va_start (v,p);
4179   s = g (p, va_arg (v,int));
4180   va_end (v);
4181   return s;
4182 }
4183
4184 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4185    function prototypes and stuff, but not '\xHH' hex character constants.
4186    These don't provoke an error unfortunately, instead are silently treated
4187    as 'x'.  The following induces an error, until -std is added to get
4188    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4189    array size at least.  It's necessary to write '\x00'==0 to get something
4190    that's true only with -std.  */
4191 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4192
4193 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4194    inside strings and character constants.  */
4195 #define FOO(x) 'x'
4196 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4197
4198 int test (int i, double x);
4199 struct s1 {int (*f) (int a);};
4200 struct s2 {int (*f) (double a);};
4201 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4202 int argc;
4203 char **argv;
4204 int
4205 main ()
4206 {
4207 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4208   ;
4209   return 0;
4210 }
4211 _ACEOF
4212 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4213         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4214 do
4215   CC="$ac_save_CC $ac_arg"
4216   if ac_fn_c_try_compile "$LINENO"; then :
4217   ac_cv_prog_cc_c89=$ac_arg
4218 fi
4219 rm -f core conftest.err conftest.$ac_objext
4220   test "x$ac_cv_prog_cc_c89" != "xno" && break
4221 done
4222 rm -f conftest.$ac_ext
4223 CC=$ac_save_CC
4224
4225 fi
4226 # AC_CACHE_VAL
4227 case "x$ac_cv_prog_cc_c89" in
4228   x)
4229     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4230 $as_echo "none needed" >&6; } ;;
4231   xno)
4232     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4233 $as_echo "unsupported" >&6; } ;;
4234   *)
4235     CC="$CC $ac_cv_prog_cc_c89"
4236     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4237 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4238 esac
4239 if test "x$ac_cv_prog_cc_c89" != xno; then :
4240
4241 fi
4242
4243 ac_ext=c
4244 ac_cpp='$CPP $CPPFLAGS'
4245 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4246 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4247 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4248
4249
4250 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4251 # but has idiosyncrasies of its own.  We assume icc will define
4252 # __INTEL_COMPILER regardless of CFLAGS.
4253
4254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4255 /* end confdefs.h.  */
4256
4257 int
4258 main ()
4259 {
4260 #ifndef __INTEL_COMPILER
4261 choke me
4262 #endif
4263   ;
4264   return 0;
4265 }
4266 _ACEOF
4267 if ac_fn_c_try_compile "$LINENO"; then :
4268   ICC=yes
4269 else
4270   ICC=no
4271 fi
4272 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4273
4274 # Check if it's Sun Studio compiler. We assume that
4275 # __SUNPRO_C will be defined for Sun Studio compilers
4276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4277 /* end confdefs.h.  */
4278
4279 int
4280 main ()
4281 {
4282 #ifndef __SUNPRO_C
4283 choke me
4284 #endif
4285   ;
4286   return 0;
4287 }
4288 _ACEOF
4289 if ac_fn_c_try_compile "$LINENO"; then :
4290   SUN_STUDIO_CC=yes
4291 else
4292   SUN_STUDIO_CC=no
4293 fi
4294 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4295
4296
4297
4298 unset CFLAGS
4299
4300 #
4301 # Read the template
4302 #
4303 . "$srcdir/src/template/$template" || exit
4304
4305 # CFLAGS are selected so:
4306 # If the user specifies something in the environment, that is used.
4307 # else:  If the template file set something, that is used.
4308 # else:  If coverage was enabled, don't set anything.
4309 # else:  If the compiler is GCC, then we use -O2.
4310 # else:  If the compiler is something else, then we use -O, unless debugging.
4311
4312 if test "$ac_env_CFLAGS_set" = set; then
4313   CFLAGS=$ac_env_CFLAGS_value
4314 elif test "${CFLAGS+set}" = set; then
4315   : # (keep what template set)
4316 elif test "$enable_coverage" = yes; then
4317   : # no optimization by default
4318 elif test "$GCC" = yes; then
4319   CFLAGS="-O2"
4320 else
4321   # if the user selected debug mode, don't use -O
4322   if test "$enable_debug" != yes; then
4323     CFLAGS="-O"
4324   fi
4325 fi
4326
4327 # set CFLAGS_VECTOR from the environment, if available
4328 if test "$ac_env_CFLAGS_VECTOR_set" = set; then
4329   CFLAGS_VECTOR=$ac_env_CFLAGS_VECTOR_value
4330 fi
4331
4332 # Some versions of GCC support some additional useful warning flags.
4333 # Check whether they are supported, and add them to CFLAGS if so.
4334 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
4335 # but has its own.  Also check other compiler-specific flags here.
4336
4337 if test "$GCC" = yes -a "$ICC" = no; then
4338   CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wpointer-arith"
4339   # These work in some but not all gcc versions
4340   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5
4341 $as_echo_n "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
4342 if ${pgac_cv_prog_cc_cflags__Wdeclaration_after_statement+:} false; then :
4343   $as_echo_n "(cached) " >&6
4344 else
4345   pgac_save_CFLAGS=$CFLAGS
4346 CFLAGS="$pgac_save_CFLAGS -Wdeclaration-after-statement"
4347 ac_save_c_werror_flag=$ac_c_werror_flag
4348 ac_c_werror_flag=yes
4349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4350 /* end confdefs.h.  */
4351
4352 int
4353 main ()
4354 {
4355
4356   ;
4357   return 0;
4358 }
4359 _ACEOF
4360 if ac_fn_c_try_compile "$LINENO"; then :
4361   pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=yes
4362 else
4363   pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=no
4364 fi
4365 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4366 ac_c_werror_flag=$ac_save_c_werror_flag
4367 CFLAGS="$pgac_save_CFLAGS"
4368 fi
4369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&5
4370 $as_echo "$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&6; }
4371 if test x"$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" = x"yes"; then
4372   CFLAGS="$CFLAGS -Wdeclaration-after-statement"
4373 fi
4374
4375   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wendif-labels" >&5
4376 $as_echo_n "checking whether $CC supports -Wendif-labels... " >&6; }
4377 if ${pgac_cv_prog_cc_cflags__Wendif_labels+:} false; then :
4378   $as_echo_n "(cached) " >&6
4379 else
4380   pgac_save_CFLAGS=$CFLAGS
4381 CFLAGS="$pgac_save_CFLAGS -Wendif-labels"
4382 ac_save_c_werror_flag=$ac_c_werror_flag
4383 ac_c_werror_flag=yes
4384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4385 /* end confdefs.h.  */
4386
4387 int
4388 main ()
4389 {
4390
4391   ;
4392   return 0;
4393 }
4394 _ACEOF
4395 if ac_fn_c_try_compile "$LINENO"; then :
4396   pgac_cv_prog_cc_cflags__Wendif_labels=yes
4397 else
4398   pgac_cv_prog_cc_cflags__Wendif_labels=no
4399 fi
4400 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4401 ac_c_werror_flag=$ac_save_c_werror_flag
4402 CFLAGS="$pgac_save_CFLAGS"
4403 fi
4404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wendif_labels" >&5
4405 $as_echo "$pgac_cv_prog_cc_cflags__Wendif_labels" >&6; }
4406 if test x"$pgac_cv_prog_cc_cflags__Wendif_labels" = x"yes"; then
4407   CFLAGS="$CFLAGS -Wendif-labels"
4408 fi
4409
4410   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wmissing-format-attribute" >&5
4411 $as_echo_n "checking whether $CC supports -Wmissing-format-attribute... " >&6; }
4412 if ${pgac_cv_prog_cc_cflags__Wmissing_format_attribute+:} false; then :
4413   $as_echo_n "(cached) " >&6
4414 else
4415   pgac_save_CFLAGS=$CFLAGS
4416 CFLAGS="$pgac_save_CFLAGS -Wmissing-format-attribute"
4417 ac_save_c_werror_flag=$ac_c_werror_flag
4418 ac_c_werror_flag=yes
4419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4420 /* end confdefs.h.  */
4421
4422 int
4423 main ()
4424 {
4425
4426   ;
4427   return 0;
4428 }
4429 _ACEOF
4430 if ac_fn_c_try_compile "$LINENO"; then :
4431   pgac_cv_prog_cc_cflags__Wmissing_format_attribute=yes
4432 else
4433   pgac_cv_prog_cc_cflags__Wmissing_format_attribute=no
4434 fi
4435 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4436 ac_c_werror_flag=$ac_save_c_werror_flag
4437 CFLAGS="$pgac_save_CFLAGS"
4438 fi
4439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wmissing_format_attribute" >&5
4440 $as_echo "$pgac_cv_prog_cc_cflags__Wmissing_format_attribute" >&6; }
4441 if test x"$pgac_cv_prog_cc_cflags__Wmissing_format_attribute" = x"yes"; then
4442   CFLAGS="$CFLAGS -Wmissing-format-attribute"
4443 fi
4444
4445   # This was included in -Wall/-Wformat in older GCC versions
4446   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wformat-security" >&5
4447 $as_echo_n "checking whether $CC supports -Wformat-security... " >&6; }
4448 if ${pgac_cv_prog_cc_cflags__Wformat_security+:} false; then :
4449   $as_echo_n "(cached) " >&6
4450 else
4451   pgac_save_CFLAGS=$CFLAGS
4452 CFLAGS="$pgac_save_CFLAGS -Wformat-security"
4453 ac_save_c_werror_flag=$ac_c_werror_flag
4454 ac_c_werror_flag=yes
4455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4456 /* end confdefs.h.  */
4457
4458 int
4459 main ()
4460 {
4461
4462   ;
4463   return 0;
4464 }
4465 _ACEOF
4466 if ac_fn_c_try_compile "$LINENO"; then :
4467   pgac_cv_prog_cc_cflags__Wformat_security=yes
4468 else
4469   pgac_cv_prog_cc_cflags__Wformat_security=no
4470 fi
4471 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4472 ac_c_werror_flag=$ac_save_c_werror_flag
4473 CFLAGS="$pgac_save_CFLAGS"
4474 fi
4475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wformat_security" >&5
4476 $as_echo "$pgac_cv_prog_cc_cflags__Wformat_security" >&6; }
4477 if test x"$pgac_cv_prog_cc_cflags__Wformat_security" = x"yes"; then
4478   CFLAGS="$CFLAGS -Wformat-security"
4479 fi
4480
4481   # Disable strict-aliasing rules; needed for gcc 3.3+
4482   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-strict-aliasing" >&5
4483 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4484 if ${pgac_cv_prog_cc_cflags__fno_strict_aliasing+:} false; then :
4485   $as_echo_n "(cached) " >&6
4486 else
4487   pgac_save_CFLAGS=$CFLAGS
4488 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4489 ac_save_c_werror_flag=$ac_c_werror_flag
4490 ac_c_werror_flag=yes
4491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4492 /* end confdefs.h.  */
4493
4494 int
4495 main ()
4496 {
4497
4498   ;
4499   return 0;
4500 }
4501 _ACEOF
4502 if ac_fn_c_try_compile "$LINENO"; then :
4503   pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4504 else
4505   pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4506 fi
4507 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4508 ac_c_werror_flag=$ac_save_c_werror_flag
4509 CFLAGS="$pgac_save_CFLAGS"
4510 fi
4511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4512 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4513 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4514   CFLAGS="$CFLAGS -fno-strict-aliasing"
4515 fi
4516
4517   # Disable optimizations that assume no overflow; needed for gcc 4.3+
4518   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fwrapv" >&5
4519 $as_echo_n "checking whether $CC supports -fwrapv... " >&6; }
4520 if ${pgac_cv_prog_cc_cflags__fwrapv+:} false; then :
4521   $as_echo_n "(cached) " >&6
4522 else
4523   pgac_save_CFLAGS=$CFLAGS
4524 CFLAGS="$pgac_save_CFLAGS -fwrapv"
4525 ac_save_c_werror_flag=$ac_c_werror_flag
4526 ac_c_werror_flag=yes
4527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4528 /* end confdefs.h.  */
4529
4530 int
4531 main ()
4532 {
4533
4534   ;
4535   return 0;
4536 }
4537 _ACEOF
4538 if ac_fn_c_try_compile "$LINENO"; then :
4539   pgac_cv_prog_cc_cflags__fwrapv=yes
4540 else
4541   pgac_cv_prog_cc_cflags__fwrapv=no
4542 fi
4543 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4544 ac_c_werror_flag=$ac_save_c_werror_flag
4545 CFLAGS="$pgac_save_CFLAGS"
4546 fi
4547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fwrapv" >&5
4548 $as_echo "$pgac_cv_prog_cc_cflags__fwrapv" >&6; }
4549 if test x"$pgac_cv_prog_cc_cflags__fwrapv" = x"yes"; then
4550   CFLAGS="$CFLAGS -fwrapv"
4551 fi
4552
4553   # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
4554   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fexcess-precision=standard" >&5
4555 $as_echo_n "checking whether $CC supports -fexcess-precision=standard... " >&6; }
4556 if ${pgac_cv_prog_cc_cflags__fexcess_precision_standard+:} false; then :
4557   $as_echo_n "(cached) " >&6
4558 else
4559   pgac_save_CFLAGS=$CFLAGS
4560 CFLAGS="$pgac_save_CFLAGS -fexcess-precision=standard"
4561 ac_save_c_werror_flag=$ac_c_werror_flag
4562 ac_c_werror_flag=yes
4563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4564 /* end confdefs.h.  */
4565
4566 int
4567 main ()
4568 {
4569
4570   ;
4571   return 0;
4572 }
4573 _ACEOF
4574 if ac_fn_c_try_compile "$LINENO"; then :
4575   pgac_cv_prog_cc_cflags__fexcess_precision_standard=yes
4576 else
4577   pgac_cv_prog_cc_cflags__fexcess_precision_standard=no
4578 fi
4579 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4580 ac_c_werror_flag=$ac_save_c_werror_flag
4581 CFLAGS="$pgac_save_CFLAGS"
4582 fi
4583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fexcess_precision_standard" >&5
4584 $as_echo "$pgac_cv_prog_cc_cflags__fexcess_precision_standard" >&6; }
4585 if test x"$pgac_cv_prog_cc_cflags__fexcess_precision_standard" = x"yes"; then
4586   CFLAGS="$CFLAGS -fexcess-precision=standard"
4587 fi
4588
4589   # Optimization flags for specific files that benefit from vectorization
4590   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -funroll-loops" >&5
4591 $as_echo_n "checking whether $CC supports -funroll-loops... " >&6; }
4592 if ${pgac_cv_prog_cc_cflags__funroll_loops+:} false; then :
4593   $as_echo_n "(cached) " >&6
4594 else
4595   pgac_save_CFLAGS=$CFLAGS
4596 CFLAGS="$pgac_save_CFLAGS -funroll-loops"
4597 ac_save_c_werror_flag=$ac_c_werror_flag
4598 ac_c_werror_flag=yes
4599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4600 /* end confdefs.h.  */
4601
4602 int
4603 main ()
4604 {
4605
4606   ;
4607   return 0;
4608 }
4609 _ACEOF
4610 if ac_fn_c_try_compile "$LINENO"; then :
4611   pgac_cv_prog_cc_cflags__funroll_loops=yes
4612 else
4613   pgac_cv_prog_cc_cflags__funroll_loops=no
4614 fi
4615 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4616 ac_c_werror_flag=$ac_save_c_werror_flag
4617 CFLAGS="$pgac_save_CFLAGS"
4618 fi
4619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__funroll_loops" >&5
4620 $as_echo "$pgac_cv_prog_cc_cflags__funroll_loops" >&6; }
4621 if test x"$pgac_cv_prog_cc_cflags__funroll_loops" = x"yes"; then
4622   CFLAGS_VECTOR="${CFLAGS_VECTOR} -funroll-loops"
4623 fi
4624
4625   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -ftree-vectorize" >&5
4626 $as_echo_n "checking whether $CC supports -ftree-vectorize... " >&6; }
4627 if ${pgac_cv_prog_cc_cflags__ftree_vectorize+:} false; then :
4628   $as_echo_n "(cached) " >&6
4629 else
4630   pgac_save_CFLAGS=$CFLAGS
4631 CFLAGS="$pgac_save_CFLAGS -ftree-vectorize"
4632 ac_save_c_werror_flag=$ac_c_werror_flag
4633 ac_c_werror_flag=yes
4634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4635 /* end confdefs.h.  */
4636
4637 int
4638 main ()
4639 {
4640
4641   ;
4642   return 0;
4643 }
4644 _ACEOF
4645 if ac_fn_c_try_compile "$LINENO"; then :
4646   pgac_cv_prog_cc_cflags__ftree_vectorize=yes
4647 else
4648   pgac_cv_prog_cc_cflags__ftree_vectorize=no
4649 fi
4650 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4651 ac_c_werror_flag=$ac_save_c_werror_flag
4652 CFLAGS="$pgac_save_CFLAGS"
4653 fi
4654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__ftree_vectorize" >&5
4655 $as_echo "$pgac_cv_prog_cc_cflags__ftree_vectorize" >&6; }
4656 if test x"$pgac_cv_prog_cc_cflags__ftree_vectorize" = x"yes"; then
4657   CFLAGS_VECTOR="${CFLAGS_VECTOR} -ftree-vectorize"
4658 fi
4659
4660 elif test "$ICC" = yes; then
4661   # Intel's compiler has a bug/misoptimization in checking for
4662   # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
4663   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mp1" >&5
4664 $as_echo_n "checking whether $CC supports -mp1... " >&6; }
4665 if ${pgac_cv_prog_cc_cflags__mp1+:} false; then :
4666   $as_echo_n "(cached) " >&6
4667 else
4668   pgac_save_CFLAGS=$CFLAGS
4669 CFLAGS="$pgac_save_CFLAGS -mp1"
4670 ac_save_c_werror_flag=$ac_c_werror_flag
4671 ac_c_werror_flag=yes
4672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4673 /* end confdefs.h.  */
4674
4675 int
4676 main ()
4677 {
4678
4679   ;
4680   return 0;
4681 }
4682 _ACEOF
4683 if ac_fn_c_try_compile "$LINENO"; then :
4684   pgac_cv_prog_cc_cflags__mp1=yes
4685 else
4686   pgac_cv_prog_cc_cflags__mp1=no
4687 fi
4688 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4689 ac_c_werror_flag=$ac_save_c_werror_flag
4690 CFLAGS="$pgac_save_CFLAGS"
4691 fi
4692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__mp1" >&5
4693 $as_echo "$pgac_cv_prog_cc_cflags__mp1" >&6; }
4694 if test x"$pgac_cv_prog_cc_cflags__mp1" = x"yes"; then
4695   CFLAGS="$CFLAGS -mp1"
4696 fi
4697
4698   # Make sure strict aliasing is off (though this is said to be the default)
4699   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-strict-aliasing" >&5
4700 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4701 if ${pgac_cv_prog_cc_cflags__fno_strict_aliasing+:} false; then :
4702   $as_echo_n "(cached) " >&6
4703 else
4704   pgac_save_CFLAGS=$CFLAGS
4705 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4706 ac_save_c_werror_flag=$ac_c_werror_flag
4707 ac_c_werror_flag=yes
4708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4709 /* end confdefs.h.  */
4710
4711 int
4712 main ()
4713 {
4714
4715   ;
4716   return 0;
4717 }
4718 _ACEOF
4719 if ac_fn_c_try_compile "$LINENO"; then :
4720   pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4721 else
4722   pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4723 fi
4724 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4725 ac_c_werror_flag=$ac_save_c_werror_flag
4726 CFLAGS="$pgac_save_CFLAGS"
4727 fi
4728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4729 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4730 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4731   CFLAGS="$CFLAGS -fno-strict-aliasing"
4732 fi
4733
4734 elif test "$PORTNAME" = "aix"; then
4735   # AIX's xlc has to have strict aliasing turned off too
4736   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -qnoansialias" >&5
4737 $as_echo_n "checking whether $CC supports -qnoansialias... " >&6; }
4738 if ${pgac_cv_prog_cc_cflags__qnoansialias+:} false; then :
4739   $as_echo_n "(cached) " >&6
4740 else
4741   pgac_save_CFLAGS=$CFLAGS
4742 CFLAGS="$pgac_save_CFLAGS -qnoansialias"
4743 ac_save_c_werror_flag=$ac_c_werror_flag
4744 ac_c_werror_flag=yes
4745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4746 /* end confdefs.h.  */
4747
4748 int
4749 main ()
4750 {
4751
4752   ;
4753   return 0;
4754 }
4755 _ACEOF
4756 if ac_fn_c_try_compile "$LINENO"; then :
4757   pgac_cv_prog_cc_cflags__qnoansialias=yes
4758 else
4759   pgac_cv_prog_cc_cflags__qnoansialias=no
4760 fi
4761 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4762 ac_c_werror_flag=$ac_save_c_werror_flag
4763 CFLAGS="$pgac_save_CFLAGS"
4764 fi
4765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__qnoansialias" >&5
4766 $as_echo "$pgac_cv_prog_cc_cflags__qnoansialias" >&6; }
4767 if test x"$pgac_cv_prog_cc_cflags__qnoansialias" = x"yes"; then
4768   CFLAGS="$CFLAGS -qnoansialias"
4769 fi
4770
4771 elif test "$PORTNAME" = "hpux"; then
4772   # On some versions of HP-UX, libm functions do not set errno by default.
4773   # Fix that by using +Olibmerrno if the compiler recognizes it.
4774   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports +Olibmerrno" >&5
4775 $as_echo_n "checking whether $CC supports +Olibmerrno... " >&6; }
4776 if ${pgac_cv_prog_cc_cflags_pOlibmerrno+:} false; then :
4777   $as_echo_n "(cached) " >&6
4778 else
4779   pgac_save_CFLAGS=$CFLAGS
4780 CFLAGS="$pgac_save_CFLAGS +Olibmerrno"
4781 ac_save_c_werror_flag=$ac_c_werror_flag
4782 ac_c_werror_flag=yes
4783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4784 /* end confdefs.h.  */
4785
4786 int
4787 main ()
4788 {
4789
4790   ;
4791   return 0;
4792 }
4793 _ACEOF
4794 if ac_fn_c_try_compile "$LINENO"; then :
4795   pgac_cv_prog_cc_cflags_pOlibmerrno=yes
4796 else
4797   pgac_cv_prog_cc_cflags_pOlibmerrno=no
4798 fi
4799 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4800 ac_c_werror_flag=$ac_save_c_werror_flag
4801 CFLAGS="$pgac_save_CFLAGS"
4802 fi
4803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags_pOlibmerrno" >&5
4804 $as_echo "$pgac_cv_prog_cc_cflags_pOlibmerrno" >&6; }
4805 if test x"$pgac_cv_prog_cc_cflags_pOlibmerrno" = x"yes"; then
4806   CFLAGS="$CFLAGS +Olibmerrno"
4807 fi
4808
4809 fi
4810
4811 CFLAGS_VECTOR=$CFLAGS_VECTOR
4812
4813
4814 # supply -g if --enable-debug
4815 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
4816   CFLAGS="$CFLAGS -g"
4817 fi
4818
4819 # enable code coverage if --enable-coverage
4820 if test "$enable_coverage" = yes; then
4821   if test "$GCC" = yes; then
4822     CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
4823   else
4824     as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
4825   fi
4826 fi
4827
4828 # enable profiling if --enable-profiling
4829 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
4830   if test "$GCC" = yes; then
4831
4832 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
4833
4834     CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
4835   else
4836     as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
4837   fi
4838 fi
4839
4840 # We already have this in Makefile.win32, but configure needs it too
4841 if test "$PORTNAME" = "win32"; then
4842   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
4843 fi
4844
4845 # Check if the compiler still works with the template settings
4846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
4847 $as_echo_n "checking whether the C compiler still works... " >&6; }
4848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4849 /* end confdefs.h.  */
4850
4851 int
4852 main ()
4853 {
4854 return 0;
4855   ;
4856   return 0;
4857 }
4858 _ACEOF
4859 if ac_fn_c_try_link "$LINENO"; then :
4860   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4861 $as_echo "yes" >&6; }
4862 else
4863   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4864 $as_echo "no" >&6; }
4865    as_fn_error $? "cannot proceed" "$LINENO" 5
4866 fi
4867 rm -f core conftest.err conftest.$ac_objext \
4868     conftest$ac_exeext conftest.$ac_ext
4869
4870 # Defend against gcc -ffast-math
4871 if test "$GCC" = yes; then
4872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4873 /* end confdefs.h.  */
4874
4875 int
4876 main ()
4877 {
4878 #ifdef __FAST_MATH__
4879 choke me
4880 #endif
4881   ;
4882   return 0;
4883 }
4884 _ACEOF
4885 if ac_fn_c_try_compile "$LINENO"; then :
4886
4887 else
4888   as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
4889 fi
4890 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4891 fi
4892
4893 ac_ext=c
4894 ac_cpp='$CPP $CPPFLAGS'
4895 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4896 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4897 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4899 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4900 # On Suns, sometimes $CPP names a directory.
4901 if test -n "$CPP" && test -d "$CPP"; then
4902   CPP=
4903 fi
4904 if test -z "$CPP"; then
4905   if ${ac_cv_prog_CPP+:} false; then :
4906   $as_echo_n "(cached) " >&6
4907 else
4908       # Double quotes because CPP needs to be expanded
4909     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4910     do
4911       ac_preproc_ok=false
4912 for ac_c_preproc_warn_flag in '' yes
4913 do
4914   # Use a header file that comes with gcc, so configuring glibc
4915   # with a fresh cross-compiler works.
4916   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4917   # <limits.h> exists even on freestanding compilers.
4918   # On the NeXT, cc -E runs the code through the compiler's parser,
4919   # not just through cpp. "Syntax error" is here to catch this case.
4920   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4921 /* end confdefs.h.  */
4922 #ifdef __STDC__
4923 # include <limits.h>
4924 #else
4925 # include <assert.h>
4926 #endif
4927                      Syntax error
4928 _ACEOF
4929 if ac_fn_c_try_cpp "$LINENO"; then :
4930
4931 else
4932   # Broken: fails on valid input.
4933 continue
4934 fi
4935 rm -f conftest.err conftest.i conftest.$ac_ext
4936
4937   # OK, works on sane cases.  Now check whether nonexistent headers
4938   # can be detected and how.
4939   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4940 /* end confdefs.h.  */
4941 #include <ac_nonexistent.h>
4942 _ACEOF
4943 if ac_fn_c_try_cpp "$LINENO"; then :
4944   # Broken: success on invalid input.
4945 continue
4946 else
4947   # Passes both tests.
4948 ac_preproc_ok=:
4949 break
4950 fi
4951 rm -f conftest.err conftest.i conftest.$ac_ext
4952
4953 done
4954 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4955 rm -f conftest.i conftest.err conftest.$ac_ext
4956 if $ac_preproc_ok; then :
4957   break
4958 fi
4959
4960     done
4961     ac_cv_prog_CPP=$CPP
4962
4963 fi
4964   CPP=$ac_cv_prog_CPP
4965 else
4966   ac_cv_prog_CPP=$CPP
4967 fi
4968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4969 $as_echo "$CPP" >&6; }
4970 ac_preproc_ok=false
4971 for ac_c_preproc_warn_flag in '' yes
4972 do
4973   # Use a header file that comes with gcc, so configuring glibc
4974   # with a fresh cross-compiler works.
4975   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4976   # <limits.h> exists even on freestanding compilers.
4977   # On the NeXT, cc -E runs the code through the compiler's parser,
4978   # not just through cpp. "Syntax error" is here to catch this case.
4979   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4980 /* end confdefs.h.  */
4981 #ifdef __STDC__
4982 # include <limits.h>
4983 #else
4984 # include <assert.h>
4985 #endif
4986                      Syntax error
4987 _ACEOF
4988 if ac_fn_c_try_cpp "$LINENO"; then :
4989
4990 else
4991   # Broken: fails on valid input.
4992 continue
4993 fi
4994 rm -f conftest.err conftest.i conftest.$ac_ext
4995
4996   # OK, works on sane cases.  Now check whether nonexistent headers
4997   # can be detected and how.
4998   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4999 /* end confdefs.h.  */
5000 #include <ac_nonexistent.h>
5001 _ACEOF
5002 if ac_fn_c_try_cpp "$LINENO"; then :
5003   # Broken: success on invalid input.
5004 continue
5005 else
5006   # Passes both tests.
5007 ac_preproc_ok=:
5008 break
5009 fi
5010 rm -f conftest.err conftest.i conftest.$ac_ext
5011
5012 done
5013 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5014 rm -f conftest.i conftest.err conftest.$ac_ext
5015 if $ac_preproc_ok; then :
5016
5017 else
5018   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5019 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5020 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5021 See \`config.log' for more details" "$LINENO" 5; }
5022 fi
5023
5024 ac_ext=c
5025 ac_cpp='$CPP $CPPFLAGS'
5026 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5027 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5028 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5029
5030
5031
5032
5033 #
5034 # Set up TAS assembly code if needed; the template file has now had its
5035 # chance to request this.
5036 #
5037 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
5038
5039
5040 if test "$need_tas" = yes ; then
5041   TAS=tas.o
5042 else
5043   TAS=""
5044 fi
5045
5046
5047
5048 #
5049 # Automatic dependency tracking
5050 #
5051
5052
5053 # Check whether --enable-depend was given.
5054 if test "${enable_depend+set}" = set; then :
5055   enableval=$enable_depend;
5056   case $enableval in
5057     yes)
5058       autodepend=yes
5059       ;;
5060     no)
5061       :
5062       ;;
5063     *)
5064       as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
5065       ;;
5066   esac
5067
5068 else
5069   enable_depend=no
5070
5071 fi
5072
5073
5074
5075
5076
5077 #
5078 # Enable assert checks
5079 #
5080
5081
5082 # Check whether --enable-cassert was given.
5083 if test "${enable_cassert+set}" = set; then :
5084   enableval=$enable_cassert;
5085   case $enableval in
5086     yes)
5087
5088 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
5089
5090       ;;
5091     no)
5092       :
5093       ;;
5094     *)
5095       as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
5096       ;;
5097   esac
5098
5099 else
5100   enable_cassert=no
5101
5102 fi
5103
5104
5105
5106
5107 #
5108 # Include directories
5109 #
5110 ac_save_IFS=$IFS
5111 IFS="${IFS}${PATH_SEPARATOR}"
5112 # SRCH_INC comes from the template file
5113 for dir in $with_includes $SRCH_INC; do
5114   if test -d "$dir"; then
5115     INCLUDES="$INCLUDES -I$dir"
5116   else
5117     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
5118 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
5119   fi
5120 done
5121 IFS=$ac_save_IFS
5122
5123
5124
5125 #
5126 # Library directories
5127 #
5128 ac_save_IFS=$IFS
5129 IFS="${IFS}${PATH_SEPARATOR}"
5130 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
5131 for dir in $LIBRARY_DIRS $SRCH_LIB; do
5132   if test -d "$dir"; then
5133     LIBDIRS="$LIBDIRS -L$dir"
5134   else
5135     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
5136 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
5137   fi
5138 done
5139 IFS=$ac_save_IFS
5140
5141 #
5142 # Enable thread-safe client libraries
5143 #
5144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
5145 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
5146
5147
5148 # Check whether --enable-thread-safety was given.
5149 if test "${enable_thread_safety+set}" = set; then :
5150   enableval=$enable_thread_safety;
5151   case $enableval in
5152     yes)
5153       :
5154       ;;
5155     no)
5156       :
5157       ;;
5158     *)
5159       as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
5160       ;;
5161   esac
5162
5163 else
5164   enable_thread_safety=yes
5165
5166 fi
5167
5168
5169 if test "$enable_thread_safety" = yes; then
5170
5171 $as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
5172
5173 fi
5174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
5175 $as_echo "$enable_thread_safety" >&6; }
5176
5177
5178 #
5179 # Optionally build Tcl modules (PL/Tcl)
5180 #
5181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
5182 $as_echo_n "checking whether to build with Tcl... " >&6; }
5183
5184
5185
5186 # Check whether --with-tcl was given.
5187 if test "${with_tcl+set}" = set; then :
5188   withval=$with_tcl;
5189   case $withval in
5190     yes)
5191       :
5192       ;;
5193     no)
5194       :
5195       ;;
5196     *)
5197       as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
5198       ;;
5199   esac
5200
5201 else
5202   with_tcl=no
5203
5204 fi
5205
5206
5207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
5208 $as_echo "$with_tcl" >&6; }
5209
5210
5211 # We see if the path to the Tcl/Tk configuration scripts is specified.
5212 # This will override the use of tclsh to find the paths to search.
5213
5214
5215
5216
5217 # Check whether --with-tclconfig was given.
5218 if test "${with_tclconfig+set}" = set; then :
5219   withval=$with_tclconfig;
5220   case $withval in
5221     yes)
5222       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
5223       ;;
5224     no)
5225       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
5226       ;;
5227     *)
5228
5229       ;;
5230   esac
5231
5232 fi
5233
5234
5235
5236 #
5237 # Optionally build Perl modules (PL/Perl)
5238 #
5239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
5240 $as_echo_n "checking whether to build Perl modules... " >&6; }
5241
5242
5243
5244 # Check whether --with-perl was given.
5245 if test "${with_perl+set}" = set; then :
5246   withval=$with_perl;
5247   case $withval in
5248     yes)
5249       :
5250       ;;
5251     no)
5252       :
5253       ;;
5254     *)
5255       as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
5256       ;;
5257   esac
5258
5259 else
5260   with_perl=no
5261
5262 fi
5263
5264
5265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
5266 $as_echo "$with_perl" >&6; }
5267
5268
5269 #
5270 # Optionally build Python modules (PL/Python)
5271 #
5272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
5273 $as_echo_n "checking whether to build Python modules... " >&6; }
5274
5275
5276
5277 # Check whether --with-python was given.
5278 if test "${with_python+set}" = set; then :
5279   withval=$with_python;
5280   case $withval in
5281     yes)
5282       :
5283       ;;
5284     no)
5285       :
5286       ;;
5287     *)
5288       as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
5289       ;;
5290   esac
5291
5292 else
5293   with_python=no
5294
5295 fi
5296
5297
5298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
5299 $as_echo "$with_python" >&6; }
5300
5301
5302 #
5303 # GSSAPI
5304 #
5305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
5306 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
5307
5308
5309
5310 # Check whether --with-gssapi was given.
5311 if test "${with_gssapi+set}" = set; then :
5312   withval=$with_gssapi;
5313   case $withval in
5314     yes)
5315
5316
5317 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
5318
5319   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
5320
5321       ;;
5322     no)
5323       :
5324       ;;
5325     *)
5326       as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
5327       ;;
5328   esac
5329
5330 else
5331   with_gssapi=no
5332
5333 fi
5334
5335
5336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
5337 $as_echo "$with_gssapi" >&6; }
5338
5339 #
5340 # Kerberos 5
5341 #
5342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Kerberos 5 support" >&5
5343 $as_echo_n "checking whether to build with Kerberos 5 support... " >&6; }
5344
5345
5346
5347 # Check whether --with-krb5 was given.
5348 if test "${with_krb5+set}" = set; then :
5349   withval=$with_krb5;
5350   case $withval in
5351     yes)
5352
5353
5354 $as_echo "#define KRB5 1" >>confdefs.h
5355
5356   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
5357
5358       ;;
5359     no)
5360       :
5361       ;;
5362     *)
5363       as_fn_error $? "no argument expected for --with-krb5 option" "$LINENO" 5
5364       ;;
5365   esac
5366
5367 else
5368   with_krb5=no
5369
5370 fi
5371
5372
5373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_krb5" >&5
5374 $as_echo "$with_krb5" >&6; }
5375
5376
5377
5378
5379
5380 #
5381 # Kerberos configuration parameters
5382 #
5383
5384
5385
5386 # Check whether --with-krb-srvnam was given.
5387 if test "${with_krb_srvnam+set}" = set; then :
5388   withval=$with_krb_srvnam;
5389   case $withval in
5390     yes)
5391       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
5392       ;;
5393     no)
5394       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
5395       ;;
5396     *)
5397
5398       ;;
5399   esac
5400
5401 else
5402   with_krb_srvnam="postgres"
5403 fi
5404
5405
5406
5407 cat >>confdefs.h <<_ACEOF
5408 #define PG_KRB_SRVNAM "$with_krb_srvnam"
5409 _ACEOF
5410
5411
5412
5413 #
5414 # PAM
5415 #
5416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
5417 $as_echo_n "checking whether to build with PAM support... " >&6; }
5418
5419
5420
5421 # Check whether --with-pam was given.
5422 if test "${with_pam+set}" = set; then :
5423   withval=$with_pam;
5424   case $withval in
5425     yes)
5426
5427 $as_echo "#define USE_PAM 1" >>confdefs.h
5428
5429       ;;
5430     no)
5431       :
5432       ;;
5433     *)
5434       as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
5435       ;;
5436   esac
5437
5438 else
5439   with_pam=no
5440
5441 fi
5442
5443
5444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
5445 $as_echo "$with_pam" >&6; }
5446
5447
5448 #
5449 # LDAP
5450 #
5451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
5452 $as_echo_n "checking whether to build with LDAP support... " >&6; }
5453
5454
5455
5456 # Check whether --with-ldap was given.
5457 if test "${with_ldap+set}" = set; then :
5458   withval=$with_ldap;
5459   case $withval in
5460     yes)
5461
5462 $as_echo "#define USE_LDAP 1" >>confdefs.h
5463
5464       ;;
5465     no)
5466       :
5467       ;;
5468     *)
5469       as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
5470       ;;
5471   esac
5472
5473 else
5474   with_ldap=no
5475
5476 fi
5477
5478
5479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
5480 $as_echo "$with_ldap" >&6; }
5481
5482
5483 #
5484 # Bonjour
5485 #
5486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
5487 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
5488
5489
5490
5491 # Check whether --with-bonjour was given.
5492 if test "${with_bonjour+set}" = set; then :
5493   withval=$with_bonjour;
5494   case $withval in
5495     yes)
5496
5497 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
5498
5499       ;;
5500     no)
5501       :
5502       ;;
5503     *)
5504       as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
5505       ;;
5506   esac
5507
5508 else
5509   with_bonjour=no
5510
5511 fi
5512
5513
5514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
5515 $as_echo "$with_bonjour" >&6; }
5516
5517
5518 #
5519 # OpenSSL
5520 #
5521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with OpenSSL support" >&5
5522 $as_echo_n "checking whether to build with OpenSSL support... " >&6; }
5523
5524
5525
5526 # Check whether --with-openssl was given.
5527 if test "${with_openssl+set}" = set; then :
5528   withval=$with_openssl;
5529   case $withval in
5530     yes)
5531
5532 $as_echo "#define USE_SSL 1" >>confdefs.h
5533
5534       ;;
5535     no)
5536       :
5537       ;;
5538     *)
5539       as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
5540       ;;
5541   esac
5542
5543 else
5544   with_openssl=no
5545
5546 fi
5547
5548
5549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_openssl" >&5
5550 $as_echo "$with_openssl" >&6; }
5551
5552
5553 #
5554 # SELinux
5555 #
5556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
5557 $as_echo_n "checking whether to build with SELinux support... " >&6; }
5558
5559
5560
5561 # Check whether --with-selinux was given.
5562 if test "${with_selinux+set}" = set; then :
5563   withval=$with_selinux;
5564   case $withval in
5565     yes)
5566       :
5567       ;;
5568     no)
5569       :
5570       ;;
5571     *)
5572       as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
5573       ;;
5574   esac
5575
5576 else
5577   with_selinux=no
5578
5579 fi
5580
5581
5582
5583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
5584 $as_echo "$with_selinux" >&6; }
5585
5586 #
5587 # Readline
5588 #
5589
5590
5591
5592 # Check whether --with-readline was given.
5593 if test "${with_readline+set}" = set; then :
5594   withval=$with_readline;
5595   case $withval in
5596     yes)
5597       :
5598       ;;
5599     no)
5600       :
5601       ;;
5602     *)
5603       as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
5604       ;;
5605   esac
5606
5607 else
5608   with_readline=yes
5609
5610 fi
5611
5612
5613 # readline on MinGW has problems with backslashes in psql and other bugs.
5614 # This is particularly a problem with non-US code pages.
5615 # Therefore disable its use until we understand the cause. 2004-07-20
5616 if test "$PORTNAME" = "win32"; then
5617   if test "$with_readline" = yes; then
5618     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
5619 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
5620     with_readline=no
5621   fi
5622 fi
5623
5624
5625 #
5626 # Prefer libedit
5627 #
5628
5629
5630
5631 # Check whether --with-libedit-preferred was given.
5632 if test "${with_libedit_preferred+set}" = set; then :
5633   withval=$with_libedit_preferred;
5634   case $withval in
5635     yes)
5636       :
5637       ;;
5638     no)
5639       :
5640       ;;
5641     *)
5642       as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
5643       ;;
5644   esac
5645
5646 else
5647   with_libedit_preferred=no
5648
5649 fi
5650
5651
5652
5653
5654 #
5655 # OSSP UUID library
5656 #
5657
5658
5659
5660 # Check whether --with-ossp-uuid was given.
5661 if test "${with_ossp_uuid+set}" = set; then :
5662   withval=$with_ossp_uuid;
5663   case $withval in
5664     yes)
5665       :
5666       ;;
5667     no)
5668       :
5669       ;;
5670     *)
5671       as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
5672       ;;
5673   esac
5674
5675 else
5676   with_ossp_uuid=no
5677
5678 fi
5679
5680
5681
5682
5683
5684 #
5685 # XML
5686 #
5687
5688
5689
5690 # Check whether --with-libxml was given.
5691 if test "${with_libxml+set}" = set; then :
5692   withval=$with_libxml;
5693   case $withval in
5694     yes)
5695
5696 $as_echo "#define USE_LIBXML 1" >>confdefs.h
5697
5698       ;;
5699     no)
5700       :
5701       ;;
5702     *)
5703       as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
5704       ;;
5705   esac
5706
5707 else
5708   with_libxml=no
5709
5710 fi
5711
5712
5713
5714 if test "$with_libxml" = yes ; then
5715   for ac_prog in xml2-config
5716 do
5717   # Extract the first word of "$ac_prog", so it can be a program name with args.
5718 set dummy $ac_prog; ac_word=$2
5719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5720 $as_echo_n "checking for $ac_word... " >&6; }
5721 if ${ac_cv_prog_XML2_CONFIG+:} false; then :
5722   $as_echo_n "(cached) " >&6
5723 else
5724   if test -n "$XML2_CONFIG"; then
5725   ac_cv_prog_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test.
5726 else
5727 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5728 for as_dir in $PATH
5729 do
5730   IFS=$as_save_IFS
5731   test -z "$as_dir" && as_dir=.
5732     for ac_exec_ext in '' $ac_executable_extensions; do
5733   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5734     ac_cv_prog_XML2_CONFIG="$ac_prog"
5735     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5736     break 2
5737   fi
5738 done
5739   done
5740 IFS=$as_save_IFS
5741
5742 fi
5743 fi
5744 XML2_CONFIG=$ac_cv_prog_XML2_CONFIG
5745 if test -n "$XML2_CONFIG"; then
5746   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
5747 $as_echo "$XML2_CONFIG" >&6; }
5748 else
5749   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5750 $as_echo "no" >&6; }
5751 fi
5752
5753
5754   test -n "$XML2_CONFIG" && break
5755 done
5756
5757   if test -n "$XML2_CONFIG"; then
5758     for pgac_option in `$XML2_CONFIG --cflags`; do
5759       case $pgac_option in
5760         -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
5761       esac
5762     done
5763     for pgac_option in `$XML2_CONFIG --libs`; do
5764       case $pgac_option in
5765         -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5766       esac
5767     done
5768   fi
5769 fi
5770
5771
5772
5773 #
5774 # XSLT
5775 #
5776
5777
5778
5779 # Check whether --with-libxslt was given.
5780 if test "${with_libxslt+set}" = set; then :
5781   withval=$with_libxslt;
5782   case $withval in
5783     yes)
5784
5785 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
5786
5787       ;;
5788     no)
5789       :
5790       ;;
5791     *)
5792       as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
5793       ;;
5794   esac
5795
5796 else
5797   with_libxslt=no
5798
5799 fi
5800
5801
5802
5803
5804
5805
5806 #
5807 # tzdata
5808 #
5809
5810
5811
5812 # Check whether --with-system-tzdata was given.
5813 if test "${with_system_tzdata+set}" = set; then :
5814   withval=$with_system_tzdata;
5815   case $withval in
5816     yes)
5817       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
5818       ;;
5819     no)
5820       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
5821       ;;
5822     *)
5823
5824       ;;
5825   esac
5826
5827 fi
5828
5829
5830
5831
5832 #
5833 # Zlib
5834 #
5835
5836
5837
5838 # Check whether --with-zlib was given.
5839 if test "${with_zlib+set}" = set; then :
5840   withval=$with_zlib;
5841   case $withval in
5842     yes)
5843       :
5844       ;;
5845     no)
5846       :
5847       ;;
5848     *)
5849       as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
5850       ;;
5851   esac
5852
5853 else
5854   with_zlib=yes
5855
5856 fi
5857
5858
5859
5860
5861 #
5862 # Elf
5863 #
5864
5865 # Assume system is ELF if it predefines __ELF__ as 1,
5866 # otherwise believe host_os based default.
5867 case $host_os in
5868     freebsd1*|freebsd2*) elf=no;;
5869     freebsd3*|freebsd4*) elf=yes;;
5870 esac
5871
5872
5873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5874 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5875 if ${ac_cv_path_GREP+:} false; then :
5876   $as_echo_n "(cached) " >&6
5877 else
5878   if test -z "$GREP"; then
5879   ac_path_GREP_found=false
5880   # Loop through the user's path and test for each of PROGNAME-LIST
5881   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5882 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5883 do
5884   IFS=$as_save_IFS
5885   test -z "$as_dir" && as_dir=.
5886     for ac_prog in grep ggrep; do
5887     for ac_exec_ext in '' $ac_executable_extensions; do
5888       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5889       as_fn_executable_p "$ac_path_GREP" || continue
5890 # Check for GNU ac_path_GREP and select it if it is found.
5891   # Check for GNU $ac_path_GREP
5892 case `"$ac_path_GREP" --version 2>&1` in
5893 *GNU*)
5894   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5895 *)
5896   ac_count=0
5897   $as_echo_n 0123456789 >"conftest.in"
5898   while :
5899   do
5900     cat "conftest.in" "conftest.in" >"conftest.tmp"
5901     mv "conftest.tmp" "conftest.in"
5902     cp "conftest.in" "conftest.nl"
5903     $as_echo 'GREP' >> "conftest.nl"
5904     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5905     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5906     as_fn_arith $ac_count + 1 && ac_count=$as_val
5907     if test $ac_count -gt ${ac_path_GREP_max-0}; then
5908       # Best one so far, save it but keep looking for a better one
5909       ac_cv_path_GREP="$ac_path_GREP"
5910       ac_path_GREP_max=$ac_count
5911     fi
5912     # 10*(2^10) chars as input seems more than enough
5913     test $ac_count -gt 10 && break
5914   done
5915   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5916 esac
5917
5918       $ac_path_GREP_found && break 3
5919     done
5920   done
5921   done
5922 IFS=$as_save_IFS
5923   if test -z "$ac_cv_path_GREP"; then
5924     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5925   fi
5926 else
5927   ac_cv_path_GREP=$GREP
5928 fi
5929
5930 fi
5931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5932 $as_echo "$ac_cv_path_GREP" >&6; }
5933  GREP="$ac_cv_path_GREP"
5934
5935
5936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5937 $as_echo_n "checking for egrep... " >&6; }
5938 if ${ac_cv_path_EGREP+:} false; then :
5939   $as_echo_n "(cached) " >&6
5940 else
5941   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5942    then ac_cv_path_EGREP="$GREP -E"
5943    else
5944      if test -z "$EGREP"; then
5945   ac_path_EGREP_found=false
5946   # Loop through the user's path and test for each of PROGNAME-LIST
5947   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5948 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5949 do
5950   IFS=$as_save_IFS
5951   test -z "$as_dir" && as_dir=.
5952     for ac_prog in egrep; do
5953     for ac_exec_ext in '' $ac_executable_extensions; do
5954       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5955       as_fn_executable_p "$ac_path_EGREP" || continue
5956 # Check for GNU ac_path_EGREP and select it if it is found.
5957   # Check for GNU $ac_path_EGREP
5958 case `"$ac_path_EGREP" --version 2>&1` in
5959 *GNU*)
5960   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5961 *)
5962   ac_count=0
5963   $as_echo_n 0123456789 >"conftest.in"
5964   while :
5965   do
5966     cat "conftest.in" "conftest.in" >"conftest.tmp"
5967     mv "conftest.tmp" "conftest.in"
5968     cp "conftest.in" "conftest.nl"
5969     $as_echo 'EGREP' >> "conftest.nl"
5970     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5971     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5972     as_fn_arith $ac_count + 1 && ac_count=$as_val
5973     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5974       # Best one so far, save it but keep looking for a better one
5975       ac_cv_path_EGREP="$ac_path_EGREP"
5976       ac_path_EGREP_max=$ac_count
5977     fi
5978     # 10*(2^10) chars as input seems more than enough
5979     test $ac_count -gt 10 && break
5980   done
5981   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5982 esac
5983
5984       $ac_path_EGREP_found && break 3
5985     done
5986   done
5987   done
5988 IFS=$as_save_IFS
5989   if test -z "$ac_cv_path_EGREP"; then
5990     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5991   fi
5992 else
5993   ac_cv_path_EGREP=$EGREP
5994 fi
5995
5996    fi
5997 fi
5998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5999 $as_echo "$ac_cv_path_EGREP" >&6; }
6000  EGREP="$ac_cv_path_EGREP"
6001
6002
6003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6004 /* end confdefs.h.  */
6005 #if __ELF__
6006   yes
6007 #endif
6008
6009 _ACEOF
6010 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6011   $EGREP "yes" >/dev/null 2>&1; then :
6012   ELF_SYS=true
6013 else
6014   if test "X$elf" = "Xyes" ; then
6015   ELF_SYS=true
6016 else
6017   ELF_SYS=
6018 fi
6019 fi
6020 rm -f conftest*
6021
6022
6023
6024 #
6025 # Assignments
6026 #
6027
6028 CPPFLAGS="$CPPFLAGS $INCLUDES"
6029 LDFLAGS="$LDFLAGS $LIBDIRS"
6030
6031
6032
6033
6034
6035 # Check whether --with-gnu-ld was given.
6036 if test "${with_gnu_ld+set}" = set; then :
6037   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
6038 else
6039   with_gnu_ld=no
6040 fi
6041
6042 ac_prog=ld
6043 if test "$GCC" = yes; then
6044   # Check if gcc -print-prog-name=ld gives a path.
6045   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
6046 $as_echo_n "checking for ld used by GCC... " >&6; }
6047   case $host in
6048   *-*-mingw*)
6049     # gcc leaves a trailing carriage return which upsets mingw
6050     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6051   *)
6052     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6053   esac
6054   case "$ac_prog" in
6055     # Accept absolute paths.
6056     [\\/]* | [A-Za-z]:[\\/]*)
6057       re_direlt='/[^/][^/]*/\.\./'
6058       # Canonicalize the path of ld
6059       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
6060       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
6061         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
6062       done
6063       test -z "$LD" && LD="$ac_prog"
6064       ;;
6065   "")
6066     # If it fails, then pretend we aren't using GCC.
6067     ac_prog=ld
6068     ;;
6069   *)
6070     # If it is relative, then search for the first ld in PATH.
6071     with_gnu_ld=unknown
6072     ;;
6073   esac
6074 elif test "$with_gnu_ld" = yes; then
6075   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
6076 $as_echo_n "checking for GNU ld... " >&6; }
6077 else
6078   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
6079 $as_echo_n "checking for non-GNU ld... " >&6; }
6080 fi
6081 if ${ac_cv_path_LD+:} false; then :
6082   $as_echo_n "(cached) " >&6
6083 else
6084   if test -z "$LD"; then
6085   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
6086   for ac_dir in $PATH; do
6087     test -z "$ac_dir" && ac_dir=.
6088     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6089       ac_cv_path_LD="$ac_dir/$ac_prog"
6090       # Check to see if the program is GNU ld.  I'd rather use --version,
6091       # but apparently some GNU ld's only accept -v.
6092       # Break only if it was the GNU/non-GNU ld that we prefer.
6093       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
6094         test "$with_gnu_ld" != no && break
6095       else
6096         test "$with_gnu_ld" != yes && break
6097       fi
6098     fi
6099   done
6100   IFS="$ac_save_ifs"
6101 else
6102   ac_cv_path_LD="$LD" # Let the user override the test with a path.
6103 fi
6104 fi
6105
6106 LD="$ac_cv_path_LD"
6107 if test -n "$LD"; then
6108   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
6109 $as_echo "$LD" >&6; }
6110 else
6111   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6112 $as_echo "no" >&6; }
6113 fi
6114 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
6115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
6116 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
6117 if ${ac_cv_prog_gnu_ld+:} false; then :
6118   $as_echo_n "(cached) " >&6
6119 else
6120   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
6121 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
6122   ac_cv_prog_gnu_ld=yes
6123 else
6124   ac_cv_prog_gnu_ld=no
6125 fi
6126 fi
6127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
6128 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
6129 with_gnu_ld=$ac_cv_prog_gnu_ld
6130
6131
6132
6133
6134 case $host_os in sysv5*)
6135   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ld -R works" >&5
6136 $as_echo_n "checking whether ld -R works... " >&6; }
6137 if ${pgac_cv_prog_ld_R+:} false; then :
6138   $as_echo_n "(cached) " >&6
6139 else
6140
6141     pgac_save_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -Wl,-R/usr/lib"
6142     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6143 /* end confdefs.h.  */
6144
6145 int
6146 main ()
6147 {
6148
6149   ;
6150   return 0;
6151 }
6152 _ACEOF
6153 if ac_fn_c_try_link "$LINENO"; then :
6154   pgac_cv_prog_ld_R=yes
6155 else
6156   pgac_cv_prog_ld_R=no
6157 fi
6158 rm -f core conftest.err conftest.$ac_objext \
6159     conftest$ac_exeext conftest.$ac_ext
6160     LDFLAGS=$pgac_save_LDFLAGS
6161
6162 fi
6163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_ld_R" >&5
6164 $as_echo "$pgac_cv_prog_ld_R" >&6; }
6165   ld_R_works=$pgac_cv_prog_ld_R
6166
6167 esac
6168 if test -n "$ac_tool_prefix"; then
6169   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6170 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6172 $as_echo_n "checking for $ac_word... " >&6; }
6173 if ${ac_cv_prog_RANLIB+:} false; then :
6174   $as_echo_n "(cached) " >&6
6175 else
6176   if test -n "$RANLIB"; then
6177   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6178 else
6179 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6180 for as_dir in $PATH
6181 do
6182   IFS=$as_save_IFS
6183   test -z "$as_dir" && as_dir=.
6184     for ac_exec_ext in '' $ac_executable_extensions; do
6185   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6186     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6187     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6188     break 2
6189   fi
6190 done
6191   done
6192 IFS=$as_save_IFS
6193
6194 fi
6195 fi
6196 RANLIB=$ac_cv_prog_RANLIB
6197 if test -n "$RANLIB"; then
6198   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6199 $as_echo "$RANLIB" >&6; }
6200 else
6201   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6202 $as_echo "no" >&6; }
6203 fi
6204
6205
6206 fi
6207 if test -z "$ac_cv_prog_RANLIB"; then
6208   ac_ct_RANLIB=$RANLIB
6209   # Extract the first word of "ranlib", so it can be a program name with args.
6210 set dummy ranlib; ac_word=$2
6211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6212 $as_echo_n "checking for $ac_word... " >&6; }
6213 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6214   $as_echo_n "(cached) " >&6
6215 else
6216   if test -n "$ac_ct_RANLIB"; then
6217   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6218 else
6219 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6220 for as_dir in $PATH
6221 do
6222   IFS=$as_save_IFS
6223   test -z "$as_dir" && as_dir=.
6224     for ac_exec_ext in '' $ac_executable_extensions; do
6225   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6226     ac_cv_prog_ac_ct_RANLIB="ranlib"
6227     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6228     break 2
6229   fi
6230 done
6231   done
6232 IFS=$as_save_IFS
6233
6234 fi
6235 fi
6236 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6237 if test -n "$ac_ct_RANLIB"; then
6238   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6239 $as_echo "$ac_ct_RANLIB" >&6; }
6240 else
6241   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6242 $as_echo "no" >&6; }
6243 fi
6244
6245   if test "x$ac_ct_RANLIB" = x; then
6246     RANLIB=":"
6247   else
6248     case $cross_compiling:$ac_tool_warned in
6249 yes:)
6250 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6251 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6252 ac_tool_warned=yes ;;
6253 esac
6254     RANLIB=$ac_ct_RANLIB
6255   fi
6256 else
6257   RANLIB="$ac_cv_prog_RANLIB"
6258 fi
6259
6260
6261   if test -n "$ac_tool_prefix"; then
6262   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6263 set dummy ${ac_tool_prefix}strip; ac_word=$2
6264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6265 $as_echo_n "checking for $ac_word... " >&6; }
6266 if ${ac_cv_prog_STRIP+:} false; then :
6267   $as_echo_n "(cached) " >&6
6268 else
6269   if test -n "$STRIP"; then
6270   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6271 else
6272 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6273 for as_dir in $PATH
6274 do
6275   IFS=$as_save_IFS
6276   test -z "$as_dir" && as_dir=.
6277     for ac_exec_ext in '' $ac_executable_extensions; do
6278   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6279     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6280     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6281     break 2
6282   fi
6283 done
6284   done
6285 IFS=$as_save_IFS
6286
6287 fi
6288 fi
6289 STRIP=$ac_cv_prog_STRIP
6290 if test -n "$STRIP"; then
6291   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6292 $as_echo "$STRIP" >&6; }
6293 else
6294   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6295 $as_echo "no" >&6; }
6296 fi
6297
6298
6299 fi
6300 if test -z "$ac_cv_prog_STRIP"; then
6301   ac_ct_STRIP=$STRIP
6302   # Extract the first word of "strip", so it can be a program name with args.
6303 set dummy strip; ac_word=$2
6304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6305 $as_echo_n "checking for $ac_word... " >&6; }
6306 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
6307   $as_echo_n "(cached) " >&6
6308 else
6309   if test -n "$ac_ct_STRIP"; then
6310   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6311 else
6312 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6313 for as_dir in $PATH
6314 do
6315   IFS=$as_save_IFS
6316   test -z "$as_dir" && as_dir=.
6317     for ac_exec_ext in '' $ac_executable_extensions; do
6318   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6319     ac_cv_prog_ac_ct_STRIP="strip"
6320     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6321     break 2
6322   fi
6323 done
6324   done
6325 IFS=$as_save_IFS
6326
6327 fi
6328 fi
6329 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6330 if test -n "$ac_ct_STRIP"; then
6331   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6332 $as_echo "$ac_ct_STRIP" >&6; }
6333 else
6334   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6335 $as_echo "no" >&6; }
6336 fi
6337
6338   if test "x$ac_ct_STRIP" = x; then
6339     STRIP=":"
6340   else
6341     case $cross_compiling:$ac_tool_warned in
6342 yes:)
6343 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6344 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6345 ac_tool_warned=yes ;;
6346 esac
6347     STRIP=$ac_ct_STRIP
6348   fi
6349 else
6350   STRIP="$ac_cv_prog_STRIP"
6351 fi
6352
6353
6354   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
6355 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
6356   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
6357     STRIP_STATIC_LIB="$STRIP -x"
6358     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
6359     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6360 $as_echo "yes" >&6; }
6361   else
6362     case $host_os in
6363       darwin*)
6364         STRIP="$STRIP -x"
6365         STRIP_STATIC_LIB=$STRIP
6366         STRIP_SHARED_LIB=$STRIP
6367         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6368 $as_echo "yes" >&6; }
6369         ;;
6370       *)
6371         STRIP_STATIC_LIB=:
6372         STRIP_SHARED_LIB=:
6373         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6374 $as_echo "no" >&6; }
6375         ;;
6376     esac
6377   fi
6378
6379
6380
6381 if test -n "$ac_tool_prefix"; then
6382   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6383 set dummy ${ac_tool_prefix}ar; ac_word=$2
6384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6385 $as_echo_n "checking for $ac_word... " >&6; }
6386 if ${ac_cv_prog_AR+:} false; then :
6387   $as_echo_n "(cached) " >&6
6388 else
6389   if test -n "$AR"; then
6390   ac_cv_prog_AR="$AR" # Let the user override the test.
6391 else
6392 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6393 for as_dir in $PATH
6394 do
6395   IFS=$as_save_IFS
6396   test -z "$as_dir" && as_dir=.
6397     for ac_exec_ext in '' $ac_executable_extensions; do
6398   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6399     ac_cv_prog_AR="${ac_tool_prefix}ar"
6400     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6401     break 2
6402   fi
6403 done
6404   done
6405 IFS=$as_save_IFS
6406
6407 fi
6408 fi
6409 AR=$ac_cv_prog_AR
6410 if test -n "$AR"; then
6411   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6412 $as_echo "$AR" >&6; }
6413 else
6414   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6415 $as_echo "no" >&6; }
6416 fi
6417
6418
6419 fi
6420 if test -z "$ac_cv_prog_AR"; then
6421   ac_ct_AR=$AR
6422   # Extract the first word of "ar", so it can be a program name with args.
6423 set dummy ar; ac_word=$2
6424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6425 $as_echo_n "checking for $ac_word... " >&6; }
6426 if ${ac_cv_prog_ac_ct_AR+:} false; then :
6427   $as_echo_n "(cached) " >&6
6428 else
6429   if test -n "$ac_ct_AR"; then
6430   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6431 else
6432 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6433 for as_dir in $PATH
6434 do
6435   IFS=$as_save_IFS
6436   test -z "$as_dir" && as_dir=.
6437     for ac_exec_ext in '' $ac_executable_extensions; do
6438   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6439     ac_cv_prog_ac_ct_AR="ar"
6440     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6441     break 2
6442   fi
6443 done
6444   done
6445 IFS=$as_save_IFS
6446
6447 fi
6448 fi
6449 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6450 if test -n "$ac_ct_AR"; then
6451   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6452 $as_echo "$ac_ct_AR" >&6; }
6453 else
6454   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6455 $as_echo "no" >&6; }
6456 fi
6457
6458   if test "x$ac_ct_AR" = x; then
6459     AR="ar"
6460   else
6461     case $cross_compiling:$ac_tool_warned in
6462 yes:)
6463 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6464 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6465 ac_tool_warned=yes ;;
6466 esac
6467     AR=$ac_ct_AR
6468   fi
6469 else
6470   AR="$ac_cv_prog_AR"
6471 fi
6472
6473 if test "$PORTNAME" = "win32"; then
6474   if test -n "$ac_tool_prefix"; then
6475   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6476 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
6477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6478 $as_echo_n "checking for $ac_word... " >&6; }
6479 if ${ac_cv_prog_DLLTOOL+:} false; then :
6480   $as_echo_n "(cached) " >&6
6481 else
6482   if test -n "$DLLTOOL"; then
6483   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6484 else
6485 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6486 for as_dir in $PATH
6487 do
6488   IFS=$as_save_IFS
6489   test -z "$as_dir" && as_dir=.
6490     for ac_exec_ext in '' $ac_executable_extensions; do
6491   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6492     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
6493     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6494     break 2
6495   fi
6496 done
6497   done
6498 IFS=$as_save_IFS
6499
6500 fi
6501 fi
6502 DLLTOOL=$ac_cv_prog_DLLTOOL
6503 if test -n "$DLLTOOL"; then
6504   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
6505 $as_echo "$DLLTOOL" >&6; }
6506 else
6507   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6508 $as_echo "no" >&6; }
6509 fi
6510
6511
6512 fi
6513 if test -z "$ac_cv_prog_DLLTOOL"; then
6514   ac_ct_DLLTOOL=$DLLTOOL
6515   # Extract the first word of "dlltool", so it can be a program name with args.
6516 set dummy dlltool; ac_word=$2
6517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6518 $as_echo_n "checking for $ac_word... " >&6; }
6519 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
6520   $as_echo_n "(cached) " >&6
6521 else
6522   if test -n "$ac_ct_DLLTOOL"; then
6523   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6524 else
6525 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6526 for as_dir in $PATH
6527 do
6528   IFS=$as_save_IFS
6529   test -z "$as_dir" && as_dir=.
6530     for ac_exec_ext in '' $ac_executable_extensions; do
6531   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6532     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
6533     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6534     break 2
6535   fi
6536 done
6537   done
6538 IFS=$as_save_IFS
6539
6540 fi
6541 fi
6542 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6543 if test -n "$ac_ct_DLLTOOL"; then
6544   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
6545 $as_echo "$ac_ct_DLLTOOL" >&6; }
6546 else
6547   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6548 $as_echo "no" >&6; }
6549 fi
6550
6551   if test "x$ac_ct_DLLTOOL" = x; then
6552     DLLTOOL="dlltool"
6553   else
6554     case $cross_compiling:$ac_tool_warned in
6555 yes:)
6556 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6557 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6558 ac_tool_warned=yes ;;
6559 esac
6560     DLLTOOL=$ac_ct_DLLTOOL
6561   fi
6562 else
6563   DLLTOOL="$ac_cv_prog_DLLTOOL"
6564 fi
6565
6566   if test -n "$ac_tool_prefix"; then
6567   # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
6568 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
6569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6570 $as_echo_n "checking for $ac_word... " >&6; }
6571 if ${ac_cv_prog_DLLWRAP+:} false; then :
6572   $as_echo_n "(cached) " >&6
6573 else
6574   if test -n "$DLLWRAP"; then
6575   ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
6576 else
6577 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6578 for as_dir in $PATH
6579 do
6580   IFS=$as_save_IFS
6581   test -z "$as_dir" && as_dir=.
6582     for ac_exec_ext in '' $ac_executable_extensions; do
6583   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6584     ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
6585     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6586     break 2
6587   fi
6588 done
6589   done
6590 IFS=$as_save_IFS
6591
6592 fi
6593 fi
6594 DLLWRAP=$ac_cv_prog_DLLWRAP
6595 if test -n "$DLLWRAP"; then
6596   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5
6597 $as_echo "$DLLWRAP" >&6; }
6598 else
6599   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6600 $as_echo "no" >&6; }
6601 fi
6602
6603
6604 fi
6605 if test -z "$ac_cv_prog_DLLWRAP"; then
6606   ac_ct_DLLWRAP=$DLLWRAP
6607   # Extract the first word of "dllwrap", so it can be a program name with args.
6608 set dummy dllwrap; ac_word=$2
6609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6610 $as_echo_n "checking for $ac_word... " >&6; }
6611 if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then :
6612   $as_echo_n "(cached) " >&6
6613 else
6614   if test -n "$ac_ct_DLLWRAP"; then
6615   ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
6616 else
6617 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6618 for as_dir in $PATH
6619 do
6620   IFS=$as_save_IFS
6621   test -z "$as_dir" && as_dir=.
6622     for ac_exec_ext in '' $ac_executable_extensions; do
6623   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6624     ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
6625     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6626     break 2
6627   fi
6628 done
6629   done
6630 IFS=$as_save_IFS
6631
6632 fi
6633 fi
6634 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
6635 if test -n "$ac_ct_DLLWRAP"; then
6636   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5
6637 $as_echo "$ac_ct_DLLWRAP" >&6; }
6638 else
6639   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6640 $as_echo "no" >&6; }
6641 fi
6642
6643   if test "x$ac_ct_DLLWRAP" = x; then
6644     DLLWRAP="dllwrap"
6645   else
6646     case $cross_compiling:$ac_tool_warned in
6647 yes:)
6648 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6649 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6650 ac_tool_warned=yes ;;
6651 esac
6652     DLLWRAP=$ac_ct_DLLWRAP
6653   fi
6654 else
6655   DLLWRAP="$ac_cv_prog_DLLWRAP"
6656 fi
6657
6658   if test -n "$ac_tool_prefix"; then
6659   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6660 set dummy ${ac_tool_prefix}windres; ac_word=$2
6661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6662 $as_echo_n "checking for $ac_word... " >&6; }
6663 if ${ac_cv_prog_WINDRES+:} false; then :
6664   $as_echo_n "(cached) " >&6
6665 else
6666   if test -n "$WINDRES"; then
6667   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
6668 else
6669 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6670 for as_dir in $PATH
6671 do
6672   IFS=$as_save_IFS
6673   test -z "$as_dir" && as_dir=.
6674     for ac_exec_ext in '' $ac_executable_extensions; do
6675   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6676     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
6677     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6678     break 2
6679   fi
6680 done
6681   done
6682 IFS=$as_save_IFS
6683
6684 fi
6685 fi
6686 WINDRES=$ac_cv_prog_WINDRES
6687 if test -n "$WINDRES"; then
6688   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
6689 $as_echo "$WINDRES" >&6; }
6690 else
6691   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6692 $as_echo "no" >&6; }
6693 fi
6694
6695
6696 fi
6697 if test -z "$ac_cv_prog_WINDRES"; then
6698   ac_ct_WINDRES=$WINDRES
6699   # Extract the first word of "windres", so it can be a program name with args.
6700 set dummy windres; ac_word=$2
6701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6702 $as_echo_n "checking for $ac_word... " >&6; }
6703 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
6704   $as_echo_n "(cached) " >&6
6705 else
6706   if test -n "$ac_ct_WINDRES"; then
6707   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
6708 else
6709 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6710 for as_dir in $PATH
6711 do
6712   IFS=$as_save_IFS
6713   test -z "$as_dir" && as_dir=.
6714     for ac_exec_ext in '' $ac_executable_extensions; do
6715   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6716     ac_cv_prog_ac_ct_WINDRES="windres"
6717     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6718     break 2
6719   fi
6720 done
6721   done
6722 IFS=$as_save_IFS
6723
6724 fi
6725 fi
6726 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6727 if test -n "$ac_ct_WINDRES"; then
6728   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
6729 $as_echo "$ac_ct_WINDRES" >&6; }
6730 else
6731   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6732 $as_echo "no" >&6; }
6733 fi
6734
6735   if test "x$ac_ct_WINDRES" = x; then
6736     WINDRES="windres"
6737   else
6738     case $cross_compiling:$ac_tool_warned in
6739 yes:)
6740 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6741 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6742 ac_tool_warned=yes ;;
6743 esac
6744     WINDRES=$ac_ct_WINDRES
6745   fi
6746 else
6747   WINDRES="$ac_cv_prog_WINDRES"
6748 fi
6749
6750 fi
6751
6752 # Find a good install program.  We prefer a C program (faster),
6753 # so one script is as good as another.  But avoid the broken or
6754 # incompatible versions:
6755 # SysV /etc/install, /usr/sbin/install
6756 # SunOS /usr/etc/install
6757 # IRIX /sbin/install
6758 # AIX /bin/install
6759 # AmigaOS /C/install, which installs bootblocks on floppy discs
6760 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6761 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
6762 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6763 # OS/2's system install, which has a completely different semantic
6764 # ./install, which can be erroneously created by make from ./install.sh.
6765 # Reject install programs that cannot install multiple files.
6766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6767 $as_echo_n "checking for a BSD-compatible install... " >&6; }
6768 if test -z "$INSTALL"; then
6769 if ${ac_cv_path_install+:} false; then :
6770   $as_echo_n "(cached) " >&6
6771 else
6772   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6773 for as_dir in $PATH
6774 do
6775   IFS=$as_save_IFS
6776   test -z "$as_dir" && as_dir=.
6777     # Account for people who put trailing slashes in PATH elements.
6778 case $as_dir/ in #((
6779   ./ | .// | /[cC]/* | \
6780   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
6781   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
6782   /usr/ucb/* ) ;;
6783   *)
6784     # OSF1 and SCO ODT 3.0 have their own names for install.
6785     # Don't use installbsd from OSF since it installs stuff as root
6786     # by default.
6787     for ac_prog in ginstall scoinst install; do
6788       for ac_exec_ext in '' $ac_executable_extensions; do
6789         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
6790           if test $ac_prog = install &&
6791             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6792             # AIX install.  It has an incompatible calling convention.
6793             :
6794           elif test $ac_prog = install &&
6795             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6796             # program-specific install script used by HP pwplus--don't use.
6797             :
6798           else
6799             rm -rf conftest.one conftest.two conftest.dir
6800             echo one > conftest.one
6801             echo two > conftest.two
6802             mkdir conftest.dir
6803             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6804               test -s conftest.one && test -s conftest.two &&
6805               test -s conftest.dir/conftest.one &&
6806               test -s conftest.dir/conftest.two
6807             then
6808               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6809               break 3
6810             fi
6811           fi
6812         fi
6813       done
6814     done
6815     ;;
6816 esac
6817
6818   done
6819 IFS=$as_save_IFS
6820
6821 rm -rf conftest.one conftest.two conftest.dir
6822
6823 fi
6824   if test "${ac_cv_path_install+set}" = set; then
6825     INSTALL=$ac_cv_path_install
6826   else
6827     # As a last resort, use the slow shell script.  Don't cache a
6828     # value for INSTALL within a source directory, because that will
6829     # break other packages using the cache if that directory is
6830     # removed, or if the value is a relative name.
6831     INSTALL=$ac_install_sh
6832   fi
6833 fi
6834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6835 $as_echo "$INSTALL" >&6; }
6836
6837 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6838 # It thinks the first close brace ends the variable substitution.
6839 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6840
6841 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6842
6843 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6844
6845 # When Autoconf chooses install-sh as install program it tries to generate
6846 # a relative path to it in each makefile where it subsitutes it. This clashes
6847 # with our Makefile.global concept. This workaround helps.
6848 case $INSTALL in
6849   *install-sh*) install_bin='';;
6850   *) install_bin=$INSTALL;;
6851 esac
6852
6853
6854 # Extract the first word of "tar", so it can be a program name with args.
6855 set dummy tar; ac_word=$2
6856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6857 $as_echo_n "checking for $ac_word... " >&6; }
6858 if ${ac_cv_path_TAR+:} false; then :
6859   $as_echo_n "(cached) " >&6
6860 else
6861   case $TAR in
6862   [\\/]* | ?:[\\/]*)
6863   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
6864   ;;
6865   *)
6866   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6867 for as_dir in $PATH
6868 do
6869   IFS=$as_save_IFS
6870   test -z "$as_dir" && as_dir=.
6871     for ac_exec_ext in '' $ac_executable_extensions; do
6872   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6873     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
6874     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6875     break 2
6876   fi
6877 done
6878   done
6879 IFS=$as_save_IFS
6880
6881   ;;
6882 esac
6883 fi
6884 TAR=$ac_cv_path_TAR
6885 if test -n "$TAR"; then
6886   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
6887 $as_echo "$TAR" >&6; }
6888 else
6889   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6890 $as_echo "no" >&6; }
6891 fi
6892
6893
6894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
6895 $as_echo_n "checking whether ln -s works... " >&6; }
6896 LN_S=$as_ln_s
6897 if test "$LN_S" = "ln -s"; then
6898   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6899 $as_echo "yes" >&6; }
6900 else
6901   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
6902 $as_echo "no, using $LN_S" >&6; }
6903 fi
6904
6905 for ac_prog in gawk mawk nawk awk
6906 do
6907   # Extract the first word of "$ac_prog", so it can be a program name with args.
6908 set dummy $ac_prog; ac_word=$2
6909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6910 $as_echo_n "checking for $ac_word... " >&6; }
6911 if ${ac_cv_prog_AWK+:} false; then :
6912   $as_echo_n "(cached) " >&6
6913 else
6914   if test -n "$AWK"; then
6915   ac_cv_prog_AWK="$AWK" # Let the user override the test.
6916 else
6917 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6918 for as_dir in $PATH
6919 do
6920   IFS=$as_save_IFS
6921   test -z "$as_dir" && as_dir=.
6922     for ac_exec_ext in '' $ac_executable_extensions; do
6923   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6924     ac_cv_prog_AWK="$ac_prog"
6925     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6926     break 2
6927   fi
6928 done
6929   done
6930 IFS=$as_save_IFS
6931
6932 fi
6933 fi
6934 AWK=$ac_cv_prog_AWK
6935 if test -n "$AWK"; then
6936   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6937 $as_echo "$AWK" >&6; }
6938 else
6939   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6940 $as_echo "no" >&6; }
6941 fi
6942
6943
6944   test -n "$AWK" && break
6945 done
6946
6947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6948 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6949 if test -z "$MKDIR_P"; then
6950   if ${ac_cv_path_mkdir+:} false; then :
6951   $as_echo_n "(cached) " >&6
6952 else
6953   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6954 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6955 do
6956   IFS=$as_save_IFS
6957   test -z "$as_dir" && as_dir=.
6958     for ac_prog in mkdir gmkdir; do
6959          for ac_exec_ext in '' $ac_executable_extensions; do
6960            as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
6961            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6962              'mkdir (GNU coreutils) '* | \
6963              'mkdir (coreutils) '* | \
6964              'mkdir (fileutils) '4.1*)
6965                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6966                break 3;;
6967            esac
6968          done
6969        done
6970   done
6971 IFS=$as_save_IFS
6972
6973 fi
6974
6975   test -d ./--version && rmdir ./--version
6976   if test "${ac_cv_path_mkdir+set}" = set; then
6977     MKDIR_P="$ac_cv_path_mkdir -p"
6978   else
6979     # As a last resort, use the slow shell script.  Don't cache a
6980     # value for MKDIR_P within a source directory, because that will
6981     # break other packages using the cache if that directory is
6982     # removed, or if the value is a relative name.
6983     MKDIR_P="$ac_install_sh -d"
6984   fi
6985 fi
6986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6987 $as_echo "$MKDIR_P" >&6; }
6988
6989 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
6990 # a relative path to it in each makefile where it subsitutes it. This clashes
6991 # with our Makefile.global concept. This workaround helps.
6992 case $MKDIR_P in
6993   *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
6994 esac
6995
6996 # Let the user override the search
6997 if test -z "$BISON"; then
6998   for ac_prog in bison
6999 do
7000   # Extract the first word of "$ac_prog", so it can be a program name with args.
7001 set dummy $ac_prog; ac_word=$2
7002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7003 $as_echo_n "checking for $ac_word... " >&6; }
7004 if ${ac_cv_path_BISON+:} false; then :
7005   $as_echo_n "(cached) " >&6
7006 else
7007   case $BISON in
7008   [\\/]* | ?:[\\/]*)
7009   ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
7010   ;;
7011   *)
7012   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7013 for as_dir in $PATH
7014 do
7015   IFS=$as_save_IFS
7016   test -z "$as_dir" && as_dir=.
7017     for ac_exec_ext in '' $ac_executable_extensions; do
7018   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7019     ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
7020     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7021     break 2
7022   fi
7023 done
7024   done
7025 IFS=$as_save_IFS
7026
7027   ;;
7028 esac
7029 fi
7030 BISON=$ac_cv_path_BISON
7031 if test -n "$BISON"; then
7032   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
7033 $as_echo "$BISON" >&6; }
7034 else
7035   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7036 $as_echo "no" >&6; }
7037 fi
7038
7039
7040   test -n "$BISON" && break
7041 done
7042
7043 fi
7044
7045 if test "$BISON"; then
7046   pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
7047   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
7048 $as_echo "$as_me: using $pgac_bison_version" >&6;}
7049   if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
7050   then
7051     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7052 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
7053 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
7054 $as_echo "$as_me: WARNING:
7055 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
7056 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
7057     BISON=""
7058   fi
7059 fi
7060
7061 if test -z "$BISON"; then
7062   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7063 *** Without Bison you will not be able to build PostgreSQL from Git nor
7064 *** change any of the parser definition files.  You can obtain Bison from
7065 *** a GNU mirror site.  (If you are using the official distribution of
7066 *** PostgreSQL then you do not need to worry about this, because the Bison
7067 *** output is pre-generated.)" >&5
7068 $as_echo "$as_me: WARNING:
7069 *** Without Bison you will not be able to build PostgreSQL from Git nor
7070 *** change any of the parser definition files.  You can obtain Bison from
7071 *** a GNU mirror site.  (If you are using the official distribution of
7072 *** PostgreSQL then you do not need to worry about this, because the Bison
7073 *** output is pre-generated.)" >&2;}
7074 fi
7075 # We don't need AC_SUBST(BISON) because AC_PATH_PROG did it
7076
7077
7078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
7079 $as_echo_n "checking for flex... " >&6; }
7080 if ${pgac_cv_path_flex+:} false; then :
7081   $as_echo_n "(cached) " >&6
7082 else
7083   # Let the user override the test
7084 if test -n "$FLEX"; then
7085   pgac_cv_path_flex=$FLEX
7086 else
7087   pgac_save_IFS=$IFS
7088   IFS=$PATH_SEPARATOR
7089   for pgac_dir in $PATH; do
7090     IFS=$pgac_save_IFS
7091     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
7092       pgac_dir=`pwd`
7093     fi
7094     for pgac_prog in flex lex; do
7095       pgac_candidate="$pgac_dir/$pgac_prog"
7096       if test -f "$pgac_candidate" \
7097         && $pgac_candidate --version </dev/null >/dev/null 2>&1
7098       then
7099         echo '%%'  > conftest.l
7100         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
7101           pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
7102           if echo "$pgac_flex_version" | sed 's/[.a-z]/ /g' | $AWK '{ if ($1 = 2 && $2 = 5 && $3 >= 31) exit 0; else exit 1;}'
7103           then
7104             pgac_cv_path_flex=$pgac_candidate
7105             break 2
7106           else
7107             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7108 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
7109 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
7110 $as_echo "$as_me: WARNING:
7111 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
7112 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
7113           fi
7114         fi
7115       fi
7116     done
7117   done
7118   rm -f conftest.l lex.yy.c
7119   : ${pgac_cv_path_flex=no}
7120 fi
7121
7122 fi
7123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
7124 $as_echo "$pgac_cv_path_flex" >&6; }
7125 if test x"$pgac_cv_path_flex" = x"no"; then
7126   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7127 *** Without Flex you will not be able to build PostgreSQL from Git nor
7128 *** change any of the scanner definition files.  You can obtain Flex from
7129 *** a GNU mirror site.  (If you are using the official distribution of
7130 *** PostgreSQL then you do not need to worry about this because the Flex
7131 *** output is pre-generated.)" >&5
7132 $as_echo "$as_me: WARNING:
7133 *** Without Flex you will not be able to build PostgreSQL from Git nor
7134 *** change any of the scanner definition files.  You can obtain Flex from
7135 *** a GNU mirror site.  (If you are using the official distribution of
7136 *** PostgreSQL then you do not need to worry about this because the Flex
7137 *** output is pre-generated.)" >&2;}
7138
7139   FLEX=
7140 else
7141   FLEX=$pgac_cv_path_flex
7142   pgac_flex_version=`$FLEX --version 2>/dev/null`
7143   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
7144 $as_echo "$as_me: using $pgac_flex_version" >&6;}
7145 fi
7146
7147
7148
7149
7150
7151 # Let the user override the search
7152 if test -z "$PERL"; then
7153   # Extract the first word of "perl", so it can be a program name with args.
7154 set dummy perl; ac_word=$2
7155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7156 $as_echo_n "checking for $ac_word... " >&6; }
7157 if ${ac_cv_path_PERL+:} false; then :
7158   $as_echo_n "(cached) " >&6
7159 else
7160   case $PERL in
7161   [\\/]* | ?:[\\/]*)
7162   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
7163   ;;
7164   *)
7165   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7166 for as_dir in $PATH
7167 do
7168   IFS=$as_save_IFS
7169   test -z "$as_dir" && as_dir=.
7170     for ac_exec_ext in '' $ac_executable_extensions; do
7171   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7172     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
7173     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7174     break 2
7175   fi
7176 done
7177   done
7178 IFS=$as_save_IFS
7179
7180   ;;
7181 esac
7182 fi
7183 PERL=$ac_cv_path_PERL
7184 if test -n "$PERL"; then
7185   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
7186 $as_echo "$PERL" >&6; }
7187 else
7188   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7189 $as_echo "no" >&6; }
7190 fi
7191
7192
7193 fi
7194
7195 if test "$PERL"; then
7196   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'`
7197   { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
7198 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
7199   if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
7200     $AWK '{ if ($1 = 5 && $2 >= 8) exit 1; else exit 0;}'
7201   then
7202     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7203 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7204 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
7205 $as_echo "$as_me: WARNING:
7206 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7207 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
7208     PERL=""
7209   fi
7210 fi
7211
7212 if test -z "$PERL"; then
7213   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7214 *** Without Perl you will not be able to build PostgreSQL from Git.
7215 *** You can obtain Perl from any CPAN mirror site.
7216 *** (If you are using the official distribution of PostgreSQL then you do not
7217 *** need to worry about this, because the Perl output is pre-generated.)" >&5
7218 $as_echo "$as_me: WARNING:
7219 *** Without Perl you will not be able to build PostgreSQL from Git.
7220 *** You can obtain Perl from any CPAN mirror site.
7221 *** (If you are using the official distribution of PostgreSQL then you do not
7222 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
7223 fi
7224
7225 if test "$with_perl" = yes; then
7226   if test -z "$PERL"; then
7227     as_fn_error $? "Perl not found" "$LINENO" 5
7228   fi
7229
7230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
7231 $as_echo_n "checking for Perl archlibexp... " >&6; }
7232 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
7233 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
7234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
7235 $as_echo "$perl_archlibexp" >&6; }
7236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
7237 $as_echo_n "checking for Perl privlibexp... " >&6; }
7238 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
7239 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
7240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
7241 $as_echo "$perl_privlibexp" >&6; }
7242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
7243 $as_echo_n "checking for Perl useshrplib... " >&6; }
7244 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
7245 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
7246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
7247 $as_echo "$perl_useshrplib" >&6; }
7248
7249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
7250 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
7251 if test "$PORTNAME" = "win32" ; then
7252 perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
7253 test -e "$perl_archlibexp/CORE/$perl_lib.lib" && perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
7254 else
7255 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
7256 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
7257 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
7258 fi
7259 if test -z "$perl_embed_ldflags" ; then
7260         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7261 $as_echo "no" >&6; }
7262         as_fn_error $? "could not determine flags for linking embedded Perl.
7263 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
7264 installed." "$LINENO" 5
7265 else
7266         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
7267 $as_echo "$perl_embed_ldflags" >&6; }
7268 fi
7269
7270 fi
7271
7272 if test "$with_python" = yes; then
7273   # Extract the first word of "python", so it can be a program name with args.
7274 set dummy python; ac_word=$2
7275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7276 $as_echo_n "checking for $ac_word... " >&6; }
7277 if ${ac_cv_path_PYTHON+:} false; then :
7278   $as_echo_n "(cached) " >&6
7279 else
7280   case $PYTHON in
7281   [\\/]* | ?:[\\/]*)
7282   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
7283   ;;
7284   *)
7285   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7286 for as_dir in $PATH
7287 do
7288   IFS=$as_save_IFS
7289   test -z "$as_dir" && as_dir=.
7290     for ac_exec_ext in '' $ac_executable_extensions; do
7291   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7292     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
7293     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7294     break 2
7295   fi
7296 done
7297   done
7298 IFS=$as_save_IFS
7299
7300   ;;
7301 esac
7302 fi
7303 PYTHON=$ac_cv_path_PYTHON
7304 if test -n "$PYTHON"; then
7305   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
7306 $as_echo "$PYTHON" >&6; }
7307 else
7308   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7309 $as_echo "no" >&6; }
7310 fi
7311
7312
7313 if test x"$PYTHON" = x""; then
7314   as_fn_error $? "Python not found" "$LINENO" 5
7315 fi
7316
7317
7318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python distutils module" >&5
7319 $as_echo_n "checking for Python distutils module... " >&6; }
7320 if "${PYTHON}" -c 'import distutils' 2>&5
7321 then
7322     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7323 $as_echo "yes" >&6; }
7324 else
7325     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7326 $as_echo "no" >&6; }
7327     as_fn_error $? "distutils module not found" "$LINENO" 5
7328 fi
7329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
7330 $as_echo_n "checking Python configuration directory... " >&6; }
7331 python_majorversion=`${PYTHON} -c "import sys; print(sys.version[0])"`
7332 python_version=`${PYTHON} -c "import sys; print(sys.version[:3])"`
7333 python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
7334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
7335 $as_echo "$python_configdir" >&6; }
7336
7337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directories" >&5
7338 $as_echo_n "checking Python include directories... " >&6; }
7339 python_includespec=`${PYTHON} -c "
7340 import distutils.sysconfig
7341 a = '-I' + distutils.sysconfig.get_python_inc(False)
7342 b = '-I' + distutils.sysconfig.get_python_inc(True)
7343 if a == b:
7344     print(a)
7345 else:
7346     print(a + ' ' + b)"`
7347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
7348 $as_echo "$python_includespec" >&6; }
7349
7350
7351
7352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
7353 $as_echo_n "checking how to link an embedded Python application... " >&6; }
7354
7355 python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
7356 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
7357 python_so=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('SO'))))"`
7358 ldlibrary=`echo "${python_ldlibrary}" | sed "s/${python_so}$//"`
7359 python_framework=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('PYTHONFRAMEWORK'))))"`
7360 python_enable_shared=`${PYTHON} -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_vars().get('Py_ENABLE_SHARED',0))"`
7361
7362 if test -n "$python_framework"; then
7363         python_frameworkprefix=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('PYTHONFRAMEWORKPREFIX'))))"`
7364         python_libspec="-F${python_frameworkprefix} -framework $python_framework"
7365         python_enable_shared=1
7366 elif test x"${python_libdir}" != x"" -a x"${python_ldlibrary}" != x"" -a x"${python_ldlibrary}" != x"${ldlibrary}"
7367 then
7368         # New way: use the official shared library
7369         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
7370         python_libspec="-L${python_libdir} -l${ldlibrary}"
7371 else
7372         # Old way: use libpython from python_configdir
7373         python_libdir="${python_configdir}"
7374         # LDVERSION was introduced in Python 3.2.
7375         python_ldversion=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDVERSION'))))"`
7376         if test x"${python_ldversion}" = x""; then
7377                 python_ldversion=$python_version
7378         fi
7379         python_libspec="-L${python_libdir} -lpython${python_ldversion}"
7380 fi
7381
7382 if test -z "$python_framework"; then
7383         python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
7384 fi
7385
7386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
7387 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
7388
7389
7390 # threaded python is not supported on OpenBSD
7391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Python is compiled with thread support" >&5
7392 $as_echo_n "checking whether Python is compiled with thread support... " >&6; }
7393 pythreads=`${PYTHON} -c "import sys; print(int('thread' in sys.builtin_module_names))"`
7394 if test "$pythreads" = "1"; then
7395   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7396 $as_echo "yes" >&6; }
7397   case $host_os in
7398   openbsd*)
7399     as_fn_error $? "threaded Python not supported on this platform" "$LINENO" 5
7400     ;;
7401   esac
7402 else
7403   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7404 $as_echo "no" >&6; }
7405 fi
7406
7407
7408 fi
7409
7410 if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
7411   # Extract the first word of "zic", so it can be a program name with args.
7412 set dummy zic; ac_word=$2
7413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7414 $as_echo_n "checking for $ac_word... " >&6; }
7415 if ${ac_cv_path_ZIC+:} false; then :
7416   $as_echo_n "(cached) " >&6
7417 else
7418   case $ZIC in
7419   [\\/]* | ?:[\\/]*)
7420   ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
7421   ;;
7422   *)
7423   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7424 for as_dir in $PATH
7425 do
7426   IFS=$as_save_IFS
7427   test -z "$as_dir" && as_dir=.
7428     for ac_exec_ext in '' $ac_executable_extensions; do
7429   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7430     ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
7431     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7432     break 2
7433   fi
7434 done
7435   done
7436 IFS=$as_save_IFS
7437
7438   ;;
7439 esac
7440 fi
7441 ZIC=$ac_cv_path_ZIC
7442 if test -n "$ZIC"; then
7443   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
7444 $as_echo "$ZIC" >&6; }
7445 else
7446   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7447 $as_echo "no" >&6; }
7448 fi
7449
7450
7451   if test -z "$ZIC"; then
7452     as_fn_error $? "
7453 When cross-compiling, either use the option --with-system-tzdata to use
7454 existing time-zone data, or set the environment variable ZIC to a zic
7455 program to use during the build." "$LINENO" 5
7456   fi
7457 fi
7458
7459
7460 ##
7461 ## Libraries
7462 ##
7463 ## Most libraries are included only if they demonstrably provide a function
7464 ## we need, but libm is an exception: always include it, because there are
7465 ## too many compilers that play cute optimization games that will break
7466 ## probes for standard functions such as pow().
7467 ##
7468
7469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
7470 $as_echo_n "checking for main in -lm... " >&6; }
7471 if ${ac_cv_lib_m_main+:} false; then :
7472   $as_echo_n "(cached) " >&6
7473 else
7474   ac_check_lib_save_LIBS=$LIBS
7475 LIBS="-lm  $LIBS"
7476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7477 /* end confdefs.h.  */
7478
7479
7480 int
7481 main ()
7482 {
7483 return main ();
7484   ;
7485   return 0;
7486 }
7487 _ACEOF
7488 if ac_fn_c_try_link "$LINENO"; then :
7489   ac_cv_lib_m_main=yes
7490 else
7491   ac_cv_lib_m_main=no
7492 fi
7493 rm -f core conftest.err conftest.$ac_objext \
7494     conftest$ac_exeext conftest.$ac_ext
7495 LIBS=$ac_check_lib_save_LIBS
7496 fi
7497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
7498 $as_echo "$ac_cv_lib_m_main" >&6; }
7499 if test "x$ac_cv_lib_m_main" = xyes; then :
7500   cat >>confdefs.h <<_ACEOF
7501 #define HAVE_LIBM 1
7502 _ACEOF
7503
7504   LIBS="-lm $LIBS"
7505
7506 fi
7507
7508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
7509 $as_echo_n "checking for library containing setproctitle... " >&6; }
7510 if ${ac_cv_search_setproctitle+:} false; then :
7511   $as_echo_n "(cached) " >&6
7512 else
7513   ac_func_search_save_LIBS=$LIBS
7514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7515 /* end confdefs.h.  */
7516
7517 /* Override any GCC internal prototype to avoid an error.
7518    Use char because int might match the return type of a GCC
7519    builtin and then its argument prototype would still apply.  */
7520 #ifdef __cplusplus
7521 extern "C"
7522 #endif
7523 char setproctitle ();
7524 int
7525 main ()
7526 {
7527 return setproctitle ();
7528   ;
7529   return 0;
7530 }
7531 _ACEOF
7532 for ac_lib in '' util; do
7533   if test -z "$ac_lib"; then
7534     ac_res="none required"
7535   else
7536     ac_res=-l$ac_lib
7537     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7538   fi
7539   if ac_fn_c_try_link "$LINENO"; then :
7540   ac_cv_search_setproctitle=$ac_res
7541 fi
7542 rm -f core conftest.err conftest.$ac_objext \
7543     conftest$ac_exeext
7544   if ${ac_cv_search_setproctitle+:} false; then :
7545   break
7546 fi
7547 done
7548 if ${ac_cv_search_setproctitle+:} false; then :
7549
7550 else
7551   ac_cv_search_setproctitle=no
7552 fi
7553 rm conftest.$ac_ext
7554 LIBS=$ac_func_search_save_LIBS
7555 fi
7556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
7557 $as_echo "$ac_cv_search_setproctitle" >&6; }
7558 ac_res=$ac_cv_search_setproctitle
7559 if test "$ac_res" != no; then :
7560   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7561
7562 fi
7563
7564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
7565 $as_echo_n "checking for library containing dlopen... " >&6; }
7566 if ${ac_cv_search_dlopen+:} false; then :
7567   $as_echo_n "(cached) " >&6
7568 else
7569   ac_func_search_save_LIBS=$LIBS
7570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7571 /* end confdefs.h.  */
7572
7573 /* Override any GCC internal prototype to avoid an error.
7574    Use char because int might match the return type of a GCC
7575    builtin and then its argument prototype would still apply.  */
7576 #ifdef __cplusplus
7577 extern "C"
7578 #endif
7579 char dlopen ();
7580 int
7581 main ()
7582 {
7583 return dlopen ();
7584   ;
7585   return 0;
7586 }
7587 _ACEOF
7588 for ac_lib in '' dl; do
7589   if test -z "$ac_lib"; then
7590     ac_res="none required"
7591   else
7592     ac_res=-l$ac_lib
7593     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7594   fi
7595   if ac_fn_c_try_link "$LINENO"; then :
7596   ac_cv_search_dlopen=$ac_res
7597 fi
7598 rm -f core conftest.err conftest.$ac_objext \
7599     conftest$ac_exeext
7600   if ${ac_cv_search_dlopen+:} false; then :
7601   break
7602 fi
7603 done
7604 if ${ac_cv_search_dlopen+:} false; then :
7605
7606 else
7607   ac_cv_search_dlopen=no
7608 fi
7609 rm conftest.$ac_ext
7610 LIBS=$ac_func_search_save_LIBS
7611 fi
7612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
7613 $as_echo "$ac_cv_search_dlopen" >&6; }
7614 ac_res=$ac_cv_search_dlopen
7615 if test "$ac_res" != no; then :
7616   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7617
7618 fi
7619
7620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
7621 $as_echo_n "checking for library containing socket... " >&6; }
7622 if ${ac_cv_search_socket+:} false; then :
7623   $as_echo_n "(cached) " >&6
7624 else
7625   ac_func_search_save_LIBS=$LIBS
7626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7627 /* end confdefs.h.  */
7628
7629 /* Override any GCC internal prototype to avoid an error.
7630    Use char because int might match the return type of a GCC
7631    builtin and then its argument prototype would still apply.  */
7632 #ifdef __cplusplus
7633 extern "C"
7634 #endif
7635 char socket ();
7636 int
7637 main ()
7638 {
7639 return socket ();
7640   ;
7641   return 0;
7642 }
7643 _ACEOF
7644 for ac_lib in '' socket wsock32; do
7645   if test -z "$ac_lib"; then
7646     ac_res="none required"
7647   else
7648     ac_res=-l$ac_lib
7649     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7650   fi
7651   if ac_fn_c_try_link "$LINENO"; then :
7652   ac_cv_search_socket=$ac_res
7653 fi
7654 rm -f core conftest.err conftest.$ac_objext \
7655     conftest$ac_exeext
7656   if ${ac_cv_search_socket+:} false; then :
7657   break
7658 fi
7659 done
7660 if ${ac_cv_search_socket+:} false; then :
7661
7662 else
7663   ac_cv_search_socket=no
7664 fi
7665 rm conftest.$ac_ext
7666 LIBS=$ac_func_search_save_LIBS
7667 fi
7668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
7669 $as_echo "$ac_cv_search_socket" >&6; }
7670 ac_res=$ac_cv_search_socket
7671 if test "$ac_res" != no; then :
7672   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7673
7674 fi
7675
7676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
7677 $as_echo_n "checking for library containing shl_load... " >&6; }
7678 if ${ac_cv_search_shl_load+:} false; then :
7679   $as_echo_n "(cached) " >&6
7680 else
7681   ac_func_search_save_LIBS=$LIBS
7682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7683 /* end confdefs.h.  */
7684
7685 /* Override any GCC internal prototype to avoid an error.
7686    Use char because int might match the return type of a GCC
7687    builtin and then its argument prototype would still apply.  */
7688 #ifdef __cplusplus
7689 extern "C"
7690 #endif
7691 char shl_load ();
7692 int
7693 main ()
7694 {
7695 return shl_load ();
7696   ;
7697   return 0;
7698 }
7699 _ACEOF
7700 for ac_lib in '' dld; do
7701   if test -z "$ac_lib"; then
7702     ac_res="none required"
7703   else
7704     ac_res=-l$ac_lib
7705     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7706   fi
7707   if ac_fn_c_try_link "$LINENO"; then :
7708   ac_cv_search_shl_load=$ac_res
7709 fi
7710 rm -f core conftest.err conftest.$ac_objext \
7711     conftest$ac_exeext
7712   if ${ac_cv_search_shl_load+:} false; then :
7713   break
7714 fi
7715 done
7716 if ${ac_cv_search_shl_load+:} false; then :
7717
7718 else
7719   ac_cv_search_shl_load=no
7720 fi
7721 rm conftest.$ac_ext
7722 LIBS=$ac_func_search_save_LIBS
7723 fi
7724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
7725 $as_echo "$ac_cv_search_shl_load" >&6; }
7726 ac_res=$ac_cv_search_shl_load
7727 if test "$ac_res" != no; then :
7728   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7729
7730 fi
7731
7732 # We only use libld in port/dynloader/aix.c
7733 case $host_os in
7734      aix*)
7735         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ldopen" >&5
7736 $as_echo_n "checking for library containing ldopen... " >&6; }
7737 if ${ac_cv_search_ldopen+:} false; then :
7738   $as_echo_n "(cached) " >&6
7739 else
7740   ac_func_search_save_LIBS=$LIBS
7741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7742 /* end confdefs.h.  */
7743
7744 /* Override any GCC internal prototype to avoid an error.
7745    Use char because int might match the return type of a GCC
7746    builtin and then its argument prototype would still apply.  */
7747 #ifdef __cplusplus
7748 extern "C"
7749 #endif
7750 char ldopen ();
7751 int
7752 main ()
7753 {
7754 return ldopen ();
7755   ;
7756   return 0;
7757 }
7758 _ACEOF
7759 for ac_lib in '' ld; do
7760   if test -z "$ac_lib"; then
7761     ac_res="none required"
7762   else
7763     ac_res=-l$ac_lib
7764     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7765   fi
7766   if ac_fn_c_try_link "$LINENO"; then :
7767   ac_cv_search_ldopen=$ac_res
7768 fi
7769 rm -f core conftest.err conftest.$ac_objext \
7770     conftest$ac_exeext
7771   if ${ac_cv_search_ldopen+:} false; then :
7772   break
7773 fi
7774 done
7775 if ${ac_cv_search_ldopen+:} false; then :
7776
7777 else
7778   ac_cv_search_ldopen=no
7779 fi
7780 rm conftest.$ac_ext
7781 LIBS=$ac_func_search_save_LIBS
7782 fi
7783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ldopen" >&5
7784 $as_echo "$ac_cv_search_ldopen" >&6; }
7785 ac_res=$ac_cv_search_ldopen
7786 if test "$ac_res" != no; then :
7787   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7788
7789 fi
7790
7791         ;;
7792 esac
7793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
7794 $as_echo_n "checking for library containing getopt_long... " >&6; }
7795 if ${ac_cv_search_getopt_long+:} false; then :
7796   $as_echo_n "(cached) " >&6
7797 else
7798   ac_func_search_save_LIBS=$LIBS
7799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7800 /* end confdefs.h.  */
7801
7802 /* Override any GCC internal prototype to avoid an error.
7803    Use char because int might match the return type of a GCC
7804    builtin and then its argument prototype would still apply.  */
7805 #ifdef __cplusplus
7806 extern "C"
7807 #endif
7808 char getopt_long ();
7809 int
7810 main ()
7811 {
7812 return getopt_long ();
7813   ;
7814   return 0;
7815 }
7816 _ACEOF
7817 for ac_lib in '' getopt gnugetopt; do
7818   if test -z "$ac_lib"; then
7819     ac_res="none required"
7820   else
7821     ac_res=-l$ac_lib
7822     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7823   fi
7824   if ac_fn_c_try_link "$LINENO"; then :
7825   ac_cv_search_getopt_long=$ac_res
7826 fi
7827 rm -f core conftest.err conftest.$ac_objext \
7828     conftest$ac_exeext
7829   if ${ac_cv_search_getopt_long+:} false; then :
7830   break
7831 fi
7832 done
7833 if ${ac_cv_search_getopt_long+:} false; then :
7834
7835 else
7836   ac_cv_search_getopt_long=no
7837 fi
7838 rm conftest.$ac_ext
7839 LIBS=$ac_func_search_save_LIBS
7840 fi
7841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
7842 $as_echo "$ac_cv_search_getopt_long" >&6; }
7843 ac_res=$ac_cv_search_getopt_long
7844 if test "$ac_res" != no; then :
7845   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7846
7847 fi
7848
7849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
7850 $as_echo_n "checking for library containing crypt... " >&6; }
7851 if ${ac_cv_search_crypt+:} false; then :
7852   $as_echo_n "(cached) " >&6
7853 else
7854   ac_func_search_save_LIBS=$LIBS
7855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7856 /* end confdefs.h.  */
7857
7858 /* Override any GCC internal prototype to avoid an error.
7859    Use char because int might match the return type of a GCC
7860    builtin and then its argument prototype would still apply.  */
7861 #ifdef __cplusplus
7862 extern "C"
7863 #endif
7864 char crypt ();
7865 int
7866 main ()
7867 {
7868 return crypt ();
7869   ;
7870   return 0;
7871 }
7872 _ACEOF
7873 for ac_lib in '' crypt; do
7874   if test -z "$ac_lib"; then
7875     ac_res="none required"
7876   else
7877     ac_res=-l$ac_lib
7878     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7879   fi
7880   if ac_fn_c_try_link "$LINENO"; then :
7881   ac_cv_search_crypt=$ac_res
7882 fi
7883 rm -f core conftest.err conftest.$ac_objext \
7884     conftest$ac_exeext
7885   if ${ac_cv_search_crypt+:} false; then :
7886   break
7887 fi
7888 done
7889 if ${ac_cv_search_crypt+:} false; then :
7890
7891 else
7892   ac_cv_search_crypt=no
7893 fi
7894 rm conftest.$ac_ext
7895 LIBS=$ac_func_search_save_LIBS
7896 fi
7897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
7898 $as_echo "$ac_cv_search_crypt" >&6; }
7899 ac_res=$ac_cv_search_crypt
7900 if test "$ac_res" != no; then :
7901   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7902
7903 fi
7904
7905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
7906 $as_echo_n "checking for library containing shm_open... " >&6; }
7907 if ${ac_cv_search_shm_open+:} false; then :
7908   $as_echo_n "(cached) " >&6
7909 else
7910   ac_func_search_save_LIBS=$LIBS
7911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7912 /* end confdefs.h.  */
7913
7914 /* Override any GCC internal prototype to avoid an error.
7915    Use char because int might match the return type of a GCC
7916    builtin and then its argument prototype would still apply.  */
7917 #ifdef __cplusplus
7918 extern "C"
7919 #endif
7920 char shm_open ();
7921 int
7922 main ()
7923 {
7924 return shm_open ();
7925   ;
7926   return 0;
7927 }
7928 _ACEOF
7929 for ac_lib in '' rt; do
7930   if test -z "$ac_lib"; then
7931     ac_res="none required"
7932   else
7933     ac_res=-l$ac_lib
7934     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7935   fi
7936   if ac_fn_c_try_link "$LINENO"; then :
7937   ac_cv_search_shm_open=$ac_res
7938 fi
7939 rm -f core conftest.err conftest.$ac_objext \
7940     conftest$ac_exeext
7941   if ${ac_cv_search_shm_open+:} false; then :
7942   break
7943 fi
7944 done
7945 if ${ac_cv_search_shm_open+:} false; then :
7946
7947 else
7948   ac_cv_search_shm_open=no
7949 fi
7950 rm conftest.$ac_ext
7951 LIBS=$ac_func_search_save_LIBS
7952 fi
7953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
7954 $as_echo "$ac_cv_search_shm_open" >&6; }
7955 ac_res=$ac_cv_search_shm_open
7956 if test "$ac_res" != no; then :
7957   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7958
7959 fi
7960
7961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
7962 $as_echo_n "checking for library containing shm_unlink... " >&6; }
7963 if ${ac_cv_search_shm_unlink+:} false; then :
7964   $as_echo_n "(cached) " >&6
7965 else
7966   ac_func_search_save_LIBS=$LIBS
7967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7968 /* end confdefs.h.  */
7969
7970 /* Override any GCC internal prototype to avoid an error.
7971    Use char because int might match the return type of a GCC
7972    builtin and then its argument prototype would still apply.  */
7973 #ifdef __cplusplus
7974 extern "C"
7975 #endif
7976 char shm_unlink ();
7977 int
7978 main ()
7979 {
7980 return shm_unlink ();
7981   ;
7982   return 0;
7983 }
7984 _ACEOF
7985 for ac_lib in '' rt; do
7986   if test -z "$ac_lib"; then
7987     ac_res="none required"
7988   else
7989     ac_res=-l$ac_lib
7990     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7991   fi
7992   if ac_fn_c_try_link "$LINENO"; then :
7993   ac_cv_search_shm_unlink=$ac_res
7994 fi
7995 rm -f core conftest.err conftest.$ac_objext \
7996     conftest$ac_exeext
7997   if ${ac_cv_search_shm_unlink+:} false; then :
7998   break
7999 fi
8000 done
8001 if ${ac_cv_search_shm_unlink+:} false; then :
8002
8003 else
8004   ac_cv_search_shm_unlink=no
8005 fi
8006 rm conftest.$ac_ext
8007 LIBS=$ac_func_search_save_LIBS
8008 fi
8009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
8010 $as_echo "$ac_cv_search_shm_unlink" >&6; }
8011 ac_res=$ac_cv_search_shm_unlink
8012 if test "$ac_res" != no; then :
8013   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8014
8015 fi
8016
8017 # Solaris:
8018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
8019 $as_echo_n "checking for library containing fdatasync... " >&6; }
8020 if ${ac_cv_search_fdatasync+:} false; then :
8021   $as_echo_n "(cached) " >&6
8022 else
8023   ac_func_search_save_LIBS=$LIBS
8024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8025 /* end confdefs.h.  */
8026
8027 /* Override any GCC internal prototype to avoid an error.
8028    Use char because int might match the return type of a GCC
8029    builtin and then its argument prototype would still apply.  */
8030 #ifdef __cplusplus
8031 extern "C"
8032 #endif
8033 char fdatasync ();
8034 int
8035 main ()
8036 {
8037 return fdatasync ();
8038   ;
8039   return 0;
8040 }
8041 _ACEOF
8042 for ac_lib in '' rt posix4; do
8043   if test -z "$ac_lib"; then
8044     ac_res="none required"
8045   else
8046     ac_res=-l$ac_lib
8047     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8048   fi
8049   if ac_fn_c_try_link "$LINENO"; then :
8050   ac_cv_search_fdatasync=$ac_res
8051 fi
8052 rm -f core conftest.err conftest.$ac_objext \
8053     conftest$ac_exeext
8054   if ${ac_cv_search_fdatasync+:} false; then :
8055   break
8056 fi
8057 done
8058 if ${ac_cv_search_fdatasync+:} false; then :
8059
8060 else
8061   ac_cv_search_fdatasync=no
8062 fi
8063 rm conftest.$ac_ext
8064 LIBS=$ac_func_search_save_LIBS
8065 fi
8066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
8067 $as_echo "$ac_cv_search_fdatasync" >&6; }
8068 ac_res=$ac_cv_search_fdatasync
8069 if test "$ac_res" != no; then :
8070   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8071
8072 fi
8073
8074 # Required for thread_test.c on Solaris 2.5:
8075 # Other ports use it too (HP-UX) so test unconditionally
8076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
8077 $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
8078 if ${ac_cv_search_gethostbyname_r+:} false; then :
8079   $as_echo_n "(cached) " >&6
8080 else
8081   ac_func_search_save_LIBS=$LIBS
8082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8083 /* end confdefs.h.  */
8084
8085 /* Override any GCC internal prototype to avoid an error.
8086    Use char because int might match the return type of a GCC
8087    builtin and then its argument prototype would still apply.  */
8088 #ifdef __cplusplus
8089 extern "C"
8090 #endif
8091 char gethostbyname_r ();
8092 int
8093 main ()
8094 {
8095 return gethostbyname_r ();
8096   ;
8097   return 0;
8098 }
8099 _ACEOF
8100 for ac_lib in '' nsl; do
8101   if test -z "$ac_lib"; then
8102     ac_res="none required"
8103   else
8104     ac_res=-l$ac_lib
8105     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8106   fi
8107   if ac_fn_c_try_link "$LINENO"; then :
8108   ac_cv_search_gethostbyname_r=$ac_res
8109 fi
8110 rm -f core conftest.err conftest.$ac_objext \
8111     conftest$ac_exeext
8112   if ${ac_cv_search_gethostbyname_r+:} false; then :
8113   break
8114 fi
8115 done
8116 if ${ac_cv_search_gethostbyname_r+:} false; then :
8117
8118 else
8119   ac_cv_search_gethostbyname_r=no
8120 fi
8121 rm conftest.$ac_ext
8122 LIBS=$ac_func_search_save_LIBS
8123 fi
8124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
8125 $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
8126 ac_res=$ac_cv_search_gethostbyname_r
8127 if test "$ac_res" != no; then :
8128   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8129
8130 fi
8131
8132 # Cygwin:
8133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
8134 $as_echo_n "checking for library containing shmget... " >&6; }
8135 if ${ac_cv_search_shmget+:} false; then :
8136   $as_echo_n "(cached) " >&6
8137 else
8138   ac_func_search_save_LIBS=$LIBS
8139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8140 /* end confdefs.h.  */
8141
8142 /* Override any GCC internal prototype to avoid an error.
8143    Use char because int might match the return type of a GCC
8144    builtin and then its argument prototype would still apply.  */
8145 #ifdef __cplusplus
8146 extern "C"
8147 #endif
8148 char shmget ();
8149 int
8150 main ()
8151 {
8152 return shmget ();
8153   ;
8154   return 0;
8155 }
8156 _ACEOF
8157 for ac_lib in '' cygipc; do
8158   if test -z "$ac_lib"; then
8159     ac_res="none required"
8160   else
8161     ac_res=-l$ac_lib
8162     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8163   fi
8164   if ac_fn_c_try_link "$LINENO"; then :
8165   ac_cv_search_shmget=$ac_res
8166 fi
8167 rm -f core conftest.err conftest.$ac_objext \
8168     conftest$ac_exeext
8169   if ${ac_cv_search_shmget+:} false; then :
8170   break
8171 fi
8172 done
8173 if ${ac_cv_search_shmget+:} false; then :
8174
8175 else
8176   ac_cv_search_shmget=no
8177 fi
8178 rm conftest.$ac_ext
8179 LIBS=$ac_func_search_save_LIBS
8180 fi
8181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
8182 $as_echo "$ac_cv_search_shmget" >&6; }
8183 ac_res=$ac_cv_search_shmget
8184 if test "$ac_res" != no; then :
8185   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8186
8187 fi
8188
8189
8190 if test "$with_readline" = yes; then
8191
8192
8193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
8194 $as_echo_n "checking for library containing readline... " >&6; }
8195 if ${pgac_cv_check_readline+:} false; then :
8196   $as_echo_n "(cached) " >&6
8197 else
8198   pgac_cv_check_readline=no
8199 pgac_save_LIBS=$LIBS
8200 if test x"$with_libedit_preferred" != x"yes"
8201 then    READLINE_ORDER="-lreadline -ledit"
8202 else    READLINE_ORDER="-ledit -lreadline"
8203 fi
8204 for pgac_rllib in $READLINE_ORDER ; do
8205   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
8206     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
8207     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8208 /* end confdefs.h.  */
8209
8210 /* Override any GCC internal prototype to avoid an error.
8211    Use char because int might match the return type of a GCC
8212    builtin and then its argument prototype would still apply.  */
8213 #ifdef __cplusplus
8214 extern "C"
8215 #endif
8216 char readline ();
8217 int
8218 main ()
8219 {
8220 return readline ();
8221   ;
8222   return 0;
8223 }
8224 _ACEOF
8225 if ac_fn_c_try_link "$LINENO"; then :
8226
8227       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
8228       # recognize dependent libraries; assume curses is needed if we didn't
8229       # find any dependency.
8230       case $host_os in
8231         netbsd* | openbsd* | irix*)
8232           if test x"$pgac_lib" = x"" ; then
8233             pgac_lib=" -lcurses"
8234           fi ;;
8235       esac
8236
8237       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
8238       break
8239
8240 fi
8241 rm -f core conftest.err conftest.$ac_objext \
8242     conftest$ac_exeext conftest.$ac_ext
8243   done
8244   if test "$pgac_cv_check_readline" != no ; then
8245     break
8246   fi
8247 done
8248 LIBS=$pgac_save_LIBS
8249
8250 fi
8251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
8252 $as_echo "$pgac_cv_check_readline" >&6; }
8253 if test "$pgac_cv_check_readline" != no ; then
8254   LIBS="$pgac_cv_check_readline $LIBS"
8255
8256 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
8257
8258 fi
8259
8260
8261   if test x"$pgac_cv_check_readline" = x"no"; then
8262     as_fn_error $? "readline library not found
8263 If you have readline already installed, see config.log for details on the
8264 failure.  It is possible the compiler isn't looking in the proper directory.
8265 Use --without-readline to disable readline support." "$LINENO" 5
8266   fi
8267 fi
8268
8269 if test "$with_zlib" = yes; then
8270   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
8271 $as_echo_n "checking for inflate in -lz... " >&6; }
8272 if ${ac_cv_lib_z_inflate+:} false; then :
8273   $as_echo_n "(cached) " >&6
8274 else
8275   ac_check_lib_save_LIBS=$LIBS
8276 LIBS="-lz  $LIBS"
8277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8278 /* end confdefs.h.  */
8279
8280 /* Override any GCC internal prototype to avoid an error.
8281    Use char because int might match the return type of a GCC
8282    builtin and then its argument prototype would still apply.  */
8283 #ifdef __cplusplus
8284 extern "C"
8285 #endif
8286 char inflate ();
8287 int
8288 main ()
8289 {
8290 return inflate ();
8291   ;
8292   return 0;
8293 }
8294 _ACEOF
8295 if ac_fn_c_try_link "$LINENO"; then :
8296   ac_cv_lib_z_inflate=yes
8297 else
8298   ac_cv_lib_z_inflate=no
8299 fi
8300 rm -f core conftest.err conftest.$ac_objext \
8301     conftest$ac_exeext conftest.$ac_ext
8302 LIBS=$ac_check_lib_save_LIBS
8303 fi
8304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
8305 $as_echo "$ac_cv_lib_z_inflate" >&6; }
8306 if test "x$ac_cv_lib_z_inflate" = xyes; then :
8307   cat >>confdefs.h <<_ACEOF
8308 #define HAVE_LIBZ 1
8309 _ACEOF
8310
8311   LIBS="-lz $LIBS"
8312
8313 else
8314   as_fn_error $? "zlib library not found
8315 If you have zlib already installed, see config.log for details on the
8316 failure.  It is possible the compiler isn't looking in the proper directory.
8317 Use --without-zlib to disable zlib support." "$LINENO" 5
8318 fi
8319
8320 fi
8321
8322 if test "$enable_spinlocks" = yes; then
8323
8324 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
8325
8326 else
8327   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
8328 *** Not using spinlocks will cause poor performance." >&5
8329 $as_echo "$as_me: WARNING:
8330 *** Not using spinlocks will cause poor performance." >&2;}
8331 fi
8332
8333 if test "$with_gssapi" = yes ; then
8334   if test "$PORTNAME" != "win32"; then
8335     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
8336 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
8337 if ${ac_cv_search_gss_init_sec_context+:} false; then :
8338   $as_echo_n "(cached) " >&6
8339 else
8340   ac_func_search_save_LIBS=$LIBS
8341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8342 /* end confdefs.h.  */
8343
8344 /* Override any GCC internal prototype to avoid an error.
8345    Use char because int might match the return type of a GCC
8346    builtin and then its argument prototype would still apply.  */
8347 #ifdef __cplusplus
8348 extern "C"
8349 #endif
8350 char gss_init_sec_context ();
8351 int
8352 main ()
8353 {
8354 return gss_init_sec_context ();
8355   ;
8356   return 0;
8357 }
8358 _ACEOF
8359 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
8360   if test -z "$ac_lib"; then
8361     ac_res="none required"
8362   else
8363     ac_res=-l$ac_lib
8364     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8365   fi
8366   if ac_fn_c_try_link "$LINENO"; then :
8367   ac_cv_search_gss_init_sec_context=$ac_res
8368 fi
8369 rm -f core conftest.err conftest.$ac_objext \
8370     conftest$ac_exeext
8371   if ${ac_cv_search_gss_init_sec_context+:} false; then :
8372   break
8373 fi
8374 done
8375 if ${ac_cv_search_gss_init_sec_context+:} false; then :
8376
8377 else
8378   ac_cv_search_gss_init_sec_context=no
8379 fi
8380 rm conftest.$ac_ext
8381 LIBS=$ac_func_search_save_LIBS
8382 fi
8383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
8384 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
8385 ac_res=$ac_cv_search_gss_init_sec_context
8386 if test "$ac_res" != no; then :
8387   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8388
8389 else
8390   as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
8391 fi
8392
8393   else
8394     LIBS="$LIBS -lgssapi32"
8395   fi
8396 fi
8397
8398 if test "$with_krb5" = yes ; then
8399   if test "$PORTNAME" != "win32"; then
8400      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing com_err" >&5
8401 $as_echo_n "checking for library containing com_err... " >&6; }
8402 if ${ac_cv_search_com_err+:} false; then :
8403   $as_echo_n "(cached) " >&6
8404 else
8405   ac_func_search_save_LIBS=$LIBS
8406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8407 /* end confdefs.h.  */
8408
8409 /* Override any GCC internal prototype to avoid an error.
8410    Use char because int might match the return type of a GCC
8411    builtin and then its argument prototype would still apply.  */
8412 #ifdef __cplusplus
8413 extern "C"
8414 #endif
8415 char com_err ();
8416 int
8417 main ()
8418 {
8419 return com_err ();
8420   ;
8421   return 0;
8422 }
8423 _ACEOF
8424 for ac_lib in '' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken' com_err 'com_err -lssl -lcrypto'; do
8425   if test -z "$ac_lib"; then
8426     ac_res="none required"
8427   else
8428     ac_res=-l$ac_lib
8429     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8430   fi
8431   if ac_fn_c_try_link "$LINENO"; then :
8432   ac_cv_search_com_err=$ac_res
8433 fi
8434 rm -f core conftest.err conftest.$ac_objext \
8435     conftest$ac_exeext
8436   if ${ac_cv_search_com_err+:} false; then :
8437   break
8438 fi
8439 done
8440 if ${ac_cv_search_com_err+:} false; then :
8441
8442 else
8443   ac_cv_search_com_err=no
8444 fi
8445 rm conftest.$ac_ext
8446 LIBS=$ac_func_search_save_LIBS
8447 fi
8448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_com_err" >&5
8449 $as_echo "$ac_cv_search_com_err" >&6; }
8450 ac_res=$ac_cv_search_com_err
8451 if test "$ac_res" != no; then :
8452   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8453
8454 else
8455   as_fn_error $? "could not find function 'com_err' required for Kerberos 5" "$LINENO" 5
8456 fi
8457
8458      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing krb5_sendauth" >&5
8459 $as_echo_n "checking for library containing krb5_sendauth... " >&6; }
8460 if ${ac_cv_search_krb5_sendauth+:} false; then :
8461   $as_echo_n "(cached) " >&6
8462 else
8463   ac_func_search_save_LIBS=$LIBS
8464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8465 /* end confdefs.h.  */
8466
8467 /* Override any GCC internal prototype to avoid an error.
8468    Use char because int might match the return type of a GCC
8469    builtin and then its argument prototype would still apply.  */
8470 #ifdef __cplusplus
8471 extern "C"
8472 #endif
8473 char krb5_sendauth ();
8474 int
8475 main ()
8476 {
8477 return krb5_sendauth ();
8478   ;
8479   return 0;
8480 }
8481 _ACEOF
8482 for ac_lib in '' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'; do
8483   if test -z "$ac_lib"; then
8484     ac_res="none required"
8485   else
8486     ac_res=-l$ac_lib
8487     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8488   fi
8489   if ac_fn_c_try_link "$LINENO"; then :
8490   ac_cv_search_krb5_sendauth=$ac_res
8491 fi
8492 rm -f core conftest.err conftest.$ac_objext \
8493     conftest$ac_exeext
8494   if ${ac_cv_search_krb5_sendauth+:} false; then :
8495   break
8496 fi
8497 done
8498 if ${ac_cv_search_krb5_sendauth+:} false; then :
8499
8500 else
8501   ac_cv_search_krb5_sendauth=no
8502 fi
8503 rm conftest.$ac_ext
8504 LIBS=$ac_func_search_save_LIBS
8505 fi
8506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_krb5_sendauth" >&5
8507 $as_echo "$ac_cv_search_krb5_sendauth" >&6; }
8508 ac_res=$ac_cv_search_krb5_sendauth
8509 if test "$ac_res" != no; then :
8510   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8511
8512 else
8513   as_fn_error $? "could not find function 'krb5_sendauth' required for Kerberos 5" "$LINENO" 5
8514 fi
8515
8516   else
8517      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing com_err" >&5
8518 $as_echo_n "checking for library containing com_err... " >&6; }
8519 if ${ac_cv_search_com_err+:} false; then :
8520   $as_echo_n "(cached) " >&6
8521 else
8522   ac_func_search_save_LIBS=$LIBS
8523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8524 /* end confdefs.h.  */
8525
8526 /* Override any GCC internal prototype to avoid an error.
8527    Use char because int might match the return type of a GCC
8528    builtin and then its argument prototype would still apply.  */
8529 #ifdef __cplusplus
8530 extern "C"
8531 #endif
8532 char com_err ();
8533 int
8534 main ()
8535 {
8536 return com_err ();
8537   ;
8538   return 0;
8539 }
8540 _ACEOF
8541 for ac_lib in '' 'comerr32 -lkrb5_32'; do
8542   if test -z "$ac_lib"; then
8543     ac_res="none required"
8544   else
8545     ac_res=-l$ac_lib
8546     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8547   fi
8548   if ac_fn_c_try_link "$LINENO"; then :
8549   ac_cv_search_com_err=$ac_res
8550 fi
8551 rm -f core conftest.err conftest.$ac_objext \
8552     conftest$ac_exeext
8553   if ${ac_cv_search_com_err+:} false; then :
8554   break
8555 fi
8556 done
8557 if ${ac_cv_search_com_err+:} false; then :
8558
8559 else
8560   ac_cv_search_com_err=no
8561 fi
8562 rm conftest.$ac_ext
8563 LIBS=$ac_func_search_save_LIBS
8564 fi
8565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_com_err" >&5
8566 $as_echo "$ac_cv_search_com_err" >&6; }
8567 ac_res=$ac_cv_search_com_err
8568 if test "$ac_res" != no; then :
8569   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8570
8571 else
8572   as_fn_error $? "could not find function 'com_err' required for Kerberos 5" "$LINENO" 5
8573 fi
8574
8575   fi
8576 fi
8577
8578 if test "$with_openssl" = yes ; then
8579     if test "$PORTNAME" != "win32"; then
8580      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
8581 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
8582 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
8583   $as_echo_n "(cached) " >&6
8584 else
8585   ac_check_lib_save_LIBS=$LIBS
8586 LIBS="-lcrypto  $LIBS"
8587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8588 /* end confdefs.h.  */
8589
8590 /* Override any GCC internal prototype to avoid an error.
8591    Use char because int might match the return type of a GCC
8592    builtin and then its argument prototype would still apply.  */
8593 #ifdef __cplusplus
8594 extern "C"
8595 #endif
8596 char CRYPTO_new_ex_data ();
8597 int
8598 main ()
8599 {
8600 return CRYPTO_new_ex_data ();
8601   ;
8602   return 0;
8603 }
8604 _ACEOF
8605 if ac_fn_c_try_link "$LINENO"; then :
8606   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
8607 else
8608   ac_cv_lib_crypto_CRYPTO_new_ex_data=no
8609 fi
8610 rm -f core conftest.err conftest.$ac_objext \
8611     conftest$ac_exeext conftest.$ac_ext
8612 LIBS=$ac_check_lib_save_LIBS
8613 fi
8614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
8615 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
8616 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
8617   cat >>confdefs.h <<_ACEOF
8618 #define HAVE_LIBCRYPTO 1
8619 _ACEOF
8620
8621   LIBS="-lcrypto $LIBS"
8622
8623 else
8624   as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
8625 fi
8626
8627      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5
8628 $as_echo_n "checking for SSL_library_init in -lssl... " >&6; }
8629 if ${ac_cv_lib_ssl_SSL_library_init+:} false; then :
8630   $as_echo_n "(cached) " >&6
8631 else
8632   ac_check_lib_save_LIBS=$LIBS
8633 LIBS="-lssl  $LIBS"
8634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8635 /* end confdefs.h.  */
8636
8637 /* Override any GCC internal prototype to avoid an error.
8638    Use char because int might match the return type of a GCC
8639    builtin and then its argument prototype would still apply.  */
8640 #ifdef __cplusplus
8641 extern "C"
8642 #endif
8643 char SSL_library_init ();
8644 int
8645 main ()
8646 {
8647 return SSL_library_init ();
8648   ;
8649   return 0;
8650 }
8651 _ACEOF
8652 if ac_fn_c_try_link "$LINENO"; then :
8653   ac_cv_lib_ssl_SSL_library_init=yes
8654 else
8655   ac_cv_lib_ssl_SSL_library_init=no
8656 fi
8657 rm -f core conftest.err conftest.$ac_objext \
8658     conftest$ac_exeext conftest.$ac_ext
8659 LIBS=$ac_check_lib_save_LIBS
8660 fi
8661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_library_init" >&5
8662 $as_echo "$ac_cv_lib_ssl_SSL_library_init" >&6; }
8663 if test "x$ac_cv_lib_ssl_SSL_library_init" = xyes; then :
8664   cat >>confdefs.h <<_ACEOF
8665 #define HAVE_LIBSSL 1
8666 _ACEOF
8667
8668   LIBS="-lssl $LIBS"
8669
8670 else
8671   as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
8672 fi
8673
8674   else
8675      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
8676 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
8677 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
8678   $as_echo_n "(cached) " >&6
8679 else
8680   ac_func_search_save_LIBS=$LIBS
8681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8682 /* end confdefs.h.  */
8683
8684 /* Override any GCC internal prototype to avoid an error.
8685    Use char because int might match the return type of a GCC
8686    builtin and then its argument prototype would still apply.  */
8687 #ifdef __cplusplus
8688 extern "C"
8689 #endif
8690 char CRYPTO_new_ex_data ();
8691 int
8692 main ()
8693 {
8694 return CRYPTO_new_ex_data ();
8695   ;
8696   return 0;
8697 }
8698 _ACEOF
8699 for ac_lib in '' eay32 crypto; do
8700   if test -z "$ac_lib"; then
8701     ac_res="none required"
8702   else
8703     ac_res=-l$ac_lib
8704     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8705   fi
8706   if ac_fn_c_try_link "$LINENO"; then :
8707   ac_cv_search_CRYPTO_new_ex_data=$ac_res
8708 fi
8709 rm -f core conftest.err conftest.$ac_objext \
8710     conftest$ac_exeext
8711   if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
8712   break
8713 fi
8714 done
8715 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
8716
8717 else
8718   ac_cv_search_CRYPTO_new_ex_data=no
8719 fi
8720 rm conftest.$ac_ext
8721 LIBS=$ac_func_search_save_LIBS
8722 fi
8723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
8724 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
8725 ac_res=$ac_cv_search_CRYPTO_new_ex_data
8726 if test "$ac_res" != no; then :
8727   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8728
8729 else
8730   as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
8731 fi
8732
8733      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_library_init" >&5
8734 $as_echo_n "checking for library containing SSL_library_init... " >&6; }
8735 if ${ac_cv_search_SSL_library_init+:} false; then :
8736   $as_echo_n "(cached) " >&6
8737 else
8738   ac_func_search_save_LIBS=$LIBS
8739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8740 /* end confdefs.h.  */
8741
8742 /* Override any GCC internal prototype to avoid an error.
8743    Use char because int might match the return type of a GCC
8744    builtin and then its argument prototype would still apply.  */
8745 #ifdef __cplusplus
8746 extern "C"
8747 #endif
8748 char SSL_library_init ();
8749 int
8750 main ()
8751 {
8752 return SSL_library_init ();
8753   ;
8754   return 0;
8755 }
8756 _ACEOF
8757 for ac_lib in '' ssleay32 ssl; do
8758   if test -z "$ac_lib"; then
8759     ac_res="none required"
8760   else
8761     ac_res=-l$ac_lib
8762     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8763   fi
8764   if ac_fn_c_try_link "$LINENO"; then :
8765   ac_cv_search_SSL_library_init=$ac_res
8766 fi
8767 rm -f core conftest.err conftest.$ac_objext \
8768     conftest$ac_exeext
8769   if ${ac_cv_search_SSL_library_init+:} false; then :
8770   break
8771 fi
8772 done
8773 if ${ac_cv_search_SSL_library_init+:} false; then :
8774
8775 else
8776   ac_cv_search_SSL_library_init=no
8777 fi
8778 rm conftest.$ac_ext
8779 LIBS=$ac_func_search_save_LIBS
8780 fi
8781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_library_init" >&5
8782 $as_echo "$ac_cv_search_SSL_library_init" >&6; }
8783 ac_res=$ac_cv_search_SSL_library_init
8784 if test "$ac_res" != no; then :
8785   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8786
8787 else
8788   as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
8789 fi
8790
8791   fi
8792 fi
8793
8794 if test "$with_pam" = yes ; then
8795   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
8796 $as_echo_n "checking for pam_start in -lpam... " >&6; }
8797 if ${ac_cv_lib_pam_pam_start+:} false; then :
8798   $as_echo_n "(cached) " >&6
8799 else
8800   ac_check_lib_save_LIBS=$LIBS
8801 LIBS="-lpam  $LIBS"
8802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8803 /* end confdefs.h.  */
8804
8805 /* Override any GCC internal prototype to avoid an error.
8806    Use char because int might match the return type of a GCC
8807    builtin and then its argument prototype would still apply.  */
8808 #ifdef __cplusplus
8809 extern "C"
8810 #endif
8811 char pam_start ();
8812 int
8813 main ()
8814 {
8815 return pam_start ();
8816   ;
8817   return 0;
8818 }
8819 _ACEOF
8820 if ac_fn_c_try_link "$LINENO"; then :
8821   ac_cv_lib_pam_pam_start=yes
8822 else
8823   ac_cv_lib_pam_pam_start=no
8824 fi
8825 rm -f core conftest.err conftest.$ac_objext \
8826     conftest$ac_exeext conftest.$ac_ext
8827 LIBS=$ac_check_lib_save_LIBS
8828 fi
8829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
8830 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
8831 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
8832   cat >>confdefs.h <<_ACEOF
8833 #define HAVE_LIBPAM 1
8834 _ACEOF
8835
8836   LIBS="-lpam $LIBS"
8837
8838 else
8839   as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
8840 fi
8841
8842 fi
8843
8844 if test "$with_libxml" = yes ; then
8845   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
8846 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
8847 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
8848   $as_echo_n "(cached) " >&6
8849 else
8850   ac_check_lib_save_LIBS=$LIBS
8851 LIBS="-lxml2  $LIBS"
8852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8853 /* end confdefs.h.  */
8854
8855 /* Override any GCC internal prototype to avoid an error.
8856    Use char because int might match the return type of a GCC
8857    builtin and then its argument prototype would still apply.  */
8858 #ifdef __cplusplus
8859 extern "C"
8860 #endif
8861 char xmlSaveToBuffer ();
8862 int
8863 main ()
8864 {
8865 return xmlSaveToBuffer ();
8866   ;
8867   return 0;
8868 }
8869 _ACEOF
8870 if ac_fn_c_try_link "$LINENO"; then :
8871   ac_cv_lib_xml2_xmlSaveToBuffer=yes
8872 else
8873   ac_cv_lib_xml2_xmlSaveToBuffer=no
8874 fi
8875 rm -f core conftest.err conftest.$ac_objext \
8876     conftest$ac_exeext conftest.$ac_ext
8877 LIBS=$ac_check_lib_save_LIBS
8878 fi
8879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
8880 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
8881 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
8882   cat >>confdefs.h <<_ACEOF
8883 #define HAVE_LIBXML2 1
8884 _ACEOF
8885
8886   LIBS="-lxml2 $LIBS"
8887
8888 else
8889   as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
8890 fi
8891
8892 fi
8893
8894 if test "$with_libxslt" = yes ; then
8895   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
8896 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
8897 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
8898   $as_echo_n "(cached) " >&6
8899 else
8900   ac_check_lib_save_LIBS=$LIBS
8901 LIBS="-lxslt  $LIBS"
8902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8903 /* end confdefs.h.  */
8904
8905 /* Override any GCC internal prototype to avoid an error.
8906    Use char because int might match the return type of a GCC
8907    builtin and then its argument prototype would still apply.  */
8908 #ifdef __cplusplus
8909 extern "C"
8910 #endif
8911 char xsltCleanupGlobals ();
8912 int
8913 main ()
8914 {
8915 return xsltCleanupGlobals ();
8916   ;
8917   return 0;
8918 }
8919 _ACEOF
8920 if ac_fn_c_try_link "$LINENO"; then :
8921   ac_cv_lib_xslt_xsltCleanupGlobals=yes
8922 else
8923   ac_cv_lib_xslt_xsltCleanupGlobals=no
8924 fi
8925 rm -f core conftest.err conftest.$ac_objext \
8926     conftest$ac_exeext conftest.$ac_ext
8927 LIBS=$ac_check_lib_save_LIBS
8928 fi
8929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
8930 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
8931 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
8932   cat >>confdefs.h <<_ACEOF
8933 #define HAVE_LIBXSLT 1
8934 _ACEOF
8935
8936   LIBS="-lxslt $LIBS"
8937
8938 else
8939   as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
8940 fi
8941
8942 fi
8943
8944 # for contrib/sepgsql
8945 if test "$with_selinux" = yes; then
8946   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
8947 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
8948 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
8949   $as_echo_n "(cached) " >&6
8950 else
8951   ac_check_lib_save_LIBS=$LIBS
8952 LIBS="-lselinux  $LIBS"
8953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8954 /* end confdefs.h.  */
8955
8956 /* Override any GCC internal prototype to avoid an error.
8957    Use char because int might match the return type of a GCC
8958    builtin and then its argument prototype would still apply.  */
8959 #ifdef __cplusplus
8960 extern "C"
8961 #endif
8962 char security_compute_create_name ();
8963 int
8964 main ()
8965 {
8966 return security_compute_create_name ();
8967   ;
8968   return 0;
8969 }
8970 _ACEOF
8971 if ac_fn_c_try_link "$LINENO"; then :
8972   ac_cv_lib_selinux_security_compute_create_name=yes
8973 else
8974   ac_cv_lib_selinux_security_compute_create_name=no
8975 fi
8976 rm -f core conftest.err conftest.$ac_objext \
8977     conftest$ac_exeext conftest.$ac_ext
8978 LIBS=$ac_check_lib_save_LIBS
8979 fi
8980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
8981 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
8982 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
8983   cat >>confdefs.h <<_ACEOF
8984 #define HAVE_LIBSELINUX 1
8985 _ACEOF
8986
8987   LIBS="-lselinux $LIBS"
8988
8989 else
8990   as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
8991 fi
8992
8993 fi
8994
8995 # for contrib/uuid-ossp
8996 if test "$with_ossp_uuid" = yes ; then
8997   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
8998 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
8999 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
9000   $as_echo_n "(cached) " >&6
9001 else
9002   ac_check_lib_save_LIBS=$LIBS
9003 LIBS="-lossp-uuid  $LIBS"
9004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9005 /* end confdefs.h.  */
9006
9007 /* Override any GCC internal prototype to avoid an error.
9008    Use char because int might match the return type of a GCC
9009    builtin and then its argument prototype would still apply.  */
9010 #ifdef __cplusplus
9011 extern "C"
9012 #endif
9013 char uuid_export ();
9014 int
9015 main ()
9016 {
9017 return uuid_export ();
9018   ;
9019   return 0;
9020 }
9021 _ACEOF
9022 if ac_fn_c_try_link "$LINENO"; then :
9023   ac_cv_lib_ossp_uuid_uuid_export=yes
9024 else
9025   ac_cv_lib_ossp_uuid_uuid_export=no
9026 fi
9027 rm -f core conftest.err conftest.$ac_objext \
9028     conftest$ac_exeext conftest.$ac_ext
9029 LIBS=$ac_check_lib_save_LIBS
9030 fi
9031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
9032 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
9033 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
9034   OSSP_UUID_LIBS="-lossp-uuid"
9035 else
9036   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
9037 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
9038 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
9039   $as_echo_n "(cached) " >&6
9040 else
9041   ac_check_lib_save_LIBS=$LIBS
9042 LIBS="-luuid  $LIBS"
9043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9044 /* end confdefs.h.  */
9045
9046 /* Override any GCC internal prototype to avoid an error.
9047    Use char because int might match the return type of a GCC
9048    builtin and then its argument prototype would still apply.  */
9049 #ifdef __cplusplus
9050 extern "C"
9051 #endif
9052 char uuid_export ();
9053 int
9054 main ()
9055 {
9056 return uuid_export ();
9057   ;
9058   return 0;
9059 }
9060 _ACEOF
9061 if ac_fn_c_try_link "$LINENO"; then :
9062   ac_cv_lib_uuid_uuid_export=yes
9063 else
9064   ac_cv_lib_uuid_uuid_export=no
9065 fi
9066 rm -f core conftest.err conftest.$ac_objext \
9067     conftest$ac_exeext conftest.$ac_ext
9068 LIBS=$ac_check_lib_save_LIBS
9069 fi
9070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
9071 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
9072 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
9073   OSSP_UUID_LIBS="-luuid"
9074 else
9075   as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP-UUID" "$LINENO" 5
9076 fi
9077
9078 fi
9079
9080 fi
9081
9082
9083
9084 ##
9085 ## Header files
9086 ##
9087
9088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
9089 $as_echo_n "checking for ANSI C header files... " >&6; }
9090 if ${ac_cv_header_stdc+:} false; then :
9091   $as_echo_n "(cached) " >&6
9092 else
9093   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9094 /* end confdefs.h.  */
9095 #include <stdlib.h>
9096 #include <stdarg.h>
9097 #include <string.h>
9098 #include <float.h>
9099
9100 int
9101 main ()
9102 {
9103
9104   ;
9105   return 0;
9106 }
9107 _ACEOF
9108 if ac_fn_c_try_compile "$LINENO"; then :
9109   ac_cv_header_stdc=yes
9110 else
9111   ac_cv_header_stdc=no
9112 fi
9113 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9114
9115 if test $ac_cv_header_stdc = yes; then
9116   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9117   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9118 /* end confdefs.h.  */
9119 #include <string.h>
9120
9121 _ACEOF
9122 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9123   $EGREP "memchr" >/dev/null 2>&1; then :
9124
9125 else
9126   ac_cv_header_stdc=no
9127 fi
9128 rm -f conftest*
9129
9130 fi
9131
9132 if test $ac_cv_header_stdc = yes; then
9133   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9134   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9135 /* end confdefs.h.  */
9136 #include <stdlib.h>
9137
9138 _ACEOF
9139 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9140   $EGREP "free" >/dev/null 2>&1; then :
9141
9142 else
9143   ac_cv_header_stdc=no
9144 fi
9145 rm -f conftest*
9146
9147 fi
9148
9149 if test $ac_cv_header_stdc = yes; then
9150   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9151   if test "$cross_compiling" = yes; then :
9152   :
9153 else
9154   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9155 /* end confdefs.h.  */
9156 #include <ctype.h>
9157 #include <stdlib.h>
9158 #if ((' ' & 0x0FF) == 0x020)
9159 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9160 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9161 #else
9162 # define ISLOWER(c) \
9163                    (('a' <= (c) && (c) <= 'i') \
9164                      || ('j' <= (c) && (c) <= 'r') \
9165                      || ('s' <= (c) && (c) <= 'z'))
9166 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9167 #endif
9168
9169 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9170 int
9171 main ()
9172 {
9173   int i;
9174   for (i = 0; i < 256; i++)
9175     if (XOR (islower (i), ISLOWER (i))
9176         || toupper (i) != TOUPPER (i))
9177       return 2;
9178   return 0;
9179 }
9180 _ACEOF
9181 if ac_fn_c_try_run "$LINENO"; then :
9182
9183 else
9184   ac_cv_header_stdc=no
9185 fi
9186 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9187   conftest.$ac_objext conftest.beam conftest.$ac_ext
9188 fi
9189
9190 fi
9191 fi
9192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
9193 $as_echo "$ac_cv_header_stdc" >&6; }
9194 if test $ac_cv_header_stdc = yes; then
9195
9196 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
9197
9198 fi
9199
9200 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
9201 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
9202                   inttypes.h stdint.h unistd.h
9203 do :
9204   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9205 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
9206 "
9207 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9208   cat >>confdefs.h <<_ACEOF
9209 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9210 _ACEOF
9211
9212 fi
9213
9214 done
9215
9216
9217 for ac_header in crypt.h dld.h fp_class.h getopt.h ieeefp.h ifaddrs.h langinfo.h poll.h pwd.h sys/ioctl.h sys/ipc.h sys/poll.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/socket.h sys/sockio.h sys/tas.h sys/time.h sys/un.h termios.h ucred.h utime.h wchar.h wctype.h
9218 do :
9219   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9220 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9221 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9222   cat >>confdefs.h <<_ACEOF
9223 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9224 _ACEOF
9225
9226 fi
9227
9228 done
9229
9230
9231 # On BSD, test for net/if.h will fail unless sys/socket.h
9232 # is included first.
9233 for ac_header in net/if.h
9234 do :
9235   ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
9236 #ifdef HAVE_SYS_SOCKET_H
9237 #include <sys/socket.h>
9238 #endif
9239
9240 "
9241 if test "x$ac_cv_header_net_if_h" = xyes; then :
9242   cat >>confdefs.h <<_ACEOF
9243 #define HAVE_NET_IF_H 1
9244 _ACEOF
9245
9246 fi
9247
9248 done
9249
9250
9251 # On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
9252 # is included first.
9253 for ac_header in sys/ucred.h
9254 do :
9255   ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
9256 #include <sys/param.h>
9257
9258 "
9259 if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
9260   cat >>confdefs.h <<_ACEOF
9261 #define HAVE_SYS_UCRED_H 1
9262 _ACEOF
9263
9264 fi
9265
9266 done
9267
9268
9269 # At least on IRIX, test for netinet/tcp.h will fail unless
9270 # netinet/in.h is included first.
9271 for ac_header in netinet/in.h
9272 do :
9273   ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
9274 if test "x$ac_cv_header_netinet_in_h" = xyes; then :
9275   cat >>confdefs.h <<_ACEOF
9276 #define HAVE_NETINET_IN_H 1
9277 _ACEOF
9278
9279 fi
9280
9281 done
9282
9283 for ac_header in netinet/tcp.h
9284 do :
9285   ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
9286 #ifdef HAVE_NETINET_IN_H
9287 #include <netinet/in.h>
9288 #endif
9289
9290 "
9291 if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
9292   cat >>confdefs.h <<_ACEOF
9293 #define HAVE_NETINET_TCP_H 1
9294 _ACEOF
9295
9296 fi
9297
9298 done
9299
9300
9301 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
9302   for ac_header in readline/readline.h
9303 do :
9304   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
9305 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
9306   cat >>confdefs.h <<_ACEOF
9307 #define HAVE_READLINE_READLINE_H 1
9308 _ACEOF
9309
9310 else
9311   for ac_header in readline.h
9312 do :
9313   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
9314 if test "x$ac_cv_header_readline_h" = xyes; then :
9315   cat >>confdefs.h <<_ACEOF
9316 #define HAVE_READLINE_H 1
9317 _ACEOF
9318
9319 else
9320   as_fn_error $? "readline header not found
9321 If you have readline already installed, see config.log for details on the
9322 failure.  It is possible the compiler isn't looking in the proper directory.
9323 Use --without-readline to disable readline support." "$LINENO" 5
9324 fi
9325
9326 done
9327
9328 fi
9329
9330 done
9331
9332   for ac_header in readline/history.h
9333 do :
9334   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
9335 if test "x$ac_cv_header_readline_history_h" = xyes; then :
9336   cat >>confdefs.h <<_ACEOF
9337 #define HAVE_READLINE_HISTORY_H 1
9338 _ACEOF
9339
9340 else
9341   for ac_header in history.h
9342 do :
9343   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
9344 if test "x$ac_cv_header_history_h" = xyes; then :
9345   cat >>confdefs.h <<_ACEOF
9346 #define HAVE_HISTORY_H 1
9347 _ACEOF
9348
9349 else
9350   as_fn_error $? "history header not found
9351 If you have readline already installed, see config.log for details on the
9352 failure.  It is possible the compiler isn't looking in the proper directory.
9353 Use --without-readline to disable readline support." "$LINENO" 5
9354 fi
9355
9356 done
9357
9358 fi
9359
9360 done
9361
9362 fi
9363
9364 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
9365 # Some installations of libedit usurp /usr/include/readline/, which seems
9366 # bad practice, since in combined installations readline will have its headers
9367 # there.  We might have to resort to AC_EGREP checks to make sure we found
9368 # the proper header...
9369   for ac_header in editline/readline.h
9370 do :
9371   ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
9372 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
9373   cat >>confdefs.h <<_ACEOF
9374 #define HAVE_EDITLINE_READLINE_H 1
9375 _ACEOF
9376
9377 else
9378   for ac_header in readline.h
9379 do :
9380   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
9381 if test "x$ac_cv_header_readline_h" = xyes; then :
9382   cat >>confdefs.h <<_ACEOF
9383 #define HAVE_READLINE_H 1
9384 _ACEOF
9385
9386 else
9387   for ac_header in readline/readline.h
9388 do :
9389   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
9390 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
9391   cat >>confdefs.h <<_ACEOF
9392 #define HAVE_READLINE_READLINE_H 1
9393 _ACEOF
9394
9395 else
9396   as_fn_error $? "readline header not found
9397 If you have libedit already installed, see config.log for details on the
9398 failure.  It is possible the compiler isn't looking in the proper directory.
9399 Use --without-readline to disable libedit support." "$LINENO" 5
9400 fi
9401
9402 done
9403
9404 fi
9405
9406 done
9407
9408 fi
9409
9410 done
9411
9412 # Note: in a libedit installation, history.h is sometimes a dummy, and may
9413 # not be there at all.  Hence, don't complain if not found.  We must check
9414 # though, since in yet other versions it is an independent header.
9415   for ac_header in editline/history.h
9416 do :
9417   ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
9418 if test "x$ac_cv_header_editline_history_h" = xyes; then :
9419   cat >>confdefs.h <<_ACEOF
9420 #define HAVE_EDITLINE_HISTORY_H 1
9421 _ACEOF
9422
9423 else
9424   for ac_header in history.h
9425 do :
9426   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
9427 if test "x$ac_cv_header_history_h" = xyes; then :
9428   cat >>confdefs.h <<_ACEOF
9429 #define HAVE_HISTORY_H 1
9430 _ACEOF
9431
9432 else
9433   for ac_header in readline/history.h
9434 do :
9435   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
9436 if test "x$ac_cv_header_readline_history_h" = xyes; then :
9437   cat >>confdefs.h <<_ACEOF
9438 #define HAVE_READLINE_HISTORY_H 1
9439 _ACEOF
9440
9441 fi
9442
9443 done
9444
9445 fi
9446
9447 done
9448
9449 fi
9450
9451 done
9452
9453 fi
9454
9455 if test "$with_zlib" = yes; then
9456   ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
9457 if test "x$ac_cv_header_zlib_h" = xyes; then :
9458
9459 else
9460   as_fn_error $? "zlib header not found
9461 If you have zlib already installed, see config.log for details on the
9462 failure.  It is possible the compiler isn't looking in the proper directory.
9463 Use --without-zlib to disable zlib support." "$LINENO" 5
9464 fi
9465
9466
9467 fi
9468
9469 if test "$with_gssapi" = yes ; then
9470   for ac_header in gssapi/gssapi.h
9471 do :
9472   ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
9473 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
9474   cat >>confdefs.h <<_ACEOF
9475 #define HAVE_GSSAPI_GSSAPI_H 1
9476 _ACEOF
9477
9478 else
9479   for ac_header in gssapi.h
9480 do :
9481   ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
9482 if test "x$ac_cv_header_gssapi_h" = xyes; then :
9483   cat >>confdefs.h <<_ACEOF
9484 #define HAVE_GSSAPI_H 1
9485 _ACEOF
9486
9487 else
9488   as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
9489 fi
9490
9491 done
9492
9493 fi
9494
9495 done
9496
9497 fi
9498
9499 if test "$with_krb5" = yes ; then
9500   ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default"
9501 if test "x$ac_cv_header_krb5_h" = xyes; then :
9502
9503 else
9504   as_fn_error $? "header file <krb5.h> is required for Kerberos 5" "$LINENO" 5
9505 fi
9506
9507
9508 fi
9509
9510 if test "$with_openssl" = yes ; then
9511   ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
9512 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
9513
9514 else
9515   as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
9516 fi
9517
9518
9519   ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
9520 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
9521
9522 else
9523   as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
9524 fi
9525
9526
9527 fi
9528
9529 if test "$with_pam" = yes ; then
9530   for ac_header in security/pam_appl.h
9531 do :
9532   ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
9533 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
9534   cat >>confdefs.h <<_ACEOF
9535 #define HAVE_SECURITY_PAM_APPL_H 1
9536 _ACEOF
9537
9538 else
9539   for ac_header in pam/pam_appl.h
9540 do :
9541   ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
9542 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
9543   cat >>confdefs.h <<_ACEOF
9544 #define HAVE_PAM_PAM_APPL_H 1
9545 _ACEOF
9546
9547 else
9548   as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
9549 fi
9550
9551 done
9552
9553 fi
9554
9555 done
9556
9557 fi
9558
9559 if test "$with_libxml" = yes ; then
9560   ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
9561 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
9562
9563 else
9564   as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
9565 fi
9566
9567
9568 fi
9569
9570 if test "$with_libxslt" = yes ; then
9571   ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
9572 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
9573
9574 else
9575   as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
9576 fi
9577
9578
9579 fi
9580
9581 if test "$with_ldap" = yes ; then
9582   if test "$PORTNAME" != "win32"; then
9583      for ac_header in ldap.h
9584 do :
9585   ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
9586 if test "x$ac_cv_header_ldap_h" = xyes; then :
9587   cat >>confdefs.h <<_ACEOF
9588 #define HAVE_LDAP_H 1
9589 _ACEOF
9590
9591 else
9592   as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
9593 fi
9594
9595 done
9596
9597   else
9598      for ac_header in winldap.h
9599 do :
9600   ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
9601 #include <windows.h>
9602
9603 "
9604 if test "x$ac_cv_header_winldap_h" = xyes; then :
9605   cat >>confdefs.h <<_ACEOF
9606 #define HAVE_WINLDAP_H 1
9607 _ACEOF
9608
9609 else
9610   as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
9611 fi
9612
9613 done
9614
9615   fi
9616 fi
9617
9618 if test "$with_bonjour" = yes ; then
9619   ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
9620 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
9621
9622 else
9623   as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
9624 fi
9625
9626
9627 fi
9628
9629 # for contrib/uuid-ossp
9630 if test "$with_ossp_uuid" = yes ; then
9631   for ac_header in ossp/uuid.h
9632 do :
9633   ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
9634 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
9635   cat >>confdefs.h <<_ACEOF
9636 #define HAVE_OSSP_UUID_H 1
9637 _ACEOF
9638
9639 else
9640
9641     for ac_header in uuid.h
9642 do :
9643   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
9644 if test "x$ac_cv_header_uuid_h" = xyes; then :
9645   cat >>confdefs.h <<_ACEOF
9646 #define HAVE_UUID_H 1
9647 _ACEOF
9648
9649 else
9650   as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP-UUID" "$LINENO" 5
9651 fi
9652
9653 done
9654
9655 fi
9656
9657 done
9658
9659 fi
9660
9661 if test "$PORTNAME" = "win32" ; then
9662    for ac_header in crtdefs.h
9663 do :
9664   ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
9665 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
9666   cat >>confdefs.h <<_ACEOF
9667 #define HAVE_CRTDEFS_H 1
9668 _ACEOF
9669
9670 fi
9671
9672 done
9673
9674 fi
9675
9676 ##
9677 ## Types, structures, compiler characteristics
9678 ##
9679
9680   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
9681 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
9682 if ${ac_cv_c_bigendian+:} false; then :
9683   $as_echo_n "(cached) " >&6
9684 else
9685   ac_cv_c_bigendian=unknown
9686     # See if we're dealing with a universal compiler.
9687     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9688 /* end confdefs.h.  */
9689 #ifndef __APPLE_CC__
9690                not a universal capable compiler
9691              #endif
9692              typedef int dummy;
9693
9694 _ACEOF
9695 if ac_fn_c_try_compile "$LINENO"; then :
9696
9697         # Check for potential -arch flags.  It is not universal unless
9698         # there are at least two -arch flags with different values.
9699         ac_arch=
9700         ac_prev=
9701         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
9702          if test -n "$ac_prev"; then
9703            case $ac_word in
9704              i?86 | x86_64 | ppc | ppc64)
9705                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
9706                  ac_arch=$ac_word
9707                else
9708                  ac_cv_c_bigendian=universal
9709                  break
9710                fi
9711                ;;
9712            esac
9713            ac_prev=
9714          elif test "x$ac_word" = "x-arch"; then
9715            ac_prev=arch
9716          fi
9717        done
9718 fi
9719 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9720     if test $ac_cv_c_bigendian = unknown; then
9721       # See if sys/param.h defines the BYTE_ORDER macro.
9722       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9723 /* end confdefs.h.  */
9724 #include <sys/types.h>
9725              #include <sys/param.h>
9726
9727 int
9728 main ()
9729 {
9730 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
9731                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
9732                      && LITTLE_ENDIAN)
9733               bogus endian macros
9734              #endif
9735
9736   ;
9737   return 0;
9738 }
9739 _ACEOF
9740 if ac_fn_c_try_compile "$LINENO"; then :
9741   # It does; now see whether it defined to BIG_ENDIAN or not.
9742          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9743 /* end confdefs.h.  */
9744 #include <sys/types.h>
9745                 #include <sys/param.h>
9746
9747 int
9748 main ()
9749 {
9750 #if BYTE_ORDER != BIG_ENDIAN
9751                  not big endian
9752                 #endif
9753
9754   ;
9755   return 0;
9756 }
9757 _ACEOF
9758 if ac_fn_c_try_compile "$LINENO"; then :
9759   ac_cv_c_bigendian=yes
9760 else
9761   ac_cv_c_bigendian=no
9762 fi
9763 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9764 fi
9765 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9766     fi
9767     if test $ac_cv_c_bigendian = unknown; then
9768       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
9769       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9770 /* end confdefs.h.  */
9771 #include <limits.h>
9772
9773 int
9774 main ()
9775 {
9776 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
9777               bogus endian macros
9778              #endif
9779
9780   ;
9781   return 0;
9782 }
9783 _ACEOF
9784 if ac_fn_c_try_compile "$LINENO"; then :
9785   # It does; now see whether it defined to _BIG_ENDIAN or not.
9786          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9787 /* end confdefs.h.  */
9788 #include <limits.h>
9789
9790 int
9791 main ()
9792 {
9793 #ifndef _BIG_ENDIAN
9794                  not big endian
9795                 #endif
9796
9797   ;
9798   return 0;
9799 }
9800 _ACEOF
9801 if ac_fn_c_try_compile "$LINENO"; then :
9802   ac_cv_c_bigendian=yes
9803 else
9804   ac_cv_c_bigendian=no
9805 fi
9806 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9807 fi
9808 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9809     fi
9810     if test $ac_cv_c_bigendian = unknown; then
9811       # Compile a test program.
9812       if test "$cross_compiling" = yes; then :
9813   # Try to guess by grepping values from an object file.
9814          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9815 /* end confdefs.h.  */
9816 short int ascii_mm[] =
9817                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
9818                 short int ascii_ii[] =
9819                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9820                 int use_ascii (int i) {
9821                   return ascii_mm[i] + ascii_ii[i];
9822                 }
9823                 short int ebcdic_ii[] =
9824                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
9825                 short int ebcdic_mm[] =
9826                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9827                 int use_ebcdic (int i) {
9828                   return ebcdic_mm[i] + ebcdic_ii[i];
9829                 }
9830                 extern int foo;
9831
9832 int
9833 main ()
9834 {
9835 return use_ascii (foo) == use_ebcdic (foo);
9836   ;
9837   return 0;
9838 }
9839 _ACEOF
9840 if ac_fn_c_try_compile "$LINENO"; then :
9841   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
9842               ac_cv_c_bigendian=yes
9843             fi
9844             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
9845               if test "$ac_cv_c_bigendian" = unknown; then
9846                 ac_cv_c_bigendian=no
9847               else
9848                 # finding both strings is unlikely to happen, but who knows?
9849                 ac_cv_c_bigendian=unknown
9850               fi
9851             fi
9852 fi
9853 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9854 else
9855   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9856 /* end confdefs.h.  */
9857 $ac_includes_default
9858 int
9859 main ()
9860 {
9861
9862              /* Are we little or big endian?  From Harbison&Steele.  */
9863              union
9864              {
9865                long int l;
9866                char c[sizeof (long int)];
9867              } u;
9868              u.l = 1;
9869              return u.c[sizeof (long int) - 1] == 1;
9870
9871   ;
9872   return 0;
9873 }
9874 _ACEOF
9875 if ac_fn_c_try_run "$LINENO"; then :
9876   ac_cv_c_bigendian=no
9877 else
9878   ac_cv_c_bigendian=yes
9879 fi
9880 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9881   conftest.$ac_objext conftest.beam conftest.$ac_ext
9882 fi
9883
9884     fi
9885 fi
9886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
9887 $as_echo "$ac_cv_c_bigendian" >&6; }
9888  case $ac_cv_c_bigendian in #(
9889    yes)
9890      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
9891 ;; #(
9892    no)
9893       ;; #(
9894    universal)
9895
9896 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
9897
9898      ;; #(
9899    *)
9900      as_fn_error $? "unknown endianness
9901  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
9902  esac
9903
9904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
9905 $as_echo_n "checking for inline... " >&6; }
9906 if ${ac_cv_c_inline+:} false; then :
9907   $as_echo_n "(cached) " >&6
9908 else
9909   ac_cv_c_inline=no
9910 for ac_kw in inline __inline__ __inline; do
9911   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9912 /* end confdefs.h.  */
9913 #ifndef __cplusplus
9914 typedef int foo_t;
9915 static $ac_kw foo_t static_foo () {return 0; }
9916 $ac_kw foo_t foo () {return 0; }
9917 #endif
9918
9919 _ACEOF
9920 if ac_fn_c_try_compile "$LINENO"; then :
9921   ac_cv_c_inline=$ac_kw
9922 fi
9923 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9924   test "$ac_cv_c_inline" != no && break
9925 done
9926
9927 fi
9928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
9929 $as_echo "$ac_cv_c_inline" >&6; }
9930
9931 case $ac_cv_c_inline in
9932   inline | yes) ;;
9933   *)
9934     case $ac_cv_c_inline in
9935       no) ac_val=;;
9936       *) ac_val=$ac_cv_c_inline;;
9937     esac
9938     cat >>confdefs.h <<_ACEOF
9939 #ifndef __cplusplus
9940 #define inline $ac_val
9941 #endif
9942 _ACEOF
9943     ;;
9944 esac
9945
9946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for quiet inline (no complaint if unreferenced)" >&5
9947 $as_echo_n "checking for quiet inline (no complaint if unreferenced)... " >&6; }
9948 if ${pgac_cv_c_inline_quietly+:} false; then :
9949   $as_echo_n "(cached) " >&6
9950 else
9951   pgac_cv_c_inline_quietly=no
9952   if test "$ac_cv_c_inline" != no; then
9953     pgac_c_inline_save_werror=$ac_c_werror_flag
9954     ac_c_werror_flag=yes
9955     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9956 /* end confdefs.h.  */
9957 static inline int fun () {return 0;}
9958 int
9959 main ()
9960 {
9961
9962   ;
9963   return 0;
9964 }
9965 _ACEOF
9966 if ac_fn_c_try_link "$LINENO"; then :
9967   pgac_cv_c_inline_quietly=yes
9968 fi
9969 rm -f core conftest.err conftest.$ac_objext \
9970     conftest$ac_exeext conftest.$ac_ext
9971     ac_c_werror_flag=$pgac_c_inline_save_werror
9972   fi
9973 fi
9974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_inline_quietly" >&5
9975 $as_echo "$pgac_cv_c_inline_quietly" >&6; }
9976 if test "$pgac_cv_c_inline_quietly" != no; then
9977
9978 cat >>confdefs.h <<_ACEOF
9979 #define PG_USE_INLINE 1
9980 _ACEOF
9981
9982 fi
9983
9984
9985   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array members" >&5
9986 $as_echo_n "checking for flexible array members... " >&6; }
9987 if ${ac_cv_c_flexmember+:} false; then :
9988   $as_echo_n "(cached) " >&6
9989 else
9990   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9991 /* end confdefs.h.  */
9992 #include <stdlib.h>
9993             #include <stdio.h>
9994             #include <stddef.h>
9995             struct s { int n; double d[]; };
9996 int
9997 main ()
9998 {
9999 int m = getchar ();
10000             struct s *p = malloc (offsetof (struct s, d)
10001                                   + m * sizeof (double));
10002             p->d[0] = 0.0;
10003             return p->d != (double *) NULL;
10004   ;
10005   return 0;
10006 }
10007 _ACEOF
10008 if ac_fn_c_try_compile "$LINENO"; then :
10009   ac_cv_c_flexmember=yes
10010 else
10011   ac_cv_c_flexmember=no
10012 fi
10013 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10014 fi
10015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
10016 $as_echo "$ac_cv_c_flexmember" >&6; }
10017   if test $ac_cv_c_flexmember = yes; then
10018
10019 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
10020
10021   else
10022     $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
10023
10024   fi
10025
10026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed types" >&5
10027 $as_echo_n "checking for signed types... " >&6; }
10028 if ${pgac_cv_c_signed+:} false; then :
10029   $as_echo_n "(cached) " >&6
10030 else
10031   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10032 /* end confdefs.h.  */
10033
10034 int
10035 main ()
10036 {
10037 signed char c; signed short s; signed int i;
10038   ;
10039   return 0;
10040 }
10041 _ACEOF
10042 if ac_fn_c_try_compile "$LINENO"; then :
10043   pgac_cv_c_signed=yes
10044 else
10045   pgac_cv_c_signed=no
10046 fi
10047 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10048 fi
10049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_signed" >&5
10050 $as_echo "$pgac_cv_c_signed" >&6; }
10051 if test x"$pgac_cv_c_signed" = xno ; then
10052
10053 $as_echo "#define signed /**/" >>confdefs.h
10054
10055 fi
10056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5
10057 $as_echo_n "checking for __func__... " >&6; }
10058 if ${pgac_cv_funcname_func_support+:} false; then :
10059   $as_echo_n "(cached) " >&6
10060 else
10061   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10062 /* end confdefs.h.  */
10063 #include <stdio.h>
10064 int
10065 main ()
10066 {
10067 printf("%s\n", __func__);
10068   ;
10069   return 0;
10070 }
10071 _ACEOF
10072 if ac_fn_c_try_compile "$LINENO"; then :
10073   pgac_cv_funcname_func_support=yes
10074 else
10075   pgac_cv_funcname_func_support=no
10076 fi
10077 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10078 fi
10079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_func_support" >&5
10080 $as_echo "$pgac_cv_funcname_func_support" >&6; }
10081 if test x"$pgac_cv_funcname_func_support" = xyes ; then
10082
10083 $as_echo "#define HAVE_FUNCNAME__FUNC 1" >>confdefs.h
10084
10085 else
10086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__" >&5
10087 $as_echo_n "checking for __FUNCTION__... " >&6; }
10088 if ${pgac_cv_funcname_function_support+:} false; then :
10089   $as_echo_n "(cached) " >&6
10090 else
10091   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10092 /* end confdefs.h.  */
10093 #include <stdio.h>
10094 int
10095 main ()
10096 {
10097 printf("%s\n", __FUNCTION__);
10098   ;
10099   return 0;
10100 }
10101 _ACEOF
10102 if ac_fn_c_try_compile "$LINENO"; then :
10103   pgac_cv_funcname_function_support=yes
10104 else
10105   pgac_cv_funcname_function_support=no
10106 fi
10107 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10108 fi
10109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_function_support" >&5
10110 $as_echo "$pgac_cv_funcname_function_support" >&6; }
10111 if test x"$pgac_cv_funcname_function_support" = xyes ; then
10112
10113 $as_echo "#define HAVE_FUNCNAME__FUNCTION 1" >>confdefs.h
10114
10115 fi
10116 fi
10117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
10118 $as_echo_n "checking for _Static_assert... " >&6; }
10119 if ${pgac_cv__static_assert+:} false; then :
10120   $as_echo_n "(cached) " >&6
10121 else
10122   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10123 /* end confdefs.h.  */
10124
10125 int
10126 main ()
10127 {
10128 ({ _Static_assert(1, "foo"); })
10129   ;
10130   return 0;
10131 }
10132 _ACEOF
10133 if ac_fn_c_try_link "$LINENO"; then :
10134   pgac_cv__static_assert=yes
10135 else
10136   pgac_cv__static_assert=no
10137 fi
10138 rm -f core conftest.err conftest.$ac_objext \
10139     conftest$ac_exeext conftest.$ac_ext
10140 fi
10141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
10142 $as_echo "$pgac_cv__static_assert" >&6; }
10143 if test x"$pgac_cv__static_assert" = xyes ; then
10144
10145 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
10146
10147 fi
10148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
10149 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
10150 if ${pgac_cv__types_compatible+:} false; then :
10151   $as_echo_n "(cached) " >&6
10152 else
10153   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10154 /* end confdefs.h.  */
10155
10156 int
10157 main ()
10158 {
10159  int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
10160   ;
10161   return 0;
10162 }
10163 _ACEOF
10164 if ac_fn_c_try_compile "$LINENO"; then :
10165   pgac_cv__types_compatible=yes
10166 else
10167   pgac_cv__types_compatible=no
10168 fi
10169 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10170 fi
10171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
10172 $as_echo "$pgac_cv__types_compatible" >&6; }
10173 if test x"$pgac_cv__types_compatible" = xyes ; then
10174
10175 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
10176
10177 fi
10178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
10179 $as_echo_n "checking for __builtin_constant_p... " >&6; }
10180 if ${pgac_cv__builtin_constant_p+:} false; then :
10181   $as_echo_n "(cached) " >&6
10182 else
10183   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10184 /* end confdefs.h.  */
10185 static int x; static int y[__builtin_constant_p(x) ? x : 1];
10186 int
10187 main ()
10188 {
10189
10190   ;
10191   return 0;
10192 }
10193 _ACEOF
10194 if ac_fn_c_try_compile "$LINENO"; then :
10195   pgac_cv__builtin_constant_p=yes
10196 else
10197   pgac_cv__builtin_constant_p=no
10198 fi
10199 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10200 fi
10201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
10202 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
10203 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
10204
10205 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
10206
10207 fi
10208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
10209 $as_echo_n "checking for __builtin_unreachable... " >&6; }
10210 if ${pgac_cv__builtin_unreachable+:} false; then :
10211   $as_echo_n "(cached) " >&6
10212 else
10213   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10214 /* end confdefs.h.  */
10215
10216 int
10217 main ()
10218 {
10219 __builtin_unreachable();
10220   ;
10221   return 0;
10222 }
10223 _ACEOF
10224 if ac_fn_c_try_link "$LINENO"; then :
10225   pgac_cv__builtin_unreachable=yes
10226 else
10227   pgac_cv__builtin_unreachable=no
10228 fi
10229 rm -f core conftest.err conftest.$ac_objext \
10230     conftest$ac_exeext conftest.$ac_ext
10231 fi
10232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
10233 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
10234 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
10235
10236 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
10237
10238 fi
10239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __VA_ARGS__" >&5
10240 $as_echo_n "checking for __VA_ARGS__... " >&6; }
10241 if ${pgac_cv__va_args+:} false; then :
10242   $as_echo_n "(cached) " >&6
10243 else
10244   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10245 /* end confdefs.h.  */
10246 #include <stdio.h>
10247 int
10248 main ()
10249 {
10250 #define debug(...) fprintf(stderr, __VA_ARGS__)
10251 debug("%s", "blarg");
10252
10253   ;
10254   return 0;
10255 }
10256 _ACEOF
10257 if ac_fn_c_try_compile "$LINENO"; then :
10258   pgac_cv__va_args=yes
10259 else
10260   pgac_cv__va_args=no
10261 fi
10262 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10263 fi
10264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__va_args" >&5
10265 $as_echo "$pgac_cv__va_args" >&6; }
10266 if test x"$pgac_cv__va_args" = xyes ; then
10267
10268 $as_echo "#define HAVE__VA_ARGS 1" >>confdefs.h
10269
10270 fi
10271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10272 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
10273 if ${ac_cv_struct_tm+:} false; then :
10274   $as_echo_n "(cached) " >&6
10275 else
10276   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10277 /* end confdefs.h.  */
10278 #include <sys/types.h>
10279 #include <time.h>
10280
10281 int
10282 main ()
10283 {
10284 struct tm tm;
10285                                      int *p = &tm.tm_sec;
10286                                      return !p;
10287   ;
10288   return 0;
10289 }
10290 _ACEOF
10291 if ac_fn_c_try_compile "$LINENO"; then :
10292   ac_cv_struct_tm=time.h
10293 else
10294   ac_cv_struct_tm=sys/time.h
10295 fi
10296 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10297 fi
10298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10299 $as_echo "$ac_cv_struct_tm" >&6; }
10300 if test $ac_cv_struct_tm = sys/time.h; then
10301
10302 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
10303
10304 fi
10305
10306 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
10307 #include <$ac_cv_struct_tm>
10308
10309 "
10310 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
10311
10312 cat >>confdefs.h <<_ACEOF
10313 #define HAVE_STRUCT_TM_TM_ZONE 1
10314 _ACEOF
10315
10316
10317 fi
10318
10319 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10320
10321 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
10322
10323 fi
10324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10325 $as_echo_n "checking for tzname... " >&6; }
10326 if ${ac_cv_var_tzname+:} false; then :
10327   $as_echo_n "(cached) " >&6
10328 else
10329   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10330 /* end confdefs.h.  */
10331 #include <time.h>
10332 #ifndef tzname /* For SGI.  */
10333 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
10334 #endif
10335
10336 int
10337 main ()
10338 {
10339 atoi(*tzname);
10340   ;
10341   return 0;
10342 }
10343 _ACEOF
10344 if ac_fn_c_try_link "$LINENO"; then :
10345   ac_cv_var_tzname=yes
10346 else
10347   ac_cv_var_tzname=no
10348 fi
10349 rm -f core conftest.err conftest.$ac_objext \
10350     conftest$ac_exeext conftest.$ac_ext
10351 fi
10352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10353 $as_echo "$ac_cv_var_tzname" >&6; }
10354 if test $ac_cv_var_tzname = yes; then
10355
10356 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
10357
10358 fi
10359
10360 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
10361 #include <sys/ipc.h>
10362 #include <sys/sem.h>
10363 "
10364 if test "x$ac_cv_type_union_semun" = xyes; then :
10365
10366 cat >>confdefs.h <<_ACEOF
10367 #define HAVE_UNION_SEMUN 1
10368 _ACEOF
10369
10370
10371 fi
10372
10373 ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
10374 #ifdef HAVE_SYS_UN_H
10375 #include <sys/un.h>
10376 #endif
10377
10378 "
10379 if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
10380
10381 $as_echo "#define HAVE_UNIX_SOCKETS 1" >>confdefs.h
10382
10383 fi
10384
10385 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
10386 #ifdef HAVE_SYS_SOCKET_H
10387 #include <sys/socket.h>
10388 #endif
10389
10390 "
10391 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
10392
10393 cat >>confdefs.h <<_ACEOF
10394 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
10395 _ACEOF
10396
10397
10398 fi
10399
10400 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
10401 #ifdef HAVE_SYS_SOCKET_H
10402 #include <sys/socket.h>
10403 #endif
10404
10405 "
10406 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
10407
10408 cat >>confdefs.h <<_ACEOF
10409 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
10410 _ACEOF
10411
10412
10413 fi
10414 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
10415 #ifdef HAVE_SYS_SOCKET_H
10416 #include <sys/socket.h>
10417 #endif
10418
10419 "
10420 if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
10421
10422 cat >>confdefs.h <<_ACEOF
10423 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
10424 _ACEOF
10425
10426
10427 fi
10428 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
10429 #ifdef HAVE_SYS_SOCKET_H
10430 #include <sys/socket.h>
10431 #endif
10432
10433 "
10434 if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
10435
10436 cat >>confdefs.h <<_ACEOF
10437 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
10438 _ACEOF
10439
10440
10441 fi
10442 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
10443 #ifdef HAVE_SYS_SOCKET_H
10444 #include <sys/socket.h>
10445 #endif
10446
10447 "
10448 if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
10449
10450 cat >>confdefs.h <<_ACEOF
10451 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
10452 _ACEOF
10453
10454
10455 fi
10456 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
10457 #ifdef HAVE_SYS_SOCKET_H
10458 #include <sys/socket.h>
10459 #endif
10460
10461 "
10462 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
10463
10464 cat >>confdefs.h <<_ACEOF
10465 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
10466 _ACEOF
10467
10468
10469 fi
10470
10471 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include <sys/types.h>
10472 #include <sys/socket.h>
10473 #include <netdb.h>
10474
10475 "
10476 if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
10477
10478 cat >>confdefs.h <<_ACEOF
10479 #define HAVE_STRUCT_ADDRINFO 1
10480 _ACEOF
10481
10482
10483 fi
10484
10485
10486   ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
10487 if test "x$ac_cv_type_intptr_t" = xyes; then :
10488
10489 $as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
10490
10491 else
10492   for ac_type in 'int' 'long int' 'long long int'; do
10493        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10494 /* end confdefs.h.  */
10495 $ac_includes_default
10496 int
10497 main ()
10498 {
10499 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
10500 test_array [0] = 0;
10501 return test_array [0];
10502
10503   ;
10504   return 0;
10505 }
10506 _ACEOF
10507 if ac_fn_c_try_compile "$LINENO"; then :
10508
10509 cat >>confdefs.h <<_ACEOF
10510 #define intptr_t $ac_type
10511 _ACEOF
10512
10513           ac_type=
10514 fi
10515 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10516        test -z "$ac_type" && break
10517      done
10518 fi
10519
10520
10521
10522   ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
10523 if test "x$ac_cv_type_uintptr_t" = xyes; then :
10524
10525 $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
10526
10527 else
10528   for ac_type in 'unsigned int' 'unsigned long int' \
10529         'unsigned long long int'; do
10530        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10531 /* end confdefs.h.  */
10532 $ac_includes_default
10533 int
10534 main ()
10535 {
10536 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
10537 test_array [0] = 0;
10538 return test_array [0];
10539
10540   ;
10541   return 0;
10542 }
10543 _ACEOF
10544 if ac_fn_c_try_compile "$LINENO"; then :
10545
10546 cat >>confdefs.h <<_ACEOF
10547 #define uintptr_t $ac_type
10548 _ACEOF
10549
10550           ac_type=
10551 fi
10552 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10553        test -z "$ac_type" && break
10554      done
10555 fi
10556
10557
10558
10559   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
10560 $as_echo_n "checking for unsigned long long int... " >&6; }
10561 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
10562   $as_echo_n "(cached) " >&6
10563 else
10564   ac_cv_type_unsigned_long_long_int=yes
10565      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
10566        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10567 /* end confdefs.h.  */
10568
10569   /* For now, do not test the preprocessor; as of 2007 there are too many
10570          implementations with broken preprocessors.  Perhaps this can
10571          be revisited in 2012.  In the meantime, code should not expect
10572          #if to work with literals wider than 32 bits.  */
10573       /* Test literals.  */
10574       long long int ll = 9223372036854775807ll;
10575       long long int nll = -9223372036854775807LL;
10576       unsigned long long int ull = 18446744073709551615ULL;
10577       /* Test constant expressions.   */
10578       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
10579                      ? 1 : -1)];
10580       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
10581                      ? 1 : -1)];
10582       int i = 63;
10583 int
10584 main ()
10585 {
10586 /* Test availability of runtime routines for shift and division.  */
10587       long long int llmax = 9223372036854775807ll;
10588       unsigned long long int ullmax = 18446744073709551615ull;
10589       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
10590               | (llmax / ll) | (llmax % ll)
10591               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
10592               | (ullmax / ull) | (ullmax % ull));
10593   ;
10594   return 0;
10595 }
10596
10597 _ACEOF
10598 if ac_fn_c_try_link "$LINENO"; then :
10599
10600 else
10601   ac_cv_type_unsigned_long_long_int=no
10602 fi
10603 rm -f core conftest.err conftest.$ac_objext \
10604     conftest$ac_exeext conftest.$ac_ext
10605      fi
10606 fi
10607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
10608 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
10609   if test $ac_cv_type_unsigned_long_long_int = yes; then
10610
10611 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
10612
10613   fi
10614
10615
10616
10617   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
10618 $as_echo_n "checking for long long int... " >&6; }
10619 if ${ac_cv_type_long_long_int+:} false; then :
10620   $as_echo_n "(cached) " >&6
10621 else
10622   ac_cv_type_long_long_int=yes
10623       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
10624         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
10625         if test $ac_cv_type_long_long_int = yes; then
10626                                   if test "$cross_compiling" = yes; then :
10627   :
10628 else
10629   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10630 /* end confdefs.h.  */
10631 #include <limits.h>
10632                  #ifndef LLONG_MAX
10633                  # define HALF \
10634                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
10635                  # define LLONG_MAX (HALF - 1 + HALF)
10636                  #endif
10637 int
10638 main ()
10639 {
10640 long long int n = 1;
10641                  int i;
10642                  for (i = 0; ; i++)
10643                    {
10644                      long long int m = n << i;
10645                      if (m >> i != n)
10646                        return 1;
10647                      if (LLONG_MAX / 2 < m)
10648                        break;
10649                    }
10650                  return 0;
10651   ;
10652   return 0;
10653 }
10654 _ACEOF
10655 if ac_fn_c_try_run "$LINENO"; then :
10656
10657 else
10658   ac_cv_type_long_long_int=no
10659 fi
10660 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10661   conftest.$ac_objext conftest.beam conftest.$ac_ext
10662 fi
10663
10664         fi
10665       fi
10666 fi
10667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
10668 $as_echo "$ac_cv_type_long_long_int" >&6; }
10669   if test $ac_cv_type_long_long_int = yes; then
10670
10671 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
10672
10673   fi
10674
10675
10676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
10677 $as_echo_n "checking for locale_t... " >&6; }
10678 if ${pgac_cv_type_locale_t+:} false; then :
10679   $as_echo_n "(cached) " >&6
10680 else
10681   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10682 /* end confdefs.h.  */
10683 #include <locale.h>
10684 locale_t x;
10685 int
10686 main ()
10687 {
10688
10689   ;
10690   return 0;
10691 }
10692 _ACEOF
10693 if ac_fn_c_try_compile "$LINENO"; then :
10694   pgac_cv_type_locale_t=yes
10695 else
10696   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10697 /* end confdefs.h.  */
10698 #include <xlocale.h>
10699 locale_t x;
10700 int
10701 main ()
10702 {
10703
10704   ;
10705   return 0;
10706 }
10707 _ACEOF
10708 if ac_fn_c_try_compile "$LINENO"; then :
10709   pgac_cv_type_locale_t='yes (in xlocale.h)'
10710 else
10711   pgac_cv_type_locale_t=no
10712 fi
10713 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10714 fi
10715 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10716 fi
10717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
10718 $as_echo "$pgac_cv_type_locale_t" >&6; }
10719 if test "$pgac_cv_type_locale_t" != no; then
10720
10721 $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
10722
10723 fi
10724 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
10725
10726 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
10727
10728 fi
10729
10730 ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
10731 #include <sys/param.h>
10732 #ifdef HAVE_SYS_UCRED_H
10733 #include <sys/ucred.h>
10734 #endif
10735 "
10736 if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
10737
10738 cat >>confdefs.h <<_ACEOF
10739 #define HAVE_STRUCT_CMSGCRED 1
10740 _ACEOF
10741
10742
10743 fi
10744
10745
10746 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
10747 #include <getopt.h>
10748 #endif
10749 "
10750 if test "x$ac_cv_type_struct_option" = xyes; then :
10751
10752 cat >>confdefs.h <<_ACEOF
10753 #define HAVE_STRUCT_OPTION 1
10754 _ACEOF
10755
10756
10757 fi
10758
10759
10760 if test "$with_zlib" = yes; then
10761   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
10762   # did not).  While we could work around the lack of z_streamp, it
10763   # seems unwise to encourage people to use such old zlib versions...
10764   ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
10765 "
10766 if test "x$ac_cv_type_z_streamp" = xyes; then :
10767
10768 else
10769   as_fn_error $? "zlib version is too old
10770 Use --without-zlib to disable zlib support." "$LINENO" 5
10771 fi
10772
10773 fi
10774
10775 if test "$with_krb5" = yes; then
10776 # Check for differences between MIT and Heimdal (KTH) releases
10777   ac_fn_c_check_member "$LINENO" "krb5_ticket" "enc_part2" "ac_cv_member_krb5_ticket_enc_part2" "#include <krb5.h>
10778 "
10779 if test "x$ac_cv_member_krb5_ticket_enc_part2" = xyes; then :
10780
10781 cat >>confdefs.h <<_ACEOF
10782 #define HAVE_KRB5_TICKET_ENC_PART2 1
10783 _ACEOF
10784
10785
10786 else
10787   ac_fn_c_check_member "$LINENO" "krb5_ticket" "client" "ac_cv_member_krb5_ticket_client" "#include <krb5.h>
10788 "
10789 if test "x$ac_cv_member_krb5_ticket_client" = xyes; then :
10790
10791 cat >>confdefs.h <<_ACEOF
10792 #define HAVE_KRB5_TICKET_CLIENT 1
10793 _ACEOF
10794
10795
10796 else
10797   as_fn_error $? "could not determine how to get client name from Kerberos 5 ticket" "$LINENO" 5
10798 fi
10799
10800 fi
10801
10802   ac_fn_c_check_member "$LINENO" "krb5_error" "text.data" "ac_cv_member_krb5_error_text_data" "#include <krb5.h>
10803 "
10804 if test "x$ac_cv_member_krb5_error_text_data" = xyes; then :
10805
10806 cat >>confdefs.h <<_ACEOF
10807 #define HAVE_KRB5_ERROR_TEXT_DATA 1
10808 _ACEOF
10809
10810
10811 else
10812   ac_fn_c_check_member "$LINENO" "krb5_error" "e_data" "ac_cv_member_krb5_error_e_data" "#include <krb5.h>
10813 "
10814 if test "x$ac_cv_member_krb5_error_e_data" = xyes; then :
10815
10816 cat >>confdefs.h <<_ACEOF
10817 #define HAVE_KRB5_ERROR_E_DATA 1
10818 _ACEOF
10819
10820
10821 else
10822   as_fn_error $? "could not determine how to extract Kerberos 5 error messages" "$LINENO" 5
10823 fi
10824
10825 fi
10826
10827
10828 # Win32 requires headers to be loaded for __stdcall, so can't use
10829 # AC_CHECK_FUNCS here.
10830   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_free_unparsed_name" >&5
10831 $as_echo_n "checking for krb5_free_unparsed_name... " >&6; }
10832   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10833 /* end confdefs.h.  */
10834 #include <krb5.h>
10835 int
10836 main ()
10837 {
10838 krb5_free_unparsed_name(NULL,NULL);
10839   ;
10840   return 0;
10841 }
10842 _ACEOF
10843 if ac_fn_c_try_link "$LINENO"; then :
10844
10845 $as_echo "#define HAVE_KRB5_FREE_UNPARSED_NAME 1" >>confdefs.h
10846
10847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10848 $as_echo "yes" >&6; }
10849 else
10850   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10851 $as_echo "no" >&6; }
10852 fi
10853 rm -f core conftest.err conftest.$ac_objext \
10854     conftest$ac_exeext conftest.$ac_ext
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 fi
11096
11097 # Check for largefile support (must be after AC_SYS_LARGEFILE)
11098 # The cast to long int works around a bug in the HP C Compiler
11099 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11100 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11101 # This bug is HP SR number 8606223364.
11102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
11103 $as_echo_n "checking size of off_t... " >&6; }
11104 if ${ac_cv_sizeof_off_t+:} false; then :
11105   $as_echo_n "(cached) " >&6
11106 else
11107   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :
11108
11109 else
11110   if test "$ac_cv_type_off_t" = yes; then
11111      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11112 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11113 as_fn_error 77 "cannot compute sizeof (off_t)
11114 See \`config.log' for more details" "$LINENO" 5; }
11115    else
11116      ac_cv_sizeof_off_t=0
11117    fi
11118 fi
11119
11120 fi
11121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
11122 $as_echo "$ac_cv_sizeof_off_t" >&6; }
11123
11124
11125
11126 cat >>confdefs.h <<_ACEOF
11127 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
11128 _ACEOF
11129
11130
11131
11132 # If we don't have largefile support, can't handle segsize >= 2GB.
11133 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
11134    as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
11135 fi
11136
11137
11138 ##
11139 ## Functions, global variables
11140 ##
11141
11142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
11143 $as_echo_n "checking for int timezone... " >&6; }
11144 if ${pgac_cv_var_int_timezone+:} false; then :
11145   $as_echo_n "(cached) " >&6
11146 else
11147   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11148 /* end confdefs.h.  */
11149 #include <time.h>
11150 int res;
11151 int
11152 main ()
11153 {
11154 #ifndef __CYGWIN__
11155 res = timezone / 60;
11156 #else
11157 res = _timezone / 60;
11158 #endif
11159   ;
11160   return 0;
11161 }
11162 _ACEOF
11163 if ac_fn_c_try_link "$LINENO"; then :
11164   pgac_cv_var_int_timezone=yes
11165 else
11166   pgac_cv_var_int_timezone=no
11167 fi
11168 rm -f core conftest.err conftest.$ac_objext \
11169     conftest$ac_exeext conftest.$ac_ext
11170 fi
11171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
11172 $as_echo "$pgac_cv_var_int_timezone" >&6; }
11173 if test x"$pgac_cv_var_int_timezone" = xyes ; then
11174
11175 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
11176
11177 fi
11178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for accept()" >&5
11179 $as_echo_n "checking types of arguments for accept()... " >&6; }
11180  if ${ac_cv_func_accept_return+:} false; then :
11181   $as_echo_n "(cached) " >&6
11182 else
11183    if ${ac_cv_func_accept_arg1+:} false; then :
11184   $as_echo_n "(cached) " >&6
11185 else
11186     if ${ac_cv_func_accept_arg2+:} false; then :
11187   $as_echo_n "(cached) " >&6
11188 else
11189      if ${ac_cv_func_accept_arg3+:} false; then :
11190   $as_echo_n "(cached) " >&6
11191 else
11192       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL' 'SOCKET WSAAPI'; do
11193       for ac_cv_func_accept_arg1 in 'int' 'unsigned int' 'SOCKET'; do
11194        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
11195         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
11196          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11197 /* end confdefs.h.  */
11198 #ifdef HAVE_SYS_TYPES_H
11199 #include <sys/types.h>
11200 #endif
11201 #ifdef HAVE_SYS_SOCKET_H
11202 #include <sys/socket.h>
11203 #endif
11204 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
11205 int
11206 main ()
11207 {
11208
11209   ;
11210   return 0;
11211 }
11212 _ACEOF
11213 if ac_fn_c_try_compile "$LINENO"; then :
11214   ac_not_found=no; break 4
11215 else
11216   ac_not_found=yes
11217 fi
11218 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11219        done
11220       done
11221      done
11222     done
11223     if test "$ac_not_found" = yes; then
11224       as_fn_error $? "could not determine argument types" "$LINENO" 5
11225     fi
11226     if test "$ac_cv_func_accept_arg3" = "void"; then
11227       ac_cv_func_accept_arg3=int
11228     fi
11229
11230 fi
11231
11232 fi
11233
11234 fi
11235
11236 fi
11237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&5
11238 $as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
11239
11240 cat >>confdefs.h <<_ACEOF
11241 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
11242 _ACEOF
11243
11244
11245 cat >>confdefs.h <<_ACEOF
11246 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
11247 _ACEOF
11248
11249
11250 cat >>confdefs.h <<_ACEOF
11251 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
11252 _ACEOF
11253
11254
11255 cat >>confdefs.h <<_ACEOF
11256 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
11257 _ACEOF
11258
11259
11260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
11261 $as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
11262 if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
11263   $as_echo_n "(cached) " >&6
11264 else
11265   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11266 /* end confdefs.h.  */
11267 #include <sys/time.h>
11268 int
11269 main ()
11270 {
11271 struct timeval *tp;
11272 struct timezone *tzp;
11273 gettimeofday(tp,tzp);
11274   ;
11275   return 0;
11276 }
11277 _ACEOF
11278 if ac_fn_c_try_compile "$LINENO"; then :
11279   pgac_cv_func_gettimeofday_1arg=no
11280 else
11281   pgac_cv_func_gettimeofday_1arg=yes
11282 fi
11283 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11284 fi
11285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5
11286 $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
11287 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
11288
11289 $as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
11290
11291 fi
11292
11293
11294 # Some versions of libedit contain strlcpy(), setproctitle(), and other
11295 # symbols that that library has no business exposing to the world.  Pending
11296 # acquisition of a clue by those developers, ignore libedit (including its
11297 # possible alias of libreadline) while checking for everything else.
11298 LIBS_including_readline="$LIBS"
11299 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
11300
11301 for ac_func in cbrt dlopen fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memmove poll pstat readlink setproctitle setsid shm_open sigprocmask symlink sync_file_range towlower utime utimes wcstombs wcstombs_l
11302 do :
11303   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11304 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11305 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11306   cat >>confdefs.h <<_ACEOF
11307 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11308 _ACEOF
11309
11310 fi
11311 done
11312
11313
11314 ac_fn_c_check_func "$LINENO" "fseeko" "ac_cv_func_fseeko"
11315 if test "x$ac_cv_func_fseeko" = xyes; then :
11316   $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
11317
11318 else
11319   case " $LIBOBJS " in
11320   *" fseeko.$ac_objext "* ) ;;
11321   *) LIBOBJS="$LIBOBJS fseeko.$ac_objext"
11322  ;;
11323 esac
11324
11325 fi
11326
11327
11328 case $host_os in
11329         # NetBSD uses a custom fseeko/ftello built on fsetpos/fgetpos
11330         # Mingw uses macros to access Win32 API calls
11331         netbsd*|mingw*)
11332
11333 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
11334
11335                 ac_cv_func_fseeko=yes;;
11336         *)
11337                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
11338 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
11339 if ${ac_cv_sys_largefile_source+:} false; then :
11340   $as_echo_n "(cached) " >&6
11341 else
11342   while :; do
11343   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11344 /* end confdefs.h.  */
11345 #include <sys/types.h> /* for off_t */
11346      #include <stdio.h>
11347 int
11348 main ()
11349 {
11350 int (*fp) (FILE *, off_t, int) = fseeko;
11351      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
11352   ;
11353   return 0;
11354 }
11355 _ACEOF
11356 if ac_fn_c_try_link "$LINENO"; then :
11357   ac_cv_sys_largefile_source=no; break
11358 fi
11359 rm -f core conftest.err conftest.$ac_objext \
11360     conftest$ac_exeext conftest.$ac_ext
11361   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11362 /* end confdefs.h.  */
11363 #define _LARGEFILE_SOURCE 1
11364 #include <sys/types.h> /* for off_t */
11365      #include <stdio.h>
11366 int
11367 main ()
11368 {
11369 int (*fp) (FILE *, off_t, int) = fseeko;
11370      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
11371   ;
11372   return 0;
11373 }
11374 _ACEOF
11375 if ac_fn_c_try_link "$LINENO"; then :
11376   ac_cv_sys_largefile_source=1; break
11377 fi
11378 rm -f core conftest.err conftest.$ac_objext \
11379     conftest$ac_exeext conftest.$ac_ext
11380   ac_cv_sys_largefile_source=unknown
11381   break
11382 done
11383 fi
11384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
11385 $as_echo "$ac_cv_sys_largefile_source" >&6; }
11386 case $ac_cv_sys_largefile_source in #(
11387   no | unknown) ;;
11388   *)
11389 cat >>confdefs.h <<_ACEOF
11390 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
11391 _ACEOF
11392 ;;
11393 esac
11394 rm -rf conftest*
11395
11396 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
11397 # in glibc 2.1.3, but that breaks too many other things.
11398 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
11399 if test $ac_cv_sys_largefile_source != unknown; then
11400
11401 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
11402
11403 fi
11404 ;;
11405 esac
11406
11407 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
11408 # by calling it, 2009-04-02
11409 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
11410 if test "$PORTNAME" != "solaris"; then
11411 for ac_func in posix_fadvise
11412 do :
11413   ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
11414 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
11415   cat >>confdefs.h <<_ACEOF
11416 #define HAVE_POSIX_FADVISE 1
11417 _ACEOF
11418
11419 fi
11420 done
11421
11422 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
11423 "
11424 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
11425   ac_have_decl=1
11426 else
11427   ac_have_decl=0
11428 fi
11429
11430 cat >>confdefs.h <<_ACEOF
11431 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
11432 _ACEOF
11433
11434 fi
11435
11436 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
11437 "
11438 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
11439   ac_have_decl=1
11440 else
11441   ac_have_decl=0
11442 fi
11443
11444 cat >>confdefs.h <<_ACEOF
11445 #define HAVE_DECL_FDATASYNC $ac_have_decl
11446 _ACEOF
11447
11448 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
11449 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
11450   ac_have_decl=1
11451 else
11452   ac_have_decl=0
11453 fi
11454
11455 cat >>confdefs.h <<_ACEOF
11456 #define HAVE_DECL_STRLCAT $ac_have_decl
11457 _ACEOF
11458 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
11459 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
11460   ac_have_decl=1
11461 else
11462   ac_have_decl=0
11463 fi
11464
11465 cat >>confdefs.h <<_ACEOF
11466 #define HAVE_DECL_STRLCPY $ac_have_decl
11467 _ACEOF
11468
11469 # This is probably only present on Darwin, but may as well check always
11470 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
11471 "
11472 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
11473   ac_have_decl=1
11474 else
11475   ac_have_decl=0
11476 fi
11477
11478 cat >>confdefs.h <<_ACEOF
11479 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
11480 _ACEOF
11481
11482
11483 HAVE_IPV6=no
11484 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default
11485 #include <netinet/in.h>
11486 "
11487 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
11488
11489 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
11490
11491          HAVE_IPV6=yes
11492 fi
11493
11494
11495
11496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
11497 $as_echo_n "checking for PS_STRINGS... " >&6; }
11498 if ${pgac_cv_var_PS_STRINGS+:} false; then :
11499   $as_echo_n "(cached) " >&6
11500 else
11501   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11502 /* end confdefs.h.  */
11503 #include <machine/vmparam.h>
11504 #include <sys/exec.h>
11505
11506 int
11507 main ()
11508 {
11509 PS_STRINGS->ps_nargvstr = 1;
11510 PS_STRINGS->ps_argvstr = "foo";
11511   ;
11512   return 0;
11513 }
11514 _ACEOF
11515 if ac_fn_c_try_link "$LINENO"; then :
11516   pgac_cv_var_PS_STRINGS=yes
11517 else
11518   pgac_cv_var_PS_STRINGS=no
11519 fi
11520 rm -f core conftest.err conftest.$ac_objext \
11521     conftest$ac_exeext conftest.$ac_ext
11522 fi
11523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
11524 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
11525 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
11526
11527 $as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
11528
11529 fi
11530
11531
11532 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
11533 # is missing.  Yes, there are machines that have only one.  We may
11534 # also decide to use snprintf.c if snprintf() is present but does not
11535 # have all the features we need --- see below.
11536
11537 if test "$PORTNAME" = "win32"; then
11538   # Win32 gets snprintf.c built unconditionally.
11539   #
11540   # To properly translate all NLS languages strings, we must support the
11541   # *printf() %$ format, which allows *printf() arguments to be selected
11542   # by position in the translated string.
11543   #
11544   # libintl versions < 0.13 use the native *printf() functions, and Win32
11545   # *printf() doesn't understand %$, so we must use our /port versions,
11546   # which do understand %$. libintl versions >= 0.13 include their own
11547   # *printf versions on Win32.  The libintl 0.13 release note text is:
11548   #
11549   #   C format strings with positions, as they arise when a translator
11550   #   needs to reorder a sentence, are now supported on all platforms.
11551   #   On those few platforms (NetBSD and Woe32) for which the native
11552   #   printf()/fprintf()/... functions don't support such format
11553   #   strings, replacements are provided through <libintl.h>.
11554   #
11555   # We could use libintl >= 0.13's *printf() if we were sure that we had
11556   # a litint >= 0.13 at runtime, but seeing that there is no clean way
11557   # to guarantee that, it is best to just use our own, so we are sure to
11558   # get %$ support. In include/port.h we disable the *printf() macros
11559   # that might have been defined by libintl.
11560   #
11561   # We do this unconditionally whether NLS is used or not so we are sure
11562   # that all Win32 libraries and binaries behave the same.
11563   pgac_need_repl_snprintf=yes
11564 else
11565   pgac_need_repl_snprintf=no
11566   for ac_func in snprintf
11567 do :
11568   ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
11569 if test "x$ac_cv_func_snprintf" = xyes; then :
11570   cat >>confdefs.h <<_ACEOF
11571 #define HAVE_SNPRINTF 1
11572 _ACEOF
11573
11574 else
11575   pgac_need_repl_snprintf=yes
11576 fi
11577 done
11578
11579   for ac_func in vsnprintf
11580 do :
11581   ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
11582 if test "x$ac_cv_func_vsnprintf" = xyes; then :
11583   cat >>confdefs.h <<_ACEOF
11584 #define HAVE_VSNPRINTF 1
11585 _ACEOF
11586
11587 else
11588   pgac_need_repl_snprintf=yes
11589 fi
11590 done
11591
11592 fi
11593
11594
11595 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
11596 # include/c.h will provide declarations.  Note this is a separate test
11597 # from whether the functions exist in the C library --- there are
11598 # systems that have the functions but don't bother to declare them :-(
11599
11600 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11601 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
11602   ac_have_decl=1
11603 else
11604   ac_have_decl=0
11605 fi
11606
11607 cat >>confdefs.h <<_ACEOF
11608 #define HAVE_DECL_SNPRINTF $ac_have_decl
11609 _ACEOF
11610 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
11611 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
11612   ac_have_decl=1
11613 else
11614   ac_have_decl=0
11615 fi
11616
11617 cat >>confdefs.h <<_ACEOF
11618 #define HAVE_DECL_VSNPRINTF $ac_have_decl
11619 _ACEOF
11620
11621
11622
11623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf" >&5
11624 $as_echo_n "checking for isinf... " >&6; }
11625 if ${ac_cv_func_isinf+:} false; then :
11626   $as_echo_n "(cached) " >&6
11627 else
11628   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11629 /* end confdefs.h.  */
11630
11631 #include <math.h>
11632 double glob_double;
11633
11634 int
11635 main ()
11636 {
11637 return isinf(glob_double) ? 0 : 1;
11638   ;
11639   return 0;
11640 }
11641 _ACEOF
11642 if ac_fn_c_try_link "$LINENO"; then :
11643   ac_cv_func_isinf=yes
11644 else
11645   ac_cv_func_isinf=no
11646 fi
11647 rm -f core conftest.err conftest.$ac_objext \
11648     conftest$ac_exeext conftest.$ac_ext
11649 fi
11650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_isinf" >&5
11651 $as_echo "$ac_cv_func_isinf" >&6; }
11652
11653 if test $ac_cv_func_isinf = yes ; then
11654
11655 $as_echo "#define HAVE_ISINF 1" >>confdefs.h
11656
11657 else
11658   case " $LIBOBJS " in
11659   *" isinf.$ac_objext "* ) ;;
11660   *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
11661  ;;
11662 esac
11663
11664   # Look for a way to implement a substitute for isinf()
11665   for ac_func in fpclass fp_class fp_class_d class
11666 do :
11667   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11668 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11669 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11670   cat >>confdefs.h <<_ACEOF
11671 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11672 _ACEOF
11673  break
11674 fi
11675 done
11676
11677 fi
11678
11679 ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
11680 if test "x$ac_cv_func_crypt" = xyes; then :
11681   $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
11682
11683 else
11684   case " $LIBOBJS " in
11685   *" crypt.$ac_objext "* ) ;;
11686   *) LIBOBJS="$LIBOBJS crypt.$ac_objext"
11687  ;;
11688 esac
11689
11690 fi
11691
11692 ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
11693 if test "x$ac_cv_func_fls" = xyes; then :
11694   $as_echo "#define HAVE_FLS 1" >>confdefs.h
11695
11696 else
11697   case " $LIBOBJS " in
11698   *" fls.$ac_objext "* ) ;;
11699   *) LIBOBJS="$LIBOBJS fls.$ac_objext"
11700  ;;
11701 esac
11702
11703 fi
11704
11705 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
11706 if test "x$ac_cv_func_getopt" = xyes; then :
11707   $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
11708
11709 else
11710   case " $LIBOBJS " in
11711   *" getopt.$ac_objext "* ) ;;
11712   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
11713  ;;
11714 esac
11715
11716 fi
11717
11718 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
11719 if test "x$ac_cv_func_getrusage" = xyes; then :
11720   $as_echo "#define HAVE_GETRUSAGE 1" >>confdefs.h
11721
11722 else
11723   case " $LIBOBJS " in
11724   *" getrusage.$ac_objext "* ) ;;
11725   *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
11726  ;;
11727 esac
11728
11729 fi
11730
11731 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
11732 if test "x$ac_cv_func_inet_aton" = xyes; then :
11733   $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
11734
11735 else
11736   case " $LIBOBJS " in
11737   *" inet_aton.$ac_objext "* ) ;;
11738   *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
11739  ;;
11740 esac
11741
11742 fi
11743
11744 ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
11745 if test "x$ac_cv_func_random" = xyes; then :
11746   $as_echo "#define HAVE_RANDOM 1" >>confdefs.h
11747
11748 else
11749   case " $LIBOBJS " in
11750   *" random.$ac_objext "* ) ;;
11751   *) LIBOBJS="$LIBOBJS random.$ac_objext"
11752  ;;
11753 esac
11754
11755 fi
11756
11757 ac_fn_c_check_func "$LINENO" "rint" "ac_cv_func_rint"
11758 if test "x$ac_cv_func_rint" = xyes; then :
11759   $as_echo "#define HAVE_RINT 1" >>confdefs.h
11760
11761 else
11762   case " $LIBOBJS " in
11763   *" rint.$ac_objext "* ) ;;
11764   *) LIBOBJS="$LIBOBJS rint.$ac_objext"
11765  ;;
11766 esac
11767
11768 fi
11769
11770 ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
11771 if test "x$ac_cv_func_srandom" = xyes; then :
11772   $as_echo "#define HAVE_SRANDOM 1" >>confdefs.h
11773
11774 else
11775   case " $LIBOBJS " in
11776   *" srandom.$ac_objext "* ) ;;
11777   *) LIBOBJS="$LIBOBJS srandom.$ac_objext"
11778  ;;
11779 esac
11780
11781 fi
11782
11783 ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
11784 if test "x$ac_cv_func_strerror" = xyes; then :
11785   $as_echo "#define HAVE_STRERROR 1" >>confdefs.h
11786
11787 else
11788   case " $LIBOBJS " in
11789   *" strerror.$ac_objext "* ) ;;
11790   *) LIBOBJS="$LIBOBJS strerror.$ac_objext"
11791  ;;
11792 esac
11793
11794 fi
11795
11796 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
11797 if test "x$ac_cv_func_strlcat" = xyes; then :
11798   $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
11799
11800 else
11801   case " $LIBOBJS " in
11802   *" strlcat.$ac_objext "* ) ;;
11803   *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
11804  ;;
11805 esac
11806
11807 fi
11808
11809 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
11810 if test "x$ac_cv_func_strlcpy" = xyes; then :
11811   $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
11812
11813 else
11814   case " $LIBOBJS " in
11815   *" strlcpy.$ac_objext "* ) ;;
11816   *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
11817  ;;
11818 esac
11819
11820 fi
11821
11822
11823
11824 case $host_os in
11825
11826         # Windows uses a specialised env handler
11827         # and doesn't need a replacement getpeereid because it doesn't use
11828         # Unix sockets.
11829         mingw*)
11830
11831 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
11832
11833
11834 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
11835
11836                 ac_cv_func_unsetenv=yes
11837                 ac_cv_func_getpeereid=yes;;
11838         *)
11839                 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
11840 if test "x$ac_cv_func_unsetenv" = xyes; then :
11841   $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
11842
11843 else
11844   case " $LIBOBJS " in
11845   *" unsetenv.$ac_objext "* ) ;;
11846   *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext"
11847  ;;
11848 esac
11849
11850 fi
11851
11852 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
11853 if test "x$ac_cv_func_getpeereid" = xyes; then :
11854   $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
11855
11856 else
11857   case " $LIBOBJS " in
11858   *" getpeereid.$ac_objext "* ) ;;
11859   *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
11860  ;;
11861 esac
11862
11863 fi
11864
11865
11866                 ;;
11867 esac
11868
11869 # System's version of getaddrinfo(), if any, may be used only if we found
11870 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
11871 # (Note: the AC_REPLACE_FUNCS probe fails on Windows, where the available
11872 # versions of getaddrinfo don't follow normal C call protocol.  This is OK
11873 # because we want to use our own getaddrinfo.c on Windows anyway.)
11874 if test x"$ac_cv_type_struct_addrinfo" = xyes ; then
11875   ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
11876 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
11877   $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
11878
11879 else
11880   case " $LIBOBJS " in
11881   *" getaddrinfo.$ac_objext "* ) ;;
11882   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
11883  ;;
11884 esac
11885
11886 fi
11887
11888
11889 else
11890   case " $LIBOBJS " in
11891   *" getaddrinfo.$ac_objext "* ) ;;
11892   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
11893  ;;
11894 esac
11895
11896 fi
11897
11898 # Similarly, use system's getopt_long() only if system provides struct option.
11899 if test x"$ac_cv_type_struct_option" = xyes ; then
11900   ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
11901 if test "x$ac_cv_func_getopt_long" = xyes; then :
11902   $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
11903
11904 else
11905   case " $LIBOBJS " in
11906   *" getopt_long.$ac_objext "* ) ;;
11907   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
11908  ;;
11909 esac
11910
11911 fi
11912
11913
11914 else
11915   case " $LIBOBJS " in
11916   *" getopt_long.$ac_objext "* ) ;;
11917   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
11918  ;;
11919 esac
11920
11921 fi
11922
11923 # Solaris' getopt() doesn't do what we want for long options, so always use
11924 # our version on that platform.
11925 if test "$PORTNAME" = "solaris"; then
11926   case " $LIBOBJS " in
11927   *" getopt.$ac_objext "* ) ;;
11928   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
11929  ;;
11930 esac
11931
11932 fi
11933
11934 # mingw has adopted a GNU-centric interpretation of optind/optreset,
11935 # so always use our version on Windows.
11936 if test "$PORTNAME" = "win32"; then
11937   case " $LIBOBJS " in
11938   *" getopt.$ac_objext "* ) ;;
11939   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
11940  ;;
11941 esac
11942
11943   case " $LIBOBJS " in
11944   *" getopt_long.$ac_objext "* ) ;;
11945   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
11946  ;;
11947 esac
11948
11949 fi
11950
11951 # Win32 support
11952 if test "$PORTNAME" = "win32"; then
11953   ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
11954 if test "x$ac_cv_func_gettimeofday" = xyes; then :
11955   $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
11956
11957 else
11958   case " $LIBOBJS " in
11959   *" gettimeofday.$ac_objext "* ) ;;
11960   *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
11961  ;;
11962 esac
11963
11964 fi
11965
11966
11967   case " $LIBOBJS " in
11968   *" kill.$ac_objext "* ) ;;
11969   *) LIBOBJS="$LIBOBJS kill.$ac_objext"
11970  ;;
11971 esac
11972
11973   case " $LIBOBJS " in
11974   *" open.$ac_objext "* ) ;;
11975   *) LIBOBJS="$LIBOBJS open.$ac_objext"
11976  ;;
11977 esac
11978
11979   case " $LIBOBJS " in
11980   *" win32env.$ac_objext "* ) ;;
11981   *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
11982  ;;
11983 esac
11984
11985   case " $LIBOBJS " in
11986   *" win32error.$ac_objext "* ) ;;
11987   *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
11988  ;;
11989 esac
11990
11991   case " $LIBOBJS " in
11992   *" win32setlocale.$ac_objext "* ) ;;
11993   *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
11994  ;;
11995 esac
11996
11997
11998 $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
11999
12000   ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
12001 #define WIN32_LEAN_AND_MEAN
12002 #include <windows.h>
12003 #include <string.h>
12004 #include <dbghelp.h>
12005 "
12006 if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
12007
12008 cat >>confdefs.h <<_ACEOF
12009 #define HAVE_MINIDUMP_TYPE 1
12010 _ACEOF
12011
12012 pgac_minidump_type=yes
12013 else
12014   pgac_minidump_type=no
12015 fi
12016
12017 fi
12018 if test x"$pgac_minidump_type" = x"yes" ; then
12019   have_win32_dbghelp=yes
12020
12021 else
12022   have_win32_dbghelp=no
12023
12024 fi
12025
12026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
12027 $as_echo_n "checking for sigsetjmp... " >&6; }
12028 if ${pgac_cv_func_sigsetjmp+:} false; then :
12029   $as_echo_n "(cached) " >&6
12030 else
12031   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12032 /* end confdefs.h.  */
12033 #include <setjmp.h>
12034 int
12035 main ()
12036 {
12037 sigjmp_buf x; sigsetjmp(x, 1);
12038   ;
12039   return 0;
12040 }
12041 _ACEOF
12042 if ac_fn_c_try_link "$LINENO"; then :
12043   pgac_cv_func_sigsetjmp=yes
12044 else
12045   pgac_cv_func_sigsetjmp=no
12046 fi
12047 rm -f core conftest.err conftest.$ac_objext \
12048     conftest$ac_exeext conftest.$ac_ext
12049 fi
12050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_sigsetjmp" >&5
12051 $as_echo "$pgac_cv_func_sigsetjmp" >&6; }
12052 if test x"$pgac_cv_func_sigsetjmp" = x"yes"; then
12053
12054 $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
12055
12056 fi
12057
12058 ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
12059 /* NetBSD declares sys_siglist in unistd.h.  */
12060 #ifdef HAVE_UNISTD_H
12061 # include <unistd.h>
12062 #endif
12063
12064 "
12065 if test "x$ac_cv_have_decl_sys_siglist" = xyes; then :
12066   ac_have_decl=1
12067 else
12068   ac_have_decl=0
12069 fi
12070
12071 cat >>confdefs.h <<_ACEOF
12072 #define HAVE_DECL_SYS_SIGLIST $ac_have_decl
12073 _ACEOF
12074
12075
12076
12077 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
12078 if test "x$ac_cv_func_syslog" = xyes; then :
12079   ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
12080 if test "x$ac_cv_header_syslog_h" = xyes; then :
12081
12082 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
12083
12084 fi
12085
12086
12087 fi
12088
12089
12090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
12091 $as_echo_n "checking for opterr... " >&6; }
12092 if ${pgac_cv_var_int_opterr+:} false; then :
12093   $as_echo_n "(cached) " >&6
12094 else
12095   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12096 /* end confdefs.h.  */
12097 #include <unistd.h>
12098 int
12099 main ()
12100 {
12101 extern int opterr; opterr = 1;
12102   ;
12103   return 0;
12104 }
12105 _ACEOF
12106 if ac_fn_c_try_link "$LINENO"; then :
12107   pgac_cv_var_int_opterr=yes
12108 else
12109   pgac_cv_var_int_opterr=no
12110 fi
12111 rm -f core conftest.err conftest.$ac_objext \
12112     conftest$ac_exeext conftest.$ac_ext
12113 fi
12114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
12115 $as_echo "$pgac_cv_var_int_opterr" >&6; }
12116 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
12117
12118 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
12119
12120 fi
12121
12122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
12123 $as_echo_n "checking for optreset... " >&6; }
12124 if ${pgac_cv_var_int_optreset+:} false; then :
12125   $as_echo_n "(cached) " >&6
12126 else
12127   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12128 /* end confdefs.h.  */
12129 #include <unistd.h>
12130 int
12131 main ()
12132 {
12133 extern int optreset; optreset = 1;
12134   ;
12135   return 0;
12136 }
12137 _ACEOF
12138 if ac_fn_c_try_link "$LINENO"; then :
12139   pgac_cv_var_int_optreset=yes
12140 else
12141   pgac_cv_var_int_optreset=no
12142 fi
12143 rm -f core conftest.err conftest.$ac_objext \
12144     conftest$ac_exeext conftest.$ac_ext
12145 fi
12146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
12147 $as_echo "$pgac_cv_var_int_optreset" >&6; }
12148 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
12149
12150 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
12151
12152 fi
12153
12154 for ac_func in strtoll strtoq
12155 do :
12156   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12157 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12158 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12159   cat >>confdefs.h <<_ACEOF
12160 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12161 _ACEOF
12162  break
12163 fi
12164 done
12165
12166 for ac_func in strtoull strtouq
12167 do :
12168   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12169 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12170 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12171   cat >>confdefs.h <<_ACEOF
12172 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12173 _ACEOF
12174  break
12175 fi
12176 done
12177
12178
12179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin locking functions" >&5
12180 $as_echo_n "checking for builtin locking functions... " >&6; }
12181 if ${pgac_cv_gcc_int_atomics+:} false; then :
12182   $as_echo_n "(cached) " >&6
12183 else
12184   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12185 /* end confdefs.h.  */
12186
12187 int
12188 main ()
12189 {
12190 int lock = 0;
12191    __sync_lock_test_and_set(&lock, 1);
12192    __sync_lock_release(&lock);
12193   ;
12194   return 0;
12195 }
12196 _ACEOF
12197 if ac_fn_c_try_link "$LINENO"; then :
12198   pgac_cv_gcc_int_atomics="yes"
12199 else
12200   pgac_cv_gcc_int_atomics="no"
12201 fi
12202 rm -f core conftest.err conftest.$ac_objext \
12203     conftest$ac_exeext conftest.$ac_ext
12204 fi
12205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_int_atomics" >&5
12206 $as_echo "$pgac_cv_gcc_int_atomics" >&6; }
12207 if test x"$pgac_cv_gcc_int_atomics" = x"yes"; then
12208
12209 $as_echo "#define HAVE_GCC_INT_ATOMICS 1" >>confdefs.h
12210
12211 fi
12212
12213 # Lastly, restore full LIBS list and check for readline/libedit symbols
12214 LIBS="$LIBS_including_readline"
12215
12216 if test "$with_readline" = yes; then
12217   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_append_character" >&5
12218 $as_echo_n "checking for rl_completion_append_character... " >&6; }
12219 if ${pgac_cv_var_rl_completion_append_character+:} false; then :
12220   $as_echo_n "(cached) " >&6
12221 else
12222   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12223 /* end confdefs.h.  */
12224 #include <stdio.h>
12225 #ifdef HAVE_READLINE_READLINE_H
12226 # include <readline/readline.h>
12227 #elif defined(HAVE_READLINE_H)
12228 # include <readline.h>
12229 #endif
12230
12231 int
12232 main ()
12233 {
12234 rl_completion_append_character = 'x';
12235   ;
12236   return 0;
12237 }
12238 _ACEOF
12239 if ac_fn_c_try_link "$LINENO"; then :
12240   pgac_cv_var_rl_completion_append_character=yes
12241 else
12242   pgac_cv_var_rl_completion_append_character=no
12243 fi
12244 rm -f core conftest.err conftest.$ac_objext \
12245     conftest$ac_exeext conftest.$ac_ext
12246 fi
12247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_append_character" >&5
12248 $as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
12249 if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
12250
12251 $as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
12252
12253 fi
12254   for ac_func in rl_completion_matches rl_filename_completion_function
12255 do :
12256   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12257 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12258 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12259   cat >>confdefs.h <<_ACEOF
12260 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12261 _ACEOF
12262
12263 fi
12264 done
12265
12266   for ac_func in append_history history_truncate_file
12267 do :
12268   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12269 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12270 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12271   cat >>confdefs.h <<_ACEOF
12272 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12273 _ACEOF
12274
12275 fi
12276 done
12277
12278 fi
12279
12280
12281 #
12282 # Pthreads
12283 #
12284 # For each platform, we need to know about any special compile and link
12285 # libraries, and whether the normal C function names are thread-safe.
12286 # See the comment at the top of src/port/thread.c for more information.
12287 # WIN32 doesn't need the pthread tests;  it always uses threads
12288 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then
12289
12290
12291
12292 ac_ext=c
12293 ac_cpp='$CPP $CPPFLAGS'
12294 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12295 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12296 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12297
12298 acx_pthread_ok=no
12299
12300 # We used to check for pthread.h first, but this fails if pthread.h
12301 # requires special compiler flags (e.g. on True64 or Sequent).
12302 # It gets checked for in the link test anyway.
12303
12304 # First of all, check if the user has set any of the PTHREAD_LIBS,
12305 # etcetera environment variables, and if threads linking works using
12306 # them:
12307 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
12308         save_CFLAGS="$CFLAGS"
12309         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
12310         save_LIBS="$LIBS"
12311         LIBS="$PTHREAD_LIBS $LIBS"
12312         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
12313 $as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
12314         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12315 /* end confdefs.h.  */
12316
12317 /* Override any GCC internal prototype to avoid an error.
12318    Use char because int might match the return type of a GCC
12319    builtin and then its argument prototype would still apply.  */
12320 #ifdef __cplusplus
12321 extern "C"
12322 #endif
12323 char pthread_join ();
12324 int
12325 main ()
12326 {
12327 return pthread_join ();
12328   ;
12329   return 0;
12330 }
12331 _ACEOF
12332 if ac_fn_c_try_link "$LINENO"; then :
12333   acx_pthread_ok=yes
12334 fi
12335 rm -f core conftest.err conftest.$ac_objext \
12336     conftest$ac_exeext conftest.$ac_ext
12337         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5
12338 $as_echo "$acx_pthread_ok" >&6; }
12339         if test x"$acx_pthread_ok" = xno; then
12340                 PTHREAD_LIBS=""
12341                 PTHREAD_CFLAGS=""
12342         fi
12343         LIBS="$save_LIBS"
12344         CFLAGS="$save_CFLAGS"
12345 fi
12346
12347 # We must check for the threads library under a number of different
12348 # names; the ordering is very important because some systems
12349 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
12350 # libraries is broken (non-POSIX).
12351
12352 # Create a list of thread flags to try.  Items starting with a "-" are
12353 # C compiler flags, and other items are library names, except for "none"
12354 # which indicates that we try without any flags at all, and "pthread-config"
12355 # which is a program returning the flags for the Pth emulation library.
12356
12357 acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config pthreadGC2"
12358
12359 # The ordering *is* (sometimes) important.  Some notes on the
12360 # individual items follow:
12361
12362 # pthreads: AIX (must check this before -lpthread)
12363 # none: in case threads are in libc; should be tried before -Kthread and
12364 #       other compiler flags to prevent continual compiler warnings
12365 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
12366 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
12367 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
12368 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
12369 # -pthreads: Solaris/gcc
12370 # -mthreads: Mingw32/gcc, Lynx/gcc
12371 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
12372 #      doesn't hurt to check since this sometimes defines pthreads too;
12373 #      also defines -D_REENTRANT)
12374 # pthread: Linux, etcetera
12375 # --thread-safe: KAI C++
12376 # pthread-config: use pthread-config program (for GNU Pth library)
12377
12378 case "${host_cpu}-${host_os}" in
12379         *solaris*)
12380
12381         # On Solaris (at least, for some versions), libc contains stubbed
12382         # (non-functional) versions of the pthreads routines, so link-based
12383         # tests will erroneously succeed.  (We need to link with -pthread or
12384         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
12385         # a function called by this macro, so we could check for that, but
12386         # who knows whether they'll stub that too in a future libc.)  So,
12387         # we'll just look for -pthreads and -lpthread first:
12388
12389         acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
12390         ;;
12391 esac
12392
12393 if test x"$acx_pthread_ok" = xno; then
12394 for flag in $acx_pthread_flags; do
12395
12396         tryPTHREAD_CFLAGS=""
12397         tryPTHREAD_LIBS=""
12398         case $flag in
12399                 none)
12400                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
12401 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
12402                 ;;
12403
12404                 -*)
12405                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
12406 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
12407                 tryPTHREAD_CFLAGS="$flag"
12408                 ;;
12409
12410                 pthread-config)
12411                 # skip this if we already have flags defined, for PostgreSQL
12412                 if test x"$PTHREAD_CFLAGS" != x -o x"$PTHREAD_LIBS" != x; then continue; fi
12413                 # Extract the first word of "pthread-config", so it can be a program name with args.
12414 set dummy pthread-config; ac_word=$2
12415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12416 $as_echo_n "checking for $ac_word... " >&6; }
12417 if ${ac_cv_prog_acx_pthread_config+:} false; then :
12418   $as_echo_n "(cached) " >&6
12419 else
12420   if test -n "$acx_pthread_config"; then
12421   ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
12422 else
12423 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12424 for as_dir in $PATH
12425 do
12426   IFS=$as_save_IFS
12427   test -z "$as_dir" && as_dir=.
12428     for ac_exec_ext in '' $ac_executable_extensions; do
12429   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12430     ac_cv_prog_acx_pthread_config="yes"
12431     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12432     break 2
12433   fi
12434 done
12435   done
12436 IFS=$as_save_IFS
12437
12438   test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
12439 fi
12440 fi
12441 acx_pthread_config=$ac_cv_prog_acx_pthread_config
12442 if test -n "$acx_pthread_config"; then
12443   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_config" >&5
12444 $as_echo "$acx_pthread_config" >&6; }
12445 else
12446   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12447 $as_echo "no" >&6; }
12448 fi
12449
12450
12451                 if test x"$acx_pthread_config" = xno; then continue; fi
12452                 tryPTHREAD_CFLAGS="`pthread-config --cflags`"
12453                 tryPTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
12454                 ;;
12455
12456                 *)
12457                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
12458 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
12459                 tryPTHREAD_LIBS="-l$flag"
12460                 ;;
12461         esac
12462
12463         save_LIBS="$LIBS"
12464         save_CFLAGS="$CFLAGS"
12465         LIBS="$tryPTHREAD_LIBS $PTHREAD_LIBS $LIBS"
12466         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
12467
12468         # Check for various functions.  We must include pthread.h,
12469         # since some functions may be macros.  (On the Sequent, we
12470         # need a special flag -Kthread to make this header compile.)
12471         # We check for pthread_join because it is in -lpthread on IRIX
12472         # while pthread_create is in libc.  We check for pthread_attr_init
12473         # due to DEC craziness with -lpthreads.  We check for
12474         # pthread_cleanup_push because it is one of the few pthread
12475         # functions on Solaris that doesn't have a non-functional libc stub.
12476         # We try pthread_create on general principles.
12477         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12478 /* end confdefs.h.  */
12479 #include <pthread.h>
12480 int
12481 main ()
12482 {
12483 pthread_t th; pthread_join(th, 0);
12484                      pthread_attr_init(0); pthread_cleanup_push(0, 0);
12485                      pthread_create(0,0,0,0); pthread_cleanup_pop(0);
12486   ;
12487   return 0;
12488 }
12489 _ACEOF
12490 if ac_fn_c_try_link "$LINENO"; then :
12491   acx_pthread_ok=yes
12492 else
12493   acx_pthread_ok=no
12494 fi
12495 rm -f core conftest.err conftest.$ac_objext \
12496     conftest$ac_exeext conftest.$ac_ext
12497
12498         if test "x$acx_pthread_ok" = xyes; then
12499             # Don't use options that are ignored by the compiler.
12500             # We find them by checking stderror.
12501             cat >conftest.$ac_ext <<_ACEOF
12502 int
12503 main (int argc, char **argv)
12504 {
12505   (void) argc;
12506   (void) argv;
12507   return 0;
12508 }
12509 _ACEOF
12510             rm -f conftest.$ac_objext conftest$ac_exeext
12511             # Check both linking and compiling, because they might tolerate different options.
12512             if test "`(eval $ac_link 2>&1 1>&5)`" = "" && test "`(eval $ac_compile 2>&1 1>&5)`" = ""; then
12513                 # we continue with more flags because Linux needs -lpthread
12514                 # for libpq builds on PostgreSQL.  The test above only
12515                 # tests for building binaries, not shared libraries.
12516                 PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
12517                 PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
12518             else   acx_pthread_ok=no
12519             fi
12520         fi
12521
12522         LIBS="$save_LIBS"
12523         CFLAGS="$save_CFLAGS"
12524
12525         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5
12526 $as_echo "$acx_pthread_ok" >&6; }
12527 done
12528 fi
12529
12530 # Various other checks:
12531 if test "x$acx_pthread_ok" = xyes; then
12532         save_LIBS="$LIBS"
12533         LIBS="$PTHREAD_LIBS $LIBS"
12534         save_CFLAGS="$CFLAGS"
12535         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
12536
12537         # Detect AIX lossage: threads are created detached by default
12538         # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
12539         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
12540 $as_echo_n "checking for joinable pthread attribute... " >&6; }
12541         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12542 /* end confdefs.h.  */
12543 #include <pthread.h>
12544 int
12545 main ()
12546 {
12547 int attr=PTHREAD_CREATE_JOINABLE;
12548   ;
12549   return 0;
12550 }
12551 _ACEOF
12552 if ac_fn_c_try_link "$LINENO"; then :
12553   ok=PTHREAD_CREATE_JOINABLE
12554 else
12555   ok=unknown
12556 fi
12557 rm -f core conftest.err conftest.$ac_objext \
12558     conftest$ac_exeext conftest.$ac_ext
12559         if test x"$ok" = xunknown; then
12560                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12561 /* end confdefs.h.  */
12562 #include <pthread.h>
12563 int
12564 main ()
12565 {
12566 int attr=PTHREAD_CREATE_UNDETACHED;
12567   ;
12568   return 0;
12569 }
12570 _ACEOF
12571 if ac_fn_c_try_link "$LINENO"; then :
12572   ok=PTHREAD_CREATE_UNDETACHED
12573 else
12574   ok=unknown
12575 fi
12576 rm -f core conftest.err conftest.$ac_objext \
12577     conftest$ac_exeext conftest.$ac_ext
12578         fi
12579         if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
12580
12581 $as_echo "#define PTHREAD_CREATE_JOINABLE \$ok" >>confdefs.h
12582
12583         fi
12584         { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ok}" >&5
12585 $as_echo "${ok}" >&6; }
12586         if test x"$ok" = xunknown; then
12587                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: we do not know how to create joinable pthreads" >&5
12588 $as_echo "$as_me: WARNING: we do not know how to create joinable pthreads" >&2;}
12589         fi
12590
12591         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
12592 $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
12593         flag=no
12594 # We always add these in PostgreSQL
12595 #       case "${host_cpu}-${host_os}" in
12596 #               *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
12597 #               *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
12598 #       esac
12599         { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${flag}" >&5
12600 $as_echo "${flag}" >&6; }
12601         if test "x$flag" != xno; then
12602                 PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
12603         fi
12604
12605         LIBS="$save_LIBS"
12606         CFLAGS="$save_CFLAGS"
12607
12608 # Supporting cc_r would require a special CC in all places that
12609 # use libpq, and that is ugly, so we don't do it.  Users can still
12610 # define their compiler as cc_r to do thread builds of everything.
12611         # More AIX lossage: must compile with cc_r
12612         # Extract the first word of "cc_r", so it can be a program name with args.
12613 set dummy cc_r; ac_word=$2
12614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12615 $as_echo_n "checking for $ac_word... " >&6; }
12616 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
12617   $as_echo_n "(cached) " >&6
12618 else
12619   if test -n "$PTHREAD_CC"; then
12620   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
12621 else
12622 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12623 for as_dir in $PATH
12624 do
12625   IFS=$as_save_IFS
12626   test -z "$as_dir" && as_dir=.
12627     for ac_exec_ext in '' $ac_executable_extensions; do
12628   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12629     ac_cv_prog_PTHREAD_CC="cc_r"
12630     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12631     break 2
12632   fi
12633 done
12634   done
12635 IFS=$as_save_IFS
12636
12637   test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}"
12638 fi
12639 fi
12640 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
12641 if test -n "$PTHREAD_CC"; then
12642   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
12643 $as_echo "$PTHREAD_CC" >&6; }
12644 else
12645   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12646 $as_echo "no" >&6; }
12647 fi
12648
12649
12650 else
12651         PTHREAD_CC="$CC"
12652 fi
12653
12654
12655
12656
12657
12658 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
12659 if test x"$acx_pthread_ok" = xyes; then
12660
12661 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
12662
12663         :
12664 else
12665         acx_pthread_ok=no
12666
12667 fi
12668 ac_ext=c
12669 ac_cpp='$CPP $CPPFLAGS'
12670 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12671 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12672 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12673
12674         # set thread flags
12675
12676 # Some platforms use these, so just define them.  They can't hurt if they
12677 # are not supported.  For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
12678 # enables 5-arg getpwuid_r, among other things.
12679 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
12680
12681
12682 # At this point, we don't want to muck with the compiler name for threading.
12683 # Let's see who fails, perhaps AIX.  2004-04-23
12684 if test "$PTHREAD_CC" != "$CC"; then
12685 as_fn_error $? "
12686 PostgreSQL does not support platforms that require a special compiler
12687 for thread safety;  use --disable-thread-safety to disable thread safety." "$LINENO" 5
12688 fi
12689
12690 # Check for *_r functions
12691 _CFLAGS="$CFLAGS"
12692 _LIBS="$LIBS"
12693 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
12694 LIBS="$LIBS $PTHREAD_LIBS"
12695
12696 if test "$PORTNAME" != "win32"; then
12697 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
12698 if test "x$ac_cv_header_pthread_h" = xyes; then :
12699
12700 else
12701   as_fn_error $? "
12702 pthread.h not found;  use --disable-thread-safety to disable thread safety" "$LINENO" 5
12703 fi
12704
12705
12706 fi
12707
12708 for ac_func in strerror_r getpwuid_r gethostbyname_r
12709 do :
12710   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12711 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12712 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12713   cat >>confdefs.h <<_ACEOF
12714 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12715 _ACEOF
12716
12717 fi
12718 done
12719
12720
12721 # Do test here with the proper thread flags
12722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpwuid_r takes a fifth argument" >&5
12723 $as_echo_n "checking whether getpwuid_r takes a fifth argument... " >&6; }
12724 if ${pgac_cv_func_getpwuid_r_5arg+:} false; then :
12725   $as_echo_n "(cached) " >&6
12726 else
12727   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12728 /* end confdefs.h.  */
12729 #include <sys/types.h>
12730 #include <pwd.h>
12731 int
12732 main ()
12733 {
12734 uid_t uid;
12735 struct passwd *space;
12736 char *buf;
12737 size_t bufsize;
12738 struct passwd **result;
12739 getpwuid_r(uid, space, buf, bufsize, result);
12740   ;
12741   return 0;
12742 }
12743 _ACEOF
12744 if ac_fn_c_try_compile "$LINENO"; then :
12745   pgac_cv_func_getpwuid_r_5arg=yes
12746 else
12747   pgac_cv_func_getpwuid_r_5arg=no
12748 fi
12749 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12750 fi
12751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_getpwuid_r_5arg" >&5
12752 $as_echo "$pgac_cv_func_getpwuid_r_5arg" >&6; }
12753 if test x"$pgac_cv_func_getpwuid_r_5arg" = xyes ; then
12754
12755 $as_echo "#define GETPWUID_R_5ARG 1" >>confdefs.h
12756
12757 fi
12758
12759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
12760 $as_echo_n "checking whether strerror_r returns int... " >&6; }
12761 if ${pgac_cv_func_strerror_r_int+:} false; then :
12762   $as_echo_n "(cached) " >&6
12763 else
12764   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12765 /* end confdefs.h.  */
12766 #include <string.h>
12767 int
12768 main ()
12769 {
12770 #ifndef _AIX
12771 int strerror_r(int, char *, size_t);
12772 #else
12773 /* Older AIX has 'int' for the third argument so we don't test the args. */
12774 int strerror_r();
12775 #endif
12776   ;
12777   return 0;
12778 }
12779 _ACEOF
12780 if ac_fn_c_try_compile "$LINENO"; then :
12781   pgac_cv_func_strerror_r_int=yes
12782 else
12783   pgac_cv_func_strerror_r_int=no
12784 fi
12785 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12786 fi
12787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
12788 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
12789 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
12790
12791 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
12792
12793 fi
12794
12795
12796 CFLAGS="$_CFLAGS"
12797 LIBS="$_LIBS"
12798
12799 else
12800 # do not use values from template file
12801 PTHREAD_CFLAGS=
12802 PTHREAD_LIBS=
12803 fi
12804
12805
12806
12807
12808
12809 # We can test for libldap_r only after we know PTHREAD_LIBS
12810 if test "$with_ldap" = yes ; then
12811   _LIBS="$LIBS"
12812   if test "$PORTNAME" != "win32"; then
12813     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
12814 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
12815 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
12816   $as_echo_n "(cached) " >&6
12817 else
12818   ac_check_lib_save_LIBS=$LIBS
12819 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
12820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12821 /* end confdefs.h.  */
12822
12823 /* Override any GCC internal prototype to avoid an error.
12824    Use char because int might match the return type of a GCC
12825    builtin and then its argument prototype would still apply.  */
12826 #ifdef __cplusplus
12827 extern "C"
12828 #endif
12829 char ldap_bind ();
12830 int
12831 main ()
12832 {
12833 return ldap_bind ();
12834   ;
12835   return 0;
12836 }
12837 _ACEOF
12838 if ac_fn_c_try_link "$LINENO"; then :
12839   ac_cv_lib_ldap_ldap_bind=yes
12840 else
12841   ac_cv_lib_ldap_ldap_bind=no
12842 fi
12843 rm -f core conftest.err conftest.$ac_objext \
12844     conftest$ac_exeext conftest.$ac_ext
12845 LIBS=$ac_check_lib_save_LIBS
12846 fi
12847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
12848 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
12849 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
12850   cat >>confdefs.h <<_ACEOF
12851 #define HAVE_LIBLDAP 1
12852 _ACEOF
12853
12854   LIBS="-lldap $LIBS"
12855
12856 else
12857   as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
12858 fi
12859
12860     LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
12861     if test "$enable_thread_safety" = yes; then
12862       # on some platforms ldap_r fails to link without PTHREAD_LIBS
12863       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_simple_bind in -lldap_r" >&5
12864 $as_echo_n "checking for ldap_simple_bind in -lldap_r... " >&6; }
12865 if ${ac_cv_lib_ldap_r_ldap_simple_bind+:} false; then :
12866   $as_echo_n "(cached) " >&6
12867 else
12868   ac_check_lib_save_LIBS=$LIBS
12869 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
12870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12871 /* end confdefs.h.  */
12872
12873 /* Override any GCC internal prototype to avoid an error.
12874    Use char because int might match the return type of a GCC
12875    builtin and then its argument prototype would still apply.  */
12876 #ifdef __cplusplus
12877 extern "C"
12878 #endif
12879 char ldap_simple_bind ();
12880 int
12881 main ()
12882 {
12883 return ldap_simple_bind ();
12884   ;
12885   return 0;
12886 }
12887 _ACEOF
12888 if ac_fn_c_try_link "$LINENO"; then :
12889   ac_cv_lib_ldap_r_ldap_simple_bind=yes
12890 else
12891   ac_cv_lib_ldap_r_ldap_simple_bind=no
12892 fi
12893 rm -f core conftest.err conftest.$ac_objext \
12894     conftest$ac_exeext conftest.$ac_ext
12895 LIBS=$ac_check_lib_save_LIBS
12896 fi
12897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
12898 $as_echo "$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
12899 if test "x$ac_cv_lib_ldap_r_ldap_simple_bind" = xyes; then :
12900   cat >>confdefs.h <<_ACEOF
12901 #define HAVE_LIBLDAP_R 1
12902 _ACEOF
12903
12904   LIBS="-lldap_r $LIBS"
12905
12906 else
12907   as_fn_error $? "library 'ldap_r' is required for LDAP" "$LINENO" 5
12908 fi
12909
12910       LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
12911     else
12912       LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
12913     fi
12914   else
12915     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
12916 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
12917 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
12918   $as_echo_n "(cached) " >&6
12919 else
12920   ac_check_lib_save_LIBS=$LIBS
12921 LIBS="-lwldap32  $LIBS"
12922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12923 /* end confdefs.h.  */
12924
12925 /* Override any GCC internal prototype to avoid an error.
12926    Use char because int might match the return type of a GCC
12927    builtin and then its argument prototype would still apply.  */
12928 #ifdef __cplusplus
12929 extern "C"
12930 #endif
12931 char ldap_bind ();
12932 int
12933 main ()
12934 {
12935 return ldap_bind ();
12936   ;
12937   return 0;
12938 }
12939 _ACEOF
12940 if ac_fn_c_try_link "$LINENO"; then :
12941   ac_cv_lib_wldap32_ldap_bind=yes
12942 else
12943   ac_cv_lib_wldap32_ldap_bind=no
12944 fi
12945 rm -f core conftest.err conftest.$ac_objext \
12946     conftest$ac_exeext conftest.$ac_ext
12947 LIBS=$ac_check_lib_save_LIBS
12948 fi
12949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
12950 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
12951 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
12952   cat >>confdefs.h <<_ACEOF
12953 #define HAVE_LIBWLDAP32 1
12954 _ACEOF
12955
12956   LIBS="-lwldap32 $LIBS"
12957
12958 else
12959   as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
12960 fi
12961
12962     LDAP_LIBS_FE="-lwldap32"
12963     LDAP_LIBS_BE="-lwldap32"
12964   fi
12965   LIBS="$_LIBS"
12966 fi
12967
12968
12969
12970
12971 # This test makes sure that run tests work at all.  Sometimes a shared
12972 # library is found by the linker, but the runtime linker can't find it.
12973 # This check should come after all modifications of compiler or linker
12974 # variables, and before any other run tests.
12975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
12976 $as_echo_n "checking test program... " >&6; }
12977 if test "$cross_compiling" = yes; then :
12978   { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
12979 $as_echo "cross-compiling" >&6; }
12980 else
12981   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12982 /* end confdefs.h.  */
12983 int main() { return 0; }
12984 _ACEOF
12985 if ac_fn_c_try_run "$LINENO"; then :
12986   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
12987 $as_echo "ok" >&6; }
12988 else
12989   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
12990 $as_echo "failed" >&6; }
12991 as_fn_error $? "
12992 Could not execute a simple test program.  This may be a problem
12993 related to locating shared libraries.  Check the file 'config.log'
12994 for the exact reason." "$LINENO" 5
12995 fi
12996 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12997   conftest.$ac_objext conftest.beam conftest.$ac_ext
12998 fi
12999
13000
13001 # --------------------
13002 # Run tests below here
13003 # --------------------
13004
13005 # Force use of our snprintf if system's doesn't do arg control
13006 # See comment above at snprintf test for details.
13007 if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
13008   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports argument control" >&5
13009 $as_echo_n "checking whether printf supports argument control... " >&6; }
13010 if ${pgac_cv_printf_arg_control+:} false; then :
13011   $as_echo_n "(cached) " >&6
13012 else
13013   if test "$cross_compiling" = yes; then :
13014   pgac_cv_printf_arg_control=cross
13015 else
13016   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13017 /* end confdefs.h.  */
13018 #include <stdio.h>
13019 #include <string.h>
13020
13021 int main()
13022 {
13023   char buf[100];
13024
13025   /* can it swap arguments? */
13026   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
13027   if (strcmp(buf, "4 3") != 0)
13028     return 1;
13029   return 0;
13030 }
13031 _ACEOF
13032 if ac_fn_c_try_run "$LINENO"; then :
13033   pgac_cv_printf_arg_control=yes
13034 else
13035   pgac_cv_printf_arg_control=no
13036 fi
13037 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13038   conftest.$ac_objext conftest.beam conftest.$ac_ext
13039 fi
13040
13041
13042 fi
13043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_arg_control" >&5
13044 $as_echo "$pgac_cv_printf_arg_control" >&6; }
13045
13046   if test $pgac_cv_printf_arg_control != yes ; then
13047     pgac_need_repl_snprintf=yes
13048   fi
13049 fi
13050
13051
13052
13053
13054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
13055 $as_echo_n "checking whether long int is 64 bits... " >&6; }
13056 if ${pgac_cv_type_long_int_64+:} false; then :
13057   $as_echo_n "(cached) " >&6
13058 else
13059   if test "$cross_compiling" = yes; then :
13060   # If cross-compiling, check the size reported by the compiler and
13061 # trust that the arithmetic works.
13062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13063 /* end confdefs.h.  */
13064
13065 int
13066 main ()
13067 {
13068 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
13069 test_array [0] = 0;
13070 return test_array [0];
13071
13072   ;
13073   return 0;
13074 }
13075 _ACEOF
13076 if ac_fn_c_try_compile "$LINENO"; then :
13077   pgac_cv_type_long_int_64=yes
13078 else
13079   pgac_cv_type_long_int_64=no
13080 fi
13081 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13082 else
13083   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13084 /* end confdefs.h.  */
13085 typedef long int ac_int64;
13086
13087 /*
13088  * These are globals to discourage the compiler from folding all the
13089  * arithmetic tests down to compile-time constants.
13090  */
13091 ac_int64 a = 20000001;
13092 ac_int64 b = 40000005;
13093
13094 int does_int64_work()
13095 {
13096   ac_int64 c,d;
13097
13098   if (sizeof(ac_int64) != 8)
13099     return 0;                   /* definitely not the right size */
13100
13101   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
13102   c = a * b;
13103   d = (c + b) / b;
13104   if (d != a+1)
13105     return 0;
13106   return 1;
13107 }
13108 main() {
13109   exit(! does_int64_work());
13110 }
13111 _ACEOF
13112 if ac_fn_c_try_run "$LINENO"; then :
13113   pgac_cv_type_long_int_64=yes
13114 else
13115   pgac_cv_type_long_int_64=no
13116 fi
13117 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13118   conftest.$ac_objext conftest.beam conftest.$ac_ext
13119 fi
13120
13121 fi
13122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
13123 $as_echo "$pgac_cv_type_long_int_64" >&6; }
13124
13125 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
13126 if test x"$pgac_cv_type_long_int_64" = xyes ; then
13127
13128 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
13129
13130 fi
13131
13132
13133 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
13134   pg_int64_type="long int"
13135 else
13136   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
13137 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
13138 if ${pgac_cv_type_long_long_int_64+:} false; then :
13139   $as_echo_n "(cached) " >&6
13140 else
13141   if test "$cross_compiling" = yes; then :
13142   # If cross-compiling, check the size reported by the compiler and
13143 # trust that the arithmetic works.
13144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13145 /* end confdefs.h.  */
13146
13147 int
13148 main ()
13149 {
13150 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
13151 test_array [0] = 0;
13152 return test_array [0];
13153
13154   ;
13155   return 0;
13156 }
13157 _ACEOF
13158 if ac_fn_c_try_compile "$LINENO"; then :
13159   pgac_cv_type_long_long_int_64=yes
13160 else
13161   pgac_cv_type_long_long_int_64=no
13162 fi
13163 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13164 else
13165   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13166 /* end confdefs.h.  */
13167 typedef long long int ac_int64;
13168
13169 /*
13170  * These are globals to discourage the compiler from folding all the
13171  * arithmetic tests down to compile-time constants.
13172  */
13173 ac_int64 a = 20000001;
13174 ac_int64 b = 40000005;
13175
13176 int does_int64_work()
13177 {
13178   ac_int64 c,d;
13179
13180   if (sizeof(ac_int64) != 8)
13181     return 0;                   /* definitely not the right size */
13182
13183   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
13184   c = a * b;
13185   d = (c + b) / b;
13186   if (d != a+1)
13187     return 0;
13188   return 1;
13189 }
13190 main() {
13191   exit(! does_int64_work());
13192 }
13193 _ACEOF
13194 if ac_fn_c_try_run "$LINENO"; then :
13195   pgac_cv_type_long_long_int_64=yes
13196 else
13197   pgac_cv_type_long_long_int_64=no
13198 fi
13199 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13200   conftest.$ac_objext conftest.beam conftest.$ac_ext
13201 fi
13202
13203 fi
13204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
13205 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
13206
13207 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
13208 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
13209
13210 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
13211
13212 fi
13213
13214   if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
13215     pg_int64_type="long long int"
13216   else
13217     as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
13218   fi
13219 fi
13220
13221
13222 cat >>confdefs.h <<_ACEOF
13223 #define PG_INT64_TYPE $pg_int64_type
13224 _ACEOF
13225
13226
13227
13228 if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
13229   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13230 /* end confdefs.h.  */
13231
13232 #define INT64CONST(x)  x##LL
13233 long long int foo = INT64CONST(0x1234567890123456);
13234
13235 int
13236 main ()
13237 {
13238
13239   ;
13240   return 0;
13241 }
13242 _ACEOF
13243 if ac_fn_c_try_compile "$LINENO"; then :
13244
13245 $as_echo "#define HAVE_LL_CONSTANTS 1" >>confdefs.h
13246
13247 fi
13248 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13249 fi
13250
13251
13252 # If we found "long int" is 64 bits, assume snprintf handles it.  If
13253 # we found we need to use "long long int", better check.  We cope with
13254 # snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
13255 # work, fall back to our own snprintf emulation (which we know uses %lld).
13256
13257 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
13258   if test $pgac_need_repl_snprintf = no; then
13259     { $as_echo "$as_me:${as_lineno-$LINENO}: checking snprintf format for long long int" >&5
13260 $as_echo_n "checking snprintf format for long long int... " >&6; }
13261 if ${pgac_cv_snprintf_long_long_int_format+:} false; then :
13262   $as_echo_n "(cached) " >&6
13263 else
13264   for pgac_format in '%lld' '%qd' '%I64d'; do
13265 if test "$cross_compiling" = yes; then :
13266   pgac_cv_snprintf_long_long_int_format=cross; break
13267 else
13268   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13269 /* end confdefs.h.  */
13270 #include <stdio.h>
13271 typedef long long int ac_int64;
13272 #define INT64_FORMAT "$pgac_format"
13273
13274 ac_int64 a = 20000001;
13275 ac_int64 b = 40000005;
13276
13277 int does_int64_snprintf_work()
13278 {
13279   ac_int64 c;
13280   char buf[100];
13281
13282   if (sizeof(ac_int64) != 8)
13283     return 0;                   /* doesn't look like the right size */
13284
13285   c = a * b;
13286   snprintf(buf, 100, INT64_FORMAT, c);
13287   if (strcmp(buf, "800000140000005") != 0)
13288     return 0;                   /* either multiply or snprintf is busted */
13289   return 1;
13290 }
13291 main() {
13292   exit(! does_int64_snprintf_work());
13293 }
13294 _ACEOF
13295 if ac_fn_c_try_run "$LINENO"; then :
13296   pgac_cv_snprintf_long_long_int_format=$pgac_format; break
13297 fi
13298 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13299   conftest.$ac_objext conftest.beam conftest.$ac_ext
13300 fi
13301
13302 done
13303 fi
13304
13305 LONG_LONG_INT_FORMAT=''
13306
13307 case $pgac_cv_snprintf_long_long_int_format in
13308   cross) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot test (not on host machine)" >&5
13309 $as_echo "cannot test (not on host machine)" >&6; };;
13310   ?*)    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_long_long_int_format" >&5
13311 $as_echo "$pgac_cv_snprintf_long_long_int_format" >&6; }
13312          LONG_LONG_INT_FORMAT=$pgac_cv_snprintf_long_long_int_format;;
13313   *)     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13314 $as_echo "none" >&6; };;
13315 esac
13316     if test "$LONG_LONG_INT_FORMAT" = ""; then
13317       # Force usage of our own snprintf, since system snprintf is broken
13318       pgac_need_repl_snprintf=yes
13319       LONG_LONG_INT_FORMAT='%lld'
13320     fi
13321   else
13322     # Here if we previously decided we needed to use our own snprintf
13323     LONG_LONG_INT_FORMAT='%lld'
13324   fi
13325   LONG_LONG_UINT_FORMAT=`echo "$LONG_LONG_INT_FORMAT" | sed 's/d$/u/'`
13326   INT64_FORMAT="\"$LONG_LONG_INT_FORMAT\""
13327   UINT64_FORMAT="\"$LONG_LONG_UINT_FORMAT\""
13328 else
13329   # Here if we are not using 'long long int' at all
13330   INT64_FORMAT='"%ld"'
13331   UINT64_FORMAT='"%lu"'
13332 fi
13333
13334
13335 cat >>confdefs.h <<_ACEOF
13336 #define INT64_FORMAT $INT64_FORMAT
13337 _ACEOF
13338
13339
13340
13341 cat >>confdefs.h <<_ACEOF
13342 #define UINT64_FORMAT $UINT64_FORMAT
13343 _ACEOF
13344
13345
13346 # Now we have checked all the reasons to replace snprintf
13347 if test $pgac_need_repl_snprintf = yes; then
13348
13349 $as_echo "#define USE_REPL_SNPRINTF 1" >>confdefs.h
13350
13351   case " $LIBOBJS " in
13352   *" snprintf.$ac_objext "* ) ;;
13353   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
13354  ;;
13355 esac
13356
13357 fi
13358
13359 # Check size of void *, size_t (enables tweaks for > 32bit address space)
13360 # The cast to long int works around a bug in the HP C Compiler
13361 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13362 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13363 # This bug is HP SR number 8606223364.
13364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
13365 $as_echo_n "checking size of void *... " >&6; }
13366 if ${ac_cv_sizeof_void_p+:} false; then :
13367   $as_echo_n "(cached) " >&6
13368 else
13369   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
13370
13371 else
13372   if test "$ac_cv_type_void_p" = yes; then
13373      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13374 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13375 as_fn_error 77 "cannot compute sizeof (void *)
13376 See \`config.log' for more details" "$LINENO" 5; }
13377    else
13378      ac_cv_sizeof_void_p=0
13379    fi
13380 fi
13381
13382 fi
13383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
13384 $as_echo "$ac_cv_sizeof_void_p" >&6; }
13385
13386
13387
13388 cat >>confdefs.h <<_ACEOF
13389 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
13390 _ACEOF
13391
13392
13393 # The cast to long int works around a bug in the HP C Compiler
13394 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13395 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13396 # This bug is HP SR number 8606223364.
13397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
13398 $as_echo_n "checking size of size_t... " >&6; }
13399 if ${ac_cv_sizeof_size_t+:} false; then :
13400   $as_echo_n "(cached) " >&6
13401 else
13402   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
13403
13404 else
13405   if test "$ac_cv_type_size_t" = yes; then
13406      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13407 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13408 as_fn_error 77 "cannot compute sizeof (size_t)
13409 See \`config.log' for more details" "$LINENO" 5; }
13410    else
13411      ac_cv_sizeof_size_t=0
13412    fi
13413 fi
13414
13415 fi
13416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
13417 $as_echo "$ac_cv_sizeof_size_t" >&6; }
13418
13419
13420
13421 cat >>confdefs.h <<_ACEOF
13422 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
13423 _ACEOF
13424
13425
13426 # The cast to long int works around a bug in the HP C Compiler
13427 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13428 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13429 # This bug is HP SR number 8606223364.
13430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
13431 $as_echo_n "checking size of long... " >&6; }
13432 if ${ac_cv_sizeof_long+:} false; then :
13433   $as_echo_n "(cached) " >&6
13434 else
13435   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
13436
13437 else
13438   if test "$ac_cv_type_long" = yes; then
13439      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13440 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13441 as_fn_error 77 "cannot compute sizeof (long)
13442 See \`config.log' for more details" "$LINENO" 5; }
13443    else
13444      ac_cv_sizeof_long=0
13445    fi
13446 fi
13447
13448 fi
13449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
13450 $as_echo "$ac_cv_sizeof_long" >&6; }
13451
13452
13453
13454 cat >>confdefs.h <<_ACEOF
13455 #define SIZEOF_LONG $ac_cv_sizeof_long
13456 _ACEOF
13457
13458
13459
13460 # Decide whether float4 is passed by value: user-selectable, enabled by default
13461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float4 passed by value" >&5
13462 $as_echo_n "checking whether to build with float4 passed by value... " >&6; }
13463
13464
13465 # Check whether --enable-float4-byval was given.
13466 if test "${enable_float4_byval+set}" = set; then :
13467   enableval=$enable_float4_byval;
13468   case $enableval in
13469     yes)
13470
13471 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
13472
13473                float4passbyval=true
13474       ;;
13475     no)
13476       float4passbyval=false
13477       ;;
13478     *)
13479       as_fn_error $? "no argument expected for --enable-float4-byval option" "$LINENO" 5
13480       ;;
13481   esac
13482
13483 else
13484   enable_float4_byval=yes
13485
13486 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
13487
13488                float4passbyval=true
13489 fi
13490
13491
13492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float4_byval" >&5
13493 $as_echo "$enable_float4_byval" >&6; }
13494
13495 cat >>confdefs.h <<_ACEOF
13496 #define FLOAT4PASSBYVAL $float4passbyval
13497 _ACEOF
13498
13499
13500 # Decide whether float8 is passed by value.
13501 # Note: this setting also controls int8 and related types such as timestamp.
13502 # If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
13503 # If not, trying to select it is an error.
13504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float8 passed by value" >&5
13505 $as_echo_n "checking whether to build with float8 passed by value... " >&6; }
13506 if test $ac_cv_sizeof_void_p -ge 8 ; then
13507
13508
13509 # Check whether --enable-float8-byval was given.
13510 if test "${enable_float8_byval+set}" = set; then :
13511   enableval=$enable_float8_byval;
13512   case $enableval in
13513     yes)
13514       :
13515       ;;
13516     no)
13517       :
13518       ;;
13519     *)
13520       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
13521       ;;
13522   esac
13523
13524 else
13525   enable_float8_byval=yes
13526
13527 fi
13528
13529
13530 else
13531
13532
13533 # Check whether --enable-float8-byval was given.
13534 if test "${enable_float8_byval+set}" = set; then :
13535   enableval=$enable_float8_byval;
13536   case $enableval in
13537     yes)
13538       :
13539       ;;
13540     no)
13541       :
13542       ;;
13543     *)
13544       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
13545       ;;
13546   esac
13547
13548 else
13549   enable_float8_byval=no
13550
13551 fi
13552
13553
13554   if test "$enable_float8_byval" = yes ; then
13555     as_fn_error $? "--enable-float8-byval is not supported on 32-bit platforms." "$LINENO" 5
13556   fi
13557 fi
13558 if test "$enable_float8_byval" = yes ; then
13559
13560 $as_echo "#define USE_FLOAT8_BYVAL 1" >>confdefs.h
13561
13562   float8passbyval=true
13563 else
13564   float8passbyval=false
13565 fi
13566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float8_byval" >&5
13567 $as_echo "$enable_float8_byval" >&6; }
13568
13569 cat >>confdefs.h <<_ACEOF
13570 #define FLOAT8PASSBYVAL $float8passbyval
13571 _ACEOF
13572
13573
13574 # Determine memory alignment requirements for the basic C data types.
13575
13576 # The cast to long int works around a bug in the HP C Compiler,
13577 # see AC_CHECK_SIZEOF for more information.
13578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
13579 $as_echo_n "checking alignment of short... " >&6; }
13580 if ${ac_cv_alignof_short+:} false; then :
13581   $as_echo_n "(cached) " >&6
13582 else
13583   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short"        "$ac_includes_default
13584 #ifndef offsetof
13585 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13586 #endif
13587 typedef struct { char x; short y; } ac__type_alignof_;"; then :
13588
13589 else
13590   if test "$ac_cv_type_short" = yes; then
13591      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13592 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13593 as_fn_error 77 "cannot compute alignment of short
13594 See \`config.log' for more details" "$LINENO" 5; }
13595    else
13596      ac_cv_alignof_short=0
13597    fi
13598 fi
13599
13600 fi
13601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
13602 $as_echo "$ac_cv_alignof_short" >&6; }
13603
13604
13605
13606 cat >>confdefs.h <<_ACEOF
13607 #define ALIGNOF_SHORT $ac_cv_alignof_short
13608 _ACEOF
13609
13610
13611 # The cast to long int works around a bug in the HP C Compiler,
13612 # see AC_CHECK_SIZEOF for more information.
13613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
13614 $as_echo_n "checking alignment of int... " >&6; }
13615 if ${ac_cv_alignof_int+:} false; then :
13616   $as_echo_n "(cached) " >&6
13617 else
13618   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int"        "$ac_includes_default
13619 #ifndef offsetof
13620 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13621 #endif
13622 typedef struct { char x; int y; } ac__type_alignof_;"; then :
13623
13624 else
13625   if test "$ac_cv_type_int" = yes; then
13626      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13627 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13628 as_fn_error 77 "cannot compute alignment of int
13629 See \`config.log' for more details" "$LINENO" 5; }
13630    else
13631      ac_cv_alignof_int=0
13632    fi
13633 fi
13634
13635 fi
13636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
13637 $as_echo "$ac_cv_alignof_int" >&6; }
13638
13639
13640
13641 cat >>confdefs.h <<_ACEOF
13642 #define ALIGNOF_INT $ac_cv_alignof_int
13643 _ACEOF
13644
13645
13646 # The cast to long int works around a bug in the HP C Compiler,
13647 # see AC_CHECK_SIZEOF for more information.
13648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
13649 $as_echo_n "checking alignment of long... " >&6; }
13650 if ${ac_cv_alignof_long+:} false; then :
13651   $as_echo_n "(cached) " >&6
13652 else
13653   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long"        "$ac_includes_default
13654 #ifndef offsetof
13655 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13656 #endif
13657 typedef struct { char x; long y; } ac__type_alignof_;"; then :
13658
13659 else
13660   if test "$ac_cv_type_long" = yes; then
13661      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13662 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13663 as_fn_error 77 "cannot compute alignment of long
13664 See \`config.log' for more details" "$LINENO" 5; }
13665    else
13666      ac_cv_alignof_long=0
13667    fi
13668 fi
13669
13670 fi
13671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
13672 $as_echo "$ac_cv_alignof_long" >&6; }
13673
13674
13675
13676 cat >>confdefs.h <<_ACEOF
13677 #define ALIGNOF_LONG $ac_cv_alignof_long
13678 _ACEOF
13679
13680
13681 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
13682   # The cast to long int works around a bug in the HP C Compiler,
13683 # see AC_CHECK_SIZEOF for more information.
13684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
13685 $as_echo_n "checking alignment of long long int... " >&6; }
13686 if ${ac_cv_alignof_long_long_int+:} false; then :
13687   $as_echo_n "(cached) " >&6
13688 else
13689   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int"        "$ac_includes_default
13690 #ifndef offsetof
13691 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13692 #endif
13693 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
13694
13695 else
13696   if test "$ac_cv_type_long_long_int" = yes; then
13697      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13698 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13699 as_fn_error 77 "cannot compute alignment of long long int
13700 See \`config.log' for more details" "$LINENO" 5; }
13701    else
13702      ac_cv_alignof_long_long_int=0
13703    fi
13704 fi
13705
13706 fi
13707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
13708 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
13709
13710
13711
13712 cat >>confdefs.h <<_ACEOF
13713 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
13714 _ACEOF
13715
13716
13717 fi
13718 # The cast to long int works around a bug in the HP C Compiler,
13719 # see AC_CHECK_SIZEOF for more information.
13720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
13721 $as_echo_n "checking alignment of double... " >&6; }
13722 if ${ac_cv_alignof_double+:} false; then :
13723   $as_echo_n "(cached) " >&6
13724 else
13725   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double"        "$ac_includes_default
13726 #ifndef offsetof
13727 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13728 #endif
13729 typedef struct { char x; double y; } ac__type_alignof_;"; then :
13730
13731 else
13732   if test "$ac_cv_type_double" = yes; then
13733      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13734 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13735 as_fn_error 77 "cannot compute alignment of double
13736 See \`config.log' for more details" "$LINENO" 5; }
13737    else
13738      ac_cv_alignof_double=0
13739    fi
13740 fi
13741
13742 fi
13743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
13744 $as_echo "$ac_cv_alignof_double" >&6; }
13745
13746
13747
13748 cat >>confdefs.h <<_ACEOF
13749 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
13750 _ACEOF
13751
13752
13753
13754 # Compute maximum alignment of any basic type.
13755 # We assume long's alignment is at least as strong as char, short, or int;
13756 # but we must check long long (if it exists) and double.
13757
13758 MAX_ALIGNOF=$ac_cv_alignof_long
13759 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
13760   MAX_ALIGNOF=$ac_cv_alignof_double
13761 fi
13762 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
13763   MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
13764 fi
13765
13766 cat >>confdefs.h <<_ACEOF
13767 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
13768 _ACEOF
13769
13770
13771
13772 # Some platforms predefine the types int8, int16, etc.  Only check
13773 # a (hopefully) representative subset.
13774 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
13775 "
13776 if test "x$ac_cv_type_int8" = xyes; then :
13777
13778 cat >>confdefs.h <<_ACEOF
13779 #define HAVE_INT8 1
13780 _ACEOF
13781
13782
13783 fi
13784 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
13785 "
13786 if test "x$ac_cv_type_uint8" = xyes; then :
13787
13788 cat >>confdefs.h <<_ACEOF
13789 #define HAVE_UINT8 1
13790 _ACEOF
13791
13792
13793 fi
13794 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
13795 "
13796 if test "x$ac_cv_type_int64" = xyes; then :
13797
13798 cat >>confdefs.h <<_ACEOF
13799 #define HAVE_INT64 1
13800 _ACEOF
13801
13802
13803 fi
13804 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
13805 "
13806 if test "x$ac_cv_type_uint64" = xyes; then :
13807
13808 cat >>confdefs.h <<_ACEOF
13809 #define HAVE_UINT64 1
13810 _ACEOF
13811
13812
13813 fi
13814
13815
13816 # We also check for sig_atomic_t, which *should* be defined per ANSI
13817 # C, but is missing on some old platforms.
13818 ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "#include <signal.h>
13819 "
13820 if test "x$ac_cv_type_sig_atomic_t" = xyes; then :
13821
13822 cat >>confdefs.h <<_ACEOF
13823 #define HAVE_SIG_ATOMIC_T 1
13824 _ACEOF
13825
13826
13827 fi
13828
13829
13830
13831 if test "$PORTNAME" != "win32"
13832 then
13833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for POSIX signal interface" >&5
13834 $as_echo_n "checking for POSIX signal interface... " >&6; }
13835 if ${pgac_cv_func_posix_signals+:} false; then :
13836   $as_echo_n "(cached) " >&6
13837 else
13838   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13839 /* end confdefs.h.  */
13840 #include <signal.h>
13841
13842 int
13843 main ()
13844 {
13845 struct sigaction act, oact;
13846 sigemptyset(&act.sa_mask);
13847 act.sa_flags = SA_RESTART;
13848 sigaction(0, &act, &oact);
13849   ;
13850   return 0;
13851 }
13852 _ACEOF
13853 if ac_fn_c_try_link "$LINENO"; then :
13854   pgac_cv_func_posix_signals=yes
13855 else
13856   pgac_cv_func_posix_signals=no
13857 fi
13858 rm -f core conftest.err conftest.$ac_objext \
13859     conftest$ac_exeext conftest.$ac_ext
13860 fi
13861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_posix_signals" >&5
13862 $as_echo "$pgac_cv_func_posix_signals" >&6; }
13863 if test x"$pgac_cv_func_posix_signals" = xyes ; then
13864
13865 $as_echo "#define HAVE_POSIX_SIGNALS 1" >>confdefs.h
13866
13867 fi
13868 HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
13869
13870 if test "$pgac_cv_func_posix_signals" != yes -a "$enable_thread_safety" = yes; then
13871   as_fn_error $? "
13872 Thread-safety requires POSIX signals, which are not supported by this
13873 operating system;  use --disable-thread-safety to disable thread safety." "$LINENO" 5
13874 fi
13875 fi
13876
13877
13878 # Select semaphore implementation type.
13879 if test "$PORTNAME" != "win32"; then
13880   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
13881
13882 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
13883
13884     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
13885   else
13886     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
13887
13888 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
13889
13890       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
13891     else
13892
13893 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
13894
13895       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
13896     fi
13897   fi
13898 else
13899
13900 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
13901
13902   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
13903 fi
13904
13905
13906 # Select shared-memory implementation type.
13907 if test "$PORTNAME" != "win32"; then
13908
13909 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
13910
13911   SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
13912 else
13913
13914 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
13915
13916   SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
13917 fi
13918
13919 # Select latch implementation type.
13920 if test "$PORTNAME" != "win32"; then
13921   LATCH_IMPLEMENTATION="src/backend/port/unix_latch.c"
13922 else
13923   LATCH_IMPLEMENTATION="src/backend/port/win32_latch.c"
13924 fi
13925
13926 # If not set in template file, set bytes to use libc memset()
13927 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
13928   MEMSET_LOOP_LIMIT=1024
13929 fi
13930
13931 cat >>confdefs.h <<_ACEOF
13932 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
13933 _ACEOF
13934
13935
13936
13937 if test "$enable_nls" = yes ; then
13938
13939   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
13940 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
13941 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
13942   $as_echo_n "(cached) " >&6
13943 else
13944   ac_func_search_save_LIBS=$LIBS
13945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13946 /* end confdefs.h.  */
13947
13948 /* Override any GCC internal prototype to avoid an error.
13949    Use char because int might match the return type of a GCC
13950    builtin and then its argument prototype would still apply.  */
13951 #ifdef __cplusplus
13952 extern "C"
13953 #endif
13954 char bind_textdomain_codeset ();
13955 int
13956 main ()
13957 {
13958 return bind_textdomain_codeset ();
13959   ;
13960   return 0;
13961 }
13962 _ACEOF
13963 for ac_lib in '' intl; do
13964   if test -z "$ac_lib"; then
13965     ac_res="none required"
13966   else
13967     ac_res=-l$ac_lib
13968     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
13969   fi
13970   if ac_fn_c_try_link "$LINENO"; then :
13971   ac_cv_search_bind_textdomain_codeset=$ac_res
13972 fi
13973 rm -f core conftest.err conftest.$ac_objext \
13974     conftest$ac_exeext
13975   if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
13976   break
13977 fi
13978 done
13979 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
13980
13981 else
13982   ac_cv_search_bind_textdomain_codeset=no
13983 fi
13984 rm conftest.$ac_ext
13985 LIBS=$ac_func_search_save_LIBS
13986 fi
13987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
13988 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
13989 ac_res=$ac_cv_search_bind_textdomain_codeset
13990 if test "$ac_res" != no; then :
13991   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13992
13993 else
13994   as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
13995 fi
13996
13997   ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
13998 if test "x$ac_cv_header_libintl_h" = xyes; then :
13999
14000 else
14001   as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
14002 fi
14003
14004
14005   for ac_prog in msgfmt
14006 do
14007   # Extract the first word of "$ac_prog", so it can be a program name with args.
14008 set dummy $ac_prog; ac_word=$2
14009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14010 $as_echo_n "checking for $ac_word... " >&6; }
14011 if ${ac_cv_prog_MSGFMT+:} false; then :
14012   $as_echo_n "(cached) " >&6
14013 else
14014   if test -n "$MSGFMT"; then
14015   ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
14016 else
14017 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14018 for as_dir in $PATH
14019 do
14020   IFS=$as_save_IFS
14021   test -z "$as_dir" && as_dir=.
14022     for ac_exec_ext in '' $ac_executable_extensions; do
14023   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14024     ac_cv_prog_MSGFMT="$ac_prog"
14025     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14026     break 2
14027   fi
14028 done
14029   done
14030 IFS=$as_save_IFS
14031
14032 fi
14033 fi
14034 MSGFMT=$ac_cv_prog_MSGFMT
14035 if test -n "$MSGFMT"; then
14036   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
14037 $as_echo "$MSGFMT" >&6; }
14038 else
14039   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14040 $as_echo "no" >&6; }
14041 fi
14042
14043
14044   test -n "$MSGFMT" && break
14045 done
14046
14047   if test -z "$MSGFMT"; then
14048     as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
14049   fi
14050   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
14051 $as_echo_n "checking for msgfmt flags... " >&6; }
14052 if ${pgac_cv_msgfmt_flags+:} false; then :
14053   $as_echo_n "(cached) " >&6
14054 else
14055   if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
14056     pgac_cv_msgfmt_flags=-c
14057 fi
14058 fi
14059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
14060 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
14061   MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
14062
14063   for ac_prog in msgmerge
14064 do
14065   # Extract the first word of "$ac_prog", so it can be a program name with args.
14066 set dummy $ac_prog; ac_word=$2
14067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14068 $as_echo_n "checking for $ac_word... " >&6; }
14069 if ${ac_cv_prog_MSGMERGE+:} false; then :
14070   $as_echo_n "(cached) " >&6
14071 else
14072   if test -n "$MSGMERGE"; then
14073   ac_cv_prog_MSGMERGE="$MSGMERGE" # Let the user override the test.
14074 else
14075 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14076 for as_dir in $PATH
14077 do
14078   IFS=$as_save_IFS
14079   test -z "$as_dir" && as_dir=.
14080     for ac_exec_ext in '' $ac_executable_extensions; do
14081   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14082     ac_cv_prog_MSGMERGE="$ac_prog"
14083     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14084     break 2
14085   fi
14086 done
14087   done
14088 IFS=$as_save_IFS
14089
14090 fi
14091 fi
14092 MSGMERGE=$ac_cv_prog_MSGMERGE
14093 if test -n "$MSGMERGE"; then
14094   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
14095 $as_echo "$MSGMERGE" >&6; }
14096 else
14097   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14098 $as_echo "no" >&6; }
14099 fi
14100
14101
14102   test -n "$MSGMERGE" && break
14103 done
14104
14105   for ac_prog in xgettext
14106 do
14107   # Extract the first word of "$ac_prog", so it can be a program name with args.
14108 set dummy $ac_prog; ac_word=$2
14109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14110 $as_echo_n "checking for $ac_word... " >&6; }
14111 if ${ac_cv_prog_XGETTEXT+:} false; then :
14112   $as_echo_n "(cached) " >&6
14113 else
14114   if test -n "$XGETTEXT"; then
14115   ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test.
14116 else
14117 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14118 for as_dir in $PATH
14119 do
14120   IFS=$as_save_IFS
14121   test -z "$as_dir" && as_dir=.
14122     for ac_exec_ext in '' $ac_executable_extensions; do
14123   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14124     ac_cv_prog_XGETTEXT="$ac_prog"
14125     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14126     break 2
14127   fi
14128 done
14129   done
14130 IFS=$as_save_IFS
14131
14132 fi
14133 fi
14134 XGETTEXT=$ac_cv_prog_XGETTEXT
14135 if test -n "$XGETTEXT"; then
14136   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
14137 $as_echo "$XGETTEXT" >&6; }
14138 else
14139   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14140 $as_echo "no" >&6; }
14141 fi
14142
14143
14144   test -n "$XGETTEXT" && break
14145 done
14146
14147
14148 fi
14149
14150 # Check for Tcl configuration script tclConfig.sh
14151 if test "$with_tcl" = yes; then
14152     for ac_prog in tclsh tcl tclsh8.5 tclsh85 tclsh8.4 tclsh84 tclsh8.3 tclsh83
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_path_TCLSH+:} false; then :
14159   $as_echo_n "(cached) " >&6
14160 else
14161   case $TCLSH in
14162   [\\/]* | ?:[\\/]*)
14163   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
14164   ;;
14165   *)
14166   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14167 for as_dir in $PATH
14168 do
14169   IFS=$as_save_IFS
14170   test -z "$as_dir" && as_dir=.
14171     for ac_exec_ext in '' $ac_executable_extensions; do
14172   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14173     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
14174     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14175     break 2
14176   fi
14177 done
14178   done
14179 IFS=$as_save_IFS
14180
14181   ;;
14182 esac
14183 fi
14184 TCLSH=$ac_cv_path_TCLSH
14185 if test -n "$TCLSH"; then
14186   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
14187 $as_echo "$TCLSH" >&6; }
14188 else
14189   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14190 $as_echo "no" >&6; }
14191 fi
14192
14193
14194   test -n "$TCLSH" && break
14195 done
14196
14197 if test x"$TCLSH" = x""; then
14198   as_fn_error $? "Tcl shell not found" "$LINENO" 5
14199 fi
14200
14201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
14202 $as_echo_n "checking for tclConfig.sh... " >&6; }
14203 # Let user override test
14204 if test -z "$TCL_CONFIG_SH"; then
14205     pgac_test_dirs="$with_tclconfig"
14206
14207     set X $pgac_test_dirs; shift
14208     if test $# -eq 0; then
14209         test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
14210         set X `echo 'puts $auto_path' | $TCLSH`; shift
14211     fi
14212
14213     for pgac_dir do
14214         if test -r "$pgac_dir/tclConfig.sh"; then
14215             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
14216             break
14217         fi
14218     done
14219 fi
14220
14221 if test -z "$TCL_CONFIG_SH"; then
14222     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14223 $as_echo "no" >&6; }
14224     as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
14225 else
14226     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
14227 $as_echo "$TCL_CONFIG_SH" >&6; }
14228 fi
14229
14230
14231
14232     . "$TCL_CONFIG_SH"
14233 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
14234 eval TCL_LIB_FILE=\"$TCL_LIB_FILE\"
14235 eval TCL_LIBS=\"$TCL_LIBS\"
14236 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
14237 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
14238
14239         # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
14240     ac_save_CPPFLAGS=$CPPFLAGS
14241     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
14242     ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
14243 if test "x$ac_cv_header_tcl_h" = xyes; then :
14244
14245 else
14246   as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
14247 fi
14248
14249
14250     CPPFLAGS=$ac_save_CPPFLAGS
14251 fi
14252
14253 # check for <perl.h>
14254 if test "$with_perl" = yes; then
14255   ac_save_CPPFLAGS=$CPPFLAGS
14256   CPPFLAGS="$CPPFLAGS -I$perl_archlibexp/CORE"
14257   ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
14258 "
14259 if test "x$ac_cv_header_perl_h" = xyes; then :
14260
14261 else
14262   as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
14263 fi
14264
14265
14266   # While we're at it, check that we can link to libperl.
14267   # On most platforms, if perl.h is there then libperl.so will be too, but at
14268   # this writing Debian packages them separately.  There is no known reason to
14269   # waste cycles on separate probes for the Tcl or Python libraries, though.
14270   pgac_save_LIBS=$LIBS
14271   LIBS="$perl_embed_ldflags"
14272   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
14273 $as_echo_n "checking for libperl... " >&6; }
14274   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14275 /* end confdefs.h.  */
14276
14277 #include <EXTERN.h>
14278 #include <perl.h>
14279
14280 int
14281 main ()
14282 {
14283 perl_alloc();
14284   ;
14285   return 0;
14286 }
14287 _ACEOF
14288 if ac_fn_c_try_link "$LINENO"; then :
14289   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14290 $as_echo "yes" >&6; }
14291 else
14292   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14293 $as_echo "no" >&6; }
14294      as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
14295 fi
14296 rm -f core conftest.err conftest.$ac_objext \
14297     conftest$ac_exeext conftest.$ac_ext
14298   LIBS=$pgac_save_LIBS
14299   CPPFLAGS=$ac_save_CPPFLAGS
14300 fi
14301
14302 # check for <Python.h>
14303 if test "$with_python" = yes; then
14304   ac_save_CPPFLAGS=$CPPFLAGS
14305   CPPFLAGS="$python_includespec $CPPFLAGS"
14306   ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
14307 if test "x$ac_cv_header_Python_h" = xyes; then :
14308
14309 else
14310   as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
14311 fi
14312
14313
14314   CPPFLAGS=$ac_save_CPPFLAGS
14315 fi
14316
14317 #
14318 # Check for DocBook and tools
14319 #
14320 for ac_prog in onsgmls nsgmls
14321 do
14322   # Extract the first word of "$ac_prog", so it can be a program name with args.
14323 set dummy $ac_prog; ac_word=$2
14324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14325 $as_echo_n "checking for $ac_word... " >&6; }
14326 if ${ac_cv_prog_NSGMLS+:} false; then :
14327   $as_echo_n "(cached) " >&6
14328 else
14329   if test -n "$NSGMLS"; then
14330   ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
14331 else
14332 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14333 for as_dir in $PATH
14334 do
14335   IFS=$as_save_IFS
14336   test -z "$as_dir" && as_dir=.
14337     for ac_exec_ext in '' $ac_executable_extensions; do
14338   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14339     ac_cv_prog_NSGMLS="$ac_prog"
14340     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14341     break 2
14342   fi
14343 done
14344   done
14345 IFS=$as_save_IFS
14346
14347 fi
14348 fi
14349 NSGMLS=$ac_cv_prog_NSGMLS
14350 if test -n "$NSGMLS"; then
14351   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NSGMLS" >&5
14352 $as_echo "$NSGMLS" >&6; }
14353 else
14354   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14355 $as_echo "no" >&6; }
14356 fi
14357
14358
14359   test -n "$NSGMLS" && break
14360 done
14361
14362 for ac_prog in openjade jade
14363 do
14364   # Extract the first word of "$ac_prog", so it can be a program name with args.
14365 set dummy $ac_prog; ac_word=$2
14366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14367 $as_echo_n "checking for $ac_word... " >&6; }
14368 if ${ac_cv_prog_JADE+:} false; then :
14369   $as_echo_n "(cached) " >&6
14370 else
14371   if test -n "$JADE"; then
14372   ac_cv_prog_JADE="$JADE" # Let the user override the test.
14373 else
14374 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14375 for as_dir in $PATH
14376 do
14377   IFS=$as_save_IFS
14378   test -z "$as_dir" && as_dir=.
14379     for ac_exec_ext in '' $ac_executable_extensions; do
14380   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14381     ac_cv_prog_JADE="$ac_prog"
14382     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14383     break 2
14384   fi
14385 done
14386   done
14387 IFS=$as_save_IFS
14388
14389 fi
14390 fi
14391 JADE=$ac_cv_prog_JADE
14392 if test -n "$JADE"; then
14393   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JADE" >&5
14394 $as_echo "$JADE" >&6; }
14395 else
14396   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14397 $as_echo "no" >&6; }
14398 fi
14399
14400
14401   test -n "$JADE" && break
14402 done
14403
14404
14405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook V4.2" >&5
14406 $as_echo_n "checking for DocBook V4.2... " >&6; }
14407 if ${pgac_cv_check_docbook+:} false; then :
14408   $as_echo_n "(cached) " >&6
14409 else
14410   cat >conftest.sgml <<EOF
14411 <!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
14412 <book>
14413  <title>test</title>
14414  <chapter>
14415   <title>random</title>
14416    <sect1>
14417     <title>testsect</title>
14418     <para>text</para>
14419   </sect1>
14420  </chapter>
14421 </book>
14422 EOF
14423
14424 pgac_cv_check_docbook=no
14425
14426 if test -n "$NSGMLS"; then
14427   $NSGMLS -s conftest.sgml 1>&5 2>&1
14428   if test $? -eq 0; then
14429     pgac_cv_check_docbook=yes
14430   fi
14431 fi
14432 rm -f conftest.sgml
14433 fi
14434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_docbook" >&5
14435 $as_echo "$pgac_cv_check_docbook" >&6; }
14436
14437 have_docbook=$pgac_cv_check_docbook
14438
14439
14440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook stylesheets" >&5
14441 $as_echo_n "checking for DocBook stylesheets... " >&6; }
14442 if ${pgac_cv_path_stylesheets+:} false; then :
14443   $as_echo_n "(cached) " >&6
14444 else
14445   if test -n "$DOCBOOKSTYLE"; then
14446   pgac_cv_path_stylesheets=$DOCBOOKSTYLE
14447 else
14448   for pgac_prefix in /usr /usr/local /opt /sw; do
14449     for pgac_infix in share lib; do
14450       for pgac_postfix in \
14451         sgml/stylesheets/nwalsh-modular \
14452         sgml/stylesheets/docbook \
14453         sgml/stylesheets/dsssl/docbook \
14454         sgml/docbook-dsssl \
14455         sgml/docbook/dsssl/modular \
14456         sgml/docbook/stylesheet/dsssl/modular \
14457         sgml/docbook/dsssl-stylesheets \
14458         sgml/dsssl/docbook-dsssl-nwalsh
14459       do
14460         pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
14461         if test -r "$pgac_candidate/html/docbook.dsl" \
14462            && test -r "$pgac_candidate/print/docbook.dsl"
14463         then
14464           pgac_cv_path_stylesheets=$pgac_candidate
14465           break 3
14466         fi
14467       done
14468     done
14469   done
14470 fi
14471 fi
14472
14473 DOCBOOKSTYLE=$pgac_cv_path_stylesheets
14474
14475 if test -n "$DOCBOOKSTYLE"; then
14476   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOCBOOKSTYLE" >&5
14477 $as_echo "$DOCBOOKSTYLE" >&6; }
14478 else
14479   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14480 $as_echo "no" >&6; }
14481 fi
14482 if test -n "$DOCBOOKSTYLE" -a -r "$DOCBOOKSTYLE/bin/collateindex.pl"; then
14483   COLLATEINDEX="$DOCBOOKSTYLE/bin/collateindex.pl"
14484
14485 else
14486   # Extract the first word of "collateindex.pl", so it can be a program name with args.
14487 set dummy collateindex.pl; ac_word=$2
14488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14489 $as_echo_n "checking for $ac_word... " >&6; }
14490 if ${ac_cv_path_COLLATEINDEX+:} false; then :
14491   $as_echo_n "(cached) " >&6
14492 else
14493   case $COLLATEINDEX in
14494   [\\/]* | ?:[\\/]*)
14495   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
14496   ;;
14497   *)
14498   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14499 for as_dir in $PATH
14500 do
14501   IFS=$as_save_IFS
14502   test -z "$as_dir" && as_dir=.
14503     for ac_exec_ext in '' $ac_executable_extensions; do
14504   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14505     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
14506     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14507     break 2
14508   fi
14509 done
14510   done
14511 IFS=$as_save_IFS
14512
14513   ;;
14514 esac
14515 fi
14516 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
14517 if test -n "$COLLATEINDEX"; then
14518   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COLLATEINDEX" >&5
14519 $as_echo "$COLLATEINDEX" >&6; }
14520 else
14521   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14522 $as_echo "no" >&6; }
14523 fi
14524
14525
14526 fi
14527 for ac_prog in xsltproc
14528 do
14529   # Extract the first word of "$ac_prog", so it can be a program name with args.
14530 set dummy $ac_prog; ac_word=$2
14531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14532 $as_echo_n "checking for $ac_word... " >&6; }
14533 if ${ac_cv_prog_XSLTPROC+:} false; then :
14534   $as_echo_n "(cached) " >&6
14535 else
14536   if test -n "$XSLTPROC"; then
14537   ac_cv_prog_XSLTPROC="$XSLTPROC" # Let the user override the test.
14538 else
14539 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14540 for as_dir in $PATH
14541 do
14542   IFS=$as_save_IFS
14543   test -z "$as_dir" && as_dir=.
14544     for ac_exec_ext in '' $ac_executable_extensions; do
14545   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14546     ac_cv_prog_XSLTPROC="$ac_prog"
14547     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14548     break 2
14549   fi
14550 done
14551   done
14552 IFS=$as_save_IFS
14553
14554 fi
14555 fi
14556 XSLTPROC=$ac_cv_prog_XSLTPROC
14557 if test -n "$XSLTPROC"; then
14558   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
14559 $as_echo "$XSLTPROC" >&6; }
14560 else
14561   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14562 $as_echo "no" >&6; }
14563 fi
14564
14565
14566   test -n "$XSLTPROC" && break
14567 done
14568
14569 for ac_prog in osx sgml2xml sx
14570 do
14571   # Extract the first word of "$ac_prog", so it can be a program name with args.
14572 set dummy $ac_prog; ac_word=$2
14573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14574 $as_echo_n "checking for $ac_word... " >&6; }
14575 if ${ac_cv_prog_OSX+:} false; then :
14576   $as_echo_n "(cached) " >&6
14577 else
14578   if test -n "$OSX"; then
14579   ac_cv_prog_OSX="$OSX" # Let the user override the test.
14580 else
14581 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14582 for as_dir in $PATH
14583 do
14584   IFS=$as_save_IFS
14585   test -z "$as_dir" && as_dir=.
14586     for ac_exec_ext in '' $ac_executable_extensions; do
14587   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14588     ac_cv_prog_OSX="$ac_prog"
14589     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14590     break 2
14591   fi
14592 done
14593   done
14594 IFS=$as_save_IFS
14595
14596 fi
14597 fi
14598 OSX=$ac_cv_prog_OSX
14599 if test -n "$OSX"; then
14600   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OSX" >&5
14601 $as_echo "$OSX" >&6; }
14602 else
14603   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14604 $as_echo "no" >&6; }
14605 fi
14606
14607
14608   test -n "$OSX" && break
14609 done
14610
14611
14612 # Thread testing
14613
14614 # We have to run the thread test near the end so we have all our symbols
14615 # defined.  Cross compiling throws a warning.
14616 #
14617 if test "$enable_thread_safety" = yes; then
14618 if test "$PORTNAME" != "win32"
14619 then
14620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking thread safety of required library functions" >&5
14621 $as_echo_n "checking thread safety of required library functions... " >&6; }
14622
14623 _CFLAGS="$CFLAGS"
14624 _LIBS="$LIBS"
14625 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
14626 LIBS="$LIBS $PTHREAD_LIBS"
14627 if test "$cross_compiling" = yes; then :
14628   { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
14629 $as_echo "maybe" >&6; }
14630   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
14631 *** Skipping thread test program because of cross-compile build.
14632 *** Run the program in src/test/thread on the target machine.
14633 " >&5
14634 $as_echo "$as_me: WARNING:
14635 *** Skipping thread test program because of cross-compile build.
14636 *** Run the program in src/test/thread on the target machine.
14637 " >&2;}
14638 else
14639   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14640 /* end confdefs.h.  */
14641 #include "$srcdir/src/test/thread/thread_test.c"
14642 _ACEOF
14643 if ac_fn_c_try_run "$LINENO"; then :
14644   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14645 $as_echo "yes" >&6; }
14646 else
14647   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14648 $as_echo "no" >&6; }
14649   as_fn_error $? "thread test program failed
14650 This platform is not thread-safe.  Check the file 'config.log' or compile
14651 and run src/test/thread/thread_test for the exact reason.
14652 Use --disable-thread-safety to disable thread safety." "$LINENO" 5
14653 fi
14654 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14655   conftest.$ac_objext conftest.beam conftest.$ac_ext
14656 fi
14657
14658 CFLAGS="$_CFLAGS"
14659 LIBS="$_LIBS"
14660 else
14661 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** skipping thread test on Win32" >&5
14662 $as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
14663 fi
14664 fi
14665
14666 # If compiler will take -Wl,--as-needed (or various platform-specific
14667 # spellings thereof) then add that to LDFLAGS.  This is much easier than
14668 # trying to filter LIBS to the minimum for each executable.
14669 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
14670 # libreadline; therefore we postpone testing it until we know what library
14671 # dependencies readline has.  The test code will try to link with $LIBS.
14672 if test "$with_readline" = yes; then
14673   link_test_func=readline
14674 else
14675   link_test_func=exit
14676 fi
14677
14678 if test "$PORTNAME" = "darwin"; then
14679   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
14680 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
14681 if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
14682   $as_echo_n "(cached) " >&6
14683 else
14684   pgac_save_LDFLAGS=$LDFLAGS
14685 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
14686 if test "$cross_compiling" = yes; then :
14687   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
14688 else
14689   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14690 /* end confdefs.h.  */
14691 extern void $link_test_func (); void (*fptr) () = $link_test_func;
14692 int
14693 main ()
14694 {
14695
14696   ;
14697   return 0;
14698 }
14699 _ACEOF
14700 if ac_fn_c_try_run "$LINENO"; then :
14701   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
14702 else
14703   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
14704 fi
14705 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14706   conftest.$ac_objext conftest.beam conftest.$ac_ext
14707 fi
14708
14709 LDFLAGS="$pgac_save_LDFLAGS"
14710 fi
14711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
14712 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
14713 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
14714   LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
14715 fi
14716
14717 elif test "$PORTNAME" = "openbsd"; then
14718   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
14719 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
14720 if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
14721   $as_echo_n "(cached) " >&6
14722 else
14723   pgac_save_LDFLAGS=$LDFLAGS
14724 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
14725 if test "$cross_compiling" = yes; then :
14726   pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
14727 else
14728   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14729 /* end confdefs.h.  */
14730 extern void $link_test_func (); void (*fptr) () = $link_test_func;
14731 int
14732 main ()
14733 {
14734
14735   ;
14736   return 0;
14737 }
14738 _ACEOF
14739 if ac_fn_c_try_run "$LINENO"; then :
14740   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
14741 else
14742   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
14743 fi
14744 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14745   conftest.$ac_objext conftest.beam conftest.$ac_ext
14746 fi
14747
14748 LDFLAGS="$pgac_save_LDFLAGS"
14749 fi
14750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
14751 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
14752 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
14753   LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
14754 fi
14755
14756 else
14757   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
14758 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
14759 if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
14760   $as_echo_n "(cached) " >&6
14761 else
14762   pgac_save_LDFLAGS=$LDFLAGS
14763 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
14764 if test "$cross_compiling" = yes; then :
14765   pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
14766 else
14767   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14768 /* end confdefs.h.  */
14769 extern void $link_test_func (); void (*fptr) () = $link_test_func;
14770 int
14771 main ()
14772 {
14773
14774   ;
14775   return 0;
14776 }
14777 _ACEOF
14778 if ac_fn_c_try_run "$LINENO"; then :
14779   pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
14780 else
14781   pgac_cv_prog_cc_ldflags__Wl___as_needed=no
14782 fi
14783 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14784   conftest.$ac_objext conftest.beam conftest.$ac_ext
14785 fi
14786
14787 LDFLAGS="$pgac_save_LDFLAGS"
14788 fi
14789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
14790 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
14791 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
14792   LDFLAGS="$LDFLAGS -Wl,--as-needed"
14793 fi
14794
14795 fi
14796
14797 # Create compiler version string
14798 if test x"$GCC" = x"yes" ; then
14799   cc_string=`${CC} --version | sed q`
14800   case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
14801 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
14802   cc_string=`${CC} -V 2>&1 | sed q`
14803 else
14804   cc_string=$CC
14805 fi
14806
14807
14808 cat >>confdefs.h <<_ACEOF
14809 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
14810 _ACEOF
14811
14812
14813 # Supply a numeric version string for use by 3rd party add-ons
14814 # awk -F is a regex on some platforms, and not on others, so make "." a tab
14815 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
14816 tr '.' '        ' |
14817 $AWK '{printf "%d%02d%02d", $1, $2, (NF >= 3) ? $3 : 0}'`"
14818
14819 cat >>confdefs.h <<_ACEOF
14820 #define PG_VERSION_NUM $PG_VERSION_NUM
14821 _ACEOF
14822
14823
14824
14825 # Begin output steps
14826
14827 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
14828 $as_echo "$as_me: using compiler=$cc_string" >&6;}
14829 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
14830 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
14831 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
14832 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
14833 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
14834 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
14835
14836 # prepare build tree if outside source tree
14837 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
14838 # Note 2: /bin/pwd might be better than shell's built-in at getting
14839 #         a symlink-free name.
14840 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
14841   vpath_build=no
14842 else
14843   vpath_build=yes
14844   if test "$no_create" != yes; then
14845     $as_echo_n "preparing build tree... " >&6
14846     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
14847     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
14848       || as_fn_error $? "failed" "$LINENO" 5
14849     { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14850 $as_echo "done" >&6; }
14851   fi
14852 fi
14853
14854
14855
14856 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
14857
14858
14859 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}"
14860
14861
14862 if test "$PORTNAME" = "win32"; then
14863 ac_config_commands="$ac_config_commands check_win32_symlinks"
14864
14865 fi
14866
14867 ac_config_headers="$ac_config_headers src/include/pg_config.h"
14868
14869
14870 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
14871
14872
14873 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
14874
14875
14876 cat >confcache <<\_ACEOF
14877 # This file is a shell script that caches the results of configure
14878 # tests run on this system so they can be shared between configure
14879 # scripts and configure runs, see configure's option --config-cache.
14880 # It is not useful on other systems.  If it contains results you don't
14881 # want to keep, you may remove or edit it.
14882 #
14883 # config.status only pays attention to the cache file if you give it
14884 # the --recheck option to rerun configure.
14885 #
14886 # `ac_cv_env_foo' variables (set or unset) will be overridden when
14887 # loading this file, other *unset* `ac_cv_foo' will be assigned the
14888 # following values.
14889
14890 _ACEOF
14891
14892 # The following way of writing the cache mishandles newlines in values,
14893 # but we know of no workaround that is simple, portable, and efficient.
14894 # So, we kill variables containing newlines.
14895 # Ultrix sh set writes to stderr and can't be redirected directly,
14896 # and sets the high bit in the cache file unless we assign to the vars.
14897 (
14898   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14899     eval ac_val=\$$ac_var
14900     case $ac_val in #(
14901     *${as_nl}*)
14902       case $ac_var in #(
14903       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14904 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
14905       esac
14906       case $ac_var in #(
14907       _ | IFS | as_nl) ;; #(
14908       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14909       *) { eval $ac_var=; unset $ac_var;} ;;
14910       esac ;;
14911     esac
14912   done
14913
14914   (set) 2>&1 |
14915     case $as_nl`(ac_space=' '; set) 2>&1` in #(
14916     *${as_nl}ac_space=\ *)
14917       # `set' does not quote correctly, so add quotes: double-quote
14918       # substitution turns \\\\ into \\, and sed turns \\ into \.
14919       sed -n \
14920         "s/'/'\\\\''/g;
14921           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
14922       ;; #(
14923     *)
14924       # `set' quotes correctly as required by POSIX, so do not add quotes.
14925       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
14926       ;;
14927     esac |
14928     sort
14929 ) |
14930   sed '
14931      /^ac_cv_env_/b end
14932      t clear
14933      :clear
14934      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14935      t end
14936      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14937      :end' >>confcache
14938 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14939   if test -w "$cache_file"; then
14940     if test "x$cache_file" != "x/dev/null"; then
14941       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14942 $as_echo "$as_me: updating cache $cache_file" >&6;}
14943       if test ! -f "$cache_file" || test -h "$cache_file"; then
14944         cat confcache >"$cache_file"
14945       else
14946         case $cache_file in #(
14947         */* | ?:*)
14948           mv -f confcache "$cache_file"$$ &&
14949           mv -f "$cache_file"$$ "$cache_file" ;; #(
14950         *)
14951           mv -f confcache "$cache_file" ;;
14952         esac
14953       fi
14954     fi
14955   else
14956     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14957 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
14958   fi
14959 fi
14960 rm -f confcache
14961
14962 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14963 # Let make expand exec_prefix.
14964 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14965
14966 DEFS=-DHAVE_CONFIG_H
14967
14968 ac_libobjs=
14969 ac_ltlibobjs=
14970 U=
14971 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14972   # 1. Remove the extension, and $U if already installed.
14973   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
14974   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
14975   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
14976   #    will be set to the directory where LIBOBJS objects are built.
14977   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14978   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
14979 done
14980 LIBOBJS=$ac_libobjs
14981
14982 LTLIBOBJS=$ac_ltlibobjs
14983
14984
14985
14986
14987 : "${CONFIG_STATUS=./config.status}"
14988 ac_write_fail=0
14989 ac_clean_files_save=$ac_clean_files
14990 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
14991 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14992 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14993 as_write_fail=0
14994 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
14995 #! $SHELL
14996 # Generated by $as_me.
14997 # Run this file to recreate the current configuration.
14998 # Compiler output produced by configure, useful for debugging
14999 # configure, is in config.log if it exists.
15000
15001 debug=false
15002 ac_cs_recheck=false
15003 ac_cs_silent=false
15004
15005 SHELL=\${CONFIG_SHELL-$SHELL}
15006 export SHELL
15007 _ASEOF
15008 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15009 ## -------------------- ##
15010 ## M4sh Initialization. ##
15011 ## -------------------- ##
15012
15013 # Be more Bourne compatible
15014 DUALCASE=1; export DUALCASE # for MKS sh
15015 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
15016   emulate sh
15017   NULLCMD=:
15018   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
15019   # is contrary to our usage.  Disable this feature.
15020   alias -g '${1+"$@"}'='"$@"'
15021   setopt NO_GLOB_SUBST
15022 else
15023   case `(set -o) 2>/dev/null` in #(
15024   *posix*) :
15025     set -o posix ;; #(
15026   *) :
15027      ;;
15028 esac
15029 fi
15030
15031
15032 as_nl='
15033 '
15034 export as_nl
15035 # Printing a long string crashes Solaris 7 /usr/bin/printf.
15036 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15037 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15038 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15039 # Prefer a ksh shell builtin over an external printf program on Solaris,
15040 # but without wasting forks for bash or zsh.
15041 if test -z "$BASH_VERSION$ZSH_VERSION" \
15042     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15043   as_echo='print -r --'
15044   as_echo_n='print -rn --'
15045 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15046   as_echo='printf %s\n'
15047   as_echo_n='printf %s'
15048 else
15049   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15050     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15051     as_echo_n='/usr/ucb/echo -n'
15052   else
15053     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15054     as_echo_n_body='eval
15055       arg=$1;
15056       case $arg in #(
15057       *"$as_nl"*)
15058         expr "X$arg" : "X\\(.*\\)$as_nl";
15059         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15060       esac;
15061       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15062     '
15063     export as_echo_n_body
15064     as_echo_n='sh -c $as_echo_n_body as_echo'
15065   fi
15066   export as_echo_body
15067   as_echo='sh -c $as_echo_body as_echo'
15068 fi
15069
15070 # The user is always right.
15071 if test "${PATH_SEPARATOR+set}" != set; then
15072   PATH_SEPARATOR=:
15073   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15074     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15075       PATH_SEPARATOR=';'
15076   }
15077 fi
15078
15079
15080 # IFS
15081 # We need space, tab and new line, in precisely that order.  Quoting is
15082 # there to prevent editors from complaining about space-tab.
15083 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
15084 # splitting by setting IFS to empty value.)
15085 IFS=" ""        $as_nl"
15086
15087 # Find who we are.  Look in the path if we contain no directory separator.
15088 as_myself=
15089 case $0 in #((
15090   *[\\/]* ) as_myself=$0 ;;
15091   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15092 for as_dir in $PATH
15093 do
15094   IFS=$as_save_IFS
15095   test -z "$as_dir" && as_dir=.
15096     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15097   done
15098 IFS=$as_save_IFS
15099
15100      ;;
15101 esac
15102 # We did not find ourselves, most probably we were run as `sh COMMAND'
15103 # in which case we are not to be found in the path.
15104 if test "x$as_myself" = x; then
15105   as_myself=$0
15106 fi
15107 if test ! -f "$as_myself"; then
15108   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15109   exit 1
15110 fi
15111
15112 # Unset variables that we do not need and which cause bugs (e.g. in
15113 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
15114 # suppresses any "Segmentation fault" message there.  '((' could
15115 # trigger a bug in pdksh 5.2.14.
15116 for as_var in BASH_ENV ENV MAIL MAILPATH
15117 do eval test x\${$as_var+set} = xset \
15118   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
15119 done
15120 PS1='$ '
15121 PS2='> '
15122 PS4='+ '
15123
15124 # NLS nuisances.
15125 LC_ALL=C
15126 export LC_ALL
15127 LANGUAGE=C
15128 export LANGUAGE
15129
15130 # CDPATH.
15131 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15132
15133
15134 # as_fn_error STATUS ERROR [LINENO LOG_FD]
15135 # ----------------------------------------
15136 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15137 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
15138 # script with STATUS, using 1 if that was 0.
15139 as_fn_error ()
15140 {
15141   as_status=$1; test $as_status -eq 0 && as_status=1
15142   if test "$4"; then
15143     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15144     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
15145   fi
15146   $as_echo "$as_me: error: $2" >&2
15147   as_fn_exit $as_status
15148 } # as_fn_error
15149
15150
15151 # as_fn_set_status STATUS
15152 # -----------------------
15153 # Set $? to STATUS, without forking.
15154 as_fn_set_status ()
15155 {
15156   return $1
15157 } # as_fn_set_status
15158
15159 # as_fn_exit STATUS
15160 # -----------------
15161 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15162 as_fn_exit ()
15163 {
15164   set +e
15165   as_fn_set_status $1
15166   exit $1
15167 } # as_fn_exit
15168
15169 # as_fn_unset VAR
15170 # ---------------
15171 # Portably unset VAR.
15172 as_fn_unset ()
15173 {
15174   { eval $1=; unset $1;}
15175 }
15176 as_unset=as_fn_unset
15177 # as_fn_append VAR VALUE
15178 # ----------------------
15179 # Append the text in VALUE to the end of the definition contained in VAR. Take
15180 # advantage of any shell optimizations that allow amortized linear growth over
15181 # repeated appends, instead of the typical quadratic growth present in naive
15182 # implementations.
15183 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15184   eval 'as_fn_append ()
15185   {
15186     eval $1+=\$2
15187   }'
15188 else
15189   as_fn_append ()
15190   {
15191     eval $1=\$$1\$2
15192   }
15193 fi # as_fn_append
15194
15195 # as_fn_arith ARG...
15196 # ------------------
15197 # Perform arithmetic evaluation on the ARGs, and store the result in the
15198 # global $as_val. Take advantage of shells that can avoid forks. The arguments
15199 # must be portable across $(()) and expr.
15200 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15201   eval 'as_fn_arith ()
15202   {
15203     as_val=$(( $* ))
15204   }'
15205 else
15206   as_fn_arith ()
15207   {
15208     as_val=`expr "$@" || test $? -eq 1`
15209   }
15210 fi # as_fn_arith
15211
15212
15213 if expr a : '\(a\)' >/dev/null 2>&1 &&
15214    test "X`expr 00001 : '.*\(...\)'`" = X001; then
15215   as_expr=expr
15216 else
15217   as_expr=false
15218 fi
15219
15220 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15221   as_basename=basename
15222 else
15223   as_basename=false
15224 fi
15225
15226 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15227   as_dirname=dirname
15228 else
15229   as_dirname=false
15230 fi
15231
15232 as_me=`$as_basename -- "$0" ||
15233 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15234          X"$0" : 'X\(//\)$' \| \
15235          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
15236 $as_echo X/"$0" |
15237     sed '/^.*\/\([^/][^/]*\)\/*$/{
15238             s//\1/
15239             q
15240           }
15241           /^X\/\(\/\/\)$/{
15242             s//\1/
15243             q
15244           }
15245           /^X\/\(\/\).*/{
15246             s//\1/
15247             q
15248           }
15249           s/.*/./; q'`
15250
15251 # Avoid depending upon Character Ranges.
15252 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15253 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15254 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15255 as_cr_digits='0123456789'
15256 as_cr_alnum=$as_cr_Letters$as_cr_digits
15257
15258 ECHO_C= ECHO_N= ECHO_T=
15259 case `echo -n x` in #(((((
15260 -n*)
15261   case `echo 'xy\c'` in
15262   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
15263   xy)  ECHO_C='\c';;
15264   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
15265        ECHO_T=' ';;
15266   esac;;
15267 *)
15268   ECHO_N='-n';;
15269 esac
15270
15271 rm -f conf$$ conf$$.exe conf$$.file
15272 if test -d conf$$.dir; then
15273   rm -f conf$$.dir/conf$$.file
15274 else
15275   rm -f conf$$.dir
15276   mkdir conf$$.dir 2>/dev/null
15277 fi
15278 if (echo >conf$$.file) 2>/dev/null; then
15279   if ln -s conf$$.file conf$$ 2>/dev/null; then
15280     as_ln_s='ln -s'
15281     # ... but there are two gotchas:
15282     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15283     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
15284     # In both cases, we have to default to `cp -pR'.
15285     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
15286       as_ln_s='cp -pR'
15287   elif ln conf$$.file conf$$ 2>/dev/null; then
15288     as_ln_s=ln
15289   else
15290     as_ln_s='cp -pR'
15291   fi
15292 else
15293   as_ln_s='cp -pR'
15294 fi
15295 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15296 rmdir conf$$.dir 2>/dev/null
15297
15298
15299 # as_fn_mkdir_p
15300 # -------------
15301 # Create "$as_dir" as a directory, including parents if necessary.
15302 as_fn_mkdir_p ()
15303 {
15304
15305   case $as_dir in #(
15306   -*) as_dir=./$as_dir;;
15307   esac
15308   test -d "$as_dir" || eval $as_mkdir_p || {
15309     as_dirs=
15310     while :; do
15311       case $as_dir in #(
15312       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15313       *) as_qdir=$as_dir;;
15314       esac
15315       as_dirs="'$as_qdir' $as_dirs"
15316       as_dir=`$as_dirname -- "$as_dir" ||
15317 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15318          X"$as_dir" : 'X\(//\)[^/]' \| \
15319          X"$as_dir" : 'X\(//\)$' \| \
15320          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15321 $as_echo X"$as_dir" |
15322     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15323             s//\1/
15324             q
15325           }
15326           /^X\(\/\/\)[^/].*/{
15327             s//\1/
15328             q
15329           }
15330           /^X\(\/\/\)$/{
15331             s//\1/
15332             q
15333           }
15334           /^X\(\/\).*/{
15335             s//\1/
15336             q
15337           }
15338           s/.*/./; q'`
15339       test -d "$as_dir" && break
15340     done
15341     test -z "$as_dirs" || eval "mkdir $as_dirs"
15342   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
15343
15344
15345 } # as_fn_mkdir_p
15346 if mkdir -p . 2>/dev/null; then
15347   as_mkdir_p='mkdir -p "$as_dir"'
15348 else
15349   test -d ./-p && rmdir ./-p
15350   as_mkdir_p=false
15351 fi
15352
15353
15354 # as_fn_executable_p FILE
15355 # -----------------------
15356 # Test if FILE is an executable regular file.
15357 as_fn_executable_p ()
15358 {
15359   test -f "$1" && test -x "$1"
15360 } # as_fn_executable_p
15361 as_test_x='test -x'
15362 as_executable_p=as_fn_executable_p
15363
15364 # Sed expression to map a string onto a valid CPP name.
15365 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
15366
15367 # Sed expression to map a string onto a valid variable name.
15368 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
15369
15370
15371 exec 6>&1
15372 ## ----------------------------------- ##
15373 ## Main body of $CONFIG_STATUS script. ##
15374 ## ----------------------------------- ##
15375 _ASEOF
15376 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
15377
15378 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15379 # Save the log message, to keep $0 and so on meaningful, and to
15380 # report actual input values of CONFIG_FILES etc. instead of their
15381 # values after options handling.
15382 ac_log="
15383 This file was extended by PostgreSQL $as_me 9.4devel, which was
15384 generated by GNU Autoconf 2.69.  Invocation command line was
15385
15386   CONFIG_FILES    = $CONFIG_FILES
15387   CONFIG_HEADERS  = $CONFIG_HEADERS
15388   CONFIG_LINKS    = $CONFIG_LINKS
15389   CONFIG_COMMANDS = $CONFIG_COMMANDS
15390   $ $0 $@
15391
15392 on `(hostname || uname -n) 2>/dev/null | sed 1q`
15393 "
15394
15395 _ACEOF
15396
15397 case $ac_config_files in *"
15398 "*) set x $ac_config_files; shift; ac_config_files=$*;;
15399 esac
15400
15401 case $ac_config_headers in *"
15402 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15403 esac
15404
15405
15406 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15407 # Files that config.status was made for.
15408 config_files="$ac_config_files"
15409 config_headers="$ac_config_headers"
15410 config_links="$ac_config_links"
15411 config_commands="$ac_config_commands"
15412
15413 _ACEOF
15414
15415 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15416 ac_cs_usage="\
15417 \`$as_me' instantiates files and other configuration actions
15418 from templates according to the current configuration.  Unless the files
15419 and actions are specified as TAGs, all are instantiated by default.
15420
15421 Usage: $0 [OPTION]... [TAG]...
15422
15423   -h, --help       print this help, then exit
15424   -V, --version    print version number and configuration settings, then exit
15425       --config     print configuration, then exit
15426   -q, --quiet, --silent
15427                    do not print progress messages
15428   -d, --debug      don't remove temporary files
15429       --recheck    update $as_me by reconfiguring in the same conditions
15430       --file=FILE[:TEMPLATE]
15431                    instantiate the configuration file FILE
15432       --header=FILE[:TEMPLATE]
15433                    instantiate the configuration header FILE
15434
15435 Configuration files:
15436 $config_files
15437
15438 Configuration headers:
15439 $config_headers
15440
15441 Configuration links:
15442 $config_links
15443
15444 Configuration commands:
15445 $config_commands
15446
15447 Report bugs to <pgsql-bugs@postgresql.org>."
15448
15449 _ACEOF
15450 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15451 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
15452 ac_cs_version="\\
15453 PostgreSQL config.status 9.4devel
15454 configured by $0, generated by GNU Autoconf 2.69,
15455   with options \\"\$ac_cs_config\\"
15456
15457 Copyright (C) 2012 Free Software Foundation, Inc.
15458 This config.status script is free software; the Free Software Foundation
15459 gives unlimited permission to copy, distribute and modify it."
15460
15461 ac_pwd='$ac_pwd'
15462 srcdir='$srcdir'
15463 INSTALL='$INSTALL'
15464 MKDIR_P='$MKDIR_P'
15465 AWK='$AWK'
15466 test -n "\$AWK" || AWK=awk
15467 _ACEOF
15468
15469 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15470 # The default lists apply if the user does not specify any file.
15471 ac_need_defaults=:
15472 while test $# != 0
15473 do
15474   case $1 in
15475   --*=?*)
15476     ac_option=`expr "X$1" : 'X\([^=]*\)='`
15477     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
15478     ac_shift=:
15479     ;;
15480   --*=)
15481     ac_option=`expr "X$1" : 'X\([^=]*\)='`
15482     ac_optarg=
15483     ac_shift=:
15484     ;;
15485   *)
15486     ac_option=$1
15487     ac_optarg=$2
15488     ac_shift=shift
15489     ;;
15490   esac
15491
15492   case $ac_option in
15493   # Handling of the options.
15494   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15495     ac_cs_recheck=: ;;
15496   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
15497     $as_echo "$ac_cs_version"; exit ;;
15498   --config | --confi | --conf | --con | --co | --c )
15499     $as_echo "$ac_cs_config"; exit ;;
15500   --debug | --debu | --deb | --de | --d | -d )
15501     debug=: ;;
15502   --file | --fil | --fi | --f )
15503     $ac_shift
15504     case $ac_optarg in
15505     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15506     '') as_fn_error $? "missing file argument" ;;
15507     esac
15508     as_fn_append CONFIG_FILES " '$ac_optarg'"
15509     ac_need_defaults=false;;
15510   --header | --heade | --head | --hea )
15511     $ac_shift
15512     case $ac_optarg in
15513     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15514     esac
15515     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
15516     ac_need_defaults=false;;
15517   --he | --h)
15518     # Conflict between --help and --header
15519     as_fn_error $? "ambiguous option: \`$1'
15520 Try \`$0 --help' for more information.";;
15521   --help | --hel | -h )
15522     $as_echo "$ac_cs_usage"; exit ;;
15523   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15524   | -silent | --silent | --silen | --sile | --sil | --si | --s)
15525     ac_cs_silent=: ;;
15526
15527   # This is an error.
15528   -*) as_fn_error $? "unrecognized option: \`$1'
15529 Try \`$0 --help' for more information." ;;
15530
15531   *) as_fn_append ac_config_targets " $1"
15532      ac_need_defaults=false ;;
15533
15534   esac
15535   shift
15536 done
15537
15538 ac_configure_extra_args=
15539
15540 if $ac_cs_silent; then
15541   exec 6>/dev/null
15542   ac_configure_extra_args="$ac_configure_extra_args --silent"
15543 fi
15544
15545 _ACEOF
15546 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15547 if \$ac_cs_recheck; then
15548   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
15549   shift
15550   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15551   CONFIG_SHELL='$SHELL'
15552   export CONFIG_SHELL
15553   exec "\$@"
15554 fi
15555
15556 _ACEOF
15557 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15558 exec 5>>config.log
15559 {
15560   echo
15561   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15562 ## Running $as_me. ##
15563 _ASBOX
15564   $as_echo "$ac_log"
15565 } >&5
15566
15567 _ACEOF
15568 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15569 _ACEOF
15570
15571 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15572
15573 # Handling of arguments.
15574 for ac_config_target in $ac_config_targets
15575 do
15576   case $ac_config_target in
15577     "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
15578     "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
15579     "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
15580     "src/backend/port/dynloader.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
15581     "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
15582     "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
15583     "src/backend/port/pg_latch.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_latch.c:${LATCH_IMPLEMENTATION}" ;;
15584     "src/include/dynloader.h") CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
15585     "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
15586     "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
15587     "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
15588     "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
15589     "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
15590     "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
15591
15592   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
15593   esac
15594 done
15595
15596
15597 # If the user did not use the arguments to specify the items to instantiate,
15598 # then the envvar interface is used.  Set only those that are not.
15599 # We use the long form for the default assignment because of an extremely
15600 # bizarre bug on SunOS 4.1.3.
15601 if $ac_need_defaults; then
15602   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15603   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15604   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
15605   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
15606 fi
15607
15608 # Have a temporary directory for convenience.  Make it in the build tree
15609 # simply because there is no reason against having it here, and in addition,
15610 # creating and moving files from /tmp can sometimes cause problems.
15611 # Hook for its removal unless debugging.
15612 # Note that there is a small window in which the directory will not be cleaned:
15613 # after its creation but before its name has been assigned to `$tmp'.
15614 $debug ||
15615 {
15616   tmp= ac_tmp=
15617   trap 'exit_status=$?
15618   : "${ac_tmp:=$tmp}"
15619   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
15620 ' 0
15621   trap 'as_fn_exit 1' 1 2 13 15
15622 }
15623 # Create a (secure) tmp directory for tmp files.
15624
15625 {
15626   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
15627   test -d "$tmp"
15628 }  ||
15629 {
15630   tmp=./conf$$-$RANDOM
15631   (umask 077 && mkdir "$tmp")
15632 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
15633 ac_tmp=$tmp
15634
15635 # Set up the scripts for CONFIG_FILES section.
15636 # No need to generate them if there are no CONFIG_FILES.
15637 # This happens for instance with `./config.status config.h'.
15638 if test -n "$CONFIG_FILES"; then
15639
15640
15641 ac_cr=`echo X | tr X '\015'`
15642 # On cygwin, bash can eat \r inside `` if the user requested igncr.
15643 # But we know of no other shell where ac_cr would be empty at this
15644 # point, so we can use a bashism as a fallback.
15645 if test "x$ac_cr" = x; then
15646   eval ac_cr=\$\'\\r\'
15647 fi
15648 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15649 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
15650   ac_cs_awk_cr='\\r'
15651 else
15652   ac_cs_awk_cr=$ac_cr
15653 fi
15654
15655 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
15656 _ACEOF
15657
15658
15659 {
15660   echo "cat >conf$$subs.awk <<_ACEOF" &&
15661   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15662   echo "_ACEOF"
15663 } >conf$$subs.sh ||
15664   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15665 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
15666 ac_delim='%!_!# '
15667 for ac_last_try in false false false false false :; do
15668   . ./conf$$subs.sh ||
15669     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15670
15671   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15672   if test $ac_delim_n = $ac_delim_num; then
15673     break
15674   elif $ac_last_try; then
15675     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15676   else
15677     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15678   fi
15679 done
15680 rm -f conf$$subs.sh
15681
15682 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15683 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
15684 _ACEOF
15685 sed -n '
15686 h
15687 s/^/S["/; s/!.*/"]=/
15688 p
15689 g
15690 s/^[^!]*!//
15691 :repl
15692 t repl
15693 s/'"$ac_delim"'$//
15694 t delim
15695 :nl
15696 h
15697 s/\(.\{148\}\)..*/\1/
15698 t more1
15699 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15700 p
15701 n
15702 b repl
15703 :more1
15704 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15705 p
15706 g
15707 s/.\{148\}//
15708 t nl
15709 :delim
15710 h
15711 s/\(.\{148\}\)..*/\1/
15712 t more2
15713 s/["\\]/\\&/g; s/^/"/; s/$/"/
15714 p
15715 b
15716 :more2
15717 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15718 p
15719 g
15720 s/.\{148\}//
15721 t delim
15722 ' <conf$$subs.awk | sed '
15723 /^[^""]/{
15724   N
15725   s/\n//
15726 }
15727 ' >>$CONFIG_STATUS || ac_write_fail=1
15728 rm -f conf$$subs.awk
15729 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15730 _ACAWK
15731 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
15732   for (key in S) S_is_set[key] = 1
15733   FS = "\a"
15734
15735 }
15736 {
15737   line = $ 0
15738   nfields = split(line, field, "@")
15739   substed = 0
15740   len = length(field[1])
15741   for (i = 2; i < nfields; i++) {
15742     key = field[i]
15743     keylen = length(key)
15744     if (S_is_set[key]) {
15745       value = S[key]
15746       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15747       len += length(value) + length(field[++i])
15748       substed = 1
15749     } else
15750       len += 1 + keylen
15751   }
15752
15753   print line
15754 }
15755
15756 _ACAWK
15757 _ACEOF
15758 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15759 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15760   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15761 else
15762   cat
15763 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
15764   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
15765 _ACEOF
15766
15767 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15768 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
15769 # trailing colons and then remove the whole line if VPATH becomes empty
15770 # (actually we leave an empty line to preserve line numbers).
15771 if test "x$srcdir" = x.; then
15772   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
15773 h
15774 s///
15775 s/^/:/
15776 s/[      ]*$/:/
15777 s/:\$(srcdir):/:/g
15778 s/:\${srcdir}:/:/g
15779 s/:@srcdir@:/:/g
15780 s/^:*//
15781 s/:*$//
15782 x
15783 s/\(=[   ]*\).*/\1/
15784 G
15785 s/\n//
15786 s/^[^=]*=[       ]*$//
15787 }'
15788 fi
15789
15790 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15791 fi # test -n "$CONFIG_FILES"
15792
15793 # Set up the scripts for CONFIG_HEADERS section.
15794 # No need to generate them if there are no CONFIG_HEADERS.
15795 # This happens for instance with `./config.status Makefile'.
15796 if test -n "$CONFIG_HEADERS"; then
15797 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
15798 BEGIN {
15799 _ACEOF
15800
15801 # Transform confdefs.h into an awk script `defines.awk', embedded as
15802 # here-document in config.status, that substitutes the proper values into
15803 # config.h.in to produce config.h.
15804
15805 # Create a delimiter string that does not exist in confdefs.h, to ease
15806 # handling of long lines.
15807 ac_delim='%!_!# '
15808 for ac_last_try in false false :; do
15809   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15810   if test -z "$ac_tt"; then
15811     break
15812   elif $ac_last_try; then
15813     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
15814   else
15815     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15816   fi
15817 done
15818
15819 # For the awk script, D is an array of macro values keyed by name,
15820 # likewise P contains macro parameters if any.  Preserve backslash
15821 # newline sequences.
15822
15823 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15824 sed -n '
15825 s/.\{148\}/&'"$ac_delim"'/g
15826 t rset
15827 :rset
15828 s/^[     ]*#[    ]*define[       ][      ]*/ /
15829 t def
15830 d
15831 :def
15832 s/\\$//
15833 t bsnl
15834 s/["\\]/\\&/g
15835 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
15836 D["\1"]=" \3"/p
15837 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
15838 d
15839 :bsnl
15840 s/["\\]/\\&/g
15841 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
15842 D["\1"]=" \3\\\\\\n"\\/p
15843 t cont
15844 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15845 t cont
15846 d
15847 :cont
15848 n
15849 s/.\{148\}/&'"$ac_delim"'/g
15850 t clear
15851 :clear
15852 s/\\$//
15853 t bsnlc
15854 s/["\\]/\\&/g; s/^/"/; s/$/"/p
15855 d
15856 :bsnlc
15857 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15858 b cont
15859 ' <confdefs.h | sed '
15860 s/'"$ac_delim"'/"\\\
15861 "/g' >>$CONFIG_STATUS || ac_write_fail=1
15862
15863 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15864   for (key in D) D_is_set[key] = 1
15865   FS = "\a"
15866 }
15867 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15868   line = \$ 0
15869   split(line, arg, " ")
15870   if (arg[1] == "#") {
15871     defundef = arg[2]
15872     mac1 = arg[3]
15873   } else {
15874     defundef = substr(arg[1], 2)
15875     mac1 = arg[2]
15876   }
15877   split(mac1, mac2, "(") #)
15878   macro = mac2[1]
15879   prefix = substr(line, 1, index(line, defundef) - 1)
15880   if (D_is_set[macro]) {
15881     # Preserve the white space surrounding the "#".
15882     print prefix "define", macro P[macro] D[macro]
15883     next
15884   } else {
15885     # Replace #undef with comments.  This is necessary, for example,
15886     # in the case of _POSIX_SOURCE, which is predefined and required
15887     # on some systems where configure will not decide to define it.
15888     if (defundef == "undef") {
15889       print "/*", prefix defundef, macro, "*/"
15890       next
15891     }
15892   }
15893 }
15894 { print }
15895 _ACAWK
15896 _ACEOF
15897 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15898   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
15899 fi # test -n "$CONFIG_HEADERS"
15900
15901
15902 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
15903 shift
15904 for ac_tag
15905 do
15906   case $ac_tag in
15907   :[FHLC]) ac_mode=$ac_tag; continue;;
15908   esac
15909   case $ac_mode$ac_tag in
15910   :[FHL]*:*);;
15911   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
15912   :[FH]-) ac_tag=-:-;;
15913   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15914   esac
15915   ac_save_IFS=$IFS
15916   IFS=:
15917   set x $ac_tag
15918   IFS=$ac_save_IFS
15919   shift
15920   ac_file=$1
15921   shift
15922
15923   case $ac_mode in
15924   :L) ac_source=$1;;
15925   :[FH])
15926     ac_file_inputs=
15927     for ac_f
15928     do
15929       case $ac_f in
15930       -) ac_f="$ac_tmp/stdin";;
15931       *) # Look for the file first in the build tree, then in the source tree
15932          # (if the path is not absolute).  The absolute path cannot be DOS-style,
15933          # because $ac_f cannot contain `:'.
15934          test -f "$ac_f" ||
15935            case $ac_f in
15936            [\\/$]*) false;;
15937            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15938            esac ||
15939            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
15940       esac
15941       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15942       as_fn_append ac_file_inputs " '$ac_f'"
15943     done
15944
15945     # Let's still pretend it is `configure' which instantiates (i.e., don't
15946     # use $as_me), people would be surprised to read:
15947     #    /* config.h.  Generated by config.status.  */
15948     configure_input='Generated from '`
15949           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15950         `' by configure.'
15951     if test x"$ac_file" != x-; then
15952       configure_input="$ac_file.  $configure_input"
15953       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15954 $as_echo "$as_me: creating $ac_file" >&6;}
15955     fi
15956     # Neutralize special characters interpreted by sed in replacement strings.
15957     case $configure_input in #(
15958     *\&* | *\|* | *\\* )
15959        ac_sed_conf_input=`$as_echo "$configure_input" |
15960        sed 's/[\\\\&|]/\\\\&/g'`;; #(
15961     *) ac_sed_conf_input=$configure_input;;
15962     esac
15963
15964     case $ac_tag in
15965     *:-:* | *:-) cat >"$ac_tmp/stdin" \
15966       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
15967     esac
15968     ;;
15969   esac
15970
15971   ac_dir=`$as_dirname -- "$ac_file" ||
15972 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15973          X"$ac_file" : 'X\(//\)[^/]' \| \
15974          X"$ac_file" : 'X\(//\)$' \| \
15975          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
15976 $as_echo X"$ac_file" |
15977     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15978             s//\1/
15979             q
15980           }
15981           /^X\(\/\/\)[^/].*/{
15982             s//\1/
15983             q
15984           }
15985           /^X\(\/\/\)$/{
15986             s//\1/
15987             q
15988           }
15989           /^X\(\/\).*/{
15990             s//\1/
15991             q
15992           }
15993           s/.*/./; q'`
15994   as_dir="$ac_dir"; as_fn_mkdir_p
15995   ac_builddir=.
15996
15997 case "$ac_dir" in
15998 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15999 *)
16000   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
16001   # A ".." for each directory in $ac_dir_suffix.
16002   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
16003   case $ac_top_builddir_sub in
16004   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16005   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16006   esac ;;
16007 esac
16008 ac_abs_top_builddir=$ac_pwd
16009 ac_abs_builddir=$ac_pwd$ac_dir_suffix
16010 # for backward compatibility:
16011 ac_top_builddir=$ac_top_build_prefix
16012
16013 case $srcdir in
16014   .)  # We are building in place.
16015     ac_srcdir=.
16016     ac_top_srcdir=$ac_top_builddir_sub
16017     ac_abs_top_srcdir=$ac_pwd ;;
16018   [\\/]* | ?:[\\/]* )  # Absolute name.
16019     ac_srcdir=$srcdir$ac_dir_suffix;
16020     ac_top_srcdir=$srcdir
16021     ac_abs_top_srcdir=$srcdir ;;
16022   *) # Relative name.
16023     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16024     ac_top_srcdir=$ac_top_build_prefix$srcdir
16025     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
16026 esac
16027 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
16028
16029
16030   case $ac_mode in
16031   :F)
16032   #
16033   # CONFIG_FILE
16034   #
16035
16036   case $INSTALL in
16037   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16038   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
16039   esac
16040   ac_MKDIR_P=$MKDIR_P
16041   case $MKDIR_P in
16042   [\\/$]* | ?:[\\/]* ) ;;
16043   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16044   esac
16045 _ACEOF
16046
16047 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16048 # If the template does not know about datarootdir, expand it.
16049 # FIXME: This hack should be removed a few years after 2.60.
16050 ac_datarootdir_hack=; ac_datarootdir_seen=
16051 ac_sed_dataroot='
16052 /datarootdir/ {
16053   p
16054   q
16055 }
16056 /@datadir@/p
16057 /@docdir@/p
16058 /@infodir@/p
16059 /@localedir@/p
16060 /@mandir@/p'
16061 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
16062 *datarootdir*) ac_datarootdir_seen=yes;;
16063 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
16064   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16065 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
16066 _ACEOF
16067 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16068   ac_datarootdir_hack='
16069   s&@datadir@&$datadir&g
16070   s&@docdir@&$docdir&g
16071   s&@infodir@&$infodir&g
16072   s&@localedir@&$localedir&g
16073   s&@mandir@&$mandir&g
16074   s&\\\${datarootdir}&$datarootdir&g' ;;
16075 esac
16076 _ACEOF
16077
16078 # Neutralize VPATH when `$srcdir' = `.'.
16079 # Shell code in configure.ac might set extrasub.
16080 # FIXME: do we really want to maintain this feature?
16081 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16082 ac_sed_extra="$ac_vpsub
16083 $extrasub
16084 _ACEOF
16085 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16086 :t
16087 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16088 s|@configure_input@|$ac_sed_conf_input|;t t
16089 s&@top_builddir@&$ac_top_builddir_sub&;t t
16090 s&@top_build_prefix@&$ac_top_build_prefix&;t t
16091 s&@srcdir@&$ac_srcdir&;t t
16092 s&@abs_srcdir@&$ac_abs_srcdir&;t t
16093 s&@top_srcdir@&$ac_top_srcdir&;t t
16094 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16095 s&@builddir@&$ac_builddir&;t t
16096 s&@abs_builddir@&$ac_abs_builddir&;t t
16097 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16098 s&@INSTALL@&$ac_INSTALL&;t t
16099 s&@MKDIR_P@&$ac_MKDIR_P&;t t
16100 $ac_datarootdir_hack
16101 "
16102 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16103   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16104
16105 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
16106   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16107   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
16108       "$ac_tmp/out"`; test -z "$ac_out"; } &&
16109   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16110 which seems to be undefined.  Please make sure it is defined" >&5
16111 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16112 which seems to be undefined.  Please make sure it is defined" >&2;}
16113
16114   rm -f "$ac_tmp/stdin"
16115   case $ac_file in
16116   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16117   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
16118   esac \
16119   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16120  ;;
16121   :H)
16122   #
16123   # CONFIG_HEADER
16124   #
16125   if test x"$ac_file" != x-; then
16126     {
16127       $as_echo "/* $configure_input  */" \
16128       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16129     } >"$ac_tmp/config.h" \
16130       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16131     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
16132       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16133 $as_echo "$as_me: $ac_file is unchanged" >&6;}
16134     else
16135       rm -f "$ac_file"
16136       mv "$ac_tmp/config.h" "$ac_file" \
16137         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16138     fi
16139   else
16140     $as_echo "/* $configure_input  */" \
16141       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
16142       || as_fn_error $? "could not create -" "$LINENO" 5
16143   fi
16144  ;;
16145   :L)
16146   #
16147   # CONFIG_LINK
16148   #
16149
16150   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
16151     :
16152   else
16153     # Prefer the file from the source tree if names are identical.
16154     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
16155       ac_source=$srcdir/$ac_source
16156     fi
16157
16158     { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
16159 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
16160
16161     if test ! -r "$ac_source"; then
16162       as_fn_error $? "$ac_source: file not found" "$LINENO" 5
16163     fi
16164     rm -f "$ac_file"
16165
16166     # Try a relative symlink, then a hard link, then a copy.
16167     case $ac_source in
16168     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
16169         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
16170     esac
16171     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
16172       ln "$ac_source" "$ac_file" 2>/dev/null ||
16173       cp -p "$ac_source" "$ac_file" ||
16174       as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
16175   fi
16176  ;;
16177   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
16178 $as_echo "$as_me: executing $ac_file commands" >&6;}
16179  ;;
16180   esac
16181
16182
16183   case $ac_file$ac_mode in
16184     "check_win32_symlinks":C)
16185 # Links sometimes fail undetected on Mingw -
16186 # so here we detect it and warn the user
16187 for FILE in $CONFIG_LINKS
16188  do
16189         # test -e works for symlinks in the MinGW console
16190         test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
16191 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
16192  done
16193  ;;
16194     "src/include/pg_config.h":H)
16195 # Update timestamp for pg_config.h (see Makefile.global)
16196 echo >src/include/stamp-h
16197  ;;
16198     "src/include/pg_config_ext.h":H)
16199 # Update timestamp for pg_config_ext.h (see Makefile.global)
16200 echo >src/include/stamp-ext-h
16201  ;;
16202     "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
16203
16204   esac
16205 done # for ac_tag
16206
16207
16208 as_fn_exit 0
16209 _ACEOF
16210 ac_clean_files=$ac_clean_files_save
16211
16212 test $ac_write_fail = 0 ||
16213   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
16214
16215
16216 # configure is writing to config.log, and then calls config.status.
16217 # config.status does its own redirection, appending to config.log.
16218 # Unfortunately, on DOS this fails, as config.log is still kept open
16219 # by configure, so config.status won't be able to write to it; its
16220 # output is simply discarded.  So we exec the FD to /dev/null,
16221 # effectively closing config.log, so it can be properly (re)opened and
16222 # appended to by config.status.  When coming back to configure, we
16223 # need to make the FD available again.
16224 if test "$no_create" != yes; then
16225   ac_cs_success=:
16226   ac_config_status_args=
16227   test "$silent" = yes &&
16228     ac_config_status_args="$ac_config_status_args --quiet"
16229   exec 5>/dev/null
16230   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
16231   exec 5>>config.log
16232   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16233   # would make configure fail if this is the last instruction.
16234   $ac_cs_success || as_fn_exit 1
16235 fi
16236 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16237   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16238 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
16239 fi
16240