]> granicus.if.org Git - postgresql/blob - configure
src/port/dirmod.c needs to be built on Cygwin too.
[postgresql] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for PostgreSQL 9.5devel.
4 #
5 # Report bugs to <pgsql-bugs@postgresql.org>.
6 #
7 #
8 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
9 #
10 #
11 # This configure script is free software; the Free Software Foundation
12 # gives unlimited permission to copy, distribute and modify it.
13 #
14 # Copyright (c) 1996-2015, PostgreSQL Global Development Group
15 ## -------------------- ##
16 ## M4sh Initialization. ##
17 ## -------------------- ##
18
19 # Be more Bourne compatible
20 DUALCASE=1; export DUALCASE # for MKS sh
21 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22   emulate sh
23   NULLCMD=:
24   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25   # is contrary to our usage.  Disable this feature.
26   alias -g '${1+"$@"}'='"$@"'
27   setopt NO_GLOB_SUBST
28 else
29   case `(set -o) 2>/dev/null` in #(
30   *posix*) :
31     set -o posix ;; #(
32   *) :
33      ;;
34 esac
35 fi
36
37
38 as_nl='
39 '
40 export as_nl
41 # Printing a long string crashes Solaris 7 /usr/bin/printf.
42 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45 # Prefer a ksh shell builtin over an external printf program on Solaris,
46 # but without wasting forks for bash or zsh.
47 if test -z "$BASH_VERSION$ZSH_VERSION" \
48     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49   as_echo='print -r --'
50   as_echo_n='print -rn --'
51 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52   as_echo='printf %s\n'
53   as_echo_n='printf %s'
54 else
55   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57     as_echo_n='/usr/ucb/echo -n'
58   else
59     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60     as_echo_n_body='eval
61       arg=$1;
62       case $arg in #(
63       *"$as_nl"*)
64         expr "X$arg" : "X\\(.*\\)$as_nl";
65         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66       esac;
67       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68     '
69     export as_echo_n_body
70     as_echo_n='sh -c $as_echo_n_body as_echo'
71   fi
72   export as_echo_body
73   as_echo='sh -c $as_echo_body as_echo'
74 fi
75
76 # The user is always right.
77 if test "${PATH_SEPARATOR+set}" != set; then
78   PATH_SEPARATOR=:
79   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81       PATH_SEPARATOR=';'
82   }
83 fi
84
85
86 # IFS
87 # We need space, tab and new line, in precisely that order.  Quoting is
88 # there to prevent editors from complaining about space-tab.
89 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
90 # splitting by setting IFS to empty value.)
91 IFS=" ""        $as_nl"
92
93 # Find who we are.  Look in the path if we contain no directory separator.
94 as_myself=
95 case $0 in #((
96   *[\\/]* ) as_myself=$0 ;;
97   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
98 for as_dir in $PATH
99 do
100   IFS=$as_save_IFS
101   test -z "$as_dir" && as_dir=.
102     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
103   done
104 IFS=$as_save_IFS
105
106      ;;
107 esac
108 # We did not find ourselves, most probably we were run as `sh COMMAND'
109 # in which case we are not to be found in the path.
110 if test "x$as_myself" = x; then
111   as_myself=$0
112 fi
113 if test ! -f "$as_myself"; then
114   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
115   exit 1
116 fi
117
118 # Unset variables that we do not need and which cause bugs (e.g. in
119 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
120 # suppresses any "Segmentation fault" message there.  '((' could
121 # trigger a bug in pdksh 5.2.14.
122 for as_var in BASH_ENV ENV MAIL MAILPATH
123 do eval test x\${$as_var+set} = xset \
124   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
125 done
126 PS1='$ '
127 PS2='> '
128 PS4='+ '
129
130 # NLS nuisances.
131 LC_ALL=C
132 export LC_ALL
133 LANGUAGE=C
134 export LANGUAGE
135
136 # CDPATH.
137 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
138
139 # Use a proper internal environment variable to ensure we don't fall
140   # into an infinite loop, continuously re-executing ourselves.
141   if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
142     _as_can_reexec=no; export _as_can_reexec;
143     # We cannot yet assume a decent shell, so we have to provide a
144 # neutralization value for shells without unset; and this also
145 # works around shells that cannot unset nonexistent variables.
146 # Preserve -v and -x to the replacement shell.
147 BASH_ENV=/dev/null
148 ENV=/dev/null
149 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
150 case $- in # ((((
151   *v*x* | *x*v* ) as_opts=-vx ;;
152   *v* ) as_opts=-v ;;
153   *x* ) as_opts=-x ;;
154   * ) as_opts= ;;
155 esac
156 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
157 # Admittedly, this is quite paranoid, since all the known shells bail
158 # out after a failed `exec'.
159 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
160 as_fn_exit 255
161   fi
162   # We don't want this to propagate to other subprocesses.
163           { _as_can_reexec=; unset _as_can_reexec;}
164 if test "x$CONFIG_SHELL" = x; then
165   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
166   emulate sh
167   NULLCMD=:
168   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
169   # is contrary to our usage.  Disable this feature.
170   alias -g '\${1+\"\$@\"}'='\"\$@\"'
171   setopt NO_GLOB_SUBST
172 else
173   case \`(set -o) 2>/dev/null\` in #(
174   *posix*) :
175     set -o posix ;; #(
176   *) :
177      ;;
178 esac
179 fi
180 "
181   as_required="as_fn_return () { (exit \$1); }
182 as_fn_success () { as_fn_return 0; }
183 as_fn_failure () { as_fn_return 1; }
184 as_fn_ret_success () { return 0; }
185 as_fn_ret_failure () { return 1; }
186
187 exitcode=0
188 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
189 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
190 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
191 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
192 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
193
194 else
195   exitcode=1; echo positional parameters were not saved.
196 fi
197 test x\$exitcode = x0 || exit 1
198 test -x / || exit 1"
199   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
200   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
201   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
202   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
203 test \$(( 1 + 1 )) = 2 || exit 1"
204   if (eval "$as_required") 2>/dev/null; then :
205   as_have_required=yes
206 else
207   as_have_required=no
208 fi
209   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
210
211 else
212   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
213 as_found=false
214 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
215 do
216   IFS=$as_save_IFS
217   test -z "$as_dir" && as_dir=.
218   as_found=:
219   case $as_dir in #(
220          /*)
221            for as_base in sh bash ksh sh5; do
222              # Try only shells that exist, to save several forks.
223              as_shell=$as_dir/$as_base
224              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
225                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
226   CONFIG_SHELL=$as_shell as_have_required=yes
227                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
228   break 2
229 fi
230 fi
231            done;;
232        esac
233   as_found=false
234 done
235 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
236               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
237   CONFIG_SHELL=$SHELL as_have_required=yes
238 fi; }
239 IFS=$as_save_IFS
240
241
242       if test "x$CONFIG_SHELL" != x; then :
243   export CONFIG_SHELL
244              # We cannot yet assume a decent shell, so we have to provide a
245 # neutralization value for shells without unset; and this also
246 # works around shells that cannot unset nonexistent variables.
247 # Preserve -v and -x to the replacement shell.
248 BASH_ENV=/dev/null
249 ENV=/dev/null
250 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
251 case $- in # ((((
252   *v*x* | *x*v* ) as_opts=-vx ;;
253   *v* ) as_opts=-v ;;
254   *x* ) as_opts=-x ;;
255   * ) as_opts= ;;
256 esac
257 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
258 # Admittedly, this is quite paranoid, since all the known shells bail
259 # out after a failed `exec'.
260 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
261 exit 255
262 fi
263
264     if test x$as_have_required = xno; then :
265   $as_echo "$0: This script requires a shell more modern than all"
266   $as_echo "$0: the shells that I found on your system."
267   if test x${ZSH_VERSION+set} = xset ; then
268     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
269     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
270   else
271     $as_echo "$0: Please tell bug-autoconf@gnu.org and
272 $0: pgsql-bugs@postgresql.org about your system, including
273 $0: any error possibly output before this message. Then
274 $0: install a modern shell, or manually run the script
275 $0: under such a shell if you do have one."
276   fi
277   exit 1
278 fi
279 fi
280 fi
281 SHELL=${CONFIG_SHELL-/bin/sh}
282 export SHELL
283 # Unset more variables known to interfere with behavior of common tools.
284 CLICOLOR_FORCE= GREP_OPTIONS=
285 unset CLICOLOR_FORCE GREP_OPTIONS
286
287 ## --------------------- ##
288 ## M4sh Shell Functions. ##
289 ## --------------------- ##
290 # as_fn_unset VAR
291 # ---------------
292 # Portably unset VAR.
293 as_fn_unset ()
294 {
295   { eval $1=; unset $1;}
296 }
297 as_unset=as_fn_unset
298
299 # as_fn_set_status STATUS
300 # -----------------------
301 # Set $? to STATUS, without forking.
302 as_fn_set_status ()
303 {
304   return $1
305 } # as_fn_set_status
306
307 # as_fn_exit STATUS
308 # -----------------
309 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
310 as_fn_exit ()
311 {
312   set +e
313   as_fn_set_status $1
314   exit $1
315 } # as_fn_exit
316
317 # as_fn_mkdir_p
318 # -------------
319 # Create "$as_dir" as a directory, including parents if necessary.
320 as_fn_mkdir_p ()
321 {
322
323   case $as_dir in #(
324   -*) as_dir=./$as_dir;;
325   esac
326   test -d "$as_dir" || eval $as_mkdir_p || {
327     as_dirs=
328     while :; do
329       case $as_dir in #(
330       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
331       *) as_qdir=$as_dir;;
332       esac
333       as_dirs="'$as_qdir' $as_dirs"
334       as_dir=`$as_dirname -- "$as_dir" ||
335 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
336          X"$as_dir" : 'X\(//\)[^/]' \| \
337          X"$as_dir" : 'X\(//\)$' \| \
338          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
339 $as_echo X"$as_dir" |
340     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
341             s//\1/
342             q
343           }
344           /^X\(\/\/\)[^/].*/{
345             s//\1/
346             q
347           }
348           /^X\(\/\/\)$/{
349             s//\1/
350             q
351           }
352           /^X\(\/\).*/{
353             s//\1/
354             q
355           }
356           s/.*/./; q'`
357       test -d "$as_dir" && break
358     done
359     test -z "$as_dirs" || eval "mkdir $as_dirs"
360   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
361
362
363 } # as_fn_mkdir_p
364
365 # as_fn_executable_p FILE
366 # -----------------------
367 # Test if FILE is an executable regular file.
368 as_fn_executable_p ()
369 {
370   test -f "$1" && test -x "$1"
371 } # as_fn_executable_p
372 # as_fn_append VAR VALUE
373 # ----------------------
374 # Append the text in VALUE to the end of the definition contained in VAR. Take
375 # advantage of any shell optimizations that allow amortized linear growth over
376 # repeated appends, instead of the typical quadratic growth present in naive
377 # implementations.
378 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
379   eval 'as_fn_append ()
380   {
381     eval $1+=\$2
382   }'
383 else
384   as_fn_append ()
385   {
386     eval $1=\$$1\$2
387   }
388 fi # as_fn_append
389
390 # as_fn_arith ARG...
391 # ------------------
392 # Perform arithmetic evaluation on the ARGs, and store the result in the
393 # global $as_val. Take advantage of shells that can avoid forks. The arguments
394 # must be portable across $(()) and expr.
395 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
396   eval 'as_fn_arith ()
397   {
398     as_val=$(( $* ))
399   }'
400 else
401   as_fn_arith ()
402   {
403     as_val=`expr "$@" || test $? -eq 1`
404   }
405 fi # as_fn_arith
406
407
408 # as_fn_error STATUS ERROR [LINENO LOG_FD]
409 # ----------------------------------------
410 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
411 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
412 # script with STATUS, using 1 if that was 0.
413 as_fn_error ()
414 {
415   as_status=$1; test $as_status -eq 0 && as_status=1
416   if test "$4"; then
417     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
418     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
419   fi
420   $as_echo "$as_me: error: $2" >&2
421   as_fn_exit $as_status
422 } # as_fn_error
423
424 if expr a : '\(a\)' >/dev/null 2>&1 &&
425    test "X`expr 00001 : '.*\(...\)'`" = X001; then
426   as_expr=expr
427 else
428   as_expr=false
429 fi
430
431 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
432   as_basename=basename
433 else
434   as_basename=false
435 fi
436
437 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
438   as_dirname=dirname
439 else
440   as_dirname=false
441 fi
442
443 as_me=`$as_basename -- "$0" ||
444 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
445          X"$0" : 'X\(//\)$' \| \
446          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
447 $as_echo X/"$0" |
448     sed '/^.*\/\([^/][^/]*\)\/*$/{
449             s//\1/
450             q
451           }
452           /^X\/\(\/\/\)$/{
453             s//\1/
454             q
455           }
456           /^X\/\(\/\).*/{
457             s//\1/
458             q
459           }
460           s/.*/./; q'`
461
462 # Avoid depending upon Character Ranges.
463 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
464 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
465 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
466 as_cr_digits='0123456789'
467 as_cr_alnum=$as_cr_Letters$as_cr_digits
468
469
470   as_lineno_1=$LINENO as_lineno_1a=$LINENO
471   as_lineno_2=$LINENO as_lineno_2a=$LINENO
472   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
473   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
474   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
475   sed -n '
476     p
477     /[$]LINENO/=
478   ' <$as_myself |
479     sed '
480       s/[$]LINENO.*/&-/
481       t lineno
482       b
483       :lineno
484       N
485       :loop
486       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
487       t loop
488       s/-\n.*//
489     ' >$as_me.lineno &&
490   chmod +x "$as_me.lineno" ||
491     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
492
493   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
494   # already done that, so ensure we don't try to do so again and fall
495   # in an infinite loop.  This has already happened in practice.
496   _as_can_reexec=no; export _as_can_reexec
497   # Don't try to exec as it changes $[0], causing all sort of problems
498   # (the dirname of $[0] is not the place where we might find the
499   # original and so on.  Autoconf is especially sensitive to this).
500   . "./$as_me.lineno"
501   # Exit status is that of the last command.
502   exit
503 }
504
505 ECHO_C= ECHO_N= ECHO_T=
506 case `echo -n x` in #(((((
507 -n*)
508   case `echo 'xy\c'` in
509   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
510   xy)  ECHO_C='\c';;
511   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
512        ECHO_T=' ';;
513   esac;;
514 *)
515   ECHO_N='-n';;
516 esac
517
518 rm -f conf$$ conf$$.exe conf$$.file
519 if test -d conf$$.dir; then
520   rm -f conf$$.dir/conf$$.file
521 else
522   rm -f conf$$.dir
523   mkdir conf$$.dir 2>/dev/null
524 fi
525 if (echo >conf$$.file) 2>/dev/null; then
526   if ln -s conf$$.file conf$$ 2>/dev/null; then
527     as_ln_s='ln -s'
528     # ... but there are two gotchas:
529     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
530     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
531     # In both cases, we have to default to `cp -pR'.
532     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
533       as_ln_s='cp -pR'
534   elif ln conf$$.file conf$$ 2>/dev/null; then
535     as_ln_s=ln
536   else
537     as_ln_s='cp -pR'
538   fi
539 else
540   as_ln_s='cp -pR'
541 fi
542 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
543 rmdir conf$$.dir 2>/dev/null
544
545 if mkdir -p . 2>/dev/null; then
546   as_mkdir_p='mkdir -p "$as_dir"'
547 else
548   test -d ./-p && rmdir ./-p
549   as_mkdir_p=false
550 fi
551
552 as_test_x='test -x'
553 as_executable_p=as_fn_executable_p
554
555 # Sed expression to map a string onto a valid CPP name.
556 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
557
558 # Sed expression to map a string onto a valid variable name.
559 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
560
561
562 test -n "$DJDIR" || exec 7<&0 </dev/null
563 exec 6>&1
564
565 # Name of the host.
566 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
567 # so uname gets run too.
568 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
569
570 #
571 # Initializations.
572 #
573 ac_default_prefix=/usr/local
574 ac_clean_files=
575 ac_config_libobj_dir=.
576 LIBOBJS=
577 cross_compiling=no
578 subdirs=
579 MFLAGS=
580 MAKEFLAGS=
581
582 # Identity of this package.
583 PACKAGE_NAME='PostgreSQL'
584 PACKAGE_TARNAME='postgresql'
585 PACKAGE_VERSION='9.5devel'
586 PACKAGE_STRING='PostgreSQL 9.5devel'
587 PACKAGE_BUGREPORT='pgsql-bugs@postgresql.org'
588 PACKAGE_URL=''
589
590 ac_unique_file="src/backend/access/common/heaptuple.c"
591 ac_default_prefix=/usr/local/pgsql
592 # Factoring default headers for most tests.
593 ac_includes_default="\
594 #include <stdio.h>
595 #ifdef HAVE_SYS_TYPES_H
596 # include <sys/types.h>
597 #endif
598 #ifdef HAVE_SYS_STAT_H
599 # include <sys/stat.h>
600 #endif
601 #ifdef STDC_HEADERS
602 # include <stdlib.h>
603 # include <stddef.h>
604 #else
605 # ifdef HAVE_STDLIB_H
606 #  include <stdlib.h>
607 # endif
608 #endif
609 #ifdef HAVE_STRING_H
610 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
611 #  include <memory.h>
612 # endif
613 # include <string.h>
614 #endif
615 #ifdef HAVE_STRINGS_H
616 # include <strings.h>
617 #endif
618 #ifdef HAVE_INTTYPES_H
619 # include <inttypes.h>
620 #endif
621 #ifdef HAVE_STDINT_H
622 # include <stdint.h>
623 #endif
624 #ifdef HAVE_UNISTD_H
625 # include <unistd.h>
626 #endif"
627
628 ac_subst_vars='LTLIBOBJS
629 vpath_build
630 PROVE
631 OSX
632 XSLTPROC
633 XMLLINT
634 DBTOEPUB
635 COLLATEINDEX
636 DOCBOOKSTYLE
637 have_docbook
638 JADE
639 NSGMLS
640 TCL_SHLIB_LD_LIBS
641 TCL_SHARED_BUILD
642 TCL_LIB_SPEC
643 TCL_LIBS
644 TCL_LIB_FILE
645 TCL_INCLUDE_SPEC
646 TCL_CONFIG_SH
647 TCLSH
648 XGETTEXT
649 MSGMERGE
650 MSGFMT_FLAGS
651 MSGFMT
652 HAVE_POSIX_SIGNALS
653 LDAP_LIBS_BE
654 LDAP_LIBS_FE
655 PTHREAD_CFLAGS
656 PTHREAD_LIBS
657 acx_pthread_config
658 have_win32_dbghelp
659 HAVE_IPV6
660 LIBOBJS
661 UUID_LIBS
662 ZIC
663 python_enable_shared
664 python_additional_libs
665 python_libspec
666 python_libdir
667 python_includespec
668 python_version
669 python_majorversion
670 PYTHON
671 perl_embed_ldflags
672 perl_useshrplib
673 perl_privlibexp
674 perl_archlibexp
675 PERL
676 FLEXFLAGS
677 FLEX
678 BISONFLAGS
679 BISON
680 MKDIR_P
681 AWK
682 LN_S
683 TAR
684 install_bin
685 INSTALL_DATA
686 INSTALL_SCRIPT
687 INSTALL_PROGRAM
688 WINDRES
689 DLLWRAP
690 DLLTOOL
691 AR
692 STRIP_SHARED_LIB
693 STRIP_STATIC_LIB
694 STRIP
695 RANLIB
696 ld_R_works
697 with_gnu_ld
698 LD
699 LDFLAGS_SL
700 LDFLAGS_EX
701 ELF_SYS
702 EGREP
703 GREP
704 with_zlib
705 with_system_tzdata
706 with_libxslt
707 with_libxml
708 XML2_CONFIG
709 UUID_EXTRA_OBJS
710 with_uuid
711 with_selinux
712 with_openssl
713 krb_srvtab
714 with_python
715 with_perl
716 with_tcl
717 enable_thread_safety
718 INCLUDES
719 autodepend
720 TAS
721 GCC
722 CPP
723 CFLAGS_VECTOR
724 SUN_STUDIO_CC
725 OBJEXT
726 EXEEXT
727 ac_ct_CC
728 CPPFLAGS
729 LDFLAGS
730 CFLAGS
731 CC
732 enable_tap_tests
733 enable_dtrace
734 DTRACEFLAGS
735 DTRACE
736 enable_coverage
737 GENHTML
738 LCOV
739 GCOV
740 enable_debug
741 enable_rpath
742 default_port
743 WANTED_LANGUAGES
744 enable_nls
745 PORTNAME
746 host_os
747 host_vendor
748 host_cpu
749 host
750 build_os
751 build_vendor
752 build_cpu
753 build
754 PG_MAJORVERSION
755 configure_args
756 target_alias
757 host_alias
758 build_alias
759 LIBS
760 ECHO_T
761 ECHO_N
762 ECHO_C
763 DEFS
764 mandir
765 localedir
766 libdir
767 psdir
768 pdfdir
769 dvidir
770 htmldir
771 infodir
772 docdir
773 oldincludedir
774 includedir
775 localstatedir
776 sharedstatedir
777 sysconfdir
778 datadir
779 datarootdir
780 libexecdir
781 sbindir
782 bindir
783 program_transform_name
784 prefix
785 exec_prefix
786 PACKAGE_URL
787 PACKAGE_BUGREPORT
788 PACKAGE_STRING
789 PACKAGE_VERSION
790 PACKAGE_TARNAME
791 PACKAGE_NAME
792 PATH_SEPARATOR
793 SHELL'
794 ac_subst_files=''
795 ac_user_opts='
796 enable_option_checking
797 with_extra_version
798 with_template
799 with_includes
800 with_libraries
801 with_libs
802 enable_integer_datetimes
803 enable_nls
804 with_pgport
805 enable_rpath
806 enable_spinlocks
807 enable_atomics
808 enable_debug
809 enable_profiling
810 enable_coverage
811 enable_dtrace
812 enable_tap_tests
813 with_blocksize
814 with_segsize
815 with_wal_blocksize
816 with_wal_segsize
817 with_CC
818 enable_depend
819 enable_cassert
820 enable_thread_safety
821 with_tcl
822 with_tclconfig
823 with_perl
824 with_python
825 with_gssapi
826 with_krb_srvnam
827 with_pam
828 with_ldap
829 with_bonjour
830 with_openssl
831 with_selinux
832 with_readline
833 with_libedit_preferred
834 with_uuid
835 with_ossp_uuid
836 with_libxml
837 with_libxslt
838 with_system_tzdata
839 with_zlib
840 with_gnu_ld
841 enable_largefile
842 enable_float4_byval
843 enable_float8_byval
844 '
845       ac_precious_vars='build_alias
846 host_alias
847 target_alias
848 CC
849 CFLAGS
850 LDFLAGS
851 LIBS
852 CPPFLAGS
853 CPP
854 LDFLAGS_EX
855 LDFLAGS_SL
856 DOCBOOKSTYLE'
857
858
859 # Initialize some variables set by options.
860 ac_init_help=
861 ac_init_version=false
862 ac_unrecognized_opts=
863 ac_unrecognized_sep=
864 # The variables have the same names as the options, with
865 # dashes changed to underlines.
866 cache_file=/dev/null
867 exec_prefix=NONE
868 no_create=
869 no_recursion=
870 prefix=NONE
871 program_prefix=NONE
872 program_suffix=NONE
873 program_transform_name=s,x,x,
874 silent=
875 site=
876 srcdir=
877 verbose=
878 x_includes=NONE
879 x_libraries=NONE
880
881 # Installation directory options.
882 # These are left unexpanded so users can "make install exec_prefix=/foo"
883 # and all the variables that are supposed to be based on exec_prefix
884 # by default will actually change.
885 # Use braces instead of parens because sh, perl, etc. also accept them.
886 # (The list follows the same order as the GNU Coding Standards.)
887 bindir='${exec_prefix}/bin'
888 sbindir='${exec_prefix}/sbin'
889 libexecdir='${exec_prefix}/libexec'
890 datarootdir='${prefix}/share'
891 datadir='${datarootdir}'
892 sysconfdir='${prefix}/etc'
893 sharedstatedir='${prefix}/com'
894 localstatedir='${prefix}/var'
895 includedir='${prefix}/include'
896 oldincludedir='/usr/include'
897 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
898 infodir='${datarootdir}/info'
899 htmldir='${docdir}'
900 dvidir='${docdir}'
901 pdfdir='${docdir}'
902 psdir='${docdir}'
903 libdir='${exec_prefix}/lib'
904 localedir='${datarootdir}/locale'
905 mandir='${datarootdir}/man'
906
907 ac_prev=
908 ac_dashdash=
909 for ac_option
910 do
911   # If the previous option needs an argument, assign it.
912   if test -n "$ac_prev"; then
913     eval $ac_prev=\$ac_option
914     ac_prev=
915     continue
916   fi
917
918   case $ac_option in
919   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
920   *=)   ac_optarg= ;;
921   *)    ac_optarg=yes ;;
922   esac
923
924   # Accept the important Cygnus configure options, so we can diagnose typos.
925
926   case $ac_dashdash$ac_option in
927   --)
928     ac_dashdash=yes ;;
929
930   -bindir | --bindir | --bindi | --bind | --bin | --bi)
931     ac_prev=bindir ;;
932   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
933     bindir=$ac_optarg ;;
934
935   -build | --build | --buil | --bui | --bu)
936     ac_prev=build_alias ;;
937   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
938     build_alias=$ac_optarg ;;
939
940   -cache-file | --cache-file | --cache-fil | --cache-fi \
941   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
942     ac_prev=cache_file ;;
943   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
944   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
945     cache_file=$ac_optarg ;;
946
947   --config-cache | -C)
948     cache_file=config.cache ;;
949
950   -datadir | --datadir | --datadi | --datad)
951     ac_prev=datadir ;;
952   -datadir=* | --datadir=* | --datadi=* | --datad=*)
953     datadir=$ac_optarg ;;
954
955   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
956   | --dataroo | --dataro | --datar)
957     ac_prev=datarootdir ;;
958   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
959   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
960     datarootdir=$ac_optarg ;;
961
962   -disable-* | --disable-*)
963     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
964     # Reject names that are not valid shell variable names.
965     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
966       as_fn_error $? "invalid feature name: $ac_useropt"
967     ac_useropt_orig=$ac_useropt
968     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
969     case $ac_user_opts in
970       *"
971 "enable_$ac_useropt"
972 "*) ;;
973       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
974          ac_unrecognized_sep=', ';;
975     esac
976     eval enable_$ac_useropt=no ;;
977
978   -docdir | --docdir | --docdi | --doc | --do)
979     ac_prev=docdir ;;
980   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
981     docdir=$ac_optarg ;;
982
983   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
984     ac_prev=dvidir ;;
985   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
986     dvidir=$ac_optarg ;;
987
988   -enable-* | --enable-*)
989     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
990     # Reject names that are not valid shell variable names.
991     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
992       as_fn_error $? "invalid feature name: $ac_useropt"
993     ac_useropt_orig=$ac_useropt
994     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
995     case $ac_user_opts in
996       *"
997 "enable_$ac_useropt"
998 "*) ;;
999       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1000          ac_unrecognized_sep=', ';;
1001     esac
1002     eval enable_$ac_useropt=\$ac_optarg ;;
1003
1004   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1005   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1006   | --exec | --exe | --ex)
1007     ac_prev=exec_prefix ;;
1008   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1009   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1010   | --exec=* | --exe=* | --ex=*)
1011     exec_prefix=$ac_optarg ;;
1012
1013   -gas | --gas | --ga | --g)
1014     # Obsolete; use --with-gas.
1015     with_gas=yes ;;
1016
1017   -help | --help | --hel | --he | -h)
1018     ac_init_help=long ;;
1019   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1020     ac_init_help=recursive ;;
1021   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1022     ac_init_help=short ;;
1023
1024   -host | --host | --hos | --ho)
1025     ac_prev=host_alias ;;
1026   -host=* | --host=* | --hos=* | --ho=*)
1027     host_alias=$ac_optarg ;;
1028
1029   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1030     ac_prev=htmldir ;;
1031   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1032   | --ht=*)
1033     htmldir=$ac_optarg ;;
1034
1035   -includedir | --includedir | --includedi | --included | --include \
1036   | --includ | --inclu | --incl | --inc)
1037     ac_prev=includedir ;;
1038   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1039   | --includ=* | --inclu=* | --incl=* | --inc=*)
1040     includedir=$ac_optarg ;;
1041
1042   -infodir | --infodir | --infodi | --infod | --info | --inf)
1043     ac_prev=infodir ;;
1044   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1045     infodir=$ac_optarg ;;
1046
1047   -libdir | --libdir | --libdi | --libd)
1048     ac_prev=libdir ;;
1049   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1050     libdir=$ac_optarg ;;
1051
1052   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1053   | --libexe | --libex | --libe)
1054     ac_prev=libexecdir ;;
1055   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1056   | --libexe=* | --libex=* | --libe=*)
1057     libexecdir=$ac_optarg ;;
1058
1059   -localedir | --localedir | --localedi | --localed | --locale)
1060     ac_prev=localedir ;;
1061   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1062     localedir=$ac_optarg ;;
1063
1064   -localstatedir | --localstatedir | --localstatedi | --localstated \
1065   | --localstate | --localstat | --localsta | --localst | --locals)
1066     ac_prev=localstatedir ;;
1067   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1068   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1069     localstatedir=$ac_optarg ;;
1070
1071   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1072     ac_prev=mandir ;;
1073   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1074     mandir=$ac_optarg ;;
1075
1076   -nfp | --nfp | --nf)
1077     # Obsolete; use --without-fp.
1078     with_fp=no ;;
1079
1080   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1081   | --no-cr | --no-c | -n)
1082     no_create=yes ;;
1083
1084   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1085   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1086     no_recursion=yes ;;
1087
1088   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1089   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1090   | --oldin | --oldi | --old | --ol | --o)
1091     ac_prev=oldincludedir ;;
1092   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1093   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1094   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1095     oldincludedir=$ac_optarg ;;
1096
1097   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1098     ac_prev=prefix ;;
1099   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1100     prefix=$ac_optarg ;;
1101
1102   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1103   | --program-pre | --program-pr | --program-p)
1104     ac_prev=program_prefix ;;
1105   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1106   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1107     program_prefix=$ac_optarg ;;
1108
1109   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1110   | --program-suf | --program-su | --program-s)
1111     ac_prev=program_suffix ;;
1112   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1113   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1114     program_suffix=$ac_optarg ;;
1115
1116   -program-transform-name | --program-transform-name \
1117   | --program-transform-nam | --program-transform-na \
1118   | --program-transform-n | --program-transform- \
1119   | --program-transform | --program-transfor \
1120   | --program-transfo | --program-transf \
1121   | --program-trans | --program-tran \
1122   | --progr-tra | --program-tr | --program-t)
1123     ac_prev=program_transform_name ;;
1124   -program-transform-name=* | --program-transform-name=* \
1125   | --program-transform-nam=* | --program-transform-na=* \
1126   | --program-transform-n=* | --program-transform-=* \
1127   | --program-transform=* | --program-transfor=* \
1128   | --program-transfo=* | --program-transf=* \
1129   | --program-trans=* | --program-tran=* \
1130   | --progr-tra=* | --program-tr=* | --program-t=*)
1131     program_transform_name=$ac_optarg ;;
1132
1133   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1134     ac_prev=pdfdir ;;
1135   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1136     pdfdir=$ac_optarg ;;
1137
1138   -psdir | --psdir | --psdi | --psd | --ps)
1139     ac_prev=psdir ;;
1140   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1141     psdir=$ac_optarg ;;
1142
1143   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1144   | -silent | --silent | --silen | --sile | --sil)
1145     silent=yes ;;
1146
1147   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1148     ac_prev=sbindir ;;
1149   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1150   | --sbi=* | --sb=*)
1151     sbindir=$ac_optarg ;;
1152
1153   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1154   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1155   | --sharedst | --shareds | --shared | --share | --shar \
1156   | --sha | --sh)
1157     ac_prev=sharedstatedir ;;
1158   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1159   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1160   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1161   | --sha=* | --sh=*)
1162     sharedstatedir=$ac_optarg ;;
1163
1164   -site | --site | --sit)
1165     ac_prev=site ;;
1166   -site=* | --site=* | --sit=*)
1167     site=$ac_optarg ;;
1168
1169   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1170     ac_prev=srcdir ;;
1171   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1172     srcdir=$ac_optarg ;;
1173
1174   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1175   | --syscon | --sysco | --sysc | --sys | --sy)
1176     ac_prev=sysconfdir ;;
1177   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1178   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1179     sysconfdir=$ac_optarg ;;
1180
1181   -target | --target | --targe | --targ | --tar | --ta | --t)
1182     ac_prev=target_alias ;;
1183   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1184     target_alias=$ac_optarg ;;
1185
1186   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1187     verbose=yes ;;
1188
1189   -version | --version | --versio | --versi | --vers | -V)
1190     ac_init_version=: ;;
1191
1192   -with-* | --with-*)
1193     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1194     # Reject names that are not valid shell variable names.
1195     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1196       as_fn_error $? "invalid package name: $ac_useropt"
1197     ac_useropt_orig=$ac_useropt
1198     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1199     case $ac_user_opts in
1200       *"
1201 "with_$ac_useropt"
1202 "*) ;;
1203       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1204          ac_unrecognized_sep=', ';;
1205     esac
1206     eval with_$ac_useropt=\$ac_optarg ;;
1207
1208   -without-* | --without-*)
1209     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1210     # Reject names that are not valid shell variable names.
1211     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1212       as_fn_error $? "invalid package name: $ac_useropt"
1213     ac_useropt_orig=$ac_useropt
1214     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1215     case $ac_user_opts in
1216       *"
1217 "with_$ac_useropt"
1218 "*) ;;
1219       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1220          ac_unrecognized_sep=', ';;
1221     esac
1222     eval with_$ac_useropt=no ;;
1223
1224   --x)
1225     # Obsolete; use --with-x.
1226     with_x=yes ;;
1227
1228   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1229   | --x-incl | --x-inc | --x-in | --x-i)
1230     ac_prev=x_includes ;;
1231   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1232   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1233     x_includes=$ac_optarg ;;
1234
1235   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1236   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1237     ac_prev=x_libraries ;;
1238   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1239   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1240     x_libraries=$ac_optarg ;;
1241
1242   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1243 Try \`$0 --help' for more information"
1244     ;;
1245
1246   *=*)
1247     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1248     # Reject names that are not valid shell variable names.
1249     case $ac_envvar in #(
1250       '' | [0-9]* | *[!_$as_cr_alnum]* )
1251       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1252     esac
1253     eval $ac_envvar=\$ac_optarg
1254     export $ac_envvar ;;
1255
1256   *)
1257     # FIXME: should be removed in autoconf 3.0.
1258     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1259     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1260       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1261     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1262     ;;
1263
1264   esac
1265 done
1266
1267 if test -n "$ac_prev"; then
1268   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1269   as_fn_error $? "missing argument to $ac_option"
1270 fi
1271
1272 if test -n "$ac_unrecognized_opts"; then
1273   case $enable_option_checking in
1274     no) ;;
1275     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1276     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1277   esac
1278 fi
1279
1280 # Check all directory arguments for consistency.
1281 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1282                 datadir sysconfdir sharedstatedir localstatedir includedir \
1283                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1284                 libdir localedir mandir
1285 do
1286   eval ac_val=\$$ac_var
1287   # Remove trailing slashes.
1288   case $ac_val in
1289     */ )
1290       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1291       eval $ac_var=\$ac_val;;
1292   esac
1293   # Be sure to have absolute directory names.
1294   case $ac_val in
1295     [\\/$]* | ?:[\\/]* )  continue;;
1296     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1297   esac
1298   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1299 done
1300
1301 # There might be people who depend on the old broken behavior: `$host'
1302 # used to hold the argument of --host etc.
1303 # FIXME: To remove some day.
1304 build=$build_alias
1305 host=$host_alias
1306 target=$target_alias
1307
1308 # FIXME: To remove some day.
1309 if test "x$host_alias" != x; then
1310   if test "x$build_alias" = x; then
1311     cross_compiling=maybe
1312   elif test "x$build_alias" != "x$host_alias"; then
1313     cross_compiling=yes
1314   fi
1315 fi
1316
1317 ac_tool_prefix=
1318 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1319
1320 test "$silent" = yes && exec 6>/dev/null
1321
1322
1323 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1324 ac_ls_di=`ls -di .` &&
1325 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1326   as_fn_error $? "working directory cannot be determined"
1327 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1328   as_fn_error $? "pwd does not report name of working directory"
1329
1330
1331 # Find the source files, if location was not specified.
1332 if test -z "$srcdir"; then
1333   ac_srcdir_defaulted=yes
1334   # Try the directory containing this script, then the parent directory.
1335   ac_confdir=`$as_dirname -- "$as_myself" ||
1336 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1337          X"$as_myself" : 'X\(//\)[^/]' \| \
1338          X"$as_myself" : 'X\(//\)$' \| \
1339          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1340 $as_echo X"$as_myself" |
1341     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1342             s//\1/
1343             q
1344           }
1345           /^X\(\/\/\)[^/].*/{
1346             s//\1/
1347             q
1348           }
1349           /^X\(\/\/\)$/{
1350             s//\1/
1351             q
1352           }
1353           /^X\(\/\).*/{
1354             s//\1/
1355             q
1356           }
1357           s/.*/./; q'`
1358   srcdir=$ac_confdir
1359   if test ! -r "$srcdir/$ac_unique_file"; then
1360     srcdir=..
1361   fi
1362 else
1363   ac_srcdir_defaulted=no
1364 fi
1365 if test ! -r "$srcdir/$ac_unique_file"; then
1366   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1367   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1368 fi
1369 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1370 ac_abs_confdir=`(
1371         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1372         pwd)`
1373 # When building in place, set srcdir=.
1374 if test "$ac_abs_confdir" = "$ac_pwd"; then
1375   srcdir=.
1376 fi
1377 # Remove unnecessary trailing slashes from srcdir.
1378 # Double slashes in file names in object file debugging info
1379 # mess up M-x gdb in Emacs.
1380 case $srcdir in
1381 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1382 esac
1383 for ac_var in $ac_precious_vars; do
1384   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1385   eval ac_env_${ac_var}_value=\$${ac_var}
1386   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1387   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1388 done
1389
1390 #
1391 # Report the --help message.
1392 #
1393 if test "$ac_init_help" = "long"; then
1394   # Omit some internal or obsolete options to make the list less imposing.
1395   # This message is too long to be a string in the A/UX 3.1 sh.
1396   cat <<_ACEOF
1397 \`configure' configures PostgreSQL 9.5devel to adapt to many kinds of systems.
1398
1399 Usage: $0 [OPTION]... [VAR=VALUE]...
1400
1401 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1402 VAR=VALUE.  See below for descriptions of some of the useful variables.
1403
1404 Defaults for the options are specified in brackets.
1405
1406 Configuration:
1407   -h, --help              display this help and exit
1408       --help=short        display options specific to this package
1409       --help=recursive    display the short help of all the included packages
1410   -V, --version           display version information and exit
1411   -q, --quiet, --silent   do not print \`checking ...' messages
1412       --cache-file=FILE   cache test results in FILE [disabled]
1413   -C, --config-cache      alias for \`--cache-file=config.cache'
1414   -n, --no-create         do not create output files
1415       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1416
1417 Installation directories:
1418   --prefix=PREFIX         install architecture-independent files in PREFIX
1419                           [$ac_default_prefix]
1420   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1421                           [PREFIX]
1422
1423 By default, \`make install' will install all the files in
1424 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1425 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1426 for instance \`--prefix=\$HOME'.
1427
1428 For better control, use the options below.
1429
1430 Fine tuning of the installation directories:
1431   --bindir=DIR            user executables [EPREFIX/bin]
1432   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1433   --libexecdir=DIR        program executables [EPREFIX/libexec]
1434   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1435   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1436   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1437   --libdir=DIR            object code libraries [EPREFIX/lib]
1438   --includedir=DIR        C header files [PREFIX/include]
1439   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1440   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1441   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1442   --infodir=DIR           info documentation [DATAROOTDIR/info]
1443   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1444   --mandir=DIR            man documentation [DATAROOTDIR/man]
1445   --docdir=DIR            documentation root [DATAROOTDIR/doc/postgresql]
1446   --htmldir=DIR           html documentation [DOCDIR]
1447   --dvidir=DIR            dvi documentation [DOCDIR]
1448   --pdfdir=DIR            pdf documentation [DOCDIR]
1449   --psdir=DIR             ps documentation [DOCDIR]
1450 _ACEOF
1451
1452   cat <<\_ACEOF
1453
1454 System types:
1455   --build=BUILD     configure for building on BUILD [guessed]
1456   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1457 _ACEOF
1458 fi
1459
1460 if test -n "$ac_init_help"; then
1461   case $ac_init_help in
1462      short | recursive ) echo "Configuration of PostgreSQL 9.5devel:";;
1463    esac
1464   cat <<\_ACEOF
1465
1466 Optional Features:
1467   --disable-option-checking  ignore unrecognized --enable/--with options
1468   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1469   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1470   --disable-integer-datetimes
1471                           disable 64-bit integer date/time support
1472   --enable-nls[=LANGUAGES]
1473                           enable Native Language Support
1474   --disable-rpath         do not embed shared library search path in
1475                           executables
1476   --disable-spinlocks     do not use spinlocks
1477   --disable-atomics       do not use atomic operations
1478   --enable-debug          build with debugging symbols (-g)
1479   --enable-profiling      build with profiling enabled
1480   --enable-coverage       build with coverage testing instrumentation
1481   --enable-dtrace         build with DTrace support
1482   --enable-tap-tests      enable TAP tests (requires Perl and IPC::Run)
1483   --enable-depend         turn on automatic dependency tracking
1484   --enable-cassert        enable assertion checks (for debugging)
1485   --disable-thread-safety disable thread-safety in client libraries
1486   --disable-largefile     omit support for large files
1487   --disable-float4-byval  disable float4 passed by value
1488   --disable-float8-byval  disable float8 passed by value
1489
1490 Optional Packages:
1491   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1492   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1493   --with-extra-version=STRING
1494                           append STRING to version
1495   --with-template=NAME    override operating system template
1496   --with-includes=DIRS    look for additional header files in DIRS
1497   --with-libraries=DIRS   look for additional libraries in DIRS
1498   --with-libs=DIRS        alternative spelling of --with-libraries
1499   --with-pgport=PORTNUM   set default port number [5432]
1500   --with-blocksize=BLOCKSIZE
1501                           set table block size in kB [8]
1502   --with-segsize=SEGSIZE  set table segment size in GB [1]
1503   --with-wal-blocksize=BLOCKSIZE
1504                           set WAL block size in kB [8]
1505   --with-wal-segsize=SEGSIZE
1506                           set WAL segment size in MB [16]
1507   --with-CC=CMD           set compiler (deprecated)
1508   --with-tcl              build Tcl modules (PL/Tcl)
1509   --with-tclconfig=DIR    tclConfig.sh is in DIR
1510   --with-perl             build Perl modules (PL/Perl)
1511   --with-python           build Python modules (PL/Python)
1512   --with-gssapi           build with GSSAPI support
1513   --with-krb-srvnam=NAME  default service principal name in Kerberos (GSSAPI)
1514                           [postgres]
1515   --with-pam              build with PAM support
1516   --with-ldap             build with LDAP support
1517   --with-bonjour          build with Bonjour support
1518   --with-openssl          build with OpenSSL support
1519   --with-selinux          build with SELinux support
1520   --without-readline      do not use GNU Readline nor BSD Libedit for editing
1521   --with-libedit-preferred
1522                           prefer BSD Libedit over GNU Readline
1523   --with-uuid=LIB         build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1524   --with-ossp-uuid        obsolete spelling of --with-uuid=ossp
1525   --with-libxml           build with XML support
1526   --with-libxslt          use XSLT support when building contrib/xml2
1527   --with-system-tzdata=DIR
1528                           use system time zone data in DIR
1529   --without-zlib          do not use Zlib
1530   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1531
1532 Some influential environment variables:
1533   CC          C compiler command
1534   CFLAGS      C compiler flags
1535   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1536               nonstandard directory <lib dir>
1537   LIBS        libraries to pass to the linker, e.g. -l<library>
1538   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1539               you have headers in a nonstandard directory <include dir>
1540   CPP         C preprocessor
1541   LDFLAGS_EX  extra linker flags for linking executables only
1542   LDFLAGS_SL  extra linker flags for linking shared libraries only
1543   DOCBOOKSTYLE
1544               location of DocBook stylesheets
1545
1546 Use these variables to override the choices made by `configure' or to help
1547 it to find libraries and programs with nonstandard names/locations.
1548
1549 Report bugs to <pgsql-bugs@postgresql.org>.
1550 _ACEOF
1551 ac_status=$?
1552 fi
1553
1554 if test "$ac_init_help" = "recursive"; then
1555   # If there are subdirs, report their specific --help.
1556   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1557     test -d "$ac_dir" ||
1558       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1559       continue
1560     ac_builddir=.
1561
1562 case "$ac_dir" in
1563 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1564 *)
1565   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1566   # A ".." for each directory in $ac_dir_suffix.
1567   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1568   case $ac_top_builddir_sub in
1569   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1570   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1571   esac ;;
1572 esac
1573 ac_abs_top_builddir=$ac_pwd
1574 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1575 # for backward compatibility:
1576 ac_top_builddir=$ac_top_build_prefix
1577
1578 case $srcdir in
1579   .)  # We are building in place.
1580     ac_srcdir=.
1581     ac_top_srcdir=$ac_top_builddir_sub
1582     ac_abs_top_srcdir=$ac_pwd ;;
1583   [\\/]* | ?:[\\/]* )  # Absolute name.
1584     ac_srcdir=$srcdir$ac_dir_suffix;
1585     ac_top_srcdir=$srcdir
1586     ac_abs_top_srcdir=$srcdir ;;
1587   *) # Relative name.
1588     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1589     ac_top_srcdir=$ac_top_build_prefix$srcdir
1590     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1591 esac
1592 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1593
1594     cd "$ac_dir" || { ac_status=$?; continue; }
1595     # Check for guested configure.
1596     if test -f "$ac_srcdir/configure.gnu"; then
1597       echo &&
1598       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1599     elif test -f "$ac_srcdir/configure"; then
1600       echo &&
1601       $SHELL "$ac_srcdir/configure" --help=recursive
1602     else
1603       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1604     fi || ac_status=$?
1605     cd "$ac_pwd" || { ac_status=$?; break; }
1606   done
1607 fi
1608
1609 test -n "$ac_init_help" && exit $ac_status
1610 if $ac_init_version; then
1611   cat <<\_ACEOF
1612 PostgreSQL configure 9.5devel
1613 generated by GNU Autoconf 2.69
1614
1615 Copyright (C) 2012 Free Software Foundation, Inc.
1616 This configure script is free software; the Free Software Foundation
1617 gives unlimited permission to copy, distribute and modify it.
1618
1619 Copyright (c) 1996-2015, PostgreSQL Global Development Group
1620 _ACEOF
1621   exit
1622 fi
1623
1624 ## ------------------------ ##
1625 ## Autoconf initialization. ##
1626 ## ------------------------ ##
1627
1628 # ac_fn_c_try_compile LINENO
1629 # --------------------------
1630 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1631 ac_fn_c_try_compile ()
1632 {
1633   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1634   rm -f conftest.$ac_objext
1635   if { { ac_try="$ac_compile"
1636 case "(($ac_try" in
1637   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1638   *) ac_try_echo=$ac_try;;
1639 esac
1640 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1641 $as_echo "$ac_try_echo"; } >&5
1642   (eval "$ac_compile") 2>conftest.err
1643   ac_status=$?
1644   if test -s conftest.err; then
1645     grep -v '^ *+' conftest.err >conftest.er1
1646     cat conftest.er1 >&5
1647     mv -f conftest.er1 conftest.err
1648   fi
1649   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1650   test $ac_status = 0; } && {
1651          test -z "$ac_c_werror_flag" ||
1652          test ! -s conftest.err
1653        } && test -s conftest.$ac_objext; then :
1654   ac_retval=0
1655 else
1656   $as_echo "$as_me: failed program was:" >&5
1657 sed 's/^/| /' conftest.$ac_ext >&5
1658
1659         ac_retval=1
1660 fi
1661   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1662   as_fn_set_status $ac_retval
1663
1664 } # ac_fn_c_try_compile
1665
1666 # ac_fn_c_try_link LINENO
1667 # -----------------------
1668 # Try to link conftest.$ac_ext, and return whether this succeeded.
1669 ac_fn_c_try_link ()
1670 {
1671   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1672   rm -f conftest.$ac_objext conftest$ac_exeext
1673   if { { ac_try="$ac_link"
1674 case "(($ac_try" in
1675   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1676   *) ac_try_echo=$ac_try;;
1677 esac
1678 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1679 $as_echo "$ac_try_echo"; } >&5
1680   (eval "$ac_link") 2>conftest.err
1681   ac_status=$?
1682   if test -s conftest.err; then
1683     grep -v '^ *+' conftest.err >conftest.er1
1684     cat conftest.er1 >&5
1685     mv -f conftest.er1 conftest.err
1686   fi
1687   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1688   test $ac_status = 0; } && {
1689          test -z "$ac_c_werror_flag" ||
1690          test ! -s conftest.err
1691        } && test -s conftest$ac_exeext && {
1692          test "$cross_compiling" = yes ||
1693          test -x conftest$ac_exeext
1694        }; then :
1695   ac_retval=0
1696 else
1697   $as_echo "$as_me: failed program was:" >&5
1698 sed 's/^/| /' conftest.$ac_ext >&5
1699
1700         ac_retval=1
1701 fi
1702   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1703   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1704   # interfere with the next link command; also delete a directory that is
1705   # left behind by Apple's compiler.  We do this before executing the actions.
1706   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1707   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1708   as_fn_set_status $ac_retval
1709
1710 } # ac_fn_c_try_link
1711
1712 # ac_fn_c_try_cpp LINENO
1713 # ----------------------
1714 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1715 ac_fn_c_try_cpp ()
1716 {
1717   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1718   if { { ac_try="$ac_cpp conftest.$ac_ext"
1719 case "(($ac_try" in
1720   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1721   *) ac_try_echo=$ac_try;;
1722 esac
1723 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1724 $as_echo "$ac_try_echo"; } >&5
1725   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1726   ac_status=$?
1727   if test -s conftest.err; then
1728     grep -v '^ *+' conftest.err >conftest.er1
1729     cat conftest.er1 >&5
1730     mv -f conftest.er1 conftest.err
1731   fi
1732   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1733   test $ac_status = 0; } > conftest.i && {
1734          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1735          test ! -s conftest.err
1736        }; then :
1737   ac_retval=0
1738 else
1739   $as_echo "$as_me: failed program was:" >&5
1740 sed 's/^/| /' conftest.$ac_ext >&5
1741
1742     ac_retval=1
1743 fi
1744   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1745   as_fn_set_status $ac_retval
1746
1747 } # ac_fn_c_try_cpp
1748
1749 # ac_fn_c_check_func LINENO FUNC VAR
1750 # ----------------------------------
1751 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1752 ac_fn_c_check_func ()
1753 {
1754   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1755   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1756 $as_echo_n "checking for $2... " >&6; }
1757 if eval \${$3+:} false; then :
1758   $as_echo_n "(cached) " >&6
1759 else
1760   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1761 /* end confdefs.h.  */
1762 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1763    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1764 #define $2 innocuous_$2
1765
1766 /* System header to define __stub macros and hopefully few prototypes,
1767     which can conflict with char $2 (); below.
1768     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1769     <limits.h> exists even on freestanding compilers.  */
1770
1771 #ifdef __STDC__
1772 # include <limits.h>
1773 #else
1774 # include <assert.h>
1775 #endif
1776
1777 #undef $2
1778
1779 /* Override any GCC internal prototype to avoid an error.
1780    Use char because int might match the return type of a GCC
1781    builtin and then its argument prototype would still apply.  */
1782 #ifdef __cplusplus
1783 extern "C"
1784 #endif
1785 char $2 ();
1786 /* The GNU C library defines this for functions which it implements
1787     to always fail with ENOSYS.  Some functions are actually named
1788     something starting with __ and the normal name is an alias.  */
1789 #if defined __stub_$2 || defined __stub___$2
1790 choke me
1791 #endif
1792
1793 int
1794 main ()
1795 {
1796 return $2 ();
1797   ;
1798   return 0;
1799 }
1800 _ACEOF
1801 if ac_fn_c_try_link "$LINENO"; then :
1802   eval "$3=yes"
1803 else
1804   eval "$3=no"
1805 fi
1806 rm -f core conftest.err conftest.$ac_objext \
1807     conftest$ac_exeext conftest.$ac_ext
1808 fi
1809 eval ac_res=\$$3
1810                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1811 $as_echo "$ac_res" >&6; }
1812   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1813
1814 } # ac_fn_c_check_func
1815
1816 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1817 # -------------------------------------------------------
1818 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1819 # the include files in INCLUDES and setting the cache variable VAR
1820 # accordingly.
1821 ac_fn_c_check_header_mongrel ()
1822 {
1823   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1824   if eval \${$3+:} false; then :
1825   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1826 $as_echo_n "checking for $2... " >&6; }
1827 if eval \${$3+:} false; then :
1828   $as_echo_n "(cached) " >&6
1829 fi
1830 eval ac_res=\$$3
1831                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1832 $as_echo "$ac_res" >&6; }
1833 else
1834   # Is the header compilable?
1835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1836 $as_echo_n "checking $2 usability... " >&6; }
1837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1838 /* end confdefs.h.  */
1839 $4
1840 #include <$2>
1841 _ACEOF
1842 if ac_fn_c_try_compile "$LINENO"; then :
1843   ac_header_compiler=yes
1844 else
1845   ac_header_compiler=no
1846 fi
1847 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1849 $as_echo "$ac_header_compiler" >&6; }
1850
1851 # Is the header present?
1852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1853 $as_echo_n "checking $2 presence... " >&6; }
1854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1855 /* end confdefs.h.  */
1856 #include <$2>
1857 _ACEOF
1858 if ac_fn_c_try_cpp "$LINENO"; then :
1859   ac_header_preproc=yes
1860 else
1861   ac_header_preproc=no
1862 fi
1863 rm -f conftest.err conftest.i conftest.$ac_ext
1864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1865 $as_echo "$ac_header_preproc" >&6; }
1866
1867 # So?  What about this header?
1868 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1869   yes:no: )
1870     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1871 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1872     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1873 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1874     ;;
1875   no:yes:* )
1876     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1877 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1878     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1879 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1880     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1881 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1882     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1883 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1884     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1885 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1886 ( $as_echo "## ---------------------------------------- ##
1887 ## Report this to pgsql-bugs@postgresql.org ##
1888 ## ---------------------------------------- ##"
1889      ) | sed "s/^/$as_me: WARNING:     /" >&2
1890     ;;
1891 esac
1892   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1893 $as_echo_n "checking for $2... " >&6; }
1894 if eval \${$3+:} false; then :
1895   $as_echo_n "(cached) " >&6
1896 else
1897   eval "$3=\$ac_header_compiler"
1898 fi
1899 eval ac_res=\$$3
1900                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1901 $as_echo "$ac_res" >&6; }
1902 fi
1903   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1904
1905 } # ac_fn_c_check_header_mongrel
1906
1907 # ac_fn_c_try_run LINENO
1908 # ----------------------
1909 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1910 # that executables *can* be run.
1911 ac_fn_c_try_run ()
1912 {
1913   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1914   if { { ac_try="$ac_link"
1915 case "(($ac_try" in
1916   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1917   *) ac_try_echo=$ac_try;;
1918 esac
1919 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1920 $as_echo "$ac_try_echo"; } >&5
1921   (eval "$ac_link") 2>&5
1922   ac_status=$?
1923   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1924   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1925   { { case "(($ac_try" in
1926   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1927   *) ac_try_echo=$ac_try;;
1928 esac
1929 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1930 $as_echo "$ac_try_echo"; } >&5
1931   (eval "$ac_try") 2>&5
1932   ac_status=$?
1933   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1934   test $ac_status = 0; }; }; then :
1935   ac_retval=0
1936 else
1937   $as_echo "$as_me: program exited with status $ac_status" >&5
1938        $as_echo "$as_me: failed program was:" >&5
1939 sed 's/^/| /' conftest.$ac_ext >&5
1940
1941        ac_retval=$ac_status
1942 fi
1943   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1944   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1945   as_fn_set_status $ac_retval
1946
1947 } # ac_fn_c_try_run
1948
1949 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1950 # -------------------------------------------------------
1951 # Tests whether HEADER exists and can be compiled using the include files in
1952 # INCLUDES, setting the cache variable VAR accordingly.
1953 ac_fn_c_check_header_compile ()
1954 {
1955   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1956   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1957 $as_echo_n "checking for $2... " >&6; }
1958 if eval \${$3+:} false; then :
1959   $as_echo_n "(cached) " >&6
1960 else
1961   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1962 /* end confdefs.h.  */
1963 $4
1964 #include <$2>
1965 _ACEOF
1966 if ac_fn_c_try_compile "$LINENO"; then :
1967   eval "$3=yes"
1968 else
1969   eval "$3=no"
1970 fi
1971 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1972 fi
1973 eval ac_res=\$$3
1974                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1975 $as_echo "$ac_res" >&6; }
1976   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1977
1978 } # ac_fn_c_check_header_compile
1979
1980 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
1981 # ----------------------------------------------------
1982 # Tries to find if the field MEMBER exists in type AGGR, after including
1983 # INCLUDES, setting cache variable VAR accordingly.
1984 ac_fn_c_check_member ()
1985 {
1986   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1987   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
1988 $as_echo_n "checking for $2.$3... " >&6; }
1989 if eval \${$4+:} false; then :
1990   $as_echo_n "(cached) " >&6
1991 else
1992   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1993 /* end confdefs.h.  */
1994 $5
1995 int
1996 main ()
1997 {
1998 static $2 ac_aggr;
1999 if (ac_aggr.$3)
2000 return 0;
2001   ;
2002   return 0;
2003 }
2004 _ACEOF
2005 if ac_fn_c_try_compile "$LINENO"; then :
2006   eval "$4=yes"
2007 else
2008   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2009 /* end confdefs.h.  */
2010 $5
2011 int
2012 main ()
2013 {
2014 static $2 ac_aggr;
2015 if (sizeof ac_aggr.$3)
2016 return 0;
2017   ;
2018   return 0;
2019 }
2020 _ACEOF
2021 if ac_fn_c_try_compile "$LINENO"; then :
2022   eval "$4=yes"
2023 else
2024   eval "$4=no"
2025 fi
2026 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2027 fi
2028 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2029 fi
2030 eval ac_res=\$$4
2031                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2032 $as_echo "$ac_res" >&6; }
2033   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2034
2035 } # ac_fn_c_check_member
2036
2037 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2038 # -------------------------------------------
2039 # Tests whether TYPE exists after having included INCLUDES, setting cache
2040 # variable VAR accordingly.
2041 ac_fn_c_check_type ()
2042 {
2043   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2044   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2045 $as_echo_n "checking for $2... " >&6; }
2046 if eval \${$3+:} false; then :
2047   $as_echo_n "(cached) " >&6
2048 else
2049   eval "$3=no"
2050   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2051 /* end confdefs.h.  */
2052 $4
2053 int
2054 main ()
2055 {
2056 if (sizeof ($2))
2057          return 0;
2058   ;
2059   return 0;
2060 }
2061 _ACEOF
2062 if ac_fn_c_try_compile "$LINENO"; then :
2063   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2064 /* end confdefs.h.  */
2065 $4
2066 int
2067 main ()
2068 {
2069 if (sizeof (($2)))
2070             return 0;
2071   ;
2072   return 0;
2073 }
2074 _ACEOF
2075 if ac_fn_c_try_compile "$LINENO"; then :
2076
2077 else
2078   eval "$3=yes"
2079 fi
2080 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2081 fi
2082 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2083 fi
2084 eval ac_res=\$$3
2085                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2086 $as_echo "$ac_res" >&6; }
2087   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2088
2089 } # ac_fn_c_check_type
2090
2091 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2092 # --------------------------------------------
2093 # Tries to find the compile-time value of EXPR in a program that includes
2094 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2095 # computed
2096 ac_fn_c_compute_int ()
2097 {
2098   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2099   if test "$cross_compiling" = yes; then
2100     # Depending upon the size, compute the lo and hi bounds.
2101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2102 /* end confdefs.h.  */
2103 $4
2104 int
2105 main ()
2106 {
2107 static int test_array [1 - 2 * !(($2) >= 0)];
2108 test_array [0] = 0;
2109 return test_array [0];
2110
2111   ;
2112   return 0;
2113 }
2114 _ACEOF
2115 if ac_fn_c_try_compile "$LINENO"; then :
2116   ac_lo=0 ac_mid=0
2117   while :; do
2118     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2119 /* end confdefs.h.  */
2120 $4
2121 int
2122 main ()
2123 {
2124 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2125 test_array [0] = 0;
2126 return test_array [0];
2127
2128   ;
2129   return 0;
2130 }
2131 _ACEOF
2132 if ac_fn_c_try_compile "$LINENO"; then :
2133   ac_hi=$ac_mid; break
2134 else
2135   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2136                         if test $ac_lo -le $ac_mid; then
2137                           ac_lo= ac_hi=
2138                           break
2139                         fi
2140                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2141 fi
2142 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2143   done
2144 else
2145   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2146 /* end confdefs.h.  */
2147 $4
2148 int
2149 main ()
2150 {
2151 static int test_array [1 - 2 * !(($2) < 0)];
2152 test_array [0] = 0;
2153 return test_array [0];
2154
2155   ;
2156   return 0;
2157 }
2158 _ACEOF
2159 if ac_fn_c_try_compile "$LINENO"; then :
2160   ac_hi=-1 ac_mid=-1
2161   while :; do
2162     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2163 /* end confdefs.h.  */
2164 $4
2165 int
2166 main ()
2167 {
2168 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2169 test_array [0] = 0;
2170 return test_array [0];
2171
2172   ;
2173   return 0;
2174 }
2175 _ACEOF
2176 if ac_fn_c_try_compile "$LINENO"; then :
2177   ac_lo=$ac_mid; break
2178 else
2179   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2180                         if test $ac_mid -le $ac_hi; then
2181                           ac_lo= ac_hi=
2182                           break
2183                         fi
2184                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2185 fi
2186 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2187   done
2188 else
2189   ac_lo= ac_hi=
2190 fi
2191 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2192 fi
2193 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2194 # Binary search between lo and hi bounds.
2195 while test "x$ac_lo" != "x$ac_hi"; do
2196   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2197   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2198 /* end confdefs.h.  */
2199 $4
2200 int
2201 main ()
2202 {
2203 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2204 test_array [0] = 0;
2205 return test_array [0];
2206
2207   ;
2208   return 0;
2209 }
2210 _ACEOF
2211 if ac_fn_c_try_compile "$LINENO"; then :
2212   ac_hi=$ac_mid
2213 else
2214   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2215 fi
2216 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2217 done
2218 case $ac_lo in #((
2219 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2220 '') ac_retval=1 ;;
2221 esac
2222   else
2223     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2224 /* end confdefs.h.  */
2225 $4
2226 static long int longval () { return $2; }
2227 static unsigned long int ulongval () { return $2; }
2228 #include <stdio.h>
2229 #include <stdlib.h>
2230 int
2231 main ()
2232 {
2233
2234   FILE *f = fopen ("conftest.val", "w");
2235   if (! f)
2236     return 1;
2237   if (($2) < 0)
2238     {
2239       long int i = longval ();
2240       if (i != ($2))
2241         return 1;
2242       fprintf (f, "%ld", i);
2243     }
2244   else
2245     {
2246       unsigned long int i = ulongval ();
2247       if (i != ($2))
2248         return 1;
2249       fprintf (f, "%lu", i);
2250     }
2251   /* Do not output a trailing newline, as this causes \r\n confusion
2252      on some platforms.  */
2253   return ferror (f) || fclose (f) != 0;
2254
2255   ;
2256   return 0;
2257 }
2258 _ACEOF
2259 if ac_fn_c_try_run "$LINENO"; then :
2260   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2261 else
2262   ac_retval=1
2263 fi
2264 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2265   conftest.$ac_objext conftest.beam conftest.$ac_ext
2266 rm -f conftest.val
2267
2268   fi
2269   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2270   as_fn_set_status $ac_retval
2271
2272 } # ac_fn_c_compute_int
2273
2274 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2275 # ---------------------------------------------
2276 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2277 # accordingly.
2278 ac_fn_c_check_decl ()
2279 {
2280   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2281   as_decl_name=`echo $2|sed 's/ *(.*//'`
2282   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2283   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2284 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2285 if eval \${$3+:} false; then :
2286   $as_echo_n "(cached) " >&6
2287 else
2288   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2289 /* end confdefs.h.  */
2290 $4
2291 int
2292 main ()
2293 {
2294 #ifndef $as_decl_name
2295 #ifdef __cplusplus
2296   (void) $as_decl_use;
2297 #else
2298   (void) $as_decl_name;
2299 #endif
2300 #endif
2301
2302   ;
2303   return 0;
2304 }
2305 _ACEOF
2306 if ac_fn_c_try_compile "$LINENO"; then :
2307   eval "$3=yes"
2308 else
2309   eval "$3=no"
2310 fi
2311 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2312 fi
2313 eval ac_res=\$$3
2314                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2315 $as_echo "$ac_res" >&6; }
2316   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2317
2318 } # ac_fn_c_check_decl
2319 cat >config.log <<_ACEOF
2320 This file contains any messages produced by compilers while
2321 running configure, to aid debugging if configure makes a mistake.
2322
2323 It was created by PostgreSQL $as_me 9.5devel, which was
2324 generated by GNU Autoconf 2.69.  Invocation command line was
2325
2326   $ $0 $@
2327
2328 _ACEOF
2329 exec 5>>config.log
2330 {
2331 cat <<_ASUNAME
2332 ## --------- ##
2333 ## Platform. ##
2334 ## --------- ##
2335
2336 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2337 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2338 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2339 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2340 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2341
2342 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2343 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2344
2345 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2346 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2347 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2348 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2349 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2350 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2351 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2352
2353 _ASUNAME
2354
2355 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2356 for as_dir in $PATH
2357 do
2358   IFS=$as_save_IFS
2359   test -z "$as_dir" && as_dir=.
2360     $as_echo "PATH: $as_dir"
2361   done
2362 IFS=$as_save_IFS
2363
2364 } >&5
2365
2366 cat >&5 <<_ACEOF
2367
2368
2369 ## ----------- ##
2370 ## Core tests. ##
2371 ## ----------- ##
2372
2373 _ACEOF
2374
2375
2376 # Keep a trace of the command line.
2377 # Strip out --no-create and --no-recursion so they do not pile up.
2378 # Strip out --silent because we don't want to record it for future runs.
2379 # Also quote any args containing shell meta-characters.
2380 # Make two passes to allow for proper duplicate-argument suppression.
2381 ac_configure_args=
2382 ac_configure_args0=
2383 ac_configure_args1=
2384 ac_must_keep_next=false
2385 for ac_pass in 1 2
2386 do
2387   for ac_arg
2388   do
2389     case $ac_arg in
2390     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2391     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2392     | -silent | --silent | --silen | --sile | --sil)
2393       continue ;;
2394     *\'*)
2395       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2396     esac
2397     case $ac_pass in
2398     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2399     2)
2400       as_fn_append ac_configure_args1 " '$ac_arg'"
2401       if test $ac_must_keep_next = true; then
2402         ac_must_keep_next=false # Got value, back to normal.
2403       else
2404         case $ac_arg in
2405           *=* | --config-cache | -C | -disable-* | --disable-* \
2406           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2407           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2408           | -with-* | --with-* | -without-* | --without-* | --x)
2409             case "$ac_configure_args0 " in
2410               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2411             esac
2412             ;;
2413           -* ) ac_must_keep_next=true ;;
2414         esac
2415       fi
2416       as_fn_append ac_configure_args " '$ac_arg'"
2417       ;;
2418     esac
2419   done
2420 done
2421 { ac_configure_args0=; unset ac_configure_args0;}
2422 { ac_configure_args1=; unset ac_configure_args1;}
2423
2424 # When interrupted or exit'd, cleanup temporary files, and complete
2425 # config.log.  We remove comments because anyway the quotes in there
2426 # would cause problems or look ugly.
2427 # WARNING: Use '\'' to represent an apostrophe within the trap.
2428 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2429 trap 'exit_status=$?
2430   # Save into config.log some information that might help in debugging.
2431   {
2432     echo
2433
2434     $as_echo "## ---------------- ##
2435 ## Cache variables. ##
2436 ## ---------------- ##"
2437     echo
2438     # The following way of writing the cache mishandles newlines in values,
2439 (
2440   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2441     eval ac_val=\$$ac_var
2442     case $ac_val in #(
2443     *${as_nl}*)
2444       case $ac_var in #(
2445       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2446 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2447       esac
2448       case $ac_var in #(
2449       _ | IFS | as_nl) ;; #(
2450       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2451       *) { eval $ac_var=; unset $ac_var;} ;;
2452       esac ;;
2453     esac
2454   done
2455   (set) 2>&1 |
2456     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2457     *${as_nl}ac_space=\ *)
2458       sed -n \
2459         "s/'\''/'\''\\\\'\'''\''/g;
2460           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2461       ;; #(
2462     *)
2463       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2464       ;;
2465     esac |
2466     sort
2467 )
2468     echo
2469
2470     $as_echo "## ----------------- ##
2471 ## Output variables. ##
2472 ## ----------------- ##"
2473     echo
2474     for ac_var in $ac_subst_vars
2475     do
2476       eval ac_val=\$$ac_var
2477       case $ac_val in
2478       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2479       esac
2480       $as_echo "$ac_var='\''$ac_val'\''"
2481     done | sort
2482     echo
2483
2484     if test -n "$ac_subst_files"; then
2485       $as_echo "## ------------------- ##
2486 ## File substitutions. ##
2487 ## ------------------- ##"
2488       echo
2489       for ac_var in $ac_subst_files
2490       do
2491         eval ac_val=\$$ac_var
2492         case $ac_val in
2493         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2494         esac
2495         $as_echo "$ac_var='\''$ac_val'\''"
2496       done | sort
2497       echo
2498     fi
2499
2500     if test -s confdefs.h; then
2501       $as_echo "## ----------- ##
2502 ## confdefs.h. ##
2503 ## ----------- ##"
2504       echo
2505       cat confdefs.h
2506       echo
2507     fi
2508     test "$ac_signal" != 0 &&
2509       $as_echo "$as_me: caught signal $ac_signal"
2510     $as_echo "$as_me: exit $exit_status"
2511   } >&5
2512   rm -f core *.core core.conftest.* &&
2513     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2514     exit $exit_status
2515 ' 0
2516 for ac_signal in 1 2 13 15; do
2517   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2518 done
2519 ac_signal=0
2520
2521 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2522 rm -f -r conftest* confdefs.h
2523
2524 $as_echo "/* confdefs.h */" > confdefs.h
2525
2526 # Predefined preprocessor variables.
2527
2528 cat >>confdefs.h <<_ACEOF
2529 #define PACKAGE_NAME "$PACKAGE_NAME"
2530 _ACEOF
2531
2532 cat >>confdefs.h <<_ACEOF
2533 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2534 _ACEOF
2535
2536 cat >>confdefs.h <<_ACEOF
2537 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2538 _ACEOF
2539
2540 cat >>confdefs.h <<_ACEOF
2541 #define PACKAGE_STRING "$PACKAGE_STRING"
2542 _ACEOF
2543
2544 cat >>confdefs.h <<_ACEOF
2545 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2546 _ACEOF
2547
2548 cat >>confdefs.h <<_ACEOF
2549 #define PACKAGE_URL "$PACKAGE_URL"
2550 _ACEOF
2551
2552
2553 # Let the site file select an alternate cache file if it wants to.
2554 # Prefer an explicitly selected file to automatically selected ones.
2555 ac_site_file1=NONE
2556 ac_site_file2=NONE
2557 if test -n "$CONFIG_SITE"; then
2558   # We do not want a PATH search for config.site.
2559   case $CONFIG_SITE in #((
2560     -*)  ac_site_file1=./$CONFIG_SITE;;
2561     */*) ac_site_file1=$CONFIG_SITE;;
2562     *)   ac_site_file1=./$CONFIG_SITE;;
2563   esac
2564 elif test "x$prefix" != xNONE; then
2565   ac_site_file1=$prefix/share/config.site
2566   ac_site_file2=$prefix/etc/config.site
2567 else
2568   ac_site_file1=$ac_default_prefix/share/config.site
2569   ac_site_file2=$ac_default_prefix/etc/config.site
2570 fi
2571 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2572 do
2573   test "x$ac_site_file" = xNONE && continue
2574   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2575     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2576 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2577     sed 's/^/| /' "$ac_site_file" >&5
2578     . "$ac_site_file" \
2579       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2580 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2581 as_fn_error $? "failed to load site script $ac_site_file
2582 See \`config.log' for more details" "$LINENO" 5; }
2583   fi
2584 done
2585
2586 if test -r "$cache_file"; then
2587   # Some versions of bash will fail to source /dev/null (special files
2588   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2589   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2590     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2591 $as_echo "$as_me: loading cache $cache_file" >&6;}
2592     case $cache_file in
2593       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2594       *)                      . "./$cache_file";;
2595     esac
2596   fi
2597 else
2598   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2599 $as_echo "$as_me: creating cache $cache_file" >&6;}
2600   >$cache_file
2601 fi
2602
2603 # Check that the precious variables saved in the cache have kept the same
2604 # value.
2605 ac_cache_corrupted=false
2606 for ac_var in $ac_precious_vars; do
2607   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2608   eval ac_new_set=\$ac_env_${ac_var}_set
2609   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2610   eval ac_new_val=\$ac_env_${ac_var}_value
2611   case $ac_old_set,$ac_new_set in
2612     set,)
2613       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2614 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2615       ac_cache_corrupted=: ;;
2616     ,set)
2617       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2618 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2619       ac_cache_corrupted=: ;;
2620     ,);;
2621     *)
2622       if test "x$ac_old_val" != "x$ac_new_val"; then
2623         # differences in whitespace do not lead to failure.
2624         ac_old_val_w=`echo x $ac_old_val`
2625         ac_new_val_w=`echo x $ac_new_val`
2626         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2627           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2628 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2629           ac_cache_corrupted=:
2630         else
2631           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2632 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2633           eval $ac_var=\$ac_old_val
2634         fi
2635         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2636 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2637         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2638 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2639       fi;;
2640   esac
2641   # Pass precious variables to config.status.
2642   if test "$ac_new_set" = set; then
2643     case $ac_new_val in
2644     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2645     *) ac_arg=$ac_var=$ac_new_val ;;
2646     esac
2647     case " $ac_configure_args " in
2648       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2649       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2650     esac
2651   fi
2652 done
2653 if $ac_cache_corrupted; then
2654   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2655 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2656   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2657 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2658   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2659 fi
2660 ## -------------------- ##
2661 ## Main body of script. ##
2662 ## -------------------- ##
2663
2664 ac_ext=c
2665 ac_cpp='$CPP $CPPFLAGS'
2666 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2667 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2668 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2669
2670
2671
2672
2673
2674
2675 ac_aux_dir=
2676 for ac_dir in config "$srcdir"/config; do
2677   if test -f "$ac_dir/install-sh"; then
2678     ac_aux_dir=$ac_dir
2679     ac_install_sh="$ac_aux_dir/install-sh -c"
2680     break
2681   elif test -f "$ac_dir/install.sh"; then
2682     ac_aux_dir=$ac_dir
2683     ac_install_sh="$ac_aux_dir/install.sh -c"
2684     break
2685   elif test -f "$ac_dir/shtool"; then
2686     ac_aux_dir=$ac_dir
2687     ac_install_sh="$ac_aux_dir/shtool install -c"
2688     break
2689   fi
2690 done
2691 if test -z "$ac_aux_dir"; then
2692   as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2693 fi
2694
2695 # These three variables are undocumented and unsupported,
2696 # and are intended to be withdrawn in a future Autoconf release.
2697 # They can cause serious problems if a builder's source tree is in a directory
2698 # whose full name contains unusual characters.
2699 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2700 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2701 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2702
2703
2704
2705 configure_args=$ac_configure_args
2706
2707
2708 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\.[0-9][0-9]*\)'`
2709
2710
2711 cat >>confdefs.h <<_ACEOF
2712 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2713 _ACEOF
2714
2715
2716
2717
2718
2719 # Check whether --with-extra-version was given.
2720 if test "${with_extra_version+set}" = set; then :
2721   withval=$with_extra_version;
2722   case $withval in
2723     yes)
2724       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2725       ;;
2726     no)
2727       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2728       ;;
2729     *)
2730       PG_VERSION="$PACKAGE_VERSION$withval"
2731       ;;
2732   esac
2733
2734 else
2735   PG_VERSION="$PACKAGE_VERSION"
2736 fi
2737
2738
2739
2740 cat >>confdefs.h <<_ACEOF
2741 #define PG_VERSION "$PG_VERSION"
2742 _ACEOF
2743
2744
2745 # Make sure we can run config.sub.
2746 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2747   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2748
2749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2750 $as_echo_n "checking build system type... " >&6; }
2751 if ${ac_cv_build+:} false; then :
2752   $as_echo_n "(cached) " >&6
2753 else
2754   ac_build_alias=$build_alias
2755 test "x$ac_build_alias" = x &&
2756   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2757 test "x$ac_build_alias" = x &&
2758   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2759 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2760   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2761
2762 fi
2763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2764 $as_echo "$ac_cv_build" >&6; }
2765 case $ac_cv_build in
2766 *-*-*) ;;
2767 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2768 esac
2769 build=$ac_cv_build
2770 ac_save_IFS=$IFS; IFS='-'
2771 set x $ac_cv_build
2772 shift
2773 build_cpu=$1
2774 build_vendor=$2
2775 shift; shift
2776 # Remember, the first character of IFS is used to create $*,
2777 # except with old shells:
2778 build_os=$*
2779 IFS=$ac_save_IFS
2780 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2781
2782
2783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2784 $as_echo_n "checking host system type... " >&6; }
2785 if ${ac_cv_host+:} false; then :
2786   $as_echo_n "(cached) " >&6
2787 else
2788   if test "x$host_alias" = x; then
2789   ac_cv_host=$ac_cv_build
2790 else
2791   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2792     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2793 fi
2794
2795 fi
2796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2797 $as_echo "$ac_cv_host" >&6; }
2798 case $ac_cv_host in
2799 *-*-*) ;;
2800 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2801 esac
2802 host=$ac_cv_host
2803 ac_save_IFS=$IFS; IFS='-'
2804 set x $ac_cv_host
2805 shift
2806 host_cpu=$1
2807 host_vendor=$2
2808 shift; shift
2809 # Remember, the first character of IFS is used to create $*,
2810 # except with old shells:
2811 host_os=$*
2812 IFS=$ac_save_IFS
2813 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2814
2815
2816
2817 template=
2818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2819 $as_echo_n "checking which template to use... " >&6; }
2820
2821
2822
2823
2824 # Check whether --with-template was given.
2825 if test "${with_template+set}" = set; then :
2826   withval=$with_template;
2827   case $withval in
2828     yes)
2829       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2830       ;;
2831     no)
2832       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2833       ;;
2834     *)
2835
2836   case $withval in
2837     list)   echo; ls "$srcdir/src/template"; exit;;
2838     *)      if test -f "$srcdir/src/template/$with_template" ; then
2839               template=$withval
2840             else
2841               as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2842             fi;;
2843   esac
2844
2845       ;;
2846   esac
2847
2848 else
2849
2850 # --with-template not given
2851
2852 case $host_os in
2853      aix*) template=aix ;;
2854   cygwin*) template=cygwin ;;
2855   darwin*) template=darwin ;;
2856 dragonfly*) template=netbsd ;;
2857  freebsd*) template=freebsd ;;
2858     hpux*) template=hpux ;;
2859  linux*|gnu*|k*bsd*-gnu)
2860            template=linux ;;
2861    mingw*) template=win32 ;;
2862   netbsd*) template=netbsd ;;
2863  openbsd*) template=openbsd ;;
2864      sco*) template=sco ;;
2865  solaris*) template=solaris ;;
2866    sysv5*) template=unixware ;;
2867 esac
2868
2869   if test x"$template" = x"" ; then
2870     as_fn_error $? "
2871 *******************************************************************
2872 PostgreSQL has apparently not been ported to your platform yet.
2873 To try a manual configuration, look into the src/template directory
2874 for a similar platform and use the '--with-template=' option.
2875
2876 Please also contact <pgsql-bugs@postgresql.org> to see about
2877 rectifying this.  Include the above 'checking host system type...'
2878 line.
2879 *******************************************************************
2880 " "$LINENO" 5
2881   fi
2882
2883
2884 fi
2885
2886
2887
2888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
2889 $as_echo "$template" >&6; }
2890
2891 PORTNAME=$template
2892
2893
2894 # Initialize default assumption that we do not need separate assembly code
2895 # for TAS (test-and-set).  This can be overridden by the template file
2896 # when it's executed.
2897 need_tas=no
2898 tas_file=dummy.s
2899
2900
2901
2902 ##
2903 ## Command line options
2904 ##
2905
2906 #
2907 # Add non-standard directories to the include path
2908 #
2909
2910
2911
2912 # Check whether --with-includes was given.
2913 if test "${with_includes+set}" = set; then :
2914   withval=$with_includes;
2915   case $withval in
2916     yes)
2917       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
2918       ;;
2919     no)
2920       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
2921       ;;
2922     *)
2923
2924       ;;
2925   esac
2926
2927 fi
2928
2929
2930
2931
2932 #
2933 # Add non-standard directories to the library search path
2934 #
2935
2936
2937
2938 # Check whether --with-libraries was given.
2939 if test "${with_libraries+set}" = set; then :
2940   withval=$with_libraries;
2941   case $withval in
2942     yes)
2943       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
2944       ;;
2945     no)
2946       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
2947       ;;
2948     *)
2949       LIBRARY_DIRS=$withval
2950       ;;
2951   esac
2952
2953 fi
2954
2955
2956
2957
2958
2959
2960 # Check whether --with-libs was given.
2961 if test "${with_libs+set}" = set; then :
2962   withval=$with_libs;
2963   case $withval in
2964     yes)
2965       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
2966       ;;
2967     no)
2968       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
2969       ;;
2970     *)
2971       LIBRARY_DIRS=$withval
2972       ;;
2973   esac
2974
2975 fi
2976
2977
2978
2979
2980 #
2981 # 64-bit integer date/time storage: enabled by default.
2982 #
2983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with 64-bit integer date/time support" >&5
2984 $as_echo_n "checking whether to build with 64-bit integer date/time support... " >&6; }
2985
2986
2987 # Check whether --enable-integer-datetimes was given.
2988 if test "${enable_integer_datetimes+set}" = set; then :
2989   enableval=$enable_integer_datetimes;
2990   case $enableval in
2991     yes)
2992
2993 $as_echo "#define USE_INTEGER_DATETIMES 1" >>confdefs.h
2994
2995       ;;
2996     no)
2997       :
2998       ;;
2999     *)
3000       as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3001       ;;
3002   esac
3003
3004 else
3005   enable_integer_datetimes=yes
3006
3007 $as_echo "#define USE_INTEGER_DATETIMES 1" >>confdefs.h
3008
3009 fi
3010
3011
3012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_integer_datetimes" >&5
3013 $as_echo "$enable_integer_datetimes" >&6; }
3014
3015
3016 #
3017 # NLS
3018 #
3019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3020 $as_echo_n "checking whether NLS is wanted... " >&6; }
3021
3022
3023 # Check whether --enable-nls was given.
3024 if test "${enable_nls+set}" = set; then :
3025   enableval=$enable_nls;
3026   case $enableval in
3027     yes)
3028       :
3029       ;;
3030     no)
3031       :
3032       ;;
3033     *)
3034       enable_nls=yes
3035 WANTED_LANGUAGES=$enableval
3036       ;;
3037   esac
3038
3039 else
3040   enable_nls=no
3041 fi
3042
3043
3044
3045 if test "$enable_nls" = yes; then
3046
3047 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3048
3049 fi
3050
3051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3052 $as_echo "$enable_nls" >&6; }
3053
3054
3055
3056 #
3057 # Default port number (--with-pgport), default 5432
3058 #
3059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3060 $as_echo_n "checking for default port number... " >&6; }
3061
3062
3063
3064 # Check whether --with-pgport was given.
3065 if test "${with_pgport+set}" = set; then :
3066   withval=$with_pgport;
3067   case $withval in
3068     yes)
3069       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3070       ;;
3071     no)
3072       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3073       ;;
3074     *)
3075       default_port=$withval
3076       ;;
3077   esac
3078
3079 else
3080   default_port=5432
3081 fi
3082
3083
3084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3085 $as_echo "$default_port" >&6; }
3086 # Need both of these because some places want an integer and some a string
3087
3088 cat >>confdefs.h <<_ACEOF
3089 #define DEF_PGPORT ${default_port}
3090 _ACEOF
3091
3092
3093 cat >>confdefs.h <<_ACEOF
3094 #define DEF_PGPORT_STR "${default_port}"
3095 _ACEOF
3096
3097
3098
3099 #
3100 # '-rpath'-like feature can be disabled
3101 #
3102
3103
3104 # Check whether --enable-rpath was given.
3105 if test "${enable_rpath+set}" = set; then :
3106   enableval=$enable_rpath;
3107   case $enableval in
3108     yes)
3109       :
3110       ;;
3111     no)
3112       :
3113       ;;
3114     *)
3115       as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3116       ;;
3117   esac
3118
3119 else
3120   enable_rpath=yes
3121
3122 fi
3123
3124
3125
3126
3127 #
3128 # Spinlocks
3129 #
3130
3131
3132 # Check whether --enable-spinlocks was given.
3133 if test "${enable_spinlocks+set}" = set; then :
3134   enableval=$enable_spinlocks;
3135   case $enableval in
3136     yes)
3137       :
3138       ;;
3139     no)
3140       :
3141       ;;
3142     *)
3143       as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3144       ;;
3145   esac
3146
3147 else
3148   enable_spinlocks=yes
3149
3150 fi
3151
3152
3153
3154 #
3155 # Atomic operations
3156 #
3157
3158
3159 # Check whether --enable-atomics was given.
3160 if test "${enable_atomics+set}" = set; then :
3161   enableval=$enable_atomics;
3162   case $enableval in
3163     yes)
3164       :
3165       ;;
3166     no)
3167       :
3168       ;;
3169     *)
3170       as_fn_error $? "no argument expected for --enable-atomics option" "$LINENO" 5
3171       ;;
3172   esac
3173
3174 else
3175   enable_atomics=yes
3176
3177 fi
3178
3179
3180
3181 #
3182 # --enable-debug adds -g to compiler flags
3183 #
3184
3185
3186 # Check whether --enable-debug was given.
3187 if test "${enable_debug+set}" = set; then :
3188   enableval=$enable_debug;
3189   case $enableval in
3190     yes)
3191       :
3192       ;;
3193     no)
3194       :
3195       ;;
3196     *)
3197       as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3198       ;;
3199   esac
3200
3201 else
3202   enable_debug=no
3203
3204 fi
3205
3206
3207
3208
3209 #
3210 # --enable-profiling enables gcc profiling
3211 #
3212
3213
3214 # Check whether --enable-profiling was given.
3215 if test "${enable_profiling+set}" = set; then :
3216   enableval=$enable_profiling;
3217   case $enableval in
3218     yes)
3219       :
3220       ;;
3221     no)
3222       :
3223       ;;
3224     *)
3225       as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3226       ;;
3227   esac
3228
3229 else
3230   enable_profiling=no
3231
3232 fi
3233
3234
3235
3236 #
3237 # --enable-coverage enables generation of code coverage metrics with gcov
3238 #
3239
3240
3241 # Check whether --enable-coverage was given.
3242 if test "${enable_coverage+set}" = set; then :
3243   enableval=$enable_coverage;
3244   case $enableval in
3245     yes)
3246       for ac_prog in gcov
3247 do
3248   # Extract the first word of "$ac_prog", so it can be a program name with args.
3249 set dummy $ac_prog; ac_word=$2
3250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3251 $as_echo_n "checking for $ac_word... " >&6; }
3252 if ${ac_cv_prog_GCOV+:} false; then :
3253   $as_echo_n "(cached) " >&6
3254 else
3255   if test -n "$GCOV"; then
3256   ac_cv_prog_GCOV="$GCOV" # Let the user override the test.
3257 else
3258 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3259 for as_dir in $PATH
3260 do
3261   IFS=$as_save_IFS
3262   test -z "$as_dir" && as_dir=.
3263     for ac_exec_ext in '' $ac_executable_extensions; do
3264   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3265     ac_cv_prog_GCOV="$ac_prog"
3266     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3267     break 2
3268   fi
3269 done
3270   done
3271 IFS=$as_save_IFS
3272
3273 fi
3274 fi
3275 GCOV=$ac_cv_prog_GCOV
3276 if test -n "$GCOV"; then
3277   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3278 $as_echo "$GCOV" >&6; }
3279 else
3280   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3281 $as_echo "no" >&6; }
3282 fi
3283
3284
3285   test -n "$GCOV" && break
3286 done
3287
3288 if test -z "$GCOV"; then
3289   as_fn_error $? "gcov not found" "$LINENO" 5
3290 fi
3291 for ac_prog in lcov
3292 do
3293   # Extract the first word of "$ac_prog", so it can be a program name with args.
3294 set dummy $ac_prog; ac_word=$2
3295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3296 $as_echo_n "checking for $ac_word... " >&6; }
3297 if ${ac_cv_prog_LCOV+:} false; then :
3298   $as_echo_n "(cached) " >&6
3299 else
3300   if test -n "$LCOV"; then
3301   ac_cv_prog_LCOV="$LCOV" # Let the user override the test.
3302 else
3303 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3304 for as_dir in $PATH
3305 do
3306   IFS=$as_save_IFS
3307   test -z "$as_dir" && as_dir=.
3308     for ac_exec_ext in '' $ac_executable_extensions; do
3309   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3310     ac_cv_prog_LCOV="$ac_prog"
3311     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3312     break 2
3313   fi
3314 done
3315   done
3316 IFS=$as_save_IFS
3317
3318 fi
3319 fi
3320 LCOV=$ac_cv_prog_LCOV
3321 if test -n "$LCOV"; then
3322   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3323 $as_echo "$LCOV" >&6; }
3324 else
3325   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3326 $as_echo "no" >&6; }
3327 fi
3328
3329
3330   test -n "$LCOV" && break
3331 done
3332
3333 if test -z "$LCOV"; then
3334   as_fn_error $? "lcov not found" "$LINENO" 5
3335 fi
3336 for ac_prog in genhtml
3337 do
3338   # Extract the first word of "$ac_prog", so it can be a program name with args.
3339 set dummy $ac_prog; ac_word=$2
3340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3341 $as_echo_n "checking for $ac_word... " >&6; }
3342 if ${ac_cv_prog_GENHTML+:} false; then :
3343   $as_echo_n "(cached) " >&6
3344 else
3345   if test -n "$GENHTML"; then
3346   ac_cv_prog_GENHTML="$GENHTML" # Let the user override the test.
3347 else
3348 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3349 for as_dir in $PATH
3350 do
3351   IFS=$as_save_IFS
3352   test -z "$as_dir" && as_dir=.
3353     for ac_exec_ext in '' $ac_executable_extensions; do
3354   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3355     ac_cv_prog_GENHTML="$ac_prog"
3356     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3357     break 2
3358   fi
3359 done
3360   done
3361 IFS=$as_save_IFS
3362
3363 fi
3364 fi
3365 GENHTML=$ac_cv_prog_GENHTML
3366 if test -n "$GENHTML"; then
3367   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3368 $as_echo "$GENHTML" >&6; }
3369 else
3370   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3371 $as_echo "no" >&6; }
3372 fi
3373
3374
3375   test -n "$GENHTML" && break
3376 done
3377
3378 if test -z "$GENHTML"; then
3379   as_fn_error $? "genhtml not found" "$LINENO" 5
3380 fi
3381       ;;
3382     no)
3383       :
3384       ;;
3385     *)
3386       as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3387       ;;
3388   esac
3389
3390 else
3391   enable_coverage=no
3392
3393 fi
3394
3395
3396
3397
3398 #
3399 # DTrace
3400 #
3401
3402
3403 # Check whether --enable-dtrace was given.
3404 if test "${enable_dtrace+set}" = set; then :
3405   enableval=$enable_dtrace;
3406   case $enableval in
3407     yes)
3408       for ac_prog in dtrace
3409 do
3410   # Extract the first word of "$ac_prog", so it can be a program name with args.
3411 set dummy $ac_prog; ac_word=$2
3412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3413 $as_echo_n "checking for $ac_word... " >&6; }
3414 if ${ac_cv_prog_DTRACE+:} false; then :
3415   $as_echo_n "(cached) " >&6
3416 else
3417   if test -n "$DTRACE"; then
3418   ac_cv_prog_DTRACE="$DTRACE" # Let the user override the test.
3419 else
3420 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3421 for as_dir in $PATH
3422 do
3423   IFS=$as_save_IFS
3424   test -z "$as_dir" && as_dir=.
3425     for ac_exec_ext in '' $ac_executable_extensions; do
3426   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3427     ac_cv_prog_DTRACE="$ac_prog"
3428     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3429     break 2
3430   fi
3431 done
3432   done
3433 IFS=$as_save_IFS
3434
3435 fi
3436 fi
3437 DTRACE=$ac_cv_prog_DTRACE
3438 if test -n "$DTRACE"; then
3439   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3440 $as_echo "$DTRACE" >&6; }
3441 else
3442   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3443 $as_echo "no" >&6; }
3444 fi
3445
3446
3447   test -n "$DTRACE" && break
3448 done
3449
3450 if test -z "$DTRACE"; then
3451   as_fn_error $? "dtrace not found" "$LINENO" 5
3452 fi
3453
3454       ;;
3455     no)
3456       :
3457       ;;
3458     *)
3459       as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3460       ;;
3461   esac
3462
3463 else
3464   enable_dtrace=no
3465
3466 fi
3467
3468
3469
3470
3471 #
3472 # TAP tests
3473 #
3474
3475
3476 # Check whether --enable-tap-tests was given.
3477 if test "${enable_tap_tests+set}" = set; then :
3478   enableval=$enable_tap_tests;
3479   case $enableval in
3480     yes)
3481       :
3482       ;;
3483     no)
3484       :
3485       ;;
3486     *)
3487       as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3488       ;;
3489   esac
3490
3491 else
3492   enable_tap_tests=no
3493
3494 fi
3495
3496
3497
3498
3499 #
3500 # Block size
3501 #
3502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3503 $as_echo_n "checking for block size... " >&6; }
3504
3505
3506
3507 # Check whether --with-blocksize was given.
3508 if test "${with_blocksize+set}" = set; then :
3509   withval=$with_blocksize;
3510   case $withval in
3511     yes)
3512       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3513       ;;
3514     no)
3515       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3516       ;;
3517     *)
3518       blocksize=$withval
3519       ;;
3520   esac
3521
3522 else
3523   blocksize=8
3524 fi
3525
3526
3527 case ${blocksize} in
3528   1) BLCKSZ=1024;;
3529   2) BLCKSZ=2048;;
3530   4) BLCKSZ=4096;;
3531   8) BLCKSZ=8192;;
3532  16) BLCKSZ=16384;;
3533  32) BLCKSZ=32768;;
3534   *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3535 esac
3536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3537 $as_echo "${blocksize}kB" >&6; }
3538
3539
3540 cat >>confdefs.h <<_ACEOF
3541 #define BLCKSZ ${BLCKSZ}
3542 _ACEOF
3543
3544
3545 #
3546 # Relation segment size
3547 #
3548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3549 $as_echo_n "checking for segment size... " >&6; }
3550
3551
3552
3553 # Check whether --with-segsize was given.
3554 if test "${with_segsize+set}" = set; then :
3555   withval=$with_segsize;
3556   case $withval in
3557     yes)
3558       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3559       ;;
3560     no)
3561       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3562       ;;
3563     *)
3564       segsize=$withval
3565       ;;
3566   esac
3567
3568 else
3569   segsize=1
3570 fi
3571
3572
3573 # this expression is set up to avoid unnecessary integer overflow
3574 # blocksize is already guaranteed to be a factor of 1024
3575 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3576 test $? -eq 0 || exit 1
3577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3578 $as_echo "${segsize}GB" >&6; }
3579
3580
3581 cat >>confdefs.h <<_ACEOF
3582 #define RELSEG_SIZE ${RELSEG_SIZE}
3583 _ACEOF
3584
3585
3586 #
3587 # WAL block size
3588 #
3589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3590 $as_echo_n "checking for WAL block size... " >&6; }
3591
3592
3593
3594 # Check whether --with-wal-blocksize was given.
3595 if test "${with_wal_blocksize+set}" = set; then :
3596   withval=$with_wal_blocksize;
3597   case $withval in
3598     yes)
3599       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3600       ;;
3601     no)
3602       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3603       ;;
3604     *)
3605       wal_blocksize=$withval
3606       ;;
3607   esac
3608
3609 else
3610   wal_blocksize=8
3611 fi
3612
3613
3614 case ${wal_blocksize} in
3615   1) XLOG_BLCKSZ=1024;;
3616   2) XLOG_BLCKSZ=2048;;
3617   4) XLOG_BLCKSZ=4096;;
3618   8) XLOG_BLCKSZ=8192;;
3619  16) XLOG_BLCKSZ=16384;;
3620  32) XLOG_BLCKSZ=32768;;
3621  64) XLOG_BLCKSZ=65536;;
3622   *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3623 esac
3624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3625 $as_echo "${wal_blocksize}kB" >&6; }
3626
3627
3628 cat >>confdefs.h <<_ACEOF
3629 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3630 _ACEOF
3631
3632
3633 #
3634 # WAL segment size
3635 #
3636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL segment size" >&5
3637 $as_echo_n "checking for WAL segment size... " >&6; }
3638
3639
3640
3641 # Check whether --with-wal-segsize was given.
3642 if test "${with_wal_segsize+set}" = set; then :
3643   withval=$with_wal_segsize;
3644   case $withval in
3645     yes)
3646       as_fn_error $? "argument required for --with-wal-segsize option" "$LINENO" 5
3647       ;;
3648     no)
3649       as_fn_error $? "argument required for --with-wal-segsize option" "$LINENO" 5
3650       ;;
3651     *)
3652       wal_segsize=$withval
3653       ;;
3654   esac
3655
3656 else
3657   wal_segsize=16
3658 fi
3659
3660
3661 case ${wal_segsize} in
3662   1) ;;
3663   2) ;;
3664   4) ;;
3665   8) ;;
3666  16) ;;
3667  32) ;;
3668  64) ;;
3669   *) as_fn_error $? "Invalid WAL segment size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3670 esac
3671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_segsize}MB" >&5
3672 $as_echo "${wal_segsize}MB" >&6; }
3673
3674
3675 cat >>confdefs.h <<_ACEOF
3676 #define XLOG_SEG_SIZE (${wal_segsize} * 1024 * 1024)
3677 _ACEOF
3678
3679
3680 #
3681 # C compiler
3682 #
3683
3684 # For historical reasons you can also use --with-CC to specify the C compiler
3685 # to use, although the standard way to do this is to set the CC environment
3686 # variable.
3687
3688
3689
3690 # Check whether --with-CC was given.
3691 if test "${with_CC+set}" = set; then :
3692   withval=$with_CC;
3693   case $withval in
3694     yes)
3695       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3696       ;;
3697     no)
3698       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3699       ;;
3700     *)
3701       CC=$with_CC
3702       ;;
3703   esac
3704
3705 fi
3706
3707
3708
3709 case $template in
3710   aix) pgac_cc_list="gcc xlc";;
3711     *) pgac_cc_list="gcc cc";;
3712 esac
3713
3714 ac_ext=c
3715 ac_cpp='$CPP $CPPFLAGS'
3716 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3717 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3718 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3719 if test -n "$ac_tool_prefix"; then
3720   for ac_prog in $pgac_cc_list
3721   do
3722     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3723 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3725 $as_echo_n "checking for $ac_word... " >&6; }
3726 if ${ac_cv_prog_CC+:} false; then :
3727   $as_echo_n "(cached) " >&6
3728 else
3729   if test -n "$CC"; then
3730   ac_cv_prog_CC="$CC" # Let the user override the test.
3731 else
3732 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3733 for as_dir in $PATH
3734 do
3735   IFS=$as_save_IFS
3736   test -z "$as_dir" && as_dir=.
3737     for ac_exec_ext in '' $ac_executable_extensions; do
3738   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3739     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3740     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3741     break 2
3742   fi
3743 done
3744   done
3745 IFS=$as_save_IFS
3746
3747 fi
3748 fi
3749 CC=$ac_cv_prog_CC
3750 if test -n "$CC"; then
3751   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3752 $as_echo "$CC" >&6; }
3753 else
3754   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3755 $as_echo "no" >&6; }
3756 fi
3757
3758
3759     test -n "$CC" && break
3760   done
3761 fi
3762 if test -z "$CC"; then
3763   ac_ct_CC=$CC
3764   for ac_prog in $pgac_cc_list
3765 do
3766   # Extract the first word of "$ac_prog", so it can be a program name with args.
3767 set dummy $ac_prog; ac_word=$2
3768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3769 $as_echo_n "checking for $ac_word... " >&6; }
3770 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3771   $as_echo_n "(cached) " >&6
3772 else
3773   if test -n "$ac_ct_CC"; then
3774   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3775 else
3776 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3777 for as_dir in $PATH
3778 do
3779   IFS=$as_save_IFS
3780   test -z "$as_dir" && as_dir=.
3781     for ac_exec_ext in '' $ac_executable_extensions; do
3782   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3783     ac_cv_prog_ac_ct_CC="$ac_prog"
3784     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3785     break 2
3786   fi
3787 done
3788   done
3789 IFS=$as_save_IFS
3790
3791 fi
3792 fi
3793 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3794 if test -n "$ac_ct_CC"; then
3795   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3796 $as_echo "$ac_ct_CC" >&6; }
3797 else
3798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3799 $as_echo "no" >&6; }
3800 fi
3801
3802
3803   test -n "$ac_ct_CC" && break
3804 done
3805
3806   if test "x$ac_ct_CC" = x; then
3807     CC=""
3808   else
3809     case $cross_compiling:$ac_tool_warned in
3810 yes:)
3811 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3812 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3813 ac_tool_warned=yes ;;
3814 esac
3815     CC=$ac_ct_CC
3816   fi
3817 fi
3818
3819
3820 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3821 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3822 as_fn_error $? "no acceptable C compiler found in \$PATH
3823 See \`config.log' for more details" "$LINENO" 5; }
3824
3825 # Provide some information about the compiler.
3826 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3827 set X $ac_compile
3828 ac_compiler=$2
3829 for ac_option in --version -v -V -qversion; do
3830   { { ac_try="$ac_compiler $ac_option >&5"
3831 case "(($ac_try" in
3832   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3833   *) ac_try_echo=$ac_try;;
3834 esac
3835 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3836 $as_echo "$ac_try_echo"; } >&5
3837   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3838   ac_status=$?
3839   if test -s conftest.err; then
3840     sed '10a\
3841 ... rest of stderr output deleted ...
3842          10q' conftest.err >conftest.er1
3843     cat conftest.er1 >&5
3844   fi
3845   rm -f conftest.er1 conftest.err
3846   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3847   test $ac_status = 0; }
3848 done
3849
3850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3851 /* end confdefs.h.  */
3852
3853 int
3854 main ()
3855 {
3856
3857   ;
3858   return 0;
3859 }
3860 _ACEOF
3861 ac_clean_files_save=$ac_clean_files
3862 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3863 # Try to create an executable without -o first, disregard a.out.
3864 # It will help us diagnose broken compilers, and finding out an intuition
3865 # of exeext.
3866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3867 $as_echo_n "checking whether the C compiler works... " >&6; }
3868 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3869
3870 # The possible output files:
3871 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3872
3873 ac_rmfiles=
3874 for ac_file in $ac_files
3875 do
3876   case $ac_file in
3877     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3878     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3879   esac
3880 done
3881 rm -f $ac_rmfiles
3882
3883 if { { ac_try="$ac_link_default"
3884 case "(($ac_try" in
3885   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3886   *) ac_try_echo=$ac_try;;
3887 esac
3888 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3889 $as_echo "$ac_try_echo"; } >&5
3890   (eval "$ac_link_default") 2>&5
3891   ac_status=$?
3892   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3893   test $ac_status = 0; }; then :
3894   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3895 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3896 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3897 # so that the user can short-circuit this test for compilers unknown to
3898 # Autoconf.
3899 for ac_file in $ac_files ''
3900 do
3901   test -f "$ac_file" || continue
3902   case $ac_file in
3903     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3904         ;;
3905     [ab].out )
3906         # We found the default executable, but exeext='' is most
3907         # certainly right.
3908         break;;
3909     *.* )
3910         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3911         then :; else
3912            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3913         fi
3914         # We set ac_cv_exeext here because the later test for it is not
3915         # safe: cross compilers may not add the suffix if given an `-o'
3916         # argument, so we may need to know it at that point already.
3917         # Even if this section looks crufty: it has the advantage of
3918         # actually working.
3919         break;;
3920     * )
3921         break;;
3922   esac
3923 done
3924 test "$ac_cv_exeext" = no && ac_cv_exeext=
3925
3926 else
3927   ac_file=''
3928 fi
3929 if test -z "$ac_file"; then :
3930   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3931 $as_echo "no" >&6; }
3932 $as_echo "$as_me: failed program was:" >&5
3933 sed 's/^/| /' conftest.$ac_ext >&5
3934
3935 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3936 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3937 as_fn_error 77 "C compiler cannot create executables
3938 See \`config.log' for more details" "$LINENO" 5; }
3939 else
3940   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3941 $as_echo "yes" >&6; }
3942 fi
3943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3944 $as_echo_n "checking for C compiler default output file name... " >&6; }
3945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3946 $as_echo "$ac_file" >&6; }
3947 ac_exeext=$ac_cv_exeext
3948
3949 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3950 ac_clean_files=$ac_clean_files_save
3951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3952 $as_echo_n "checking for suffix of executables... " >&6; }
3953 if { { ac_try="$ac_link"
3954 case "(($ac_try" in
3955   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3956   *) ac_try_echo=$ac_try;;
3957 esac
3958 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3959 $as_echo "$ac_try_echo"; } >&5
3960   (eval "$ac_link") 2>&5
3961   ac_status=$?
3962   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3963   test $ac_status = 0; }; then :
3964   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3965 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3966 # work properly (i.e., refer to `conftest.exe'), while it won't with
3967 # `rm'.
3968 for ac_file in conftest.exe conftest conftest.*; do
3969   test -f "$ac_file" || continue
3970   case $ac_file in
3971     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3972     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3973           break;;
3974     * ) break;;
3975   esac
3976 done
3977 else
3978   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3979 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3980 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3981 See \`config.log' for more details" "$LINENO" 5; }
3982 fi
3983 rm -f conftest conftest$ac_cv_exeext
3984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3985 $as_echo "$ac_cv_exeext" >&6; }
3986
3987 rm -f conftest.$ac_ext
3988 EXEEXT=$ac_cv_exeext
3989 ac_exeext=$EXEEXT
3990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3991 /* end confdefs.h.  */
3992 #include <stdio.h>
3993 int
3994 main ()
3995 {
3996 FILE *f = fopen ("conftest.out", "w");
3997  return ferror (f) || fclose (f) != 0;
3998
3999   ;
4000   return 0;
4001 }
4002 _ACEOF
4003 ac_clean_files="$ac_clean_files conftest.out"
4004 # Check that the compiler produces executables we can run.  If not, either
4005 # the compiler is broken, or we cross compile.
4006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4007 $as_echo_n "checking whether we are cross compiling... " >&6; }
4008 if test "$cross_compiling" != yes; then
4009   { { ac_try="$ac_link"
4010 case "(($ac_try" in
4011   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4012   *) ac_try_echo=$ac_try;;
4013 esac
4014 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4015 $as_echo "$ac_try_echo"; } >&5
4016   (eval "$ac_link") 2>&5
4017   ac_status=$?
4018   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4019   test $ac_status = 0; }
4020   if { ac_try='./conftest$ac_cv_exeext'
4021   { { case "(($ac_try" in
4022   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4023   *) ac_try_echo=$ac_try;;
4024 esac
4025 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4026 $as_echo "$ac_try_echo"; } >&5
4027   (eval "$ac_try") 2>&5
4028   ac_status=$?
4029   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4030   test $ac_status = 0; }; }; then
4031     cross_compiling=no
4032   else
4033     if test "$cross_compiling" = maybe; then
4034         cross_compiling=yes
4035     else
4036         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4037 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4038 as_fn_error $? "cannot run C compiled programs.
4039 If you meant to cross compile, use \`--host'.
4040 See \`config.log' for more details" "$LINENO" 5; }
4041     fi
4042   fi
4043 fi
4044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4045 $as_echo "$cross_compiling" >&6; }
4046
4047 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4048 ac_clean_files=$ac_clean_files_save
4049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4050 $as_echo_n "checking for suffix of object files... " >&6; }
4051 if ${ac_cv_objext+:} false; then :
4052   $as_echo_n "(cached) " >&6
4053 else
4054   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4055 /* end confdefs.h.  */
4056
4057 int
4058 main ()
4059 {
4060
4061   ;
4062   return 0;
4063 }
4064 _ACEOF
4065 rm -f conftest.o conftest.obj
4066 if { { ac_try="$ac_compile"
4067 case "(($ac_try" in
4068   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4069   *) ac_try_echo=$ac_try;;
4070 esac
4071 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4072 $as_echo "$ac_try_echo"; } >&5
4073   (eval "$ac_compile") 2>&5
4074   ac_status=$?
4075   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4076   test $ac_status = 0; }; then :
4077   for ac_file in conftest.o conftest.obj conftest.*; do
4078   test -f "$ac_file" || continue;
4079   case $ac_file in
4080     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4081     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4082        break;;
4083   esac
4084 done
4085 else
4086   $as_echo "$as_me: failed program was:" >&5
4087 sed 's/^/| /' conftest.$ac_ext >&5
4088
4089 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4090 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4091 as_fn_error $? "cannot compute suffix of object files: cannot compile
4092 See \`config.log' for more details" "$LINENO" 5; }
4093 fi
4094 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4095 fi
4096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4097 $as_echo "$ac_cv_objext" >&6; }
4098 OBJEXT=$ac_cv_objext
4099 ac_objext=$OBJEXT
4100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4101 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4102 if ${ac_cv_c_compiler_gnu+:} false; then :
4103   $as_echo_n "(cached) " >&6
4104 else
4105   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4106 /* end confdefs.h.  */
4107
4108 int
4109 main ()
4110 {
4111 #ifndef __GNUC__
4112        choke me
4113 #endif
4114
4115   ;
4116   return 0;
4117 }
4118 _ACEOF
4119 if ac_fn_c_try_compile "$LINENO"; then :
4120   ac_compiler_gnu=yes
4121 else
4122   ac_compiler_gnu=no
4123 fi
4124 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4125 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4126
4127 fi
4128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4129 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4130 if test $ac_compiler_gnu = yes; then
4131   GCC=yes
4132 else
4133   GCC=
4134 fi
4135 ac_test_CFLAGS=${CFLAGS+set}
4136 ac_save_CFLAGS=$CFLAGS
4137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4138 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4139 if ${ac_cv_prog_cc_g+:} false; then :
4140   $as_echo_n "(cached) " >&6
4141 else
4142   ac_save_c_werror_flag=$ac_c_werror_flag
4143    ac_c_werror_flag=yes
4144    ac_cv_prog_cc_g=no
4145    CFLAGS="-g"
4146    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4147 /* end confdefs.h.  */
4148
4149 int
4150 main ()
4151 {
4152
4153   ;
4154   return 0;
4155 }
4156 _ACEOF
4157 if ac_fn_c_try_compile "$LINENO"; then :
4158   ac_cv_prog_cc_g=yes
4159 else
4160   CFLAGS=""
4161       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4162 /* end confdefs.h.  */
4163
4164 int
4165 main ()
4166 {
4167
4168   ;
4169   return 0;
4170 }
4171 _ACEOF
4172 if ac_fn_c_try_compile "$LINENO"; then :
4173
4174 else
4175   ac_c_werror_flag=$ac_save_c_werror_flag
4176          CFLAGS="-g"
4177          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4178 /* end confdefs.h.  */
4179
4180 int
4181 main ()
4182 {
4183
4184   ;
4185   return 0;
4186 }
4187 _ACEOF
4188 if ac_fn_c_try_compile "$LINENO"; then :
4189   ac_cv_prog_cc_g=yes
4190 fi
4191 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4192 fi
4193 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4194 fi
4195 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4196    ac_c_werror_flag=$ac_save_c_werror_flag
4197 fi
4198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4199 $as_echo "$ac_cv_prog_cc_g" >&6; }
4200 if test "$ac_test_CFLAGS" = set; then
4201   CFLAGS=$ac_save_CFLAGS
4202 elif test $ac_cv_prog_cc_g = yes; then
4203   if test "$GCC" = yes; then
4204     CFLAGS="-g -O2"
4205   else
4206     CFLAGS="-g"
4207   fi
4208 else
4209   if test "$GCC" = yes; then
4210     CFLAGS="-O2"
4211   else
4212     CFLAGS=
4213   fi
4214 fi
4215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4216 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4217 if ${ac_cv_prog_cc_c89+:} false; then :
4218   $as_echo_n "(cached) " >&6
4219 else
4220   ac_cv_prog_cc_c89=no
4221 ac_save_CC=$CC
4222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4223 /* end confdefs.h.  */
4224 #include <stdarg.h>
4225 #include <stdio.h>
4226 struct stat;
4227 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4228 struct buf { int x; };
4229 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4230 static char *e (p, i)
4231      char **p;
4232      int i;
4233 {
4234   return p[i];
4235 }
4236 static char *f (char * (*g) (char **, int), char **p, ...)
4237 {
4238   char *s;
4239   va_list v;
4240   va_start (v,p);
4241   s = g (p, va_arg (v,int));
4242   va_end (v);
4243   return s;
4244 }
4245
4246 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4247    function prototypes and stuff, but not '\xHH' hex character constants.
4248    These don't provoke an error unfortunately, instead are silently treated
4249    as 'x'.  The following induces an error, until -std is added to get
4250    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4251    array size at least.  It's necessary to write '\x00'==0 to get something
4252    that's true only with -std.  */
4253 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4254
4255 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4256    inside strings and character constants.  */
4257 #define FOO(x) 'x'
4258 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4259
4260 int test (int i, double x);
4261 struct s1 {int (*f) (int a);};
4262 struct s2 {int (*f) (double a);};
4263 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4264 int argc;
4265 char **argv;
4266 int
4267 main ()
4268 {
4269 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4270   ;
4271   return 0;
4272 }
4273 _ACEOF
4274 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4275         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4276 do
4277   CC="$ac_save_CC $ac_arg"
4278   if ac_fn_c_try_compile "$LINENO"; then :
4279   ac_cv_prog_cc_c89=$ac_arg
4280 fi
4281 rm -f core conftest.err conftest.$ac_objext
4282   test "x$ac_cv_prog_cc_c89" != "xno" && break
4283 done
4284 rm -f conftest.$ac_ext
4285 CC=$ac_save_CC
4286
4287 fi
4288 # AC_CACHE_VAL
4289 case "x$ac_cv_prog_cc_c89" in
4290   x)
4291     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4292 $as_echo "none needed" >&6; } ;;
4293   xno)
4294     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4295 $as_echo "unsupported" >&6; } ;;
4296   *)
4297     CC="$CC $ac_cv_prog_cc_c89"
4298     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4299 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4300 esac
4301 if test "x$ac_cv_prog_cc_c89" != xno; then :
4302
4303 fi
4304
4305 ac_ext=c
4306 ac_cpp='$CPP $CPPFLAGS'
4307 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4308 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4309 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4310
4311
4312 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4313 # but has idiosyncrasies of its own.  We assume icc will define
4314 # __INTEL_COMPILER regardless of CFLAGS.
4315
4316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4317 /* end confdefs.h.  */
4318
4319 int
4320 main ()
4321 {
4322 #ifndef __INTEL_COMPILER
4323 choke me
4324 #endif
4325   ;
4326   return 0;
4327 }
4328 _ACEOF
4329 if ac_fn_c_try_compile "$LINENO"; then :
4330   ICC=yes
4331 else
4332   ICC=no
4333 fi
4334 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4335
4336 # Check if it's Sun Studio compiler. We assume that
4337 # __SUNPRO_C will be defined for Sun Studio compilers
4338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4339 /* end confdefs.h.  */
4340
4341 int
4342 main ()
4343 {
4344 #ifndef __SUNPRO_C
4345 choke me
4346 #endif
4347   ;
4348   return 0;
4349 }
4350 _ACEOF
4351 if ac_fn_c_try_compile "$LINENO"; then :
4352   SUN_STUDIO_CC=yes
4353 else
4354   SUN_STUDIO_CC=no
4355 fi
4356 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4357
4358
4359
4360 unset CFLAGS
4361
4362 #
4363 # Read the template
4364 #
4365 . "$srcdir/src/template/$template" || exit
4366
4367 # CFLAGS are selected so:
4368 # If the user specifies something in the environment, that is used.
4369 # else:  If the template file set something, that is used.
4370 # else:  If coverage was enabled, don't set anything.
4371 # else:  If the compiler is GCC, then we use -O2.
4372 # else:  If the compiler is something else, then we use -O, unless debugging.
4373
4374 if test "$ac_env_CFLAGS_set" = set; then
4375   CFLAGS=$ac_env_CFLAGS_value
4376 elif test "${CFLAGS+set}" = set; then
4377   : # (keep what template set)
4378 elif test "$enable_coverage" = yes; then
4379   : # no optimization by default
4380 elif test "$GCC" = yes; then
4381   CFLAGS="-O2"
4382 else
4383   # if the user selected debug mode, don't use -O
4384   if test "$enable_debug" != yes; then
4385     CFLAGS="-O"
4386   fi
4387 fi
4388
4389 # CFLAGS we determined above will be added back at the end
4390 user_CFLAGS=$CFLAGS
4391 CFLAGS=""
4392
4393 # set CFLAGS_VECTOR from the environment, if available
4394 if test "$ac_env_CFLAGS_VECTOR_set" = set; then
4395   CFLAGS_VECTOR=$ac_env_CFLAGS_VECTOR_value
4396 fi
4397
4398 # Some versions of GCC support some additional useful warning flags.
4399 # Check whether they are supported, and add them to CFLAGS if so.
4400 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
4401 # but has its own.  Also check other compiler-specific flags here.
4402
4403 if test "$GCC" = yes -a "$ICC" = no; then
4404   CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
4405   # These work in some but not all gcc versions
4406   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5
4407 $as_echo_n "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
4408 if ${pgac_cv_prog_cc_cflags__Wdeclaration_after_statement+:} false; then :
4409   $as_echo_n "(cached) " >&6
4410 else
4411   pgac_save_CFLAGS=$CFLAGS
4412 CFLAGS="$pgac_save_CFLAGS -Wdeclaration-after-statement"
4413 ac_save_c_werror_flag=$ac_c_werror_flag
4414 ac_c_werror_flag=yes
4415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4416 /* end confdefs.h.  */
4417
4418 int
4419 main ()
4420 {
4421
4422   ;
4423   return 0;
4424 }
4425 _ACEOF
4426 if ac_fn_c_try_compile "$LINENO"; then :
4427   pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=yes
4428 else
4429   pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=no
4430 fi
4431 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4432 ac_c_werror_flag=$ac_save_c_werror_flag
4433 CFLAGS="$pgac_save_CFLAGS"
4434 fi
4435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&5
4436 $as_echo "$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&6; }
4437 if test x"$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" = x"yes"; then
4438   CFLAGS="$CFLAGS -Wdeclaration-after-statement"
4439 fi
4440
4441   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wendif-labels" >&5
4442 $as_echo_n "checking whether $CC supports -Wendif-labels... " >&6; }
4443 if ${pgac_cv_prog_cc_cflags__Wendif_labels+:} false; then :
4444   $as_echo_n "(cached) " >&6
4445 else
4446   pgac_save_CFLAGS=$CFLAGS
4447 CFLAGS="$pgac_save_CFLAGS -Wendif-labels"
4448 ac_save_c_werror_flag=$ac_c_werror_flag
4449 ac_c_werror_flag=yes
4450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4451 /* end confdefs.h.  */
4452
4453 int
4454 main ()
4455 {
4456
4457   ;
4458   return 0;
4459 }
4460 _ACEOF
4461 if ac_fn_c_try_compile "$LINENO"; then :
4462   pgac_cv_prog_cc_cflags__Wendif_labels=yes
4463 else
4464   pgac_cv_prog_cc_cflags__Wendif_labels=no
4465 fi
4466 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4467 ac_c_werror_flag=$ac_save_c_werror_flag
4468 CFLAGS="$pgac_save_CFLAGS"
4469 fi
4470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wendif_labels" >&5
4471 $as_echo "$pgac_cv_prog_cc_cflags__Wendif_labels" >&6; }
4472 if test x"$pgac_cv_prog_cc_cflags__Wendif_labels" = x"yes"; then
4473   CFLAGS="$CFLAGS -Wendif-labels"
4474 fi
4475
4476   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wmissing-format-attribute" >&5
4477 $as_echo_n "checking whether $CC supports -Wmissing-format-attribute... " >&6; }
4478 if ${pgac_cv_prog_cc_cflags__Wmissing_format_attribute+:} false; then :
4479   $as_echo_n "(cached) " >&6
4480 else
4481   pgac_save_CFLAGS=$CFLAGS
4482 CFLAGS="$pgac_save_CFLAGS -Wmissing-format-attribute"
4483 ac_save_c_werror_flag=$ac_c_werror_flag
4484 ac_c_werror_flag=yes
4485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4486 /* end confdefs.h.  */
4487
4488 int
4489 main ()
4490 {
4491
4492   ;
4493   return 0;
4494 }
4495 _ACEOF
4496 if ac_fn_c_try_compile "$LINENO"; then :
4497   pgac_cv_prog_cc_cflags__Wmissing_format_attribute=yes
4498 else
4499   pgac_cv_prog_cc_cflags__Wmissing_format_attribute=no
4500 fi
4501 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4502 ac_c_werror_flag=$ac_save_c_werror_flag
4503 CFLAGS="$pgac_save_CFLAGS"
4504 fi
4505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wmissing_format_attribute" >&5
4506 $as_echo "$pgac_cv_prog_cc_cflags__Wmissing_format_attribute" >&6; }
4507 if test x"$pgac_cv_prog_cc_cflags__Wmissing_format_attribute" = x"yes"; then
4508   CFLAGS="$CFLAGS -Wmissing-format-attribute"
4509 fi
4510
4511   # This was included in -Wall/-Wformat in older GCC versions
4512   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wformat-security" >&5
4513 $as_echo_n "checking whether $CC supports -Wformat-security... " >&6; }
4514 if ${pgac_cv_prog_cc_cflags__Wformat_security+:} false; then :
4515   $as_echo_n "(cached) " >&6
4516 else
4517   pgac_save_CFLAGS=$CFLAGS
4518 CFLAGS="$pgac_save_CFLAGS -Wformat-security"
4519 ac_save_c_werror_flag=$ac_c_werror_flag
4520 ac_c_werror_flag=yes
4521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4522 /* end confdefs.h.  */
4523
4524 int
4525 main ()
4526 {
4527
4528   ;
4529   return 0;
4530 }
4531 _ACEOF
4532 if ac_fn_c_try_compile "$LINENO"; then :
4533   pgac_cv_prog_cc_cflags__Wformat_security=yes
4534 else
4535   pgac_cv_prog_cc_cflags__Wformat_security=no
4536 fi
4537 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4538 ac_c_werror_flag=$ac_save_c_werror_flag
4539 CFLAGS="$pgac_save_CFLAGS"
4540 fi
4541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wformat_security" >&5
4542 $as_echo "$pgac_cv_prog_cc_cflags__Wformat_security" >&6; }
4543 if test x"$pgac_cv_prog_cc_cflags__Wformat_security" = x"yes"; then
4544   CFLAGS="$CFLAGS -Wformat-security"
4545 fi
4546
4547   # Disable strict-aliasing rules; needed for gcc 3.3+
4548   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-strict-aliasing" >&5
4549 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4550 if ${pgac_cv_prog_cc_cflags__fno_strict_aliasing+:} false; then :
4551   $as_echo_n "(cached) " >&6
4552 else
4553   pgac_save_CFLAGS=$CFLAGS
4554 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4555 ac_save_c_werror_flag=$ac_c_werror_flag
4556 ac_c_werror_flag=yes
4557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4558 /* end confdefs.h.  */
4559
4560 int
4561 main ()
4562 {
4563
4564   ;
4565   return 0;
4566 }
4567 _ACEOF
4568 if ac_fn_c_try_compile "$LINENO"; then :
4569   pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4570 else
4571   pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4572 fi
4573 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4574 ac_c_werror_flag=$ac_save_c_werror_flag
4575 CFLAGS="$pgac_save_CFLAGS"
4576 fi
4577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4578 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4579 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4580   CFLAGS="$CFLAGS -fno-strict-aliasing"
4581 fi
4582
4583   # Disable optimizations that assume no overflow; needed for gcc 4.3+
4584   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fwrapv" >&5
4585 $as_echo_n "checking whether $CC supports -fwrapv... " >&6; }
4586 if ${pgac_cv_prog_cc_cflags__fwrapv+:} false; then :
4587   $as_echo_n "(cached) " >&6
4588 else
4589   pgac_save_CFLAGS=$CFLAGS
4590 CFLAGS="$pgac_save_CFLAGS -fwrapv"
4591 ac_save_c_werror_flag=$ac_c_werror_flag
4592 ac_c_werror_flag=yes
4593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4594 /* end confdefs.h.  */
4595
4596 int
4597 main ()
4598 {
4599
4600   ;
4601   return 0;
4602 }
4603 _ACEOF
4604 if ac_fn_c_try_compile "$LINENO"; then :
4605   pgac_cv_prog_cc_cflags__fwrapv=yes
4606 else
4607   pgac_cv_prog_cc_cflags__fwrapv=no
4608 fi
4609 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4610 ac_c_werror_flag=$ac_save_c_werror_flag
4611 CFLAGS="$pgac_save_CFLAGS"
4612 fi
4613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fwrapv" >&5
4614 $as_echo "$pgac_cv_prog_cc_cflags__fwrapv" >&6; }
4615 if test x"$pgac_cv_prog_cc_cflags__fwrapv" = x"yes"; then
4616   CFLAGS="$CFLAGS -fwrapv"
4617 fi
4618
4619   # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
4620   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fexcess-precision=standard" >&5
4621 $as_echo_n "checking whether $CC supports -fexcess-precision=standard... " >&6; }
4622 if ${pgac_cv_prog_cc_cflags__fexcess_precision_standard+:} false; then :
4623   $as_echo_n "(cached) " >&6
4624 else
4625   pgac_save_CFLAGS=$CFLAGS
4626 CFLAGS="$pgac_save_CFLAGS -fexcess-precision=standard"
4627 ac_save_c_werror_flag=$ac_c_werror_flag
4628 ac_c_werror_flag=yes
4629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4630 /* end confdefs.h.  */
4631
4632 int
4633 main ()
4634 {
4635
4636   ;
4637   return 0;
4638 }
4639 _ACEOF
4640 if ac_fn_c_try_compile "$LINENO"; then :
4641   pgac_cv_prog_cc_cflags__fexcess_precision_standard=yes
4642 else
4643   pgac_cv_prog_cc_cflags__fexcess_precision_standard=no
4644 fi
4645 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4646 ac_c_werror_flag=$ac_save_c_werror_flag
4647 CFLAGS="$pgac_save_CFLAGS"
4648 fi
4649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fexcess_precision_standard" >&5
4650 $as_echo "$pgac_cv_prog_cc_cflags__fexcess_precision_standard" >&6; }
4651 if test x"$pgac_cv_prog_cc_cflags__fexcess_precision_standard" = x"yes"; then
4652   CFLAGS="$CFLAGS -fexcess-precision=standard"
4653 fi
4654
4655   # Optimization flags for specific files that benefit from vectorization
4656   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -funroll-loops" >&5
4657 $as_echo_n "checking whether $CC supports -funroll-loops... " >&6; }
4658 if ${pgac_cv_prog_cc_cflags__funroll_loops+:} false; then :
4659   $as_echo_n "(cached) " >&6
4660 else
4661   pgac_save_CFLAGS=$CFLAGS
4662 CFLAGS="$pgac_save_CFLAGS -funroll-loops"
4663 ac_save_c_werror_flag=$ac_c_werror_flag
4664 ac_c_werror_flag=yes
4665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4666 /* end confdefs.h.  */
4667
4668 int
4669 main ()
4670 {
4671
4672   ;
4673   return 0;
4674 }
4675 _ACEOF
4676 if ac_fn_c_try_compile "$LINENO"; then :
4677   pgac_cv_prog_cc_cflags__funroll_loops=yes
4678 else
4679   pgac_cv_prog_cc_cflags__funroll_loops=no
4680 fi
4681 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4682 ac_c_werror_flag=$ac_save_c_werror_flag
4683 CFLAGS="$pgac_save_CFLAGS"
4684 fi
4685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__funroll_loops" >&5
4686 $as_echo "$pgac_cv_prog_cc_cflags__funroll_loops" >&6; }
4687 if test x"$pgac_cv_prog_cc_cflags__funroll_loops" = x"yes"; then
4688   CFLAGS_VECTOR="${CFLAGS_VECTOR} -funroll-loops"
4689 fi
4690
4691   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -ftree-vectorize" >&5
4692 $as_echo_n "checking whether $CC supports -ftree-vectorize... " >&6; }
4693 if ${pgac_cv_prog_cc_cflags__ftree_vectorize+:} false; then :
4694   $as_echo_n "(cached) " >&6
4695 else
4696   pgac_save_CFLAGS=$CFLAGS
4697 CFLAGS="$pgac_save_CFLAGS -ftree-vectorize"
4698 ac_save_c_werror_flag=$ac_c_werror_flag
4699 ac_c_werror_flag=yes
4700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4701 /* end confdefs.h.  */
4702
4703 int
4704 main ()
4705 {
4706
4707   ;
4708   return 0;
4709 }
4710 _ACEOF
4711 if ac_fn_c_try_compile "$LINENO"; then :
4712   pgac_cv_prog_cc_cflags__ftree_vectorize=yes
4713 else
4714   pgac_cv_prog_cc_cflags__ftree_vectorize=no
4715 fi
4716 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4717 ac_c_werror_flag=$ac_save_c_werror_flag
4718 CFLAGS="$pgac_save_CFLAGS"
4719 fi
4720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__ftree_vectorize" >&5
4721 $as_echo "$pgac_cv_prog_cc_cflags__ftree_vectorize" >&6; }
4722 if test x"$pgac_cv_prog_cc_cflags__ftree_vectorize" = x"yes"; then
4723   CFLAGS_VECTOR="${CFLAGS_VECTOR} -ftree-vectorize"
4724 fi
4725
4726 elif test "$ICC" = yes; then
4727   # Intel's compiler has a bug/misoptimization in checking for
4728   # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
4729   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mp1" >&5
4730 $as_echo_n "checking whether $CC supports -mp1... " >&6; }
4731 if ${pgac_cv_prog_cc_cflags__mp1+:} false; then :
4732   $as_echo_n "(cached) " >&6
4733 else
4734   pgac_save_CFLAGS=$CFLAGS
4735 CFLAGS="$pgac_save_CFLAGS -mp1"
4736 ac_save_c_werror_flag=$ac_c_werror_flag
4737 ac_c_werror_flag=yes
4738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4739 /* end confdefs.h.  */
4740
4741 int
4742 main ()
4743 {
4744
4745   ;
4746   return 0;
4747 }
4748 _ACEOF
4749 if ac_fn_c_try_compile "$LINENO"; then :
4750   pgac_cv_prog_cc_cflags__mp1=yes
4751 else
4752   pgac_cv_prog_cc_cflags__mp1=no
4753 fi
4754 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4755 ac_c_werror_flag=$ac_save_c_werror_flag
4756 CFLAGS="$pgac_save_CFLAGS"
4757 fi
4758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__mp1" >&5
4759 $as_echo "$pgac_cv_prog_cc_cflags__mp1" >&6; }
4760 if test x"$pgac_cv_prog_cc_cflags__mp1" = x"yes"; then
4761   CFLAGS="$CFLAGS -mp1"
4762 fi
4763
4764   # Make sure strict aliasing is off (though this is said to be the default)
4765   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-strict-aliasing" >&5
4766 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4767 if ${pgac_cv_prog_cc_cflags__fno_strict_aliasing+:} false; then :
4768   $as_echo_n "(cached) " >&6
4769 else
4770   pgac_save_CFLAGS=$CFLAGS
4771 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4772 ac_save_c_werror_flag=$ac_c_werror_flag
4773 ac_c_werror_flag=yes
4774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4775 /* end confdefs.h.  */
4776
4777 int
4778 main ()
4779 {
4780
4781   ;
4782   return 0;
4783 }
4784 _ACEOF
4785 if ac_fn_c_try_compile "$LINENO"; then :
4786   pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4787 else
4788   pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4789 fi
4790 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4791 ac_c_werror_flag=$ac_save_c_werror_flag
4792 CFLAGS="$pgac_save_CFLAGS"
4793 fi
4794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4795 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4796 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4797   CFLAGS="$CFLAGS -fno-strict-aliasing"
4798 fi
4799
4800 elif test "$PORTNAME" = "aix"; then
4801   # AIX's xlc has to have strict aliasing turned off too
4802   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -qnoansialias" >&5
4803 $as_echo_n "checking whether $CC supports -qnoansialias... " >&6; }
4804 if ${pgac_cv_prog_cc_cflags__qnoansialias+:} false; then :
4805   $as_echo_n "(cached) " >&6
4806 else
4807   pgac_save_CFLAGS=$CFLAGS
4808 CFLAGS="$pgac_save_CFLAGS -qnoansialias"
4809 ac_save_c_werror_flag=$ac_c_werror_flag
4810 ac_c_werror_flag=yes
4811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4812 /* end confdefs.h.  */
4813
4814 int
4815 main ()
4816 {
4817
4818   ;
4819   return 0;
4820 }
4821 _ACEOF
4822 if ac_fn_c_try_compile "$LINENO"; then :
4823   pgac_cv_prog_cc_cflags__qnoansialias=yes
4824 else
4825   pgac_cv_prog_cc_cflags__qnoansialias=no
4826 fi
4827 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4828 ac_c_werror_flag=$ac_save_c_werror_flag
4829 CFLAGS="$pgac_save_CFLAGS"
4830 fi
4831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__qnoansialias" >&5
4832 $as_echo "$pgac_cv_prog_cc_cflags__qnoansialias" >&6; }
4833 if test x"$pgac_cv_prog_cc_cflags__qnoansialias" = x"yes"; then
4834   CFLAGS="$CFLAGS -qnoansialias"
4835 fi
4836
4837 elif test "$PORTNAME" = "hpux"; then
4838   # On some versions of HP-UX, libm functions do not set errno by default.
4839   # Fix that by using +Olibmerrno if the compiler recognizes it.
4840   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports +Olibmerrno" >&5
4841 $as_echo_n "checking whether $CC supports +Olibmerrno... " >&6; }
4842 if ${pgac_cv_prog_cc_cflags_pOlibmerrno+:} false; then :
4843   $as_echo_n "(cached) " >&6
4844 else
4845   pgac_save_CFLAGS=$CFLAGS
4846 CFLAGS="$pgac_save_CFLAGS +Olibmerrno"
4847 ac_save_c_werror_flag=$ac_c_werror_flag
4848 ac_c_werror_flag=yes
4849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4850 /* end confdefs.h.  */
4851
4852 int
4853 main ()
4854 {
4855
4856   ;
4857   return 0;
4858 }
4859 _ACEOF
4860 if ac_fn_c_try_compile "$LINENO"; then :
4861   pgac_cv_prog_cc_cflags_pOlibmerrno=yes
4862 else
4863   pgac_cv_prog_cc_cflags_pOlibmerrno=no
4864 fi
4865 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4866 ac_c_werror_flag=$ac_save_c_werror_flag
4867 CFLAGS="$pgac_save_CFLAGS"
4868 fi
4869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags_pOlibmerrno" >&5
4870 $as_echo "$pgac_cv_prog_cc_cflags_pOlibmerrno" >&6; }
4871 if test x"$pgac_cv_prog_cc_cflags_pOlibmerrno" = x"yes"; then
4872   CFLAGS="$CFLAGS +Olibmerrno"
4873 fi
4874
4875 fi
4876
4877 CFLAGS_VECTOR=$CFLAGS_VECTOR
4878
4879
4880 # supply -g if --enable-debug
4881 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
4882   CFLAGS="$CFLAGS -g"
4883 fi
4884
4885 # enable code coverage if --enable-coverage
4886 if test "$enable_coverage" = yes; then
4887   if test "$GCC" = yes; then
4888     CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
4889   else
4890     as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
4891   fi
4892 fi
4893
4894 # enable profiling if --enable-profiling
4895 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
4896   if test "$GCC" = yes; then
4897
4898 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
4899
4900     CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
4901   else
4902     as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
4903   fi
4904 fi
4905
4906 # We already have this in Makefile.win32, but configure needs it too
4907 if test "$PORTNAME" = "win32"; then
4908   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
4909 fi
4910
4911 # Now that we're done automatically adding stuff to CFLAGS, put back the
4912 # user-specified flags (if any) at the end.  This lets users override
4913 # the automatic additions.
4914 CFLAGS="$CFLAGS $user_CFLAGS"
4915
4916 # Check if the compiler still works with the final flag settings
4917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
4918 $as_echo_n "checking whether the C compiler still works... " >&6; }
4919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4920 /* end confdefs.h.  */
4921
4922 int
4923 main ()
4924 {
4925 return 0;
4926   ;
4927   return 0;
4928 }
4929 _ACEOF
4930 if ac_fn_c_try_link "$LINENO"; then :
4931   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4932 $as_echo "yes" >&6; }
4933 else
4934   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4935 $as_echo "no" >&6; }
4936    as_fn_error $? "cannot proceed" "$LINENO" 5
4937 fi
4938 rm -f core conftest.err conftest.$ac_objext \
4939     conftest$ac_exeext conftest.$ac_ext
4940
4941 # Defend against gcc -ffast-math
4942 if test "$GCC" = yes; then
4943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4944 /* end confdefs.h.  */
4945
4946 int
4947 main ()
4948 {
4949 #ifdef __FAST_MATH__
4950 choke me
4951 #endif
4952   ;
4953   return 0;
4954 }
4955 _ACEOF
4956 if ac_fn_c_try_compile "$LINENO"; then :
4957
4958 else
4959   as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
4960 fi
4961 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4962 fi
4963
4964 ac_ext=c
4965 ac_cpp='$CPP $CPPFLAGS'
4966 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4967 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4968 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4970 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4971 # On Suns, sometimes $CPP names a directory.
4972 if test -n "$CPP" && test -d "$CPP"; then
4973   CPP=
4974 fi
4975 if test -z "$CPP"; then
4976   if ${ac_cv_prog_CPP+:} false; then :
4977   $as_echo_n "(cached) " >&6
4978 else
4979       # Double quotes because CPP needs to be expanded
4980     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4981     do
4982       ac_preproc_ok=false
4983 for ac_c_preproc_warn_flag in '' yes
4984 do
4985   # Use a header file that comes with gcc, so configuring glibc
4986   # with a fresh cross-compiler works.
4987   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4988   # <limits.h> exists even on freestanding compilers.
4989   # On the NeXT, cc -E runs the code through the compiler's parser,
4990   # not just through cpp. "Syntax error" is here to catch this case.
4991   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4992 /* end confdefs.h.  */
4993 #ifdef __STDC__
4994 # include <limits.h>
4995 #else
4996 # include <assert.h>
4997 #endif
4998                      Syntax error
4999 _ACEOF
5000 if ac_fn_c_try_cpp "$LINENO"; then :
5001
5002 else
5003   # Broken: fails on valid input.
5004 continue
5005 fi
5006 rm -f conftest.err conftest.i conftest.$ac_ext
5007
5008   # OK, works on sane cases.  Now check whether nonexistent headers
5009   # can be detected and how.
5010   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5011 /* end confdefs.h.  */
5012 #include <ac_nonexistent.h>
5013 _ACEOF
5014 if ac_fn_c_try_cpp "$LINENO"; then :
5015   # Broken: success on invalid input.
5016 continue
5017 else
5018   # Passes both tests.
5019 ac_preproc_ok=:
5020 break
5021 fi
5022 rm -f conftest.err conftest.i conftest.$ac_ext
5023
5024 done
5025 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5026 rm -f conftest.i conftest.err conftest.$ac_ext
5027 if $ac_preproc_ok; then :
5028   break
5029 fi
5030
5031     done
5032     ac_cv_prog_CPP=$CPP
5033
5034 fi
5035   CPP=$ac_cv_prog_CPP
5036 else
5037   ac_cv_prog_CPP=$CPP
5038 fi
5039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5040 $as_echo "$CPP" >&6; }
5041 ac_preproc_ok=false
5042 for ac_c_preproc_warn_flag in '' yes
5043 do
5044   # Use a header file that comes with gcc, so configuring glibc
5045   # with a fresh cross-compiler works.
5046   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5047   # <limits.h> exists even on freestanding compilers.
5048   # On the NeXT, cc -E runs the code through the compiler's parser,
5049   # not just through cpp. "Syntax error" is here to catch this case.
5050   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5051 /* end confdefs.h.  */
5052 #ifdef __STDC__
5053 # include <limits.h>
5054 #else
5055 # include <assert.h>
5056 #endif
5057                      Syntax error
5058 _ACEOF
5059 if ac_fn_c_try_cpp "$LINENO"; then :
5060
5061 else
5062   # Broken: fails on valid input.
5063 continue
5064 fi
5065 rm -f conftest.err conftest.i conftest.$ac_ext
5066
5067   # OK, works on sane cases.  Now check whether nonexistent headers
5068   # can be detected and how.
5069   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5070 /* end confdefs.h.  */
5071 #include <ac_nonexistent.h>
5072 _ACEOF
5073 if ac_fn_c_try_cpp "$LINENO"; then :
5074   # Broken: success on invalid input.
5075 continue
5076 else
5077   # Passes both tests.
5078 ac_preproc_ok=:
5079 break
5080 fi
5081 rm -f conftest.err conftest.i conftest.$ac_ext
5082
5083 done
5084 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5085 rm -f conftest.i conftest.err conftest.$ac_ext
5086 if $ac_preproc_ok; then :
5087
5088 else
5089   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5090 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5091 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5092 See \`config.log' for more details" "$LINENO" 5; }
5093 fi
5094
5095 ac_ext=c
5096 ac_cpp='$CPP $CPPFLAGS'
5097 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5098 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5099 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5100
5101
5102
5103
5104 #
5105 # Set up TAS assembly code if needed; the template file has now had its
5106 # chance to request this.
5107 #
5108 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
5109
5110
5111 if test "$need_tas" = yes ; then
5112   TAS=tas.o
5113 else
5114   TAS=""
5115 fi
5116
5117
5118
5119 #
5120 # Automatic dependency tracking
5121 #
5122
5123
5124 # Check whether --enable-depend was given.
5125 if test "${enable_depend+set}" = set; then :
5126   enableval=$enable_depend;
5127   case $enableval in
5128     yes)
5129       autodepend=yes
5130       ;;
5131     no)
5132       :
5133       ;;
5134     *)
5135       as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
5136       ;;
5137   esac
5138
5139 else
5140   enable_depend=no
5141
5142 fi
5143
5144
5145
5146
5147
5148 #
5149 # Enable assert checks
5150 #
5151
5152
5153 # Check whether --enable-cassert was given.
5154 if test "${enable_cassert+set}" = set; then :
5155   enableval=$enable_cassert;
5156   case $enableval in
5157     yes)
5158
5159 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
5160
5161       ;;
5162     no)
5163       :
5164       ;;
5165     *)
5166       as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
5167       ;;
5168   esac
5169
5170 else
5171   enable_cassert=no
5172
5173 fi
5174
5175
5176
5177
5178 #
5179 # Include directories
5180 #
5181 ac_save_IFS=$IFS
5182 IFS="${IFS}${PATH_SEPARATOR}"
5183 # SRCH_INC comes from the template file
5184 for dir in $with_includes $SRCH_INC; do
5185   if test -d "$dir"; then
5186     INCLUDES="$INCLUDES -I$dir"
5187   else
5188     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
5189 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
5190   fi
5191 done
5192 IFS=$ac_save_IFS
5193
5194
5195
5196 #
5197 # Library directories
5198 #
5199 ac_save_IFS=$IFS
5200 IFS="${IFS}${PATH_SEPARATOR}"
5201 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
5202 for dir in $LIBRARY_DIRS $SRCH_LIB; do
5203   if test -d "$dir"; then
5204     LIBDIRS="$LIBDIRS -L$dir"
5205   else
5206     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
5207 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
5208   fi
5209 done
5210 IFS=$ac_save_IFS
5211
5212 #
5213 # Enable thread-safe client libraries
5214 #
5215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
5216 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
5217
5218
5219 # Check whether --enable-thread-safety was given.
5220 if test "${enable_thread_safety+set}" = set; then :
5221   enableval=$enable_thread_safety;
5222   case $enableval in
5223     yes)
5224       :
5225       ;;
5226     no)
5227       :
5228       ;;
5229     *)
5230       as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
5231       ;;
5232   esac
5233
5234 else
5235   enable_thread_safety=yes
5236
5237 fi
5238
5239
5240 if test "$enable_thread_safety" = yes; then
5241
5242 $as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
5243
5244 fi
5245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
5246 $as_echo "$enable_thread_safety" >&6; }
5247
5248
5249 #
5250 # Optionally build Tcl modules (PL/Tcl)
5251 #
5252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
5253 $as_echo_n "checking whether to build with Tcl... " >&6; }
5254
5255
5256
5257 # Check whether --with-tcl was given.
5258 if test "${with_tcl+set}" = set; then :
5259   withval=$with_tcl;
5260   case $withval in
5261     yes)
5262       :
5263       ;;
5264     no)
5265       :
5266       ;;
5267     *)
5268       as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
5269       ;;
5270   esac
5271
5272 else
5273   with_tcl=no
5274
5275 fi
5276
5277
5278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
5279 $as_echo "$with_tcl" >&6; }
5280
5281
5282 # We see if the path to the Tcl/Tk configuration scripts is specified.
5283 # This will override the use of tclsh to find the paths to search.
5284
5285
5286
5287
5288 # Check whether --with-tclconfig was given.
5289 if test "${with_tclconfig+set}" = set; then :
5290   withval=$with_tclconfig;
5291   case $withval in
5292     yes)
5293       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
5294       ;;
5295     no)
5296       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
5297       ;;
5298     *)
5299
5300       ;;
5301   esac
5302
5303 fi
5304
5305
5306
5307 #
5308 # Optionally build Perl modules (PL/Perl)
5309 #
5310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
5311 $as_echo_n "checking whether to build Perl modules... " >&6; }
5312
5313
5314
5315 # Check whether --with-perl was given.
5316 if test "${with_perl+set}" = set; then :
5317   withval=$with_perl;
5318   case $withval in
5319     yes)
5320       :
5321       ;;
5322     no)
5323       :
5324       ;;
5325     *)
5326       as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
5327       ;;
5328   esac
5329
5330 else
5331   with_perl=no
5332
5333 fi
5334
5335
5336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
5337 $as_echo "$with_perl" >&6; }
5338
5339
5340 #
5341 # Optionally build Python modules (PL/Python)
5342 #
5343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
5344 $as_echo_n "checking whether to build Python modules... " >&6; }
5345
5346
5347
5348 # Check whether --with-python was given.
5349 if test "${with_python+set}" = set; then :
5350   withval=$with_python;
5351   case $withval in
5352     yes)
5353       :
5354       ;;
5355     no)
5356       :
5357       ;;
5358     *)
5359       as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
5360       ;;
5361   esac
5362
5363 else
5364   with_python=no
5365
5366 fi
5367
5368
5369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
5370 $as_echo "$with_python" >&6; }
5371
5372
5373 #
5374 # GSSAPI
5375 #
5376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
5377 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
5378
5379
5380
5381 # Check whether --with-gssapi was given.
5382 if test "${with_gssapi+set}" = set; then :
5383   withval=$with_gssapi;
5384   case $withval in
5385     yes)
5386
5387
5388 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
5389
5390   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
5391
5392       ;;
5393     no)
5394       :
5395       ;;
5396     *)
5397       as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
5398       ;;
5399   esac
5400
5401 else
5402   with_gssapi=no
5403
5404 fi
5405
5406
5407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
5408 $as_echo "$with_gssapi" >&6; }
5409
5410
5411
5412
5413
5414 #
5415 # Kerberos configuration parameters
5416 #
5417
5418
5419
5420 # Check whether --with-krb-srvnam was given.
5421 if test "${with_krb_srvnam+set}" = set; then :
5422   withval=$with_krb_srvnam;
5423   case $withval in
5424     yes)
5425       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
5426       ;;
5427     no)
5428       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
5429       ;;
5430     *)
5431
5432       ;;
5433   esac
5434
5435 else
5436   with_krb_srvnam="postgres"
5437 fi
5438
5439
5440
5441 cat >>confdefs.h <<_ACEOF
5442 #define PG_KRB_SRVNAM "$with_krb_srvnam"
5443 _ACEOF
5444
5445
5446
5447 #
5448 # PAM
5449 #
5450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
5451 $as_echo_n "checking whether to build with PAM support... " >&6; }
5452
5453
5454
5455 # Check whether --with-pam was given.
5456 if test "${with_pam+set}" = set; then :
5457   withval=$with_pam;
5458   case $withval in
5459     yes)
5460
5461 $as_echo "#define USE_PAM 1" >>confdefs.h
5462
5463       ;;
5464     no)
5465       :
5466       ;;
5467     *)
5468       as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
5469       ;;
5470   esac
5471
5472 else
5473   with_pam=no
5474
5475 fi
5476
5477
5478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
5479 $as_echo "$with_pam" >&6; }
5480
5481
5482 #
5483 # LDAP
5484 #
5485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
5486 $as_echo_n "checking whether to build with LDAP support... " >&6; }
5487
5488
5489
5490 # Check whether --with-ldap was given.
5491 if test "${with_ldap+set}" = set; then :
5492   withval=$with_ldap;
5493   case $withval in
5494     yes)
5495
5496 $as_echo "#define USE_LDAP 1" >>confdefs.h
5497
5498       ;;
5499     no)
5500       :
5501       ;;
5502     *)
5503       as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
5504       ;;
5505   esac
5506
5507 else
5508   with_ldap=no
5509
5510 fi
5511
5512
5513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
5514 $as_echo "$with_ldap" >&6; }
5515
5516
5517 #
5518 # Bonjour
5519 #
5520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
5521 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
5522
5523
5524
5525 # Check whether --with-bonjour was given.
5526 if test "${with_bonjour+set}" = set; then :
5527   withval=$with_bonjour;
5528   case $withval in
5529     yes)
5530
5531 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
5532
5533       ;;
5534     no)
5535       :
5536       ;;
5537     *)
5538       as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
5539       ;;
5540   esac
5541
5542 else
5543   with_bonjour=no
5544
5545 fi
5546
5547
5548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
5549 $as_echo "$with_bonjour" >&6; }
5550
5551
5552 #
5553 # OpenSSL
5554 #
5555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with OpenSSL support" >&5
5556 $as_echo_n "checking whether to build with OpenSSL support... " >&6; }
5557
5558
5559
5560 # Check whether --with-openssl was given.
5561 if test "${with_openssl+set}" = set; then :
5562   withval=$with_openssl;
5563   case $withval in
5564     yes)
5565
5566 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
5567
5568       ;;
5569     no)
5570       :
5571       ;;
5572     *)
5573       as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
5574       ;;
5575   esac
5576
5577 else
5578   with_openssl=no
5579
5580 fi
5581
5582
5583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_openssl" >&5
5584 $as_echo "$with_openssl" >&6; }
5585
5586
5587 #
5588 # SELinux
5589 #
5590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
5591 $as_echo_n "checking whether to build with SELinux support... " >&6; }
5592
5593
5594
5595 # Check whether --with-selinux was given.
5596 if test "${with_selinux+set}" = set; then :
5597   withval=$with_selinux;
5598   case $withval in
5599     yes)
5600       :
5601       ;;
5602     no)
5603       :
5604       ;;
5605     *)
5606       as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
5607       ;;
5608   esac
5609
5610 else
5611   with_selinux=no
5612
5613 fi
5614
5615
5616
5617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
5618 $as_echo "$with_selinux" >&6; }
5619
5620 #
5621 # Readline
5622 #
5623
5624
5625
5626 # Check whether --with-readline was given.
5627 if test "${with_readline+set}" = set; then :
5628   withval=$with_readline;
5629   case $withval in
5630     yes)
5631       :
5632       ;;
5633     no)
5634       :
5635       ;;
5636     *)
5637       as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
5638       ;;
5639   esac
5640
5641 else
5642   with_readline=yes
5643
5644 fi
5645
5646
5647 # readline on MinGW has problems with backslashes in psql and other bugs.
5648 # This is particularly a problem with non-US code pages.
5649 # Therefore disable its use until we understand the cause. 2004-07-20
5650 if test "$PORTNAME" = "win32"; then
5651   if test "$with_readline" = yes; then
5652     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
5653 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
5654     with_readline=no
5655   fi
5656 fi
5657
5658
5659 #
5660 # Prefer libedit
5661 #
5662
5663
5664
5665 # Check whether --with-libedit-preferred was given.
5666 if test "${with_libedit_preferred+set}" = set; then :
5667   withval=$with_libedit_preferred;
5668   case $withval in
5669     yes)
5670       :
5671       ;;
5672     no)
5673       :
5674       ;;
5675     *)
5676       as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
5677       ;;
5678   esac
5679
5680 else
5681   with_libedit_preferred=no
5682
5683 fi
5684
5685
5686
5687
5688 #
5689 # UUID library
5690 #
5691 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
5692 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
5693 # UUID library.  More than one of these might be present on a given platform,
5694 # so we make the user say which one she wants.
5695 #
5696
5697
5698
5699 # Check whether --with-uuid was given.
5700 if test "${with_uuid+set}" = set; then :
5701   withval=$with_uuid;
5702   case $withval in
5703     yes)
5704       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
5705       ;;
5706     no)
5707       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
5708       ;;
5709     *)
5710
5711       ;;
5712   esac
5713
5714 fi
5715
5716
5717 if test x"$with_uuid" = x"" ; then
5718   with_uuid=no
5719 fi
5720
5721
5722
5723 # Check whether --with-ossp-uuid was given.
5724 if test "${with_ossp_uuid+set}" = set; then :
5725   withval=$with_ossp_uuid;
5726   case $withval in
5727     yes)
5728       :
5729       ;;
5730     no)
5731       :
5732       ;;
5733     *)
5734       as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
5735       ;;
5736   esac
5737
5738 else
5739   with_ossp_uuid=no
5740
5741 fi
5742
5743
5744 if test "$with_ossp_uuid" = yes ; then
5745   with_uuid=ossp
5746 fi
5747
5748 if test "$with_uuid" = bsd ; then
5749
5750 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
5751
5752   UUID_EXTRA_OBJS="md5.o sha1.o"
5753 elif test "$with_uuid" = e2fs ; then
5754
5755 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
5756
5757   UUID_EXTRA_OBJS="md5.o sha1.o"
5758 elif test "$with_uuid" = ossp ; then
5759
5760 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
5761
5762   UUID_EXTRA_OBJS=""
5763 elif test "$with_uuid" = no ; then
5764   UUID_EXTRA_OBJS=""
5765 else
5766   as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
5767 fi
5768
5769
5770
5771
5772 #
5773 # XML
5774 #
5775
5776
5777
5778 # Check whether --with-libxml was given.
5779 if test "${with_libxml+set}" = set; then :
5780   withval=$with_libxml;
5781   case $withval in
5782     yes)
5783
5784 $as_echo "#define USE_LIBXML 1" >>confdefs.h
5785
5786       ;;
5787     no)
5788       :
5789       ;;
5790     *)
5791       as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
5792       ;;
5793   esac
5794
5795 else
5796   with_libxml=no
5797
5798 fi
5799
5800
5801
5802 if test "$with_libxml" = yes ; then
5803   for ac_prog in xml2-config
5804 do
5805   # Extract the first word of "$ac_prog", so it can be a program name with args.
5806 set dummy $ac_prog; ac_word=$2
5807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5808 $as_echo_n "checking for $ac_word... " >&6; }
5809 if ${ac_cv_prog_XML2_CONFIG+:} false; then :
5810   $as_echo_n "(cached) " >&6
5811 else
5812   if test -n "$XML2_CONFIG"; then
5813   ac_cv_prog_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test.
5814 else
5815 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5816 for as_dir in $PATH
5817 do
5818   IFS=$as_save_IFS
5819   test -z "$as_dir" && as_dir=.
5820     for ac_exec_ext in '' $ac_executable_extensions; do
5821   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5822     ac_cv_prog_XML2_CONFIG="$ac_prog"
5823     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5824     break 2
5825   fi
5826 done
5827   done
5828 IFS=$as_save_IFS
5829
5830 fi
5831 fi
5832 XML2_CONFIG=$ac_cv_prog_XML2_CONFIG
5833 if test -n "$XML2_CONFIG"; then
5834   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
5835 $as_echo "$XML2_CONFIG" >&6; }
5836 else
5837   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5838 $as_echo "no" >&6; }
5839 fi
5840
5841
5842   test -n "$XML2_CONFIG" && break
5843 done
5844
5845   if test -n "$XML2_CONFIG"; then
5846     for pgac_option in `$XML2_CONFIG --cflags`; do
5847       case $pgac_option in
5848         -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
5849       esac
5850     done
5851     for pgac_option in `$XML2_CONFIG --libs`; do
5852       case $pgac_option in
5853         -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5854       esac
5855     done
5856   fi
5857 fi
5858
5859
5860
5861 #
5862 # XSLT
5863 #
5864
5865
5866
5867 # Check whether --with-libxslt was given.
5868 if test "${with_libxslt+set}" = set; then :
5869   withval=$with_libxslt;
5870   case $withval in
5871     yes)
5872
5873 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
5874
5875       ;;
5876     no)
5877       :
5878       ;;
5879     *)
5880       as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
5881       ;;
5882   esac
5883
5884 else
5885   with_libxslt=no
5886
5887 fi
5888
5889
5890
5891
5892
5893
5894 #
5895 # tzdata
5896 #
5897
5898
5899
5900 # Check whether --with-system-tzdata was given.
5901 if test "${with_system_tzdata+set}" = set; then :
5902   withval=$with_system_tzdata;
5903   case $withval in
5904     yes)
5905       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
5906       ;;
5907     no)
5908       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
5909       ;;
5910     *)
5911
5912       ;;
5913   esac
5914
5915 fi
5916
5917
5918
5919
5920 #
5921 # Zlib
5922 #
5923
5924
5925
5926 # Check whether --with-zlib was given.
5927 if test "${with_zlib+set}" = set; then :
5928   withval=$with_zlib;
5929   case $withval in
5930     yes)
5931       :
5932       ;;
5933     no)
5934       :
5935       ;;
5936     *)
5937       as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
5938       ;;
5939   esac
5940
5941 else
5942   with_zlib=yes
5943
5944 fi
5945
5946
5947
5948
5949 #
5950 # Elf
5951 #
5952
5953 # Assume system is ELF if it predefines __ELF__ as 1,
5954 # otherwise believe host_os based default.
5955 case $host_os in
5956     freebsd1*|freebsd2*) elf=no;;
5957     freebsd3*|freebsd4*) elf=yes;;
5958 esac
5959
5960
5961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5962 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5963 if ${ac_cv_path_GREP+:} false; then :
5964   $as_echo_n "(cached) " >&6
5965 else
5966   if test -z "$GREP"; then
5967   ac_path_GREP_found=false
5968   # Loop through the user's path and test for each of PROGNAME-LIST
5969   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5970 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5971 do
5972   IFS=$as_save_IFS
5973   test -z "$as_dir" && as_dir=.
5974     for ac_prog in grep ggrep; do
5975     for ac_exec_ext in '' $ac_executable_extensions; do
5976       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5977       as_fn_executable_p "$ac_path_GREP" || continue
5978 # Check for GNU ac_path_GREP and select it if it is found.
5979   # Check for GNU $ac_path_GREP
5980 case `"$ac_path_GREP" --version 2>&1` in
5981 *GNU*)
5982   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5983 *)
5984   ac_count=0
5985   $as_echo_n 0123456789 >"conftest.in"
5986   while :
5987   do
5988     cat "conftest.in" "conftest.in" >"conftest.tmp"
5989     mv "conftest.tmp" "conftest.in"
5990     cp "conftest.in" "conftest.nl"
5991     $as_echo 'GREP' >> "conftest.nl"
5992     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5993     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5994     as_fn_arith $ac_count + 1 && ac_count=$as_val
5995     if test $ac_count -gt ${ac_path_GREP_max-0}; then
5996       # Best one so far, save it but keep looking for a better one
5997       ac_cv_path_GREP="$ac_path_GREP"
5998       ac_path_GREP_max=$ac_count
5999     fi
6000     # 10*(2^10) chars as input seems more than enough
6001     test $ac_count -gt 10 && break
6002   done
6003   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6004 esac
6005
6006       $ac_path_GREP_found && break 3
6007     done
6008   done
6009   done
6010 IFS=$as_save_IFS
6011   if test -z "$ac_cv_path_GREP"; then
6012     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6013   fi
6014 else
6015   ac_cv_path_GREP=$GREP
6016 fi
6017
6018 fi
6019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6020 $as_echo "$ac_cv_path_GREP" >&6; }
6021  GREP="$ac_cv_path_GREP"
6022
6023
6024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6025 $as_echo_n "checking for egrep... " >&6; }
6026 if ${ac_cv_path_EGREP+:} false; then :
6027   $as_echo_n "(cached) " >&6
6028 else
6029   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6030    then ac_cv_path_EGREP="$GREP -E"
6031    else
6032      if test -z "$EGREP"; then
6033   ac_path_EGREP_found=false
6034   # Loop through the user's path and test for each of PROGNAME-LIST
6035   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6036 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6037 do
6038   IFS=$as_save_IFS
6039   test -z "$as_dir" && as_dir=.
6040     for ac_prog in egrep; do
6041     for ac_exec_ext in '' $ac_executable_extensions; do
6042       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6043       as_fn_executable_p "$ac_path_EGREP" || continue
6044 # Check for GNU ac_path_EGREP and select it if it is found.
6045   # Check for GNU $ac_path_EGREP
6046 case `"$ac_path_EGREP" --version 2>&1` in
6047 *GNU*)
6048   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6049 *)
6050   ac_count=0
6051   $as_echo_n 0123456789 >"conftest.in"
6052   while :
6053   do
6054     cat "conftest.in" "conftest.in" >"conftest.tmp"
6055     mv "conftest.tmp" "conftest.in"
6056     cp "conftest.in" "conftest.nl"
6057     $as_echo 'EGREP' >> "conftest.nl"
6058     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6059     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6060     as_fn_arith $ac_count + 1 && ac_count=$as_val
6061     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6062       # Best one so far, save it but keep looking for a better one
6063       ac_cv_path_EGREP="$ac_path_EGREP"
6064       ac_path_EGREP_max=$ac_count
6065     fi
6066     # 10*(2^10) chars as input seems more than enough
6067     test $ac_count -gt 10 && break
6068   done
6069   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6070 esac
6071
6072       $ac_path_EGREP_found && break 3
6073     done
6074   done
6075   done
6076 IFS=$as_save_IFS
6077   if test -z "$ac_cv_path_EGREP"; then
6078     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6079   fi
6080 else
6081   ac_cv_path_EGREP=$EGREP
6082 fi
6083
6084    fi
6085 fi
6086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6087 $as_echo "$ac_cv_path_EGREP" >&6; }
6088  EGREP="$ac_cv_path_EGREP"
6089
6090
6091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6092 /* end confdefs.h.  */
6093 #if __ELF__
6094   yes
6095 #endif
6096
6097 _ACEOF
6098 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6099   $EGREP "yes" >/dev/null 2>&1; then :
6100   ELF_SYS=true
6101 else
6102   if test "X$elf" = "Xyes" ; then
6103   ELF_SYS=true
6104 else
6105   ELF_SYS=
6106 fi
6107 fi
6108 rm -f conftest*
6109
6110
6111
6112 #
6113 # Assignments
6114 #
6115
6116 CPPFLAGS="$CPPFLAGS $INCLUDES"
6117 LDFLAGS="$LDFLAGS $LIBDIRS"
6118
6119
6120
6121
6122
6123 # Check whether --with-gnu-ld was given.
6124 if test "${with_gnu_ld+set}" = set; then :
6125   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
6126 else
6127   with_gnu_ld=no
6128 fi
6129
6130 ac_prog=ld
6131 if test "$GCC" = yes; then
6132   # Check if gcc -print-prog-name=ld gives a path.
6133   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
6134 $as_echo_n "checking for ld used by GCC... " >&6; }
6135   case $host in
6136   *-*-mingw*)
6137     # gcc leaves a trailing carriage return which upsets mingw
6138     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6139   *)
6140     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6141   esac
6142   case "$ac_prog" in
6143     # Accept absolute paths.
6144     [\\/]* | [A-Za-z]:[\\/]*)
6145       re_direlt='/[^/][^/]*/\.\./'
6146       # Canonicalize the path of ld
6147       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
6148       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
6149         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
6150       done
6151       test -z "$LD" && LD="$ac_prog"
6152       ;;
6153   "")
6154     # If it fails, then pretend we aren't using GCC.
6155     ac_prog=ld
6156     ;;
6157   *)
6158     # If it is relative, then search for the first ld in PATH.
6159     with_gnu_ld=unknown
6160     ;;
6161   esac
6162 elif test "$with_gnu_ld" = yes; then
6163   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
6164 $as_echo_n "checking for GNU ld... " >&6; }
6165 else
6166   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
6167 $as_echo_n "checking for non-GNU ld... " >&6; }
6168 fi
6169 if ${ac_cv_path_LD+:} false; then :
6170   $as_echo_n "(cached) " >&6
6171 else
6172   if test -z "$LD"; then
6173   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
6174   for ac_dir in $PATH; do
6175     test -z "$ac_dir" && ac_dir=.
6176     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6177       ac_cv_path_LD="$ac_dir/$ac_prog"
6178       # Check to see if the program is GNU ld.  I'd rather use --version,
6179       # but apparently some GNU ld's only accept -v.
6180       # Break only if it was the GNU/non-GNU ld that we prefer.
6181       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
6182         test "$with_gnu_ld" != no && break
6183       else
6184         test "$with_gnu_ld" != yes && break
6185       fi
6186     fi
6187   done
6188   IFS="$ac_save_ifs"
6189 else
6190   ac_cv_path_LD="$LD" # Let the user override the test with a path.
6191 fi
6192 fi
6193
6194 LD="$ac_cv_path_LD"
6195 if test -n "$LD"; then
6196   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
6197 $as_echo "$LD" >&6; }
6198 else
6199   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6200 $as_echo "no" >&6; }
6201 fi
6202 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
6203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
6204 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
6205 if ${ac_cv_prog_gnu_ld+:} false; then :
6206   $as_echo_n "(cached) " >&6
6207 else
6208   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
6209 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
6210   ac_cv_prog_gnu_ld=yes
6211 else
6212   ac_cv_prog_gnu_ld=no
6213 fi
6214 fi
6215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
6216 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
6217 with_gnu_ld=$ac_cv_prog_gnu_ld
6218
6219
6220
6221
6222 case $host_os in sysv5*)
6223   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ld -R works" >&5
6224 $as_echo_n "checking whether ld -R works... " >&6; }
6225 if ${pgac_cv_prog_ld_R+:} false; then :
6226   $as_echo_n "(cached) " >&6
6227 else
6228
6229     pgac_save_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -Wl,-R/usr/lib"
6230     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6231 /* end confdefs.h.  */
6232
6233 int
6234 main ()
6235 {
6236
6237   ;
6238   return 0;
6239 }
6240 _ACEOF
6241 if ac_fn_c_try_link "$LINENO"; then :
6242   pgac_cv_prog_ld_R=yes
6243 else
6244   pgac_cv_prog_ld_R=no
6245 fi
6246 rm -f core conftest.err conftest.$ac_objext \
6247     conftest$ac_exeext conftest.$ac_ext
6248     LDFLAGS=$pgac_save_LDFLAGS
6249
6250 fi
6251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_ld_R" >&5
6252 $as_echo "$pgac_cv_prog_ld_R" >&6; }
6253   ld_R_works=$pgac_cv_prog_ld_R
6254
6255 esac
6256 if test -n "$ac_tool_prefix"; then
6257   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6258 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6260 $as_echo_n "checking for $ac_word... " >&6; }
6261 if ${ac_cv_prog_RANLIB+:} false; then :
6262   $as_echo_n "(cached) " >&6
6263 else
6264   if test -n "$RANLIB"; then
6265   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6266 else
6267 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6268 for as_dir in $PATH
6269 do
6270   IFS=$as_save_IFS
6271   test -z "$as_dir" && as_dir=.
6272     for ac_exec_ext in '' $ac_executable_extensions; do
6273   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6274     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6275     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6276     break 2
6277   fi
6278 done
6279   done
6280 IFS=$as_save_IFS
6281
6282 fi
6283 fi
6284 RANLIB=$ac_cv_prog_RANLIB
6285 if test -n "$RANLIB"; then
6286   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6287 $as_echo "$RANLIB" >&6; }
6288 else
6289   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6290 $as_echo "no" >&6; }
6291 fi
6292
6293
6294 fi
6295 if test -z "$ac_cv_prog_RANLIB"; then
6296   ac_ct_RANLIB=$RANLIB
6297   # Extract the first word of "ranlib", so it can be a program name with args.
6298 set dummy ranlib; ac_word=$2
6299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6300 $as_echo_n "checking for $ac_word... " >&6; }
6301 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6302   $as_echo_n "(cached) " >&6
6303 else
6304   if test -n "$ac_ct_RANLIB"; then
6305   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6306 else
6307 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6308 for as_dir in $PATH
6309 do
6310   IFS=$as_save_IFS
6311   test -z "$as_dir" && as_dir=.
6312     for ac_exec_ext in '' $ac_executable_extensions; do
6313   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6314     ac_cv_prog_ac_ct_RANLIB="ranlib"
6315     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6316     break 2
6317   fi
6318 done
6319   done
6320 IFS=$as_save_IFS
6321
6322 fi
6323 fi
6324 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6325 if test -n "$ac_ct_RANLIB"; then
6326   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6327 $as_echo "$ac_ct_RANLIB" >&6; }
6328 else
6329   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6330 $as_echo "no" >&6; }
6331 fi
6332
6333   if test "x$ac_ct_RANLIB" = x; then
6334     RANLIB=":"
6335   else
6336     case $cross_compiling:$ac_tool_warned in
6337 yes:)
6338 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6339 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6340 ac_tool_warned=yes ;;
6341 esac
6342     RANLIB=$ac_ct_RANLIB
6343   fi
6344 else
6345   RANLIB="$ac_cv_prog_RANLIB"
6346 fi
6347
6348
6349   if test -n "$ac_tool_prefix"; then
6350   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6351 set dummy ${ac_tool_prefix}strip; ac_word=$2
6352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6353 $as_echo_n "checking for $ac_word... " >&6; }
6354 if ${ac_cv_prog_STRIP+:} false; then :
6355   $as_echo_n "(cached) " >&6
6356 else
6357   if test -n "$STRIP"; then
6358   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6359 else
6360 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6361 for as_dir in $PATH
6362 do
6363   IFS=$as_save_IFS
6364   test -z "$as_dir" && as_dir=.
6365     for ac_exec_ext in '' $ac_executable_extensions; do
6366   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6367     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6368     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6369     break 2
6370   fi
6371 done
6372   done
6373 IFS=$as_save_IFS
6374
6375 fi
6376 fi
6377 STRIP=$ac_cv_prog_STRIP
6378 if test -n "$STRIP"; then
6379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6380 $as_echo "$STRIP" >&6; }
6381 else
6382   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6383 $as_echo "no" >&6; }
6384 fi
6385
6386
6387 fi
6388 if test -z "$ac_cv_prog_STRIP"; then
6389   ac_ct_STRIP=$STRIP
6390   # Extract the first word of "strip", so it can be a program name with args.
6391 set dummy strip; ac_word=$2
6392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6393 $as_echo_n "checking for $ac_word... " >&6; }
6394 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
6395   $as_echo_n "(cached) " >&6
6396 else
6397   if test -n "$ac_ct_STRIP"; then
6398   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6399 else
6400 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6401 for as_dir in $PATH
6402 do
6403   IFS=$as_save_IFS
6404   test -z "$as_dir" && as_dir=.
6405     for ac_exec_ext in '' $ac_executable_extensions; do
6406   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6407     ac_cv_prog_ac_ct_STRIP="strip"
6408     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6409     break 2
6410   fi
6411 done
6412   done
6413 IFS=$as_save_IFS
6414
6415 fi
6416 fi
6417 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6418 if test -n "$ac_ct_STRIP"; then
6419   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6420 $as_echo "$ac_ct_STRIP" >&6; }
6421 else
6422   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6423 $as_echo "no" >&6; }
6424 fi
6425
6426   if test "x$ac_ct_STRIP" = x; then
6427     STRIP=":"
6428   else
6429     case $cross_compiling:$ac_tool_warned in
6430 yes:)
6431 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6432 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6433 ac_tool_warned=yes ;;
6434 esac
6435     STRIP=$ac_ct_STRIP
6436   fi
6437 else
6438   STRIP="$ac_cv_prog_STRIP"
6439 fi
6440
6441
6442   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
6443 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
6444   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
6445     STRIP_STATIC_LIB="$STRIP -x"
6446     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
6447     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6448 $as_echo "yes" >&6; }
6449   else
6450     case $host_os in
6451       darwin*)
6452         STRIP="$STRIP -x"
6453         STRIP_STATIC_LIB=$STRIP
6454         STRIP_SHARED_LIB=$STRIP
6455         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6456 $as_echo "yes" >&6; }
6457         ;;
6458       *)
6459         STRIP_STATIC_LIB=:
6460         STRIP_SHARED_LIB=:
6461         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6462 $as_echo "no" >&6; }
6463         ;;
6464     esac
6465   fi
6466
6467
6468
6469 if test -n "$ac_tool_prefix"; then
6470   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6471 set dummy ${ac_tool_prefix}ar; ac_word=$2
6472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6473 $as_echo_n "checking for $ac_word... " >&6; }
6474 if ${ac_cv_prog_AR+:} false; then :
6475   $as_echo_n "(cached) " >&6
6476 else
6477   if test -n "$AR"; then
6478   ac_cv_prog_AR="$AR" # Let the user override the test.
6479 else
6480 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6481 for as_dir in $PATH
6482 do
6483   IFS=$as_save_IFS
6484   test -z "$as_dir" && as_dir=.
6485     for ac_exec_ext in '' $ac_executable_extensions; do
6486   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6487     ac_cv_prog_AR="${ac_tool_prefix}ar"
6488     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6489     break 2
6490   fi
6491 done
6492   done
6493 IFS=$as_save_IFS
6494
6495 fi
6496 fi
6497 AR=$ac_cv_prog_AR
6498 if test -n "$AR"; then
6499   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6500 $as_echo "$AR" >&6; }
6501 else
6502   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6503 $as_echo "no" >&6; }
6504 fi
6505
6506
6507 fi
6508 if test -z "$ac_cv_prog_AR"; then
6509   ac_ct_AR=$AR
6510   # Extract the first word of "ar", so it can be a program name with args.
6511 set dummy ar; ac_word=$2
6512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6513 $as_echo_n "checking for $ac_word... " >&6; }
6514 if ${ac_cv_prog_ac_ct_AR+:} false; then :
6515   $as_echo_n "(cached) " >&6
6516 else
6517   if test -n "$ac_ct_AR"; then
6518   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6519 else
6520 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6521 for as_dir in $PATH
6522 do
6523   IFS=$as_save_IFS
6524   test -z "$as_dir" && as_dir=.
6525     for ac_exec_ext in '' $ac_executable_extensions; do
6526   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6527     ac_cv_prog_ac_ct_AR="ar"
6528     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6529     break 2
6530   fi
6531 done
6532   done
6533 IFS=$as_save_IFS
6534
6535 fi
6536 fi
6537 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6538 if test -n "$ac_ct_AR"; then
6539   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6540 $as_echo "$ac_ct_AR" >&6; }
6541 else
6542   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6543 $as_echo "no" >&6; }
6544 fi
6545
6546   if test "x$ac_ct_AR" = x; then
6547     AR="ar"
6548   else
6549     case $cross_compiling:$ac_tool_warned in
6550 yes:)
6551 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6552 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6553 ac_tool_warned=yes ;;
6554 esac
6555     AR=$ac_ct_AR
6556   fi
6557 else
6558   AR="$ac_cv_prog_AR"
6559 fi
6560
6561 if test "$PORTNAME" = "win32"; then
6562   if test -n "$ac_tool_prefix"; then
6563   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6564 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
6565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6566 $as_echo_n "checking for $ac_word... " >&6; }
6567 if ${ac_cv_prog_DLLTOOL+:} false; then :
6568   $as_echo_n "(cached) " >&6
6569 else
6570   if test -n "$DLLTOOL"; then
6571   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6572 else
6573 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6574 for as_dir in $PATH
6575 do
6576   IFS=$as_save_IFS
6577   test -z "$as_dir" && as_dir=.
6578     for ac_exec_ext in '' $ac_executable_extensions; do
6579   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6580     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
6581     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6582     break 2
6583   fi
6584 done
6585   done
6586 IFS=$as_save_IFS
6587
6588 fi
6589 fi
6590 DLLTOOL=$ac_cv_prog_DLLTOOL
6591 if test -n "$DLLTOOL"; then
6592   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
6593 $as_echo "$DLLTOOL" >&6; }
6594 else
6595   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6596 $as_echo "no" >&6; }
6597 fi
6598
6599
6600 fi
6601 if test -z "$ac_cv_prog_DLLTOOL"; then
6602   ac_ct_DLLTOOL=$DLLTOOL
6603   # Extract the first word of "dlltool", so it can be a program name with args.
6604 set dummy dlltool; ac_word=$2
6605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6606 $as_echo_n "checking for $ac_word... " >&6; }
6607 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
6608   $as_echo_n "(cached) " >&6
6609 else
6610   if test -n "$ac_ct_DLLTOOL"; then
6611   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6612 else
6613 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6614 for as_dir in $PATH
6615 do
6616   IFS=$as_save_IFS
6617   test -z "$as_dir" && as_dir=.
6618     for ac_exec_ext in '' $ac_executable_extensions; do
6619   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6620     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
6621     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6622     break 2
6623   fi
6624 done
6625   done
6626 IFS=$as_save_IFS
6627
6628 fi
6629 fi
6630 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6631 if test -n "$ac_ct_DLLTOOL"; then
6632   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
6633 $as_echo "$ac_ct_DLLTOOL" >&6; }
6634 else
6635   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6636 $as_echo "no" >&6; }
6637 fi
6638
6639   if test "x$ac_ct_DLLTOOL" = x; then
6640     DLLTOOL="dlltool"
6641   else
6642     case $cross_compiling:$ac_tool_warned in
6643 yes:)
6644 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6645 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6646 ac_tool_warned=yes ;;
6647 esac
6648     DLLTOOL=$ac_ct_DLLTOOL
6649   fi
6650 else
6651   DLLTOOL="$ac_cv_prog_DLLTOOL"
6652 fi
6653
6654   if test -n "$ac_tool_prefix"; then
6655   # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
6656 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
6657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6658 $as_echo_n "checking for $ac_word... " >&6; }
6659 if ${ac_cv_prog_DLLWRAP+:} false; then :
6660   $as_echo_n "(cached) " >&6
6661 else
6662   if test -n "$DLLWRAP"; then
6663   ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
6664 else
6665 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6666 for as_dir in $PATH
6667 do
6668   IFS=$as_save_IFS
6669   test -z "$as_dir" && as_dir=.
6670     for ac_exec_ext in '' $ac_executable_extensions; do
6671   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6672     ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
6673     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6674     break 2
6675   fi
6676 done
6677   done
6678 IFS=$as_save_IFS
6679
6680 fi
6681 fi
6682 DLLWRAP=$ac_cv_prog_DLLWRAP
6683 if test -n "$DLLWRAP"; then
6684   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5
6685 $as_echo "$DLLWRAP" >&6; }
6686 else
6687   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6688 $as_echo "no" >&6; }
6689 fi
6690
6691
6692 fi
6693 if test -z "$ac_cv_prog_DLLWRAP"; then
6694   ac_ct_DLLWRAP=$DLLWRAP
6695   # Extract the first word of "dllwrap", so it can be a program name with args.
6696 set dummy dllwrap; ac_word=$2
6697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6698 $as_echo_n "checking for $ac_word... " >&6; }
6699 if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then :
6700   $as_echo_n "(cached) " >&6
6701 else
6702   if test -n "$ac_ct_DLLWRAP"; then
6703   ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
6704 else
6705 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6706 for as_dir in $PATH
6707 do
6708   IFS=$as_save_IFS
6709   test -z "$as_dir" && as_dir=.
6710     for ac_exec_ext in '' $ac_executable_extensions; do
6711   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6712     ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
6713     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6714     break 2
6715   fi
6716 done
6717   done
6718 IFS=$as_save_IFS
6719
6720 fi
6721 fi
6722 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
6723 if test -n "$ac_ct_DLLWRAP"; then
6724   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5
6725 $as_echo "$ac_ct_DLLWRAP" >&6; }
6726 else
6727   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6728 $as_echo "no" >&6; }
6729 fi
6730
6731   if test "x$ac_ct_DLLWRAP" = x; then
6732     DLLWRAP="dllwrap"
6733   else
6734     case $cross_compiling:$ac_tool_warned in
6735 yes:)
6736 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6737 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6738 ac_tool_warned=yes ;;
6739 esac
6740     DLLWRAP=$ac_ct_DLLWRAP
6741   fi
6742 else
6743   DLLWRAP="$ac_cv_prog_DLLWRAP"
6744 fi
6745
6746   if test -n "$ac_tool_prefix"; then
6747   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6748 set dummy ${ac_tool_prefix}windres; ac_word=$2
6749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6750 $as_echo_n "checking for $ac_word... " >&6; }
6751 if ${ac_cv_prog_WINDRES+:} false; then :
6752   $as_echo_n "(cached) " >&6
6753 else
6754   if test -n "$WINDRES"; then
6755   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
6756 else
6757 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6758 for as_dir in $PATH
6759 do
6760   IFS=$as_save_IFS
6761   test -z "$as_dir" && as_dir=.
6762     for ac_exec_ext in '' $ac_executable_extensions; do
6763   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6764     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
6765     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6766     break 2
6767   fi
6768 done
6769   done
6770 IFS=$as_save_IFS
6771
6772 fi
6773 fi
6774 WINDRES=$ac_cv_prog_WINDRES
6775 if test -n "$WINDRES"; then
6776   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
6777 $as_echo "$WINDRES" >&6; }
6778 else
6779   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6780 $as_echo "no" >&6; }
6781 fi
6782
6783
6784 fi
6785 if test -z "$ac_cv_prog_WINDRES"; then
6786   ac_ct_WINDRES=$WINDRES
6787   # Extract the first word of "windres", so it can be a program name with args.
6788 set dummy windres; ac_word=$2
6789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6790 $as_echo_n "checking for $ac_word... " >&6; }
6791 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
6792   $as_echo_n "(cached) " >&6
6793 else
6794   if test -n "$ac_ct_WINDRES"; then
6795   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
6796 else
6797 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6798 for as_dir in $PATH
6799 do
6800   IFS=$as_save_IFS
6801   test -z "$as_dir" && as_dir=.
6802     for ac_exec_ext in '' $ac_executable_extensions; do
6803   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6804     ac_cv_prog_ac_ct_WINDRES="windres"
6805     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6806     break 2
6807   fi
6808 done
6809   done
6810 IFS=$as_save_IFS
6811
6812 fi
6813 fi
6814 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6815 if test -n "$ac_ct_WINDRES"; then
6816   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
6817 $as_echo "$ac_ct_WINDRES" >&6; }
6818 else
6819   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6820 $as_echo "no" >&6; }
6821 fi
6822
6823   if test "x$ac_ct_WINDRES" = x; then
6824     WINDRES="windres"
6825   else
6826     case $cross_compiling:$ac_tool_warned in
6827 yes:)
6828 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6829 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6830 ac_tool_warned=yes ;;
6831 esac
6832     WINDRES=$ac_ct_WINDRES
6833   fi
6834 else
6835   WINDRES="$ac_cv_prog_WINDRES"
6836 fi
6837
6838 fi
6839
6840 # Find a good install program.  We prefer a C program (faster),
6841 # so one script is as good as another.  But avoid the broken or
6842 # incompatible versions:
6843 # SysV /etc/install, /usr/sbin/install
6844 # SunOS /usr/etc/install
6845 # IRIX /sbin/install
6846 # AIX /bin/install
6847 # AmigaOS /C/install, which installs bootblocks on floppy discs
6848 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6849 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
6850 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6851 # OS/2's system install, which has a completely different semantic
6852 # ./install, which can be erroneously created by make from ./install.sh.
6853 # Reject install programs that cannot install multiple files.
6854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6855 $as_echo_n "checking for a BSD-compatible install... " >&6; }
6856 if test -z "$INSTALL"; then
6857 if ${ac_cv_path_install+:} false; then :
6858   $as_echo_n "(cached) " >&6
6859 else
6860   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6861 for as_dir in $PATH
6862 do
6863   IFS=$as_save_IFS
6864   test -z "$as_dir" && as_dir=.
6865     # Account for people who put trailing slashes in PATH elements.
6866 case $as_dir/ in #((
6867   ./ | .// | /[cC]/* | \
6868   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
6869   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
6870   /usr/ucb/* ) ;;
6871   *)
6872     # OSF1 and SCO ODT 3.0 have their own names for install.
6873     # Don't use installbsd from OSF since it installs stuff as root
6874     # by default.
6875     for ac_prog in ginstall scoinst install; do
6876       for ac_exec_ext in '' $ac_executable_extensions; do
6877         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
6878           if test $ac_prog = install &&
6879             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6880             # AIX install.  It has an incompatible calling convention.
6881             :
6882           elif test $ac_prog = install &&
6883             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6884             # program-specific install script used by HP pwplus--don't use.
6885             :
6886           else
6887             rm -rf conftest.one conftest.two conftest.dir
6888             echo one > conftest.one
6889             echo two > conftest.two
6890             mkdir conftest.dir
6891             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6892               test -s conftest.one && test -s conftest.two &&
6893               test -s conftest.dir/conftest.one &&
6894               test -s conftest.dir/conftest.two
6895             then
6896               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6897               break 3
6898             fi
6899           fi
6900         fi
6901       done
6902     done
6903     ;;
6904 esac
6905
6906   done
6907 IFS=$as_save_IFS
6908
6909 rm -rf conftest.one conftest.two conftest.dir
6910
6911 fi
6912   if test "${ac_cv_path_install+set}" = set; then
6913     INSTALL=$ac_cv_path_install
6914   else
6915     # As a last resort, use the slow shell script.  Don't cache a
6916     # value for INSTALL within a source directory, because that will
6917     # break other packages using the cache if that directory is
6918     # removed, or if the value is a relative name.
6919     INSTALL=$ac_install_sh
6920   fi
6921 fi
6922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6923 $as_echo "$INSTALL" >&6; }
6924
6925 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6926 # It thinks the first close brace ends the variable substitution.
6927 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6928
6929 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6930
6931 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6932
6933 # When Autoconf chooses install-sh as install program it tries to generate
6934 # a relative path to it in each makefile where it subsitutes it. This clashes
6935 # with our Makefile.global concept. This workaround helps.
6936 case $INSTALL in
6937   *install-sh*) install_bin='';;
6938   *) install_bin=$INSTALL;;
6939 esac
6940
6941
6942 # Extract the first word of "tar", so it can be a program name with args.
6943 set dummy tar; ac_word=$2
6944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6945 $as_echo_n "checking for $ac_word... " >&6; }
6946 if ${ac_cv_path_TAR+:} false; then :
6947   $as_echo_n "(cached) " >&6
6948 else
6949   case $TAR in
6950   [\\/]* | ?:[\\/]*)
6951   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
6952   ;;
6953   *)
6954   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6955 for as_dir in $PATH
6956 do
6957   IFS=$as_save_IFS
6958   test -z "$as_dir" && as_dir=.
6959     for ac_exec_ext in '' $ac_executable_extensions; do
6960   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6961     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
6962     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6963     break 2
6964   fi
6965 done
6966   done
6967 IFS=$as_save_IFS
6968
6969   ;;
6970 esac
6971 fi
6972 TAR=$ac_cv_path_TAR
6973 if test -n "$TAR"; then
6974   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
6975 $as_echo "$TAR" >&6; }
6976 else
6977   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6978 $as_echo "no" >&6; }
6979 fi
6980
6981
6982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
6983 $as_echo_n "checking whether ln -s works... " >&6; }
6984 LN_S=$as_ln_s
6985 if test "$LN_S" = "ln -s"; then
6986   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6987 $as_echo "yes" >&6; }
6988 else
6989   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
6990 $as_echo "no, using $LN_S" >&6; }
6991 fi
6992
6993 for ac_prog in gawk mawk nawk awk
6994 do
6995   # Extract the first word of "$ac_prog", so it can be a program name with args.
6996 set dummy $ac_prog; ac_word=$2
6997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6998 $as_echo_n "checking for $ac_word... " >&6; }
6999 if ${ac_cv_prog_AWK+:} false; then :
7000   $as_echo_n "(cached) " >&6
7001 else
7002   if test -n "$AWK"; then
7003   ac_cv_prog_AWK="$AWK" # Let the user override the test.
7004 else
7005 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7006 for as_dir in $PATH
7007 do
7008   IFS=$as_save_IFS
7009   test -z "$as_dir" && as_dir=.
7010     for ac_exec_ext in '' $ac_executable_extensions; do
7011   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7012     ac_cv_prog_AWK="$ac_prog"
7013     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7014     break 2
7015   fi
7016 done
7017   done
7018 IFS=$as_save_IFS
7019
7020 fi
7021 fi
7022 AWK=$ac_cv_prog_AWK
7023 if test -n "$AWK"; then
7024   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7025 $as_echo "$AWK" >&6; }
7026 else
7027   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7028 $as_echo "no" >&6; }
7029 fi
7030
7031
7032   test -n "$AWK" && break
7033 done
7034
7035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
7036 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
7037 if test -z "$MKDIR_P"; then
7038   if ${ac_cv_path_mkdir+:} false; then :
7039   $as_echo_n "(cached) " >&6
7040 else
7041   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7042 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
7043 do
7044   IFS=$as_save_IFS
7045   test -z "$as_dir" && as_dir=.
7046     for ac_prog in mkdir gmkdir; do
7047          for ac_exec_ext in '' $ac_executable_extensions; do
7048            as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
7049            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
7050              'mkdir (GNU coreutils) '* | \
7051              'mkdir (coreutils) '* | \
7052              'mkdir (fileutils) '4.1*)
7053                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
7054                break 3;;
7055            esac
7056          done
7057        done
7058   done
7059 IFS=$as_save_IFS
7060
7061 fi
7062
7063   test -d ./--version && rmdir ./--version
7064   if test "${ac_cv_path_mkdir+set}" = set; then
7065     MKDIR_P="$ac_cv_path_mkdir -p"
7066   else
7067     # As a last resort, use the slow shell script.  Don't cache a
7068     # value for MKDIR_P within a source directory, because that will
7069     # break other packages using the cache if that directory is
7070     # removed, or if the value is a relative name.
7071     MKDIR_P="$ac_install_sh -d"
7072   fi
7073 fi
7074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
7075 $as_echo "$MKDIR_P" >&6; }
7076
7077 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
7078 # a relative path to it in each makefile where it subsitutes it. This clashes
7079 # with our Makefile.global concept. This workaround helps.
7080 case $MKDIR_P in
7081   *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
7082 esac
7083
7084 # Let the user override the search
7085 if test -z "$BISON"; then
7086   for ac_prog in bison
7087 do
7088   # Extract the first word of "$ac_prog", so it can be a program name with args.
7089 set dummy $ac_prog; ac_word=$2
7090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7091 $as_echo_n "checking for $ac_word... " >&6; }
7092 if ${ac_cv_path_BISON+:} false; then :
7093   $as_echo_n "(cached) " >&6
7094 else
7095   case $BISON in
7096   [\\/]* | ?:[\\/]*)
7097   ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
7098   ;;
7099   *)
7100   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7101 for as_dir in $PATH
7102 do
7103   IFS=$as_save_IFS
7104   test -z "$as_dir" && as_dir=.
7105     for ac_exec_ext in '' $ac_executable_extensions; do
7106   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7107     ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
7108     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7109     break 2
7110   fi
7111 done
7112   done
7113 IFS=$as_save_IFS
7114
7115   ;;
7116 esac
7117 fi
7118 BISON=$ac_cv_path_BISON
7119 if test -n "$BISON"; then
7120   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
7121 $as_echo "$BISON" >&6; }
7122 else
7123   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7124 $as_echo "no" >&6; }
7125 fi
7126
7127
7128   test -n "$BISON" && break
7129 done
7130
7131 fi
7132
7133 if test "$BISON"; then
7134   pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
7135   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
7136 $as_echo "$as_me: using $pgac_bison_version" >&6;}
7137   if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
7138   then
7139     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7140 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
7141 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
7142 $as_echo "$as_me: WARNING:
7143 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
7144 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
7145     BISON=""
7146   fi
7147   # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
7148   # of the now preferred %name-prefix "base_yy", but the latter
7149   # doesn't work with Bison 2.3 or less.  So for now we silence the
7150   # deprecation warnings.
7151   if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
7152   then
7153     BISONFLAGS="$BISONFLAGS -Wno-deprecated"
7154   fi
7155 fi
7156
7157 if test -z "$BISON"; then
7158   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7159 *** Without Bison you will not be able to build PostgreSQL from Git nor
7160 *** change any of the parser definition files.  You can obtain Bison from
7161 *** a GNU mirror site.  (If you are using the official distribution of
7162 *** PostgreSQL then you do not need to worry about this, because the Bison
7163 *** output is pre-generated.)" >&5
7164 $as_echo "$as_me: WARNING:
7165 *** Without Bison you will not be able to build PostgreSQL from Git nor
7166 *** change any of the parser definition files.  You can obtain Bison from
7167 *** a GNU mirror site.  (If you are using the official distribution of
7168 *** PostgreSQL then you do not need to worry about this, because the Bison
7169 *** output is pre-generated.)" >&2;}
7170 fi
7171 # We don't need AC_SUBST(BISON) because AC_PATH_PROG did it
7172
7173
7174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
7175 $as_echo_n "checking for flex... " >&6; }
7176 if ${pgac_cv_path_flex+:} false; then :
7177   $as_echo_n "(cached) " >&6
7178 else
7179   # Let the user override the test
7180 if test -n "$FLEX"; then
7181   pgac_cv_path_flex=$FLEX
7182 else
7183   pgac_save_IFS=$IFS
7184   IFS=$PATH_SEPARATOR
7185   for pgac_dir in $PATH; do
7186     IFS=$pgac_save_IFS
7187     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
7188       pgac_dir=`pwd`
7189     fi
7190     for pgac_prog in flex lex; do
7191       pgac_candidate="$pgac_dir/$pgac_prog"
7192       if test -f "$pgac_candidate" \
7193         && $pgac_candidate --version </dev/null >/dev/null 2>&1
7194       then
7195         echo '%%'  > conftest.l
7196         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
7197           pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
7198           if echo "$pgac_flex_version" | sed 's/[.a-z]/ /g' | $AWK '{ if ($1 = 2 && $2 = 5 && $3 >= 31) exit 0; else exit 1;}'
7199           then
7200             pgac_cv_path_flex=$pgac_candidate
7201             break 2
7202           else
7203             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7204 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
7205 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
7206 $as_echo "$as_me: WARNING:
7207 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
7208 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
7209           fi
7210         fi
7211       fi
7212     done
7213   done
7214   rm -f conftest.l lex.yy.c
7215   : ${pgac_cv_path_flex=no}
7216 fi
7217
7218 fi
7219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
7220 $as_echo "$pgac_cv_path_flex" >&6; }
7221 if test x"$pgac_cv_path_flex" = x"no"; then
7222   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7223 *** Without Flex you will not be able to build PostgreSQL from Git nor
7224 *** change any of the scanner definition files.  You can obtain Flex from
7225 *** a GNU mirror site.  (If you are using the official distribution of
7226 *** PostgreSQL then you do not need to worry about this because the Flex
7227 *** output is pre-generated.)" >&5
7228 $as_echo "$as_me: WARNING:
7229 *** Without Flex you will not be able to build PostgreSQL from Git nor
7230 *** change any of the scanner definition files.  You can obtain Flex from
7231 *** a GNU mirror site.  (If you are using the official distribution of
7232 *** PostgreSQL then you do not need to worry about this because the Flex
7233 *** output is pre-generated.)" >&2;}
7234
7235   FLEX=
7236 else
7237   FLEX=$pgac_cv_path_flex
7238   pgac_flex_version=`$FLEX --version 2>/dev/null`
7239   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
7240 $as_echo "$as_me: using $pgac_flex_version" >&6;}
7241 fi
7242
7243
7244
7245
7246
7247 # Let the user override the search
7248 if test -z "$PERL"; then
7249   # Extract the first word of "perl", so it can be a program name with args.
7250 set dummy perl; ac_word=$2
7251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7252 $as_echo_n "checking for $ac_word... " >&6; }
7253 if ${ac_cv_path_PERL+:} false; then :
7254   $as_echo_n "(cached) " >&6
7255 else
7256   case $PERL in
7257   [\\/]* | ?:[\\/]*)
7258   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
7259   ;;
7260   *)
7261   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7262 for as_dir in $PATH
7263 do
7264   IFS=$as_save_IFS
7265   test -z "$as_dir" && as_dir=.
7266     for ac_exec_ext in '' $ac_executable_extensions; do
7267   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7268     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
7269     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7270     break 2
7271   fi
7272 done
7273   done
7274 IFS=$as_save_IFS
7275
7276   ;;
7277 esac
7278 fi
7279 PERL=$ac_cv_path_PERL
7280 if test -n "$PERL"; then
7281   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
7282 $as_echo "$PERL" >&6; }
7283 else
7284   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7285 $as_echo "no" >&6; }
7286 fi
7287
7288
7289 fi
7290
7291 if test "$PERL"; then
7292   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'`
7293   { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
7294 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
7295   if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
7296     $AWK '{ if ($1 = 5 && $2 >= 8) exit 1; else exit 0;}'
7297   then
7298     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7299 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7300 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
7301 $as_echo "$as_me: WARNING:
7302 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7303 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
7304     PERL=""
7305   fi
7306 fi
7307
7308 if test -z "$PERL"; then
7309   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7310 *** Without Perl you will not be able to build PostgreSQL from Git.
7311 *** You can obtain Perl from any CPAN mirror site.
7312 *** (If you are using the official distribution of PostgreSQL then you do not
7313 *** need to worry about this, because the Perl output is pre-generated.)" >&5
7314 $as_echo "$as_me: WARNING:
7315 *** Without Perl you will not be able to build PostgreSQL from Git.
7316 *** You can obtain Perl from any CPAN mirror site.
7317 *** (If you are using the official distribution of PostgreSQL then you do not
7318 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
7319 fi
7320
7321 if test "$with_perl" = yes; then
7322   if test -z "$PERL"; then
7323     as_fn_error $? "Perl not found" "$LINENO" 5
7324   fi
7325
7326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
7327 $as_echo_n "checking for Perl archlibexp... " >&6; }
7328 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
7329 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
7330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
7331 $as_echo "$perl_archlibexp" >&6; }
7332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
7333 $as_echo_n "checking for Perl privlibexp... " >&6; }
7334 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
7335 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
7336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
7337 $as_echo "$perl_privlibexp" >&6; }
7338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
7339 $as_echo_n "checking for Perl useshrplib... " >&6; }
7340 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
7341 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
7342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
7343 $as_echo "$perl_useshrplib" >&6; }
7344
7345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
7346 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
7347 if test "$PORTNAME" = "win32" ; then
7348 perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
7349 test -e "$perl_archlibexp/CORE/$perl_lib.lib" && perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
7350 else
7351 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
7352 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
7353 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
7354 fi
7355 if test -z "$perl_embed_ldflags" ; then
7356         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7357 $as_echo "no" >&6; }
7358         as_fn_error $? "could not determine flags for linking embedded Perl.
7359 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
7360 installed." "$LINENO" 5
7361 else
7362         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
7363 $as_echo "$perl_embed_ldflags" >&6; }
7364 fi
7365
7366 fi
7367
7368 if test "$with_python" = yes; then
7369   # Extract the first word of "python", so it can be a program name with args.
7370 set dummy python; ac_word=$2
7371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7372 $as_echo_n "checking for $ac_word... " >&6; }
7373 if ${ac_cv_path_PYTHON+:} false; then :
7374   $as_echo_n "(cached) " >&6
7375 else
7376   case $PYTHON in
7377   [\\/]* | ?:[\\/]*)
7378   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
7379   ;;
7380   *)
7381   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7382 for as_dir in $PATH
7383 do
7384   IFS=$as_save_IFS
7385   test -z "$as_dir" && as_dir=.
7386     for ac_exec_ext in '' $ac_executable_extensions; do
7387   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7388     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
7389     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7390     break 2
7391   fi
7392 done
7393   done
7394 IFS=$as_save_IFS
7395
7396   ;;
7397 esac
7398 fi
7399 PYTHON=$ac_cv_path_PYTHON
7400 if test -n "$PYTHON"; then
7401   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
7402 $as_echo "$PYTHON" >&6; }
7403 else
7404   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7405 $as_echo "no" >&6; }
7406 fi
7407
7408
7409 if test x"$PYTHON" = x""; then
7410   as_fn_error $? "Python not found" "$LINENO" 5
7411 fi
7412
7413
7414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python distutils module" >&5
7415 $as_echo_n "checking for Python distutils module... " >&6; }
7416 if "${PYTHON}" -c 'import distutils' 2>&5
7417 then
7418     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7419 $as_echo "yes" >&6; }
7420 else
7421     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7422 $as_echo "no" >&6; }
7423     as_fn_error $? "distutils module not found" "$LINENO" 5
7424 fi
7425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
7426 $as_echo_n "checking Python configuration directory... " >&6; }
7427 python_majorversion=`${PYTHON} -c "import sys; print(sys.version[0])"`
7428 python_version=`${PYTHON} -c "import sys; print(sys.version[:3])"`
7429 python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
7430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
7431 $as_echo "$python_configdir" >&6; }
7432
7433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directories" >&5
7434 $as_echo_n "checking Python include directories... " >&6; }
7435 python_includespec=`${PYTHON} -c "
7436 import distutils.sysconfig
7437 a = '-I' + distutils.sysconfig.get_python_inc(False)
7438 b = '-I' + distutils.sysconfig.get_python_inc(True)
7439 if a == b:
7440     print(a)
7441 else:
7442     print(a + ' ' + b)"`
7443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
7444 $as_echo "$python_includespec" >&6; }
7445
7446
7447
7448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
7449 $as_echo_n "checking how to link an embedded Python application... " >&6; }
7450
7451 python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
7452 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
7453 python_so=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('SO'))))"`
7454 ldlibrary=`echo "${python_ldlibrary}" | sed "s/${python_so}$//"`
7455 python_enable_shared=`${PYTHON} -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_vars().get('Py_ENABLE_SHARED',0))"`
7456
7457 if test x"${python_libdir}" != x"" -a x"${python_ldlibrary}" != x"" -a x"${python_ldlibrary}" != x"${ldlibrary}"
7458 then
7459         # New way: use the official shared library
7460         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
7461         python_libspec="-L${python_libdir} -l${ldlibrary}"
7462 else
7463         # Old way: use libpython from python_configdir
7464         python_libdir="${python_configdir}"
7465         # LDVERSION was introduced in Python 3.2.
7466         python_ldversion=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDVERSION'))))"`
7467         if test x"${python_ldversion}" = x""; then
7468                 python_ldversion=$python_version
7469         fi
7470         python_libspec="-L${python_libdir} -lpython${python_ldversion}"
7471 fi
7472
7473 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
7474
7475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
7476 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
7477
7478
7479 # threaded python is not supported on OpenBSD
7480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Python is compiled with thread support" >&5
7481 $as_echo_n "checking whether Python is compiled with thread support... " >&6; }
7482 pythreads=`${PYTHON} -c "import sys; print(int('thread' in sys.builtin_module_names))"`
7483 if test "$pythreads" = "1"; then
7484   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7485 $as_echo "yes" >&6; }
7486   case $host_os in
7487   openbsd*)
7488     as_fn_error $? "threaded Python not supported on this platform" "$LINENO" 5
7489     ;;
7490   esac
7491 else
7492   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7493 $as_echo "no" >&6; }
7494 fi
7495
7496
7497 fi
7498
7499 if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
7500   # Extract the first word of "zic", so it can be a program name with args.
7501 set dummy zic; ac_word=$2
7502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7503 $as_echo_n "checking for $ac_word... " >&6; }
7504 if ${ac_cv_path_ZIC+:} false; then :
7505   $as_echo_n "(cached) " >&6
7506 else
7507   case $ZIC in
7508   [\\/]* | ?:[\\/]*)
7509   ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
7510   ;;
7511   *)
7512   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7513 for as_dir in $PATH
7514 do
7515   IFS=$as_save_IFS
7516   test -z "$as_dir" && as_dir=.
7517     for ac_exec_ext in '' $ac_executable_extensions; do
7518   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7519     ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
7520     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7521     break 2
7522   fi
7523 done
7524   done
7525 IFS=$as_save_IFS
7526
7527   ;;
7528 esac
7529 fi
7530 ZIC=$ac_cv_path_ZIC
7531 if test -n "$ZIC"; then
7532   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
7533 $as_echo "$ZIC" >&6; }
7534 else
7535   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7536 $as_echo "no" >&6; }
7537 fi
7538
7539
7540   if test -z "$ZIC"; then
7541     as_fn_error $? "
7542 When cross-compiling, either use the option --with-system-tzdata to use
7543 existing time-zone data, or set the environment variable ZIC to a zic
7544 program to use during the build." "$LINENO" 5
7545   fi
7546 fi
7547
7548
7549 ##
7550 ## Libraries
7551 ##
7552 ## Most libraries are included only if they demonstrably provide a function
7553 ## we need, but libm is an exception: always include it, because there are
7554 ## too many compilers that play cute optimization games that will break
7555 ## probes for standard functions such as pow().
7556 ##
7557
7558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
7559 $as_echo_n "checking for main in -lm... " >&6; }
7560 if ${ac_cv_lib_m_main+:} false; then :
7561   $as_echo_n "(cached) " >&6
7562 else
7563   ac_check_lib_save_LIBS=$LIBS
7564 LIBS="-lm  $LIBS"
7565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7566 /* end confdefs.h.  */
7567
7568
7569 int
7570 main ()
7571 {
7572 return main ();
7573   ;
7574   return 0;
7575 }
7576 _ACEOF
7577 if ac_fn_c_try_link "$LINENO"; then :
7578   ac_cv_lib_m_main=yes
7579 else
7580   ac_cv_lib_m_main=no
7581 fi
7582 rm -f core conftest.err conftest.$ac_objext \
7583     conftest$ac_exeext conftest.$ac_ext
7584 LIBS=$ac_check_lib_save_LIBS
7585 fi
7586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
7587 $as_echo "$ac_cv_lib_m_main" >&6; }
7588 if test "x$ac_cv_lib_m_main" = xyes; then :
7589   cat >>confdefs.h <<_ACEOF
7590 #define HAVE_LIBM 1
7591 _ACEOF
7592
7593   LIBS="-lm $LIBS"
7594
7595 fi
7596
7597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
7598 $as_echo_n "checking for library containing setproctitle... " >&6; }
7599 if ${ac_cv_search_setproctitle+:} false; then :
7600   $as_echo_n "(cached) " >&6
7601 else
7602   ac_func_search_save_LIBS=$LIBS
7603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7604 /* end confdefs.h.  */
7605
7606 /* Override any GCC internal prototype to avoid an error.
7607    Use char because int might match the return type of a GCC
7608    builtin and then its argument prototype would still apply.  */
7609 #ifdef __cplusplus
7610 extern "C"
7611 #endif
7612 char setproctitle ();
7613 int
7614 main ()
7615 {
7616 return setproctitle ();
7617   ;
7618   return 0;
7619 }
7620 _ACEOF
7621 for ac_lib in '' util; do
7622   if test -z "$ac_lib"; then
7623     ac_res="none required"
7624   else
7625     ac_res=-l$ac_lib
7626     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7627   fi
7628   if ac_fn_c_try_link "$LINENO"; then :
7629   ac_cv_search_setproctitle=$ac_res
7630 fi
7631 rm -f core conftest.err conftest.$ac_objext \
7632     conftest$ac_exeext
7633   if ${ac_cv_search_setproctitle+:} false; then :
7634   break
7635 fi
7636 done
7637 if ${ac_cv_search_setproctitle+:} false; then :
7638
7639 else
7640   ac_cv_search_setproctitle=no
7641 fi
7642 rm conftest.$ac_ext
7643 LIBS=$ac_func_search_save_LIBS
7644 fi
7645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
7646 $as_echo "$ac_cv_search_setproctitle" >&6; }
7647 ac_res=$ac_cv_search_setproctitle
7648 if test "$ac_res" != no; then :
7649   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7650
7651 fi
7652
7653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
7654 $as_echo_n "checking for library containing dlopen... " >&6; }
7655 if ${ac_cv_search_dlopen+:} false; then :
7656   $as_echo_n "(cached) " >&6
7657 else
7658   ac_func_search_save_LIBS=$LIBS
7659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7660 /* end confdefs.h.  */
7661
7662 /* Override any GCC internal prototype to avoid an error.
7663    Use char because int might match the return type of a GCC
7664    builtin and then its argument prototype would still apply.  */
7665 #ifdef __cplusplus
7666 extern "C"
7667 #endif
7668 char dlopen ();
7669 int
7670 main ()
7671 {
7672 return dlopen ();
7673   ;
7674   return 0;
7675 }
7676 _ACEOF
7677 for ac_lib in '' dl; do
7678   if test -z "$ac_lib"; then
7679     ac_res="none required"
7680   else
7681     ac_res=-l$ac_lib
7682     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7683   fi
7684   if ac_fn_c_try_link "$LINENO"; then :
7685   ac_cv_search_dlopen=$ac_res
7686 fi
7687 rm -f core conftest.err conftest.$ac_objext \
7688     conftest$ac_exeext
7689   if ${ac_cv_search_dlopen+:} false; then :
7690   break
7691 fi
7692 done
7693 if ${ac_cv_search_dlopen+:} false; then :
7694
7695 else
7696   ac_cv_search_dlopen=no
7697 fi
7698 rm conftest.$ac_ext
7699 LIBS=$ac_func_search_save_LIBS
7700 fi
7701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
7702 $as_echo "$ac_cv_search_dlopen" >&6; }
7703 ac_res=$ac_cv_search_dlopen
7704 if test "$ac_res" != no; then :
7705   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7706
7707 fi
7708
7709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
7710 $as_echo_n "checking for library containing socket... " >&6; }
7711 if ${ac_cv_search_socket+:} false; then :
7712   $as_echo_n "(cached) " >&6
7713 else
7714   ac_func_search_save_LIBS=$LIBS
7715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7716 /* end confdefs.h.  */
7717
7718 /* Override any GCC internal prototype to avoid an error.
7719    Use char because int might match the return type of a GCC
7720    builtin and then its argument prototype would still apply.  */
7721 #ifdef __cplusplus
7722 extern "C"
7723 #endif
7724 char socket ();
7725 int
7726 main ()
7727 {
7728 return socket ();
7729   ;
7730   return 0;
7731 }
7732 _ACEOF
7733 for ac_lib in '' socket ws2_32; do
7734   if test -z "$ac_lib"; then
7735     ac_res="none required"
7736   else
7737     ac_res=-l$ac_lib
7738     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7739   fi
7740   if ac_fn_c_try_link "$LINENO"; then :
7741   ac_cv_search_socket=$ac_res
7742 fi
7743 rm -f core conftest.err conftest.$ac_objext \
7744     conftest$ac_exeext
7745   if ${ac_cv_search_socket+:} false; then :
7746   break
7747 fi
7748 done
7749 if ${ac_cv_search_socket+:} false; then :
7750
7751 else
7752   ac_cv_search_socket=no
7753 fi
7754 rm conftest.$ac_ext
7755 LIBS=$ac_func_search_save_LIBS
7756 fi
7757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
7758 $as_echo "$ac_cv_search_socket" >&6; }
7759 ac_res=$ac_cv_search_socket
7760 if test "$ac_res" != no; then :
7761   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7762
7763 fi
7764
7765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
7766 $as_echo_n "checking for library containing shl_load... " >&6; }
7767 if ${ac_cv_search_shl_load+:} false; then :
7768   $as_echo_n "(cached) " >&6
7769 else
7770   ac_func_search_save_LIBS=$LIBS
7771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7772 /* end confdefs.h.  */
7773
7774 /* Override any GCC internal prototype to avoid an error.
7775    Use char because int might match the return type of a GCC
7776    builtin and then its argument prototype would still apply.  */
7777 #ifdef __cplusplus
7778 extern "C"
7779 #endif
7780 char shl_load ();
7781 int
7782 main ()
7783 {
7784 return shl_load ();
7785   ;
7786   return 0;
7787 }
7788 _ACEOF
7789 for ac_lib in '' dld; do
7790   if test -z "$ac_lib"; then
7791     ac_res="none required"
7792   else
7793     ac_res=-l$ac_lib
7794     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7795   fi
7796   if ac_fn_c_try_link "$LINENO"; then :
7797   ac_cv_search_shl_load=$ac_res
7798 fi
7799 rm -f core conftest.err conftest.$ac_objext \
7800     conftest$ac_exeext
7801   if ${ac_cv_search_shl_load+:} false; then :
7802   break
7803 fi
7804 done
7805 if ${ac_cv_search_shl_load+:} false; then :
7806
7807 else
7808   ac_cv_search_shl_load=no
7809 fi
7810 rm conftest.$ac_ext
7811 LIBS=$ac_func_search_save_LIBS
7812 fi
7813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
7814 $as_echo "$ac_cv_search_shl_load" >&6; }
7815 ac_res=$ac_cv_search_shl_load
7816 if test "$ac_res" != no; then :
7817   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7818
7819 fi
7820
7821 # We only use libld in port/dynloader/aix.c
7822 case $host_os in
7823      aix*)
7824         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ldopen" >&5
7825 $as_echo_n "checking for library containing ldopen... " >&6; }
7826 if ${ac_cv_search_ldopen+:} false; then :
7827   $as_echo_n "(cached) " >&6
7828 else
7829   ac_func_search_save_LIBS=$LIBS
7830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7831 /* end confdefs.h.  */
7832
7833 /* Override any GCC internal prototype to avoid an error.
7834    Use char because int might match the return type of a GCC
7835    builtin and then its argument prototype would still apply.  */
7836 #ifdef __cplusplus
7837 extern "C"
7838 #endif
7839 char ldopen ();
7840 int
7841 main ()
7842 {
7843 return ldopen ();
7844   ;
7845   return 0;
7846 }
7847 _ACEOF
7848 for ac_lib in '' ld; do
7849   if test -z "$ac_lib"; then
7850     ac_res="none required"
7851   else
7852     ac_res=-l$ac_lib
7853     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7854   fi
7855   if ac_fn_c_try_link "$LINENO"; then :
7856   ac_cv_search_ldopen=$ac_res
7857 fi
7858 rm -f core conftest.err conftest.$ac_objext \
7859     conftest$ac_exeext
7860   if ${ac_cv_search_ldopen+:} false; then :
7861   break
7862 fi
7863 done
7864 if ${ac_cv_search_ldopen+:} false; then :
7865
7866 else
7867   ac_cv_search_ldopen=no
7868 fi
7869 rm conftest.$ac_ext
7870 LIBS=$ac_func_search_save_LIBS
7871 fi
7872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ldopen" >&5
7873 $as_echo "$ac_cv_search_ldopen" >&6; }
7874 ac_res=$ac_cv_search_ldopen
7875 if test "$ac_res" != no; then :
7876   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7877
7878 fi
7879
7880         ;;
7881 esac
7882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
7883 $as_echo_n "checking for library containing getopt_long... " >&6; }
7884 if ${ac_cv_search_getopt_long+:} false; then :
7885   $as_echo_n "(cached) " >&6
7886 else
7887   ac_func_search_save_LIBS=$LIBS
7888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7889 /* end confdefs.h.  */
7890
7891 /* Override any GCC internal prototype to avoid an error.
7892    Use char because int might match the return type of a GCC
7893    builtin and then its argument prototype would still apply.  */
7894 #ifdef __cplusplus
7895 extern "C"
7896 #endif
7897 char getopt_long ();
7898 int
7899 main ()
7900 {
7901 return getopt_long ();
7902   ;
7903   return 0;
7904 }
7905 _ACEOF
7906 for ac_lib in '' getopt gnugetopt; do
7907   if test -z "$ac_lib"; then
7908     ac_res="none required"
7909   else
7910     ac_res=-l$ac_lib
7911     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7912   fi
7913   if ac_fn_c_try_link "$LINENO"; then :
7914   ac_cv_search_getopt_long=$ac_res
7915 fi
7916 rm -f core conftest.err conftest.$ac_objext \
7917     conftest$ac_exeext
7918   if ${ac_cv_search_getopt_long+:} false; then :
7919   break
7920 fi
7921 done
7922 if ${ac_cv_search_getopt_long+:} false; then :
7923
7924 else
7925   ac_cv_search_getopt_long=no
7926 fi
7927 rm conftest.$ac_ext
7928 LIBS=$ac_func_search_save_LIBS
7929 fi
7930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
7931 $as_echo "$ac_cv_search_getopt_long" >&6; }
7932 ac_res=$ac_cv_search_getopt_long
7933 if test "$ac_res" != no; then :
7934   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7935
7936 fi
7937
7938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
7939 $as_echo_n "checking for library containing crypt... " >&6; }
7940 if ${ac_cv_search_crypt+:} false; then :
7941   $as_echo_n "(cached) " >&6
7942 else
7943   ac_func_search_save_LIBS=$LIBS
7944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7945 /* end confdefs.h.  */
7946
7947 /* Override any GCC internal prototype to avoid an error.
7948    Use char because int might match the return type of a GCC
7949    builtin and then its argument prototype would still apply.  */
7950 #ifdef __cplusplus
7951 extern "C"
7952 #endif
7953 char crypt ();
7954 int
7955 main ()
7956 {
7957 return crypt ();
7958   ;
7959   return 0;
7960 }
7961 _ACEOF
7962 for ac_lib in '' crypt; do
7963   if test -z "$ac_lib"; then
7964     ac_res="none required"
7965   else
7966     ac_res=-l$ac_lib
7967     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7968   fi
7969   if ac_fn_c_try_link "$LINENO"; then :
7970   ac_cv_search_crypt=$ac_res
7971 fi
7972 rm -f core conftest.err conftest.$ac_objext \
7973     conftest$ac_exeext
7974   if ${ac_cv_search_crypt+:} false; then :
7975   break
7976 fi
7977 done
7978 if ${ac_cv_search_crypt+:} false; then :
7979
7980 else
7981   ac_cv_search_crypt=no
7982 fi
7983 rm conftest.$ac_ext
7984 LIBS=$ac_func_search_save_LIBS
7985 fi
7986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
7987 $as_echo "$ac_cv_search_crypt" >&6; }
7988 ac_res=$ac_cv_search_crypt
7989 if test "$ac_res" != no; then :
7990   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7991
7992 fi
7993
7994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
7995 $as_echo_n "checking for library containing shm_open... " >&6; }
7996 if ${ac_cv_search_shm_open+:} false; then :
7997   $as_echo_n "(cached) " >&6
7998 else
7999   ac_func_search_save_LIBS=$LIBS
8000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8001 /* end confdefs.h.  */
8002
8003 /* Override any GCC internal prototype to avoid an error.
8004    Use char because int might match the return type of a GCC
8005    builtin and then its argument prototype would still apply.  */
8006 #ifdef __cplusplus
8007 extern "C"
8008 #endif
8009 char shm_open ();
8010 int
8011 main ()
8012 {
8013 return shm_open ();
8014   ;
8015   return 0;
8016 }
8017 _ACEOF
8018 for ac_lib in '' rt; do
8019   if test -z "$ac_lib"; then
8020     ac_res="none required"
8021   else
8022     ac_res=-l$ac_lib
8023     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8024   fi
8025   if ac_fn_c_try_link "$LINENO"; then :
8026   ac_cv_search_shm_open=$ac_res
8027 fi
8028 rm -f core conftest.err conftest.$ac_objext \
8029     conftest$ac_exeext
8030   if ${ac_cv_search_shm_open+:} false; then :
8031   break
8032 fi
8033 done
8034 if ${ac_cv_search_shm_open+:} false; then :
8035
8036 else
8037   ac_cv_search_shm_open=no
8038 fi
8039 rm conftest.$ac_ext
8040 LIBS=$ac_func_search_save_LIBS
8041 fi
8042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
8043 $as_echo "$ac_cv_search_shm_open" >&6; }
8044 ac_res=$ac_cv_search_shm_open
8045 if test "$ac_res" != no; then :
8046   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8047
8048 fi
8049
8050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
8051 $as_echo_n "checking for library containing shm_unlink... " >&6; }
8052 if ${ac_cv_search_shm_unlink+:} false; then :
8053   $as_echo_n "(cached) " >&6
8054 else
8055   ac_func_search_save_LIBS=$LIBS
8056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8057 /* end confdefs.h.  */
8058
8059 /* Override any GCC internal prototype to avoid an error.
8060    Use char because int might match the return type of a GCC
8061    builtin and then its argument prototype would still apply.  */
8062 #ifdef __cplusplus
8063 extern "C"
8064 #endif
8065 char shm_unlink ();
8066 int
8067 main ()
8068 {
8069 return shm_unlink ();
8070   ;
8071   return 0;
8072 }
8073 _ACEOF
8074 for ac_lib in '' rt; do
8075   if test -z "$ac_lib"; then
8076     ac_res="none required"
8077   else
8078     ac_res=-l$ac_lib
8079     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8080   fi
8081   if ac_fn_c_try_link "$LINENO"; then :
8082   ac_cv_search_shm_unlink=$ac_res
8083 fi
8084 rm -f core conftest.err conftest.$ac_objext \
8085     conftest$ac_exeext
8086   if ${ac_cv_search_shm_unlink+:} false; then :
8087   break
8088 fi
8089 done
8090 if ${ac_cv_search_shm_unlink+:} false; then :
8091
8092 else
8093   ac_cv_search_shm_unlink=no
8094 fi
8095 rm conftest.$ac_ext
8096 LIBS=$ac_func_search_save_LIBS
8097 fi
8098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
8099 $as_echo "$ac_cv_search_shm_unlink" >&6; }
8100 ac_res=$ac_cv_search_shm_unlink
8101 if test "$ac_res" != no; then :
8102   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8103
8104 fi
8105
8106 # Solaris:
8107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
8108 $as_echo_n "checking for library containing fdatasync... " >&6; }
8109 if ${ac_cv_search_fdatasync+:} false; then :
8110   $as_echo_n "(cached) " >&6
8111 else
8112   ac_func_search_save_LIBS=$LIBS
8113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8114 /* end confdefs.h.  */
8115
8116 /* Override any GCC internal prototype to avoid an error.
8117    Use char because int might match the return type of a GCC
8118    builtin and then its argument prototype would still apply.  */
8119 #ifdef __cplusplus
8120 extern "C"
8121 #endif
8122 char fdatasync ();
8123 int
8124 main ()
8125 {
8126 return fdatasync ();
8127   ;
8128   return 0;
8129 }
8130 _ACEOF
8131 for ac_lib in '' rt posix4; do
8132   if test -z "$ac_lib"; then
8133     ac_res="none required"
8134   else
8135     ac_res=-l$ac_lib
8136     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8137   fi
8138   if ac_fn_c_try_link "$LINENO"; then :
8139   ac_cv_search_fdatasync=$ac_res
8140 fi
8141 rm -f core conftest.err conftest.$ac_objext \
8142     conftest$ac_exeext
8143   if ${ac_cv_search_fdatasync+:} false; then :
8144   break
8145 fi
8146 done
8147 if ${ac_cv_search_fdatasync+:} false; then :
8148
8149 else
8150   ac_cv_search_fdatasync=no
8151 fi
8152 rm conftest.$ac_ext
8153 LIBS=$ac_func_search_save_LIBS
8154 fi
8155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
8156 $as_echo "$ac_cv_search_fdatasync" >&6; }
8157 ac_res=$ac_cv_search_fdatasync
8158 if test "$ac_res" != no; then :
8159   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8160
8161 fi
8162
8163 # Required for thread_test.c on Solaris 2.5:
8164 # Other ports use it too (HP-UX) so test unconditionally
8165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
8166 $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
8167 if ${ac_cv_search_gethostbyname_r+:} false; then :
8168   $as_echo_n "(cached) " >&6
8169 else
8170   ac_func_search_save_LIBS=$LIBS
8171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8172 /* end confdefs.h.  */
8173
8174 /* Override any GCC internal prototype to avoid an error.
8175    Use char because int might match the return type of a GCC
8176    builtin and then its argument prototype would still apply.  */
8177 #ifdef __cplusplus
8178 extern "C"
8179 #endif
8180 char gethostbyname_r ();
8181 int
8182 main ()
8183 {
8184 return gethostbyname_r ();
8185   ;
8186   return 0;
8187 }
8188 _ACEOF
8189 for ac_lib in '' nsl; do
8190   if test -z "$ac_lib"; then
8191     ac_res="none required"
8192   else
8193     ac_res=-l$ac_lib
8194     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8195   fi
8196   if ac_fn_c_try_link "$LINENO"; then :
8197   ac_cv_search_gethostbyname_r=$ac_res
8198 fi
8199 rm -f core conftest.err conftest.$ac_objext \
8200     conftest$ac_exeext
8201   if ${ac_cv_search_gethostbyname_r+:} false; then :
8202   break
8203 fi
8204 done
8205 if ${ac_cv_search_gethostbyname_r+:} false; then :
8206
8207 else
8208   ac_cv_search_gethostbyname_r=no
8209 fi
8210 rm conftest.$ac_ext
8211 LIBS=$ac_func_search_save_LIBS
8212 fi
8213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
8214 $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
8215 ac_res=$ac_cv_search_gethostbyname_r
8216 if test "$ac_res" != no; then :
8217   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8218
8219 fi
8220
8221 # Cygwin:
8222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
8223 $as_echo_n "checking for library containing shmget... " >&6; }
8224 if ${ac_cv_search_shmget+:} false; then :
8225   $as_echo_n "(cached) " >&6
8226 else
8227   ac_func_search_save_LIBS=$LIBS
8228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8229 /* end confdefs.h.  */
8230
8231 /* Override any GCC internal prototype to avoid an error.
8232    Use char because int might match the return type of a GCC
8233    builtin and then its argument prototype would still apply.  */
8234 #ifdef __cplusplus
8235 extern "C"
8236 #endif
8237 char shmget ();
8238 int
8239 main ()
8240 {
8241 return shmget ();
8242   ;
8243   return 0;
8244 }
8245 _ACEOF
8246 for ac_lib in '' cygipc; do
8247   if test -z "$ac_lib"; then
8248     ac_res="none required"
8249   else
8250     ac_res=-l$ac_lib
8251     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8252   fi
8253   if ac_fn_c_try_link "$LINENO"; then :
8254   ac_cv_search_shmget=$ac_res
8255 fi
8256 rm -f core conftest.err conftest.$ac_objext \
8257     conftest$ac_exeext
8258   if ${ac_cv_search_shmget+:} false; then :
8259   break
8260 fi
8261 done
8262 if ${ac_cv_search_shmget+:} false; then :
8263
8264 else
8265   ac_cv_search_shmget=no
8266 fi
8267 rm conftest.$ac_ext
8268 LIBS=$ac_func_search_save_LIBS
8269 fi
8270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
8271 $as_echo "$ac_cv_search_shmget" >&6; }
8272 ac_res=$ac_cv_search_shmget
8273 if test "$ac_res" != no; then :
8274   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8275
8276 fi
8277
8278
8279 if test "$with_readline" = yes; then
8280
8281
8282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
8283 $as_echo_n "checking for library containing readline... " >&6; }
8284 if ${pgac_cv_check_readline+:} false; then :
8285   $as_echo_n "(cached) " >&6
8286 else
8287   pgac_cv_check_readline=no
8288 pgac_save_LIBS=$LIBS
8289 if test x"$with_libedit_preferred" != x"yes"
8290 then    READLINE_ORDER="-lreadline -ledit"
8291 else    READLINE_ORDER="-ledit -lreadline"
8292 fi
8293 for pgac_rllib in $READLINE_ORDER ; do
8294   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
8295     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
8296     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8297 /* end confdefs.h.  */
8298
8299 /* Override any GCC internal prototype to avoid an error.
8300    Use char because int might match the return type of a GCC
8301    builtin and then its argument prototype would still apply.  */
8302 #ifdef __cplusplus
8303 extern "C"
8304 #endif
8305 char readline ();
8306 int
8307 main ()
8308 {
8309 return readline ();
8310   ;
8311   return 0;
8312 }
8313 _ACEOF
8314 if ac_fn_c_try_link "$LINENO"; then :
8315
8316       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
8317       # recognize dependent libraries; assume curses is needed if we didn't
8318       # find any dependency.
8319       case $host_os in
8320         netbsd* | openbsd* | irix*)
8321           if test x"$pgac_lib" = x"" ; then
8322             pgac_lib=" -lcurses"
8323           fi ;;
8324       esac
8325
8326       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
8327       break
8328
8329 fi
8330 rm -f core conftest.err conftest.$ac_objext \
8331     conftest$ac_exeext conftest.$ac_ext
8332   done
8333   if test "$pgac_cv_check_readline" != no ; then
8334     break
8335   fi
8336 done
8337 LIBS=$pgac_save_LIBS
8338
8339 fi
8340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
8341 $as_echo "$pgac_cv_check_readline" >&6; }
8342 if test "$pgac_cv_check_readline" != no ; then
8343   LIBS="$pgac_cv_check_readline $LIBS"
8344
8345 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
8346
8347 fi
8348
8349
8350   if test x"$pgac_cv_check_readline" = x"no"; then
8351     as_fn_error $? "readline library not found
8352 If you have readline already installed, see config.log for details on the
8353 failure.  It is possible the compiler isn't looking in the proper directory.
8354 Use --without-readline to disable readline support." "$LINENO" 5
8355   fi
8356 fi
8357
8358 if test "$with_zlib" = yes; then
8359   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
8360 $as_echo_n "checking for inflate in -lz... " >&6; }
8361 if ${ac_cv_lib_z_inflate+:} false; then :
8362   $as_echo_n "(cached) " >&6
8363 else
8364   ac_check_lib_save_LIBS=$LIBS
8365 LIBS="-lz  $LIBS"
8366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8367 /* end confdefs.h.  */
8368
8369 /* Override any GCC internal prototype to avoid an error.
8370    Use char because int might match the return type of a GCC
8371    builtin and then its argument prototype would still apply.  */
8372 #ifdef __cplusplus
8373 extern "C"
8374 #endif
8375 char inflate ();
8376 int
8377 main ()
8378 {
8379 return inflate ();
8380   ;
8381   return 0;
8382 }
8383 _ACEOF
8384 if ac_fn_c_try_link "$LINENO"; then :
8385   ac_cv_lib_z_inflate=yes
8386 else
8387   ac_cv_lib_z_inflate=no
8388 fi
8389 rm -f core conftest.err conftest.$ac_objext \
8390     conftest$ac_exeext conftest.$ac_ext
8391 LIBS=$ac_check_lib_save_LIBS
8392 fi
8393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
8394 $as_echo "$ac_cv_lib_z_inflate" >&6; }
8395 if test "x$ac_cv_lib_z_inflate" = xyes; then :
8396   cat >>confdefs.h <<_ACEOF
8397 #define HAVE_LIBZ 1
8398 _ACEOF
8399
8400   LIBS="-lz $LIBS"
8401
8402 else
8403   as_fn_error $? "zlib library not found
8404 If you have zlib already installed, see config.log for details on the
8405 failure.  It is possible the compiler isn't looking in the proper directory.
8406 Use --without-zlib to disable zlib support." "$LINENO" 5
8407 fi
8408
8409 fi
8410
8411 if test "$enable_spinlocks" = yes; then
8412
8413 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
8414
8415 else
8416   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
8417 *** Not using spinlocks will cause poor performance." >&5
8418 $as_echo "$as_me: WARNING:
8419 *** Not using spinlocks will cause poor performance." >&2;}
8420 fi
8421
8422 if test "$enable_atomics" = yes; then
8423
8424 $as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
8425
8426 else
8427   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
8428 *** Not using atomic operations will cause poor performance." >&5
8429 $as_echo "$as_me: WARNING:
8430 *** Not using atomic operations will cause poor performance." >&2;}
8431 fi
8432
8433 if test "$with_gssapi" = yes ; then
8434   if test "$PORTNAME" != "win32"; then
8435     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
8436 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
8437 if ${ac_cv_search_gss_init_sec_context+:} false; then :
8438   $as_echo_n "(cached) " >&6
8439 else
8440   ac_func_search_save_LIBS=$LIBS
8441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8442 /* end confdefs.h.  */
8443
8444 /* Override any GCC internal prototype to avoid an error.
8445    Use char because int might match the return type of a GCC
8446    builtin and then its argument prototype would still apply.  */
8447 #ifdef __cplusplus
8448 extern "C"
8449 #endif
8450 char gss_init_sec_context ();
8451 int
8452 main ()
8453 {
8454 return gss_init_sec_context ();
8455   ;
8456   return 0;
8457 }
8458 _ACEOF
8459 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
8460   if test -z "$ac_lib"; then
8461     ac_res="none required"
8462   else
8463     ac_res=-l$ac_lib
8464     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8465   fi
8466   if ac_fn_c_try_link "$LINENO"; then :
8467   ac_cv_search_gss_init_sec_context=$ac_res
8468 fi
8469 rm -f core conftest.err conftest.$ac_objext \
8470     conftest$ac_exeext
8471   if ${ac_cv_search_gss_init_sec_context+:} false; then :
8472   break
8473 fi
8474 done
8475 if ${ac_cv_search_gss_init_sec_context+:} false; then :
8476
8477 else
8478   ac_cv_search_gss_init_sec_context=no
8479 fi
8480 rm conftest.$ac_ext
8481 LIBS=$ac_func_search_save_LIBS
8482 fi
8483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
8484 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
8485 ac_res=$ac_cv_search_gss_init_sec_context
8486 if test "$ac_res" != no; then :
8487   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8488
8489 else
8490   as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
8491 fi
8492
8493   else
8494     LIBS="$LIBS -lgssapi32"
8495   fi
8496 fi
8497
8498 if test "$with_openssl" = yes ; then
8499     if test "$PORTNAME" != "win32"; then
8500      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
8501 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
8502 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
8503   $as_echo_n "(cached) " >&6
8504 else
8505   ac_check_lib_save_LIBS=$LIBS
8506 LIBS="-lcrypto  $LIBS"
8507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8508 /* end confdefs.h.  */
8509
8510 /* Override any GCC internal prototype to avoid an error.
8511    Use char because int might match the return type of a GCC
8512    builtin and then its argument prototype would still apply.  */
8513 #ifdef __cplusplus
8514 extern "C"
8515 #endif
8516 char CRYPTO_new_ex_data ();
8517 int
8518 main ()
8519 {
8520 return CRYPTO_new_ex_data ();
8521   ;
8522   return 0;
8523 }
8524 _ACEOF
8525 if ac_fn_c_try_link "$LINENO"; then :
8526   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
8527 else
8528   ac_cv_lib_crypto_CRYPTO_new_ex_data=no
8529 fi
8530 rm -f core conftest.err conftest.$ac_objext \
8531     conftest$ac_exeext conftest.$ac_ext
8532 LIBS=$ac_check_lib_save_LIBS
8533 fi
8534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
8535 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
8536 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
8537   cat >>confdefs.h <<_ACEOF
8538 #define HAVE_LIBCRYPTO 1
8539 _ACEOF
8540
8541   LIBS="-lcrypto $LIBS"
8542
8543 else
8544   as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
8545 fi
8546
8547      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5
8548 $as_echo_n "checking for SSL_library_init in -lssl... " >&6; }
8549 if ${ac_cv_lib_ssl_SSL_library_init+:} false; then :
8550   $as_echo_n "(cached) " >&6
8551 else
8552   ac_check_lib_save_LIBS=$LIBS
8553 LIBS="-lssl  $LIBS"
8554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8555 /* end confdefs.h.  */
8556
8557 /* Override any GCC internal prototype to avoid an error.
8558    Use char because int might match the return type of a GCC
8559    builtin and then its argument prototype would still apply.  */
8560 #ifdef __cplusplus
8561 extern "C"
8562 #endif
8563 char SSL_library_init ();
8564 int
8565 main ()
8566 {
8567 return SSL_library_init ();
8568   ;
8569   return 0;
8570 }
8571 _ACEOF
8572 if ac_fn_c_try_link "$LINENO"; then :
8573   ac_cv_lib_ssl_SSL_library_init=yes
8574 else
8575   ac_cv_lib_ssl_SSL_library_init=no
8576 fi
8577 rm -f core conftest.err conftest.$ac_objext \
8578     conftest$ac_exeext conftest.$ac_ext
8579 LIBS=$ac_check_lib_save_LIBS
8580 fi
8581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_library_init" >&5
8582 $as_echo "$ac_cv_lib_ssl_SSL_library_init" >&6; }
8583 if test "x$ac_cv_lib_ssl_SSL_library_init" = xyes; then :
8584   cat >>confdefs.h <<_ACEOF
8585 #define HAVE_LIBSSL 1
8586 _ACEOF
8587
8588   LIBS="-lssl $LIBS"
8589
8590 else
8591   as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
8592 fi
8593
8594   else
8595      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
8596 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
8597 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
8598   $as_echo_n "(cached) " >&6
8599 else
8600   ac_func_search_save_LIBS=$LIBS
8601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8602 /* end confdefs.h.  */
8603
8604 /* Override any GCC internal prototype to avoid an error.
8605    Use char because int might match the return type of a GCC
8606    builtin and then its argument prototype would still apply.  */
8607 #ifdef __cplusplus
8608 extern "C"
8609 #endif
8610 char CRYPTO_new_ex_data ();
8611 int
8612 main ()
8613 {
8614 return CRYPTO_new_ex_data ();
8615   ;
8616   return 0;
8617 }
8618 _ACEOF
8619 for ac_lib in '' eay32 crypto; do
8620   if test -z "$ac_lib"; then
8621     ac_res="none required"
8622   else
8623     ac_res=-l$ac_lib
8624     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8625   fi
8626   if ac_fn_c_try_link "$LINENO"; then :
8627   ac_cv_search_CRYPTO_new_ex_data=$ac_res
8628 fi
8629 rm -f core conftest.err conftest.$ac_objext \
8630     conftest$ac_exeext
8631   if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
8632   break
8633 fi
8634 done
8635 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
8636
8637 else
8638   ac_cv_search_CRYPTO_new_ex_data=no
8639 fi
8640 rm conftest.$ac_ext
8641 LIBS=$ac_func_search_save_LIBS
8642 fi
8643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
8644 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
8645 ac_res=$ac_cv_search_CRYPTO_new_ex_data
8646 if test "$ac_res" != no; then :
8647   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8648
8649 else
8650   as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
8651 fi
8652
8653      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_library_init" >&5
8654 $as_echo_n "checking for library containing SSL_library_init... " >&6; }
8655 if ${ac_cv_search_SSL_library_init+:} false; then :
8656   $as_echo_n "(cached) " >&6
8657 else
8658   ac_func_search_save_LIBS=$LIBS
8659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8660 /* end confdefs.h.  */
8661
8662 /* Override any GCC internal prototype to avoid an error.
8663    Use char because int might match the return type of a GCC
8664    builtin and then its argument prototype would still apply.  */
8665 #ifdef __cplusplus
8666 extern "C"
8667 #endif
8668 char SSL_library_init ();
8669 int
8670 main ()
8671 {
8672 return SSL_library_init ();
8673   ;
8674   return 0;
8675 }
8676 _ACEOF
8677 for ac_lib in '' ssleay32 ssl; do
8678   if test -z "$ac_lib"; then
8679     ac_res="none required"
8680   else
8681     ac_res=-l$ac_lib
8682     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8683   fi
8684   if ac_fn_c_try_link "$LINENO"; then :
8685   ac_cv_search_SSL_library_init=$ac_res
8686 fi
8687 rm -f core conftest.err conftest.$ac_objext \
8688     conftest$ac_exeext
8689   if ${ac_cv_search_SSL_library_init+:} false; then :
8690   break
8691 fi
8692 done
8693 if ${ac_cv_search_SSL_library_init+:} false; then :
8694
8695 else
8696   ac_cv_search_SSL_library_init=no
8697 fi
8698 rm conftest.$ac_ext
8699 LIBS=$ac_func_search_save_LIBS
8700 fi
8701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_library_init" >&5
8702 $as_echo "$ac_cv_search_SSL_library_init" >&6; }
8703 ac_res=$ac_cv_search_SSL_library_init
8704 if test "$ac_res" != no; then :
8705   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8706
8707 else
8708   as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
8709 fi
8710
8711   fi
8712   for ac_func in SSL_get_current_compression
8713 do :
8714   ac_fn_c_check_func "$LINENO" "SSL_get_current_compression" "ac_cv_func_SSL_get_current_compression"
8715 if test "x$ac_cv_func_SSL_get_current_compression" = xyes; then :
8716   cat >>confdefs.h <<_ACEOF
8717 #define HAVE_SSL_GET_CURRENT_COMPRESSION 1
8718 _ACEOF
8719
8720 fi
8721 done
8722
8723 fi
8724
8725 if test "$with_pam" = yes ; then
8726   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
8727 $as_echo_n "checking for pam_start in -lpam... " >&6; }
8728 if ${ac_cv_lib_pam_pam_start+:} false; then :
8729   $as_echo_n "(cached) " >&6
8730 else
8731   ac_check_lib_save_LIBS=$LIBS
8732 LIBS="-lpam  $LIBS"
8733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8734 /* end confdefs.h.  */
8735
8736 /* Override any GCC internal prototype to avoid an error.
8737    Use char because int might match the return type of a GCC
8738    builtin and then its argument prototype would still apply.  */
8739 #ifdef __cplusplus
8740 extern "C"
8741 #endif
8742 char pam_start ();
8743 int
8744 main ()
8745 {
8746 return pam_start ();
8747   ;
8748   return 0;
8749 }
8750 _ACEOF
8751 if ac_fn_c_try_link "$LINENO"; then :
8752   ac_cv_lib_pam_pam_start=yes
8753 else
8754   ac_cv_lib_pam_pam_start=no
8755 fi
8756 rm -f core conftest.err conftest.$ac_objext \
8757     conftest$ac_exeext conftest.$ac_ext
8758 LIBS=$ac_check_lib_save_LIBS
8759 fi
8760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
8761 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
8762 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
8763   cat >>confdefs.h <<_ACEOF
8764 #define HAVE_LIBPAM 1
8765 _ACEOF
8766
8767   LIBS="-lpam $LIBS"
8768
8769 else
8770   as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
8771 fi
8772
8773 fi
8774
8775 if test "$with_libxml" = yes ; then
8776   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
8777 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
8778 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
8779   $as_echo_n "(cached) " >&6
8780 else
8781   ac_check_lib_save_LIBS=$LIBS
8782 LIBS="-lxml2  $LIBS"
8783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8784 /* end confdefs.h.  */
8785
8786 /* Override any GCC internal prototype to avoid an error.
8787    Use char because int might match the return type of a GCC
8788    builtin and then its argument prototype would still apply.  */
8789 #ifdef __cplusplus
8790 extern "C"
8791 #endif
8792 char xmlSaveToBuffer ();
8793 int
8794 main ()
8795 {
8796 return xmlSaveToBuffer ();
8797   ;
8798   return 0;
8799 }
8800 _ACEOF
8801 if ac_fn_c_try_link "$LINENO"; then :
8802   ac_cv_lib_xml2_xmlSaveToBuffer=yes
8803 else
8804   ac_cv_lib_xml2_xmlSaveToBuffer=no
8805 fi
8806 rm -f core conftest.err conftest.$ac_objext \
8807     conftest$ac_exeext conftest.$ac_ext
8808 LIBS=$ac_check_lib_save_LIBS
8809 fi
8810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
8811 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
8812 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
8813   cat >>confdefs.h <<_ACEOF
8814 #define HAVE_LIBXML2 1
8815 _ACEOF
8816
8817   LIBS="-lxml2 $LIBS"
8818
8819 else
8820   as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
8821 fi
8822
8823 fi
8824
8825 if test "$with_libxslt" = yes ; then
8826   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
8827 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
8828 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
8829   $as_echo_n "(cached) " >&6
8830 else
8831   ac_check_lib_save_LIBS=$LIBS
8832 LIBS="-lxslt  $LIBS"
8833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8834 /* end confdefs.h.  */
8835
8836 /* Override any GCC internal prototype to avoid an error.
8837    Use char because int might match the return type of a GCC
8838    builtin and then its argument prototype would still apply.  */
8839 #ifdef __cplusplus
8840 extern "C"
8841 #endif
8842 char xsltCleanupGlobals ();
8843 int
8844 main ()
8845 {
8846 return xsltCleanupGlobals ();
8847   ;
8848   return 0;
8849 }
8850 _ACEOF
8851 if ac_fn_c_try_link "$LINENO"; then :
8852   ac_cv_lib_xslt_xsltCleanupGlobals=yes
8853 else
8854   ac_cv_lib_xslt_xsltCleanupGlobals=no
8855 fi
8856 rm -f core conftest.err conftest.$ac_objext \
8857     conftest$ac_exeext conftest.$ac_ext
8858 LIBS=$ac_check_lib_save_LIBS
8859 fi
8860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
8861 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
8862 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
8863   cat >>confdefs.h <<_ACEOF
8864 #define HAVE_LIBXSLT 1
8865 _ACEOF
8866
8867   LIBS="-lxslt $LIBS"
8868
8869 else
8870   as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
8871 fi
8872
8873 fi
8874
8875 # for contrib/sepgsql
8876 if test "$with_selinux" = yes; then
8877   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
8878 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
8879 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
8880   $as_echo_n "(cached) " >&6
8881 else
8882   ac_check_lib_save_LIBS=$LIBS
8883 LIBS="-lselinux  $LIBS"
8884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8885 /* end confdefs.h.  */
8886
8887 /* Override any GCC internal prototype to avoid an error.
8888    Use char because int might match the return type of a GCC
8889    builtin and then its argument prototype would still apply.  */
8890 #ifdef __cplusplus
8891 extern "C"
8892 #endif
8893 char security_compute_create_name ();
8894 int
8895 main ()
8896 {
8897 return security_compute_create_name ();
8898   ;
8899   return 0;
8900 }
8901 _ACEOF
8902 if ac_fn_c_try_link "$LINENO"; then :
8903   ac_cv_lib_selinux_security_compute_create_name=yes
8904 else
8905   ac_cv_lib_selinux_security_compute_create_name=no
8906 fi
8907 rm -f core conftest.err conftest.$ac_objext \
8908     conftest$ac_exeext conftest.$ac_ext
8909 LIBS=$ac_check_lib_save_LIBS
8910 fi
8911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
8912 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
8913 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
8914   cat >>confdefs.h <<_ACEOF
8915 #define HAVE_LIBSELINUX 1
8916 _ACEOF
8917
8918   LIBS="-lselinux $LIBS"
8919
8920 else
8921   as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
8922 fi
8923
8924 fi
8925
8926 # for contrib/uuid-ossp
8927 if test "$with_uuid" = bsd ; then
8928   # On BSD, the UUID functions are in libc
8929   ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
8930 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
8931   UUID_LIBS=""
8932 else
8933   as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
8934 fi
8935
8936 elif test "$with_uuid" = e2fs ; then
8937   # On OS X, the UUID functions are in libc
8938   ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
8939 if test "x$ac_cv_func_uuid_generate" = xyes; then :
8940   UUID_LIBS=""
8941 else
8942   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
8943 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
8944 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
8945   $as_echo_n "(cached) " >&6
8946 else
8947   ac_check_lib_save_LIBS=$LIBS
8948 LIBS="-luuid  $LIBS"
8949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8950 /* end confdefs.h.  */
8951
8952 /* Override any GCC internal prototype to avoid an error.
8953    Use char because int might match the return type of a GCC
8954    builtin and then its argument prototype would still apply.  */
8955 #ifdef __cplusplus
8956 extern "C"
8957 #endif
8958 char uuid_generate ();
8959 int
8960 main ()
8961 {
8962 return uuid_generate ();
8963   ;
8964   return 0;
8965 }
8966 _ACEOF
8967 if ac_fn_c_try_link "$LINENO"; then :
8968   ac_cv_lib_uuid_uuid_generate=yes
8969 else
8970   ac_cv_lib_uuid_uuid_generate=no
8971 fi
8972 rm -f core conftest.err conftest.$ac_objext \
8973     conftest$ac_exeext conftest.$ac_ext
8974 LIBS=$ac_check_lib_save_LIBS
8975 fi
8976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
8977 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
8978 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
8979   UUID_LIBS="-luuid"
8980 else
8981   as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
8982 fi
8983
8984 fi
8985
8986 elif test "$with_uuid" = ossp ; then
8987   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
8988 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
8989 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
8990   $as_echo_n "(cached) " >&6
8991 else
8992   ac_check_lib_save_LIBS=$LIBS
8993 LIBS="-lossp-uuid  $LIBS"
8994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8995 /* end confdefs.h.  */
8996
8997 /* Override any GCC internal prototype to avoid an error.
8998    Use char because int might match the return type of a GCC
8999    builtin and then its argument prototype would still apply.  */
9000 #ifdef __cplusplus
9001 extern "C"
9002 #endif
9003 char uuid_export ();
9004 int
9005 main ()
9006 {
9007 return uuid_export ();
9008   ;
9009   return 0;
9010 }
9011 _ACEOF
9012 if ac_fn_c_try_link "$LINENO"; then :
9013   ac_cv_lib_ossp_uuid_uuid_export=yes
9014 else
9015   ac_cv_lib_ossp_uuid_uuid_export=no
9016 fi
9017 rm -f core conftest.err conftest.$ac_objext \
9018     conftest$ac_exeext conftest.$ac_ext
9019 LIBS=$ac_check_lib_save_LIBS
9020 fi
9021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
9022 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
9023 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
9024   UUID_LIBS="-lossp-uuid"
9025 else
9026   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
9027 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
9028 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
9029   $as_echo_n "(cached) " >&6
9030 else
9031   ac_check_lib_save_LIBS=$LIBS
9032 LIBS="-luuid  $LIBS"
9033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9034 /* end confdefs.h.  */
9035
9036 /* Override any GCC internal prototype to avoid an error.
9037    Use char because int might match the return type of a GCC
9038    builtin and then its argument prototype would still apply.  */
9039 #ifdef __cplusplus
9040 extern "C"
9041 #endif
9042 char uuid_export ();
9043 int
9044 main ()
9045 {
9046 return uuid_export ();
9047   ;
9048   return 0;
9049 }
9050 _ACEOF
9051 if ac_fn_c_try_link "$LINENO"; then :
9052   ac_cv_lib_uuid_uuid_export=yes
9053 else
9054   ac_cv_lib_uuid_uuid_export=no
9055 fi
9056 rm -f core conftest.err conftest.$ac_objext \
9057     conftest$ac_exeext conftest.$ac_ext
9058 LIBS=$ac_check_lib_save_LIBS
9059 fi
9060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
9061 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
9062 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
9063   UUID_LIBS="-luuid"
9064 else
9065   as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
9066 fi
9067
9068 fi
9069
9070 fi
9071
9072
9073
9074 ##
9075 ## Header files
9076 ##
9077
9078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
9079 $as_echo_n "checking for ANSI C header files... " >&6; }
9080 if ${ac_cv_header_stdc+:} false; then :
9081   $as_echo_n "(cached) " >&6
9082 else
9083   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9084 /* end confdefs.h.  */
9085 #include <stdlib.h>
9086 #include <stdarg.h>
9087 #include <string.h>
9088 #include <float.h>
9089
9090 int
9091 main ()
9092 {
9093
9094   ;
9095   return 0;
9096 }
9097 _ACEOF
9098 if ac_fn_c_try_compile "$LINENO"; then :
9099   ac_cv_header_stdc=yes
9100 else
9101   ac_cv_header_stdc=no
9102 fi
9103 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9104
9105 if test $ac_cv_header_stdc = yes; then
9106   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9107   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9108 /* end confdefs.h.  */
9109 #include <string.h>
9110
9111 _ACEOF
9112 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9113   $EGREP "memchr" >/dev/null 2>&1; then :
9114
9115 else
9116   ac_cv_header_stdc=no
9117 fi
9118 rm -f conftest*
9119
9120 fi
9121
9122 if test $ac_cv_header_stdc = yes; then
9123   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9124   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9125 /* end confdefs.h.  */
9126 #include <stdlib.h>
9127
9128 _ACEOF
9129 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9130   $EGREP "free" >/dev/null 2>&1; then :
9131
9132 else
9133   ac_cv_header_stdc=no
9134 fi
9135 rm -f conftest*
9136
9137 fi
9138
9139 if test $ac_cv_header_stdc = yes; then
9140   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9141   if test "$cross_compiling" = yes; then :
9142   :
9143 else
9144   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9145 /* end confdefs.h.  */
9146 #include <ctype.h>
9147 #include <stdlib.h>
9148 #if ((' ' & 0x0FF) == 0x020)
9149 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9150 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9151 #else
9152 # define ISLOWER(c) \
9153                    (('a' <= (c) && (c) <= 'i') \
9154                      || ('j' <= (c) && (c) <= 'r') \
9155                      || ('s' <= (c) && (c) <= 'z'))
9156 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9157 #endif
9158
9159 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9160 int
9161 main ()
9162 {
9163   int i;
9164   for (i = 0; i < 256; i++)
9165     if (XOR (islower (i), ISLOWER (i))
9166         || toupper (i) != TOUPPER (i))
9167       return 2;
9168   return 0;
9169 }
9170 _ACEOF
9171 if ac_fn_c_try_run "$LINENO"; then :
9172
9173 else
9174   ac_cv_header_stdc=no
9175 fi
9176 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9177   conftest.$ac_objext conftest.beam conftest.$ac_ext
9178 fi
9179
9180 fi
9181 fi
9182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
9183 $as_echo "$ac_cv_header_stdc" >&6; }
9184 if test $ac_cv_header_stdc = yes; then
9185
9186 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
9187
9188 fi
9189
9190 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
9191 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
9192                   inttypes.h stdint.h unistd.h
9193 do :
9194   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9195 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
9196 "
9197 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9198   cat >>confdefs.h <<_ACEOF
9199 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9200 _ACEOF
9201
9202 fi
9203
9204 done
9205
9206
9207 for ac_header in atomic.h crypt.h dld.h fp_class.h getopt.h ieeefp.h ifaddrs.h langinfo.h mbarrier.h poll.h pwd.h sys/ioctl.h sys/ipc.h sys/poll.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/socket.h sys/sockio.h sys/tas.h sys/time.h sys/un.h termios.h ucred.h utime.h wchar.h wctype.h
9208 do :
9209   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9210 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9211 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9212   cat >>confdefs.h <<_ACEOF
9213 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9214 _ACEOF
9215
9216 fi
9217
9218 done
9219
9220
9221 # On BSD, test for net/if.h will fail unless sys/socket.h
9222 # is included first.
9223 for ac_header in net/if.h
9224 do :
9225   ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
9226 #ifdef HAVE_SYS_SOCKET_H
9227 #include <sys/socket.h>
9228 #endif
9229
9230 "
9231 if test "x$ac_cv_header_net_if_h" = xyes; then :
9232   cat >>confdefs.h <<_ACEOF
9233 #define HAVE_NET_IF_H 1
9234 _ACEOF
9235
9236 fi
9237
9238 done
9239
9240
9241 # On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
9242 # is included first.
9243 for ac_header in sys/ucred.h
9244 do :
9245   ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
9246 #include <sys/param.h>
9247
9248 "
9249 if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
9250   cat >>confdefs.h <<_ACEOF
9251 #define HAVE_SYS_UCRED_H 1
9252 _ACEOF
9253
9254 fi
9255
9256 done
9257
9258
9259 # At least on IRIX, test for netinet/tcp.h will fail unless
9260 # netinet/in.h is included first.
9261 for ac_header in netinet/in.h
9262 do :
9263   ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
9264 if test "x$ac_cv_header_netinet_in_h" = xyes; then :
9265   cat >>confdefs.h <<_ACEOF
9266 #define HAVE_NETINET_IN_H 1
9267 _ACEOF
9268
9269 fi
9270
9271 done
9272
9273 for ac_header in netinet/tcp.h
9274 do :
9275   ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
9276 #ifdef HAVE_NETINET_IN_H
9277 #include <netinet/in.h>
9278 #endif
9279
9280 "
9281 if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
9282   cat >>confdefs.h <<_ACEOF
9283 #define HAVE_NETINET_TCP_H 1
9284 _ACEOF
9285
9286 fi
9287
9288 done
9289
9290
9291 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
9292   for ac_header in readline/readline.h
9293 do :
9294   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
9295 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
9296   cat >>confdefs.h <<_ACEOF
9297 #define HAVE_READLINE_READLINE_H 1
9298 _ACEOF
9299
9300 else
9301   for ac_header in readline.h
9302 do :
9303   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
9304 if test "x$ac_cv_header_readline_h" = xyes; then :
9305   cat >>confdefs.h <<_ACEOF
9306 #define HAVE_READLINE_H 1
9307 _ACEOF
9308
9309 else
9310   as_fn_error $? "readline header not found
9311 If you have readline already installed, see config.log for details on the
9312 failure.  It is possible the compiler isn't looking in the proper directory.
9313 Use --without-readline to disable readline support." "$LINENO" 5
9314 fi
9315
9316 done
9317
9318 fi
9319
9320 done
9321
9322   for ac_header in readline/history.h
9323 do :
9324   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
9325 if test "x$ac_cv_header_readline_history_h" = xyes; then :
9326   cat >>confdefs.h <<_ACEOF
9327 #define HAVE_READLINE_HISTORY_H 1
9328 _ACEOF
9329
9330 else
9331   for ac_header in history.h
9332 do :
9333   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
9334 if test "x$ac_cv_header_history_h" = xyes; then :
9335   cat >>confdefs.h <<_ACEOF
9336 #define HAVE_HISTORY_H 1
9337 _ACEOF
9338
9339 else
9340   as_fn_error $? "history header not found
9341 If you have readline already installed, see config.log for details on the
9342 failure.  It is possible the compiler isn't looking in the proper directory.
9343 Use --without-readline to disable readline support." "$LINENO" 5
9344 fi
9345
9346 done
9347
9348 fi
9349
9350 done
9351
9352 fi
9353
9354 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
9355 # Some installations of libedit usurp /usr/include/readline/, which seems
9356 # bad practice, since in combined installations readline will have its headers
9357 # there.  We might have to resort to AC_EGREP checks to make sure we found
9358 # the proper header...
9359   for ac_header in editline/readline.h
9360 do :
9361   ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
9362 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
9363   cat >>confdefs.h <<_ACEOF
9364 #define HAVE_EDITLINE_READLINE_H 1
9365 _ACEOF
9366
9367 else
9368   for ac_header in readline.h
9369 do :
9370   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
9371 if test "x$ac_cv_header_readline_h" = xyes; then :
9372   cat >>confdefs.h <<_ACEOF
9373 #define HAVE_READLINE_H 1
9374 _ACEOF
9375
9376 else
9377   for ac_header in readline/readline.h
9378 do :
9379   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
9380 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
9381   cat >>confdefs.h <<_ACEOF
9382 #define HAVE_READLINE_READLINE_H 1
9383 _ACEOF
9384
9385 else
9386   as_fn_error $? "readline header not found
9387 If you have libedit already installed, see config.log for details on the
9388 failure.  It is possible the compiler isn't looking in the proper directory.
9389 Use --without-readline to disable libedit support." "$LINENO" 5
9390 fi
9391
9392 done
9393
9394 fi
9395
9396 done
9397
9398 fi
9399
9400 done
9401
9402 # Note: in a libedit installation, history.h is sometimes a dummy, and may
9403 # not be there at all.  Hence, don't complain if not found.  We must check
9404 # though, since in yet other versions it is an independent header.
9405   for ac_header in editline/history.h
9406 do :
9407   ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
9408 if test "x$ac_cv_header_editline_history_h" = xyes; then :
9409   cat >>confdefs.h <<_ACEOF
9410 #define HAVE_EDITLINE_HISTORY_H 1
9411 _ACEOF
9412
9413 else
9414   for ac_header in history.h
9415 do :
9416   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
9417 if test "x$ac_cv_header_history_h" = xyes; then :
9418   cat >>confdefs.h <<_ACEOF
9419 #define HAVE_HISTORY_H 1
9420 _ACEOF
9421
9422 else
9423   for ac_header in readline/history.h
9424 do :
9425   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
9426 if test "x$ac_cv_header_readline_history_h" = xyes; then :
9427   cat >>confdefs.h <<_ACEOF
9428 #define HAVE_READLINE_HISTORY_H 1
9429 _ACEOF
9430
9431 fi
9432
9433 done
9434
9435 fi
9436
9437 done
9438
9439 fi
9440
9441 done
9442
9443 fi
9444
9445 if test "$with_zlib" = yes; then
9446   ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
9447 if test "x$ac_cv_header_zlib_h" = xyes; then :
9448
9449 else
9450   as_fn_error $? "zlib header not found
9451 If you have zlib already installed, see config.log for details on the
9452 failure.  It is possible the compiler isn't looking in the proper directory.
9453 Use --without-zlib to disable zlib support." "$LINENO" 5
9454 fi
9455
9456
9457 fi
9458
9459 if test "$with_gssapi" = yes ; then
9460   for ac_header in gssapi/gssapi.h
9461 do :
9462   ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
9463 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
9464   cat >>confdefs.h <<_ACEOF
9465 #define HAVE_GSSAPI_GSSAPI_H 1
9466 _ACEOF
9467
9468 else
9469   for ac_header in gssapi.h
9470 do :
9471   ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
9472 if test "x$ac_cv_header_gssapi_h" = xyes; then :
9473   cat >>confdefs.h <<_ACEOF
9474 #define HAVE_GSSAPI_H 1
9475 _ACEOF
9476
9477 else
9478   as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
9479 fi
9480
9481 done
9482
9483 fi
9484
9485 done
9486
9487 fi
9488
9489 if test "$with_openssl" = yes ; then
9490   ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
9491 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
9492
9493 else
9494   as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
9495 fi
9496
9497
9498   ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
9499 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
9500
9501 else
9502   as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
9503 fi
9504
9505
9506 fi
9507
9508 if test "$with_pam" = yes ; then
9509   for ac_header in security/pam_appl.h
9510 do :
9511   ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
9512 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
9513   cat >>confdefs.h <<_ACEOF
9514 #define HAVE_SECURITY_PAM_APPL_H 1
9515 _ACEOF
9516
9517 else
9518   for ac_header in pam/pam_appl.h
9519 do :
9520   ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
9521 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
9522   cat >>confdefs.h <<_ACEOF
9523 #define HAVE_PAM_PAM_APPL_H 1
9524 _ACEOF
9525
9526 else
9527   as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
9528 fi
9529
9530 done
9531
9532 fi
9533
9534 done
9535
9536 fi
9537
9538 if test "$with_libxml" = yes ; then
9539   ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
9540 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
9541
9542 else
9543   as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
9544 fi
9545
9546
9547 fi
9548
9549 if test "$with_libxslt" = yes ; then
9550   ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
9551 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
9552
9553 else
9554   as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
9555 fi
9556
9557
9558 fi
9559
9560 if test "$with_ldap" = yes ; then
9561   if test "$PORTNAME" != "win32"; then
9562      for ac_header in ldap.h
9563 do :
9564   ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
9565 if test "x$ac_cv_header_ldap_h" = xyes; then :
9566   cat >>confdefs.h <<_ACEOF
9567 #define HAVE_LDAP_H 1
9568 _ACEOF
9569
9570 else
9571   as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
9572 fi
9573
9574 done
9575
9576      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
9577 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
9578 if ${pgac_cv_ldap_safe+:} false; then :
9579   $as_echo_n "(cached) " >&6
9580 else
9581   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9582 /* end confdefs.h.  */
9583 #include <ldap.h>
9584 #if !defined(LDAP_VENDOR_VERSION) || \
9585      (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
9586       LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
9587 choke me
9588 #endif
9589 int
9590 main ()
9591 {
9592
9593   ;
9594   return 0;
9595 }
9596 _ACEOF
9597 if ac_fn_c_try_compile "$LINENO"; then :
9598   pgac_cv_ldap_safe=yes
9599 else
9600   pgac_cv_ldap_safe=no
9601 fi
9602 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9603 fi
9604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
9605 $as_echo "$pgac_cv_ldap_safe" >&6; }
9606
9607 if test "$pgac_cv_ldap_safe" != yes; then
9608   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9609 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
9610 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
9611 *** also uses LDAP will crash on exit." >&5
9612 $as_echo "$as_me: WARNING:
9613 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
9614 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
9615 *** also uses LDAP will crash on exit." >&2;}
9616 fi
9617   else
9618      for ac_header in winldap.h
9619 do :
9620   ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
9621 #include <windows.h>
9622
9623 "
9624 if test "x$ac_cv_header_winldap_h" = xyes; then :
9625   cat >>confdefs.h <<_ACEOF
9626 #define HAVE_WINLDAP_H 1
9627 _ACEOF
9628
9629 else
9630   as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
9631 fi
9632
9633 done
9634
9635   fi
9636 fi
9637
9638 if test "$with_bonjour" = yes ; then
9639   ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
9640 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
9641
9642 else
9643   as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
9644 fi
9645
9646
9647 fi
9648
9649 # for contrib/uuid-ossp
9650 if test "$with_uuid" = bsd ; then
9651   for ac_header in uuid.h
9652 do :
9653   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
9654 if test "x$ac_cv_header_uuid_h" = xyes; then :
9655   cat >>confdefs.h <<_ACEOF
9656 #define HAVE_UUID_H 1
9657 _ACEOF
9658  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9659 /* end confdefs.h.  */
9660 #include <uuid.h>
9661
9662 _ACEOF
9663 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9664   $EGREP "uuid_to_string" >/dev/null 2>&1; then :
9665
9666 else
9667   as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
9668 fi
9669 rm -f conftest*
9670
9671 else
9672   as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
9673 fi
9674
9675 done
9676
9677 elif test "$with_uuid" = e2fs ; then
9678   for ac_header in uuid/uuid.h
9679 do :
9680   ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
9681 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
9682   cat >>confdefs.h <<_ACEOF
9683 #define HAVE_UUID_UUID_H 1
9684 _ACEOF
9685  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9686 /* end confdefs.h.  */
9687 #include <uuid/uuid.h>
9688
9689 _ACEOF
9690 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9691   $EGREP "uuid_generate" >/dev/null 2>&1; then :
9692
9693 else
9694   as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
9695 fi
9696 rm -f conftest*
9697
9698 else
9699   for ac_header in uuid.h
9700 do :
9701   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
9702 if test "x$ac_cv_header_uuid_h" = xyes; then :
9703   cat >>confdefs.h <<_ACEOF
9704 #define HAVE_UUID_H 1
9705 _ACEOF
9706  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9707 /* end confdefs.h.  */
9708 #include <uuid.h>
9709
9710 _ACEOF
9711 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9712   $EGREP "uuid_generate" >/dev/null 2>&1; then :
9713
9714 else
9715   as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
9716 fi
9717 rm -f conftest*
9718
9719 else
9720   as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
9721 fi
9722
9723 done
9724
9725 fi
9726
9727 done
9728
9729 elif test "$with_uuid" = ossp ; then
9730   for ac_header in ossp/uuid.h
9731 do :
9732   ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
9733 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
9734   cat >>confdefs.h <<_ACEOF
9735 #define HAVE_OSSP_UUID_H 1
9736 _ACEOF
9737  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9738 /* end confdefs.h.  */
9739 #include <ossp/uuid.h>
9740
9741 _ACEOF
9742 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9743   $EGREP "uuid_export" >/dev/null 2>&1; then :
9744
9745 else
9746   as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
9747 fi
9748 rm -f conftest*
9749
9750 else
9751   for ac_header in uuid.h
9752 do :
9753   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
9754 if test "x$ac_cv_header_uuid_h" = xyes; then :
9755   cat >>confdefs.h <<_ACEOF
9756 #define HAVE_UUID_H 1
9757 _ACEOF
9758  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9759 /* end confdefs.h.  */
9760 #include <uuid.h>
9761
9762 _ACEOF
9763 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9764   $EGREP "uuid_export" >/dev/null 2>&1; then :
9765
9766 else
9767   as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
9768 fi
9769 rm -f conftest*
9770
9771 else
9772   as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
9773 fi
9774
9775 done
9776
9777 fi
9778
9779 done
9780
9781 fi
9782
9783 if test "$PORTNAME" = "win32" ; then
9784    for ac_header in crtdefs.h
9785 do :
9786   ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
9787 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
9788   cat >>confdefs.h <<_ACEOF
9789 #define HAVE_CRTDEFS_H 1
9790 _ACEOF
9791
9792 fi
9793
9794 done
9795
9796 fi
9797
9798 ##
9799 ## Types, structures, compiler characteristics
9800 ##
9801
9802   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
9803 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
9804 if ${ac_cv_c_bigendian+:} false; then :
9805   $as_echo_n "(cached) " >&6
9806 else
9807   ac_cv_c_bigendian=unknown
9808     # See if we're dealing with a universal compiler.
9809     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9810 /* end confdefs.h.  */
9811 #ifndef __APPLE_CC__
9812                not a universal capable compiler
9813              #endif
9814              typedef int dummy;
9815
9816 _ACEOF
9817 if ac_fn_c_try_compile "$LINENO"; then :
9818
9819         # Check for potential -arch flags.  It is not universal unless
9820         # there are at least two -arch flags with different values.
9821         ac_arch=
9822         ac_prev=
9823         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
9824          if test -n "$ac_prev"; then
9825            case $ac_word in
9826              i?86 | x86_64 | ppc | ppc64)
9827                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
9828                  ac_arch=$ac_word
9829                else
9830                  ac_cv_c_bigendian=universal
9831                  break
9832                fi
9833                ;;
9834            esac
9835            ac_prev=
9836          elif test "x$ac_word" = "x-arch"; then
9837            ac_prev=arch
9838          fi
9839        done
9840 fi
9841 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9842     if test $ac_cv_c_bigendian = unknown; then
9843       # See if sys/param.h defines the BYTE_ORDER macro.
9844       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9845 /* end confdefs.h.  */
9846 #include <sys/types.h>
9847              #include <sys/param.h>
9848
9849 int
9850 main ()
9851 {
9852 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
9853                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
9854                      && LITTLE_ENDIAN)
9855               bogus endian macros
9856              #endif
9857
9858   ;
9859   return 0;
9860 }
9861 _ACEOF
9862 if ac_fn_c_try_compile "$LINENO"; then :
9863   # It does; now see whether it defined to BIG_ENDIAN or not.
9864          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9865 /* end confdefs.h.  */
9866 #include <sys/types.h>
9867                 #include <sys/param.h>
9868
9869 int
9870 main ()
9871 {
9872 #if BYTE_ORDER != BIG_ENDIAN
9873                  not big endian
9874                 #endif
9875
9876   ;
9877   return 0;
9878 }
9879 _ACEOF
9880 if ac_fn_c_try_compile "$LINENO"; then :
9881   ac_cv_c_bigendian=yes
9882 else
9883   ac_cv_c_bigendian=no
9884 fi
9885 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9886 fi
9887 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9888     fi
9889     if test $ac_cv_c_bigendian = unknown; then
9890       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
9891       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9892 /* end confdefs.h.  */
9893 #include <limits.h>
9894
9895 int
9896 main ()
9897 {
9898 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
9899               bogus endian macros
9900              #endif
9901
9902   ;
9903   return 0;
9904 }
9905 _ACEOF
9906 if ac_fn_c_try_compile "$LINENO"; then :
9907   # It does; now see whether it defined to _BIG_ENDIAN or not.
9908          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9909 /* end confdefs.h.  */
9910 #include <limits.h>
9911
9912 int
9913 main ()
9914 {
9915 #ifndef _BIG_ENDIAN
9916                  not big endian
9917                 #endif
9918
9919   ;
9920   return 0;
9921 }
9922 _ACEOF
9923 if ac_fn_c_try_compile "$LINENO"; then :
9924   ac_cv_c_bigendian=yes
9925 else
9926   ac_cv_c_bigendian=no
9927 fi
9928 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9929 fi
9930 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9931     fi
9932     if test $ac_cv_c_bigendian = unknown; then
9933       # Compile a test program.
9934       if test "$cross_compiling" = yes; then :
9935   # Try to guess by grepping values from an object file.
9936          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9937 /* end confdefs.h.  */
9938 short int ascii_mm[] =
9939                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
9940                 short int ascii_ii[] =
9941                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9942                 int use_ascii (int i) {
9943                   return ascii_mm[i] + ascii_ii[i];
9944                 }
9945                 short int ebcdic_ii[] =
9946                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
9947                 short int ebcdic_mm[] =
9948                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9949                 int use_ebcdic (int i) {
9950                   return ebcdic_mm[i] + ebcdic_ii[i];
9951                 }
9952                 extern int foo;
9953
9954 int
9955 main ()
9956 {
9957 return use_ascii (foo) == use_ebcdic (foo);
9958   ;
9959   return 0;
9960 }
9961 _ACEOF
9962 if ac_fn_c_try_compile "$LINENO"; then :
9963   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
9964               ac_cv_c_bigendian=yes
9965             fi
9966             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
9967               if test "$ac_cv_c_bigendian" = unknown; then
9968                 ac_cv_c_bigendian=no
9969               else
9970                 # finding both strings is unlikely to happen, but who knows?
9971                 ac_cv_c_bigendian=unknown
9972               fi
9973             fi
9974 fi
9975 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9976 else
9977   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9978 /* end confdefs.h.  */
9979 $ac_includes_default
9980 int
9981 main ()
9982 {
9983
9984              /* Are we little or big endian?  From Harbison&Steele.  */
9985              union
9986              {
9987                long int l;
9988                char c[sizeof (long int)];
9989              } u;
9990              u.l = 1;
9991              return u.c[sizeof (long int) - 1] == 1;
9992
9993   ;
9994   return 0;
9995 }
9996 _ACEOF
9997 if ac_fn_c_try_run "$LINENO"; then :
9998   ac_cv_c_bigendian=no
9999 else
10000   ac_cv_c_bigendian=yes
10001 fi
10002 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10003   conftest.$ac_objext conftest.beam conftest.$ac_ext
10004 fi
10005
10006     fi
10007 fi
10008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
10009 $as_echo "$ac_cv_c_bigendian" >&6; }
10010  case $ac_cv_c_bigendian in #(
10011    yes)
10012      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
10013 ;; #(
10014    no)
10015       ;; #(
10016    universal)
10017
10018 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
10019
10020      ;; #(
10021    *)
10022      as_fn_error $? "unknown endianness
10023  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
10024  esac
10025
10026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
10027 $as_echo_n "checking for inline... " >&6; }
10028 if ${ac_cv_c_inline+:} false; then :
10029   $as_echo_n "(cached) " >&6
10030 else
10031   ac_cv_c_inline=no
10032 for ac_kw in inline __inline__ __inline; do
10033   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10034 /* end confdefs.h.  */
10035 #ifndef __cplusplus
10036 typedef int foo_t;
10037 static $ac_kw foo_t static_foo () {return 0; }
10038 $ac_kw foo_t foo () {return 0; }
10039 #endif
10040
10041 _ACEOF
10042 if ac_fn_c_try_compile "$LINENO"; then :
10043   ac_cv_c_inline=$ac_kw
10044 fi
10045 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10046   test "$ac_cv_c_inline" != no && break
10047 done
10048
10049 fi
10050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
10051 $as_echo "$ac_cv_c_inline" >&6; }
10052
10053 case $ac_cv_c_inline in
10054   inline | yes) ;;
10055   *)
10056     case $ac_cv_c_inline in
10057       no) ac_val=;;
10058       *) ac_val=$ac_cv_c_inline;;
10059     esac
10060     cat >>confdefs.h <<_ACEOF
10061 #ifndef __cplusplus
10062 #define inline $ac_val
10063 #endif
10064 _ACEOF
10065     ;;
10066 esac
10067
10068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for quiet inline (no complaint if unreferenced)" >&5
10069 $as_echo_n "checking for quiet inline (no complaint if unreferenced)... " >&6; }
10070 if ${pgac_cv_c_inline_quietly+:} false; then :
10071   $as_echo_n "(cached) " >&6
10072 else
10073   pgac_cv_c_inline_quietly=no
10074   if test "$ac_cv_c_inline" != no; then
10075     pgac_c_inline_save_werror=$ac_c_werror_flag
10076     ac_c_werror_flag=yes
10077     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10078 /* end confdefs.h.  */
10079 #include "$srcdir/config/test_quiet_include.h"
10080 int
10081 main ()
10082 {
10083
10084   ;
10085   return 0;
10086 }
10087 _ACEOF
10088 if ac_fn_c_try_link "$LINENO"; then :
10089   pgac_cv_c_inline_quietly=yes
10090 fi
10091 rm -f core conftest.err conftest.$ac_objext \
10092     conftest$ac_exeext conftest.$ac_ext
10093     ac_c_werror_flag=$pgac_c_inline_save_werror
10094   fi
10095 fi
10096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_inline_quietly" >&5
10097 $as_echo "$pgac_cv_c_inline_quietly" >&6; }
10098 if test "$pgac_cv_c_inline_quietly" != no; then
10099
10100 cat >>confdefs.h <<_ACEOF
10101 #define PG_USE_INLINE 1
10102 _ACEOF
10103
10104 fi
10105
10106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
10107 $as_echo_n "checking for printf format archetype... " >&6; }
10108 if ${pgac_cv_printf_archetype+:} false; then :
10109   $as_echo_n "(cached) " >&6
10110 else
10111   ac_save_c_werror_flag=$ac_c_werror_flag
10112 ac_c_werror_flag=yes
10113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10114 /* end confdefs.h.  */
10115 extern int
10116 pgac_write(int ignore, const char *fmt,...)
10117 __attribute__((format(gnu_printf, 2, 3)));
10118 int
10119 main ()
10120 {
10121
10122   ;
10123   return 0;
10124 }
10125 _ACEOF
10126 if ac_fn_c_try_compile "$LINENO"; then :
10127   pgac_cv_printf_archetype=gnu_printf
10128 else
10129   pgac_cv_printf_archetype=printf
10130 fi
10131 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10132 ac_c_werror_flag=$ac_save_c_werror_flag
10133 fi
10134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
10135 $as_echo "$pgac_cv_printf_archetype" >&6; }
10136
10137 cat >>confdefs.h <<_ACEOF
10138 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
10139 _ACEOF
10140
10141
10142
10143   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array members" >&5
10144 $as_echo_n "checking for flexible array members... " >&6; }
10145 if ${ac_cv_c_flexmember+:} false; then :
10146   $as_echo_n "(cached) " >&6
10147 else
10148   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10149 /* end confdefs.h.  */
10150 #include <stdlib.h>
10151             #include <stdio.h>
10152             #include <stddef.h>
10153             struct s { int n; double d[]; };
10154 int
10155 main ()
10156 {
10157 int m = getchar ();
10158             struct s *p = malloc (offsetof (struct s, d)
10159                                   + m * sizeof (double));
10160             p->d[0] = 0.0;
10161             return p->d != (double *) NULL;
10162   ;
10163   return 0;
10164 }
10165 _ACEOF
10166 if ac_fn_c_try_compile "$LINENO"; then :
10167   ac_cv_c_flexmember=yes
10168 else
10169   ac_cv_c_flexmember=no
10170 fi
10171 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10172 fi
10173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
10174 $as_echo "$ac_cv_c_flexmember" >&6; }
10175   if test $ac_cv_c_flexmember = yes; then
10176
10177 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
10178
10179   else
10180     $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
10181
10182   fi
10183
10184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed types" >&5
10185 $as_echo_n "checking for signed types... " >&6; }
10186 if ${pgac_cv_c_signed+:} false; then :
10187   $as_echo_n "(cached) " >&6
10188 else
10189   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10190 /* end confdefs.h.  */
10191
10192 int
10193 main ()
10194 {
10195 signed char c; signed short s; signed int i;
10196   ;
10197   return 0;
10198 }
10199 _ACEOF
10200 if ac_fn_c_try_compile "$LINENO"; then :
10201   pgac_cv_c_signed=yes
10202 else
10203   pgac_cv_c_signed=no
10204 fi
10205 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10206 fi
10207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_signed" >&5
10208 $as_echo "$pgac_cv_c_signed" >&6; }
10209 if test x"$pgac_cv_c_signed" = xno ; then
10210
10211 $as_echo "#define signed /**/" >>confdefs.h
10212
10213 fi
10214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5
10215 $as_echo_n "checking for __func__... " >&6; }
10216 if ${pgac_cv_funcname_func_support+:} false; then :
10217   $as_echo_n "(cached) " >&6
10218 else
10219   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10220 /* end confdefs.h.  */
10221 #include <stdio.h>
10222 int
10223 main ()
10224 {
10225 printf("%s\n", __func__);
10226   ;
10227   return 0;
10228 }
10229 _ACEOF
10230 if ac_fn_c_try_compile "$LINENO"; then :
10231   pgac_cv_funcname_func_support=yes
10232 else
10233   pgac_cv_funcname_func_support=no
10234 fi
10235 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10236 fi
10237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_func_support" >&5
10238 $as_echo "$pgac_cv_funcname_func_support" >&6; }
10239 if test x"$pgac_cv_funcname_func_support" = xyes ; then
10240
10241 $as_echo "#define HAVE_FUNCNAME__FUNC 1" >>confdefs.h
10242
10243 else
10244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__" >&5
10245 $as_echo_n "checking for __FUNCTION__... " >&6; }
10246 if ${pgac_cv_funcname_function_support+:} false; then :
10247   $as_echo_n "(cached) " >&6
10248 else
10249   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10250 /* end confdefs.h.  */
10251 #include <stdio.h>
10252 int
10253 main ()
10254 {
10255 printf("%s\n", __FUNCTION__);
10256   ;
10257   return 0;
10258 }
10259 _ACEOF
10260 if ac_fn_c_try_compile "$LINENO"; then :
10261   pgac_cv_funcname_function_support=yes
10262 else
10263   pgac_cv_funcname_function_support=no
10264 fi
10265 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10266 fi
10267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_function_support" >&5
10268 $as_echo "$pgac_cv_funcname_function_support" >&6; }
10269 if test x"$pgac_cv_funcname_function_support" = xyes ; then
10270
10271 $as_echo "#define HAVE_FUNCNAME__FUNCTION 1" >>confdefs.h
10272
10273 fi
10274 fi
10275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
10276 $as_echo_n "checking for _Static_assert... " >&6; }
10277 if ${pgac_cv__static_assert+:} false; then :
10278   $as_echo_n "(cached) " >&6
10279 else
10280   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10281 /* end confdefs.h.  */
10282
10283 int
10284 main ()
10285 {
10286 ({ _Static_assert(1, "foo"); })
10287   ;
10288   return 0;
10289 }
10290 _ACEOF
10291 if ac_fn_c_try_link "$LINENO"; then :
10292   pgac_cv__static_assert=yes
10293 else
10294   pgac_cv__static_assert=no
10295 fi
10296 rm -f core conftest.err conftest.$ac_objext \
10297     conftest$ac_exeext conftest.$ac_ext
10298 fi
10299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
10300 $as_echo "$pgac_cv__static_assert" >&6; }
10301 if test x"$pgac_cv__static_assert" = xyes ; then
10302
10303 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
10304
10305 fi
10306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
10307 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
10308 if ${pgac_cv__types_compatible+:} false; then :
10309   $as_echo_n "(cached) " >&6
10310 else
10311   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10312 /* end confdefs.h.  */
10313
10314 int
10315 main ()
10316 {
10317  int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
10318   ;
10319   return 0;
10320 }
10321 _ACEOF
10322 if ac_fn_c_try_compile "$LINENO"; then :
10323   pgac_cv__types_compatible=yes
10324 else
10325   pgac_cv__types_compatible=no
10326 fi
10327 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10328 fi
10329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
10330 $as_echo "$pgac_cv__types_compatible" >&6; }
10331 if test x"$pgac_cv__types_compatible" = xyes ; then
10332
10333 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
10334
10335 fi
10336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
10337 $as_echo_n "checking for __builtin_bswap32... " >&6; }
10338 if ${pgac_cv__builtin_bswap32+:} false; then :
10339   $as_echo_n "(cached) " >&6
10340 else
10341   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10342 /* end confdefs.h.  */
10343 static unsigned long int x = __builtin_bswap32(0xaabbccdd);
10344 int
10345 main ()
10346 {
10347
10348   ;
10349   return 0;
10350 }
10351 _ACEOF
10352 if ac_fn_c_try_compile "$LINENO"; then :
10353   pgac_cv__builtin_bswap32=yes
10354 else
10355   pgac_cv__builtin_bswap32=no
10356 fi
10357 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10358 fi
10359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
10360 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
10361 if test x"$pgac_cv__builtin_bswap32" = xyes ; then
10362
10363 $as_echo "#define HAVE__BUILTIN_BSWAP32 1" >>confdefs.h
10364
10365 fi
10366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
10367 $as_echo_n "checking for __builtin_constant_p... " >&6; }
10368 if ${pgac_cv__builtin_constant_p+:} false; then :
10369   $as_echo_n "(cached) " >&6
10370 else
10371   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10372 /* end confdefs.h.  */
10373 static int x; static int y[__builtin_constant_p(x) ? x : 1];
10374 int
10375 main ()
10376 {
10377
10378   ;
10379   return 0;
10380 }
10381 _ACEOF
10382 if ac_fn_c_try_compile "$LINENO"; then :
10383   pgac_cv__builtin_constant_p=yes
10384 else
10385   pgac_cv__builtin_constant_p=no
10386 fi
10387 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10388 fi
10389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
10390 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
10391 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
10392
10393 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
10394
10395 fi
10396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
10397 $as_echo_n "checking for __builtin_unreachable... " >&6; }
10398 if ${pgac_cv__builtin_unreachable+:} false; then :
10399   $as_echo_n "(cached) " >&6
10400 else
10401   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10402 /* end confdefs.h.  */
10403
10404 int
10405 main ()
10406 {
10407 __builtin_unreachable();
10408   ;
10409   return 0;
10410 }
10411 _ACEOF
10412 if ac_fn_c_try_link "$LINENO"; then :
10413   pgac_cv__builtin_unreachable=yes
10414 else
10415   pgac_cv__builtin_unreachable=no
10416 fi
10417 rm -f core conftest.err conftest.$ac_objext \
10418     conftest$ac_exeext conftest.$ac_ext
10419 fi
10420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
10421 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
10422 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
10423
10424 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
10425
10426 fi
10427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __VA_ARGS__" >&5
10428 $as_echo_n "checking for __VA_ARGS__... " >&6; }
10429 if ${pgac_cv__va_args+:} false; then :
10430   $as_echo_n "(cached) " >&6
10431 else
10432   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10433 /* end confdefs.h.  */
10434 #include <stdio.h>
10435 int
10436 main ()
10437 {
10438 #define debug(...) fprintf(stderr, __VA_ARGS__)
10439 debug("%s", "blarg");
10440
10441   ;
10442   return 0;
10443 }
10444 _ACEOF
10445 if ac_fn_c_try_compile "$LINENO"; then :
10446   pgac_cv__va_args=yes
10447 else
10448   pgac_cv__va_args=no
10449 fi
10450 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10451 fi
10452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__va_args" >&5
10453 $as_echo "$pgac_cv__va_args" >&6; }
10454 if test x"$pgac_cv__va_args" = xyes ; then
10455
10456 $as_echo "#define HAVE__VA_ARGS 1" >>confdefs.h
10457
10458 fi
10459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10460 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
10461 if ${ac_cv_struct_tm+:} false; then :
10462   $as_echo_n "(cached) " >&6
10463 else
10464   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10465 /* end confdefs.h.  */
10466 #include <sys/types.h>
10467 #include <time.h>
10468
10469 int
10470 main ()
10471 {
10472 struct tm tm;
10473                                      int *p = &tm.tm_sec;
10474                                      return !p;
10475   ;
10476   return 0;
10477 }
10478 _ACEOF
10479 if ac_fn_c_try_compile "$LINENO"; then :
10480   ac_cv_struct_tm=time.h
10481 else
10482   ac_cv_struct_tm=sys/time.h
10483 fi
10484 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10485 fi
10486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10487 $as_echo "$ac_cv_struct_tm" >&6; }
10488 if test $ac_cv_struct_tm = sys/time.h; then
10489
10490 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
10491
10492 fi
10493
10494 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
10495 #include <$ac_cv_struct_tm>
10496
10497 "
10498 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
10499
10500 cat >>confdefs.h <<_ACEOF
10501 #define HAVE_STRUCT_TM_TM_ZONE 1
10502 _ACEOF
10503
10504
10505 fi
10506
10507 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10508
10509 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
10510
10511 fi
10512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10513 $as_echo_n "checking for tzname... " >&6; }
10514 if ${ac_cv_var_tzname+:} false; then :
10515   $as_echo_n "(cached) " >&6
10516 else
10517   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10518 /* end confdefs.h.  */
10519 #include <time.h>
10520 #ifndef tzname /* For SGI.  */
10521 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
10522 #endif
10523
10524 int
10525 main ()
10526 {
10527 atoi(*tzname);
10528   ;
10529   return 0;
10530 }
10531 _ACEOF
10532 if ac_fn_c_try_link "$LINENO"; then :
10533   ac_cv_var_tzname=yes
10534 else
10535   ac_cv_var_tzname=no
10536 fi
10537 rm -f core conftest.err conftest.$ac_objext \
10538     conftest$ac_exeext conftest.$ac_ext
10539 fi
10540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10541 $as_echo "$ac_cv_var_tzname" >&6; }
10542 if test $ac_cv_var_tzname = yes; then
10543
10544 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
10545
10546 fi
10547
10548 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
10549 #include <sys/ipc.h>
10550 #include <sys/sem.h>
10551 "
10552 if test "x$ac_cv_type_union_semun" = xyes; then :
10553
10554 cat >>confdefs.h <<_ACEOF
10555 #define HAVE_UNION_SEMUN 1
10556 _ACEOF
10557
10558
10559 fi
10560
10561 ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
10562 #ifdef HAVE_SYS_UN_H
10563 #include <sys/un.h>
10564 #endif
10565
10566 "
10567 if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
10568
10569 $as_echo "#define HAVE_UNIX_SOCKETS 1" >>confdefs.h
10570
10571 fi
10572
10573 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
10574 #ifdef HAVE_SYS_SOCKET_H
10575 #include <sys/socket.h>
10576 #endif
10577
10578 "
10579 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
10580
10581 cat >>confdefs.h <<_ACEOF
10582 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
10583 _ACEOF
10584
10585
10586 fi
10587
10588 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
10589 #ifdef HAVE_SYS_SOCKET_H
10590 #include <sys/socket.h>
10591 #endif
10592
10593 "
10594 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
10595
10596 cat >>confdefs.h <<_ACEOF
10597 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
10598 _ACEOF
10599
10600
10601 fi
10602 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
10603 #ifdef HAVE_SYS_SOCKET_H
10604 #include <sys/socket.h>
10605 #endif
10606
10607 "
10608 if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
10609
10610 cat >>confdefs.h <<_ACEOF
10611 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
10612 _ACEOF
10613
10614
10615 fi
10616 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
10617 #ifdef HAVE_SYS_SOCKET_H
10618 #include <sys/socket.h>
10619 #endif
10620
10621 "
10622 if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
10623
10624 cat >>confdefs.h <<_ACEOF
10625 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
10626 _ACEOF
10627
10628
10629 fi
10630 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
10631 #ifdef HAVE_SYS_SOCKET_H
10632 #include <sys/socket.h>
10633 #endif
10634
10635 "
10636 if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
10637
10638 cat >>confdefs.h <<_ACEOF
10639 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
10640 _ACEOF
10641
10642
10643 fi
10644 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
10645 #ifdef HAVE_SYS_SOCKET_H
10646 #include <sys/socket.h>
10647 #endif
10648
10649 "
10650 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
10651
10652 cat >>confdefs.h <<_ACEOF
10653 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
10654 _ACEOF
10655
10656
10657 fi
10658
10659 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include <sys/types.h>
10660 #include <sys/socket.h>
10661 #include <netdb.h>
10662
10663 "
10664 if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
10665
10666 cat >>confdefs.h <<_ACEOF
10667 #define HAVE_STRUCT_ADDRINFO 1
10668 _ACEOF
10669
10670
10671 fi
10672
10673
10674   ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
10675 if test "x$ac_cv_type_intptr_t" = xyes; then :
10676
10677 $as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
10678
10679 else
10680   for ac_type in 'int' 'long int' 'long long int'; do
10681        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10682 /* end confdefs.h.  */
10683 $ac_includes_default
10684 int
10685 main ()
10686 {
10687 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
10688 test_array [0] = 0;
10689 return test_array [0];
10690
10691   ;
10692   return 0;
10693 }
10694 _ACEOF
10695 if ac_fn_c_try_compile "$LINENO"; then :
10696
10697 cat >>confdefs.h <<_ACEOF
10698 #define intptr_t $ac_type
10699 _ACEOF
10700
10701           ac_type=
10702 fi
10703 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10704        test -z "$ac_type" && break
10705      done
10706 fi
10707
10708
10709
10710   ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
10711 if test "x$ac_cv_type_uintptr_t" = xyes; then :
10712
10713 $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
10714
10715 else
10716   for ac_type in 'unsigned int' 'unsigned long int' \
10717         'unsigned long long int'; do
10718        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10719 /* end confdefs.h.  */
10720 $ac_includes_default
10721 int
10722 main ()
10723 {
10724 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
10725 test_array [0] = 0;
10726 return test_array [0];
10727
10728   ;
10729   return 0;
10730 }
10731 _ACEOF
10732 if ac_fn_c_try_compile "$LINENO"; then :
10733
10734 cat >>confdefs.h <<_ACEOF
10735 #define uintptr_t $ac_type
10736 _ACEOF
10737
10738           ac_type=
10739 fi
10740 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10741        test -z "$ac_type" && break
10742      done
10743 fi
10744
10745
10746
10747   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
10748 $as_echo_n "checking for unsigned long long int... " >&6; }
10749 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
10750   $as_echo_n "(cached) " >&6
10751 else
10752   ac_cv_type_unsigned_long_long_int=yes
10753      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
10754        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10755 /* end confdefs.h.  */
10756
10757   /* For now, do not test the preprocessor; as of 2007 there are too many
10758          implementations with broken preprocessors.  Perhaps this can
10759          be revisited in 2012.  In the meantime, code should not expect
10760          #if to work with literals wider than 32 bits.  */
10761       /* Test literals.  */
10762       long long int ll = 9223372036854775807ll;
10763       long long int nll = -9223372036854775807LL;
10764       unsigned long long int ull = 18446744073709551615ULL;
10765       /* Test constant expressions.   */
10766       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
10767                      ? 1 : -1)];
10768       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
10769                      ? 1 : -1)];
10770       int i = 63;
10771 int
10772 main ()
10773 {
10774 /* Test availability of runtime routines for shift and division.  */
10775       long long int llmax = 9223372036854775807ll;
10776       unsigned long long int ullmax = 18446744073709551615ull;
10777       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
10778               | (llmax / ll) | (llmax % ll)
10779               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
10780               | (ullmax / ull) | (ullmax % ull));
10781   ;
10782   return 0;
10783 }
10784
10785 _ACEOF
10786 if ac_fn_c_try_link "$LINENO"; then :
10787
10788 else
10789   ac_cv_type_unsigned_long_long_int=no
10790 fi
10791 rm -f core conftest.err conftest.$ac_objext \
10792     conftest$ac_exeext conftest.$ac_ext
10793      fi
10794 fi
10795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
10796 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
10797   if test $ac_cv_type_unsigned_long_long_int = yes; then
10798
10799 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
10800
10801   fi
10802
10803
10804
10805   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
10806 $as_echo_n "checking for long long int... " >&6; }
10807 if ${ac_cv_type_long_long_int+:} false; then :
10808   $as_echo_n "(cached) " >&6
10809 else
10810   ac_cv_type_long_long_int=yes
10811       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
10812         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
10813         if test $ac_cv_type_long_long_int = yes; then
10814                                   if test "$cross_compiling" = yes; then :
10815   :
10816 else
10817   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10818 /* end confdefs.h.  */
10819 #include <limits.h>
10820                  #ifndef LLONG_MAX
10821                  # define HALF \
10822                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
10823                  # define LLONG_MAX (HALF - 1 + HALF)
10824                  #endif
10825 int
10826 main ()
10827 {
10828 long long int n = 1;
10829                  int i;
10830                  for (i = 0; ; i++)
10831                    {
10832                      long long int m = n << i;
10833                      if (m >> i != n)
10834                        return 1;
10835                      if (LLONG_MAX / 2 < m)
10836                        break;
10837                    }
10838                  return 0;
10839   ;
10840   return 0;
10841 }
10842 _ACEOF
10843 if ac_fn_c_try_run "$LINENO"; then :
10844
10845 else
10846   ac_cv_type_long_long_int=no
10847 fi
10848 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10849   conftest.$ac_objext conftest.beam conftest.$ac_ext
10850 fi
10851
10852         fi
10853       fi
10854 fi
10855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
10856 $as_echo "$ac_cv_type_long_long_int" >&6; }
10857   if test $ac_cv_type_long_long_int = yes; then
10858
10859 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
10860
10861   fi
10862
10863
10864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
10865 $as_echo_n "checking for locale_t... " >&6; }
10866 if ${pgac_cv_type_locale_t+:} false; then :
10867   $as_echo_n "(cached) " >&6
10868 else
10869   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10870 /* end confdefs.h.  */
10871 #include <locale.h>
10872 locale_t x;
10873 int
10874 main ()
10875 {
10876
10877   ;
10878   return 0;
10879 }
10880 _ACEOF
10881 if ac_fn_c_try_compile "$LINENO"; then :
10882   pgac_cv_type_locale_t=yes
10883 else
10884   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10885 /* end confdefs.h.  */
10886 #include <xlocale.h>
10887 locale_t x;
10888 int
10889 main ()
10890 {
10891
10892   ;
10893   return 0;
10894 }
10895 _ACEOF
10896 if ac_fn_c_try_compile "$LINENO"; then :
10897   pgac_cv_type_locale_t='yes (in xlocale.h)'
10898 else
10899   pgac_cv_type_locale_t=no
10900 fi
10901 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10902 fi
10903 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10904 fi
10905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
10906 $as_echo "$pgac_cv_type_locale_t" >&6; }
10907 if test "$pgac_cv_type_locale_t" != no; then
10908
10909 $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
10910
10911 fi
10912 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
10913
10914 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
10915
10916 fi
10917
10918 ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
10919 #include <sys/param.h>
10920 #ifdef HAVE_SYS_UCRED_H
10921 #include <sys/ucred.h>
10922 #endif
10923 "
10924 if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
10925
10926 cat >>confdefs.h <<_ACEOF
10927 #define HAVE_STRUCT_CMSGCRED 1
10928 _ACEOF
10929
10930
10931 fi
10932
10933
10934 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
10935 #include <getopt.h>
10936 #endif
10937 "
10938 if test "x$ac_cv_type_struct_option" = xyes; then :
10939
10940 cat >>confdefs.h <<_ACEOF
10941 #define HAVE_STRUCT_OPTION 1
10942 _ACEOF
10943
10944
10945 fi
10946
10947
10948 if test "$with_zlib" = yes; then
10949   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
10950   # did not).  While we could work around the lack of z_streamp, it
10951   # seems unwise to encourage people to use such old zlib versions...
10952   ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
10953 "
10954 if test "x$ac_cv_type_z_streamp" = xyes; then :
10955
10956 else
10957   as_fn_error $? "zlib version is too old
10958 Use --without-zlib to disable zlib support." "$LINENO" 5
10959 fi
10960
10961 fi
10962
10963 # On PPC, check if assembler supports LWARX instruction's mutex hint bit
10964 case $host_cpu in
10965   ppc*|powerpc*)
10966     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports lwarx hint bit" >&5
10967 $as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
10968     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10969 /* end confdefs.h.  */
10970
10971 int
10972 main ()
10973 {
10974 int a = 0; int *p = &a; int r;
10975          __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
10976   ;
10977   return 0;
10978 }
10979 _ACEOF
10980 if ac_fn_c_try_compile "$LINENO"; then :
10981   pgac_cv_have_ppc_mutex_hint=yes
10982 else
10983   pgac_cv_have_ppc_mutex_hint=no
10984 fi
10985 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10986     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_ppc_mutex_hint" >&5
10987 $as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
10988     if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
10989
10990 $as_echo "#define HAVE_PPC_LWARX_MUTEX_HINT 1" >>confdefs.h
10991
10992     fi
10993   ;;
10994 esac
10995
10996 # Check largefile support.  You might think this is a system service not a
10997 # compiler characteristic, but you'd be wrong.  We must check this before
10998 # probing existence of related functions such as fseeko, since the largefile
10999 # defines can affect what is generated for that.
11000 if test "$PORTNAME" != "win32"; then
11001    # Check whether --enable-largefile was given.
11002 if test "${enable_largefile+set}" = set; then :
11003   enableval=$enable_largefile;
11004 fi
11005
11006 if test "$enable_largefile" != no; then
11007
11008   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
11009 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
11010 if ${ac_cv_sys_largefile_CC+:} false; then :
11011   $as_echo_n "(cached) " >&6
11012 else
11013   ac_cv_sys_largefile_CC=no
11014      if test "$GCC" != yes; then
11015        ac_save_CC=$CC
11016        while :; do
11017          # IRIX 6.2 and later do not support large files by default,
11018          # so use the C compiler's -n32 option if that helps.
11019          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11020 /* end confdefs.h.  */
11021 #include <sys/types.h>
11022  /* Check that off_t can represent 2**63 - 1 correctly.
11023     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11024     since some C++ compilers masquerading as C compilers
11025     incorrectly reject 9223372036854775807.  */
11026 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11027   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11028                        && LARGE_OFF_T % 2147483647 == 1)
11029                       ? 1 : -1];
11030 int
11031 main ()
11032 {
11033
11034   ;
11035   return 0;
11036 }
11037 _ACEOF
11038          if ac_fn_c_try_compile "$LINENO"; then :
11039   break
11040 fi
11041 rm -f core conftest.err conftest.$ac_objext
11042          CC="$CC -n32"
11043          if ac_fn_c_try_compile "$LINENO"; then :
11044   ac_cv_sys_largefile_CC=' -n32'; break
11045 fi
11046 rm -f core conftest.err conftest.$ac_objext
11047          break
11048        done
11049        CC=$ac_save_CC
11050        rm -f conftest.$ac_ext
11051     fi
11052 fi
11053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
11054 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
11055   if test "$ac_cv_sys_largefile_CC" != no; then
11056     CC=$CC$ac_cv_sys_largefile_CC
11057   fi
11058
11059   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
11060 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
11061 if ${ac_cv_sys_file_offset_bits+:} false; then :
11062   $as_echo_n "(cached) " >&6
11063 else
11064   while :; do
11065   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11066 /* end confdefs.h.  */
11067 #include <sys/types.h>
11068  /* Check that off_t can represent 2**63 - 1 correctly.
11069     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11070     since some C++ compilers masquerading as C compilers
11071     incorrectly reject 9223372036854775807.  */
11072 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11073   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11074                        && LARGE_OFF_T % 2147483647 == 1)
11075                       ? 1 : -1];
11076 int
11077 main ()
11078 {
11079
11080   ;
11081   return 0;
11082 }
11083 _ACEOF
11084 if ac_fn_c_try_compile "$LINENO"; then :
11085   ac_cv_sys_file_offset_bits=no; break
11086 fi
11087 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11088   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11089 /* end confdefs.h.  */
11090 #define _FILE_OFFSET_BITS 64
11091 #include <sys/types.h>
11092  /* Check that off_t can represent 2**63 - 1 correctly.
11093     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11094     since some C++ compilers masquerading as C compilers
11095     incorrectly reject 9223372036854775807.  */
11096 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11097   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11098                        && LARGE_OFF_T % 2147483647 == 1)
11099                       ? 1 : -1];
11100 int
11101 main ()
11102 {
11103
11104   ;
11105   return 0;
11106 }
11107 _ACEOF
11108 if ac_fn_c_try_compile "$LINENO"; then :
11109   ac_cv_sys_file_offset_bits=64; break
11110 fi
11111 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11112   ac_cv_sys_file_offset_bits=unknown
11113   break
11114 done
11115 fi
11116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
11117 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
11118 case $ac_cv_sys_file_offset_bits in #(
11119   no | unknown) ;;
11120   *)
11121 cat >>confdefs.h <<_ACEOF
11122 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
11123 _ACEOF
11124 ;;
11125 esac
11126 rm -rf conftest*
11127   if test $ac_cv_sys_file_offset_bits = unknown; then
11128     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
11129 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
11130 if ${ac_cv_sys_large_files+:} false; then :
11131   $as_echo_n "(cached) " >&6
11132 else
11133   while :; do
11134   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11135 /* end confdefs.h.  */
11136 #include <sys/types.h>
11137  /* Check that off_t can represent 2**63 - 1 correctly.
11138     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11139     since some C++ compilers masquerading as C compilers
11140     incorrectly reject 9223372036854775807.  */
11141 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11142   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11143                        && LARGE_OFF_T % 2147483647 == 1)
11144                       ? 1 : -1];
11145 int
11146 main ()
11147 {
11148
11149   ;
11150   return 0;
11151 }
11152 _ACEOF
11153 if ac_fn_c_try_compile "$LINENO"; then :
11154   ac_cv_sys_large_files=no; break
11155 fi
11156 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11157   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11158 /* end confdefs.h.  */
11159 #define _LARGE_FILES 1
11160 #include <sys/types.h>
11161  /* Check that off_t can represent 2**63 - 1 correctly.
11162     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11163     since some C++ compilers masquerading as C compilers
11164     incorrectly reject 9223372036854775807.  */
11165 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11166   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11167                        && LARGE_OFF_T % 2147483647 == 1)
11168                       ? 1 : -1];
11169 int
11170 main ()
11171 {
11172
11173   ;
11174   return 0;
11175 }
11176 _ACEOF
11177 if ac_fn_c_try_compile "$LINENO"; then :
11178   ac_cv_sys_large_files=1; break
11179 fi
11180 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11181   ac_cv_sys_large_files=unknown
11182   break
11183 done
11184 fi
11185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
11186 $as_echo "$ac_cv_sys_large_files" >&6; }
11187 case $ac_cv_sys_large_files in #(
11188   no | unknown) ;;
11189   *)
11190 cat >>confdefs.h <<_ACEOF
11191 #define _LARGE_FILES $ac_cv_sys_large_files
11192 _ACEOF
11193 ;;
11194 esac
11195 rm -rf conftest*
11196   fi
11197
11198
11199 fi
11200
11201
11202 fi
11203
11204 # Check for largefile support (must be after AC_SYS_LARGEFILE)
11205 # The cast to long int works around a bug in the HP C Compiler
11206 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11207 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11208 # This bug is HP SR number 8606223364.
11209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
11210 $as_echo_n "checking size of off_t... " >&6; }
11211 if ${ac_cv_sizeof_off_t+:} false; then :
11212   $as_echo_n "(cached) " >&6
11213 else
11214   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :
11215
11216 else
11217   if test "$ac_cv_type_off_t" = yes; then
11218      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11219 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11220 as_fn_error 77 "cannot compute sizeof (off_t)
11221 See \`config.log' for more details" "$LINENO" 5; }
11222    else
11223      ac_cv_sizeof_off_t=0
11224    fi
11225 fi
11226
11227 fi
11228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
11229 $as_echo "$ac_cv_sizeof_off_t" >&6; }
11230
11231
11232
11233 cat >>confdefs.h <<_ACEOF
11234 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
11235 _ACEOF
11236
11237
11238
11239 # If we don't have largefile support, can't handle segsize >= 2GB.
11240 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
11241    as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
11242 fi
11243
11244
11245 ##
11246 ## Functions, global variables
11247 ##
11248
11249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
11250 $as_echo_n "checking for int timezone... " >&6; }
11251 if ${pgac_cv_var_int_timezone+:} false; then :
11252   $as_echo_n "(cached) " >&6
11253 else
11254   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11255 /* end confdefs.h.  */
11256 #include <time.h>
11257 int res;
11258 int
11259 main ()
11260 {
11261 #ifndef __CYGWIN__
11262 res = timezone / 60;
11263 #else
11264 res = _timezone / 60;
11265 #endif
11266   ;
11267   return 0;
11268 }
11269 _ACEOF
11270 if ac_fn_c_try_link "$LINENO"; then :
11271   pgac_cv_var_int_timezone=yes
11272 else
11273   pgac_cv_var_int_timezone=no
11274 fi
11275 rm -f core conftest.err conftest.$ac_objext \
11276     conftest$ac_exeext conftest.$ac_ext
11277 fi
11278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
11279 $as_echo "$pgac_cv_var_int_timezone" >&6; }
11280 if test x"$pgac_cv_var_int_timezone" = xyes ; then
11281
11282 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
11283
11284 fi
11285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for accept()" >&5
11286 $as_echo_n "checking types of arguments for accept()... " >&6; }
11287  if ${ac_cv_func_accept_return+:} false; then :
11288   $as_echo_n "(cached) " >&6
11289 else
11290    if ${ac_cv_func_accept_arg1+:} false; then :
11291   $as_echo_n "(cached) " >&6
11292 else
11293     if ${ac_cv_func_accept_arg2+:} false; then :
11294   $as_echo_n "(cached) " >&6
11295 else
11296      if ${ac_cv_func_accept_arg3+:} false; then :
11297   $as_echo_n "(cached) " >&6
11298 else
11299       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL' 'SOCKET WSAAPI'; do
11300       for ac_cv_func_accept_arg1 in 'int' 'unsigned int' 'SOCKET'; do
11301        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
11302         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
11303          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11304 /* end confdefs.h.  */
11305 #ifdef HAVE_SYS_TYPES_H
11306 #include <sys/types.h>
11307 #endif
11308 #ifdef HAVE_SYS_SOCKET_H
11309 #include <sys/socket.h>
11310 #endif
11311 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
11312 int
11313 main ()
11314 {
11315
11316   ;
11317   return 0;
11318 }
11319 _ACEOF
11320 if ac_fn_c_try_compile "$LINENO"; then :
11321   ac_not_found=no; break 4
11322 else
11323   ac_not_found=yes
11324 fi
11325 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11326        done
11327       done
11328      done
11329     done
11330     if test "$ac_not_found" = yes; then
11331       as_fn_error $? "could not determine argument types" "$LINENO" 5
11332     fi
11333     if test "$ac_cv_func_accept_arg3" = "void"; then
11334       ac_cv_func_accept_arg3=int
11335     fi
11336
11337 fi
11338
11339 fi
11340
11341 fi
11342
11343 fi
11344  { $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
11345 $as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
11346
11347 cat >>confdefs.h <<_ACEOF
11348 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
11349 _ACEOF
11350
11351
11352 cat >>confdefs.h <<_ACEOF
11353 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
11354 _ACEOF
11355
11356
11357 cat >>confdefs.h <<_ACEOF
11358 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
11359 _ACEOF
11360
11361
11362 cat >>confdefs.h <<_ACEOF
11363 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
11364 _ACEOF
11365
11366
11367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
11368 $as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
11369 if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
11370   $as_echo_n "(cached) " >&6
11371 else
11372   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11373 /* end confdefs.h.  */
11374 #include <sys/time.h>
11375 int
11376 main ()
11377 {
11378 struct timeval *tp;
11379 struct timezone *tzp;
11380 gettimeofday(tp,tzp);
11381   ;
11382   return 0;
11383 }
11384 _ACEOF
11385 if ac_fn_c_try_compile "$LINENO"; then :
11386   pgac_cv_func_gettimeofday_1arg=no
11387 else
11388   pgac_cv_func_gettimeofday_1arg=yes
11389 fi
11390 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11391 fi
11392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5
11393 $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
11394 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
11395
11396 $as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
11397
11398 fi
11399
11400
11401 # Some versions of libedit contain strlcpy(), setproctitle(), and other
11402 # symbols that that library has no business exposing to the world.  Pending
11403 # acquisition of a clue by those developers, ignore libedit (including its
11404 # possible alias of libreadline) while checking for everything else.
11405 LIBS_including_readline="$LIBS"
11406 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
11407
11408 for ac_func in cbrt dlopen fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memmove poll pstat pthread_is_threaded_np readlink setproctitle setsid shm_open sigprocmask symlink sync_file_range towlower utime utimes wcstombs wcstombs_l
11409 do :
11410   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11411 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11412 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11413   cat >>confdefs.h <<_ACEOF
11414 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11415 _ACEOF
11416
11417 fi
11418 done
11419
11420
11421 ac_fn_c_check_func "$LINENO" "fseeko" "ac_cv_func_fseeko"
11422 if test "x$ac_cv_func_fseeko" = xyes; then :
11423   $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
11424
11425 else
11426   case " $LIBOBJS " in
11427   *" fseeko.$ac_objext "* ) ;;
11428   *) LIBOBJS="$LIBOBJS fseeko.$ac_objext"
11429  ;;
11430 esac
11431
11432 fi
11433
11434
11435 case $host_os in
11436         # NetBSD uses a custom fseeko/ftello built on fsetpos/fgetpos
11437         # Mingw uses macros to access Win32 API calls
11438         netbsd*|mingw*)
11439
11440 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
11441
11442                 ac_cv_func_fseeko=yes;;
11443         *)
11444                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
11445 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
11446 if ${ac_cv_sys_largefile_source+:} false; then :
11447   $as_echo_n "(cached) " >&6
11448 else
11449   while :; do
11450   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11451 /* end confdefs.h.  */
11452 #include <sys/types.h> /* for off_t */
11453      #include <stdio.h>
11454 int
11455 main ()
11456 {
11457 int (*fp) (FILE *, off_t, int) = fseeko;
11458      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
11459   ;
11460   return 0;
11461 }
11462 _ACEOF
11463 if ac_fn_c_try_link "$LINENO"; then :
11464   ac_cv_sys_largefile_source=no; break
11465 fi
11466 rm -f core conftest.err conftest.$ac_objext \
11467     conftest$ac_exeext conftest.$ac_ext
11468   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11469 /* end confdefs.h.  */
11470 #define _LARGEFILE_SOURCE 1
11471 #include <sys/types.h> /* for off_t */
11472      #include <stdio.h>
11473 int
11474 main ()
11475 {
11476 int (*fp) (FILE *, off_t, int) = fseeko;
11477      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
11478   ;
11479   return 0;
11480 }
11481 _ACEOF
11482 if ac_fn_c_try_link "$LINENO"; then :
11483   ac_cv_sys_largefile_source=1; break
11484 fi
11485 rm -f core conftest.err conftest.$ac_objext \
11486     conftest$ac_exeext conftest.$ac_ext
11487   ac_cv_sys_largefile_source=unknown
11488   break
11489 done
11490 fi
11491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
11492 $as_echo "$ac_cv_sys_largefile_source" >&6; }
11493 case $ac_cv_sys_largefile_source in #(
11494   no | unknown) ;;
11495   *)
11496 cat >>confdefs.h <<_ACEOF
11497 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
11498 _ACEOF
11499 ;;
11500 esac
11501 rm -rf conftest*
11502
11503 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
11504 # in glibc 2.1.3, but that breaks too many other things.
11505 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
11506 if test $ac_cv_sys_largefile_source != unknown; then
11507
11508 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
11509
11510 fi
11511 ;;
11512 esac
11513
11514 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
11515 # by calling it, 2009-04-02
11516 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
11517 if test "$PORTNAME" != "solaris"; then
11518 for ac_func in posix_fadvise
11519 do :
11520   ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
11521 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
11522   cat >>confdefs.h <<_ACEOF
11523 #define HAVE_POSIX_FADVISE 1
11524 _ACEOF
11525
11526 fi
11527 done
11528
11529 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
11530 "
11531 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
11532   ac_have_decl=1
11533 else
11534   ac_have_decl=0
11535 fi
11536
11537 cat >>confdefs.h <<_ACEOF
11538 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
11539 _ACEOF
11540
11541 fi
11542
11543 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
11544 "
11545 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
11546   ac_have_decl=1
11547 else
11548   ac_have_decl=0
11549 fi
11550
11551 cat >>confdefs.h <<_ACEOF
11552 #define HAVE_DECL_FDATASYNC $ac_have_decl
11553 _ACEOF
11554
11555 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
11556 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
11557   ac_have_decl=1
11558 else
11559   ac_have_decl=0
11560 fi
11561
11562 cat >>confdefs.h <<_ACEOF
11563 #define HAVE_DECL_STRLCAT $ac_have_decl
11564 _ACEOF
11565 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
11566 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
11567   ac_have_decl=1
11568 else
11569   ac_have_decl=0
11570 fi
11571
11572 cat >>confdefs.h <<_ACEOF
11573 #define HAVE_DECL_STRLCPY $ac_have_decl
11574 _ACEOF
11575
11576 # This is probably only present on Darwin, but may as well check always
11577 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
11578 "
11579 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
11580   ac_have_decl=1
11581 else
11582   ac_have_decl=0
11583 fi
11584
11585 cat >>confdefs.h <<_ACEOF
11586 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
11587 _ACEOF
11588
11589
11590 HAVE_IPV6=no
11591 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default
11592 #include <netinet/in.h>
11593 "
11594 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
11595
11596 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
11597
11598          HAVE_IPV6=yes
11599 fi
11600
11601
11602
11603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
11604 $as_echo_n "checking for PS_STRINGS... " >&6; }
11605 if ${pgac_cv_var_PS_STRINGS+:} false; then :
11606   $as_echo_n "(cached) " >&6
11607 else
11608   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11609 /* end confdefs.h.  */
11610 #include <machine/vmparam.h>
11611 #include <sys/exec.h>
11612
11613 int
11614 main ()
11615 {
11616 PS_STRINGS->ps_nargvstr = 1;
11617 PS_STRINGS->ps_argvstr = "foo";
11618   ;
11619   return 0;
11620 }
11621 _ACEOF
11622 if ac_fn_c_try_link "$LINENO"; then :
11623   pgac_cv_var_PS_STRINGS=yes
11624 else
11625   pgac_cv_var_PS_STRINGS=no
11626 fi
11627 rm -f core conftest.err conftest.$ac_objext \
11628     conftest$ac_exeext conftest.$ac_ext
11629 fi
11630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
11631 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
11632 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
11633
11634 $as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
11635
11636 fi
11637
11638
11639 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
11640 # is missing.  Yes, there are machines that have only one.  We may
11641 # also decide to use snprintf.c if snprintf() is present but does not
11642 # have all the features we need --- see below.
11643
11644 if test "$PORTNAME" = "win32"; then
11645   # Win32 gets snprintf.c built unconditionally.
11646   #
11647   # To properly translate all NLS languages strings, we must support the
11648   # *printf() %$ format, which allows *printf() arguments to be selected
11649   # by position in the translated string.
11650   #
11651   # libintl versions < 0.13 use the native *printf() functions, and Win32
11652   # *printf() doesn't understand %$, so we must use our /port versions,
11653   # which do understand %$. libintl versions >= 0.13 include their own
11654   # *printf versions on Win32.  The libintl 0.13 release note text is:
11655   #
11656   #   C format strings with positions, as they arise when a translator
11657   #   needs to reorder a sentence, are now supported on all platforms.
11658   #   On those few platforms (NetBSD and Woe32) for which the native
11659   #   printf()/fprintf()/... functions don't support such format
11660   #   strings, replacements are provided through <libintl.h>.
11661   #
11662   # We could use libintl >= 0.13's *printf() if we were sure that we had
11663   # a litint >= 0.13 at runtime, but seeing that there is no clean way
11664   # to guarantee that, it is best to just use our own, so we are sure to
11665   # get %$ support. In include/port.h we disable the *printf() macros
11666   # that might have been defined by libintl.
11667   #
11668   # We do this unconditionally whether NLS is used or not so we are sure
11669   # that all Win32 libraries and binaries behave the same.
11670   pgac_need_repl_snprintf=yes
11671 else
11672   pgac_need_repl_snprintf=no
11673   for ac_func in snprintf
11674 do :
11675   ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
11676 if test "x$ac_cv_func_snprintf" = xyes; then :
11677   cat >>confdefs.h <<_ACEOF
11678 #define HAVE_SNPRINTF 1
11679 _ACEOF
11680
11681 else
11682   pgac_need_repl_snprintf=yes
11683 fi
11684 done
11685
11686   for ac_func in vsnprintf
11687 do :
11688   ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
11689 if test "x$ac_cv_func_vsnprintf" = xyes; then :
11690   cat >>confdefs.h <<_ACEOF
11691 #define HAVE_VSNPRINTF 1
11692 _ACEOF
11693
11694 else
11695   pgac_need_repl_snprintf=yes
11696 fi
11697 done
11698
11699 fi
11700
11701
11702 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
11703 # include/c.h will provide declarations.  Note this is a separate test
11704 # from whether the functions exist in the C library --- there are
11705 # systems that have the functions but don't bother to declare them :-(
11706
11707 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11708 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
11709   ac_have_decl=1
11710 else
11711   ac_have_decl=0
11712 fi
11713
11714 cat >>confdefs.h <<_ACEOF
11715 #define HAVE_DECL_SNPRINTF $ac_have_decl
11716 _ACEOF
11717 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
11718 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
11719   ac_have_decl=1
11720 else
11721   ac_have_decl=0
11722 fi
11723
11724 cat >>confdefs.h <<_ACEOF
11725 #define HAVE_DECL_VSNPRINTF $ac_have_decl
11726 _ACEOF
11727
11728
11729
11730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf" >&5
11731 $as_echo_n "checking for isinf... " >&6; }
11732 if ${ac_cv_func_isinf+:} false; then :
11733   $as_echo_n "(cached) " >&6
11734 else
11735   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11736 /* end confdefs.h.  */
11737
11738 #include <math.h>
11739 double glob_double;
11740
11741 int
11742 main ()
11743 {
11744 return isinf(glob_double) ? 0 : 1;
11745   ;
11746   return 0;
11747 }
11748 _ACEOF
11749 if ac_fn_c_try_link "$LINENO"; then :
11750   ac_cv_func_isinf=yes
11751 else
11752   ac_cv_func_isinf=no
11753 fi
11754 rm -f core conftest.err conftest.$ac_objext \
11755     conftest$ac_exeext conftest.$ac_ext
11756 fi
11757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_isinf" >&5
11758 $as_echo "$ac_cv_func_isinf" >&6; }
11759
11760 if test $ac_cv_func_isinf = yes ; then
11761
11762 $as_echo "#define HAVE_ISINF 1" >>confdefs.h
11763
11764 else
11765   case " $LIBOBJS " in
11766   *" isinf.$ac_objext "* ) ;;
11767   *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
11768  ;;
11769 esac
11770
11771   # Look for a way to implement a substitute for isinf()
11772   for ac_func in fpclass fp_class fp_class_d class
11773 do :
11774   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11775 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11776 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11777   cat >>confdefs.h <<_ACEOF
11778 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11779 _ACEOF
11780  break
11781 fi
11782 done
11783
11784 fi
11785
11786 ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
11787 if test "x$ac_cv_func_crypt" = xyes; then :
11788   $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
11789
11790 else
11791   case " $LIBOBJS " in
11792   *" crypt.$ac_objext "* ) ;;
11793   *) LIBOBJS="$LIBOBJS crypt.$ac_objext"
11794  ;;
11795 esac
11796
11797 fi
11798
11799 ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
11800 if test "x$ac_cv_func_fls" = xyes; then :
11801   $as_echo "#define HAVE_FLS 1" >>confdefs.h
11802
11803 else
11804   case " $LIBOBJS " in
11805   *" fls.$ac_objext "* ) ;;
11806   *) LIBOBJS="$LIBOBJS fls.$ac_objext"
11807  ;;
11808 esac
11809
11810 fi
11811
11812 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
11813 if test "x$ac_cv_func_getopt" = xyes; then :
11814   $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
11815
11816 else
11817   case " $LIBOBJS " in
11818   *" getopt.$ac_objext "* ) ;;
11819   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
11820  ;;
11821 esac
11822
11823 fi
11824
11825 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
11826 if test "x$ac_cv_func_getrusage" = xyes; then :
11827   $as_echo "#define HAVE_GETRUSAGE 1" >>confdefs.h
11828
11829 else
11830   case " $LIBOBJS " in
11831   *" getrusage.$ac_objext "* ) ;;
11832   *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
11833  ;;
11834 esac
11835
11836 fi
11837
11838 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
11839 if test "x$ac_cv_func_inet_aton" = xyes; then :
11840   $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
11841
11842 else
11843   case " $LIBOBJS " in
11844   *" inet_aton.$ac_objext "* ) ;;
11845   *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
11846  ;;
11847 esac
11848
11849 fi
11850
11851 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
11852 if test "x$ac_cv_func_mkdtemp" = xyes; then :
11853   $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
11854
11855 else
11856   case " $LIBOBJS " in
11857   *" mkdtemp.$ac_objext "* ) ;;
11858   *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
11859  ;;
11860 esac
11861
11862 fi
11863
11864 ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
11865 if test "x$ac_cv_func_random" = xyes; then :
11866   $as_echo "#define HAVE_RANDOM 1" >>confdefs.h
11867
11868 else
11869   case " $LIBOBJS " in
11870   *" random.$ac_objext "* ) ;;
11871   *) LIBOBJS="$LIBOBJS random.$ac_objext"
11872  ;;
11873 esac
11874
11875 fi
11876
11877 ac_fn_c_check_func "$LINENO" "rint" "ac_cv_func_rint"
11878 if test "x$ac_cv_func_rint" = xyes; then :
11879   $as_echo "#define HAVE_RINT 1" >>confdefs.h
11880
11881 else
11882   case " $LIBOBJS " in
11883   *" rint.$ac_objext "* ) ;;
11884   *) LIBOBJS="$LIBOBJS rint.$ac_objext"
11885  ;;
11886 esac
11887
11888 fi
11889
11890 ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
11891 if test "x$ac_cv_func_srandom" = xyes; then :
11892   $as_echo "#define HAVE_SRANDOM 1" >>confdefs.h
11893
11894 else
11895   case " $LIBOBJS " in
11896   *" srandom.$ac_objext "* ) ;;
11897   *) LIBOBJS="$LIBOBJS srandom.$ac_objext"
11898  ;;
11899 esac
11900
11901 fi
11902
11903 ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
11904 if test "x$ac_cv_func_strerror" = xyes; then :
11905   $as_echo "#define HAVE_STRERROR 1" >>confdefs.h
11906
11907 else
11908   case " $LIBOBJS " in
11909   *" strerror.$ac_objext "* ) ;;
11910   *) LIBOBJS="$LIBOBJS strerror.$ac_objext"
11911  ;;
11912 esac
11913
11914 fi
11915
11916 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
11917 if test "x$ac_cv_func_strlcat" = xyes; then :
11918   $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
11919
11920 else
11921   case " $LIBOBJS " in
11922   *" strlcat.$ac_objext "* ) ;;
11923   *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
11924  ;;
11925 esac
11926
11927 fi
11928
11929 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
11930 if test "x$ac_cv_func_strlcpy" = xyes; then :
11931   $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
11932
11933 else
11934   case " $LIBOBJS " in
11935   *" strlcpy.$ac_objext "* ) ;;
11936   *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
11937  ;;
11938 esac
11939
11940 fi
11941
11942
11943
11944 case $host_os in
11945
11946         # Windows uses a specialised env handler
11947         # and doesn't need a replacement getpeereid because it doesn't use
11948         # Unix sockets.
11949         mingw*)
11950
11951 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
11952
11953
11954 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
11955
11956                 ac_cv_func_unsetenv=yes
11957                 ac_cv_func_getpeereid=yes;;
11958         *)
11959                 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
11960 if test "x$ac_cv_func_unsetenv" = xyes; then :
11961   $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
11962
11963 else
11964   case " $LIBOBJS " in
11965   *" unsetenv.$ac_objext "* ) ;;
11966   *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext"
11967  ;;
11968 esac
11969
11970 fi
11971
11972 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
11973 if test "x$ac_cv_func_getpeereid" = xyes; then :
11974   $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
11975
11976 else
11977   case " $LIBOBJS " in
11978   *" getpeereid.$ac_objext "* ) ;;
11979   *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
11980  ;;
11981 esac
11982
11983 fi
11984
11985
11986                 ;;
11987 esac
11988
11989 # System's version of getaddrinfo(), if any, may be used only if we found
11990 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
11991 # We use only our own getaddrinfo.c on Windows, but it's time to revisit that.
11992 if test x"$ac_cv_type_struct_addrinfo" = xyes && \
11993    test "$PORTNAME" != "win32"; then
11994   ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
11995 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
11996   $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
11997
11998 else
11999   case " $LIBOBJS " in
12000   *" getaddrinfo.$ac_objext "* ) ;;
12001   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
12002  ;;
12003 esac
12004
12005 fi
12006
12007
12008 else
12009   case " $LIBOBJS " in
12010   *" getaddrinfo.$ac_objext "* ) ;;
12011   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
12012  ;;
12013 esac
12014
12015 fi
12016
12017 # Similarly, use system's getopt_long() only if system provides struct option.
12018 if test x"$ac_cv_type_struct_option" = xyes ; then
12019   ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
12020 if test "x$ac_cv_func_getopt_long" = xyes; then :
12021   $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
12022
12023 else
12024   case " $LIBOBJS " in
12025   *" getopt_long.$ac_objext "* ) ;;
12026   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
12027  ;;
12028 esac
12029
12030 fi
12031
12032
12033 else
12034   case " $LIBOBJS " in
12035   *" getopt_long.$ac_objext "* ) ;;
12036   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
12037  ;;
12038 esac
12039
12040 fi
12041
12042 # Solaris' getopt() doesn't do what we want for long options, so always use
12043 # our version on that platform.
12044 if test "$PORTNAME" = "solaris"; then
12045   case " $LIBOBJS " in
12046   *" getopt.$ac_objext "* ) ;;
12047   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
12048  ;;
12049 esac
12050
12051 fi
12052
12053 # mingw has adopted a GNU-centric interpretation of optind/optreset,
12054 # so always use our version on Windows.
12055 if test "$PORTNAME" = "win32"; then
12056   case " $LIBOBJS " in
12057   *" getopt.$ac_objext "* ) ;;
12058   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
12059  ;;
12060 esac
12061
12062   case " $LIBOBJS " in
12063   *" getopt_long.$ac_objext "* ) ;;
12064   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
12065  ;;
12066 esac
12067
12068 fi
12069
12070 # Win32 (really MinGW) support
12071 if test "$PORTNAME" = "win32"; then
12072   ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
12073 if test "x$ac_cv_func_gettimeofday" = xyes; then :
12074   $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
12075
12076 else
12077   case " $LIBOBJS " in
12078   *" gettimeofday.$ac_objext "* ) ;;
12079   *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
12080  ;;
12081 esac
12082
12083 fi
12084
12085
12086   case " $LIBOBJS " in
12087   *" dirmod.$ac_objext "* ) ;;
12088   *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
12089  ;;
12090 esac
12091
12092   case " $LIBOBJS " in
12093   *" kill.$ac_objext "* ) ;;
12094   *) LIBOBJS="$LIBOBJS kill.$ac_objext"
12095  ;;
12096 esac
12097
12098   case " $LIBOBJS " in
12099   *" open.$ac_objext "* ) ;;
12100   *) LIBOBJS="$LIBOBJS open.$ac_objext"
12101  ;;
12102 esac
12103
12104   case " $LIBOBJS " in
12105   *" system.$ac_objext "* ) ;;
12106   *) LIBOBJS="$LIBOBJS system.$ac_objext"
12107  ;;
12108 esac
12109
12110   case " $LIBOBJS " in
12111   *" win32env.$ac_objext "* ) ;;
12112   *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
12113  ;;
12114 esac
12115
12116   case " $LIBOBJS " in
12117   *" win32error.$ac_objext "* ) ;;
12118   *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
12119  ;;
12120 esac
12121
12122   case " $LIBOBJS " in
12123   *" win32setlocale.$ac_objext "* ) ;;
12124   *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
12125  ;;
12126 esac
12127
12128
12129 $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
12130
12131   ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
12132 #define WIN32_LEAN_AND_MEAN
12133 #include <windows.h>
12134 #include <string.h>
12135 #include <dbghelp.h>
12136 "
12137 if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
12138
12139 cat >>confdefs.h <<_ACEOF
12140 #define HAVE_MINIDUMP_TYPE 1
12141 _ACEOF
12142
12143 pgac_minidump_type=yes
12144 else
12145   pgac_minidump_type=no
12146 fi
12147
12148 fi
12149 if test x"$pgac_minidump_type" = x"yes" ; then
12150   have_win32_dbghelp=yes
12151
12152 else
12153   have_win32_dbghelp=no
12154
12155 fi
12156
12157 # Cygwin needs only a bit of that
12158 if test "$PORTNAME" = "cygwin"; then
12159   case " $LIBOBJS " in
12160   *" dirmod.$ac_objext "* ) ;;
12161   *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
12162  ;;
12163 esac
12164
12165 fi
12166
12167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
12168 $as_echo_n "checking for sigsetjmp... " >&6; }
12169 if ${pgac_cv_func_sigsetjmp+:} false; then :
12170   $as_echo_n "(cached) " >&6
12171 else
12172   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12173 /* end confdefs.h.  */
12174 #include <setjmp.h>
12175 int
12176 main ()
12177 {
12178 sigjmp_buf x; sigsetjmp(x, 1);
12179   ;
12180   return 0;
12181 }
12182 _ACEOF
12183 if ac_fn_c_try_link "$LINENO"; then :
12184   pgac_cv_func_sigsetjmp=yes
12185 else
12186   pgac_cv_func_sigsetjmp=no
12187 fi
12188 rm -f core conftest.err conftest.$ac_objext \
12189     conftest$ac_exeext conftest.$ac_ext
12190 fi
12191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_sigsetjmp" >&5
12192 $as_echo "$pgac_cv_func_sigsetjmp" >&6; }
12193 if test x"$pgac_cv_func_sigsetjmp" = x"yes"; then
12194
12195 $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
12196
12197 fi
12198
12199 ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
12200 /* NetBSD declares sys_siglist in unistd.h.  */
12201 #ifdef HAVE_UNISTD_H
12202 # include <unistd.h>
12203 #endif
12204
12205 "
12206 if test "x$ac_cv_have_decl_sys_siglist" = xyes; then :
12207   ac_have_decl=1
12208 else
12209   ac_have_decl=0
12210 fi
12211
12212 cat >>confdefs.h <<_ACEOF
12213 #define HAVE_DECL_SYS_SIGLIST $ac_have_decl
12214 _ACEOF
12215
12216
12217
12218 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
12219 if test "x$ac_cv_func_syslog" = xyes; then :
12220   ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
12221 if test "x$ac_cv_header_syslog_h" = xyes; then :
12222
12223 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
12224
12225 fi
12226
12227
12228 fi
12229
12230
12231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
12232 $as_echo_n "checking for opterr... " >&6; }
12233 if ${pgac_cv_var_int_opterr+:} false; then :
12234   $as_echo_n "(cached) " >&6
12235 else
12236   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12237 /* end confdefs.h.  */
12238 #include <unistd.h>
12239 int
12240 main ()
12241 {
12242 extern int opterr; opterr = 1;
12243   ;
12244   return 0;
12245 }
12246 _ACEOF
12247 if ac_fn_c_try_link "$LINENO"; then :
12248   pgac_cv_var_int_opterr=yes
12249 else
12250   pgac_cv_var_int_opterr=no
12251 fi
12252 rm -f core conftest.err conftest.$ac_objext \
12253     conftest$ac_exeext conftest.$ac_ext
12254 fi
12255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
12256 $as_echo "$pgac_cv_var_int_opterr" >&6; }
12257 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
12258
12259 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
12260
12261 fi
12262
12263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
12264 $as_echo_n "checking for optreset... " >&6; }
12265 if ${pgac_cv_var_int_optreset+:} false; then :
12266   $as_echo_n "(cached) " >&6
12267 else
12268   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12269 /* end confdefs.h.  */
12270 #include <unistd.h>
12271 int
12272 main ()
12273 {
12274 extern int optreset; optreset = 1;
12275   ;
12276   return 0;
12277 }
12278 _ACEOF
12279 if ac_fn_c_try_link "$LINENO"; then :
12280   pgac_cv_var_int_optreset=yes
12281 else
12282   pgac_cv_var_int_optreset=no
12283 fi
12284 rm -f core conftest.err conftest.$ac_objext \
12285     conftest$ac_exeext conftest.$ac_ext
12286 fi
12287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
12288 $as_echo "$pgac_cv_var_int_optreset" >&6; }
12289 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
12290
12291 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
12292
12293 fi
12294
12295 for ac_func in strtoll strtoq
12296 do :
12297   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12298 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12299 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12300   cat >>confdefs.h <<_ACEOF
12301 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12302 _ACEOF
12303  break
12304 fi
12305 done
12306
12307 for ac_func in strtoull strtouq
12308 do :
12309   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12310 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12311 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12312   cat >>confdefs.h <<_ACEOF
12313 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12314 _ACEOF
12315  break
12316 fi
12317 done
12318
12319
12320 # Lastly, restore full LIBS list and check for readline/libedit symbols
12321 LIBS="$LIBS_including_readline"
12322
12323 if test "$with_readline" = yes; then
12324   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_append_character" >&5
12325 $as_echo_n "checking for rl_completion_append_character... " >&6; }
12326 if ${pgac_cv_var_rl_completion_append_character+:} false; then :
12327   $as_echo_n "(cached) " >&6
12328 else
12329   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12330 /* end confdefs.h.  */
12331 #include <stdio.h>
12332 #ifdef HAVE_READLINE_READLINE_H
12333 # include <readline/readline.h>
12334 #elif defined(HAVE_READLINE_H)
12335 # include <readline.h>
12336 #endif
12337
12338 int
12339 main ()
12340 {
12341 rl_completion_append_character = 'x';
12342   ;
12343   return 0;
12344 }
12345 _ACEOF
12346 if ac_fn_c_try_link "$LINENO"; then :
12347   pgac_cv_var_rl_completion_append_character=yes
12348 else
12349   pgac_cv_var_rl_completion_append_character=no
12350 fi
12351 rm -f core conftest.err conftest.$ac_objext \
12352     conftest$ac_exeext conftest.$ac_ext
12353 fi
12354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_append_character" >&5
12355 $as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
12356 if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
12357
12358 $as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
12359
12360 fi
12361   for ac_func in rl_completion_matches rl_filename_completion_function
12362 do :
12363   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12364 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12365 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12366   cat >>confdefs.h <<_ACEOF
12367 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12368 _ACEOF
12369
12370 fi
12371 done
12372
12373   for ac_func in append_history history_truncate_file
12374 do :
12375   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12376 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12377 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12378   cat >>confdefs.h <<_ACEOF
12379 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12380 _ACEOF
12381
12382 fi
12383 done
12384
12385 fi
12386
12387
12388 #
12389 # Pthreads
12390 #
12391 # For each platform, we need to know about any special compile and link
12392 # libraries, and whether the normal C function names are thread-safe.
12393 # See the comment at the top of src/port/thread.c for more information.
12394 # WIN32 doesn't need the pthread tests;  it always uses threads
12395 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then
12396
12397
12398
12399 ac_ext=c
12400 ac_cpp='$CPP $CPPFLAGS'
12401 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12402 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12403 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12404
12405 acx_pthread_ok=no
12406
12407 # We used to check for pthread.h first, but this fails if pthread.h
12408 # requires special compiler flags (e.g. on True64 or Sequent).
12409 # It gets checked for in the link test anyway.
12410
12411 # First of all, check if the user has set any of the PTHREAD_LIBS,
12412 # etcetera environment variables, and if threads linking works using
12413 # them:
12414 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
12415         save_CFLAGS="$CFLAGS"
12416         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
12417         save_LIBS="$LIBS"
12418         LIBS="$PTHREAD_LIBS $LIBS"
12419         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
12420 $as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
12421         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12422 /* end confdefs.h.  */
12423
12424 /* Override any GCC internal prototype to avoid an error.
12425    Use char because int might match the return type of a GCC
12426    builtin and then its argument prototype would still apply.  */
12427 #ifdef __cplusplus
12428 extern "C"
12429 #endif
12430 char pthread_join ();
12431 int
12432 main ()
12433 {
12434 return pthread_join ();
12435   ;
12436   return 0;
12437 }
12438 _ACEOF
12439 if ac_fn_c_try_link "$LINENO"; then :
12440   acx_pthread_ok=yes
12441 fi
12442 rm -f core conftest.err conftest.$ac_objext \
12443     conftest$ac_exeext conftest.$ac_ext
12444         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5
12445 $as_echo "$acx_pthread_ok" >&6; }
12446         if test x"$acx_pthread_ok" = xno; then
12447                 PTHREAD_LIBS=""
12448                 PTHREAD_CFLAGS=""
12449         fi
12450         LIBS="$save_LIBS"
12451         CFLAGS="$save_CFLAGS"
12452 fi
12453
12454 # We must check for the threads library under a number of different
12455 # names; the ordering is very important because some systems
12456 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
12457 # libraries is broken (non-POSIX).
12458
12459 # Create a list of thread flags to try.  Items starting with a "-" are
12460 # C compiler flags, and other items are library names, except for "none"
12461 # which indicates that we try without any flags at all, and "pthread-config"
12462 # which is a program returning the flags for the Pth emulation library.
12463
12464 acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config pthreadGC2"
12465
12466 # The ordering *is* (sometimes) important.  Some notes on the
12467 # individual items follow:
12468
12469 # pthreads: AIX (must check this before -lpthread)
12470 # none: in case threads are in libc; should be tried before -Kthread and
12471 #       other compiler flags to prevent continual compiler warnings
12472 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
12473 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
12474 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
12475 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
12476 # -pthreads: Solaris/gcc
12477 # -mthreads: Mingw32/gcc, Lynx/gcc
12478 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
12479 #      doesn't hurt to check since this sometimes defines pthreads too;
12480 #      also defines -D_REENTRANT)
12481 # pthread: Linux, etcetera
12482 # --thread-safe: KAI C++
12483 # pthread-config: use pthread-config program (for GNU Pth library)
12484
12485 case "${host_cpu}-${host_os}" in
12486         *solaris*)
12487
12488         # On Solaris (at least, for some versions), libc contains stubbed
12489         # (non-functional) versions of the pthreads routines, so link-based
12490         # tests will erroneously succeed.  (We need to link with -pthread or
12491         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
12492         # a function called by this macro, so we could check for that, but
12493         # who knows whether they'll stub that too in a future libc.)  So,
12494         # we'll just look for -pthreads and -lpthread first:
12495
12496         acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
12497         ;;
12498 esac
12499
12500 if test x"$acx_pthread_ok" = xno; then
12501 for flag in $acx_pthread_flags; do
12502
12503         tryPTHREAD_CFLAGS=""
12504         tryPTHREAD_LIBS=""
12505         case $flag in
12506                 none)
12507                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
12508 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
12509                 ;;
12510
12511                 -*)
12512                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
12513 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
12514                 tryPTHREAD_CFLAGS="$flag"
12515                 ;;
12516
12517                 pthread-config)
12518                 # skip this if we already have flags defined, for PostgreSQL
12519                 if test x"$PTHREAD_CFLAGS" != x -o x"$PTHREAD_LIBS" != x; then continue; fi
12520                 # Extract the first word of "pthread-config", so it can be a program name with args.
12521 set dummy pthread-config; ac_word=$2
12522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12523 $as_echo_n "checking for $ac_word... " >&6; }
12524 if ${ac_cv_prog_acx_pthread_config+:} false; then :
12525   $as_echo_n "(cached) " >&6
12526 else
12527   if test -n "$acx_pthread_config"; then
12528   ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
12529 else
12530 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12531 for as_dir in $PATH
12532 do
12533   IFS=$as_save_IFS
12534   test -z "$as_dir" && as_dir=.
12535     for ac_exec_ext in '' $ac_executable_extensions; do
12536   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12537     ac_cv_prog_acx_pthread_config="yes"
12538     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12539     break 2
12540   fi
12541 done
12542   done
12543 IFS=$as_save_IFS
12544
12545   test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
12546 fi
12547 fi
12548 acx_pthread_config=$ac_cv_prog_acx_pthread_config
12549 if test -n "$acx_pthread_config"; then
12550   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_config" >&5
12551 $as_echo "$acx_pthread_config" >&6; }
12552 else
12553   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12554 $as_echo "no" >&6; }
12555 fi
12556
12557
12558                 if test x"$acx_pthread_config" = xno; then continue; fi
12559                 tryPTHREAD_CFLAGS="`pthread-config --cflags`"
12560                 tryPTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
12561                 ;;
12562
12563                 *)
12564                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
12565 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
12566                 tryPTHREAD_LIBS="-l$flag"
12567                 ;;
12568         esac
12569
12570         save_LIBS="$LIBS"
12571         save_CFLAGS="$CFLAGS"
12572         LIBS="$tryPTHREAD_LIBS $PTHREAD_LIBS $LIBS"
12573         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
12574
12575         # Check for various functions.  We must include pthread.h,
12576         # since some functions may be macros.  (On the Sequent, we
12577         # need a special flag -Kthread to make this header compile.)
12578         # We check for pthread_join because it is in -lpthread on IRIX
12579         # while pthread_create is in libc.  We check for pthread_attr_init
12580         # due to DEC craziness with -lpthreads.  We check for
12581         # pthread_cleanup_push because it is one of the few pthread
12582         # functions on Solaris that doesn't have a non-functional libc stub.
12583         # We try pthread_create on general principles.
12584         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12585 /* end confdefs.h.  */
12586 #include <pthread.h>
12587 int
12588 main ()
12589 {
12590 pthread_t th; pthread_join(th, 0);
12591                      pthread_attr_init(0); pthread_cleanup_push(0, 0);
12592                      pthread_create(0,0,0,0); pthread_cleanup_pop(0);
12593   ;
12594   return 0;
12595 }
12596 _ACEOF
12597 if ac_fn_c_try_link "$LINENO"; then :
12598   acx_pthread_ok=yes
12599 else
12600   acx_pthread_ok=no
12601 fi
12602 rm -f core conftest.err conftest.$ac_objext \
12603     conftest$ac_exeext conftest.$ac_ext
12604
12605         if test "x$acx_pthread_ok" = xyes; then
12606             # Don't use options that are ignored by the compiler.
12607             # We find them by checking stderror.
12608             cat >conftest.$ac_ext <<_ACEOF
12609 int
12610 main (int argc, char **argv)
12611 {
12612   (void) argc;
12613   (void) argv;
12614   return 0;
12615 }
12616 _ACEOF
12617             rm -f conftest.$ac_objext conftest$ac_exeext
12618             # Check both linking and compiling, because they might tolerate different options.
12619             if test "`(eval $ac_link 2>&1 1>&5)`" = "" && test "`(eval $ac_compile 2>&1 1>&5)`" = ""; then
12620                 # The original macro breaks out of the loop at this point,
12621                 # but we continue trying flags because Linux needs -lpthread
12622                 # too to build libpq successfully.  The test above only
12623                 # tests for building binaries, not shared libraries.
12624                 PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
12625                 PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
12626             else   acx_pthread_ok=no
12627             fi
12628         fi
12629
12630         LIBS="$save_LIBS"
12631         CFLAGS="$save_CFLAGS"
12632
12633         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5
12634 $as_echo "$acx_pthread_ok" >&6; }
12635 done
12636 fi
12637
12638 # The original macro has a bunch of other tests here, which we have removed
12639 # because (a) Postgres doesn't need them, and (b) $acx_pthread_ok is not
12640 # meaningful at this point.
12641
12642
12643
12644
12645 ac_ext=c
12646 ac_cpp='$CPP $CPPFLAGS'
12647 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12648 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12649 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12650
12651         # set thread flags
12652
12653 # Some platforms use these, so just define them.  They can't hurt if they
12654 # are not supported.  For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
12655 # enables 5-arg getpwuid_r, among other things.
12656 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
12657
12658 # Check for *_r functions
12659 _CFLAGS="$CFLAGS"
12660 _LIBS="$LIBS"
12661 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
12662 LIBS="$LIBS $PTHREAD_LIBS"
12663
12664 if test "$PORTNAME" != "win32"; then
12665 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
12666 if test "x$ac_cv_header_pthread_h" = xyes; then :
12667
12668 else
12669   as_fn_error $? "
12670 pthread.h not found;  use --disable-thread-safety to disable thread safety" "$LINENO" 5
12671 fi
12672
12673
12674 fi
12675
12676 for ac_func in strerror_r getpwuid_r gethostbyname_r
12677 do :
12678   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12679 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12680 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12681   cat >>confdefs.h <<_ACEOF
12682 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12683 _ACEOF
12684
12685 fi
12686 done
12687
12688
12689 # Do test here with the proper thread flags
12690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
12691 $as_echo_n "checking whether strerror_r returns int... " >&6; }
12692 if ${pgac_cv_func_strerror_r_int+:} false; then :
12693   $as_echo_n "(cached) " >&6
12694 else
12695   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12696 /* end confdefs.h.  */
12697 #include <string.h>
12698 int
12699 main ()
12700 {
12701 #ifndef _AIX
12702 int strerror_r(int, char *, size_t);
12703 #else
12704 /* Older AIX has 'int' for the third argument so we don't test the args. */
12705 int strerror_r();
12706 #endif
12707   ;
12708   return 0;
12709 }
12710 _ACEOF
12711 if ac_fn_c_try_compile "$LINENO"; then :
12712   pgac_cv_func_strerror_r_int=yes
12713 else
12714   pgac_cv_func_strerror_r_int=no
12715 fi
12716 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12717 fi
12718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
12719 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
12720 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
12721
12722 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
12723
12724 fi
12725
12726
12727 CFLAGS="$_CFLAGS"
12728 LIBS="$_LIBS"
12729
12730 else
12731 # do not use values from template file
12732 PTHREAD_CFLAGS=
12733 PTHREAD_LIBS=
12734 fi
12735
12736
12737
12738
12739
12740 # We can test for libldap_r only after we know PTHREAD_LIBS
12741 if test "$with_ldap" = yes ; then
12742   _LIBS="$LIBS"
12743   if test "$PORTNAME" != "win32"; then
12744     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
12745 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
12746 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
12747   $as_echo_n "(cached) " >&6
12748 else
12749   ac_check_lib_save_LIBS=$LIBS
12750 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
12751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12752 /* end confdefs.h.  */
12753
12754 /* Override any GCC internal prototype to avoid an error.
12755    Use char because int might match the return type of a GCC
12756    builtin and then its argument prototype would still apply.  */
12757 #ifdef __cplusplus
12758 extern "C"
12759 #endif
12760 char ldap_bind ();
12761 int
12762 main ()
12763 {
12764 return ldap_bind ();
12765   ;
12766   return 0;
12767 }
12768 _ACEOF
12769 if ac_fn_c_try_link "$LINENO"; then :
12770   ac_cv_lib_ldap_ldap_bind=yes
12771 else
12772   ac_cv_lib_ldap_ldap_bind=no
12773 fi
12774 rm -f core conftest.err conftest.$ac_objext \
12775     conftest$ac_exeext conftest.$ac_ext
12776 LIBS=$ac_check_lib_save_LIBS
12777 fi
12778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
12779 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
12780 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
12781   cat >>confdefs.h <<_ACEOF
12782 #define HAVE_LIBLDAP 1
12783 _ACEOF
12784
12785   LIBS="-lldap $LIBS"
12786
12787 else
12788   as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
12789 fi
12790
12791     LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
12792     if test "$enable_thread_safety" = yes; then
12793       # on some platforms ldap_r fails to link without PTHREAD_LIBS
12794       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_simple_bind in -lldap_r" >&5
12795 $as_echo_n "checking for ldap_simple_bind in -lldap_r... " >&6; }
12796 if ${ac_cv_lib_ldap_r_ldap_simple_bind+:} false; then :
12797   $as_echo_n "(cached) " >&6
12798 else
12799   ac_check_lib_save_LIBS=$LIBS
12800 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
12801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12802 /* end confdefs.h.  */
12803
12804 /* Override any GCC internal prototype to avoid an error.
12805    Use char because int might match the return type of a GCC
12806    builtin and then its argument prototype would still apply.  */
12807 #ifdef __cplusplus
12808 extern "C"
12809 #endif
12810 char ldap_simple_bind ();
12811 int
12812 main ()
12813 {
12814 return ldap_simple_bind ();
12815   ;
12816   return 0;
12817 }
12818 _ACEOF
12819 if ac_fn_c_try_link "$LINENO"; then :
12820   ac_cv_lib_ldap_r_ldap_simple_bind=yes
12821 else
12822   ac_cv_lib_ldap_r_ldap_simple_bind=no
12823 fi
12824 rm -f core conftest.err conftest.$ac_objext \
12825     conftest$ac_exeext conftest.$ac_ext
12826 LIBS=$ac_check_lib_save_LIBS
12827 fi
12828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
12829 $as_echo "$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
12830 if test "x$ac_cv_lib_ldap_r_ldap_simple_bind" = xyes; then :
12831   cat >>confdefs.h <<_ACEOF
12832 #define HAVE_LIBLDAP_R 1
12833 _ACEOF
12834
12835   LIBS="-lldap_r $LIBS"
12836
12837 else
12838   as_fn_error $? "library 'ldap_r' is required for LDAP" "$LINENO" 5
12839 fi
12840
12841       LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
12842     else
12843       LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
12844     fi
12845   else
12846     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
12847 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
12848 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
12849   $as_echo_n "(cached) " >&6
12850 else
12851   ac_check_lib_save_LIBS=$LIBS
12852 LIBS="-lwldap32  $LIBS"
12853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12854 /* end confdefs.h.  */
12855
12856 /* Override any GCC internal prototype to avoid an error.
12857    Use char because int might match the return type of a GCC
12858    builtin and then its argument prototype would still apply.  */
12859 #ifdef __cplusplus
12860 extern "C"
12861 #endif
12862 char ldap_bind ();
12863 int
12864 main ()
12865 {
12866 return ldap_bind ();
12867   ;
12868   return 0;
12869 }
12870 _ACEOF
12871 if ac_fn_c_try_link "$LINENO"; then :
12872   ac_cv_lib_wldap32_ldap_bind=yes
12873 else
12874   ac_cv_lib_wldap32_ldap_bind=no
12875 fi
12876 rm -f core conftest.err conftest.$ac_objext \
12877     conftest$ac_exeext conftest.$ac_ext
12878 LIBS=$ac_check_lib_save_LIBS
12879 fi
12880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
12881 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
12882 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
12883   cat >>confdefs.h <<_ACEOF
12884 #define HAVE_LIBWLDAP32 1
12885 _ACEOF
12886
12887   LIBS="-lwldap32 $LIBS"
12888
12889 else
12890   as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
12891 fi
12892
12893     LDAP_LIBS_FE="-lwldap32"
12894     LDAP_LIBS_BE="-lwldap32"
12895   fi
12896   LIBS="$_LIBS"
12897 fi
12898
12899
12900
12901
12902 # This test makes sure that run tests work at all.  Sometimes a shared
12903 # library is found by the linker, but the runtime linker can't find it.
12904 # This check should come after all modifications of compiler or linker
12905 # variables, and before any other run tests.
12906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
12907 $as_echo_n "checking test program... " >&6; }
12908 if test "$cross_compiling" = yes; then :
12909   { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
12910 $as_echo "cross-compiling" >&6; }
12911 else
12912   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12913 /* end confdefs.h.  */
12914 int main() { return 0; }
12915 _ACEOF
12916 if ac_fn_c_try_run "$LINENO"; then :
12917   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
12918 $as_echo "ok" >&6; }
12919 else
12920   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
12921 $as_echo "failed" >&6; }
12922 as_fn_error $? "
12923 Could not execute a simple test program.  This may be a problem
12924 related to locating shared libraries.  Check the file 'config.log'
12925 for the exact reason." "$LINENO" 5
12926 fi
12927 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12928   conftest.$ac_objext conftest.beam conftest.$ac_ext
12929 fi
12930
12931
12932 # --------------------
12933 # Run tests below here
12934 # --------------------
12935
12936 # Force use of our snprintf if system's doesn't do arg control
12937 # See comment above at snprintf test for details.
12938 if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
12939   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports argument control" >&5
12940 $as_echo_n "checking whether snprintf supports argument control... " >&6; }
12941 if ${pgac_cv_snprintf_arg_control+:} false; then :
12942   $as_echo_n "(cached) " >&6
12943 else
12944   if test "$cross_compiling" = yes; then :
12945   pgac_cv_snprintf_arg_control=cross
12946 else
12947   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12948 /* end confdefs.h.  */
12949 #include <stdio.h>
12950 #include <string.h>
12951
12952 int main()
12953 {
12954   char buf[100];
12955
12956   /* can it swap arguments? */
12957   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
12958   if (strcmp(buf, "4 3") != 0)
12959     return 1;
12960   return 0;
12961 }
12962 _ACEOF
12963 if ac_fn_c_try_run "$LINENO"; then :
12964   pgac_cv_snprintf_arg_control=yes
12965 else
12966   pgac_cv_snprintf_arg_control=no
12967 fi
12968 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12969   conftest.$ac_objext conftest.beam conftest.$ac_ext
12970 fi
12971
12972
12973 fi
12974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_arg_control" >&5
12975 $as_echo "$pgac_cv_snprintf_arg_control" >&6; }
12976
12977   if test $pgac_cv_snprintf_arg_control != yes ; then
12978     pgac_need_repl_snprintf=yes
12979   fi
12980 fi
12981
12982
12983
12984
12985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
12986 $as_echo_n "checking whether long int is 64 bits... " >&6; }
12987 if ${pgac_cv_type_long_int_64+:} false; then :
12988   $as_echo_n "(cached) " >&6
12989 else
12990   if test "$cross_compiling" = yes; then :
12991   # If cross-compiling, check the size reported by the compiler and
12992 # trust that the arithmetic works.
12993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12994 /* end confdefs.h.  */
12995
12996 int
12997 main ()
12998 {
12999 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
13000 test_array [0] = 0;
13001 return test_array [0];
13002
13003   ;
13004   return 0;
13005 }
13006 _ACEOF
13007 if ac_fn_c_try_compile "$LINENO"; then :
13008   pgac_cv_type_long_int_64=yes
13009 else
13010   pgac_cv_type_long_int_64=no
13011 fi
13012 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13013 else
13014   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13015 /* end confdefs.h.  */
13016 typedef long int ac_int64;
13017
13018 /*
13019  * These are globals to discourage the compiler from folding all the
13020  * arithmetic tests down to compile-time constants.
13021  */
13022 ac_int64 a = 20000001;
13023 ac_int64 b = 40000005;
13024
13025 int does_int64_work()
13026 {
13027   ac_int64 c,d;
13028
13029   if (sizeof(ac_int64) != 8)
13030     return 0;                   /* definitely not the right size */
13031
13032   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
13033   c = a * b;
13034   d = (c + b) / b;
13035   if (d != a+1)
13036     return 0;
13037   return 1;
13038 }
13039 main() {
13040   exit(! does_int64_work());
13041 }
13042 _ACEOF
13043 if ac_fn_c_try_run "$LINENO"; then :
13044   pgac_cv_type_long_int_64=yes
13045 else
13046   pgac_cv_type_long_int_64=no
13047 fi
13048 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13049   conftest.$ac_objext conftest.beam conftest.$ac_ext
13050 fi
13051
13052 fi
13053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
13054 $as_echo "$pgac_cv_type_long_int_64" >&6; }
13055
13056 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
13057 if test x"$pgac_cv_type_long_int_64" = xyes ; then
13058
13059 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
13060
13061 fi
13062
13063
13064 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
13065   pg_int64_type="long int"
13066 else
13067   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
13068 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
13069 if ${pgac_cv_type_long_long_int_64+:} false; then :
13070   $as_echo_n "(cached) " >&6
13071 else
13072   if test "$cross_compiling" = yes; then :
13073   # If cross-compiling, check the size reported by the compiler and
13074 # trust that the arithmetic works.
13075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13076 /* end confdefs.h.  */
13077
13078 int
13079 main ()
13080 {
13081 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
13082 test_array [0] = 0;
13083 return test_array [0];
13084
13085   ;
13086   return 0;
13087 }
13088 _ACEOF
13089 if ac_fn_c_try_compile "$LINENO"; then :
13090   pgac_cv_type_long_long_int_64=yes
13091 else
13092   pgac_cv_type_long_long_int_64=no
13093 fi
13094 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13095 else
13096   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13097 /* end confdefs.h.  */
13098 typedef long long int ac_int64;
13099
13100 /*
13101  * These are globals to discourage the compiler from folding all the
13102  * arithmetic tests down to compile-time constants.
13103  */
13104 ac_int64 a = 20000001;
13105 ac_int64 b = 40000005;
13106
13107 int does_int64_work()
13108 {
13109   ac_int64 c,d;
13110
13111   if (sizeof(ac_int64) != 8)
13112     return 0;                   /* definitely not the right size */
13113
13114   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
13115   c = a * b;
13116   d = (c + b) / b;
13117   if (d != a+1)
13118     return 0;
13119   return 1;
13120 }
13121 main() {
13122   exit(! does_int64_work());
13123 }
13124 _ACEOF
13125 if ac_fn_c_try_run "$LINENO"; then :
13126   pgac_cv_type_long_long_int_64=yes
13127 else
13128   pgac_cv_type_long_long_int_64=no
13129 fi
13130 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13131   conftest.$ac_objext conftest.beam conftest.$ac_ext
13132 fi
13133
13134 fi
13135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
13136 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
13137
13138 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
13139 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
13140
13141 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
13142
13143 fi
13144
13145   if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
13146     pg_int64_type="long long int"
13147   else
13148     as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
13149   fi
13150 fi
13151
13152
13153 cat >>confdefs.h <<_ACEOF
13154 #define PG_INT64_TYPE $pg_int64_type
13155 _ACEOF
13156
13157
13158
13159 if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
13160   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13161 /* end confdefs.h.  */
13162
13163 #define INT64CONST(x)  x##LL
13164 long long int foo = INT64CONST(0x1234567890123456);
13165
13166 int
13167 main ()
13168 {
13169
13170   ;
13171   return 0;
13172 }
13173 _ACEOF
13174 if ac_fn_c_try_compile "$LINENO"; then :
13175
13176 $as_echo "#define HAVE_LL_CONSTANTS 1" >>confdefs.h
13177
13178 fi
13179 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13180 fi
13181
13182
13183 # If we found "long int" is 64 bits, assume snprintf handles it.  If
13184 # we found we need to use "long long int", better check.  We cope with
13185 # snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
13186 # work, fall back to our own snprintf emulation (which we know uses %lld).
13187
13188 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
13189   if test $pgac_need_repl_snprintf = no; then
13190     { $as_echo "$as_me:${as_lineno-$LINENO}: checking snprintf length modifier for long long int" >&5
13191 $as_echo_n "checking snprintf length modifier for long long int... " >&6; }
13192 if ${pgac_cv_snprintf_long_long_int_modifier+:} false; then :
13193   $as_echo_n "(cached) " >&6
13194 else
13195   for pgac_modifier in 'll' 'q' 'I64'; do
13196 if test "$cross_compiling" = yes; then :
13197   pgac_cv_snprintf_long_long_int_modifier=cross; break
13198 else
13199   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13200 /* end confdefs.h.  */
13201 #include <stdio.h>
13202 typedef long long int ac_int64;
13203 #define INT64_FORMAT "%${pgac_modifier}d"
13204
13205 ac_int64 a = 20000001;
13206 ac_int64 b = 40000005;
13207
13208 int does_int64_snprintf_work()
13209 {
13210   ac_int64 c;
13211   char buf[100];
13212
13213   if (sizeof(ac_int64) != 8)
13214     return 0;                   /* doesn't look like the right size */
13215
13216   c = a * b;
13217   snprintf(buf, 100, INT64_FORMAT, c);
13218   if (strcmp(buf, "800000140000005") != 0)
13219     return 0;                   /* either multiply or snprintf is busted */
13220   return 1;
13221 }
13222 main() {
13223   exit(! does_int64_snprintf_work());
13224 }
13225 _ACEOF
13226 if ac_fn_c_try_run "$LINENO"; then :
13227   pgac_cv_snprintf_long_long_int_modifier=$pgac_modifier; break
13228 fi
13229 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13230   conftest.$ac_objext conftest.beam conftest.$ac_ext
13231 fi
13232
13233 done
13234 fi
13235
13236 LONG_LONG_INT_MODIFIER=''
13237
13238 case $pgac_cv_snprintf_long_long_int_modifier in
13239   cross) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot test (not on host machine)" >&5
13240 $as_echo "cannot test (not on host machine)" >&6; };;
13241   ?*)    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_long_long_int_modifier" >&5
13242 $as_echo "$pgac_cv_snprintf_long_long_int_modifier" >&6; }
13243          LONG_LONG_INT_MODIFIER=$pgac_cv_snprintf_long_long_int_modifier;;
13244   *)     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13245 $as_echo "none" >&6; };;
13246 esac
13247     if test "$LONG_LONG_INT_MODIFIER" = ""; then
13248       # Force usage of our own snprintf, since system snprintf is broken
13249       pgac_need_repl_snprintf=yes
13250       LONG_LONG_INT_MODIFIER='ll'
13251     fi
13252   else
13253     # Here if we previously decided we needed to use our own snprintf
13254     LONG_LONG_INT_MODIFIER='ll'
13255   fi
13256 else
13257   # Here if we are not using 'long long int' at all
13258   LONG_LONG_INT_MODIFIER='l'
13259 fi
13260
13261 INT64_MODIFIER="\"$LONG_LONG_INT_MODIFIER\""
13262
13263
13264 cat >>confdefs.h <<_ACEOF
13265 #define INT64_MODIFIER $INT64_MODIFIER
13266 _ACEOF
13267
13268
13269 # Also force use of our snprintf if the system's doesn't support the %z flag.
13270 if test "$pgac_need_repl_snprintf" = no; then
13271   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports the %z modifier" >&5
13272 $as_echo_n "checking whether snprintf supports the %z modifier... " >&6; }
13273 if ${pgac_cv_snprintf_size_t_support+:} false; then :
13274   $as_echo_n "(cached) " >&6
13275 else
13276   if test "$cross_compiling" = yes; then :
13277   pgac_cv_snprintf_size_t_support=cross
13278 else
13279   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13280 /* end confdefs.h.  */
13281 #include <stdio.h>
13282 #include <string.h>
13283
13284 int main()
13285 {
13286   char bufz[100];
13287   char buf64[100];
13288
13289   /*
13290    * Print the largest unsigned number fitting in a size_t using both %zu
13291    * and the previously-determined format for 64-bit integers.  Note that
13292    * we don't run this code unless we know snprintf handles 64-bit ints.
13293    */
13294   bufz[0] = '\0';  /* in case snprintf fails to emit anything */
13295   snprintf(bufz, sizeof(bufz), "%zu", ~((size_t) 0));
13296   snprintf(buf64, sizeof(buf64), "%" INT64_MODIFIER "u",
13297     (unsigned PG_INT64_TYPE) ~((size_t) 0));
13298   if (strcmp(bufz, buf64) != 0)
13299     return 1;
13300   return 0;
13301 }
13302 _ACEOF
13303 if ac_fn_c_try_run "$LINENO"; then :
13304   pgac_cv_snprintf_size_t_support=yes
13305 else
13306   pgac_cv_snprintf_size_t_support=no
13307 fi
13308 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13309   conftest.$ac_objext conftest.beam conftest.$ac_ext
13310 fi
13311
13312
13313 fi
13314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_size_t_support" >&5
13315 $as_echo "$pgac_cv_snprintf_size_t_support" >&6; }
13316
13317   if test "$pgac_cv_snprintf_size_t_support" != yes; then
13318     pgac_need_repl_snprintf=yes
13319   fi
13320 fi
13321
13322 # Now we have checked all the reasons to replace snprintf
13323 if test $pgac_need_repl_snprintf = yes; then
13324
13325 $as_echo "#define USE_REPL_SNPRINTF 1" >>confdefs.h
13326
13327   case " $LIBOBJS " in
13328   *" snprintf.$ac_objext "* ) ;;
13329   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
13330  ;;
13331 esac
13332
13333 fi
13334
13335 # Check size of void *, size_t (enables tweaks for > 32bit address space)
13336 # The cast to long int works around a bug in the HP C Compiler
13337 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13338 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13339 # This bug is HP SR number 8606223364.
13340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
13341 $as_echo_n "checking size of void *... " >&6; }
13342 if ${ac_cv_sizeof_void_p+:} false; then :
13343   $as_echo_n "(cached) " >&6
13344 else
13345   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
13346
13347 else
13348   if test "$ac_cv_type_void_p" = yes; then
13349      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13350 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13351 as_fn_error 77 "cannot compute sizeof (void *)
13352 See \`config.log' for more details" "$LINENO" 5; }
13353    else
13354      ac_cv_sizeof_void_p=0
13355    fi
13356 fi
13357
13358 fi
13359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
13360 $as_echo "$ac_cv_sizeof_void_p" >&6; }
13361
13362
13363
13364 cat >>confdefs.h <<_ACEOF
13365 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
13366 _ACEOF
13367
13368
13369 # The cast to long int works around a bug in the HP C Compiler
13370 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13371 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13372 # This bug is HP SR number 8606223364.
13373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
13374 $as_echo_n "checking size of size_t... " >&6; }
13375 if ${ac_cv_sizeof_size_t+:} false; then :
13376   $as_echo_n "(cached) " >&6
13377 else
13378   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
13379
13380 else
13381   if test "$ac_cv_type_size_t" = yes; then
13382      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13383 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13384 as_fn_error 77 "cannot compute sizeof (size_t)
13385 See \`config.log' for more details" "$LINENO" 5; }
13386    else
13387      ac_cv_sizeof_size_t=0
13388    fi
13389 fi
13390
13391 fi
13392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
13393 $as_echo "$ac_cv_sizeof_size_t" >&6; }
13394
13395
13396
13397 cat >>confdefs.h <<_ACEOF
13398 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
13399 _ACEOF
13400
13401
13402 # The cast to long int works around a bug in the HP C Compiler
13403 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13404 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13405 # This bug is HP SR number 8606223364.
13406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
13407 $as_echo_n "checking size of long... " >&6; }
13408 if ${ac_cv_sizeof_long+:} false; then :
13409   $as_echo_n "(cached) " >&6
13410 else
13411   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
13412
13413 else
13414   if test "$ac_cv_type_long" = yes; then
13415      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13416 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13417 as_fn_error 77 "cannot compute sizeof (long)
13418 See \`config.log' for more details" "$LINENO" 5; }
13419    else
13420      ac_cv_sizeof_long=0
13421    fi
13422 fi
13423
13424 fi
13425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
13426 $as_echo "$ac_cv_sizeof_long" >&6; }
13427
13428
13429
13430 cat >>confdefs.h <<_ACEOF
13431 #define SIZEOF_LONG $ac_cv_sizeof_long
13432 _ACEOF
13433
13434
13435
13436 # Decide whether float4 is passed by value: user-selectable, enabled by default
13437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float4 passed by value" >&5
13438 $as_echo_n "checking whether to build with float4 passed by value... " >&6; }
13439
13440
13441 # Check whether --enable-float4-byval was given.
13442 if test "${enable_float4_byval+set}" = set; then :
13443   enableval=$enable_float4_byval;
13444   case $enableval in
13445     yes)
13446
13447 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
13448
13449                float4passbyval=true
13450       ;;
13451     no)
13452       float4passbyval=false
13453       ;;
13454     *)
13455       as_fn_error $? "no argument expected for --enable-float4-byval option" "$LINENO" 5
13456       ;;
13457   esac
13458
13459 else
13460   enable_float4_byval=yes
13461
13462 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
13463
13464                float4passbyval=true
13465 fi
13466
13467
13468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float4_byval" >&5
13469 $as_echo "$enable_float4_byval" >&6; }
13470
13471 cat >>confdefs.h <<_ACEOF
13472 #define FLOAT4PASSBYVAL $float4passbyval
13473 _ACEOF
13474
13475
13476 # Decide whether float8 is passed by value.
13477 # Note: this setting also controls int8 and related types such as timestamp.
13478 # If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
13479 # If not, trying to select it is an error.
13480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float8 passed by value" >&5
13481 $as_echo_n "checking whether to build with float8 passed by value... " >&6; }
13482 if test $ac_cv_sizeof_void_p -ge 8 ; then
13483
13484
13485 # Check whether --enable-float8-byval was given.
13486 if test "${enable_float8_byval+set}" = set; then :
13487   enableval=$enable_float8_byval;
13488   case $enableval in
13489     yes)
13490       :
13491       ;;
13492     no)
13493       :
13494       ;;
13495     *)
13496       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
13497       ;;
13498   esac
13499
13500 else
13501   enable_float8_byval=yes
13502
13503 fi
13504
13505
13506 else
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=no
13526
13527 fi
13528
13529
13530   if test "$enable_float8_byval" = yes ; then
13531     as_fn_error $? "--enable-float8-byval is not supported on 32-bit platforms." "$LINENO" 5
13532   fi
13533 fi
13534 if test "$enable_float8_byval" = yes ; then
13535
13536 $as_echo "#define USE_FLOAT8_BYVAL 1" >>confdefs.h
13537
13538   float8passbyval=true
13539 else
13540   float8passbyval=false
13541 fi
13542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float8_byval" >&5
13543 $as_echo "$enable_float8_byval" >&6; }
13544
13545 cat >>confdefs.h <<_ACEOF
13546 #define FLOAT8PASSBYVAL $float8passbyval
13547 _ACEOF
13548
13549
13550 # Determine memory alignment requirements for the basic C data types.
13551
13552 # The cast to long int works around a bug in the HP C Compiler,
13553 # see AC_CHECK_SIZEOF for more information.
13554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
13555 $as_echo_n "checking alignment of short... " >&6; }
13556 if ${ac_cv_alignof_short+:} false; then :
13557   $as_echo_n "(cached) " >&6
13558 else
13559   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short"        "$ac_includes_default
13560 #ifndef offsetof
13561 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13562 #endif
13563 typedef struct { char x; short y; } ac__type_alignof_;"; then :
13564
13565 else
13566   if test "$ac_cv_type_short" = yes; then
13567      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13568 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13569 as_fn_error 77 "cannot compute alignment of short
13570 See \`config.log' for more details" "$LINENO" 5; }
13571    else
13572      ac_cv_alignof_short=0
13573    fi
13574 fi
13575
13576 fi
13577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
13578 $as_echo "$ac_cv_alignof_short" >&6; }
13579
13580
13581
13582 cat >>confdefs.h <<_ACEOF
13583 #define ALIGNOF_SHORT $ac_cv_alignof_short
13584 _ACEOF
13585
13586
13587 # The cast to long int works around a bug in the HP C Compiler,
13588 # see AC_CHECK_SIZEOF for more information.
13589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
13590 $as_echo_n "checking alignment of int... " >&6; }
13591 if ${ac_cv_alignof_int+:} false; then :
13592   $as_echo_n "(cached) " >&6
13593 else
13594   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int"        "$ac_includes_default
13595 #ifndef offsetof
13596 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13597 #endif
13598 typedef struct { char x; int y; } ac__type_alignof_;"; then :
13599
13600 else
13601   if test "$ac_cv_type_int" = yes; then
13602      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13603 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13604 as_fn_error 77 "cannot compute alignment of int
13605 See \`config.log' for more details" "$LINENO" 5; }
13606    else
13607      ac_cv_alignof_int=0
13608    fi
13609 fi
13610
13611 fi
13612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
13613 $as_echo "$ac_cv_alignof_int" >&6; }
13614
13615
13616
13617 cat >>confdefs.h <<_ACEOF
13618 #define ALIGNOF_INT $ac_cv_alignof_int
13619 _ACEOF
13620
13621
13622 # The cast to long int works around a bug in the HP C Compiler,
13623 # see AC_CHECK_SIZEOF for more information.
13624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
13625 $as_echo_n "checking alignment of long... " >&6; }
13626 if ${ac_cv_alignof_long+:} false; then :
13627   $as_echo_n "(cached) " >&6
13628 else
13629   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long"        "$ac_includes_default
13630 #ifndef offsetof
13631 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13632 #endif
13633 typedef struct { char x; long y; } ac__type_alignof_;"; then :
13634
13635 else
13636   if test "$ac_cv_type_long" = yes; then
13637      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13638 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13639 as_fn_error 77 "cannot compute alignment of long
13640 See \`config.log' for more details" "$LINENO" 5; }
13641    else
13642      ac_cv_alignof_long=0
13643    fi
13644 fi
13645
13646 fi
13647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
13648 $as_echo "$ac_cv_alignof_long" >&6; }
13649
13650
13651
13652 cat >>confdefs.h <<_ACEOF
13653 #define ALIGNOF_LONG $ac_cv_alignof_long
13654 _ACEOF
13655
13656
13657 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
13658   # The cast to long int works around a bug in the HP C Compiler,
13659 # see AC_CHECK_SIZEOF for more information.
13660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
13661 $as_echo_n "checking alignment of long long int... " >&6; }
13662 if ${ac_cv_alignof_long_long_int+:} false; then :
13663   $as_echo_n "(cached) " >&6
13664 else
13665   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int"        "$ac_includes_default
13666 #ifndef offsetof
13667 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13668 #endif
13669 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
13670
13671 else
13672   if test "$ac_cv_type_long_long_int" = yes; then
13673      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13674 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13675 as_fn_error 77 "cannot compute alignment of long long int
13676 See \`config.log' for more details" "$LINENO" 5; }
13677    else
13678      ac_cv_alignof_long_long_int=0
13679    fi
13680 fi
13681
13682 fi
13683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
13684 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
13685
13686
13687
13688 cat >>confdefs.h <<_ACEOF
13689 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
13690 _ACEOF
13691
13692
13693 fi
13694 # The cast to long int works around a bug in the HP C Compiler,
13695 # see AC_CHECK_SIZEOF for more information.
13696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
13697 $as_echo_n "checking alignment of double... " >&6; }
13698 if ${ac_cv_alignof_double+:} false; then :
13699   $as_echo_n "(cached) " >&6
13700 else
13701   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double"        "$ac_includes_default
13702 #ifndef offsetof
13703 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13704 #endif
13705 typedef struct { char x; double y; } ac__type_alignof_;"; then :
13706
13707 else
13708   if test "$ac_cv_type_double" = yes; then
13709      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13710 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13711 as_fn_error 77 "cannot compute alignment of double
13712 See \`config.log' for more details" "$LINENO" 5; }
13713    else
13714      ac_cv_alignof_double=0
13715    fi
13716 fi
13717
13718 fi
13719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
13720 $as_echo "$ac_cv_alignof_double" >&6; }
13721
13722
13723
13724 cat >>confdefs.h <<_ACEOF
13725 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
13726 _ACEOF
13727
13728
13729
13730 # Compute maximum alignment of any basic type.
13731 # We assume long's alignment is at least as strong as char, short, or int;
13732 # but we must check long long (if it exists) and double.
13733
13734 MAX_ALIGNOF=$ac_cv_alignof_long
13735 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
13736   MAX_ALIGNOF=$ac_cv_alignof_double
13737 fi
13738 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
13739   MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
13740 fi
13741
13742 cat >>confdefs.h <<_ACEOF
13743 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
13744 _ACEOF
13745
13746
13747
13748 # Some platforms predefine the types int8, int16, etc.  Only check
13749 # a (hopefully) representative subset.
13750 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
13751 "
13752 if test "x$ac_cv_type_int8" = xyes; then :
13753
13754 cat >>confdefs.h <<_ACEOF
13755 #define HAVE_INT8 1
13756 _ACEOF
13757
13758
13759 fi
13760 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
13761 "
13762 if test "x$ac_cv_type_uint8" = xyes; then :
13763
13764 cat >>confdefs.h <<_ACEOF
13765 #define HAVE_UINT8 1
13766 _ACEOF
13767
13768
13769 fi
13770 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
13771 "
13772 if test "x$ac_cv_type_int64" = xyes; then :
13773
13774 cat >>confdefs.h <<_ACEOF
13775 #define HAVE_INT64 1
13776 _ACEOF
13777
13778
13779 fi
13780 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
13781 "
13782 if test "x$ac_cv_type_uint64" = xyes; then :
13783
13784 cat >>confdefs.h <<_ACEOF
13785 #define HAVE_UINT64 1
13786 _ACEOF
13787
13788
13789 fi
13790
13791
13792 # We also check for sig_atomic_t, which *should* be defined per ANSI
13793 # C, but is missing on some old platforms.
13794 ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "#include <signal.h>
13795 "
13796 if test "x$ac_cv_type_sig_atomic_t" = xyes; then :
13797
13798 cat >>confdefs.h <<_ACEOF
13799 #define HAVE_SIG_ATOMIC_T 1
13800 _ACEOF
13801
13802
13803 fi
13804
13805
13806 # Check for various atomic operations now that we have checked how to declare
13807 # 64bit integers.
13808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
13809 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
13810 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
13811   $as_echo_n "(cached) " >&6
13812 else
13813   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13814 /* end confdefs.h.  */
13815
13816 int
13817 main ()
13818 {
13819 char lock = 0;
13820    __sync_lock_test_and_set(&lock, 1);
13821    __sync_lock_release(&lock);
13822   ;
13823   return 0;
13824 }
13825 _ACEOF
13826 if ac_fn_c_try_link "$LINENO"; then :
13827   pgac_cv_gcc_sync_char_tas="yes"
13828 else
13829   pgac_cv_gcc_sync_char_tas="no"
13830 fi
13831 rm -f core conftest.err conftest.$ac_objext \
13832     conftest$ac_exeext conftest.$ac_ext
13833 fi
13834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
13835 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
13836 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
13837
13838 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
13839
13840 fi
13841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
13842 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
13843 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
13844   $as_echo_n "(cached) " >&6
13845 else
13846   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13847 /* end confdefs.h.  */
13848
13849 int
13850 main ()
13851 {
13852 int lock = 0;
13853    __sync_lock_test_and_set(&lock, 1);
13854    __sync_lock_release(&lock);
13855   ;
13856   return 0;
13857 }
13858 _ACEOF
13859 if ac_fn_c_try_link "$LINENO"; then :
13860   pgac_cv_gcc_sync_int32_tas="yes"
13861 else
13862   pgac_cv_gcc_sync_int32_tas="no"
13863 fi
13864 rm -f core conftest.err conftest.$ac_objext \
13865     conftest$ac_exeext conftest.$ac_ext
13866 fi
13867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
13868 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
13869 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
13870
13871 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
13872
13873 fi
13874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
13875 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
13876 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
13877   $as_echo_n "(cached) " >&6
13878 else
13879   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13880 /* end confdefs.h.  */
13881
13882 int
13883 main ()
13884 {
13885 int val = 0;
13886    __sync_val_compare_and_swap(&val, 0, 37);
13887   ;
13888   return 0;
13889 }
13890 _ACEOF
13891 if ac_fn_c_try_link "$LINENO"; then :
13892   pgac_cv_gcc_sync_int32_cas="yes"
13893 else
13894   pgac_cv_gcc_sync_int32_cas="no"
13895 fi
13896 rm -f core conftest.err conftest.$ac_objext \
13897     conftest$ac_exeext conftest.$ac_ext
13898 fi
13899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
13900 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
13901 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
13902
13903 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
13904
13905 fi
13906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
13907 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
13908 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
13909   $as_echo_n "(cached) " >&6
13910 else
13911   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13912 /* end confdefs.h.  */
13913
13914 int
13915 main ()
13916 {
13917 PG_INT64_TYPE lock = 0;
13918    __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
13919   ;
13920   return 0;
13921 }
13922 _ACEOF
13923 if ac_fn_c_try_link "$LINENO"; then :
13924   pgac_cv_gcc_sync_int64_cas="yes"
13925 else
13926   pgac_cv_gcc_sync_int64_cas="no"
13927 fi
13928 rm -f core conftest.err conftest.$ac_objext \
13929     conftest$ac_exeext conftest.$ac_ext
13930 fi
13931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
13932 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
13933 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
13934
13935 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
13936
13937 fi
13938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
13939 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
13940 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
13941   $as_echo_n "(cached) " >&6
13942 else
13943   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13944 /* end confdefs.h.  */
13945
13946 int
13947 main ()
13948 {
13949 int val = 0;
13950    int expect = 0;
13951    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
13952   ;
13953   return 0;
13954 }
13955 _ACEOF
13956 if ac_fn_c_try_link "$LINENO"; then :
13957   pgac_cv_gcc_atomic_int32_cas="yes"
13958 else
13959   pgac_cv_gcc_atomic_int32_cas="no"
13960 fi
13961 rm -f core conftest.err conftest.$ac_objext \
13962     conftest$ac_exeext conftest.$ac_ext
13963 fi
13964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
13965 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
13966 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
13967
13968 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
13969
13970 fi
13971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
13972 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
13973 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
13974   $as_echo_n "(cached) " >&6
13975 else
13976   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13977 /* end confdefs.h.  */
13978
13979 int
13980 main ()
13981 {
13982 PG_INT64_TYPE val = 0;
13983    PG_INT64_TYPE expect = 0;
13984    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
13985   ;
13986   return 0;
13987 }
13988 _ACEOF
13989 if ac_fn_c_try_link "$LINENO"; then :
13990   pgac_cv_gcc_atomic_int64_cas="yes"
13991 else
13992   pgac_cv_gcc_atomic_int64_cas="no"
13993 fi
13994 rm -f core conftest.err conftest.$ac_objext \
13995     conftest$ac_exeext conftest.$ac_ext
13996 fi
13997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
13998 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
13999 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
14000
14001 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
14002
14003 fi
14004
14005 if test "$PORTNAME" != "win32"
14006 then
14007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for POSIX signal interface" >&5
14008 $as_echo_n "checking for POSIX signal interface... " >&6; }
14009 if ${pgac_cv_func_posix_signals+:} false; then :
14010   $as_echo_n "(cached) " >&6
14011 else
14012   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14013 /* end confdefs.h.  */
14014 #include <signal.h>
14015
14016 int
14017 main ()
14018 {
14019 struct sigaction act, oact;
14020 sigemptyset(&act.sa_mask);
14021 act.sa_flags = SA_RESTART;
14022 sigaction(0, &act, &oact);
14023   ;
14024   return 0;
14025 }
14026 _ACEOF
14027 if ac_fn_c_try_link "$LINENO"; then :
14028   pgac_cv_func_posix_signals=yes
14029 else
14030   pgac_cv_func_posix_signals=no
14031 fi
14032 rm -f core conftest.err conftest.$ac_objext \
14033     conftest$ac_exeext conftest.$ac_ext
14034 fi
14035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_posix_signals" >&5
14036 $as_echo "$pgac_cv_func_posix_signals" >&6; }
14037 if test x"$pgac_cv_func_posix_signals" = xyes ; then
14038
14039 $as_echo "#define HAVE_POSIX_SIGNALS 1" >>confdefs.h
14040
14041 fi
14042 HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
14043
14044 if test "$pgac_cv_func_posix_signals" != yes -a "$enable_thread_safety" = yes; then
14045   as_fn_error $? "
14046 Thread-safety requires POSIX signals, which are not supported by this
14047 operating system;  use --disable-thread-safety to disable thread safety." "$LINENO" 5
14048 fi
14049 fi
14050
14051
14052 # Select semaphore implementation type.
14053 if test "$PORTNAME" != "win32"; then
14054   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
14055
14056 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
14057
14058     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
14059   else
14060     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
14061
14062 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
14063
14064       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
14065     else
14066
14067 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
14068
14069       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
14070     fi
14071   fi
14072 else
14073
14074 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
14075
14076   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
14077 fi
14078
14079
14080 # Select shared-memory implementation type.
14081 if test "$PORTNAME" != "win32"; then
14082
14083 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
14084
14085   SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
14086 else
14087
14088 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
14089
14090   SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
14091 fi
14092
14093 # Select latch implementation type.
14094 if test "$PORTNAME" != "win32"; then
14095   LATCH_IMPLEMENTATION="src/backend/port/unix_latch.c"
14096 else
14097   LATCH_IMPLEMENTATION="src/backend/port/win32_latch.c"
14098 fi
14099
14100 # If not set in template file, set bytes to use libc memset()
14101 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
14102   MEMSET_LOOP_LIMIT=1024
14103 fi
14104
14105 cat >>confdefs.h <<_ACEOF
14106 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
14107 _ACEOF
14108
14109
14110
14111 if test "$enable_nls" = yes ; then
14112
14113   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
14114 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
14115 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
14116   $as_echo_n "(cached) " >&6
14117 else
14118   ac_func_search_save_LIBS=$LIBS
14119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14120 /* end confdefs.h.  */
14121
14122 /* Override any GCC internal prototype to avoid an error.
14123    Use char because int might match the return type of a GCC
14124    builtin and then its argument prototype would still apply.  */
14125 #ifdef __cplusplus
14126 extern "C"
14127 #endif
14128 char bind_textdomain_codeset ();
14129 int
14130 main ()
14131 {
14132 return bind_textdomain_codeset ();
14133   ;
14134   return 0;
14135 }
14136 _ACEOF
14137 for ac_lib in '' intl; do
14138   if test -z "$ac_lib"; then
14139     ac_res="none required"
14140   else
14141     ac_res=-l$ac_lib
14142     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14143   fi
14144   if ac_fn_c_try_link "$LINENO"; then :
14145   ac_cv_search_bind_textdomain_codeset=$ac_res
14146 fi
14147 rm -f core conftest.err conftest.$ac_objext \
14148     conftest$ac_exeext
14149   if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
14150   break
14151 fi
14152 done
14153 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
14154
14155 else
14156   ac_cv_search_bind_textdomain_codeset=no
14157 fi
14158 rm conftest.$ac_ext
14159 LIBS=$ac_func_search_save_LIBS
14160 fi
14161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
14162 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
14163 ac_res=$ac_cv_search_bind_textdomain_codeset
14164 if test "$ac_res" != no; then :
14165   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14166
14167 else
14168   as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
14169 fi
14170
14171   ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
14172 if test "x$ac_cv_header_libintl_h" = xyes; then :
14173
14174 else
14175   as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
14176 fi
14177
14178
14179   for ac_prog in msgfmt
14180 do
14181   # Extract the first word of "$ac_prog", so it can be a program name with args.
14182 set dummy $ac_prog; ac_word=$2
14183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14184 $as_echo_n "checking for $ac_word... " >&6; }
14185 if ${ac_cv_prog_MSGFMT+:} false; then :
14186   $as_echo_n "(cached) " >&6
14187 else
14188   if test -n "$MSGFMT"; then
14189   ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
14190 else
14191 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14192 for as_dir in $PATH
14193 do
14194   IFS=$as_save_IFS
14195   test -z "$as_dir" && as_dir=.
14196     for ac_exec_ext in '' $ac_executable_extensions; do
14197   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14198     ac_cv_prog_MSGFMT="$ac_prog"
14199     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14200     break 2
14201   fi
14202 done
14203   done
14204 IFS=$as_save_IFS
14205
14206 fi
14207 fi
14208 MSGFMT=$ac_cv_prog_MSGFMT
14209 if test -n "$MSGFMT"; then
14210   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
14211 $as_echo "$MSGFMT" >&6; }
14212 else
14213   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14214 $as_echo "no" >&6; }
14215 fi
14216
14217
14218   test -n "$MSGFMT" && break
14219 done
14220
14221   if test -z "$MSGFMT"; then
14222     as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
14223   fi
14224   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
14225 $as_echo_n "checking for msgfmt flags... " >&6; }
14226 if ${pgac_cv_msgfmt_flags+:} false; then :
14227   $as_echo_n "(cached) " >&6
14228 else
14229   if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
14230     pgac_cv_msgfmt_flags=-c
14231 fi
14232 fi
14233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
14234 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
14235   MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
14236
14237   for ac_prog in msgmerge
14238 do
14239   # Extract the first word of "$ac_prog", so it can be a program name with args.
14240 set dummy $ac_prog; ac_word=$2
14241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14242 $as_echo_n "checking for $ac_word... " >&6; }
14243 if ${ac_cv_prog_MSGMERGE+:} false; then :
14244   $as_echo_n "(cached) " >&6
14245 else
14246   if test -n "$MSGMERGE"; then
14247   ac_cv_prog_MSGMERGE="$MSGMERGE" # Let the user override the test.
14248 else
14249 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14250 for as_dir in $PATH
14251 do
14252   IFS=$as_save_IFS
14253   test -z "$as_dir" && as_dir=.
14254     for ac_exec_ext in '' $ac_executable_extensions; do
14255   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14256     ac_cv_prog_MSGMERGE="$ac_prog"
14257     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14258     break 2
14259   fi
14260 done
14261   done
14262 IFS=$as_save_IFS
14263
14264 fi
14265 fi
14266 MSGMERGE=$ac_cv_prog_MSGMERGE
14267 if test -n "$MSGMERGE"; then
14268   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
14269 $as_echo "$MSGMERGE" >&6; }
14270 else
14271   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14272 $as_echo "no" >&6; }
14273 fi
14274
14275
14276   test -n "$MSGMERGE" && break
14277 done
14278
14279   for ac_prog in xgettext
14280 do
14281   # Extract the first word of "$ac_prog", so it can be a program name with args.
14282 set dummy $ac_prog; ac_word=$2
14283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14284 $as_echo_n "checking for $ac_word... " >&6; }
14285 if ${ac_cv_prog_XGETTEXT+:} false; then :
14286   $as_echo_n "(cached) " >&6
14287 else
14288   if test -n "$XGETTEXT"; then
14289   ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test.
14290 else
14291 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14292 for as_dir in $PATH
14293 do
14294   IFS=$as_save_IFS
14295   test -z "$as_dir" && as_dir=.
14296     for ac_exec_ext in '' $ac_executable_extensions; do
14297   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14298     ac_cv_prog_XGETTEXT="$ac_prog"
14299     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14300     break 2
14301   fi
14302 done
14303   done
14304 IFS=$as_save_IFS
14305
14306 fi
14307 fi
14308 XGETTEXT=$ac_cv_prog_XGETTEXT
14309 if test -n "$XGETTEXT"; then
14310   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
14311 $as_echo "$XGETTEXT" >&6; }
14312 else
14313   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14314 $as_echo "no" >&6; }
14315 fi
14316
14317
14318   test -n "$XGETTEXT" && break
14319 done
14320
14321
14322 fi
14323
14324 # Check for Tcl configuration script tclConfig.sh
14325 if test "$with_tcl" = yes; then
14326     for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84 tclsh8.3 tclsh83
14327 do
14328   # Extract the first word of "$ac_prog", so it can be a program name with args.
14329 set dummy $ac_prog; ac_word=$2
14330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14331 $as_echo_n "checking for $ac_word... " >&6; }
14332 if ${ac_cv_path_TCLSH+:} false; then :
14333   $as_echo_n "(cached) " >&6
14334 else
14335   case $TCLSH in
14336   [\\/]* | ?:[\\/]*)
14337   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
14338   ;;
14339   *)
14340   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14341 for as_dir in $PATH
14342 do
14343   IFS=$as_save_IFS
14344   test -z "$as_dir" && as_dir=.
14345     for ac_exec_ext in '' $ac_executable_extensions; do
14346   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14347     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
14348     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14349     break 2
14350   fi
14351 done
14352   done
14353 IFS=$as_save_IFS
14354
14355   ;;
14356 esac
14357 fi
14358 TCLSH=$ac_cv_path_TCLSH
14359 if test -n "$TCLSH"; then
14360   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
14361 $as_echo "$TCLSH" >&6; }
14362 else
14363   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14364 $as_echo "no" >&6; }
14365 fi
14366
14367
14368   test -n "$TCLSH" && break
14369 done
14370
14371 if test x"$TCLSH" = x""; then
14372   as_fn_error $? "Tcl shell not found" "$LINENO" 5
14373 fi
14374
14375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
14376 $as_echo_n "checking for tclConfig.sh... " >&6; }
14377 # Let user override test
14378 if test -z "$TCL_CONFIG_SH"; then
14379     pgac_test_dirs="$with_tclconfig"
14380
14381     set X $pgac_test_dirs; shift
14382     if test $# -eq 0; then
14383         test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
14384         set X `echo 'puts $auto_path' | $TCLSH`; shift
14385     fi
14386
14387     for pgac_dir do
14388         if test -r "$pgac_dir/tclConfig.sh"; then
14389             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
14390             break
14391         fi
14392     done
14393 fi
14394
14395 if test -z "$TCL_CONFIG_SH"; then
14396     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14397 $as_echo "no" >&6; }
14398     as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
14399 else
14400     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
14401 $as_echo "$TCL_CONFIG_SH" >&6; }
14402 fi
14403
14404
14405
14406     . "$TCL_CONFIG_SH"
14407 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
14408 eval TCL_LIB_FILE=\"$TCL_LIB_FILE\"
14409 eval TCL_LIBS=\"$TCL_LIBS\"
14410 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
14411 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
14412
14413         # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
14414     ac_save_CPPFLAGS=$CPPFLAGS
14415     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
14416     ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
14417 if test "x$ac_cv_header_tcl_h" = xyes; then :
14418
14419 else
14420   as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
14421 fi
14422
14423
14424     CPPFLAGS=$ac_save_CPPFLAGS
14425 fi
14426
14427 # check for <perl.h>
14428 if test "$with_perl" = yes; then
14429   ac_save_CPPFLAGS=$CPPFLAGS
14430   CPPFLAGS="$CPPFLAGS -I$perl_archlibexp/CORE"
14431   ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
14432 "
14433 if test "x$ac_cv_header_perl_h" = xyes; then :
14434
14435 else
14436   as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
14437 fi
14438
14439
14440   # While we're at it, check that we can link to libperl.
14441   # On most platforms, if perl.h is there then libperl.so will be too, but at
14442   # this writing Debian packages them separately.  There is no known reason to
14443   # waste cycles on separate probes for the Tcl or Python libraries, though.
14444   pgac_save_LIBS=$LIBS
14445   LIBS="$perl_embed_ldflags"
14446   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
14447 $as_echo_n "checking for libperl... " >&6; }
14448   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14449 /* end confdefs.h.  */
14450
14451 #include <EXTERN.h>
14452 #include <perl.h>
14453
14454 int
14455 main ()
14456 {
14457 perl_alloc();
14458   ;
14459   return 0;
14460 }
14461 _ACEOF
14462 if ac_fn_c_try_link "$LINENO"; then :
14463   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14464 $as_echo "yes" >&6; }
14465 else
14466   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14467 $as_echo "no" >&6; }
14468      as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
14469 fi
14470 rm -f core conftest.err conftest.$ac_objext \
14471     conftest$ac_exeext conftest.$ac_ext
14472   LIBS=$pgac_save_LIBS
14473   CPPFLAGS=$ac_save_CPPFLAGS
14474 fi
14475
14476 # check for <Python.h>
14477 if test "$with_python" = yes; then
14478   ac_save_CPPFLAGS=$CPPFLAGS
14479   CPPFLAGS="$python_includespec $CPPFLAGS"
14480   ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
14481 if test "x$ac_cv_header_Python_h" = xyes; then :
14482
14483 else
14484   as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
14485 fi
14486
14487
14488   CPPFLAGS=$ac_save_CPPFLAGS
14489 fi
14490
14491 #
14492 # Check for DocBook and tools
14493 #
14494 for ac_prog in onsgmls nsgmls
14495 do
14496   # Extract the first word of "$ac_prog", so it can be a program name with args.
14497 set dummy $ac_prog; ac_word=$2
14498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14499 $as_echo_n "checking for $ac_word... " >&6; }
14500 if ${ac_cv_prog_NSGMLS+:} false; then :
14501   $as_echo_n "(cached) " >&6
14502 else
14503   if test -n "$NSGMLS"; then
14504   ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
14505 else
14506 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14507 for as_dir in $PATH
14508 do
14509   IFS=$as_save_IFS
14510   test -z "$as_dir" && as_dir=.
14511     for ac_exec_ext in '' $ac_executable_extensions; do
14512   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14513     ac_cv_prog_NSGMLS="$ac_prog"
14514     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14515     break 2
14516   fi
14517 done
14518   done
14519 IFS=$as_save_IFS
14520
14521 fi
14522 fi
14523 NSGMLS=$ac_cv_prog_NSGMLS
14524 if test -n "$NSGMLS"; then
14525   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NSGMLS" >&5
14526 $as_echo "$NSGMLS" >&6; }
14527 else
14528   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14529 $as_echo "no" >&6; }
14530 fi
14531
14532
14533   test -n "$NSGMLS" && break
14534 done
14535
14536 for ac_prog in openjade jade
14537 do
14538   # Extract the first word of "$ac_prog", so it can be a program name with args.
14539 set dummy $ac_prog; ac_word=$2
14540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14541 $as_echo_n "checking for $ac_word... " >&6; }
14542 if ${ac_cv_prog_JADE+:} false; then :
14543   $as_echo_n "(cached) " >&6
14544 else
14545   if test -n "$JADE"; then
14546   ac_cv_prog_JADE="$JADE" # Let the user override the test.
14547 else
14548 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14549 for as_dir in $PATH
14550 do
14551   IFS=$as_save_IFS
14552   test -z "$as_dir" && as_dir=.
14553     for ac_exec_ext in '' $ac_executable_extensions; do
14554   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14555     ac_cv_prog_JADE="$ac_prog"
14556     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14557     break 2
14558   fi
14559 done
14560   done
14561 IFS=$as_save_IFS
14562
14563 fi
14564 fi
14565 JADE=$ac_cv_prog_JADE
14566 if test -n "$JADE"; then
14567   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JADE" >&5
14568 $as_echo "$JADE" >&6; }
14569 else
14570   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14571 $as_echo "no" >&6; }
14572 fi
14573
14574
14575   test -n "$JADE" && break
14576 done
14577
14578
14579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook V4.2" >&5
14580 $as_echo_n "checking for DocBook V4.2... " >&6; }
14581 if ${pgac_cv_check_docbook+:} false; then :
14582   $as_echo_n "(cached) " >&6
14583 else
14584   cat >conftest.sgml <<EOF
14585 <!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
14586 <book>
14587  <title>test</title>
14588  <chapter>
14589   <title>random</title>
14590    <sect1>
14591     <title>testsect</title>
14592     <para>text</para>
14593   </sect1>
14594  </chapter>
14595 </book>
14596 EOF
14597
14598 pgac_cv_check_docbook=no
14599
14600 if test -n "$NSGMLS"; then
14601   $NSGMLS -s conftest.sgml 1>&5 2>&1
14602   if test $? -eq 0; then
14603     pgac_cv_check_docbook=yes
14604   fi
14605 fi
14606 rm -f conftest.sgml
14607 fi
14608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_docbook" >&5
14609 $as_echo "$pgac_cv_check_docbook" >&6; }
14610
14611 have_docbook=$pgac_cv_check_docbook
14612
14613
14614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook stylesheets" >&5
14615 $as_echo_n "checking for DocBook stylesheets... " >&6; }
14616 if ${pgac_cv_path_stylesheets+:} false; then :
14617   $as_echo_n "(cached) " >&6
14618 else
14619   if test -n "$DOCBOOKSTYLE"; then
14620   pgac_cv_path_stylesheets=$DOCBOOKSTYLE
14621 else
14622   for pgac_prefix in /usr /usr/local /opt /sw; do
14623     for pgac_infix in share lib; do
14624       for pgac_postfix in \
14625         sgml/stylesheets/nwalsh-modular \
14626         sgml/stylesheets/docbook \
14627         sgml/stylesheets/dsssl/docbook \
14628         sgml/docbook-dsssl \
14629         sgml/docbook/dsssl/modular \
14630         sgml/docbook/stylesheet/dsssl/modular \
14631         sgml/docbook/dsssl-stylesheets \
14632         sgml/dsssl/docbook-dsssl-nwalsh
14633       do
14634         pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
14635         if test -r "$pgac_candidate/html/docbook.dsl" \
14636            && test -r "$pgac_candidate/print/docbook.dsl"
14637         then
14638           pgac_cv_path_stylesheets=$pgac_candidate
14639           break 3
14640         fi
14641       done
14642     done
14643   done
14644 fi
14645 fi
14646
14647 DOCBOOKSTYLE=$pgac_cv_path_stylesheets
14648
14649 if test -n "$DOCBOOKSTYLE"; then
14650   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOCBOOKSTYLE" >&5
14651 $as_echo "$DOCBOOKSTYLE" >&6; }
14652 else
14653   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14654 $as_echo "no" >&6; }
14655 fi
14656 if test -n "$DOCBOOKSTYLE" -a -r "$DOCBOOKSTYLE/bin/collateindex.pl"; then
14657   COLLATEINDEX="$DOCBOOKSTYLE/bin/collateindex.pl"
14658
14659 else
14660   # Extract the first word of "collateindex.pl", so it can be a program name with args.
14661 set dummy collateindex.pl; ac_word=$2
14662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14663 $as_echo_n "checking for $ac_word... " >&6; }
14664 if ${ac_cv_path_COLLATEINDEX+:} false; then :
14665   $as_echo_n "(cached) " >&6
14666 else
14667   case $COLLATEINDEX in
14668   [\\/]* | ?:[\\/]*)
14669   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
14670   ;;
14671   *)
14672   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14673 for as_dir in $PATH
14674 do
14675   IFS=$as_save_IFS
14676   test -z "$as_dir" && as_dir=.
14677     for ac_exec_ext in '' $ac_executable_extensions; do
14678   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14679     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
14680     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14681     break 2
14682   fi
14683 done
14684   done
14685 IFS=$as_save_IFS
14686
14687   ;;
14688 esac
14689 fi
14690 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
14691 if test -n "$COLLATEINDEX"; then
14692   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COLLATEINDEX" >&5
14693 $as_echo "$COLLATEINDEX" >&6; }
14694 else
14695   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14696 $as_echo "no" >&6; }
14697 fi
14698
14699
14700 fi
14701 for ac_prog in dbtoepub
14702 do
14703   # Extract the first word of "$ac_prog", so it can be a program name with args.
14704 set dummy $ac_prog; ac_word=$2
14705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14706 $as_echo_n "checking for $ac_word... " >&6; }
14707 if ${ac_cv_prog_DBTOEPUB+:} false; then :
14708   $as_echo_n "(cached) " >&6
14709 else
14710   if test -n "$DBTOEPUB"; then
14711   ac_cv_prog_DBTOEPUB="$DBTOEPUB" # Let the user override the test.
14712 else
14713 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14714 for as_dir in $PATH
14715 do
14716   IFS=$as_save_IFS
14717   test -z "$as_dir" && as_dir=.
14718     for ac_exec_ext in '' $ac_executable_extensions; do
14719   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14720     ac_cv_prog_DBTOEPUB="$ac_prog"
14721     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14722     break 2
14723   fi
14724 done
14725   done
14726 IFS=$as_save_IFS
14727
14728 fi
14729 fi
14730 DBTOEPUB=$ac_cv_prog_DBTOEPUB
14731 if test -n "$DBTOEPUB"; then
14732   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
14733 $as_echo "$DBTOEPUB" >&6; }
14734 else
14735   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14736 $as_echo "no" >&6; }
14737 fi
14738
14739
14740   test -n "$DBTOEPUB" && break
14741 done
14742
14743 for ac_prog in xmllint
14744 do
14745   # Extract the first word of "$ac_prog", so it can be a program name with args.
14746 set dummy $ac_prog; ac_word=$2
14747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14748 $as_echo_n "checking for $ac_word... " >&6; }
14749 if ${ac_cv_prog_XMLLINT+:} false; then :
14750   $as_echo_n "(cached) " >&6
14751 else
14752   if test -n "$XMLLINT"; then
14753   ac_cv_prog_XMLLINT="$XMLLINT" # Let the user override the test.
14754 else
14755 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14756 for as_dir in $PATH
14757 do
14758   IFS=$as_save_IFS
14759   test -z "$as_dir" && as_dir=.
14760     for ac_exec_ext in '' $ac_executable_extensions; do
14761   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14762     ac_cv_prog_XMLLINT="$ac_prog"
14763     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14764     break 2
14765   fi
14766 done
14767   done
14768 IFS=$as_save_IFS
14769
14770 fi
14771 fi
14772 XMLLINT=$ac_cv_prog_XMLLINT
14773 if test -n "$XMLLINT"; then
14774   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
14775 $as_echo "$XMLLINT" >&6; }
14776 else
14777   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14778 $as_echo "no" >&6; }
14779 fi
14780
14781
14782   test -n "$XMLLINT" && break
14783 done
14784
14785 for ac_prog in xsltproc
14786 do
14787   # Extract the first word of "$ac_prog", so it can be a program name with args.
14788 set dummy $ac_prog; ac_word=$2
14789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14790 $as_echo_n "checking for $ac_word... " >&6; }
14791 if ${ac_cv_prog_XSLTPROC+:} false; then :
14792   $as_echo_n "(cached) " >&6
14793 else
14794   if test -n "$XSLTPROC"; then
14795   ac_cv_prog_XSLTPROC="$XSLTPROC" # Let the user override the test.
14796 else
14797 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14798 for as_dir in $PATH
14799 do
14800   IFS=$as_save_IFS
14801   test -z "$as_dir" && as_dir=.
14802     for ac_exec_ext in '' $ac_executable_extensions; do
14803   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14804     ac_cv_prog_XSLTPROC="$ac_prog"
14805     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14806     break 2
14807   fi
14808 done
14809   done
14810 IFS=$as_save_IFS
14811
14812 fi
14813 fi
14814 XSLTPROC=$ac_cv_prog_XSLTPROC
14815 if test -n "$XSLTPROC"; then
14816   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
14817 $as_echo "$XSLTPROC" >&6; }
14818 else
14819   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14820 $as_echo "no" >&6; }
14821 fi
14822
14823
14824   test -n "$XSLTPROC" && break
14825 done
14826
14827 for ac_prog in osx sgml2xml sx
14828 do
14829   # Extract the first word of "$ac_prog", so it can be a program name with args.
14830 set dummy $ac_prog; ac_word=$2
14831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14832 $as_echo_n "checking for $ac_word... " >&6; }
14833 if ${ac_cv_prog_OSX+:} false; then :
14834   $as_echo_n "(cached) " >&6
14835 else
14836   if test -n "$OSX"; then
14837   ac_cv_prog_OSX="$OSX" # Let the user override the test.
14838 else
14839 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14840 for as_dir in $PATH
14841 do
14842   IFS=$as_save_IFS
14843   test -z "$as_dir" && as_dir=.
14844     for ac_exec_ext in '' $ac_executable_extensions; do
14845   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14846     ac_cv_prog_OSX="$ac_prog"
14847     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14848     break 2
14849   fi
14850 done
14851   done
14852 IFS=$as_save_IFS
14853
14854 fi
14855 fi
14856 OSX=$ac_cv_prog_OSX
14857 if test -n "$OSX"; then
14858   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OSX" >&5
14859 $as_echo "$OSX" >&6; }
14860 else
14861   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14862 $as_echo "no" >&6; }
14863 fi
14864
14865
14866   test -n "$OSX" && break
14867 done
14868
14869
14870 #
14871 # Check for test tools
14872 #
14873 if test "$enable_tap_tests" = yes; then
14874   for ac_prog in prove
14875 do
14876   # Extract the first word of "$ac_prog", so it can be a program name with args.
14877 set dummy $ac_prog; ac_word=$2
14878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14879 $as_echo_n "checking for $ac_word... " >&6; }
14880 if ${ac_cv_prog_PROVE+:} false; then :
14881   $as_echo_n "(cached) " >&6
14882 else
14883   if test -n "$PROVE"; then
14884   ac_cv_prog_PROVE="$PROVE" # Let the user override the test.
14885 else
14886 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14887 for as_dir in $PATH
14888 do
14889   IFS=$as_save_IFS
14890   test -z "$as_dir" && as_dir=.
14891     for ac_exec_ext in '' $ac_executable_extensions; do
14892   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14893     ac_cv_prog_PROVE="$ac_prog"
14894     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14895     break 2
14896   fi
14897 done
14898   done
14899 IFS=$as_save_IFS
14900
14901 fi
14902 fi
14903 PROVE=$ac_cv_prog_PROVE
14904 if test -n "$PROVE"; then
14905   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
14906 $as_echo "$PROVE" >&6; }
14907 else
14908   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14909 $as_echo "no" >&6; }
14910 fi
14911
14912
14913   test -n "$PROVE" && break
14914 done
14915
14916   if test -z "$PROVE"; then
14917     as_fn_error $? "prove not found" "$LINENO" 5
14918   fi
14919   if test -z "$PERL"; then
14920     as_fn_error $? "Perl not found" "$LINENO" 5
14921   fi
14922 fi
14923
14924 # Thread testing
14925
14926 # We have to run the thread test near the end so we have all our symbols
14927 # defined.  Cross compiling throws a warning.
14928 #
14929 if test "$enable_thread_safety" = yes; then
14930 if test "$PORTNAME" != "win32"
14931 then
14932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking thread safety of required library functions" >&5
14933 $as_echo_n "checking thread safety of required library functions... " >&6; }
14934
14935 _CFLAGS="$CFLAGS"
14936 _LIBS="$LIBS"
14937 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
14938 LIBS="$LIBS $PTHREAD_LIBS"
14939 if test "$cross_compiling" = yes; then :
14940   { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
14941 $as_echo "maybe" >&6; }
14942   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
14943 *** Skipping thread test program because of cross-compile build.
14944 *** Run the program in src/test/thread on the target machine.
14945 " >&5
14946 $as_echo "$as_me: WARNING:
14947 *** Skipping thread test program because of cross-compile build.
14948 *** Run the program in src/test/thread on the target machine.
14949 " >&2;}
14950 else
14951   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14952 /* end confdefs.h.  */
14953 #include "$srcdir/src/test/thread/thread_test.c"
14954 _ACEOF
14955 if ac_fn_c_try_run "$LINENO"; then :
14956   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14957 $as_echo "yes" >&6; }
14958 else
14959   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14960 $as_echo "no" >&6; }
14961   as_fn_error $? "thread test program failed
14962 This platform is not thread-safe.  Check the file 'config.log' or compile
14963 and run src/test/thread/thread_test for the exact reason.
14964 Use --disable-thread-safety to disable thread safety." "$LINENO" 5
14965 fi
14966 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14967   conftest.$ac_objext conftest.beam conftest.$ac_ext
14968 fi
14969
14970 CFLAGS="$_CFLAGS"
14971 LIBS="$_LIBS"
14972 else
14973 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** skipping thread test on Win32" >&5
14974 $as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
14975 fi
14976 fi
14977
14978 # If compiler will take -Wl,--as-needed (or various platform-specific
14979 # spellings thereof) then add that to LDFLAGS.  This is much easier than
14980 # trying to filter LIBS to the minimum for each executable.
14981 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
14982 # libreadline; therefore we postpone testing it until we know what library
14983 # dependencies readline has.  The test code will try to link with $LIBS.
14984 if test "$with_readline" = yes; then
14985   link_test_func=readline
14986 else
14987   link_test_func=exit
14988 fi
14989
14990 if test "$PORTNAME" = "darwin"; then
14991   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
14992 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
14993 if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
14994   $as_echo_n "(cached) " >&6
14995 else
14996   pgac_save_LDFLAGS=$LDFLAGS
14997 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
14998 if test "$cross_compiling" = yes; then :
14999   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
15000 else
15001   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15002 /* end confdefs.h.  */
15003 extern void $link_test_func (); void (*fptr) () = $link_test_func;
15004 int
15005 main ()
15006 {
15007
15008   ;
15009   return 0;
15010 }
15011 _ACEOF
15012 if ac_fn_c_try_run "$LINENO"; then :
15013   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
15014 else
15015   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
15016 fi
15017 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15018   conftest.$ac_objext conftest.beam conftest.$ac_ext
15019 fi
15020
15021 LDFLAGS="$pgac_save_LDFLAGS"
15022 fi
15023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
15024 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
15025 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
15026   LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
15027 fi
15028
15029 elif test "$PORTNAME" = "openbsd"; then
15030   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
15031 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
15032 if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
15033   $as_echo_n "(cached) " >&6
15034 else
15035   pgac_save_LDFLAGS=$LDFLAGS
15036 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
15037 if test "$cross_compiling" = yes; then :
15038   pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
15039 else
15040   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15041 /* end confdefs.h.  */
15042 extern void $link_test_func (); void (*fptr) () = $link_test_func;
15043 int
15044 main ()
15045 {
15046
15047   ;
15048   return 0;
15049 }
15050 _ACEOF
15051 if ac_fn_c_try_run "$LINENO"; then :
15052   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
15053 else
15054   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
15055 fi
15056 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15057   conftest.$ac_objext conftest.beam conftest.$ac_ext
15058 fi
15059
15060 LDFLAGS="$pgac_save_LDFLAGS"
15061 fi
15062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
15063 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
15064 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
15065   LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
15066 fi
15067
15068 else
15069   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
15070 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
15071 if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
15072   $as_echo_n "(cached) " >&6
15073 else
15074   pgac_save_LDFLAGS=$LDFLAGS
15075 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
15076 if test "$cross_compiling" = yes; then :
15077   pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
15078 else
15079   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15080 /* end confdefs.h.  */
15081 extern void $link_test_func (); void (*fptr) () = $link_test_func;
15082 int
15083 main ()
15084 {
15085
15086   ;
15087   return 0;
15088 }
15089 _ACEOF
15090 if ac_fn_c_try_run "$LINENO"; then :
15091   pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
15092 else
15093   pgac_cv_prog_cc_ldflags__Wl___as_needed=no
15094 fi
15095 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15096   conftest.$ac_objext conftest.beam conftest.$ac_ext
15097 fi
15098
15099 LDFLAGS="$pgac_save_LDFLAGS"
15100 fi
15101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
15102 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
15103 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
15104   LDFLAGS="$LDFLAGS -Wl,--as-needed"
15105 fi
15106
15107 fi
15108
15109 # Create compiler version string
15110 if test x"$GCC" = x"yes" ; then
15111   cc_string=`${CC} --version | sed q`
15112   case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
15113 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
15114   cc_string=`${CC} -V 2>&1 | sed q`
15115 else
15116   cc_string=$CC
15117 fi
15118
15119
15120 cat >>confdefs.h <<_ACEOF
15121 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
15122 _ACEOF
15123
15124
15125 # Supply a numeric version string for use by 3rd party add-ons
15126 # awk -F is a regex on some platforms, and not on others, so make "." a tab
15127 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
15128 tr '.' '        ' |
15129 $AWK '{printf "%d%02d%02d", $1, $2, (NF >= 3) ? $3 : 0}'`"
15130
15131 cat >>confdefs.h <<_ACEOF
15132 #define PG_VERSION_NUM $PG_VERSION_NUM
15133 _ACEOF
15134
15135
15136
15137 # Begin output steps
15138
15139 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
15140 $as_echo "$as_me: using compiler=$cc_string" >&6;}
15141 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
15142 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
15143 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
15144 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
15145 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
15146 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
15147
15148 # prepare build tree if outside source tree
15149 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
15150 # Note 2: /bin/pwd might be better than shell's built-in at getting
15151 #         a symlink-free name.
15152 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
15153   vpath_build=no
15154 else
15155   vpath_build=yes
15156   if test "$no_create" != yes; then
15157     $as_echo_n "preparing build tree... " >&6
15158     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
15159     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
15160       || as_fn_error $? "failed" "$LINENO" 5
15161     { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15162 $as_echo "done" >&6; }
15163   fi
15164 fi
15165
15166
15167
15168 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
15169
15170
15171 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}"
15172
15173
15174 if test "$PORTNAME" = "win32"; then
15175 ac_config_commands="$ac_config_commands check_win32_symlinks"
15176
15177 fi
15178
15179 ac_config_headers="$ac_config_headers src/include/pg_config.h"
15180
15181
15182 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
15183
15184
15185 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
15186
15187
15188 cat >confcache <<\_ACEOF
15189 # This file is a shell script that caches the results of configure
15190 # tests run on this system so they can be shared between configure
15191 # scripts and configure runs, see configure's option --config-cache.
15192 # It is not useful on other systems.  If it contains results you don't
15193 # want to keep, you may remove or edit it.
15194 #
15195 # config.status only pays attention to the cache file if you give it
15196 # the --recheck option to rerun configure.
15197 #
15198 # `ac_cv_env_foo' variables (set or unset) will be overridden when
15199 # loading this file, other *unset* `ac_cv_foo' will be assigned the
15200 # following values.
15201
15202 _ACEOF
15203
15204 # The following way of writing the cache mishandles newlines in values,
15205 # but we know of no workaround that is simple, portable, and efficient.
15206 # So, we kill variables containing newlines.
15207 # Ultrix sh set writes to stderr and can't be redirected directly,
15208 # and sets the high bit in the cache file unless we assign to the vars.
15209 (
15210   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15211     eval ac_val=\$$ac_var
15212     case $ac_val in #(
15213     *${as_nl}*)
15214       case $ac_var in #(
15215       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15216 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
15217       esac
15218       case $ac_var in #(
15219       _ | IFS | as_nl) ;; #(
15220       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15221       *) { eval $ac_var=; unset $ac_var;} ;;
15222       esac ;;
15223     esac
15224   done
15225
15226   (set) 2>&1 |
15227     case $as_nl`(ac_space=' '; set) 2>&1` in #(
15228     *${as_nl}ac_space=\ *)
15229       # `set' does not quote correctly, so add quotes: double-quote
15230       # substitution turns \\\\ into \\, and sed turns \\ into \.
15231       sed -n \
15232         "s/'/'\\\\''/g;
15233           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15234       ;; #(
15235     *)
15236       # `set' quotes correctly as required by POSIX, so do not add quotes.
15237       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
15238       ;;
15239     esac |
15240     sort
15241 ) |
15242   sed '
15243      /^ac_cv_env_/b end
15244      t clear
15245      :clear
15246      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15247      t end
15248      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15249      :end' >>confcache
15250 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15251   if test -w "$cache_file"; then
15252     if test "x$cache_file" != "x/dev/null"; then
15253       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15254 $as_echo "$as_me: updating cache $cache_file" >&6;}
15255       if test ! -f "$cache_file" || test -h "$cache_file"; then
15256         cat confcache >"$cache_file"
15257       else
15258         case $cache_file in #(
15259         */* | ?:*)
15260           mv -f confcache "$cache_file"$$ &&
15261           mv -f "$cache_file"$$ "$cache_file" ;; #(
15262         *)
15263           mv -f confcache "$cache_file" ;;
15264         esac
15265       fi
15266     fi
15267   else
15268     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15269 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
15270   fi
15271 fi
15272 rm -f confcache
15273
15274 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15275 # Let make expand exec_prefix.
15276 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15277
15278 DEFS=-DHAVE_CONFIG_H
15279
15280 ac_libobjs=
15281 ac_ltlibobjs=
15282 U=
15283 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15284   # 1. Remove the extension, and $U if already installed.
15285   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
15286   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
15287   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
15288   #    will be set to the directory where LIBOBJS objects are built.
15289   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15290   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
15291 done
15292 LIBOBJS=$ac_libobjs
15293
15294 LTLIBOBJS=$ac_ltlibobjs
15295
15296
15297
15298
15299 : "${CONFIG_STATUS=./config.status}"
15300 ac_write_fail=0
15301 ac_clean_files_save=$ac_clean_files
15302 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15303 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15304 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15305 as_write_fail=0
15306 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
15307 #! $SHELL
15308 # Generated by $as_me.
15309 # Run this file to recreate the current configuration.
15310 # Compiler output produced by configure, useful for debugging
15311 # configure, is in config.log if it exists.
15312
15313 debug=false
15314 ac_cs_recheck=false
15315 ac_cs_silent=false
15316
15317 SHELL=\${CONFIG_SHELL-$SHELL}
15318 export SHELL
15319 _ASEOF
15320 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15321 ## -------------------- ##
15322 ## M4sh Initialization. ##
15323 ## -------------------- ##
15324
15325 # Be more Bourne compatible
15326 DUALCASE=1; export DUALCASE # for MKS sh
15327 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
15328   emulate sh
15329   NULLCMD=:
15330   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
15331   # is contrary to our usage.  Disable this feature.
15332   alias -g '${1+"$@"}'='"$@"'
15333   setopt NO_GLOB_SUBST
15334 else
15335   case `(set -o) 2>/dev/null` in #(
15336   *posix*) :
15337     set -o posix ;; #(
15338   *) :
15339      ;;
15340 esac
15341 fi
15342
15343
15344 as_nl='
15345 '
15346 export as_nl
15347 # Printing a long string crashes Solaris 7 /usr/bin/printf.
15348 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15349 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15350 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15351 # Prefer a ksh shell builtin over an external printf program on Solaris,
15352 # but without wasting forks for bash or zsh.
15353 if test -z "$BASH_VERSION$ZSH_VERSION" \
15354     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15355   as_echo='print -r --'
15356   as_echo_n='print -rn --'
15357 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15358   as_echo='printf %s\n'
15359   as_echo_n='printf %s'
15360 else
15361   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15362     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15363     as_echo_n='/usr/ucb/echo -n'
15364   else
15365     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15366     as_echo_n_body='eval
15367       arg=$1;
15368       case $arg in #(
15369       *"$as_nl"*)
15370         expr "X$arg" : "X\\(.*\\)$as_nl";
15371         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15372       esac;
15373       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15374     '
15375     export as_echo_n_body
15376     as_echo_n='sh -c $as_echo_n_body as_echo'
15377   fi
15378   export as_echo_body
15379   as_echo='sh -c $as_echo_body as_echo'
15380 fi
15381
15382 # The user is always right.
15383 if test "${PATH_SEPARATOR+set}" != set; then
15384   PATH_SEPARATOR=:
15385   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15386     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15387       PATH_SEPARATOR=';'
15388   }
15389 fi
15390
15391
15392 # IFS
15393 # We need space, tab and new line, in precisely that order.  Quoting is
15394 # there to prevent editors from complaining about space-tab.
15395 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
15396 # splitting by setting IFS to empty value.)
15397 IFS=" ""        $as_nl"
15398
15399 # Find who we are.  Look in the path if we contain no directory separator.
15400 as_myself=
15401 case $0 in #((
15402   *[\\/]* ) as_myself=$0 ;;
15403   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15404 for as_dir in $PATH
15405 do
15406   IFS=$as_save_IFS
15407   test -z "$as_dir" && as_dir=.
15408     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15409   done
15410 IFS=$as_save_IFS
15411
15412      ;;
15413 esac
15414 # We did not find ourselves, most probably we were run as `sh COMMAND'
15415 # in which case we are not to be found in the path.
15416 if test "x$as_myself" = x; then
15417   as_myself=$0
15418 fi
15419 if test ! -f "$as_myself"; then
15420   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15421   exit 1
15422 fi
15423
15424 # Unset variables that we do not need and which cause bugs (e.g. in
15425 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
15426 # suppresses any "Segmentation fault" message there.  '((' could
15427 # trigger a bug in pdksh 5.2.14.
15428 for as_var in BASH_ENV ENV MAIL MAILPATH
15429 do eval test x\${$as_var+set} = xset \
15430   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
15431 done
15432 PS1='$ '
15433 PS2='> '
15434 PS4='+ '
15435
15436 # NLS nuisances.
15437 LC_ALL=C
15438 export LC_ALL
15439 LANGUAGE=C
15440 export LANGUAGE
15441
15442 # CDPATH.
15443 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15444
15445
15446 # as_fn_error STATUS ERROR [LINENO LOG_FD]
15447 # ----------------------------------------
15448 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15449 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
15450 # script with STATUS, using 1 if that was 0.
15451 as_fn_error ()
15452 {
15453   as_status=$1; test $as_status -eq 0 && as_status=1
15454   if test "$4"; then
15455     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15456     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
15457   fi
15458   $as_echo "$as_me: error: $2" >&2
15459   as_fn_exit $as_status
15460 } # as_fn_error
15461
15462
15463 # as_fn_set_status STATUS
15464 # -----------------------
15465 # Set $? to STATUS, without forking.
15466 as_fn_set_status ()
15467 {
15468   return $1
15469 } # as_fn_set_status
15470
15471 # as_fn_exit STATUS
15472 # -----------------
15473 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15474 as_fn_exit ()
15475 {
15476   set +e
15477   as_fn_set_status $1
15478   exit $1
15479 } # as_fn_exit
15480
15481 # as_fn_unset VAR
15482 # ---------------
15483 # Portably unset VAR.
15484 as_fn_unset ()
15485 {
15486   { eval $1=; unset $1;}
15487 }
15488 as_unset=as_fn_unset
15489 # as_fn_append VAR VALUE
15490 # ----------------------
15491 # Append the text in VALUE to the end of the definition contained in VAR. Take
15492 # advantage of any shell optimizations that allow amortized linear growth over
15493 # repeated appends, instead of the typical quadratic growth present in naive
15494 # implementations.
15495 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15496   eval 'as_fn_append ()
15497   {
15498     eval $1+=\$2
15499   }'
15500 else
15501   as_fn_append ()
15502   {
15503     eval $1=\$$1\$2
15504   }
15505 fi # as_fn_append
15506
15507 # as_fn_arith ARG...
15508 # ------------------
15509 # Perform arithmetic evaluation on the ARGs, and store the result in the
15510 # global $as_val. Take advantage of shells that can avoid forks. The arguments
15511 # must be portable across $(()) and expr.
15512 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15513   eval 'as_fn_arith ()
15514   {
15515     as_val=$(( $* ))
15516   }'
15517 else
15518   as_fn_arith ()
15519   {
15520     as_val=`expr "$@" || test $? -eq 1`
15521   }
15522 fi # as_fn_arith
15523
15524
15525 if expr a : '\(a\)' >/dev/null 2>&1 &&
15526    test "X`expr 00001 : '.*\(...\)'`" = X001; then
15527   as_expr=expr
15528 else
15529   as_expr=false
15530 fi
15531
15532 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15533   as_basename=basename
15534 else
15535   as_basename=false
15536 fi
15537
15538 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15539   as_dirname=dirname
15540 else
15541   as_dirname=false
15542 fi
15543
15544 as_me=`$as_basename -- "$0" ||
15545 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15546          X"$0" : 'X\(//\)$' \| \
15547          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
15548 $as_echo X/"$0" |
15549     sed '/^.*\/\([^/][^/]*\)\/*$/{
15550             s//\1/
15551             q
15552           }
15553           /^X\/\(\/\/\)$/{
15554             s//\1/
15555             q
15556           }
15557           /^X\/\(\/\).*/{
15558             s//\1/
15559             q
15560           }
15561           s/.*/./; q'`
15562
15563 # Avoid depending upon Character Ranges.
15564 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15565 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15566 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15567 as_cr_digits='0123456789'
15568 as_cr_alnum=$as_cr_Letters$as_cr_digits
15569
15570 ECHO_C= ECHO_N= ECHO_T=
15571 case `echo -n x` in #(((((
15572 -n*)
15573   case `echo 'xy\c'` in
15574   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
15575   xy)  ECHO_C='\c';;
15576   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
15577        ECHO_T=' ';;
15578   esac;;
15579 *)
15580   ECHO_N='-n';;
15581 esac
15582
15583 rm -f conf$$ conf$$.exe conf$$.file
15584 if test -d conf$$.dir; then
15585   rm -f conf$$.dir/conf$$.file
15586 else
15587   rm -f conf$$.dir
15588   mkdir conf$$.dir 2>/dev/null
15589 fi
15590 if (echo >conf$$.file) 2>/dev/null; then
15591   if ln -s conf$$.file conf$$ 2>/dev/null; then
15592     as_ln_s='ln -s'
15593     # ... but there are two gotchas:
15594     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15595     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
15596     # In both cases, we have to default to `cp -pR'.
15597     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
15598       as_ln_s='cp -pR'
15599   elif ln conf$$.file conf$$ 2>/dev/null; then
15600     as_ln_s=ln
15601   else
15602     as_ln_s='cp -pR'
15603   fi
15604 else
15605   as_ln_s='cp -pR'
15606 fi
15607 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15608 rmdir conf$$.dir 2>/dev/null
15609
15610
15611 # as_fn_mkdir_p
15612 # -------------
15613 # Create "$as_dir" as a directory, including parents if necessary.
15614 as_fn_mkdir_p ()
15615 {
15616
15617   case $as_dir in #(
15618   -*) as_dir=./$as_dir;;
15619   esac
15620   test -d "$as_dir" || eval $as_mkdir_p || {
15621     as_dirs=
15622     while :; do
15623       case $as_dir in #(
15624       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15625       *) as_qdir=$as_dir;;
15626       esac
15627       as_dirs="'$as_qdir' $as_dirs"
15628       as_dir=`$as_dirname -- "$as_dir" ||
15629 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15630          X"$as_dir" : 'X\(//\)[^/]' \| \
15631          X"$as_dir" : 'X\(//\)$' \| \
15632          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15633 $as_echo X"$as_dir" |
15634     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15635             s//\1/
15636             q
15637           }
15638           /^X\(\/\/\)[^/].*/{
15639             s//\1/
15640             q
15641           }
15642           /^X\(\/\/\)$/{
15643             s//\1/
15644             q
15645           }
15646           /^X\(\/\).*/{
15647             s//\1/
15648             q
15649           }
15650           s/.*/./; q'`
15651       test -d "$as_dir" && break
15652     done
15653     test -z "$as_dirs" || eval "mkdir $as_dirs"
15654   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
15655
15656
15657 } # as_fn_mkdir_p
15658 if mkdir -p . 2>/dev/null; then
15659   as_mkdir_p='mkdir -p "$as_dir"'
15660 else
15661   test -d ./-p && rmdir ./-p
15662   as_mkdir_p=false
15663 fi
15664
15665
15666 # as_fn_executable_p FILE
15667 # -----------------------
15668 # Test if FILE is an executable regular file.
15669 as_fn_executable_p ()
15670 {
15671   test -f "$1" && test -x "$1"
15672 } # as_fn_executable_p
15673 as_test_x='test -x'
15674 as_executable_p=as_fn_executable_p
15675
15676 # Sed expression to map a string onto a valid CPP name.
15677 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
15678
15679 # Sed expression to map a string onto a valid variable name.
15680 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
15681
15682
15683 exec 6>&1
15684 ## ----------------------------------- ##
15685 ## Main body of $CONFIG_STATUS script. ##
15686 ## ----------------------------------- ##
15687 _ASEOF
15688 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
15689
15690 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15691 # Save the log message, to keep $0 and so on meaningful, and to
15692 # report actual input values of CONFIG_FILES etc. instead of their
15693 # values after options handling.
15694 ac_log="
15695 This file was extended by PostgreSQL $as_me 9.5devel, which was
15696 generated by GNU Autoconf 2.69.  Invocation command line was
15697
15698   CONFIG_FILES    = $CONFIG_FILES
15699   CONFIG_HEADERS  = $CONFIG_HEADERS
15700   CONFIG_LINKS    = $CONFIG_LINKS
15701   CONFIG_COMMANDS = $CONFIG_COMMANDS
15702   $ $0 $@
15703
15704 on `(hostname || uname -n) 2>/dev/null | sed 1q`
15705 "
15706
15707 _ACEOF
15708
15709 case $ac_config_files in *"
15710 "*) set x $ac_config_files; shift; ac_config_files=$*;;
15711 esac
15712
15713 case $ac_config_headers in *"
15714 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15715 esac
15716
15717
15718 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15719 # Files that config.status was made for.
15720 config_files="$ac_config_files"
15721 config_headers="$ac_config_headers"
15722 config_links="$ac_config_links"
15723 config_commands="$ac_config_commands"
15724
15725 _ACEOF
15726
15727 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15728 ac_cs_usage="\
15729 \`$as_me' instantiates files and other configuration actions
15730 from templates according to the current configuration.  Unless the files
15731 and actions are specified as TAGs, all are instantiated by default.
15732
15733 Usage: $0 [OPTION]... [TAG]...
15734
15735   -h, --help       print this help, then exit
15736   -V, --version    print version number and configuration settings, then exit
15737       --config     print configuration, then exit
15738   -q, --quiet, --silent
15739                    do not print progress messages
15740   -d, --debug      don't remove temporary files
15741       --recheck    update $as_me by reconfiguring in the same conditions
15742       --file=FILE[:TEMPLATE]
15743                    instantiate the configuration file FILE
15744       --header=FILE[:TEMPLATE]
15745                    instantiate the configuration header FILE
15746
15747 Configuration files:
15748 $config_files
15749
15750 Configuration headers:
15751 $config_headers
15752
15753 Configuration links:
15754 $config_links
15755
15756 Configuration commands:
15757 $config_commands
15758
15759 Report bugs to <pgsql-bugs@postgresql.org>."
15760
15761 _ACEOF
15762 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15763 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
15764 ac_cs_version="\\
15765 PostgreSQL config.status 9.5devel
15766 configured by $0, generated by GNU Autoconf 2.69,
15767   with options \\"\$ac_cs_config\\"
15768
15769 Copyright (C) 2012 Free Software Foundation, Inc.
15770 This config.status script is free software; the Free Software Foundation
15771 gives unlimited permission to copy, distribute and modify it."
15772
15773 ac_pwd='$ac_pwd'
15774 srcdir='$srcdir'
15775 INSTALL='$INSTALL'
15776 MKDIR_P='$MKDIR_P'
15777 AWK='$AWK'
15778 test -n "\$AWK" || AWK=awk
15779 _ACEOF
15780
15781 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15782 # The default lists apply if the user does not specify any file.
15783 ac_need_defaults=:
15784 while test $# != 0
15785 do
15786   case $1 in
15787   --*=?*)
15788     ac_option=`expr "X$1" : 'X\([^=]*\)='`
15789     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
15790     ac_shift=:
15791     ;;
15792   --*=)
15793     ac_option=`expr "X$1" : 'X\([^=]*\)='`
15794     ac_optarg=
15795     ac_shift=:
15796     ;;
15797   *)
15798     ac_option=$1
15799     ac_optarg=$2
15800     ac_shift=shift
15801     ;;
15802   esac
15803
15804   case $ac_option in
15805   # Handling of the options.
15806   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15807     ac_cs_recheck=: ;;
15808   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
15809     $as_echo "$ac_cs_version"; exit ;;
15810   --config | --confi | --conf | --con | --co | --c )
15811     $as_echo "$ac_cs_config"; exit ;;
15812   --debug | --debu | --deb | --de | --d | -d )
15813     debug=: ;;
15814   --file | --fil | --fi | --f )
15815     $ac_shift
15816     case $ac_optarg in
15817     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15818     '') as_fn_error $? "missing file argument" ;;
15819     esac
15820     as_fn_append CONFIG_FILES " '$ac_optarg'"
15821     ac_need_defaults=false;;
15822   --header | --heade | --head | --hea )
15823     $ac_shift
15824     case $ac_optarg in
15825     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15826     esac
15827     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
15828     ac_need_defaults=false;;
15829   --he | --h)
15830     # Conflict between --help and --header
15831     as_fn_error $? "ambiguous option: \`$1'
15832 Try \`$0 --help' for more information.";;
15833   --help | --hel | -h )
15834     $as_echo "$ac_cs_usage"; exit ;;
15835   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15836   | -silent | --silent | --silen | --sile | --sil | --si | --s)
15837     ac_cs_silent=: ;;
15838
15839   # This is an error.
15840   -*) as_fn_error $? "unrecognized option: \`$1'
15841 Try \`$0 --help' for more information." ;;
15842
15843   *) as_fn_append ac_config_targets " $1"
15844      ac_need_defaults=false ;;
15845
15846   esac
15847   shift
15848 done
15849
15850 ac_configure_extra_args=
15851
15852 if $ac_cs_silent; then
15853   exec 6>/dev/null
15854   ac_configure_extra_args="$ac_configure_extra_args --silent"
15855 fi
15856
15857 _ACEOF
15858 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15859 if \$ac_cs_recheck; then
15860   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
15861   shift
15862   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15863   CONFIG_SHELL='$SHELL'
15864   export CONFIG_SHELL
15865   exec "\$@"
15866 fi
15867
15868 _ACEOF
15869 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15870 exec 5>>config.log
15871 {
15872   echo
15873   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15874 ## Running $as_me. ##
15875 _ASBOX
15876   $as_echo "$ac_log"
15877 } >&5
15878
15879 _ACEOF
15880 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15881 _ACEOF
15882
15883 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15884
15885 # Handling of arguments.
15886 for ac_config_target in $ac_config_targets
15887 do
15888   case $ac_config_target in
15889     "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
15890     "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
15891     "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
15892     "src/backend/port/dynloader.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
15893     "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
15894     "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
15895     "src/backend/port/pg_latch.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_latch.c:${LATCH_IMPLEMENTATION}" ;;
15896     "src/include/dynloader.h") CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
15897     "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
15898     "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
15899     "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
15900     "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
15901     "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
15902     "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
15903
15904   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
15905   esac
15906 done
15907
15908
15909 # If the user did not use the arguments to specify the items to instantiate,
15910 # then the envvar interface is used.  Set only those that are not.
15911 # We use the long form for the default assignment because of an extremely
15912 # bizarre bug on SunOS 4.1.3.
15913 if $ac_need_defaults; then
15914   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15915   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15916   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
15917   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
15918 fi
15919
15920 # Have a temporary directory for convenience.  Make it in the build tree
15921 # simply because there is no reason against having it here, and in addition,
15922 # creating and moving files from /tmp can sometimes cause problems.
15923 # Hook for its removal unless debugging.
15924 # Note that there is a small window in which the directory will not be cleaned:
15925 # after its creation but before its name has been assigned to `$tmp'.
15926 $debug ||
15927 {
15928   tmp= ac_tmp=
15929   trap 'exit_status=$?
15930   : "${ac_tmp:=$tmp}"
15931   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
15932 ' 0
15933   trap 'as_fn_exit 1' 1 2 13 15
15934 }
15935 # Create a (secure) tmp directory for tmp files.
15936
15937 {
15938   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
15939   test -d "$tmp"
15940 }  ||
15941 {
15942   tmp=./conf$$-$RANDOM
15943   (umask 077 && mkdir "$tmp")
15944 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
15945 ac_tmp=$tmp
15946
15947 # Set up the scripts for CONFIG_FILES section.
15948 # No need to generate them if there are no CONFIG_FILES.
15949 # This happens for instance with `./config.status config.h'.
15950 if test -n "$CONFIG_FILES"; then
15951
15952
15953 ac_cr=`echo X | tr X '\015'`
15954 # On cygwin, bash can eat \r inside `` if the user requested igncr.
15955 # But we know of no other shell where ac_cr would be empty at this
15956 # point, so we can use a bashism as a fallback.
15957 if test "x$ac_cr" = x; then
15958   eval ac_cr=\$\'\\r\'
15959 fi
15960 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15961 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
15962   ac_cs_awk_cr='\\r'
15963 else
15964   ac_cs_awk_cr=$ac_cr
15965 fi
15966
15967 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
15968 _ACEOF
15969
15970
15971 {
15972   echo "cat >conf$$subs.awk <<_ACEOF" &&
15973   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15974   echo "_ACEOF"
15975 } >conf$$subs.sh ||
15976   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15977 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
15978 ac_delim='%!_!# '
15979 for ac_last_try in false false false false false :; do
15980   . ./conf$$subs.sh ||
15981     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15982
15983   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15984   if test $ac_delim_n = $ac_delim_num; then
15985     break
15986   elif $ac_last_try; then
15987     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15988   else
15989     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15990   fi
15991 done
15992 rm -f conf$$subs.sh
15993
15994 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15995 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
15996 _ACEOF
15997 sed -n '
15998 h
15999 s/^/S["/; s/!.*/"]=/
16000 p
16001 g
16002 s/^[^!]*!//
16003 :repl
16004 t repl
16005 s/'"$ac_delim"'$//
16006 t delim
16007 :nl
16008 h
16009 s/\(.\{148\}\)..*/\1/
16010 t more1
16011 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16012 p
16013 n
16014 b repl
16015 :more1
16016 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16017 p
16018 g
16019 s/.\{148\}//
16020 t nl
16021 :delim
16022 h
16023 s/\(.\{148\}\)..*/\1/
16024 t more2
16025 s/["\\]/\\&/g; s/^/"/; s/$/"/
16026 p
16027 b
16028 :more2
16029 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16030 p
16031 g
16032 s/.\{148\}//
16033 t delim
16034 ' <conf$$subs.awk | sed '
16035 /^[^""]/{
16036   N
16037   s/\n//
16038 }
16039 ' >>$CONFIG_STATUS || ac_write_fail=1
16040 rm -f conf$$subs.awk
16041 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16042 _ACAWK
16043 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
16044   for (key in S) S_is_set[key] = 1
16045   FS = "\a"
16046
16047 }
16048 {
16049   line = $ 0
16050   nfields = split(line, field, "@")
16051   substed = 0
16052   len = length(field[1])
16053   for (i = 2; i < nfields; i++) {
16054     key = field[i]
16055     keylen = length(key)
16056     if (S_is_set[key]) {
16057       value = S[key]
16058       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16059       len += length(value) + length(field[++i])
16060       substed = 1
16061     } else
16062       len += 1 + keylen
16063   }
16064
16065   print line
16066 }
16067
16068 _ACAWK
16069 _ACEOF
16070 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16071 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16072   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16073 else
16074   cat
16075 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
16076   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
16077 _ACEOF
16078
16079 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16080 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
16081 # trailing colons and then remove the whole line if VPATH becomes empty
16082 # (actually we leave an empty line to preserve line numbers).
16083 if test "x$srcdir" = x.; then
16084   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
16085 h
16086 s///
16087 s/^/:/
16088 s/[      ]*$/:/
16089 s/:\$(srcdir):/:/g
16090 s/:\${srcdir}:/:/g
16091 s/:@srcdir@:/:/g
16092 s/^:*//
16093 s/:*$//
16094 x
16095 s/\(=[   ]*\).*/\1/
16096 G
16097 s/\n//
16098 s/^[^=]*=[       ]*$//
16099 }'
16100 fi
16101
16102 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16103 fi # test -n "$CONFIG_FILES"
16104
16105 # Set up the scripts for CONFIG_HEADERS section.
16106 # No need to generate them if there are no CONFIG_HEADERS.
16107 # This happens for instance with `./config.status Makefile'.
16108 if test -n "$CONFIG_HEADERS"; then
16109 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
16110 BEGIN {
16111 _ACEOF
16112
16113 # Transform confdefs.h into an awk script `defines.awk', embedded as
16114 # here-document in config.status, that substitutes the proper values into
16115 # config.h.in to produce config.h.
16116
16117 # Create a delimiter string that does not exist in confdefs.h, to ease
16118 # handling of long lines.
16119 ac_delim='%!_!# '
16120 for ac_last_try in false false :; do
16121   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16122   if test -z "$ac_tt"; then
16123     break
16124   elif $ac_last_try; then
16125     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
16126   else
16127     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16128   fi
16129 done
16130
16131 # For the awk script, D is an array of macro values keyed by name,
16132 # likewise P contains macro parameters if any.  Preserve backslash
16133 # newline sequences.
16134
16135 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16136 sed -n '
16137 s/.\{148\}/&'"$ac_delim"'/g
16138 t rset
16139 :rset
16140 s/^[     ]*#[    ]*define[       ][      ]*/ /
16141 t def
16142 d
16143 :def
16144 s/\\$//
16145 t bsnl
16146 s/["\\]/\\&/g
16147 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
16148 D["\1"]=" \3"/p
16149 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
16150 d
16151 :bsnl
16152 s/["\\]/\\&/g
16153 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
16154 D["\1"]=" \3\\\\\\n"\\/p
16155 t cont
16156 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16157 t cont
16158 d
16159 :cont
16160 n
16161 s/.\{148\}/&'"$ac_delim"'/g
16162 t clear
16163 :clear
16164 s/\\$//
16165 t bsnlc
16166 s/["\\]/\\&/g; s/^/"/; s/$/"/p
16167 d
16168 :bsnlc
16169 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16170 b cont
16171 ' <confdefs.h | sed '
16172 s/'"$ac_delim"'/"\\\
16173 "/g' >>$CONFIG_STATUS || ac_write_fail=1
16174
16175 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16176   for (key in D) D_is_set[key] = 1
16177   FS = "\a"
16178 }
16179 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16180   line = \$ 0
16181   split(line, arg, " ")
16182   if (arg[1] == "#") {
16183     defundef = arg[2]
16184     mac1 = arg[3]
16185   } else {
16186     defundef = substr(arg[1], 2)
16187     mac1 = arg[2]
16188   }
16189   split(mac1, mac2, "(") #)
16190   macro = mac2[1]
16191   prefix = substr(line, 1, index(line, defundef) - 1)
16192   if (D_is_set[macro]) {
16193     # Preserve the white space surrounding the "#".
16194     print prefix "define", macro P[macro] D[macro]
16195     next
16196   } else {
16197     # Replace #undef with comments.  This is necessary, for example,
16198     # in the case of _POSIX_SOURCE, which is predefined and required
16199     # on some systems where configure will not decide to define it.
16200     if (defundef == "undef") {
16201       print "/*", prefix defundef, macro, "*/"
16202       next
16203     }
16204   }
16205 }
16206 { print }
16207 _ACAWK
16208 _ACEOF
16209 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16210   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
16211 fi # test -n "$CONFIG_HEADERS"
16212
16213
16214 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
16215 shift
16216 for ac_tag
16217 do
16218   case $ac_tag in
16219   :[FHLC]) ac_mode=$ac_tag; continue;;
16220   esac
16221   case $ac_mode$ac_tag in
16222   :[FHL]*:*);;
16223   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
16224   :[FH]-) ac_tag=-:-;;
16225   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16226   esac
16227   ac_save_IFS=$IFS
16228   IFS=:
16229   set x $ac_tag
16230   IFS=$ac_save_IFS
16231   shift
16232   ac_file=$1
16233   shift
16234
16235   case $ac_mode in
16236   :L) ac_source=$1;;
16237   :[FH])
16238     ac_file_inputs=
16239     for ac_f
16240     do
16241       case $ac_f in
16242       -) ac_f="$ac_tmp/stdin";;
16243       *) # Look for the file first in the build tree, then in the source tree
16244          # (if the path is not absolute).  The absolute path cannot be DOS-style,
16245          # because $ac_f cannot contain `:'.
16246          test -f "$ac_f" ||
16247            case $ac_f in
16248            [\\/$]*) false;;
16249            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16250            esac ||
16251            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
16252       esac
16253       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16254       as_fn_append ac_file_inputs " '$ac_f'"
16255     done
16256
16257     # Let's still pretend it is `configure' which instantiates (i.e., don't
16258     # use $as_me), people would be surprised to read:
16259     #    /* config.h.  Generated by config.status.  */
16260     configure_input='Generated from '`
16261           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16262         `' by configure.'
16263     if test x"$ac_file" != x-; then
16264       configure_input="$ac_file.  $configure_input"
16265       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16266 $as_echo "$as_me: creating $ac_file" >&6;}
16267     fi
16268     # Neutralize special characters interpreted by sed in replacement strings.
16269     case $configure_input in #(
16270     *\&* | *\|* | *\\* )
16271        ac_sed_conf_input=`$as_echo "$configure_input" |
16272        sed 's/[\\\\&|]/\\\\&/g'`;; #(
16273     *) ac_sed_conf_input=$configure_input;;
16274     esac
16275
16276     case $ac_tag in
16277     *:-:* | *:-) cat >"$ac_tmp/stdin" \
16278       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
16279     esac
16280     ;;
16281   esac
16282
16283   ac_dir=`$as_dirname -- "$ac_file" ||
16284 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16285          X"$ac_file" : 'X\(//\)[^/]' \| \
16286          X"$ac_file" : 'X\(//\)$' \| \
16287          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
16288 $as_echo X"$ac_file" |
16289     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16290             s//\1/
16291             q
16292           }
16293           /^X\(\/\/\)[^/].*/{
16294             s//\1/
16295             q
16296           }
16297           /^X\(\/\/\)$/{
16298             s//\1/
16299             q
16300           }
16301           /^X\(\/\).*/{
16302             s//\1/
16303             q
16304           }
16305           s/.*/./; q'`
16306   as_dir="$ac_dir"; as_fn_mkdir_p
16307   ac_builddir=.
16308
16309 case "$ac_dir" in
16310 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16311 *)
16312   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
16313   # A ".." for each directory in $ac_dir_suffix.
16314   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
16315   case $ac_top_builddir_sub in
16316   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16317   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16318   esac ;;
16319 esac
16320 ac_abs_top_builddir=$ac_pwd
16321 ac_abs_builddir=$ac_pwd$ac_dir_suffix
16322 # for backward compatibility:
16323 ac_top_builddir=$ac_top_build_prefix
16324
16325 case $srcdir in
16326   .)  # We are building in place.
16327     ac_srcdir=.
16328     ac_top_srcdir=$ac_top_builddir_sub
16329     ac_abs_top_srcdir=$ac_pwd ;;
16330   [\\/]* | ?:[\\/]* )  # Absolute name.
16331     ac_srcdir=$srcdir$ac_dir_suffix;
16332     ac_top_srcdir=$srcdir
16333     ac_abs_top_srcdir=$srcdir ;;
16334   *) # Relative name.
16335     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16336     ac_top_srcdir=$ac_top_build_prefix$srcdir
16337     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
16338 esac
16339 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
16340
16341
16342   case $ac_mode in
16343   :F)
16344   #
16345   # CONFIG_FILE
16346   #
16347
16348   case $INSTALL in
16349   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16350   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
16351   esac
16352   ac_MKDIR_P=$MKDIR_P
16353   case $MKDIR_P in
16354   [\\/$]* | ?:[\\/]* ) ;;
16355   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16356   esac
16357 _ACEOF
16358
16359 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16360 # If the template does not know about datarootdir, expand it.
16361 # FIXME: This hack should be removed a few years after 2.60.
16362 ac_datarootdir_hack=; ac_datarootdir_seen=
16363 ac_sed_dataroot='
16364 /datarootdir/ {
16365   p
16366   q
16367 }
16368 /@datadir@/p
16369 /@docdir@/p
16370 /@infodir@/p
16371 /@localedir@/p
16372 /@mandir@/p'
16373 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
16374 *datarootdir*) ac_datarootdir_seen=yes;;
16375 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
16376   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16377 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
16378 _ACEOF
16379 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16380   ac_datarootdir_hack='
16381   s&@datadir@&$datadir&g
16382   s&@docdir@&$docdir&g
16383   s&@infodir@&$infodir&g
16384   s&@localedir@&$localedir&g
16385   s&@mandir@&$mandir&g
16386   s&\\\${datarootdir}&$datarootdir&g' ;;
16387 esac
16388 _ACEOF
16389
16390 # Neutralize VPATH when `$srcdir' = `.'.
16391 # Shell code in configure.ac might set extrasub.
16392 # FIXME: do we really want to maintain this feature?
16393 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16394 ac_sed_extra="$ac_vpsub
16395 $extrasub
16396 _ACEOF
16397 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16398 :t
16399 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16400 s|@configure_input@|$ac_sed_conf_input|;t t
16401 s&@top_builddir@&$ac_top_builddir_sub&;t t
16402 s&@top_build_prefix@&$ac_top_build_prefix&;t t
16403 s&@srcdir@&$ac_srcdir&;t t
16404 s&@abs_srcdir@&$ac_abs_srcdir&;t t
16405 s&@top_srcdir@&$ac_top_srcdir&;t t
16406 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16407 s&@builddir@&$ac_builddir&;t t
16408 s&@abs_builddir@&$ac_abs_builddir&;t t
16409 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16410 s&@INSTALL@&$ac_INSTALL&;t t
16411 s&@MKDIR_P@&$ac_MKDIR_P&;t t
16412 $ac_datarootdir_hack
16413 "
16414 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16415   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16416
16417 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
16418   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16419   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
16420       "$ac_tmp/out"`; test -z "$ac_out"; } &&
16421   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16422 which seems to be undefined.  Please make sure it is defined" >&5
16423 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16424 which seems to be undefined.  Please make sure it is defined" >&2;}
16425
16426   rm -f "$ac_tmp/stdin"
16427   case $ac_file in
16428   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16429   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
16430   esac \
16431   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16432  ;;
16433   :H)
16434   #
16435   # CONFIG_HEADER
16436   #
16437   if test x"$ac_file" != x-; then
16438     {
16439       $as_echo "/* $configure_input  */" \
16440       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16441     } >"$ac_tmp/config.h" \
16442       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16443     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
16444       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16445 $as_echo "$as_me: $ac_file is unchanged" >&6;}
16446     else
16447       rm -f "$ac_file"
16448       mv "$ac_tmp/config.h" "$ac_file" \
16449         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16450     fi
16451   else
16452     $as_echo "/* $configure_input  */" \
16453       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
16454       || as_fn_error $? "could not create -" "$LINENO" 5
16455   fi
16456  ;;
16457   :L)
16458   #
16459   # CONFIG_LINK
16460   #
16461
16462   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
16463     :
16464   else
16465     # Prefer the file from the source tree if names are identical.
16466     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
16467       ac_source=$srcdir/$ac_source
16468     fi
16469
16470     { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
16471 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
16472
16473     if test ! -r "$ac_source"; then
16474       as_fn_error $? "$ac_source: file not found" "$LINENO" 5
16475     fi
16476     rm -f "$ac_file"
16477
16478     # Try a relative symlink, then a hard link, then a copy.
16479     case $ac_source in
16480     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
16481         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
16482     esac
16483     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
16484       ln "$ac_source" "$ac_file" 2>/dev/null ||
16485       cp -p "$ac_source" "$ac_file" ||
16486       as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
16487   fi
16488  ;;
16489   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
16490 $as_echo "$as_me: executing $ac_file commands" >&6;}
16491  ;;
16492   esac
16493
16494
16495   case $ac_file$ac_mode in
16496     "check_win32_symlinks":C)
16497 # Links sometimes fail undetected on Mingw -
16498 # so here we detect it and warn the user
16499 for FILE in $CONFIG_LINKS
16500  do
16501         # test -e works for symlinks in the MinGW console
16502         test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
16503 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
16504  done
16505  ;;
16506     "src/include/pg_config.h":H)
16507 # Update timestamp for pg_config.h (see Makefile.global)
16508 echo >src/include/stamp-h
16509  ;;
16510     "src/include/pg_config_ext.h":H)
16511 # Update timestamp for pg_config_ext.h (see Makefile.global)
16512 echo >src/include/stamp-ext-h
16513  ;;
16514     "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
16515
16516   esac
16517 done # for ac_tag
16518
16519
16520 as_fn_exit 0
16521 _ACEOF
16522 ac_clean_files=$ac_clean_files_save
16523
16524 test $ac_write_fail = 0 ||
16525   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
16526
16527
16528 # configure is writing to config.log, and then calls config.status.
16529 # config.status does its own redirection, appending to config.log.
16530 # Unfortunately, on DOS this fails, as config.log is still kept open
16531 # by configure, so config.status won't be able to write to it; its
16532 # output is simply discarded.  So we exec the FD to /dev/null,
16533 # effectively closing config.log, so it can be properly (re)opened and
16534 # appended to by config.status.  When coming back to configure, we
16535 # need to make the FD available again.
16536 if test "$no_create" != yes; then
16537   ac_cs_success=:
16538   ac_config_status_args=
16539   test "$silent" = yes &&
16540     ac_config_status_args="$ac_config_status_args --quiet"
16541   exec 5>/dev/null
16542   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
16543   exec 5>>config.log
16544   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16545   # would make configure fail if this is the last instruction.
16546   $ac_cs_success || as_fn_exit 1
16547 fi
16548 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16549   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16550 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
16551 fi
16552