]> granicus.if.org Git - postgresql/blob - configure
Test -lrt for sched_yield
[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.5alpha1.
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.5alpha1'
586 PACKAGE_STRING='PostgreSQL 9.5alpha1'
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_INCLUDE_SPEC
645 TCL_CONFIG_SH
646 TCLSH
647 XGETTEXT
648 MSGMERGE
649 MSGFMT_FLAGS
650 MSGFMT
651 HAVE_POSIX_SIGNALS
652 PG_CRC32C_OBJS
653 CFLAGS_SSE42
654 LDAP_LIBS_BE
655 LDAP_LIBS_FE
656 PTHREAD_CFLAGS
657 PTHREAD_LIBS
658 acx_pthread_config
659 have_win32_dbghelp
660 HAVE_IPV6
661 LIBOBJS
662 UUID_LIBS
663 ZIC
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.5alpha1 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.5alpha1:";;
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.5alpha1
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.5alpha1, 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   # We want to suppress clang's unhelpful unused-command-line-argument warnings
4727   # but gcc won't complain about unrecognized -Wno-foo switches, so we have to
4728   # test for the positive form and if that works, add the negative form
4729   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wunused-command-line-argument" >&5
4730 $as_echo_n "checking whether $CC supports -Wunused-command-line-argument... " >&6; }
4731 if ${pgac_cv_prog_cc_cflags__Wunused_command_line_argument+:} false; then :
4732   $as_echo_n "(cached) " >&6
4733 else
4734   pgac_save_CFLAGS=$CFLAGS
4735 CFLAGS="$pgac_save_CFLAGS -Wunused-command-line-argument"
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__Wunused_command_line_argument=yes
4751 else
4752   pgac_cv_prog_cc_cflags__Wunused_command_line_argument=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__Wunused_command_line_argument" >&5
4759 $as_echo "$pgac_cv_prog_cc_cflags__Wunused_command_line_argument" >&6; }
4760 if test x"$pgac_cv_prog_cc_cflags__Wunused_command_line_argument" = x"yes"; then
4761   NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
4762 fi
4763
4764   if test -n "$NOT_THE_CFLAGS"; then
4765     CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
4766   fi
4767 elif test "$ICC" = yes; then
4768   # Intel's compiler has a bug/misoptimization in checking for
4769   # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
4770   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mp1" >&5
4771 $as_echo_n "checking whether $CC supports -mp1... " >&6; }
4772 if ${pgac_cv_prog_cc_cflags__mp1+:} false; then :
4773   $as_echo_n "(cached) " >&6
4774 else
4775   pgac_save_CFLAGS=$CFLAGS
4776 CFLAGS="$pgac_save_CFLAGS -mp1"
4777 ac_save_c_werror_flag=$ac_c_werror_flag
4778 ac_c_werror_flag=yes
4779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4780 /* end confdefs.h.  */
4781
4782 int
4783 main ()
4784 {
4785
4786   ;
4787   return 0;
4788 }
4789 _ACEOF
4790 if ac_fn_c_try_compile "$LINENO"; then :
4791   pgac_cv_prog_cc_cflags__mp1=yes
4792 else
4793   pgac_cv_prog_cc_cflags__mp1=no
4794 fi
4795 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4796 ac_c_werror_flag=$ac_save_c_werror_flag
4797 CFLAGS="$pgac_save_CFLAGS"
4798 fi
4799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__mp1" >&5
4800 $as_echo "$pgac_cv_prog_cc_cflags__mp1" >&6; }
4801 if test x"$pgac_cv_prog_cc_cflags__mp1" = x"yes"; then
4802   CFLAGS="$CFLAGS -mp1"
4803 fi
4804
4805   # Make sure strict aliasing is off (though this is said to be the default)
4806   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-strict-aliasing" >&5
4807 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4808 if ${pgac_cv_prog_cc_cflags__fno_strict_aliasing+:} false; then :
4809   $as_echo_n "(cached) " >&6
4810 else
4811   pgac_save_CFLAGS=$CFLAGS
4812 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4813 ac_save_c_werror_flag=$ac_c_werror_flag
4814 ac_c_werror_flag=yes
4815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4816 /* end confdefs.h.  */
4817
4818 int
4819 main ()
4820 {
4821
4822   ;
4823   return 0;
4824 }
4825 _ACEOF
4826 if ac_fn_c_try_compile "$LINENO"; then :
4827   pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4828 else
4829   pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4830 fi
4831 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4832 ac_c_werror_flag=$ac_save_c_werror_flag
4833 CFLAGS="$pgac_save_CFLAGS"
4834 fi
4835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4836 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4837 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4838   CFLAGS="$CFLAGS -fno-strict-aliasing"
4839 fi
4840
4841 elif test "$PORTNAME" = "aix"; then
4842   # AIX's xlc has to have strict aliasing turned off too
4843   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -qnoansialias" >&5
4844 $as_echo_n "checking whether $CC supports -qnoansialias... " >&6; }
4845 if ${pgac_cv_prog_cc_cflags__qnoansialias+:} false; then :
4846   $as_echo_n "(cached) " >&6
4847 else
4848   pgac_save_CFLAGS=$CFLAGS
4849 CFLAGS="$pgac_save_CFLAGS -qnoansialias"
4850 ac_save_c_werror_flag=$ac_c_werror_flag
4851 ac_c_werror_flag=yes
4852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4853 /* end confdefs.h.  */
4854
4855 int
4856 main ()
4857 {
4858
4859   ;
4860   return 0;
4861 }
4862 _ACEOF
4863 if ac_fn_c_try_compile "$LINENO"; then :
4864   pgac_cv_prog_cc_cflags__qnoansialias=yes
4865 else
4866   pgac_cv_prog_cc_cflags__qnoansialias=no
4867 fi
4868 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4869 ac_c_werror_flag=$ac_save_c_werror_flag
4870 CFLAGS="$pgac_save_CFLAGS"
4871 fi
4872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__qnoansialias" >&5
4873 $as_echo "$pgac_cv_prog_cc_cflags__qnoansialias" >&6; }
4874 if test x"$pgac_cv_prog_cc_cflags__qnoansialias" = x"yes"; then
4875   CFLAGS="$CFLAGS -qnoansialias"
4876 fi
4877
4878 elif test "$PORTNAME" = "hpux"; then
4879   # On some versions of HP-UX, libm functions do not set errno by default.
4880   # Fix that by using +Olibmerrno if the compiler recognizes it.
4881   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports +Olibmerrno" >&5
4882 $as_echo_n "checking whether $CC supports +Olibmerrno... " >&6; }
4883 if ${pgac_cv_prog_cc_cflags_pOlibmerrno+:} false; then :
4884   $as_echo_n "(cached) " >&6
4885 else
4886   pgac_save_CFLAGS=$CFLAGS
4887 CFLAGS="$pgac_save_CFLAGS +Olibmerrno"
4888 ac_save_c_werror_flag=$ac_c_werror_flag
4889 ac_c_werror_flag=yes
4890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4891 /* end confdefs.h.  */
4892
4893 int
4894 main ()
4895 {
4896
4897   ;
4898   return 0;
4899 }
4900 _ACEOF
4901 if ac_fn_c_try_compile "$LINENO"; then :
4902   pgac_cv_prog_cc_cflags_pOlibmerrno=yes
4903 else
4904   pgac_cv_prog_cc_cflags_pOlibmerrno=no
4905 fi
4906 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4907 ac_c_werror_flag=$ac_save_c_werror_flag
4908 CFLAGS="$pgac_save_CFLAGS"
4909 fi
4910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags_pOlibmerrno" >&5
4911 $as_echo "$pgac_cv_prog_cc_cflags_pOlibmerrno" >&6; }
4912 if test x"$pgac_cv_prog_cc_cflags_pOlibmerrno" = x"yes"; then
4913   CFLAGS="$CFLAGS +Olibmerrno"
4914 fi
4915
4916 fi
4917
4918 CFLAGS_VECTOR=$CFLAGS_VECTOR
4919
4920
4921 # supply -g if --enable-debug
4922 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
4923   CFLAGS="$CFLAGS -g"
4924 fi
4925
4926 # enable code coverage if --enable-coverage
4927 if test "$enable_coverage" = yes; then
4928   if test "$GCC" = yes; then
4929     CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
4930   else
4931     as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
4932   fi
4933 fi
4934
4935 # enable profiling if --enable-profiling
4936 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
4937   if test "$GCC" = yes; then
4938
4939 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
4940
4941     CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
4942   else
4943     as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
4944   fi
4945 fi
4946
4947 # We already have this in Makefile.win32, but configure needs it too
4948 if test "$PORTNAME" = "win32"; then
4949   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
4950 fi
4951
4952 # Now that we're done automatically adding stuff to CFLAGS, put back the
4953 # user-specified flags (if any) at the end.  This lets users override
4954 # the automatic additions.
4955 CFLAGS="$CFLAGS $user_CFLAGS"
4956
4957 # Check if the compiler still works with the final flag settings
4958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
4959 $as_echo_n "checking whether the C compiler still works... " >&6; }
4960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4961 /* end confdefs.h.  */
4962
4963 int
4964 main ()
4965 {
4966 return 0;
4967   ;
4968   return 0;
4969 }
4970 _ACEOF
4971 if ac_fn_c_try_link "$LINENO"; then :
4972   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4973 $as_echo "yes" >&6; }
4974 else
4975   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4976 $as_echo "no" >&6; }
4977    as_fn_error $? "cannot proceed" "$LINENO" 5
4978 fi
4979 rm -f core conftest.err conftest.$ac_objext \
4980     conftest$ac_exeext conftest.$ac_ext
4981
4982 # Defend against gcc -ffast-math
4983 if test "$GCC" = yes; then
4984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4985 /* end confdefs.h.  */
4986
4987 int
4988 main ()
4989 {
4990 #ifdef __FAST_MATH__
4991 choke me
4992 #endif
4993   ;
4994   return 0;
4995 }
4996 _ACEOF
4997 if ac_fn_c_try_compile "$LINENO"; then :
4998
4999 else
5000   as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
5001 fi
5002 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5003 fi
5004
5005 ac_ext=c
5006 ac_cpp='$CPP $CPPFLAGS'
5007 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5008 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5009 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5011 $as_echo_n "checking how to run the C preprocessor... " >&6; }
5012 # On Suns, sometimes $CPP names a directory.
5013 if test -n "$CPP" && test -d "$CPP"; then
5014   CPP=
5015 fi
5016 if test -z "$CPP"; then
5017   if ${ac_cv_prog_CPP+:} false; then :
5018   $as_echo_n "(cached) " >&6
5019 else
5020       # Double quotes because CPP needs to be expanded
5021     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5022     do
5023       ac_preproc_ok=false
5024 for ac_c_preproc_warn_flag in '' yes
5025 do
5026   # Use a header file that comes with gcc, so configuring glibc
5027   # with a fresh cross-compiler works.
5028   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5029   # <limits.h> exists even on freestanding compilers.
5030   # On the NeXT, cc -E runs the code through the compiler's parser,
5031   # not just through cpp. "Syntax error" is here to catch this case.
5032   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5033 /* end confdefs.h.  */
5034 #ifdef __STDC__
5035 # include <limits.h>
5036 #else
5037 # include <assert.h>
5038 #endif
5039                      Syntax error
5040 _ACEOF
5041 if ac_fn_c_try_cpp "$LINENO"; then :
5042
5043 else
5044   # Broken: fails on valid input.
5045 continue
5046 fi
5047 rm -f conftest.err conftest.i conftest.$ac_ext
5048
5049   # OK, works on sane cases.  Now check whether nonexistent headers
5050   # can be detected and how.
5051   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5052 /* end confdefs.h.  */
5053 #include <ac_nonexistent.h>
5054 _ACEOF
5055 if ac_fn_c_try_cpp "$LINENO"; then :
5056   # Broken: success on invalid input.
5057 continue
5058 else
5059   # Passes both tests.
5060 ac_preproc_ok=:
5061 break
5062 fi
5063 rm -f conftest.err conftest.i conftest.$ac_ext
5064
5065 done
5066 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5067 rm -f conftest.i conftest.err conftest.$ac_ext
5068 if $ac_preproc_ok; then :
5069   break
5070 fi
5071
5072     done
5073     ac_cv_prog_CPP=$CPP
5074
5075 fi
5076   CPP=$ac_cv_prog_CPP
5077 else
5078   ac_cv_prog_CPP=$CPP
5079 fi
5080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5081 $as_echo "$CPP" >&6; }
5082 ac_preproc_ok=false
5083 for ac_c_preproc_warn_flag in '' yes
5084 do
5085   # Use a header file that comes with gcc, so configuring glibc
5086   # with a fresh cross-compiler works.
5087   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5088   # <limits.h> exists even on freestanding compilers.
5089   # On the NeXT, cc -E runs the code through the compiler's parser,
5090   # not just through cpp. "Syntax error" is here to catch this case.
5091   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5092 /* end confdefs.h.  */
5093 #ifdef __STDC__
5094 # include <limits.h>
5095 #else
5096 # include <assert.h>
5097 #endif
5098                      Syntax error
5099 _ACEOF
5100 if ac_fn_c_try_cpp "$LINENO"; then :
5101
5102 else
5103   # Broken: fails on valid input.
5104 continue
5105 fi
5106 rm -f conftest.err conftest.i conftest.$ac_ext
5107
5108   # OK, works on sane cases.  Now check whether nonexistent headers
5109   # can be detected and how.
5110   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5111 /* end confdefs.h.  */
5112 #include <ac_nonexistent.h>
5113 _ACEOF
5114 if ac_fn_c_try_cpp "$LINENO"; then :
5115   # Broken: success on invalid input.
5116 continue
5117 else
5118   # Passes both tests.
5119 ac_preproc_ok=:
5120 break
5121 fi
5122 rm -f conftest.err conftest.i conftest.$ac_ext
5123
5124 done
5125 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5126 rm -f conftest.i conftest.err conftest.$ac_ext
5127 if $ac_preproc_ok; then :
5128
5129 else
5130   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5131 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5132 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5133 See \`config.log' for more details" "$LINENO" 5; }
5134 fi
5135
5136 ac_ext=c
5137 ac_cpp='$CPP $CPPFLAGS'
5138 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5139 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5140 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5141
5142
5143
5144
5145 #
5146 # Set up TAS assembly code if needed; the template file has now had its
5147 # chance to request this.
5148 #
5149 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
5150
5151
5152 if test "$need_tas" = yes ; then
5153   TAS=tas.o
5154 else
5155   TAS=""
5156 fi
5157
5158
5159
5160 #
5161 # Automatic dependency tracking
5162 #
5163
5164
5165 # Check whether --enable-depend was given.
5166 if test "${enable_depend+set}" = set; then :
5167   enableval=$enable_depend;
5168   case $enableval in
5169     yes)
5170       autodepend=yes
5171       ;;
5172     no)
5173       :
5174       ;;
5175     *)
5176       as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
5177       ;;
5178   esac
5179
5180 else
5181   enable_depend=no
5182
5183 fi
5184
5185
5186
5187
5188
5189 #
5190 # Enable assert checks
5191 #
5192
5193
5194 # Check whether --enable-cassert was given.
5195 if test "${enable_cassert+set}" = set; then :
5196   enableval=$enable_cassert;
5197   case $enableval in
5198     yes)
5199
5200 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
5201
5202       ;;
5203     no)
5204       :
5205       ;;
5206     *)
5207       as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
5208       ;;
5209   esac
5210
5211 else
5212   enable_cassert=no
5213
5214 fi
5215
5216
5217
5218
5219 #
5220 # Include directories
5221 #
5222 ac_save_IFS=$IFS
5223 IFS="${IFS}${PATH_SEPARATOR}"
5224 # SRCH_INC comes from the template file
5225 for dir in $with_includes $SRCH_INC; do
5226   if test -d "$dir"; then
5227     INCLUDES="$INCLUDES -I$dir"
5228   else
5229     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
5230 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
5231   fi
5232 done
5233 IFS=$ac_save_IFS
5234
5235
5236
5237 #
5238 # Library directories
5239 #
5240 ac_save_IFS=$IFS
5241 IFS="${IFS}${PATH_SEPARATOR}"
5242 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
5243 for dir in $LIBRARY_DIRS $SRCH_LIB; do
5244   if test -d "$dir"; then
5245     LIBDIRS="$LIBDIRS -L$dir"
5246   else
5247     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
5248 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
5249   fi
5250 done
5251 IFS=$ac_save_IFS
5252
5253 #
5254 # Enable thread-safe client libraries
5255 #
5256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
5257 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
5258
5259
5260 # Check whether --enable-thread-safety was given.
5261 if test "${enable_thread_safety+set}" = set; then :
5262   enableval=$enable_thread_safety;
5263   case $enableval in
5264     yes)
5265       :
5266       ;;
5267     no)
5268       :
5269       ;;
5270     *)
5271       as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
5272       ;;
5273   esac
5274
5275 else
5276   enable_thread_safety=yes
5277
5278 fi
5279
5280
5281 if test "$enable_thread_safety" = yes; then
5282
5283 $as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
5284
5285 fi
5286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
5287 $as_echo "$enable_thread_safety" >&6; }
5288
5289
5290 #
5291 # Optionally build Tcl modules (PL/Tcl)
5292 #
5293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
5294 $as_echo_n "checking whether to build with Tcl... " >&6; }
5295
5296
5297
5298 # Check whether --with-tcl was given.
5299 if test "${with_tcl+set}" = set; then :
5300   withval=$with_tcl;
5301   case $withval in
5302     yes)
5303       :
5304       ;;
5305     no)
5306       :
5307       ;;
5308     *)
5309       as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
5310       ;;
5311   esac
5312
5313 else
5314   with_tcl=no
5315
5316 fi
5317
5318
5319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
5320 $as_echo "$with_tcl" >&6; }
5321
5322
5323 # We see if the path to the Tcl/Tk configuration scripts is specified.
5324 # This will override the use of tclsh to find the paths to search.
5325
5326
5327
5328
5329 # Check whether --with-tclconfig was given.
5330 if test "${with_tclconfig+set}" = set; then :
5331   withval=$with_tclconfig;
5332   case $withval in
5333     yes)
5334       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
5335       ;;
5336     no)
5337       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
5338       ;;
5339     *)
5340
5341       ;;
5342   esac
5343
5344 fi
5345
5346
5347
5348 #
5349 # Optionally build Perl modules (PL/Perl)
5350 #
5351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
5352 $as_echo_n "checking whether to build Perl modules... " >&6; }
5353
5354
5355
5356 # Check whether --with-perl was given.
5357 if test "${with_perl+set}" = set; then :
5358   withval=$with_perl;
5359   case $withval in
5360     yes)
5361       :
5362       ;;
5363     no)
5364       :
5365       ;;
5366     *)
5367       as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
5368       ;;
5369   esac
5370
5371 else
5372   with_perl=no
5373
5374 fi
5375
5376
5377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
5378 $as_echo "$with_perl" >&6; }
5379
5380
5381 #
5382 # Optionally build Python modules (PL/Python)
5383 #
5384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
5385 $as_echo_n "checking whether to build Python modules... " >&6; }
5386
5387
5388
5389 # Check whether --with-python was given.
5390 if test "${with_python+set}" = set; then :
5391   withval=$with_python;
5392   case $withval in
5393     yes)
5394       :
5395       ;;
5396     no)
5397       :
5398       ;;
5399     *)
5400       as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
5401       ;;
5402   esac
5403
5404 else
5405   with_python=no
5406
5407 fi
5408
5409
5410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
5411 $as_echo "$with_python" >&6; }
5412
5413
5414 #
5415 # GSSAPI
5416 #
5417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
5418 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
5419
5420
5421
5422 # Check whether --with-gssapi was given.
5423 if test "${with_gssapi+set}" = set; then :
5424   withval=$with_gssapi;
5425   case $withval in
5426     yes)
5427
5428
5429 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
5430
5431   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
5432
5433       ;;
5434     no)
5435       :
5436       ;;
5437     *)
5438       as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
5439       ;;
5440   esac
5441
5442 else
5443   with_gssapi=no
5444
5445 fi
5446
5447
5448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
5449 $as_echo "$with_gssapi" >&6; }
5450
5451
5452
5453
5454
5455 #
5456 # Kerberos configuration parameters
5457 #
5458
5459
5460
5461 # Check whether --with-krb-srvnam was given.
5462 if test "${with_krb_srvnam+set}" = set; then :
5463   withval=$with_krb_srvnam;
5464   case $withval in
5465     yes)
5466       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
5467       ;;
5468     no)
5469       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
5470       ;;
5471     *)
5472
5473       ;;
5474   esac
5475
5476 else
5477   with_krb_srvnam="postgres"
5478 fi
5479
5480
5481
5482 cat >>confdefs.h <<_ACEOF
5483 #define PG_KRB_SRVNAM "$with_krb_srvnam"
5484 _ACEOF
5485
5486
5487
5488 #
5489 # PAM
5490 #
5491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
5492 $as_echo_n "checking whether to build with PAM support... " >&6; }
5493
5494
5495
5496 # Check whether --with-pam was given.
5497 if test "${with_pam+set}" = set; then :
5498   withval=$with_pam;
5499   case $withval in
5500     yes)
5501
5502 $as_echo "#define USE_PAM 1" >>confdefs.h
5503
5504       ;;
5505     no)
5506       :
5507       ;;
5508     *)
5509       as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
5510       ;;
5511   esac
5512
5513 else
5514   with_pam=no
5515
5516 fi
5517
5518
5519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
5520 $as_echo "$with_pam" >&6; }
5521
5522
5523 #
5524 # LDAP
5525 #
5526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
5527 $as_echo_n "checking whether to build with LDAP support... " >&6; }
5528
5529
5530
5531 # Check whether --with-ldap was given.
5532 if test "${with_ldap+set}" = set; then :
5533   withval=$with_ldap;
5534   case $withval in
5535     yes)
5536
5537 $as_echo "#define USE_LDAP 1" >>confdefs.h
5538
5539       ;;
5540     no)
5541       :
5542       ;;
5543     *)
5544       as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
5545       ;;
5546   esac
5547
5548 else
5549   with_ldap=no
5550
5551 fi
5552
5553
5554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
5555 $as_echo "$with_ldap" >&6; }
5556
5557
5558 #
5559 # Bonjour
5560 #
5561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
5562 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
5563
5564
5565
5566 # Check whether --with-bonjour was given.
5567 if test "${with_bonjour+set}" = set; then :
5568   withval=$with_bonjour;
5569   case $withval in
5570     yes)
5571
5572 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
5573
5574       ;;
5575     no)
5576       :
5577       ;;
5578     *)
5579       as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
5580       ;;
5581   esac
5582
5583 else
5584   with_bonjour=no
5585
5586 fi
5587
5588
5589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
5590 $as_echo "$with_bonjour" >&6; }
5591
5592
5593 #
5594 # OpenSSL
5595 #
5596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with OpenSSL support" >&5
5597 $as_echo_n "checking whether to build with OpenSSL support... " >&6; }
5598
5599
5600
5601 # Check whether --with-openssl was given.
5602 if test "${with_openssl+set}" = set; then :
5603   withval=$with_openssl;
5604   case $withval in
5605     yes)
5606
5607 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
5608
5609       ;;
5610     no)
5611       :
5612       ;;
5613     *)
5614       as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
5615       ;;
5616   esac
5617
5618 else
5619   with_openssl=no
5620
5621 fi
5622
5623
5624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_openssl" >&5
5625 $as_echo "$with_openssl" >&6; }
5626
5627
5628 #
5629 # SELinux
5630 #
5631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
5632 $as_echo_n "checking whether to build with SELinux support... " >&6; }
5633
5634
5635
5636 # Check whether --with-selinux was given.
5637 if test "${with_selinux+set}" = set; then :
5638   withval=$with_selinux;
5639   case $withval in
5640     yes)
5641       :
5642       ;;
5643     no)
5644       :
5645       ;;
5646     *)
5647       as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
5648       ;;
5649   esac
5650
5651 else
5652   with_selinux=no
5653
5654 fi
5655
5656
5657
5658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
5659 $as_echo "$with_selinux" >&6; }
5660
5661 #
5662 # Readline
5663 #
5664
5665
5666
5667 # Check whether --with-readline was given.
5668 if test "${with_readline+set}" = set; then :
5669   withval=$with_readline;
5670   case $withval in
5671     yes)
5672       :
5673       ;;
5674     no)
5675       :
5676       ;;
5677     *)
5678       as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
5679       ;;
5680   esac
5681
5682 else
5683   with_readline=yes
5684
5685 fi
5686
5687
5688 # readline on MinGW has problems with backslashes in psql and other bugs.
5689 # This is particularly a problem with non-US code pages.
5690 # Therefore disable its use until we understand the cause. 2004-07-20
5691 if test "$PORTNAME" = "win32"; then
5692   if test "$with_readline" = yes; then
5693     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
5694 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
5695     with_readline=no
5696   fi
5697 fi
5698
5699
5700 #
5701 # Prefer libedit
5702 #
5703
5704
5705
5706 # Check whether --with-libedit-preferred was given.
5707 if test "${with_libedit_preferred+set}" = set; then :
5708   withval=$with_libedit_preferred;
5709   case $withval in
5710     yes)
5711       :
5712       ;;
5713     no)
5714       :
5715       ;;
5716     *)
5717       as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
5718       ;;
5719   esac
5720
5721 else
5722   with_libedit_preferred=no
5723
5724 fi
5725
5726
5727
5728
5729 #
5730 # UUID library
5731 #
5732 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
5733 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
5734 # UUID library.  More than one of these might be present on a given platform,
5735 # so we make the user say which one she wants.
5736 #
5737
5738
5739
5740 # Check whether --with-uuid was given.
5741 if test "${with_uuid+set}" = set; then :
5742   withval=$with_uuid;
5743   case $withval in
5744     yes)
5745       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
5746       ;;
5747     no)
5748       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
5749       ;;
5750     *)
5751
5752       ;;
5753   esac
5754
5755 fi
5756
5757
5758 if test x"$with_uuid" = x"" ; then
5759   with_uuid=no
5760 fi
5761
5762
5763
5764 # Check whether --with-ossp-uuid was given.
5765 if test "${with_ossp_uuid+set}" = set; then :
5766   withval=$with_ossp_uuid;
5767   case $withval in
5768     yes)
5769       :
5770       ;;
5771     no)
5772       :
5773       ;;
5774     *)
5775       as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
5776       ;;
5777   esac
5778
5779 else
5780   with_ossp_uuid=no
5781
5782 fi
5783
5784
5785 if test "$with_ossp_uuid" = yes ; then
5786   with_uuid=ossp
5787 fi
5788
5789 if test "$with_uuid" = bsd ; then
5790
5791 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
5792
5793   UUID_EXTRA_OBJS="md5.o sha1.o"
5794 elif test "$with_uuid" = e2fs ; then
5795
5796 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
5797
5798   UUID_EXTRA_OBJS="md5.o sha1.o"
5799 elif test "$with_uuid" = ossp ; then
5800
5801 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
5802
5803   UUID_EXTRA_OBJS=""
5804 elif test "$with_uuid" = no ; then
5805   UUID_EXTRA_OBJS=""
5806 else
5807   as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
5808 fi
5809
5810
5811
5812
5813 #
5814 # XML
5815 #
5816
5817
5818
5819 # Check whether --with-libxml was given.
5820 if test "${with_libxml+set}" = set; then :
5821   withval=$with_libxml;
5822   case $withval in
5823     yes)
5824
5825 $as_echo "#define USE_LIBXML 1" >>confdefs.h
5826
5827       ;;
5828     no)
5829       :
5830       ;;
5831     *)
5832       as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
5833       ;;
5834   esac
5835
5836 else
5837   with_libxml=no
5838
5839 fi
5840
5841
5842
5843 if test "$with_libxml" = yes ; then
5844   for ac_prog in xml2-config
5845 do
5846   # Extract the first word of "$ac_prog", so it can be a program name with args.
5847 set dummy $ac_prog; ac_word=$2
5848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5849 $as_echo_n "checking for $ac_word... " >&6; }
5850 if ${ac_cv_prog_XML2_CONFIG+:} false; then :
5851   $as_echo_n "(cached) " >&6
5852 else
5853   if test -n "$XML2_CONFIG"; then
5854   ac_cv_prog_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test.
5855 else
5856 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5857 for as_dir in $PATH
5858 do
5859   IFS=$as_save_IFS
5860   test -z "$as_dir" && as_dir=.
5861     for ac_exec_ext in '' $ac_executable_extensions; do
5862   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5863     ac_cv_prog_XML2_CONFIG="$ac_prog"
5864     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5865     break 2
5866   fi
5867 done
5868   done
5869 IFS=$as_save_IFS
5870
5871 fi
5872 fi
5873 XML2_CONFIG=$ac_cv_prog_XML2_CONFIG
5874 if test -n "$XML2_CONFIG"; then
5875   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
5876 $as_echo "$XML2_CONFIG" >&6; }
5877 else
5878   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5879 $as_echo "no" >&6; }
5880 fi
5881
5882
5883   test -n "$XML2_CONFIG" && break
5884 done
5885
5886   if test -n "$XML2_CONFIG"; then
5887     for pgac_option in `$XML2_CONFIG --cflags`; do
5888       case $pgac_option in
5889         -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
5890       esac
5891     done
5892     for pgac_option in `$XML2_CONFIG --libs`; do
5893       case $pgac_option in
5894         -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5895       esac
5896     done
5897   fi
5898 fi
5899
5900
5901
5902 #
5903 # XSLT
5904 #
5905
5906
5907
5908 # Check whether --with-libxslt was given.
5909 if test "${with_libxslt+set}" = set; then :
5910   withval=$with_libxslt;
5911   case $withval in
5912     yes)
5913
5914 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
5915
5916       ;;
5917     no)
5918       :
5919       ;;
5920     *)
5921       as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
5922       ;;
5923   esac
5924
5925 else
5926   with_libxslt=no
5927
5928 fi
5929
5930
5931
5932
5933
5934
5935 #
5936 # tzdata
5937 #
5938
5939
5940
5941 # Check whether --with-system-tzdata was given.
5942 if test "${with_system_tzdata+set}" = set; then :
5943   withval=$with_system_tzdata;
5944   case $withval in
5945     yes)
5946       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
5947       ;;
5948     no)
5949       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
5950       ;;
5951     *)
5952
5953       ;;
5954   esac
5955
5956 fi
5957
5958
5959
5960
5961 #
5962 # Zlib
5963 #
5964
5965
5966
5967 # Check whether --with-zlib was given.
5968 if test "${with_zlib+set}" = set; then :
5969   withval=$with_zlib;
5970   case $withval in
5971     yes)
5972       :
5973       ;;
5974     no)
5975       :
5976       ;;
5977     *)
5978       as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
5979       ;;
5980   esac
5981
5982 else
5983   with_zlib=yes
5984
5985 fi
5986
5987
5988
5989
5990 #
5991 # Elf
5992 #
5993
5994 # Assume system is ELF if it predefines __ELF__ as 1,
5995 # otherwise believe host_os based default.
5996 case $host_os in
5997     freebsd1*|freebsd2*) elf=no;;
5998     freebsd3*|freebsd4*) elf=yes;;
5999 esac
6000
6001
6002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6003 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6004 if ${ac_cv_path_GREP+:} false; then :
6005   $as_echo_n "(cached) " >&6
6006 else
6007   if test -z "$GREP"; then
6008   ac_path_GREP_found=false
6009   # Loop through the user's path and test for each of PROGNAME-LIST
6010   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6011 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6012 do
6013   IFS=$as_save_IFS
6014   test -z "$as_dir" && as_dir=.
6015     for ac_prog in grep ggrep; do
6016     for ac_exec_ext in '' $ac_executable_extensions; do
6017       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6018       as_fn_executable_p "$ac_path_GREP" || continue
6019 # Check for GNU ac_path_GREP and select it if it is found.
6020   # Check for GNU $ac_path_GREP
6021 case `"$ac_path_GREP" --version 2>&1` in
6022 *GNU*)
6023   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6024 *)
6025   ac_count=0
6026   $as_echo_n 0123456789 >"conftest.in"
6027   while :
6028   do
6029     cat "conftest.in" "conftest.in" >"conftest.tmp"
6030     mv "conftest.tmp" "conftest.in"
6031     cp "conftest.in" "conftest.nl"
6032     $as_echo 'GREP' >> "conftest.nl"
6033     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6034     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6035     as_fn_arith $ac_count + 1 && ac_count=$as_val
6036     if test $ac_count -gt ${ac_path_GREP_max-0}; then
6037       # Best one so far, save it but keep looking for a better one
6038       ac_cv_path_GREP="$ac_path_GREP"
6039       ac_path_GREP_max=$ac_count
6040     fi
6041     # 10*(2^10) chars as input seems more than enough
6042     test $ac_count -gt 10 && break
6043   done
6044   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6045 esac
6046
6047       $ac_path_GREP_found && break 3
6048     done
6049   done
6050   done
6051 IFS=$as_save_IFS
6052   if test -z "$ac_cv_path_GREP"; then
6053     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6054   fi
6055 else
6056   ac_cv_path_GREP=$GREP
6057 fi
6058
6059 fi
6060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6061 $as_echo "$ac_cv_path_GREP" >&6; }
6062  GREP="$ac_cv_path_GREP"
6063
6064
6065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6066 $as_echo_n "checking for egrep... " >&6; }
6067 if ${ac_cv_path_EGREP+:} false; then :
6068   $as_echo_n "(cached) " >&6
6069 else
6070   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6071    then ac_cv_path_EGREP="$GREP -E"
6072    else
6073      if test -z "$EGREP"; then
6074   ac_path_EGREP_found=false
6075   # Loop through the user's path and test for each of PROGNAME-LIST
6076   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6077 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6078 do
6079   IFS=$as_save_IFS
6080   test -z "$as_dir" && as_dir=.
6081     for ac_prog in egrep; do
6082     for ac_exec_ext in '' $ac_executable_extensions; do
6083       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6084       as_fn_executable_p "$ac_path_EGREP" || continue
6085 # Check for GNU ac_path_EGREP and select it if it is found.
6086   # Check for GNU $ac_path_EGREP
6087 case `"$ac_path_EGREP" --version 2>&1` in
6088 *GNU*)
6089   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6090 *)
6091   ac_count=0
6092   $as_echo_n 0123456789 >"conftest.in"
6093   while :
6094   do
6095     cat "conftest.in" "conftest.in" >"conftest.tmp"
6096     mv "conftest.tmp" "conftest.in"
6097     cp "conftest.in" "conftest.nl"
6098     $as_echo 'EGREP' >> "conftest.nl"
6099     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6100     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6101     as_fn_arith $ac_count + 1 && ac_count=$as_val
6102     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6103       # Best one so far, save it but keep looking for a better one
6104       ac_cv_path_EGREP="$ac_path_EGREP"
6105       ac_path_EGREP_max=$ac_count
6106     fi
6107     # 10*(2^10) chars as input seems more than enough
6108     test $ac_count -gt 10 && break
6109   done
6110   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6111 esac
6112
6113       $ac_path_EGREP_found && break 3
6114     done
6115   done
6116   done
6117 IFS=$as_save_IFS
6118   if test -z "$ac_cv_path_EGREP"; then
6119     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6120   fi
6121 else
6122   ac_cv_path_EGREP=$EGREP
6123 fi
6124
6125    fi
6126 fi
6127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6128 $as_echo "$ac_cv_path_EGREP" >&6; }
6129  EGREP="$ac_cv_path_EGREP"
6130
6131
6132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6133 /* end confdefs.h.  */
6134 #if __ELF__
6135   yes
6136 #endif
6137
6138 _ACEOF
6139 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6140   $EGREP "yes" >/dev/null 2>&1; then :
6141   ELF_SYS=true
6142 else
6143   if test "X$elf" = "Xyes" ; then
6144   ELF_SYS=true
6145 else
6146   ELF_SYS=
6147 fi
6148 fi
6149 rm -f conftest*
6150
6151
6152
6153 #
6154 # Assignments
6155 #
6156
6157 CPPFLAGS="$CPPFLAGS $INCLUDES"
6158 LDFLAGS="$LDFLAGS $LIBDIRS"
6159
6160
6161
6162
6163
6164 # Check whether --with-gnu-ld was given.
6165 if test "${with_gnu_ld+set}" = set; then :
6166   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
6167 else
6168   with_gnu_ld=no
6169 fi
6170
6171 ac_prog=ld
6172 if test "$GCC" = yes; then
6173   # Check if gcc -print-prog-name=ld gives a path.
6174   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
6175 $as_echo_n "checking for ld used by GCC... " >&6; }
6176   case $host in
6177   *-*-mingw*)
6178     # gcc leaves a trailing carriage return which upsets mingw
6179     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6180   *)
6181     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6182   esac
6183   case "$ac_prog" in
6184     # Accept absolute paths.
6185     [\\/]* | [A-Za-z]:[\\/]*)
6186       re_direlt='/[^/][^/]*/\.\./'
6187       # Canonicalize the path of ld
6188       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
6189       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
6190         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
6191       done
6192       test -z "$LD" && LD="$ac_prog"
6193       ;;
6194   "")
6195     # If it fails, then pretend we aren't using GCC.
6196     ac_prog=ld
6197     ;;
6198   *)
6199     # If it is relative, then search for the first ld in PATH.
6200     with_gnu_ld=unknown
6201     ;;
6202   esac
6203 elif test "$with_gnu_ld" = yes; then
6204   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
6205 $as_echo_n "checking for GNU ld... " >&6; }
6206 else
6207   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
6208 $as_echo_n "checking for non-GNU ld... " >&6; }
6209 fi
6210 if ${ac_cv_path_LD+:} false; then :
6211   $as_echo_n "(cached) " >&6
6212 else
6213   if test -z "$LD"; then
6214   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
6215   for ac_dir in $PATH; do
6216     test -z "$ac_dir" && ac_dir=.
6217     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6218       ac_cv_path_LD="$ac_dir/$ac_prog"
6219       # Check to see if the program is GNU ld.  I'd rather use --version,
6220       # but apparently some GNU ld's only accept -v.
6221       # Break only if it was the GNU/non-GNU ld that we prefer.
6222       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
6223         test "$with_gnu_ld" != no && break
6224       else
6225         test "$with_gnu_ld" != yes && break
6226       fi
6227     fi
6228   done
6229   IFS="$ac_save_ifs"
6230 else
6231   ac_cv_path_LD="$LD" # Let the user override the test with a path.
6232 fi
6233 fi
6234
6235 LD="$ac_cv_path_LD"
6236 if test -n "$LD"; then
6237   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
6238 $as_echo "$LD" >&6; }
6239 else
6240   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6241 $as_echo "no" >&6; }
6242 fi
6243 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
6244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
6245 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
6246 if ${ac_cv_prog_gnu_ld+:} false; then :
6247   $as_echo_n "(cached) " >&6
6248 else
6249   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
6250 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
6251   ac_cv_prog_gnu_ld=yes
6252 else
6253   ac_cv_prog_gnu_ld=no
6254 fi
6255 fi
6256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
6257 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
6258 with_gnu_ld=$ac_cv_prog_gnu_ld
6259
6260
6261
6262
6263 case $host_os in sysv5*)
6264   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ld -R works" >&5
6265 $as_echo_n "checking whether ld -R works... " >&6; }
6266 if ${pgac_cv_prog_ld_R+:} false; then :
6267   $as_echo_n "(cached) " >&6
6268 else
6269
6270     pgac_save_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -Wl,-R/usr/lib"
6271     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6272 /* end confdefs.h.  */
6273
6274 int
6275 main ()
6276 {
6277
6278   ;
6279   return 0;
6280 }
6281 _ACEOF
6282 if ac_fn_c_try_link "$LINENO"; then :
6283   pgac_cv_prog_ld_R=yes
6284 else
6285   pgac_cv_prog_ld_R=no
6286 fi
6287 rm -f core conftest.err conftest.$ac_objext \
6288     conftest$ac_exeext conftest.$ac_ext
6289     LDFLAGS=$pgac_save_LDFLAGS
6290
6291 fi
6292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_ld_R" >&5
6293 $as_echo "$pgac_cv_prog_ld_R" >&6; }
6294   ld_R_works=$pgac_cv_prog_ld_R
6295
6296 esac
6297 if test -n "$ac_tool_prefix"; then
6298   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6299 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6301 $as_echo_n "checking for $ac_word... " >&6; }
6302 if ${ac_cv_prog_RANLIB+:} false; then :
6303   $as_echo_n "(cached) " >&6
6304 else
6305   if test -n "$RANLIB"; then
6306   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6307 else
6308 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6309 for as_dir in $PATH
6310 do
6311   IFS=$as_save_IFS
6312   test -z "$as_dir" && as_dir=.
6313     for ac_exec_ext in '' $ac_executable_extensions; do
6314   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6315     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6316     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6317     break 2
6318   fi
6319 done
6320   done
6321 IFS=$as_save_IFS
6322
6323 fi
6324 fi
6325 RANLIB=$ac_cv_prog_RANLIB
6326 if test -n "$RANLIB"; then
6327   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6328 $as_echo "$RANLIB" >&6; }
6329 else
6330   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6331 $as_echo "no" >&6; }
6332 fi
6333
6334
6335 fi
6336 if test -z "$ac_cv_prog_RANLIB"; then
6337   ac_ct_RANLIB=$RANLIB
6338   # Extract the first word of "ranlib", so it can be a program name with args.
6339 set dummy ranlib; ac_word=$2
6340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6341 $as_echo_n "checking for $ac_word... " >&6; }
6342 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6343   $as_echo_n "(cached) " >&6
6344 else
6345   if test -n "$ac_ct_RANLIB"; then
6346   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6347 else
6348 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6349 for as_dir in $PATH
6350 do
6351   IFS=$as_save_IFS
6352   test -z "$as_dir" && as_dir=.
6353     for ac_exec_ext in '' $ac_executable_extensions; do
6354   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6355     ac_cv_prog_ac_ct_RANLIB="ranlib"
6356     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6357     break 2
6358   fi
6359 done
6360   done
6361 IFS=$as_save_IFS
6362
6363 fi
6364 fi
6365 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6366 if test -n "$ac_ct_RANLIB"; then
6367   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6368 $as_echo "$ac_ct_RANLIB" >&6; }
6369 else
6370   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6371 $as_echo "no" >&6; }
6372 fi
6373
6374   if test "x$ac_ct_RANLIB" = x; then
6375     RANLIB=":"
6376   else
6377     case $cross_compiling:$ac_tool_warned in
6378 yes:)
6379 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6380 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6381 ac_tool_warned=yes ;;
6382 esac
6383     RANLIB=$ac_ct_RANLIB
6384   fi
6385 else
6386   RANLIB="$ac_cv_prog_RANLIB"
6387 fi
6388
6389
6390   if test -n "$ac_tool_prefix"; then
6391   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6392 set dummy ${ac_tool_prefix}strip; ac_word=$2
6393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6394 $as_echo_n "checking for $ac_word... " >&6; }
6395 if ${ac_cv_prog_STRIP+:} false; then :
6396   $as_echo_n "(cached) " >&6
6397 else
6398   if test -n "$STRIP"; then
6399   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6400 else
6401 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6402 for as_dir in $PATH
6403 do
6404   IFS=$as_save_IFS
6405   test -z "$as_dir" && as_dir=.
6406     for ac_exec_ext in '' $ac_executable_extensions; do
6407   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6408     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6409     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6410     break 2
6411   fi
6412 done
6413   done
6414 IFS=$as_save_IFS
6415
6416 fi
6417 fi
6418 STRIP=$ac_cv_prog_STRIP
6419 if test -n "$STRIP"; then
6420   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6421 $as_echo "$STRIP" >&6; }
6422 else
6423   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6424 $as_echo "no" >&6; }
6425 fi
6426
6427
6428 fi
6429 if test -z "$ac_cv_prog_STRIP"; then
6430   ac_ct_STRIP=$STRIP
6431   # Extract the first word of "strip", so it can be a program name with args.
6432 set dummy strip; ac_word=$2
6433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6434 $as_echo_n "checking for $ac_word... " >&6; }
6435 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
6436   $as_echo_n "(cached) " >&6
6437 else
6438   if test -n "$ac_ct_STRIP"; then
6439   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6440 else
6441 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6442 for as_dir in $PATH
6443 do
6444   IFS=$as_save_IFS
6445   test -z "$as_dir" && as_dir=.
6446     for ac_exec_ext in '' $ac_executable_extensions; do
6447   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6448     ac_cv_prog_ac_ct_STRIP="strip"
6449     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6450     break 2
6451   fi
6452 done
6453   done
6454 IFS=$as_save_IFS
6455
6456 fi
6457 fi
6458 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6459 if test -n "$ac_ct_STRIP"; then
6460   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6461 $as_echo "$ac_ct_STRIP" >&6; }
6462 else
6463   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6464 $as_echo "no" >&6; }
6465 fi
6466
6467   if test "x$ac_ct_STRIP" = x; then
6468     STRIP=":"
6469   else
6470     case $cross_compiling:$ac_tool_warned in
6471 yes:)
6472 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6473 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6474 ac_tool_warned=yes ;;
6475 esac
6476     STRIP=$ac_ct_STRIP
6477   fi
6478 else
6479   STRIP="$ac_cv_prog_STRIP"
6480 fi
6481
6482
6483   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
6484 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
6485   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
6486     STRIP_STATIC_LIB="$STRIP -x"
6487     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
6488     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6489 $as_echo "yes" >&6; }
6490   else
6491     case $host_os in
6492       darwin*)
6493         STRIP="$STRIP -x"
6494         STRIP_STATIC_LIB=$STRIP
6495         STRIP_SHARED_LIB=$STRIP
6496         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6497 $as_echo "yes" >&6; }
6498         ;;
6499       *)
6500         STRIP_STATIC_LIB=:
6501         STRIP_SHARED_LIB=:
6502         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6503 $as_echo "no" >&6; }
6504         ;;
6505     esac
6506   fi
6507
6508
6509
6510 if test -n "$ac_tool_prefix"; then
6511   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6512 set dummy ${ac_tool_prefix}ar; ac_word=$2
6513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6514 $as_echo_n "checking for $ac_word... " >&6; }
6515 if ${ac_cv_prog_AR+:} false; then :
6516   $as_echo_n "(cached) " >&6
6517 else
6518   if test -n "$AR"; then
6519   ac_cv_prog_AR="$AR" # Let the user override the test.
6520 else
6521 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6522 for as_dir in $PATH
6523 do
6524   IFS=$as_save_IFS
6525   test -z "$as_dir" && as_dir=.
6526     for ac_exec_ext in '' $ac_executable_extensions; do
6527   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6528     ac_cv_prog_AR="${ac_tool_prefix}ar"
6529     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6530     break 2
6531   fi
6532 done
6533   done
6534 IFS=$as_save_IFS
6535
6536 fi
6537 fi
6538 AR=$ac_cv_prog_AR
6539 if test -n "$AR"; then
6540   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6541 $as_echo "$AR" >&6; }
6542 else
6543   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6544 $as_echo "no" >&6; }
6545 fi
6546
6547
6548 fi
6549 if test -z "$ac_cv_prog_AR"; then
6550   ac_ct_AR=$AR
6551   # Extract the first word of "ar", so it can be a program name with args.
6552 set dummy ar; ac_word=$2
6553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6554 $as_echo_n "checking for $ac_word... " >&6; }
6555 if ${ac_cv_prog_ac_ct_AR+:} false; then :
6556   $as_echo_n "(cached) " >&6
6557 else
6558   if test -n "$ac_ct_AR"; then
6559   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6560 else
6561 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6562 for as_dir in $PATH
6563 do
6564   IFS=$as_save_IFS
6565   test -z "$as_dir" && as_dir=.
6566     for ac_exec_ext in '' $ac_executable_extensions; do
6567   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6568     ac_cv_prog_ac_ct_AR="ar"
6569     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6570     break 2
6571   fi
6572 done
6573   done
6574 IFS=$as_save_IFS
6575
6576 fi
6577 fi
6578 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6579 if test -n "$ac_ct_AR"; then
6580   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6581 $as_echo "$ac_ct_AR" >&6; }
6582 else
6583   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6584 $as_echo "no" >&6; }
6585 fi
6586
6587   if test "x$ac_ct_AR" = x; then
6588     AR="ar"
6589   else
6590     case $cross_compiling:$ac_tool_warned in
6591 yes:)
6592 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6593 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6594 ac_tool_warned=yes ;;
6595 esac
6596     AR=$ac_ct_AR
6597   fi
6598 else
6599   AR="$ac_cv_prog_AR"
6600 fi
6601
6602 if test "$PORTNAME" = "win32"; then
6603   if test -n "$ac_tool_prefix"; then
6604   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6605 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
6606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6607 $as_echo_n "checking for $ac_word... " >&6; }
6608 if ${ac_cv_prog_DLLTOOL+:} false; then :
6609   $as_echo_n "(cached) " >&6
6610 else
6611   if test -n "$DLLTOOL"; then
6612   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6613 else
6614 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6615 for as_dir in $PATH
6616 do
6617   IFS=$as_save_IFS
6618   test -z "$as_dir" && as_dir=.
6619     for ac_exec_ext in '' $ac_executable_extensions; do
6620   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6621     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
6622     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6623     break 2
6624   fi
6625 done
6626   done
6627 IFS=$as_save_IFS
6628
6629 fi
6630 fi
6631 DLLTOOL=$ac_cv_prog_DLLTOOL
6632 if test -n "$DLLTOOL"; then
6633   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
6634 $as_echo "$DLLTOOL" >&6; }
6635 else
6636   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6637 $as_echo "no" >&6; }
6638 fi
6639
6640
6641 fi
6642 if test -z "$ac_cv_prog_DLLTOOL"; then
6643   ac_ct_DLLTOOL=$DLLTOOL
6644   # Extract the first word of "dlltool", so it can be a program name with args.
6645 set dummy dlltool; ac_word=$2
6646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6647 $as_echo_n "checking for $ac_word... " >&6; }
6648 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
6649   $as_echo_n "(cached) " >&6
6650 else
6651   if test -n "$ac_ct_DLLTOOL"; then
6652   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6653 else
6654 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6655 for as_dir in $PATH
6656 do
6657   IFS=$as_save_IFS
6658   test -z "$as_dir" && as_dir=.
6659     for ac_exec_ext in '' $ac_executable_extensions; do
6660   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6661     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
6662     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6663     break 2
6664   fi
6665 done
6666   done
6667 IFS=$as_save_IFS
6668
6669 fi
6670 fi
6671 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6672 if test -n "$ac_ct_DLLTOOL"; then
6673   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
6674 $as_echo "$ac_ct_DLLTOOL" >&6; }
6675 else
6676   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6677 $as_echo "no" >&6; }
6678 fi
6679
6680   if test "x$ac_ct_DLLTOOL" = x; then
6681     DLLTOOL="dlltool"
6682   else
6683     case $cross_compiling:$ac_tool_warned in
6684 yes:)
6685 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6686 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6687 ac_tool_warned=yes ;;
6688 esac
6689     DLLTOOL=$ac_ct_DLLTOOL
6690   fi
6691 else
6692   DLLTOOL="$ac_cv_prog_DLLTOOL"
6693 fi
6694
6695   if test -n "$ac_tool_prefix"; then
6696   # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
6697 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
6698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6699 $as_echo_n "checking for $ac_word... " >&6; }
6700 if ${ac_cv_prog_DLLWRAP+:} false; then :
6701   $as_echo_n "(cached) " >&6
6702 else
6703   if test -n "$DLLWRAP"; then
6704   ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
6705 else
6706 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6707 for as_dir in $PATH
6708 do
6709   IFS=$as_save_IFS
6710   test -z "$as_dir" && as_dir=.
6711     for ac_exec_ext in '' $ac_executable_extensions; do
6712   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6713     ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
6714     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6715     break 2
6716   fi
6717 done
6718   done
6719 IFS=$as_save_IFS
6720
6721 fi
6722 fi
6723 DLLWRAP=$ac_cv_prog_DLLWRAP
6724 if test -n "$DLLWRAP"; then
6725   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5
6726 $as_echo "$DLLWRAP" >&6; }
6727 else
6728   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6729 $as_echo "no" >&6; }
6730 fi
6731
6732
6733 fi
6734 if test -z "$ac_cv_prog_DLLWRAP"; then
6735   ac_ct_DLLWRAP=$DLLWRAP
6736   # Extract the first word of "dllwrap", so it can be a program name with args.
6737 set dummy dllwrap; ac_word=$2
6738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6739 $as_echo_n "checking for $ac_word... " >&6; }
6740 if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then :
6741   $as_echo_n "(cached) " >&6
6742 else
6743   if test -n "$ac_ct_DLLWRAP"; then
6744   ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
6745 else
6746 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6747 for as_dir in $PATH
6748 do
6749   IFS=$as_save_IFS
6750   test -z "$as_dir" && as_dir=.
6751     for ac_exec_ext in '' $ac_executable_extensions; do
6752   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6753     ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
6754     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6755     break 2
6756   fi
6757 done
6758   done
6759 IFS=$as_save_IFS
6760
6761 fi
6762 fi
6763 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
6764 if test -n "$ac_ct_DLLWRAP"; then
6765   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5
6766 $as_echo "$ac_ct_DLLWRAP" >&6; }
6767 else
6768   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6769 $as_echo "no" >&6; }
6770 fi
6771
6772   if test "x$ac_ct_DLLWRAP" = x; then
6773     DLLWRAP="dllwrap"
6774   else
6775     case $cross_compiling:$ac_tool_warned in
6776 yes:)
6777 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6778 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6779 ac_tool_warned=yes ;;
6780 esac
6781     DLLWRAP=$ac_ct_DLLWRAP
6782   fi
6783 else
6784   DLLWRAP="$ac_cv_prog_DLLWRAP"
6785 fi
6786
6787   if test -n "$ac_tool_prefix"; then
6788   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6789 set dummy ${ac_tool_prefix}windres; ac_word=$2
6790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6791 $as_echo_n "checking for $ac_word... " >&6; }
6792 if ${ac_cv_prog_WINDRES+:} false; then :
6793   $as_echo_n "(cached) " >&6
6794 else
6795   if test -n "$WINDRES"; then
6796   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
6797 else
6798 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6799 for as_dir in $PATH
6800 do
6801   IFS=$as_save_IFS
6802   test -z "$as_dir" && as_dir=.
6803     for ac_exec_ext in '' $ac_executable_extensions; do
6804   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6805     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
6806     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6807     break 2
6808   fi
6809 done
6810   done
6811 IFS=$as_save_IFS
6812
6813 fi
6814 fi
6815 WINDRES=$ac_cv_prog_WINDRES
6816 if test -n "$WINDRES"; then
6817   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
6818 $as_echo "$WINDRES" >&6; }
6819 else
6820   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6821 $as_echo "no" >&6; }
6822 fi
6823
6824
6825 fi
6826 if test -z "$ac_cv_prog_WINDRES"; then
6827   ac_ct_WINDRES=$WINDRES
6828   # Extract the first word of "windres", so it can be a program name with args.
6829 set dummy windres; ac_word=$2
6830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6831 $as_echo_n "checking for $ac_word... " >&6; }
6832 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
6833   $as_echo_n "(cached) " >&6
6834 else
6835   if test -n "$ac_ct_WINDRES"; then
6836   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
6837 else
6838 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6839 for as_dir in $PATH
6840 do
6841   IFS=$as_save_IFS
6842   test -z "$as_dir" && as_dir=.
6843     for ac_exec_ext in '' $ac_executable_extensions; do
6844   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6845     ac_cv_prog_ac_ct_WINDRES="windres"
6846     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6847     break 2
6848   fi
6849 done
6850   done
6851 IFS=$as_save_IFS
6852
6853 fi
6854 fi
6855 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6856 if test -n "$ac_ct_WINDRES"; then
6857   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
6858 $as_echo "$ac_ct_WINDRES" >&6; }
6859 else
6860   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6861 $as_echo "no" >&6; }
6862 fi
6863
6864   if test "x$ac_ct_WINDRES" = x; then
6865     WINDRES="windres"
6866   else
6867     case $cross_compiling:$ac_tool_warned in
6868 yes:)
6869 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6870 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6871 ac_tool_warned=yes ;;
6872 esac
6873     WINDRES=$ac_ct_WINDRES
6874   fi
6875 else
6876   WINDRES="$ac_cv_prog_WINDRES"
6877 fi
6878
6879 fi
6880
6881 # Find a good install program.  We prefer a C program (faster),
6882 # so one script is as good as another.  But avoid the broken or
6883 # incompatible versions:
6884 # SysV /etc/install, /usr/sbin/install
6885 # SunOS /usr/etc/install
6886 # IRIX /sbin/install
6887 # AIX /bin/install
6888 # AmigaOS /C/install, which installs bootblocks on floppy discs
6889 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6890 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
6891 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6892 # OS/2's system install, which has a completely different semantic
6893 # ./install, which can be erroneously created by make from ./install.sh.
6894 # Reject install programs that cannot install multiple files.
6895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6896 $as_echo_n "checking for a BSD-compatible install... " >&6; }
6897 if test -z "$INSTALL"; then
6898 if ${ac_cv_path_install+:} false; then :
6899   $as_echo_n "(cached) " >&6
6900 else
6901   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6902 for as_dir in $PATH
6903 do
6904   IFS=$as_save_IFS
6905   test -z "$as_dir" && as_dir=.
6906     # Account for people who put trailing slashes in PATH elements.
6907 case $as_dir/ in #((
6908   ./ | .// | /[cC]/* | \
6909   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
6910   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
6911   /usr/ucb/* ) ;;
6912   *)
6913     # OSF1 and SCO ODT 3.0 have their own names for install.
6914     # Don't use installbsd from OSF since it installs stuff as root
6915     # by default.
6916     for ac_prog in ginstall scoinst install; do
6917       for ac_exec_ext in '' $ac_executable_extensions; do
6918         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
6919           if test $ac_prog = install &&
6920             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6921             # AIX install.  It has an incompatible calling convention.
6922             :
6923           elif test $ac_prog = install &&
6924             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6925             # program-specific install script used by HP pwplus--don't use.
6926             :
6927           else
6928             rm -rf conftest.one conftest.two conftest.dir
6929             echo one > conftest.one
6930             echo two > conftest.two
6931             mkdir conftest.dir
6932             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6933               test -s conftest.one && test -s conftest.two &&
6934               test -s conftest.dir/conftest.one &&
6935               test -s conftest.dir/conftest.two
6936             then
6937               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6938               break 3
6939             fi
6940           fi
6941         fi
6942       done
6943     done
6944     ;;
6945 esac
6946
6947   done
6948 IFS=$as_save_IFS
6949
6950 rm -rf conftest.one conftest.two conftest.dir
6951
6952 fi
6953   if test "${ac_cv_path_install+set}" = set; then
6954     INSTALL=$ac_cv_path_install
6955   else
6956     # As a last resort, use the slow shell script.  Don't cache a
6957     # value for INSTALL within a source directory, because that will
6958     # break other packages using the cache if that directory is
6959     # removed, or if the value is a relative name.
6960     INSTALL=$ac_install_sh
6961   fi
6962 fi
6963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6964 $as_echo "$INSTALL" >&6; }
6965
6966 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6967 # It thinks the first close brace ends the variable substitution.
6968 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6969
6970 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6971
6972 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6973
6974 # When Autoconf chooses install-sh as install program it tries to generate
6975 # a relative path to it in each makefile where it subsitutes it. This clashes
6976 # with our Makefile.global concept. This workaround helps.
6977 case $INSTALL in
6978   *install-sh*) install_bin='';;
6979   *) install_bin=$INSTALL;;
6980 esac
6981
6982
6983 # Extract the first word of "tar", so it can be a program name with args.
6984 set dummy tar; ac_word=$2
6985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6986 $as_echo_n "checking for $ac_word... " >&6; }
6987 if ${ac_cv_path_TAR+:} false; then :
6988   $as_echo_n "(cached) " >&6
6989 else
6990   case $TAR in
6991   [\\/]* | ?:[\\/]*)
6992   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
6993   ;;
6994   *)
6995   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6996 for as_dir in $PATH
6997 do
6998   IFS=$as_save_IFS
6999   test -z "$as_dir" && as_dir=.
7000     for ac_exec_ext in '' $ac_executable_extensions; do
7001   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7002     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
7003     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7004     break 2
7005   fi
7006 done
7007   done
7008 IFS=$as_save_IFS
7009
7010   ;;
7011 esac
7012 fi
7013 TAR=$ac_cv_path_TAR
7014 if test -n "$TAR"; then
7015   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
7016 $as_echo "$TAR" >&6; }
7017 else
7018   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7019 $as_echo "no" >&6; }
7020 fi
7021
7022
7023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7024 $as_echo_n "checking whether ln -s works... " >&6; }
7025 LN_S=$as_ln_s
7026 if test "$LN_S" = "ln -s"; then
7027   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7028 $as_echo "yes" >&6; }
7029 else
7030   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7031 $as_echo "no, using $LN_S" >&6; }
7032 fi
7033
7034 for ac_prog in gawk mawk nawk awk
7035 do
7036   # Extract the first word of "$ac_prog", so it can be a program name with args.
7037 set dummy $ac_prog; ac_word=$2
7038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7039 $as_echo_n "checking for $ac_word... " >&6; }
7040 if ${ac_cv_prog_AWK+:} false; then :
7041   $as_echo_n "(cached) " >&6
7042 else
7043   if test -n "$AWK"; then
7044   ac_cv_prog_AWK="$AWK" # Let the user override the test.
7045 else
7046 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7047 for as_dir in $PATH
7048 do
7049   IFS=$as_save_IFS
7050   test -z "$as_dir" && as_dir=.
7051     for ac_exec_ext in '' $ac_executable_extensions; do
7052   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7053     ac_cv_prog_AWK="$ac_prog"
7054     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7055     break 2
7056   fi
7057 done
7058   done
7059 IFS=$as_save_IFS
7060
7061 fi
7062 fi
7063 AWK=$ac_cv_prog_AWK
7064 if test -n "$AWK"; then
7065   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7066 $as_echo "$AWK" >&6; }
7067 else
7068   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7069 $as_echo "no" >&6; }
7070 fi
7071
7072
7073   test -n "$AWK" && break
7074 done
7075
7076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
7077 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
7078 if test -z "$MKDIR_P"; then
7079   if ${ac_cv_path_mkdir+:} false; then :
7080   $as_echo_n "(cached) " >&6
7081 else
7082   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7083 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
7084 do
7085   IFS=$as_save_IFS
7086   test -z "$as_dir" && as_dir=.
7087     for ac_prog in mkdir gmkdir; do
7088          for ac_exec_ext in '' $ac_executable_extensions; do
7089            as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
7090            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
7091              'mkdir (GNU coreutils) '* | \
7092              'mkdir (coreutils) '* | \
7093              'mkdir (fileutils) '4.1*)
7094                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
7095                break 3;;
7096            esac
7097          done
7098        done
7099   done
7100 IFS=$as_save_IFS
7101
7102 fi
7103
7104   test -d ./--version && rmdir ./--version
7105   if test "${ac_cv_path_mkdir+set}" = set; then
7106     MKDIR_P="$ac_cv_path_mkdir -p"
7107   else
7108     # As a last resort, use the slow shell script.  Don't cache a
7109     # value for MKDIR_P within a source directory, because that will
7110     # break other packages using the cache if that directory is
7111     # removed, or if the value is a relative name.
7112     MKDIR_P="$ac_install_sh -d"
7113   fi
7114 fi
7115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
7116 $as_echo "$MKDIR_P" >&6; }
7117
7118 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
7119 # a relative path to it in each makefile where it subsitutes it. This clashes
7120 # with our Makefile.global concept. This workaround helps.
7121 case $MKDIR_P in
7122   *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
7123 esac
7124
7125 # Let the user override the search
7126 if test -z "$BISON"; then
7127   for ac_prog in bison
7128 do
7129   # Extract the first word of "$ac_prog", so it can be a program name with args.
7130 set dummy $ac_prog; ac_word=$2
7131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7132 $as_echo_n "checking for $ac_word... " >&6; }
7133 if ${ac_cv_path_BISON+:} false; then :
7134   $as_echo_n "(cached) " >&6
7135 else
7136   case $BISON in
7137   [\\/]* | ?:[\\/]*)
7138   ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
7139   ;;
7140   *)
7141   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7142 for as_dir in $PATH
7143 do
7144   IFS=$as_save_IFS
7145   test -z "$as_dir" && as_dir=.
7146     for ac_exec_ext in '' $ac_executable_extensions; do
7147   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7148     ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
7149     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7150     break 2
7151   fi
7152 done
7153   done
7154 IFS=$as_save_IFS
7155
7156   ;;
7157 esac
7158 fi
7159 BISON=$ac_cv_path_BISON
7160 if test -n "$BISON"; then
7161   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
7162 $as_echo "$BISON" >&6; }
7163 else
7164   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7165 $as_echo "no" >&6; }
7166 fi
7167
7168
7169   test -n "$BISON" && break
7170 done
7171
7172 fi
7173
7174 if test "$BISON"; then
7175   pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
7176   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
7177 $as_echo "$as_me: using $pgac_bison_version" >&6;}
7178   if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
7179   then
7180     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7181 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
7182 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
7183 $as_echo "$as_me: WARNING:
7184 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
7185 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
7186     BISON=""
7187   fi
7188   # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
7189   # of the now preferred %name-prefix "base_yy", but the latter
7190   # doesn't work with Bison 2.3 or less.  So for now we silence the
7191   # deprecation warnings.
7192   if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
7193   then
7194     BISONFLAGS="$BISONFLAGS -Wno-deprecated"
7195   fi
7196 fi
7197
7198 if test -z "$BISON"; then
7199   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7200 *** Without Bison you will not be able to build PostgreSQL from Git nor
7201 *** change any of the parser definition files.  You can obtain Bison from
7202 *** a GNU mirror site.  (If you are using the official distribution of
7203 *** PostgreSQL then you do not need to worry about this, because the Bison
7204 *** output is pre-generated.)" >&5
7205 $as_echo "$as_me: WARNING:
7206 *** Without Bison you will not be able to build PostgreSQL from Git nor
7207 *** change any of the parser definition files.  You can obtain Bison from
7208 *** a GNU mirror site.  (If you are using the official distribution of
7209 *** PostgreSQL then you do not need to worry about this, because the Bison
7210 *** output is pre-generated.)" >&2;}
7211 fi
7212 # We don't need AC_SUBST(BISON) because AC_PATH_PROG did it
7213
7214
7215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
7216 $as_echo_n "checking for flex... " >&6; }
7217 if ${pgac_cv_path_flex+:} false; then :
7218   $as_echo_n "(cached) " >&6
7219 else
7220   # Let the user override the test
7221 if test -n "$FLEX"; then
7222   pgac_cv_path_flex=$FLEX
7223 else
7224   pgac_save_IFS=$IFS
7225   IFS=$PATH_SEPARATOR
7226   for pgac_dir in $PATH; do
7227     IFS=$pgac_save_IFS
7228     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
7229       pgac_dir=`pwd`
7230     fi
7231     for pgac_prog in flex lex; do
7232       pgac_candidate="$pgac_dir/$pgac_prog"
7233       if test -f "$pgac_candidate" \
7234         && $pgac_candidate --version </dev/null >/dev/null 2>&1
7235       then
7236         echo '%%'  > conftest.l
7237         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
7238           pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
7239           if echo "$pgac_flex_version" | sed 's/[.a-z]/ /g' | $AWK '{ if ($1 = 2 && $2 = 5 && $3 >= 31) exit 0; else exit 1;}'
7240           then
7241             pgac_cv_path_flex=$pgac_candidate
7242             break 2
7243           else
7244             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7245 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
7246 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
7247 $as_echo "$as_me: WARNING:
7248 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
7249 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
7250           fi
7251         fi
7252       fi
7253     done
7254   done
7255   rm -f conftest.l lex.yy.c
7256   : ${pgac_cv_path_flex=no}
7257 fi
7258
7259 fi
7260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
7261 $as_echo "$pgac_cv_path_flex" >&6; }
7262 if test x"$pgac_cv_path_flex" = x"no"; then
7263   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7264 *** Without Flex you will not be able to build PostgreSQL from Git nor
7265 *** change any of the scanner definition files.  You can obtain Flex from
7266 *** a GNU mirror site.  (If you are using the official distribution of
7267 *** PostgreSQL then you do not need to worry about this because the Flex
7268 *** output is pre-generated.)" >&5
7269 $as_echo "$as_me: WARNING:
7270 *** Without Flex you will not be able to build PostgreSQL from Git nor
7271 *** change any of the scanner definition files.  You can obtain Flex from
7272 *** a GNU mirror site.  (If you are using the official distribution of
7273 *** PostgreSQL then you do not need to worry about this because the Flex
7274 *** output is pre-generated.)" >&2;}
7275
7276   FLEX=
7277 else
7278   FLEX=$pgac_cv_path_flex
7279   pgac_flex_version=`$FLEX --version 2>/dev/null`
7280   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
7281 $as_echo "$as_me: using $pgac_flex_version" >&6;}
7282 fi
7283
7284
7285
7286
7287
7288 # Let the user override the search
7289 if test -z "$PERL"; then
7290   # Extract the first word of "perl", so it can be a program name with args.
7291 set dummy perl; ac_word=$2
7292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7293 $as_echo_n "checking for $ac_word... " >&6; }
7294 if ${ac_cv_path_PERL+:} false; then :
7295   $as_echo_n "(cached) " >&6
7296 else
7297   case $PERL in
7298   [\\/]* | ?:[\\/]*)
7299   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
7300   ;;
7301   *)
7302   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7303 for as_dir in $PATH
7304 do
7305   IFS=$as_save_IFS
7306   test -z "$as_dir" && as_dir=.
7307     for ac_exec_ext in '' $ac_executable_extensions; do
7308   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7309     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
7310     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7311     break 2
7312   fi
7313 done
7314   done
7315 IFS=$as_save_IFS
7316
7317   ;;
7318 esac
7319 fi
7320 PERL=$ac_cv_path_PERL
7321 if test -n "$PERL"; then
7322   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
7323 $as_echo "$PERL" >&6; }
7324 else
7325   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7326 $as_echo "no" >&6; }
7327 fi
7328
7329
7330 fi
7331
7332 if test "$PERL"; then
7333   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'`
7334   { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
7335 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
7336   if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
7337     $AWK '{ if ($1 = 5 && $2 >= 8) exit 1; else exit 0;}'
7338   then
7339     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7340 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7341 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
7342 $as_echo "$as_me: WARNING:
7343 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7344 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
7345     PERL=""
7346   fi
7347 fi
7348
7349 if test -z "$PERL"; then
7350   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7351 *** Without Perl you will not be able to build PostgreSQL from Git.
7352 *** You can obtain Perl from any CPAN mirror site.
7353 *** (If you are using the official distribution of PostgreSQL then you do not
7354 *** need to worry about this, because the Perl output is pre-generated.)" >&5
7355 $as_echo "$as_me: WARNING:
7356 *** Without Perl you will not be able to build PostgreSQL from Git.
7357 *** You can obtain Perl from any CPAN mirror site.
7358 *** (If you are using the official distribution of PostgreSQL then you do not
7359 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
7360 fi
7361
7362 if test "$with_perl" = yes; then
7363   if test -z "$PERL"; then
7364     as_fn_error $? "Perl not found" "$LINENO" 5
7365   fi
7366
7367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
7368 $as_echo_n "checking for Perl archlibexp... " >&6; }
7369 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
7370 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
7371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
7372 $as_echo "$perl_archlibexp" >&6; }
7373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
7374 $as_echo_n "checking for Perl privlibexp... " >&6; }
7375 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
7376 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
7377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
7378 $as_echo "$perl_privlibexp" >&6; }
7379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
7380 $as_echo_n "checking for Perl useshrplib... " >&6; }
7381 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
7382 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
7383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
7384 $as_echo "$perl_useshrplib" >&6; }
7385   if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
7386     as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
7387 You might have to rebuild your Perl installation.  Refer to the
7388 documentation for details.  Use --without-perl to disable building
7389 PL/Perl." "$LINENO" 5
7390   fi
7391
7392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
7393 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
7394 if test "$PORTNAME" = "win32" ; then
7395 perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
7396 test -e "$perl_archlibexp/CORE/$perl_lib.lib" && perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
7397 else
7398 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
7399 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
7400 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
7401 fi
7402 if test -z "$perl_embed_ldflags" ; then
7403         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7404 $as_echo "no" >&6; }
7405         as_fn_error $? "could not determine flags for linking embedded Perl.
7406 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
7407 installed." "$LINENO" 5
7408 else
7409         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
7410 $as_echo "$perl_embed_ldflags" >&6; }
7411 fi
7412
7413 fi
7414
7415 if test "$with_python" = yes; then
7416   # Extract the first word of "python", so it can be a program name with args.
7417 set dummy python; ac_word=$2
7418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7419 $as_echo_n "checking for $ac_word... " >&6; }
7420 if ${ac_cv_path_PYTHON+:} false; then :
7421   $as_echo_n "(cached) " >&6
7422 else
7423   case $PYTHON in
7424   [\\/]* | ?:[\\/]*)
7425   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
7426   ;;
7427   *)
7428   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7429 for as_dir in $PATH
7430 do
7431   IFS=$as_save_IFS
7432   test -z "$as_dir" && as_dir=.
7433     for ac_exec_ext in '' $ac_executable_extensions; do
7434   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7435     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
7436     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7437     break 2
7438   fi
7439 done
7440   done
7441 IFS=$as_save_IFS
7442
7443   ;;
7444 esac
7445 fi
7446 PYTHON=$ac_cv_path_PYTHON
7447 if test -n "$PYTHON"; then
7448   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
7449 $as_echo "$PYTHON" >&6; }
7450 else
7451   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7452 $as_echo "no" >&6; }
7453 fi
7454
7455
7456 if test x"$PYTHON" = x""; then
7457   as_fn_error $? "Python not found" "$LINENO" 5
7458 fi
7459
7460
7461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python distutils module" >&5
7462 $as_echo_n "checking for Python distutils module... " >&6; }
7463 if "${PYTHON}" -c 'import distutils' 2>&5
7464 then
7465     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7466 $as_echo "yes" >&6; }
7467 else
7468     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7469 $as_echo "no" >&6; }
7470     as_fn_error $? "distutils module not found" "$LINENO" 5
7471 fi
7472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
7473 $as_echo_n "checking Python configuration directory... " >&6; }
7474 python_majorversion=`${PYTHON} -c "import sys; print(sys.version[0])"`
7475 python_version=`${PYTHON} -c "import sys; print(sys.version[:3])"`
7476 python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
7477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
7478 $as_echo "$python_configdir" >&6; }
7479
7480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directories" >&5
7481 $as_echo_n "checking Python include directories... " >&6; }
7482 python_includespec=`${PYTHON} -c "
7483 import distutils.sysconfig
7484 a = '-I' + distutils.sysconfig.get_python_inc(False)
7485 b = '-I' + distutils.sysconfig.get_python_inc(True)
7486 if a == b:
7487     print(a)
7488 else:
7489     print(a + ' ' + b)"`
7490 if test "$PORTNAME" = win32 ; then
7491     python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
7492 fi
7493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
7494 $as_echo "$python_includespec" >&6; }
7495
7496
7497
7498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
7499 $as_echo_n "checking how to link an embedded Python application... " >&6; }
7500
7501 python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
7502 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
7503 python_so=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('SO'))))"`
7504 ldlibrary=`echo "${python_ldlibrary}" | sed "s/${python_so}$//"`
7505 python_enable_shared=`${PYTHON} -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_vars().get('Py_ENABLE_SHARED',0))"`
7506
7507 if test x"${python_libdir}" != x"" -a x"${python_ldlibrary}" != x"" -a x"${python_ldlibrary}" != x"${ldlibrary}"
7508 then
7509         # New way: use the official shared library
7510         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
7511         python_libspec="-L${python_libdir} -l${ldlibrary}"
7512 else
7513         # Old way: use libpython from python_configdir
7514         python_libdir="${python_configdir}"
7515         # LDVERSION was introduced in Python 3.2.
7516         python_ldversion=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDVERSION'))))"`
7517         if test x"${python_ldversion}" = x""; then
7518                 python_ldversion=$python_version
7519         fi
7520         python_libspec="-L${python_libdir} -lpython${python_ldversion}"
7521 fi
7522
7523 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
7524
7525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
7526 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
7527
7528
7529
7530
7531   # We need libpython as a shared library.  With Python >=2.5, we
7532   # check the Py_ENABLE_SHARED setting.  On Debian, the setting is not
7533   # correct before the jessie release (http://bugs.debian.org/695979).
7534   # We also want to support older Python versions.  So as a fallback
7535   # we see if there is a file that is named like a shared library.
7536
7537   if test "$python_enable_shared" != 1; then
7538     if test "$PORTNAME" = darwin; then
7539       # OS X does supply a .dylib even though Py_ENABLE_SHARED does
7540       # not get set.  The file detection logic below doesn't succeed
7541       # on older OS X versions, so make it explicit.
7542       python_enable_shared=1
7543     elif test "$PORTNAME" = win32; then
7544       # Windows also needs an explicit override.
7545       python_enable_shared=1
7546     else
7547       # We don't know the platform shared library extension here yet,
7548       # so we try some candidates.
7549       for dlsuffix in .so .sl; do
7550         if ls "$python_libdir"/libpython*${dlsuffix}* >/dev/null 2>&1; then
7551           python_enable_shared=1
7552           break
7553         fi
7554       done
7555     fi
7556   fi
7557
7558   if test "$python_enable_shared" != 1; then
7559     as_fn_error $? "cannot build PL/Python because libpython is not a shared library
7560 You might have to rebuild your Python installation.  Refer to the
7561 documentation for details.  Use --without-python to disable building
7562 PL/Python." "$LINENO" 5
7563   fi
7564 fi
7565
7566 if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
7567   # Extract the first word of "zic", so it can be a program name with args.
7568 set dummy zic; ac_word=$2
7569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7570 $as_echo_n "checking for $ac_word... " >&6; }
7571 if ${ac_cv_path_ZIC+:} false; then :
7572   $as_echo_n "(cached) " >&6
7573 else
7574   case $ZIC in
7575   [\\/]* | ?:[\\/]*)
7576   ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
7577   ;;
7578   *)
7579   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7580 for as_dir in $PATH
7581 do
7582   IFS=$as_save_IFS
7583   test -z "$as_dir" && as_dir=.
7584     for ac_exec_ext in '' $ac_executable_extensions; do
7585   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7586     ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
7587     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7588     break 2
7589   fi
7590 done
7591   done
7592 IFS=$as_save_IFS
7593
7594   ;;
7595 esac
7596 fi
7597 ZIC=$ac_cv_path_ZIC
7598 if test -n "$ZIC"; then
7599   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
7600 $as_echo "$ZIC" >&6; }
7601 else
7602   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7603 $as_echo "no" >&6; }
7604 fi
7605
7606
7607   if test -z "$ZIC"; then
7608     as_fn_error $? "
7609 When cross-compiling, either use the option --with-system-tzdata to use
7610 existing time-zone data, or set the environment variable ZIC to a zic
7611 program to use during the build." "$LINENO" 5
7612   fi
7613 fi
7614
7615
7616 ##
7617 ## Libraries
7618 ##
7619 ## Most libraries are included only if they demonstrably provide a function
7620 ## we need, but libm is an exception: always include it, because there are
7621 ## too many compilers that play cute optimization games that will break
7622 ## probes for standard functions such as pow().
7623 ##
7624
7625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
7626 $as_echo_n "checking for main in -lm... " >&6; }
7627 if ${ac_cv_lib_m_main+:} false; then :
7628   $as_echo_n "(cached) " >&6
7629 else
7630   ac_check_lib_save_LIBS=$LIBS
7631 LIBS="-lm  $LIBS"
7632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7633 /* end confdefs.h.  */
7634
7635
7636 int
7637 main ()
7638 {
7639 return main ();
7640   ;
7641   return 0;
7642 }
7643 _ACEOF
7644 if ac_fn_c_try_link "$LINENO"; then :
7645   ac_cv_lib_m_main=yes
7646 else
7647   ac_cv_lib_m_main=no
7648 fi
7649 rm -f core conftest.err conftest.$ac_objext \
7650     conftest$ac_exeext conftest.$ac_ext
7651 LIBS=$ac_check_lib_save_LIBS
7652 fi
7653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
7654 $as_echo "$ac_cv_lib_m_main" >&6; }
7655 if test "x$ac_cv_lib_m_main" = xyes; then :
7656   cat >>confdefs.h <<_ACEOF
7657 #define HAVE_LIBM 1
7658 _ACEOF
7659
7660   LIBS="-lm $LIBS"
7661
7662 fi
7663
7664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
7665 $as_echo_n "checking for library containing setproctitle... " >&6; }
7666 if ${ac_cv_search_setproctitle+:} false; then :
7667   $as_echo_n "(cached) " >&6
7668 else
7669   ac_func_search_save_LIBS=$LIBS
7670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7671 /* end confdefs.h.  */
7672
7673 /* Override any GCC internal prototype to avoid an error.
7674    Use char because int might match the return type of a GCC
7675    builtin and then its argument prototype would still apply.  */
7676 #ifdef __cplusplus
7677 extern "C"
7678 #endif
7679 char setproctitle ();
7680 int
7681 main ()
7682 {
7683 return setproctitle ();
7684   ;
7685   return 0;
7686 }
7687 _ACEOF
7688 for ac_lib in '' util; do
7689   if test -z "$ac_lib"; then
7690     ac_res="none required"
7691   else
7692     ac_res=-l$ac_lib
7693     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7694   fi
7695   if ac_fn_c_try_link "$LINENO"; then :
7696   ac_cv_search_setproctitle=$ac_res
7697 fi
7698 rm -f core conftest.err conftest.$ac_objext \
7699     conftest$ac_exeext
7700   if ${ac_cv_search_setproctitle+:} false; then :
7701   break
7702 fi
7703 done
7704 if ${ac_cv_search_setproctitle+:} false; then :
7705
7706 else
7707   ac_cv_search_setproctitle=no
7708 fi
7709 rm conftest.$ac_ext
7710 LIBS=$ac_func_search_save_LIBS
7711 fi
7712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
7713 $as_echo "$ac_cv_search_setproctitle" >&6; }
7714 ac_res=$ac_cv_search_setproctitle
7715 if test "$ac_res" != no; then :
7716   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7717
7718 fi
7719
7720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
7721 $as_echo_n "checking for library containing dlopen... " >&6; }
7722 if ${ac_cv_search_dlopen+:} false; then :
7723   $as_echo_n "(cached) " >&6
7724 else
7725   ac_func_search_save_LIBS=$LIBS
7726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7727 /* end confdefs.h.  */
7728
7729 /* Override any GCC internal prototype to avoid an error.
7730    Use char because int might match the return type of a GCC
7731    builtin and then its argument prototype would still apply.  */
7732 #ifdef __cplusplus
7733 extern "C"
7734 #endif
7735 char dlopen ();
7736 int
7737 main ()
7738 {
7739 return dlopen ();
7740   ;
7741   return 0;
7742 }
7743 _ACEOF
7744 for ac_lib in '' dl; do
7745   if test -z "$ac_lib"; then
7746     ac_res="none required"
7747   else
7748     ac_res=-l$ac_lib
7749     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7750   fi
7751   if ac_fn_c_try_link "$LINENO"; then :
7752   ac_cv_search_dlopen=$ac_res
7753 fi
7754 rm -f core conftest.err conftest.$ac_objext \
7755     conftest$ac_exeext
7756   if ${ac_cv_search_dlopen+:} false; then :
7757   break
7758 fi
7759 done
7760 if ${ac_cv_search_dlopen+:} false; then :
7761
7762 else
7763   ac_cv_search_dlopen=no
7764 fi
7765 rm conftest.$ac_ext
7766 LIBS=$ac_func_search_save_LIBS
7767 fi
7768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
7769 $as_echo "$ac_cv_search_dlopen" >&6; }
7770 ac_res=$ac_cv_search_dlopen
7771 if test "$ac_res" != no; then :
7772   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7773
7774 fi
7775
7776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
7777 $as_echo_n "checking for library containing socket... " >&6; }
7778 if ${ac_cv_search_socket+:} false; then :
7779   $as_echo_n "(cached) " >&6
7780 else
7781   ac_func_search_save_LIBS=$LIBS
7782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7783 /* end confdefs.h.  */
7784
7785 /* Override any GCC internal prototype to avoid an error.
7786    Use char because int might match the return type of a GCC
7787    builtin and then its argument prototype would still apply.  */
7788 #ifdef __cplusplus
7789 extern "C"
7790 #endif
7791 char socket ();
7792 int
7793 main ()
7794 {
7795 return socket ();
7796   ;
7797   return 0;
7798 }
7799 _ACEOF
7800 for ac_lib in '' socket ws2_32; do
7801   if test -z "$ac_lib"; then
7802     ac_res="none required"
7803   else
7804     ac_res=-l$ac_lib
7805     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7806   fi
7807   if ac_fn_c_try_link "$LINENO"; then :
7808   ac_cv_search_socket=$ac_res
7809 fi
7810 rm -f core conftest.err conftest.$ac_objext \
7811     conftest$ac_exeext
7812   if ${ac_cv_search_socket+:} false; then :
7813   break
7814 fi
7815 done
7816 if ${ac_cv_search_socket+:} false; then :
7817
7818 else
7819   ac_cv_search_socket=no
7820 fi
7821 rm conftest.$ac_ext
7822 LIBS=$ac_func_search_save_LIBS
7823 fi
7824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
7825 $as_echo "$ac_cv_search_socket" >&6; }
7826 ac_res=$ac_cv_search_socket
7827 if test "$ac_res" != no; then :
7828   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7829
7830 fi
7831
7832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
7833 $as_echo_n "checking for library containing shl_load... " >&6; }
7834 if ${ac_cv_search_shl_load+:} false; then :
7835   $as_echo_n "(cached) " >&6
7836 else
7837   ac_func_search_save_LIBS=$LIBS
7838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7839 /* end confdefs.h.  */
7840
7841 /* Override any GCC internal prototype to avoid an error.
7842    Use char because int might match the return type of a GCC
7843    builtin and then its argument prototype would still apply.  */
7844 #ifdef __cplusplus
7845 extern "C"
7846 #endif
7847 char shl_load ();
7848 int
7849 main ()
7850 {
7851 return shl_load ();
7852   ;
7853   return 0;
7854 }
7855 _ACEOF
7856 for ac_lib in '' dld; do
7857   if test -z "$ac_lib"; then
7858     ac_res="none required"
7859   else
7860     ac_res=-l$ac_lib
7861     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7862   fi
7863   if ac_fn_c_try_link "$LINENO"; then :
7864   ac_cv_search_shl_load=$ac_res
7865 fi
7866 rm -f core conftest.err conftest.$ac_objext \
7867     conftest$ac_exeext
7868   if ${ac_cv_search_shl_load+:} false; then :
7869   break
7870 fi
7871 done
7872 if ${ac_cv_search_shl_load+:} false; then :
7873
7874 else
7875   ac_cv_search_shl_load=no
7876 fi
7877 rm conftest.$ac_ext
7878 LIBS=$ac_func_search_save_LIBS
7879 fi
7880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
7881 $as_echo "$ac_cv_search_shl_load" >&6; }
7882 ac_res=$ac_cv_search_shl_load
7883 if test "$ac_res" != no; then :
7884   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7885
7886 fi
7887
7888 # We only use libld in port/dynloader/aix.c
7889 case $host_os in
7890      aix*)
7891         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ldopen" >&5
7892 $as_echo_n "checking for library containing ldopen... " >&6; }
7893 if ${ac_cv_search_ldopen+:} false; then :
7894   $as_echo_n "(cached) " >&6
7895 else
7896   ac_func_search_save_LIBS=$LIBS
7897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7898 /* end confdefs.h.  */
7899
7900 /* Override any GCC internal prototype to avoid an error.
7901    Use char because int might match the return type of a GCC
7902    builtin and then its argument prototype would still apply.  */
7903 #ifdef __cplusplus
7904 extern "C"
7905 #endif
7906 char ldopen ();
7907 int
7908 main ()
7909 {
7910 return ldopen ();
7911   ;
7912   return 0;
7913 }
7914 _ACEOF
7915 for ac_lib in '' ld; do
7916   if test -z "$ac_lib"; then
7917     ac_res="none required"
7918   else
7919     ac_res=-l$ac_lib
7920     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7921   fi
7922   if ac_fn_c_try_link "$LINENO"; then :
7923   ac_cv_search_ldopen=$ac_res
7924 fi
7925 rm -f core conftest.err conftest.$ac_objext \
7926     conftest$ac_exeext
7927   if ${ac_cv_search_ldopen+:} false; then :
7928   break
7929 fi
7930 done
7931 if ${ac_cv_search_ldopen+:} false; then :
7932
7933 else
7934   ac_cv_search_ldopen=no
7935 fi
7936 rm conftest.$ac_ext
7937 LIBS=$ac_func_search_save_LIBS
7938 fi
7939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ldopen" >&5
7940 $as_echo "$ac_cv_search_ldopen" >&6; }
7941 ac_res=$ac_cv_search_ldopen
7942 if test "$ac_res" != no; then :
7943   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7944
7945 fi
7946
7947         ;;
7948 esac
7949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
7950 $as_echo_n "checking for library containing getopt_long... " >&6; }
7951 if ${ac_cv_search_getopt_long+:} false; then :
7952   $as_echo_n "(cached) " >&6
7953 else
7954   ac_func_search_save_LIBS=$LIBS
7955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7956 /* end confdefs.h.  */
7957
7958 /* Override any GCC internal prototype to avoid an error.
7959    Use char because int might match the return type of a GCC
7960    builtin and then its argument prototype would still apply.  */
7961 #ifdef __cplusplus
7962 extern "C"
7963 #endif
7964 char getopt_long ();
7965 int
7966 main ()
7967 {
7968 return getopt_long ();
7969   ;
7970   return 0;
7971 }
7972 _ACEOF
7973 for ac_lib in '' getopt gnugetopt; do
7974   if test -z "$ac_lib"; then
7975     ac_res="none required"
7976   else
7977     ac_res=-l$ac_lib
7978     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7979   fi
7980   if ac_fn_c_try_link "$LINENO"; then :
7981   ac_cv_search_getopt_long=$ac_res
7982 fi
7983 rm -f core conftest.err conftest.$ac_objext \
7984     conftest$ac_exeext
7985   if ${ac_cv_search_getopt_long+:} false; then :
7986   break
7987 fi
7988 done
7989 if ${ac_cv_search_getopt_long+:} false; then :
7990
7991 else
7992   ac_cv_search_getopt_long=no
7993 fi
7994 rm conftest.$ac_ext
7995 LIBS=$ac_func_search_save_LIBS
7996 fi
7997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
7998 $as_echo "$ac_cv_search_getopt_long" >&6; }
7999 ac_res=$ac_cv_search_getopt_long
8000 if test "$ac_res" != no; then :
8001   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8002
8003 fi
8004
8005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
8006 $as_echo_n "checking for library containing crypt... " >&6; }
8007 if ${ac_cv_search_crypt+:} false; then :
8008   $as_echo_n "(cached) " >&6
8009 else
8010   ac_func_search_save_LIBS=$LIBS
8011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8012 /* end confdefs.h.  */
8013
8014 /* Override any GCC internal prototype to avoid an error.
8015    Use char because int might match the return type of a GCC
8016    builtin and then its argument prototype would still apply.  */
8017 #ifdef __cplusplus
8018 extern "C"
8019 #endif
8020 char crypt ();
8021 int
8022 main ()
8023 {
8024 return crypt ();
8025   ;
8026   return 0;
8027 }
8028 _ACEOF
8029 for ac_lib in '' crypt; do
8030   if test -z "$ac_lib"; then
8031     ac_res="none required"
8032   else
8033     ac_res=-l$ac_lib
8034     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8035   fi
8036   if ac_fn_c_try_link "$LINENO"; then :
8037   ac_cv_search_crypt=$ac_res
8038 fi
8039 rm -f core conftest.err conftest.$ac_objext \
8040     conftest$ac_exeext
8041   if ${ac_cv_search_crypt+:} false; then :
8042   break
8043 fi
8044 done
8045 if ${ac_cv_search_crypt+:} false; then :
8046
8047 else
8048   ac_cv_search_crypt=no
8049 fi
8050 rm conftest.$ac_ext
8051 LIBS=$ac_func_search_save_LIBS
8052 fi
8053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
8054 $as_echo "$ac_cv_search_crypt" >&6; }
8055 ac_res=$ac_cv_search_crypt
8056 if test "$ac_res" != no; then :
8057   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8058
8059 fi
8060
8061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
8062 $as_echo_n "checking for library containing shm_open... " >&6; }
8063 if ${ac_cv_search_shm_open+:} false; then :
8064   $as_echo_n "(cached) " >&6
8065 else
8066   ac_func_search_save_LIBS=$LIBS
8067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8068 /* end confdefs.h.  */
8069
8070 /* Override any GCC internal prototype to avoid an error.
8071    Use char because int might match the return type of a GCC
8072    builtin and then its argument prototype would still apply.  */
8073 #ifdef __cplusplus
8074 extern "C"
8075 #endif
8076 char shm_open ();
8077 int
8078 main ()
8079 {
8080 return shm_open ();
8081   ;
8082   return 0;
8083 }
8084 _ACEOF
8085 for ac_lib in '' rt; do
8086   if test -z "$ac_lib"; then
8087     ac_res="none required"
8088   else
8089     ac_res=-l$ac_lib
8090     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8091   fi
8092   if ac_fn_c_try_link "$LINENO"; then :
8093   ac_cv_search_shm_open=$ac_res
8094 fi
8095 rm -f core conftest.err conftest.$ac_objext \
8096     conftest$ac_exeext
8097   if ${ac_cv_search_shm_open+:} false; then :
8098   break
8099 fi
8100 done
8101 if ${ac_cv_search_shm_open+:} false; then :
8102
8103 else
8104   ac_cv_search_shm_open=no
8105 fi
8106 rm conftest.$ac_ext
8107 LIBS=$ac_func_search_save_LIBS
8108 fi
8109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
8110 $as_echo "$ac_cv_search_shm_open" >&6; }
8111 ac_res=$ac_cv_search_shm_open
8112 if test "$ac_res" != no; then :
8113   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8114
8115 fi
8116
8117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
8118 $as_echo_n "checking for library containing shm_unlink... " >&6; }
8119 if ${ac_cv_search_shm_unlink+:} false; then :
8120   $as_echo_n "(cached) " >&6
8121 else
8122   ac_func_search_save_LIBS=$LIBS
8123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8124 /* end confdefs.h.  */
8125
8126 /* Override any GCC internal prototype to avoid an error.
8127    Use char because int might match the return type of a GCC
8128    builtin and then its argument prototype would still apply.  */
8129 #ifdef __cplusplus
8130 extern "C"
8131 #endif
8132 char shm_unlink ();
8133 int
8134 main ()
8135 {
8136 return shm_unlink ();
8137   ;
8138   return 0;
8139 }
8140 _ACEOF
8141 for ac_lib in '' rt; do
8142   if test -z "$ac_lib"; then
8143     ac_res="none required"
8144   else
8145     ac_res=-l$ac_lib
8146     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8147   fi
8148   if ac_fn_c_try_link "$LINENO"; then :
8149   ac_cv_search_shm_unlink=$ac_res
8150 fi
8151 rm -f core conftest.err conftest.$ac_objext \
8152     conftest$ac_exeext
8153   if ${ac_cv_search_shm_unlink+:} false; then :
8154   break
8155 fi
8156 done
8157 if ${ac_cv_search_shm_unlink+:} false; then :
8158
8159 else
8160   ac_cv_search_shm_unlink=no
8161 fi
8162 rm conftest.$ac_ext
8163 LIBS=$ac_func_search_save_LIBS
8164 fi
8165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
8166 $as_echo "$ac_cv_search_shm_unlink" >&6; }
8167 ac_res=$ac_cv_search_shm_unlink
8168 if test "$ac_res" != no; then :
8169   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8170
8171 fi
8172
8173 # Solaris:
8174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
8175 $as_echo_n "checking for library containing fdatasync... " >&6; }
8176 if ${ac_cv_search_fdatasync+:} false; then :
8177   $as_echo_n "(cached) " >&6
8178 else
8179   ac_func_search_save_LIBS=$LIBS
8180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8181 /* end confdefs.h.  */
8182
8183 /* Override any GCC internal prototype to avoid an error.
8184    Use char because int might match the return type of a GCC
8185    builtin and then its argument prototype would still apply.  */
8186 #ifdef __cplusplus
8187 extern "C"
8188 #endif
8189 char fdatasync ();
8190 int
8191 main ()
8192 {
8193 return fdatasync ();
8194   ;
8195   return 0;
8196 }
8197 _ACEOF
8198 for ac_lib in '' rt posix4; do
8199   if test -z "$ac_lib"; then
8200     ac_res="none required"
8201   else
8202     ac_res=-l$ac_lib
8203     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8204   fi
8205   if ac_fn_c_try_link "$LINENO"; then :
8206   ac_cv_search_fdatasync=$ac_res
8207 fi
8208 rm -f core conftest.err conftest.$ac_objext \
8209     conftest$ac_exeext
8210   if ${ac_cv_search_fdatasync+:} false; then :
8211   break
8212 fi
8213 done
8214 if ${ac_cv_search_fdatasync+:} false; then :
8215
8216 else
8217   ac_cv_search_fdatasync=no
8218 fi
8219 rm conftest.$ac_ext
8220 LIBS=$ac_func_search_save_LIBS
8221 fi
8222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
8223 $as_echo "$ac_cv_search_fdatasync" >&6; }
8224 ac_res=$ac_cv_search_fdatasync
8225 if test "$ac_res" != no; then :
8226   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8227
8228 fi
8229
8230 # Required for thread_test.c on Solaris
8231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sched_yield" >&5
8232 $as_echo_n "checking for library containing sched_yield... " >&6; }
8233 if ${ac_cv_search_sched_yield+:} false; then :
8234   $as_echo_n "(cached) " >&6
8235 else
8236   ac_func_search_save_LIBS=$LIBS
8237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8238 /* end confdefs.h.  */
8239
8240 /* Override any GCC internal prototype to avoid an error.
8241    Use char because int might match the return type of a GCC
8242    builtin and then its argument prototype would still apply.  */
8243 #ifdef __cplusplus
8244 extern "C"
8245 #endif
8246 char sched_yield ();
8247 int
8248 main ()
8249 {
8250 return sched_yield ();
8251   ;
8252   return 0;
8253 }
8254 _ACEOF
8255 for ac_lib in '' rt; do
8256   if test -z "$ac_lib"; then
8257     ac_res="none required"
8258   else
8259     ac_res=-l$ac_lib
8260     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8261   fi
8262   if ac_fn_c_try_link "$LINENO"; then :
8263   ac_cv_search_sched_yield=$ac_res
8264 fi
8265 rm -f core conftest.err conftest.$ac_objext \
8266     conftest$ac_exeext
8267   if ${ac_cv_search_sched_yield+:} false; then :
8268   break
8269 fi
8270 done
8271 if ${ac_cv_search_sched_yield+:} false; then :
8272
8273 else
8274   ac_cv_search_sched_yield=no
8275 fi
8276 rm conftest.$ac_ext
8277 LIBS=$ac_func_search_save_LIBS
8278 fi
8279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sched_yield" >&5
8280 $as_echo "$ac_cv_search_sched_yield" >&6; }
8281 ac_res=$ac_cv_search_sched_yield
8282 if test "$ac_res" != no; then :
8283   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8284
8285 fi
8286
8287 # Required for thread_test.c on Solaris 2.5:
8288 # Other ports use it too (HP-UX) so test unconditionally
8289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
8290 $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
8291 if ${ac_cv_search_gethostbyname_r+:} false; then :
8292   $as_echo_n "(cached) " >&6
8293 else
8294   ac_func_search_save_LIBS=$LIBS
8295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8296 /* end confdefs.h.  */
8297
8298 /* Override any GCC internal prototype to avoid an error.
8299    Use char because int might match the return type of a GCC
8300    builtin and then its argument prototype would still apply.  */
8301 #ifdef __cplusplus
8302 extern "C"
8303 #endif
8304 char gethostbyname_r ();
8305 int
8306 main ()
8307 {
8308 return gethostbyname_r ();
8309   ;
8310   return 0;
8311 }
8312 _ACEOF
8313 for ac_lib in '' nsl; do
8314   if test -z "$ac_lib"; then
8315     ac_res="none required"
8316   else
8317     ac_res=-l$ac_lib
8318     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8319   fi
8320   if ac_fn_c_try_link "$LINENO"; then :
8321   ac_cv_search_gethostbyname_r=$ac_res
8322 fi
8323 rm -f core conftest.err conftest.$ac_objext \
8324     conftest$ac_exeext
8325   if ${ac_cv_search_gethostbyname_r+:} false; then :
8326   break
8327 fi
8328 done
8329 if ${ac_cv_search_gethostbyname_r+:} false; then :
8330
8331 else
8332   ac_cv_search_gethostbyname_r=no
8333 fi
8334 rm conftest.$ac_ext
8335 LIBS=$ac_func_search_save_LIBS
8336 fi
8337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
8338 $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
8339 ac_res=$ac_cv_search_gethostbyname_r
8340 if test "$ac_res" != no; then :
8341   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8342
8343 fi
8344
8345 # Cygwin:
8346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
8347 $as_echo_n "checking for library containing shmget... " >&6; }
8348 if ${ac_cv_search_shmget+:} false; then :
8349   $as_echo_n "(cached) " >&6
8350 else
8351   ac_func_search_save_LIBS=$LIBS
8352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8353 /* end confdefs.h.  */
8354
8355 /* Override any GCC internal prototype to avoid an error.
8356    Use char because int might match the return type of a GCC
8357    builtin and then its argument prototype would still apply.  */
8358 #ifdef __cplusplus
8359 extern "C"
8360 #endif
8361 char shmget ();
8362 int
8363 main ()
8364 {
8365 return shmget ();
8366   ;
8367   return 0;
8368 }
8369 _ACEOF
8370 for ac_lib in '' cygipc; do
8371   if test -z "$ac_lib"; then
8372     ac_res="none required"
8373   else
8374     ac_res=-l$ac_lib
8375     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8376   fi
8377   if ac_fn_c_try_link "$LINENO"; then :
8378   ac_cv_search_shmget=$ac_res
8379 fi
8380 rm -f core conftest.err conftest.$ac_objext \
8381     conftest$ac_exeext
8382   if ${ac_cv_search_shmget+:} false; then :
8383   break
8384 fi
8385 done
8386 if ${ac_cv_search_shmget+:} false; then :
8387
8388 else
8389   ac_cv_search_shmget=no
8390 fi
8391 rm conftest.$ac_ext
8392 LIBS=$ac_func_search_save_LIBS
8393 fi
8394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
8395 $as_echo "$ac_cv_search_shmget" >&6; }
8396 ac_res=$ac_cv_search_shmget
8397 if test "$ac_res" != no; then :
8398   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8399
8400 fi
8401
8402
8403 if test "$with_readline" = yes; then
8404
8405
8406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
8407 $as_echo_n "checking for library containing readline... " >&6; }
8408 if ${pgac_cv_check_readline+:} false; then :
8409   $as_echo_n "(cached) " >&6
8410 else
8411   pgac_cv_check_readline=no
8412 pgac_save_LIBS=$LIBS
8413 if test x"$with_libedit_preferred" != x"yes"
8414 then    READLINE_ORDER="-lreadline -ledit"
8415 else    READLINE_ORDER="-ledit -lreadline"
8416 fi
8417 for pgac_rllib in $READLINE_ORDER ; do
8418   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
8419     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
8420     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8421 /* end confdefs.h.  */
8422
8423 /* Override any GCC internal prototype to avoid an error.
8424    Use char because int might match the return type of a GCC
8425    builtin and then its argument prototype would still apply.  */
8426 #ifdef __cplusplus
8427 extern "C"
8428 #endif
8429 char readline ();
8430 int
8431 main ()
8432 {
8433 return readline ();
8434   ;
8435   return 0;
8436 }
8437 _ACEOF
8438 if ac_fn_c_try_link "$LINENO"; then :
8439
8440       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
8441       # recognize dependent libraries; assume curses is needed if we didn't
8442       # find any dependency.
8443       case $host_os in
8444         netbsd* | openbsd* | irix*)
8445           if test x"$pgac_lib" = x"" ; then
8446             pgac_lib=" -lcurses"
8447           fi ;;
8448       esac
8449
8450       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
8451       break
8452
8453 fi
8454 rm -f core conftest.err conftest.$ac_objext \
8455     conftest$ac_exeext conftest.$ac_ext
8456   done
8457   if test "$pgac_cv_check_readline" != no ; then
8458     break
8459   fi
8460 done
8461 LIBS=$pgac_save_LIBS
8462
8463 fi
8464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
8465 $as_echo "$pgac_cv_check_readline" >&6; }
8466 if test "$pgac_cv_check_readline" != no ; then
8467   LIBS="$pgac_cv_check_readline $LIBS"
8468
8469 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
8470
8471 fi
8472
8473
8474   if test x"$pgac_cv_check_readline" = x"no"; then
8475     as_fn_error $? "readline library not found
8476 If you have readline already installed, see config.log for details on the
8477 failure.  It is possible the compiler isn't looking in the proper directory.
8478 Use --without-readline to disable readline support." "$LINENO" 5
8479   fi
8480 fi
8481
8482 if test "$with_zlib" = yes; then
8483   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
8484 $as_echo_n "checking for inflate in -lz... " >&6; }
8485 if ${ac_cv_lib_z_inflate+:} false; then :
8486   $as_echo_n "(cached) " >&6
8487 else
8488   ac_check_lib_save_LIBS=$LIBS
8489 LIBS="-lz  $LIBS"
8490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8491 /* end confdefs.h.  */
8492
8493 /* Override any GCC internal prototype to avoid an error.
8494    Use char because int might match the return type of a GCC
8495    builtin and then its argument prototype would still apply.  */
8496 #ifdef __cplusplus
8497 extern "C"
8498 #endif
8499 char inflate ();
8500 int
8501 main ()
8502 {
8503 return inflate ();
8504   ;
8505   return 0;
8506 }
8507 _ACEOF
8508 if ac_fn_c_try_link "$LINENO"; then :
8509   ac_cv_lib_z_inflate=yes
8510 else
8511   ac_cv_lib_z_inflate=no
8512 fi
8513 rm -f core conftest.err conftest.$ac_objext \
8514     conftest$ac_exeext conftest.$ac_ext
8515 LIBS=$ac_check_lib_save_LIBS
8516 fi
8517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
8518 $as_echo "$ac_cv_lib_z_inflate" >&6; }
8519 if test "x$ac_cv_lib_z_inflate" = xyes; then :
8520   cat >>confdefs.h <<_ACEOF
8521 #define HAVE_LIBZ 1
8522 _ACEOF
8523
8524   LIBS="-lz $LIBS"
8525
8526 else
8527   as_fn_error $? "zlib library not found
8528 If you have zlib already installed, see config.log for details on the
8529 failure.  It is possible the compiler isn't looking in the proper directory.
8530 Use --without-zlib to disable zlib support." "$LINENO" 5
8531 fi
8532
8533 fi
8534
8535 if test "$enable_spinlocks" = yes; then
8536
8537 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
8538
8539 else
8540   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
8541 *** Not using spinlocks will cause poor performance." >&5
8542 $as_echo "$as_me: WARNING:
8543 *** Not using spinlocks will cause poor performance." >&2;}
8544 fi
8545
8546 if test "$enable_atomics" = yes; then
8547
8548 $as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
8549
8550 else
8551   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
8552 *** Not using atomic operations will cause poor performance." >&5
8553 $as_echo "$as_me: WARNING:
8554 *** Not using atomic operations will cause poor performance." >&2;}
8555 fi
8556
8557 if test "$with_gssapi" = yes ; then
8558   if test "$PORTNAME" != "win32"; then
8559     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
8560 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
8561 if ${ac_cv_search_gss_init_sec_context+:} false; then :
8562   $as_echo_n "(cached) " >&6
8563 else
8564   ac_func_search_save_LIBS=$LIBS
8565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8566 /* end confdefs.h.  */
8567
8568 /* Override any GCC internal prototype to avoid an error.
8569    Use char because int might match the return type of a GCC
8570    builtin and then its argument prototype would still apply.  */
8571 #ifdef __cplusplus
8572 extern "C"
8573 #endif
8574 char gss_init_sec_context ();
8575 int
8576 main ()
8577 {
8578 return gss_init_sec_context ();
8579   ;
8580   return 0;
8581 }
8582 _ACEOF
8583 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
8584   if test -z "$ac_lib"; then
8585     ac_res="none required"
8586   else
8587     ac_res=-l$ac_lib
8588     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8589   fi
8590   if ac_fn_c_try_link "$LINENO"; then :
8591   ac_cv_search_gss_init_sec_context=$ac_res
8592 fi
8593 rm -f core conftest.err conftest.$ac_objext \
8594     conftest$ac_exeext
8595   if ${ac_cv_search_gss_init_sec_context+:} false; then :
8596   break
8597 fi
8598 done
8599 if ${ac_cv_search_gss_init_sec_context+:} false; then :
8600
8601 else
8602   ac_cv_search_gss_init_sec_context=no
8603 fi
8604 rm conftest.$ac_ext
8605 LIBS=$ac_func_search_save_LIBS
8606 fi
8607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
8608 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
8609 ac_res=$ac_cv_search_gss_init_sec_context
8610 if test "$ac_res" != no; then :
8611   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8612
8613 else
8614   as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
8615 fi
8616
8617   else
8618     LIBS="$LIBS -lgssapi32"
8619   fi
8620 fi
8621
8622 if test "$with_openssl" = yes ; then
8623     if test "$PORTNAME" != "win32"; then
8624      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
8625 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
8626 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
8627   $as_echo_n "(cached) " >&6
8628 else
8629   ac_check_lib_save_LIBS=$LIBS
8630 LIBS="-lcrypto  $LIBS"
8631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8632 /* end confdefs.h.  */
8633
8634 /* Override any GCC internal prototype to avoid an error.
8635    Use char because int might match the return type of a GCC
8636    builtin and then its argument prototype would still apply.  */
8637 #ifdef __cplusplus
8638 extern "C"
8639 #endif
8640 char CRYPTO_new_ex_data ();
8641 int
8642 main ()
8643 {
8644 return CRYPTO_new_ex_data ();
8645   ;
8646   return 0;
8647 }
8648 _ACEOF
8649 if ac_fn_c_try_link "$LINENO"; then :
8650   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
8651 else
8652   ac_cv_lib_crypto_CRYPTO_new_ex_data=no
8653 fi
8654 rm -f core conftest.err conftest.$ac_objext \
8655     conftest$ac_exeext conftest.$ac_ext
8656 LIBS=$ac_check_lib_save_LIBS
8657 fi
8658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
8659 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
8660 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
8661   cat >>confdefs.h <<_ACEOF
8662 #define HAVE_LIBCRYPTO 1
8663 _ACEOF
8664
8665   LIBS="-lcrypto $LIBS"
8666
8667 else
8668   as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
8669 fi
8670
8671      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5
8672 $as_echo_n "checking for SSL_library_init in -lssl... " >&6; }
8673 if ${ac_cv_lib_ssl_SSL_library_init+:} false; then :
8674   $as_echo_n "(cached) " >&6
8675 else
8676   ac_check_lib_save_LIBS=$LIBS
8677 LIBS="-lssl  $LIBS"
8678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8679 /* end confdefs.h.  */
8680
8681 /* Override any GCC internal prototype to avoid an error.
8682    Use char because int might match the return type of a GCC
8683    builtin and then its argument prototype would still apply.  */
8684 #ifdef __cplusplus
8685 extern "C"
8686 #endif
8687 char SSL_library_init ();
8688 int
8689 main ()
8690 {
8691 return SSL_library_init ();
8692   ;
8693   return 0;
8694 }
8695 _ACEOF
8696 if ac_fn_c_try_link "$LINENO"; then :
8697   ac_cv_lib_ssl_SSL_library_init=yes
8698 else
8699   ac_cv_lib_ssl_SSL_library_init=no
8700 fi
8701 rm -f core conftest.err conftest.$ac_objext \
8702     conftest$ac_exeext conftest.$ac_ext
8703 LIBS=$ac_check_lib_save_LIBS
8704 fi
8705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_library_init" >&5
8706 $as_echo "$ac_cv_lib_ssl_SSL_library_init" >&6; }
8707 if test "x$ac_cv_lib_ssl_SSL_library_init" = xyes; then :
8708   cat >>confdefs.h <<_ACEOF
8709 #define HAVE_LIBSSL 1
8710 _ACEOF
8711
8712   LIBS="-lssl $LIBS"
8713
8714 else
8715   as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
8716 fi
8717
8718   else
8719      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
8720 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
8721 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
8722   $as_echo_n "(cached) " >&6
8723 else
8724   ac_func_search_save_LIBS=$LIBS
8725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8726 /* end confdefs.h.  */
8727
8728 /* Override any GCC internal prototype to avoid an error.
8729    Use char because int might match the return type of a GCC
8730    builtin and then its argument prototype would still apply.  */
8731 #ifdef __cplusplus
8732 extern "C"
8733 #endif
8734 char CRYPTO_new_ex_data ();
8735 int
8736 main ()
8737 {
8738 return CRYPTO_new_ex_data ();
8739   ;
8740   return 0;
8741 }
8742 _ACEOF
8743 for ac_lib in '' eay32 crypto; do
8744   if test -z "$ac_lib"; then
8745     ac_res="none required"
8746   else
8747     ac_res=-l$ac_lib
8748     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8749   fi
8750   if ac_fn_c_try_link "$LINENO"; then :
8751   ac_cv_search_CRYPTO_new_ex_data=$ac_res
8752 fi
8753 rm -f core conftest.err conftest.$ac_objext \
8754     conftest$ac_exeext
8755   if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
8756   break
8757 fi
8758 done
8759 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
8760
8761 else
8762   ac_cv_search_CRYPTO_new_ex_data=no
8763 fi
8764 rm conftest.$ac_ext
8765 LIBS=$ac_func_search_save_LIBS
8766 fi
8767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
8768 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
8769 ac_res=$ac_cv_search_CRYPTO_new_ex_data
8770 if test "$ac_res" != no; then :
8771   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8772
8773 else
8774   as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
8775 fi
8776
8777      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_library_init" >&5
8778 $as_echo_n "checking for library containing SSL_library_init... " >&6; }
8779 if ${ac_cv_search_SSL_library_init+:} false; then :
8780   $as_echo_n "(cached) " >&6
8781 else
8782   ac_func_search_save_LIBS=$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 SSL_library_init ();
8793 int
8794 main ()
8795 {
8796 return SSL_library_init ();
8797   ;
8798   return 0;
8799 }
8800 _ACEOF
8801 for ac_lib in '' ssleay32 ssl; do
8802   if test -z "$ac_lib"; then
8803     ac_res="none required"
8804   else
8805     ac_res=-l$ac_lib
8806     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8807   fi
8808   if ac_fn_c_try_link "$LINENO"; then :
8809   ac_cv_search_SSL_library_init=$ac_res
8810 fi
8811 rm -f core conftest.err conftest.$ac_objext \
8812     conftest$ac_exeext
8813   if ${ac_cv_search_SSL_library_init+:} false; then :
8814   break
8815 fi
8816 done
8817 if ${ac_cv_search_SSL_library_init+:} false; then :
8818
8819 else
8820   ac_cv_search_SSL_library_init=no
8821 fi
8822 rm conftest.$ac_ext
8823 LIBS=$ac_func_search_save_LIBS
8824 fi
8825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_library_init" >&5
8826 $as_echo "$ac_cv_search_SSL_library_init" >&6; }
8827 ac_res=$ac_cv_search_SSL_library_init
8828 if test "$ac_res" != no; then :
8829   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8830
8831 else
8832   as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
8833 fi
8834
8835   fi
8836   for ac_func in SSL_get_current_compression
8837 do :
8838   ac_fn_c_check_func "$LINENO" "SSL_get_current_compression" "ac_cv_func_SSL_get_current_compression"
8839 if test "x$ac_cv_func_SSL_get_current_compression" = xyes; then :
8840   cat >>confdefs.h <<_ACEOF
8841 #define HAVE_SSL_GET_CURRENT_COMPRESSION 1
8842 _ACEOF
8843
8844 fi
8845 done
8846
8847 fi
8848
8849 if test "$with_pam" = yes ; then
8850   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
8851 $as_echo_n "checking for pam_start in -lpam... " >&6; }
8852 if ${ac_cv_lib_pam_pam_start+:} false; then :
8853   $as_echo_n "(cached) " >&6
8854 else
8855   ac_check_lib_save_LIBS=$LIBS
8856 LIBS="-lpam  $LIBS"
8857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8858 /* end confdefs.h.  */
8859
8860 /* Override any GCC internal prototype to avoid an error.
8861    Use char because int might match the return type of a GCC
8862    builtin and then its argument prototype would still apply.  */
8863 #ifdef __cplusplus
8864 extern "C"
8865 #endif
8866 char pam_start ();
8867 int
8868 main ()
8869 {
8870 return pam_start ();
8871   ;
8872   return 0;
8873 }
8874 _ACEOF
8875 if ac_fn_c_try_link "$LINENO"; then :
8876   ac_cv_lib_pam_pam_start=yes
8877 else
8878   ac_cv_lib_pam_pam_start=no
8879 fi
8880 rm -f core conftest.err conftest.$ac_objext \
8881     conftest$ac_exeext conftest.$ac_ext
8882 LIBS=$ac_check_lib_save_LIBS
8883 fi
8884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
8885 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
8886 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
8887   cat >>confdefs.h <<_ACEOF
8888 #define HAVE_LIBPAM 1
8889 _ACEOF
8890
8891   LIBS="-lpam $LIBS"
8892
8893 else
8894   as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
8895 fi
8896
8897 fi
8898
8899 if test "$with_libxml" = yes ; then
8900   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
8901 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
8902 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
8903   $as_echo_n "(cached) " >&6
8904 else
8905   ac_check_lib_save_LIBS=$LIBS
8906 LIBS="-lxml2  $LIBS"
8907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8908 /* end confdefs.h.  */
8909
8910 /* Override any GCC internal prototype to avoid an error.
8911    Use char because int might match the return type of a GCC
8912    builtin and then its argument prototype would still apply.  */
8913 #ifdef __cplusplus
8914 extern "C"
8915 #endif
8916 char xmlSaveToBuffer ();
8917 int
8918 main ()
8919 {
8920 return xmlSaveToBuffer ();
8921   ;
8922   return 0;
8923 }
8924 _ACEOF
8925 if ac_fn_c_try_link "$LINENO"; then :
8926   ac_cv_lib_xml2_xmlSaveToBuffer=yes
8927 else
8928   ac_cv_lib_xml2_xmlSaveToBuffer=no
8929 fi
8930 rm -f core conftest.err conftest.$ac_objext \
8931     conftest$ac_exeext conftest.$ac_ext
8932 LIBS=$ac_check_lib_save_LIBS
8933 fi
8934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
8935 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
8936 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
8937   cat >>confdefs.h <<_ACEOF
8938 #define HAVE_LIBXML2 1
8939 _ACEOF
8940
8941   LIBS="-lxml2 $LIBS"
8942
8943 else
8944   as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
8945 fi
8946
8947 fi
8948
8949 if test "$with_libxslt" = yes ; then
8950   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
8951 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
8952 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
8953   $as_echo_n "(cached) " >&6
8954 else
8955   ac_check_lib_save_LIBS=$LIBS
8956 LIBS="-lxslt  $LIBS"
8957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8958 /* end confdefs.h.  */
8959
8960 /* Override any GCC internal prototype to avoid an error.
8961    Use char because int might match the return type of a GCC
8962    builtin and then its argument prototype would still apply.  */
8963 #ifdef __cplusplus
8964 extern "C"
8965 #endif
8966 char xsltCleanupGlobals ();
8967 int
8968 main ()
8969 {
8970 return xsltCleanupGlobals ();
8971   ;
8972   return 0;
8973 }
8974 _ACEOF
8975 if ac_fn_c_try_link "$LINENO"; then :
8976   ac_cv_lib_xslt_xsltCleanupGlobals=yes
8977 else
8978   ac_cv_lib_xslt_xsltCleanupGlobals=no
8979 fi
8980 rm -f core conftest.err conftest.$ac_objext \
8981     conftest$ac_exeext conftest.$ac_ext
8982 LIBS=$ac_check_lib_save_LIBS
8983 fi
8984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
8985 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
8986 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
8987   cat >>confdefs.h <<_ACEOF
8988 #define HAVE_LIBXSLT 1
8989 _ACEOF
8990
8991   LIBS="-lxslt $LIBS"
8992
8993 else
8994   as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
8995 fi
8996
8997 fi
8998
8999 # for contrib/sepgsql
9000 if test "$with_selinux" = yes; then
9001   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
9002 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
9003 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
9004   $as_echo_n "(cached) " >&6
9005 else
9006   ac_check_lib_save_LIBS=$LIBS
9007 LIBS="-lselinux  $LIBS"
9008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9009 /* end confdefs.h.  */
9010
9011 /* Override any GCC internal prototype to avoid an error.
9012    Use char because int might match the return type of a GCC
9013    builtin and then its argument prototype would still apply.  */
9014 #ifdef __cplusplus
9015 extern "C"
9016 #endif
9017 char security_compute_create_name ();
9018 int
9019 main ()
9020 {
9021 return security_compute_create_name ();
9022   ;
9023   return 0;
9024 }
9025 _ACEOF
9026 if ac_fn_c_try_link "$LINENO"; then :
9027   ac_cv_lib_selinux_security_compute_create_name=yes
9028 else
9029   ac_cv_lib_selinux_security_compute_create_name=no
9030 fi
9031 rm -f core conftest.err conftest.$ac_objext \
9032     conftest$ac_exeext conftest.$ac_ext
9033 LIBS=$ac_check_lib_save_LIBS
9034 fi
9035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
9036 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
9037 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
9038   cat >>confdefs.h <<_ACEOF
9039 #define HAVE_LIBSELINUX 1
9040 _ACEOF
9041
9042   LIBS="-lselinux $LIBS"
9043
9044 else
9045   as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
9046 fi
9047
9048 fi
9049
9050 # for contrib/uuid-ossp
9051 if test "$with_uuid" = bsd ; then
9052   # On BSD, the UUID functions are in libc
9053   ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
9054 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
9055   UUID_LIBS=""
9056 else
9057   as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
9058 fi
9059
9060 elif test "$with_uuid" = e2fs ; then
9061   # On OS X, the UUID functions are in libc
9062   ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
9063 if test "x$ac_cv_func_uuid_generate" = xyes; then :
9064   UUID_LIBS=""
9065 else
9066   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
9067 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
9068 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
9069   $as_echo_n "(cached) " >&6
9070 else
9071   ac_check_lib_save_LIBS=$LIBS
9072 LIBS="-luuid  $LIBS"
9073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9074 /* end confdefs.h.  */
9075
9076 /* Override any GCC internal prototype to avoid an error.
9077    Use char because int might match the return type of a GCC
9078    builtin and then its argument prototype would still apply.  */
9079 #ifdef __cplusplus
9080 extern "C"
9081 #endif
9082 char uuid_generate ();
9083 int
9084 main ()
9085 {
9086 return uuid_generate ();
9087   ;
9088   return 0;
9089 }
9090 _ACEOF
9091 if ac_fn_c_try_link "$LINENO"; then :
9092   ac_cv_lib_uuid_uuid_generate=yes
9093 else
9094   ac_cv_lib_uuid_uuid_generate=no
9095 fi
9096 rm -f core conftest.err conftest.$ac_objext \
9097     conftest$ac_exeext conftest.$ac_ext
9098 LIBS=$ac_check_lib_save_LIBS
9099 fi
9100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
9101 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
9102 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
9103   UUID_LIBS="-luuid"
9104 else
9105   as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
9106 fi
9107
9108 fi
9109
9110 elif test "$with_uuid" = ossp ; then
9111   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
9112 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
9113 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
9114   $as_echo_n "(cached) " >&6
9115 else
9116   ac_check_lib_save_LIBS=$LIBS
9117 LIBS="-lossp-uuid  $LIBS"
9118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9119 /* end confdefs.h.  */
9120
9121 /* Override any GCC internal prototype to avoid an error.
9122    Use char because int might match the return type of a GCC
9123    builtin and then its argument prototype would still apply.  */
9124 #ifdef __cplusplus
9125 extern "C"
9126 #endif
9127 char uuid_export ();
9128 int
9129 main ()
9130 {
9131 return uuid_export ();
9132   ;
9133   return 0;
9134 }
9135 _ACEOF
9136 if ac_fn_c_try_link "$LINENO"; then :
9137   ac_cv_lib_ossp_uuid_uuid_export=yes
9138 else
9139   ac_cv_lib_ossp_uuid_uuid_export=no
9140 fi
9141 rm -f core conftest.err conftest.$ac_objext \
9142     conftest$ac_exeext conftest.$ac_ext
9143 LIBS=$ac_check_lib_save_LIBS
9144 fi
9145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
9146 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
9147 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
9148   UUID_LIBS="-lossp-uuid"
9149 else
9150   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
9151 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
9152 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
9153   $as_echo_n "(cached) " >&6
9154 else
9155   ac_check_lib_save_LIBS=$LIBS
9156 LIBS="-luuid  $LIBS"
9157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9158 /* end confdefs.h.  */
9159
9160 /* Override any GCC internal prototype to avoid an error.
9161    Use char because int might match the return type of a GCC
9162    builtin and then its argument prototype would still apply.  */
9163 #ifdef __cplusplus
9164 extern "C"
9165 #endif
9166 char uuid_export ();
9167 int
9168 main ()
9169 {
9170 return uuid_export ();
9171   ;
9172   return 0;
9173 }
9174 _ACEOF
9175 if ac_fn_c_try_link "$LINENO"; then :
9176   ac_cv_lib_uuid_uuid_export=yes
9177 else
9178   ac_cv_lib_uuid_uuid_export=no
9179 fi
9180 rm -f core conftest.err conftest.$ac_objext \
9181     conftest$ac_exeext conftest.$ac_ext
9182 LIBS=$ac_check_lib_save_LIBS
9183 fi
9184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
9185 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
9186 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
9187   UUID_LIBS="-luuid"
9188 else
9189   as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
9190 fi
9191
9192 fi
9193
9194 fi
9195
9196
9197
9198 ##
9199 ## Header files
9200 ##
9201
9202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
9203 $as_echo_n "checking for ANSI C header files... " >&6; }
9204 if ${ac_cv_header_stdc+:} false; then :
9205   $as_echo_n "(cached) " >&6
9206 else
9207   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9208 /* end confdefs.h.  */
9209 #include <stdlib.h>
9210 #include <stdarg.h>
9211 #include <string.h>
9212 #include <float.h>
9213
9214 int
9215 main ()
9216 {
9217
9218   ;
9219   return 0;
9220 }
9221 _ACEOF
9222 if ac_fn_c_try_compile "$LINENO"; then :
9223   ac_cv_header_stdc=yes
9224 else
9225   ac_cv_header_stdc=no
9226 fi
9227 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9228
9229 if test $ac_cv_header_stdc = yes; then
9230   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9231   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9232 /* end confdefs.h.  */
9233 #include <string.h>
9234
9235 _ACEOF
9236 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9237   $EGREP "memchr" >/dev/null 2>&1; then :
9238
9239 else
9240   ac_cv_header_stdc=no
9241 fi
9242 rm -f conftest*
9243
9244 fi
9245
9246 if test $ac_cv_header_stdc = yes; then
9247   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9248   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9249 /* end confdefs.h.  */
9250 #include <stdlib.h>
9251
9252 _ACEOF
9253 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9254   $EGREP "free" >/dev/null 2>&1; then :
9255
9256 else
9257   ac_cv_header_stdc=no
9258 fi
9259 rm -f conftest*
9260
9261 fi
9262
9263 if test $ac_cv_header_stdc = yes; then
9264   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9265   if test "$cross_compiling" = yes; then :
9266   :
9267 else
9268   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9269 /* end confdefs.h.  */
9270 #include <ctype.h>
9271 #include <stdlib.h>
9272 #if ((' ' & 0x0FF) == 0x020)
9273 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9274 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9275 #else
9276 # define ISLOWER(c) \
9277                    (('a' <= (c) && (c) <= 'i') \
9278                      || ('j' <= (c) && (c) <= 'r') \
9279                      || ('s' <= (c) && (c) <= 'z'))
9280 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9281 #endif
9282
9283 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9284 int
9285 main ()
9286 {
9287   int i;
9288   for (i = 0; i < 256; i++)
9289     if (XOR (islower (i), ISLOWER (i))
9290         || toupper (i) != TOUPPER (i))
9291       return 2;
9292   return 0;
9293 }
9294 _ACEOF
9295 if ac_fn_c_try_run "$LINENO"; then :
9296
9297 else
9298   ac_cv_header_stdc=no
9299 fi
9300 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9301   conftest.$ac_objext conftest.beam conftest.$ac_ext
9302 fi
9303
9304 fi
9305 fi
9306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
9307 $as_echo "$ac_cv_header_stdc" >&6; }
9308 if test $ac_cv_header_stdc = yes; then
9309
9310 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
9311
9312 fi
9313
9314 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
9315 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
9316                   inttypes.h stdint.h unistd.h
9317 do :
9318   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9319 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
9320 "
9321 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9322   cat >>confdefs.h <<_ACEOF
9323 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9324 _ACEOF
9325
9326 fi
9327
9328 done
9329
9330
9331 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
9332 do :
9333   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9334 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9335 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9336   cat >>confdefs.h <<_ACEOF
9337 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9338 _ACEOF
9339
9340 fi
9341
9342 done
9343
9344
9345 # On BSD, test for net/if.h will fail unless sys/socket.h
9346 # is included first.
9347 for ac_header in net/if.h
9348 do :
9349   ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
9350 #ifdef HAVE_SYS_SOCKET_H
9351 #include <sys/socket.h>
9352 #endif
9353
9354 "
9355 if test "x$ac_cv_header_net_if_h" = xyes; then :
9356   cat >>confdefs.h <<_ACEOF
9357 #define HAVE_NET_IF_H 1
9358 _ACEOF
9359
9360 fi
9361
9362 done
9363
9364
9365 # On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
9366 # is included first.
9367 for ac_header in sys/ucred.h
9368 do :
9369   ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
9370 #include <sys/param.h>
9371
9372 "
9373 if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
9374   cat >>confdefs.h <<_ACEOF
9375 #define HAVE_SYS_UCRED_H 1
9376 _ACEOF
9377
9378 fi
9379
9380 done
9381
9382
9383 # At least on IRIX, test for netinet/tcp.h will fail unless
9384 # netinet/in.h is included first.
9385 for ac_header in netinet/in.h
9386 do :
9387   ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
9388 if test "x$ac_cv_header_netinet_in_h" = xyes; then :
9389   cat >>confdefs.h <<_ACEOF
9390 #define HAVE_NETINET_IN_H 1
9391 _ACEOF
9392
9393 fi
9394
9395 done
9396
9397 for ac_header in netinet/tcp.h
9398 do :
9399   ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
9400 #ifdef HAVE_NETINET_IN_H
9401 #include <netinet/in.h>
9402 #endif
9403
9404 "
9405 if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
9406   cat >>confdefs.h <<_ACEOF
9407 #define HAVE_NETINET_TCP_H 1
9408 _ACEOF
9409
9410 fi
9411
9412 done
9413
9414
9415 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
9416   for ac_header in readline/readline.h
9417 do :
9418   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
9419 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
9420   cat >>confdefs.h <<_ACEOF
9421 #define HAVE_READLINE_READLINE_H 1
9422 _ACEOF
9423
9424 else
9425   for ac_header in readline.h
9426 do :
9427   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
9428 if test "x$ac_cv_header_readline_h" = xyes; then :
9429   cat >>confdefs.h <<_ACEOF
9430 #define HAVE_READLINE_H 1
9431 _ACEOF
9432
9433 else
9434   as_fn_error $? "readline header not found
9435 If you have readline already installed, see config.log for details on the
9436 failure.  It is possible the compiler isn't looking in the proper directory.
9437 Use --without-readline to disable readline support." "$LINENO" 5
9438 fi
9439
9440 done
9441
9442 fi
9443
9444 done
9445
9446   for ac_header in readline/history.h
9447 do :
9448   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
9449 if test "x$ac_cv_header_readline_history_h" = xyes; then :
9450   cat >>confdefs.h <<_ACEOF
9451 #define HAVE_READLINE_HISTORY_H 1
9452 _ACEOF
9453
9454 else
9455   for ac_header in history.h
9456 do :
9457   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
9458 if test "x$ac_cv_header_history_h" = xyes; then :
9459   cat >>confdefs.h <<_ACEOF
9460 #define HAVE_HISTORY_H 1
9461 _ACEOF
9462
9463 else
9464   as_fn_error $? "history header not found
9465 If you have readline already installed, see config.log for details on the
9466 failure.  It is possible the compiler isn't looking in the proper directory.
9467 Use --without-readline to disable readline support." "$LINENO" 5
9468 fi
9469
9470 done
9471
9472 fi
9473
9474 done
9475
9476 fi
9477
9478 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
9479 # Some installations of libedit usurp /usr/include/readline/, which seems
9480 # bad practice, since in combined installations readline will have its headers
9481 # there.  We might have to resort to AC_EGREP checks to make sure we found
9482 # the proper header...
9483   for ac_header in editline/readline.h
9484 do :
9485   ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
9486 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
9487   cat >>confdefs.h <<_ACEOF
9488 #define HAVE_EDITLINE_READLINE_H 1
9489 _ACEOF
9490
9491 else
9492   for ac_header in readline.h
9493 do :
9494   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
9495 if test "x$ac_cv_header_readline_h" = xyes; then :
9496   cat >>confdefs.h <<_ACEOF
9497 #define HAVE_READLINE_H 1
9498 _ACEOF
9499
9500 else
9501   for ac_header in readline/readline.h
9502 do :
9503   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
9504 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
9505   cat >>confdefs.h <<_ACEOF
9506 #define HAVE_READLINE_READLINE_H 1
9507 _ACEOF
9508
9509 else
9510   as_fn_error $? "readline header not found
9511 If you have libedit already installed, see config.log for details on the
9512 failure.  It is possible the compiler isn't looking in the proper directory.
9513 Use --without-readline to disable libedit support." "$LINENO" 5
9514 fi
9515
9516 done
9517
9518 fi
9519
9520 done
9521
9522 fi
9523
9524 done
9525
9526 # Note: in a libedit installation, history.h is sometimes a dummy, and may
9527 # not be there at all.  Hence, don't complain if not found.  We must check
9528 # though, since in yet other versions it is an independent header.
9529   for ac_header in editline/history.h
9530 do :
9531   ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
9532 if test "x$ac_cv_header_editline_history_h" = xyes; then :
9533   cat >>confdefs.h <<_ACEOF
9534 #define HAVE_EDITLINE_HISTORY_H 1
9535 _ACEOF
9536
9537 else
9538   for ac_header in history.h
9539 do :
9540   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
9541 if test "x$ac_cv_header_history_h" = xyes; then :
9542   cat >>confdefs.h <<_ACEOF
9543 #define HAVE_HISTORY_H 1
9544 _ACEOF
9545
9546 else
9547   for ac_header in readline/history.h
9548 do :
9549   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
9550 if test "x$ac_cv_header_readline_history_h" = xyes; then :
9551   cat >>confdefs.h <<_ACEOF
9552 #define HAVE_READLINE_HISTORY_H 1
9553 _ACEOF
9554
9555 fi
9556
9557 done
9558
9559 fi
9560
9561 done
9562
9563 fi
9564
9565 done
9566
9567 fi
9568
9569 if test "$with_zlib" = yes; then
9570   ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
9571 if test "x$ac_cv_header_zlib_h" = xyes; then :
9572
9573 else
9574   as_fn_error $? "zlib header not found
9575 If you have zlib already installed, see config.log for details on the
9576 failure.  It is possible the compiler isn't looking in the proper directory.
9577 Use --without-zlib to disable zlib support." "$LINENO" 5
9578 fi
9579
9580
9581 fi
9582
9583 if test "$with_gssapi" = yes ; then
9584   for ac_header in gssapi/gssapi.h
9585 do :
9586   ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
9587 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
9588   cat >>confdefs.h <<_ACEOF
9589 #define HAVE_GSSAPI_GSSAPI_H 1
9590 _ACEOF
9591
9592 else
9593   for ac_header in gssapi.h
9594 do :
9595   ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
9596 if test "x$ac_cv_header_gssapi_h" = xyes; then :
9597   cat >>confdefs.h <<_ACEOF
9598 #define HAVE_GSSAPI_H 1
9599 _ACEOF
9600
9601 else
9602   as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
9603 fi
9604
9605 done
9606
9607 fi
9608
9609 done
9610
9611 fi
9612
9613 if test "$with_openssl" = yes ; then
9614   ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
9615 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
9616
9617 else
9618   as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
9619 fi
9620
9621
9622   ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
9623 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
9624
9625 else
9626   as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
9627 fi
9628
9629
9630 fi
9631
9632 if test "$with_pam" = yes ; then
9633   for ac_header in security/pam_appl.h
9634 do :
9635   ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
9636 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
9637   cat >>confdefs.h <<_ACEOF
9638 #define HAVE_SECURITY_PAM_APPL_H 1
9639 _ACEOF
9640
9641 else
9642   for ac_header in pam/pam_appl.h
9643 do :
9644   ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
9645 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
9646   cat >>confdefs.h <<_ACEOF
9647 #define HAVE_PAM_PAM_APPL_H 1
9648 _ACEOF
9649
9650 else
9651   as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
9652 fi
9653
9654 done
9655
9656 fi
9657
9658 done
9659
9660 fi
9661
9662 if test "$with_libxml" = yes ; then
9663   ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
9664 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
9665
9666 else
9667   as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
9668 fi
9669
9670
9671 fi
9672
9673 if test "$with_libxslt" = yes ; then
9674   ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
9675 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
9676
9677 else
9678   as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
9679 fi
9680
9681
9682 fi
9683
9684 if test "$with_ldap" = yes ; then
9685   if test "$PORTNAME" != "win32"; then
9686      for ac_header in ldap.h
9687 do :
9688   ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
9689 if test "x$ac_cv_header_ldap_h" = xyes; then :
9690   cat >>confdefs.h <<_ACEOF
9691 #define HAVE_LDAP_H 1
9692 _ACEOF
9693
9694 else
9695   as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
9696 fi
9697
9698 done
9699
9700      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
9701 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
9702 if ${pgac_cv_ldap_safe+:} false; then :
9703   $as_echo_n "(cached) " >&6
9704 else
9705   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9706 /* end confdefs.h.  */
9707 #include <ldap.h>
9708 #if !defined(LDAP_VENDOR_VERSION) || \
9709      (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
9710       LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
9711 choke me
9712 #endif
9713 int
9714 main ()
9715 {
9716
9717   ;
9718   return 0;
9719 }
9720 _ACEOF
9721 if ac_fn_c_try_compile "$LINENO"; then :
9722   pgac_cv_ldap_safe=yes
9723 else
9724   pgac_cv_ldap_safe=no
9725 fi
9726 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9727 fi
9728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
9729 $as_echo "$pgac_cv_ldap_safe" >&6; }
9730
9731 if test "$pgac_cv_ldap_safe" != yes; then
9732   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9733 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
9734 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
9735 *** also uses LDAP will crash on exit." >&5
9736 $as_echo "$as_me: WARNING:
9737 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
9738 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
9739 *** also uses LDAP will crash on exit." >&2;}
9740 fi
9741   else
9742      for ac_header in winldap.h
9743 do :
9744   ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
9745 #include <windows.h>
9746
9747 "
9748 if test "x$ac_cv_header_winldap_h" = xyes; then :
9749   cat >>confdefs.h <<_ACEOF
9750 #define HAVE_WINLDAP_H 1
9751 _ACEOF
9752
9753 else
9754   as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
9755 fi
9756
9757 done
9758
9759   fi
9760 fi
9761
9762 if test "$with_bonjour" = yes ; then
9763   ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
9764 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
9765
9766 else
9767   as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
9768 fi
9769
9770
9771 fi
9772
9773 # for contrib/uuid-ossp
9774 if test "$with_uuid" = bsd ; then
9775   for ac_header in uuid.h
9776 do :
9777   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
9778 if test "x$ac_cv_header_uuid_h" = xyes; then :
9779   cat >>confdefs.h <<_ACEOF
9780 #define HAVE_UUID_H 1
9781 _ACEOF
9782  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9783 /* end confdefs.h.  */
9784 #include <uuid.h>
9785
9786 _ACEOF
9787 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9788   $EGREP "uuid_to_string" >/dev/null 2>&1; then :
9789
9790 else
9791   as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
9792 fi
9793 rm -f conftest*
9794
9795 else
9796   as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
9797 fi
9798
9799 done
9800
9801 elif test "$with_uuid" = e2fs ; then
9802   for ac_header in uuid/uuid.h
9803 do :
9804   ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
9805 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
9806   cat >>confdefs.h <<_ACEOF
9807 #define HAVE_UUID_UUID_H 1
9808 _ACEOF
9809  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9810 /* end confdefs.h.  */
9811 #include <uuid/uuid.h>
9812
9813 _ACEOF
9814 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9815   $EGREP "uuid_generate" >/dev/null 2>&1; then :
9816
9817 else
9818   as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
9819 fi
9820 rm -f conftest*
9821
9822 else
9823   for ac_header in uuid.h
9824 do :
9825   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
9826 if test "x$ac_cv_header_uuid_h" = xyes; then :
9827   cat >>confdefs.h <<_ACEOF
9828 #define HAVE_UUID_H 1
9829 _ACEOF
9830  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9831 /* end confdefs.h.  */
9832 #include <uuid.h>
9833
9834 _ACEOF
9835 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9836   $EGREP "uuid_generate" >/dev/null 2>&1; then :
9837
9838 else
9839   as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
9840 fi
9841 rm -f conftest*
9842
9843 else
9844   as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
9845 fi
9846
9847 done
9848
9849 fi
9850
9851 done
9852
9853 elif test "$with_uuid" = ossp ; then
9854   for ac_header in ossp/uuid.h
9855 do :
9856   ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
9857 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
9858   cat >>confdefs.h <<_ACEOF
9859 #define HAVE_OSSP_UUID_H 1
9860 _ACEOF
9861  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9862 /* end confdefs.h.  */
9863 #include <ossp/uuid.h>
9864
9865 _ACEOF
9866 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9867   $EGREP "uuid_export" >/dev/null 2>&1; then :
9868
9869 else
9870   as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
9871 fi
9872 rm -f conftest*
9873
9874 else
9875   for ac_header in uuid.h
9876 do :
9877   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
9878 if test "x$ac_cv_header_uuid_h" = xyes; then :
9879   cat >>confdefs.h <<_ACEOF
9880 #define HAVE_UUID_H 1
9881 _ACEOF
9882  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9883 /* end confdefs.h.  */
9884 #include <uuid.h>
9885
9886 _ACEOF
9887 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9888   $EGREP "uuid_export" >/dev/null 2>&1; then :
9889
9890 else
9891   as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
9892 fi
9893 rm -f conftest*
9894
9895 else
9896   as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
9897 fi
9898
9899 done
9900
9901 fi
9902
9903 done
9904
9905 fi
9906
9907 if test "$PORTNAME" = "win32" ; then
9908    for ac_header in crtdefs.h
9909 do :
9910   ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
9911 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
9912   cat >>confdefs.h <<_ACEOF
9913 #define HAVE_CRTDEFS_H 1
9914 _ACEOF
9915
9916 fi
9917
9918 done
9919
9920 fi
9921
9922 ##
9923 ## Types, structures, compiler characteristics
9924 ##
9925
9926   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
9927 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
9928 if ${ac_cv_c_bigendian+:} false; then :
9929   $as_echo_n "(cached) " >&6
9930 else
9931   ac_cv_c_bigendian=unknown
9932     # See if we're dealing with a universal compiler.
9933     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9934 /* end confdefs.h.  */
9935 #ifndef __APPLE_CC__
9936                not a universal capable compiler
9937              #endif
9938              typedef int dummy;
9939
9940 _ACEOF
9941 if ac_fn_c_try_compile "$LINENO"; then :
9942
9943         # Check for potential -arch flags.  It is not universal unless
9944         # there are at least two -arch flags with different values.
9945         ac_arch=
9946         ac_prev=
9947         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
9948          if test -n "$ac_prev"; then
9949            case $ac_word in
9950              i?86 | x86_64 | ppc | ppc64)
9951                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
9952                  ac_arch=$ac_word
9953                else
9954                  ac_cv_c_bigendian=universal
9955                  break
9956                fi
9957                ;;
9958            esac
9959            ac_prev=
9960          elif test "x$ac_word" = "x-arch"; then
9961            ac_prev=arch
9962          fi
9963        done
9964 fi
9965 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9966     if test $ac_cv_c_bigendian = unknown; then
9967       # See if sys/param.h defines the BYTE_ORDER macro.
9968       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9969 /* end confdefs.h.  */
9970 #include <sys/types.h>
9971              #include <sys/param.h>
9972
9973 int
9974 main ()
9975 {
9976 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
9977                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
9978                      && LITTLE_ENDIAN)
9979               bogus endian macros
9980              #endif
9981
9982   ;
9983   return 0;
9984 }
9985 _ACEOF
9986 if ac_fn_c_try_compile "$LINENO"; then :
9987   # It does; now see whether it defined to BIG_ENDIAN or not.
9988          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9989 /* end confdefs.h.  */
9990 #include <sys/types.h>
9991                 #include <sys/param.h>
9992
9993 int
9994 main ()
9995 {
9996 #if BYTE_ORDER != BIG_ENDIAN
9997                  not big endian
9998                 #endif
9999
10000   ;
10001   return 0;
10002 }
10003 _ACEOF
10004 if ac_fn_c_try_compile "$LINENO"; then :
10005   ac_cv_c_bigendian=yes
10006 else
10007   ac_cv_c_bigendian=no
10008 fi
10009 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10010 fi
10011 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10012     fi
10013     if test $ac_cv_c_bigendian = unknown; then
10014       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
10015       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10016 /* end confdefs.h.  */
10017 #include <limits.h>
10018
10019 int
10020 main ()
10021 {
10022 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
10023               bogus endian macros
10024              #endif
10025
10026   ;
10027   return 0;
10028 }
10029 _ACEOF
10030 if ac_fn_c_try_compile "$LINENO"; then :
10031   # It does; now see whether it defined to _BIG_ENDIAN or not.
10032          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10033 /* end confdefs.h.  */
10034 #include <limits.h>
10035
10036 int
10037 main ()
10038 {
10039 #ifndef _BIG_ENDIAN
10040                  not big endian
10041                 #endif
10042
10043   ;
10044   return 0;
10045 }
10046 _ACEOF
10047 if ac_fn_c_try_compile "$LINENO"; then :
10048   ac_cv_c_bigendian=yes
10049 else
10050   ac_cv_c_bigendian=no
10051 fi
10052 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10053 fi
10054 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10055     fi
10056     if test $ac_cv_c_bigendian = unknown; then
10057       # Compile a test program.
10058       if test "$cross_compiling" = yes; then :
10059   # Try to guess by grepping values from an object file.
10060          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10061 /* end confdefs.h.  */
10062 short int ascii_mm[] =
10063                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
10064                 short int ascii_ii[] =
10065                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
10066                 int use_ascii (int i) {
10067                   return ascii_mm[i] + ascii_ii[i];
10068                 }
10069                 short int ebcdic_ii[] =
10070                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
10071                 short int ebcdic_mm[] =
10072                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
10073                 int use_ebcdic (int i) {
10074                   return ebcdic_mm[i] + ebcdic_ii[i];
10075                 }
10076                 extern int foo;
10077
10078 int
10079 main ()
10080 {
10081 return use_ascii (foo) == use_ebcdic (foo);
10082   ;
10083   return 0;
10084 }
10085 _ACEOF
10086 if ac_fn_c_try_compile "$LINENO"; then :
10087   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
10088               ac_cv_c_bigendian=yes
10089             fi
10090             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
10091               if test "$ac_cv_c_bigendian" = unknown; then
10092                 ac_cv_c_bigendian=no
10093               else
10094                 # finding both strings is unlikely to happen, but who knows?
10095                 ac_cv_c_bigendian=unknown
10096               fi
10097             fi
10098 fi
10099 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10100 else
10101   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10102 /* end confdefs.h.  */
10103 $ac_includes_default
10104 int
10105 main ()
10106 {
10107
10108              /* Are we little or big endian?  From Harbison&Steele.  */
10109              union
10110              {
10111                long int l;
10112                char c[sizeof (long int)];
10113              } u;
10114              u.l = 1;
10115              return u.c[sizeof (long int) - 1] == 1;
10116
10117   ;
10118   return 0;
10119 }
10120 _ACEOF
10121 if ac_fn_c_try_run "$LINENO"; then :
10122   ac_cv_c_bigendian=no
10123 else
10124   ac_cv_c_bigendian=yes
10125 fi
10126 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10127   conftest.$ac_objext conftest.beam conftest.$ac_ext
10128 fi
10129
10130     fi
10131 fi
10132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
10133 $as_echo "$ac_cv_c_bigendian" >&6; }
10134  case $ac_cv_c_bigendian in #(
10135    yes)
10136      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
10137 ;; #(
10138    no)
10139       ;; #(
10140    universal)
10141
10142 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
10143
10144      ;; #(
10145    *)
10146      as_fn_error $? "unknown endianness
10147  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
10148  esac
10149
10150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
10151 $as_echo_n "checking for inline... " >&6; }
10152 if ${ac_cv_c_inline+:} false; then :
10153   $as_echo_n "(cached) " >&6
10154 else
10155   ac_cv_c_inline=no
10156 for ac_kw in inline __inline__ __inline; do
10157   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10158 /* end confdefs.h.  */
10159 #ifndef __cplusplus
10160 typedef int foo_t;
10161 static $ac_kw foo_t static_foo () {return 0; }
10162 $ac_kw foo_t foo () {return 0; }
10163 #endif
10164
10165 _ACEOF
10166 if ac_fn_c_try_compile "$LINENO"; then :
10167   ac_cv_c_inline=$ac_kw
10168 fi
10169 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10170   test "$ac_cv_c_inline" != no && break
10171 done
10172
10173 fi
10174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
10175 $as_echo "$ac_cv_c_inline" >&6; }
10176
10177 case $ac_cv_c_inline in
10178   inline | yes) ;;
10179   *)
10180     case $ac_cv_c_inline in
10181       no) ac_val=;;
10182       *) ac_val=$ac_cv_c_inline;;
10183     esac
10184     cat >>confdefs.h <<_ACEOF
10185 #ifndef __cplusplus
10186 #define inline $ac_val
10187 #endif
10188 _ACEOF
10189     ;;
10190 esac
10191
10192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for quiet inline (no complaint if unreferenced)" >&5
10193 $as_echo_n "checking for quiet inline (no complaint if unreferenced)... " >&6; }
10194 if ${pgac_cv_c_inline_quietly+:} false; then :
10195   $as_echo_n "(cached) " >&6
10196 else
10197   pgac_cv_c_inline_quietly=no
10198   if test "$ac_cv_c_inline" != no; then
10199     pgac_c_inline_save_werror=$ac_c_werror_flag
10200     ac_c_werror_flag=yes
10201     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10202 /* end confdefs.h.  */
10203 #include "$srcdir/config/test_quiet_include.h"
10204 int
10205 main ()
10206 {
10207
10208   ;
10209   return 0;
10210 }
10211 _ACEOF
10212 if ac_fn_c_try_link "$LINENO"; then :
10213   pgac_cv_c_inline_quietly=yes
10214 fi
10215 rm -f core conftest.err conftest.$ac_objext \
10216     conftest$ac_exeext conftest.$ac_ext
10217     ac_c_werror_flag=$pgac_c_inline_save_werror
10218   fi
10219 fi
10220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_inline_quietly" >&5
10221 $as_echo "$pgac_cv_c_inline_quietly" >&6; }
10222 if test "$pgac_cv_c_inline_quietly" != no; then
10223
10224 cat >>confdefs.h <<_ACEOF
10225 #define PG_USE_INLINE 1
10226 _ACEOF
10227
10228 fi
10229
10230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
10231 $as_echo_n "checking for printf format archetype... " >&6; }
10232 if ${pgac_cv_printf_archetype+:} false; then :
10233   $as_echo_n "(cached) " >&6
10234 else
10235   ac_save_c_werror_flag=$ac_c_werror_flag
10236 ac_c_werror_flag=yes
10237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10238 /* end confdefs.h.  */
10239 extern int
10240 pgac_write(int ignore, const char *fmt,...)
10241 __attribute__((format(gnu_printf, 2, 3)));
10242 int
10243 main ()
10244 {
10245
10246   ;
10247   return 0;
10248 }
10249 _ACEOF
10250 if ac_fn_c_try_compile "$LINENO"; then :
10251   pgac_cv_printf_archetype=gnu_printf
10252 else
10253   pgac_cv_printf_archetype=printf
10254 fi
10255 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10256 ac_c_werror_flag=$ac_save_c_werror_flag
10257 fi
10258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
10259 $as_echo "$pgac_cv_printf_archetype" >&6; }
10260
10261 cat >>confdefs.h <<_ACEOF
10262 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
10263 _ACEOF
10264
10265
10266
10267   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array members" >&5
10268 $as_echo_n "checking for flexible array members... " >&6; }
10269 if ${ac_cv_c_flexmember+:} false; then :
10270   $as_echo_n "(cached) " >&6
10271 else
10272   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10273 /* end confdefs.h.  */
10274 #include <stdlib.h>
10275             #include <stdio.h>
10276             #include <stddef.h>
10277             struct s { int n; double d[]; };
10278 int
10279 main ()
10280 {
10281 int m = getchar ();
10282             struct s *p = malloc (offsetof (struct s, d)
10283                                   + m * sizeof (double));
10284             p->d[0] = 0.0;
10285             return p->d != (double *) NULL;
10286   ;
10287   return 0;
10288 }
10289 _ACEOF
10290 if ac_fn_c_try_compile "$LINENO"; then :
10291   ac_cv_c_flexmember=yes
10292 else
10293   ac_cv_c_flexmember=no
10294 fi
10295 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10296 fi
10297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
10298 $as_echo "$ac_cv_c_flexmember" >&6; }
10299   if test $ac_cv_c_flexmember = yes; then
10300
10301 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
10302
10303   else
10304     $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
10305
10306   fi
10307
10308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed types" >&5
10309 $as_echo_n "checking for signed types... " >&6; }
10310 if ${pgac_cv_c_signed+:} false; then :
10311   $as_echo_n "(cached) " >&6
10312 else
10313   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10314 /* end confdefs.h.  */
10315
10316 int
10317 main ()
10318 {
10319 signed char c; signed short s; signed int i;
10320   ;
10321   return 0;
10322 }
10323 _ACEOF
10324 if ac_fn_c_try_compile "$LINENO"; then :
10325   pgac_cv_c_signed=yes
10326 else
10327   pgac_cv_c_signed=no
10328 fi
10329 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10330 fi
10331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_signed" >&5
10332 $as_echo "$pgac_cv_c_signed" >&6; }
10333 if test x"$pgac_cv_c_signed" = xno ; then
10334
10335 $as_echo "#define signed /**/" >>confdefs.h
10336
10337 fi
10338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5
10339 $as_echo_n "checking for __func__... " >&6; }
10340 if ${pgac_cv_funcname_func_support+:} false; then :
10341   $as_echo_n "(cached) " >&6
10342 else
10343   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10344 /* end confdefs.h.  */
10345 #include <stdio.h>
10346 int
10347 main ()
10348 {
10349 printf("%s\n", __func__);
10350   ;
10351   return 0;
10352 }
10353 _ACEOF
10354 if ac_fn_c_try_compile "$LINENO"; then :
10355   pgac_cv_funcname_func_support=yes
10356 else
10357   pgac_cv_funcname_func_support=no
10358 fi
10359 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10360 fi
10361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_func_support" >&5
10362 $as_echo "$pgac_cv_funcname_func_support" >&6; }
10363 if test x"$pgac_cv_funcname_func_support" = xyes ; then
10364
10365 $as_echo "#define HAVE_FUNCNAME__FUNC 1" >>confdefs.h
10366
10367 else
10368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__" >&5
10369 $as_echo_n "checking for __FUNCTION__... " >&6; }
10370 if ${pgac_cv_funcname_function_support+:} false; then :
10371   $as_echo_n "(cached) " >&6
10372 else
10373   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10374 /* end confdefs.h.  */
10375 #include <stdio.h>
10376 int
10377 main ()
10378 {
10379 printf("%s\n", __FUNCTION__);
10380   ;
10381   return 0;
10382 }
10383 _ACEOF
10384 if ac_fn_c_try_compile "$LINENO"; then :
10385   pgac_cv_funcname_function_support=yes
10386 else
10387   pgac_cv_funcname_function_support=no
10388 fi
10389 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10390 fi
10391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_function_support" >&5
10392 $as_echo "$pgac_cv_funcname_function_support" >&6; }
10393 if test x"$pgac_cv_funcname_function_support" = xyes ; then
10394
10395 $as_echo "#define HAVE_FUNCNAME__FUNCTION 1" >>confdefs.h
10396
10397 fi
10398 fi
10399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
10400 $as_echo_n "checking for _Static_assert... " >&6; }
10401 if ${pgac_cv__static_assert+:} false; then :
10402   $as_echo_n "(cached) " >&6
10403 else
10404   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10405 /* end confdefs.h.  */
10406
10407 int
10408 main ()
10409 {
10410 ({ _Static_assert(1, "foo"); })
10411   ;
10412   return 0;
10413 }
10414 _ACEOF
10415 if ac_fn_c_try_link "$LINENO"; then :
10416   pgac_cv__static_assert=yes
10417 else
10418   pgac_cv__static_assert=no
10419 fi
10420 rm -f core conftest.err conftest.$ac_objext \
10421     conftest$ac_exeext conftest.$ac_ext
10422 fi
10423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
10424 $as_echo "$pgac_cv__static_assert" >&6; }
10425 if test x"$pgac_cv__static_assert" = xyes ; then
10426
10427 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
10428
10429 fi
10430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
10431 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
10432 if ${pgac_cv__types_compatible+:} false; then :
10433   $as_echo_n "(cached) " >&6
10434 else
10435   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10436 /* end confdefs.h.  */
10437
10438 int
10439 main ()
10440 {
10441  int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
10442   ;
10443   return 0;
10444 }
10445 _ACEOF
10446 if ac_fn_c_try_compile "$LINENO"; then :
10447   pgac_cv__types_compatible=yes
10448 else
10449   pgac_cv__types_compatible=no
10450 fi
10451 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10452 fi
10453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
10454 $as_echo "$pgac_cv__types_compatible" >&6; }
10455 if test x"$pgac_cv__types_compatible" = xyes ; then
10456
10457 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
10458
10459 fi
10460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
10461 $as_echo_n "checking for __builtin_bswap32... " >&6; }
10462 if ${pgac_cv__builtin_bswap32+:} false; then :
10463   $as_echo_n "(cached) " >&6
10464 else
10465   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10466 /* end confdefs.h.  */
10467 static unsigned long int x = __builtin_bswap32(0xaabbccdd);
10468 int
10469 main ()
10470 {
10471
10472   ;
10473   return 0;
10474 }
10475 _ACEOF
10476 if ac_fn_c_try_compile "$LINENO"; then :
10477   pgac_cv__builtin_bswap32=yes
10478 else
10479   pgac_cv__builtin_bswap32=no
10480 fi
10481 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10482 fi
10483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
10484 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
10485 if test x"$pgac_cv__builtin_bswap32" = xyes ; then
10486
10487 $as_echo "#define HAVE__BUILTIN_BSWAP32 1" >>confdefs.h
10488
10489 fi
10490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
10491 $as_echo_n "checking for __builtin_constant_p... " >&6; }
10492 if ${pgac_cv__builtin_constant_p+:} false; then :
10493   $as_echo_n "(cached) " >&6
10494 else
10495   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10496 /* end confdefs.h.  */
10497 static int x; static int y[__builtin_constant_p(x) ? x : 1];
10498 int
10499 main ()
10500 {
10501
10502   ;
10503   return 0;
10504 }
10505 _ACEOF
10506 if ac_fn_c_try_compile "$LINENO"; then :
10507   pgac_cv__builtin_constant_p=yes
10508 else
10509   pgac_cv__builtin_constant_p=no
10510 fi
10511 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10512 fi
10513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
10514 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
10515 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
10516
10517 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
10518
10519 fi
10520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
10521 $as_echo_n "checking for __builtin_unreachable... " >&6; }
10522 if ${pgac_cv__builtin_unreachable+:} false; then :
10523   $as_echo_n "(cached) " >&6
10524 else
10525   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10526 /* end confdefs.h.  */
10527
10528 int
10529 main ()
10530 {
10531 __builtin_unreachable();
10532   ;
10533   return 0;
10534 }
10535 _ACEOF
10536 if ac_fn_c_try_link "$LINENO"; then :
10537   pgac_cv__builtin_unreachable=yes
10538 else
10539   pgac_cv__builtin_unreachable=no
10540 fi
10541 rm -f core conftest.err conftest.$ac_objext \
10542     conftest$ac_exeext conftest.$ac_ext
10543 fi
10544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
10545 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
10546 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
10547
10548 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
10549
10550 fi
10551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __VA_ARGS__" >&5
10552 $as_echo_n "checking for __VA_ARGS__... " >&6; }
10553 if ${pgac_cv__va_args+:} false; then :
10554   $as_echo_n "(cached) " >&6
10555 else
10556   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10557 /* end confdefs.h.  */
10558 #include <stdio.h>
10559 int
10560 main ()
10561 {
10562 #define debug(...) fprintf(stderr, __VA_ARGS__)
10563 debug("%s", "blarg");
10564
10565   ;
10566   return 0;
10567 }
10568 _ACEOF
10569 if ac_fn_c_try_compile "$LINENO"; then :
10570   pgac_cv__va_args=yes
10571 else
10572   pgac_cv__va_args=no
10573 fi
10574 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10575 fi
10576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__va_args" >&5
10577 $as_echo "$pgac_cv__va_args" >&6; }
10578 if test x"$pgac_cv__va_args" = xyes ; then
10579
10580 $as_echo "#define HAVE__VA_ARGS 1" >>confdefs.h
10581
10582 fi
10583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10584 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
10585 if ${ac_cv_struct_tm+:} false; then :
10586   $as_echo_n "(cached) " >&6
10587 else
10588   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10589 /* end confdefs.h.  */
10590 #include <sys/types.h>
10591 #include <time.h>
10592
10593 int
10594 main ()
10595 {
10596 struct tm tm;
10597                                      int *p = &tm.tm_sec;
10598                                      return !p;
10599   ;
10600   return 0;
10601 }
10602 _ACEOF
10603 if ac_fn_c_try_compile "$LINENO"; then :
10604   ac_cv_struct_tm=time.h
10605 else
10606   ac_cv_struct_tm=sys/time.h
10607 fi
10608 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10609 fi
10610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10611 $as_echo "$ac_cv_struct_tm" >&6; }
10612 if test $ac_cv_struct_tm = sys/time.h; then
10613
10614 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
10615
10616 fi
10617
10618 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
10619 #include <$ac_cv_struct_tm>
10620
10621 "
10622 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
10623
10624 cat >>confdefs.h <<_ACEOF
10625 #define HAVE_STRUCT_TM_TM_ZONE 1
10626 _ACEOF
10627
10628
10629 fi
10630
10631 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10632
10633 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
10634
10635 fi
10636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10637 $as_echo_n "checking for tzname... " >&6; }
10638 if ${ac_cv_var_tzname+:} false; then :
10639   $as_echo_n "(cached) " >&6
10640 else
10641   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10642 /* end confdefs.h.  */
10643 #include <time.h>
10644 #ifndef tzname /* For SGI.  */
10645 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
10646 #endif
10647
10648 int
10649 main ()
10650 {
10651 atoi(*tzname);
10652   ;
10653   return 0;
10654 }
10655 _ACEOF
10656 if ac_fn_c_try_link "$LINENO"; then :
10657   ac_cv_var_tzname=yes
10658 else
10659   ac_cv_var_tzname=no
10660 fi
10661 rm -f core conftest.err conftest.$ac_objext \
10662     conftest$ac_exeext conftest.$ac_ext
10663 fi
10664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10665 $as_echo "$ac_cv_var_tzname" >&6; }
10666 if test $ac_cv_var_tzname = yes; then
10667
10668 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
10669
10670 fi
10671
10672 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
10673 #include <sys/ipc.h>
10674 #include <sys/sem.h>
10675 "
10676 if test "x$ac_cv_type_union_semun" = xyes; then :
10677
10678 cat >>confdefs.h <<_ACEOF
10679 #define HAVE_UNION_SEMUN 1
10680 _ACEOF
10681
10682
10683 fi
10684
10685 ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
10686 #ifdef HAVE_SYS_UN_H
10687 #include <sys/un.h>
10688 #endif
10689
10690 "
10691 if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
10692
10693 $as_echo "#define HAVE_UNIX_SOCKETS 1" >>confdefs.h
10694
10695 fi
10696
10697 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
10698 #ifdef HAVE_SYS_SOCKET_H
10699 #include <sys/socket.h>
10700 #endif
10701
10702 "
10703 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
10704
10705 cat >>confdefs.h <<_ACEOF
10706 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
10707 _ACEOF
10708
10709
10710 fi
10711
10712 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
10713 #ifdef HAVE_SYS_SOCKET_H
10714 #include <sys/socket.h>
10715 #endif
10716
10717 "
10718 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
10719
10720 cat >>confdefs.h <<_ACEOF
10721 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
10722 _ACEOF
10723
10724
10725 fi
10726 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
10727 #ifdef HAVE_SYS_SOCKET_H
10728 #include <sys/socket.h>
10729 #endif
10730
10731 "
10732 if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
10733
10734 cat >>confdefs.h <<_ACEOF
10735 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
10736 _ACEOF
10737
10738
10739 fi
10740 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
10741 #ifdef HAVE_SYS_SOCKET_H
10742 #include <sys/socket.h>
10743 #endif
10744
10745 "
10746 if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
10747
10748 cat >>confdefs.h <<_ACEOF
10749 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
10750 _ACEOF
10751
10752
10753 fi
10754 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
10755 #ifdef HAVE_SYS_SOCKET_H
10756 #include <sys/socket.h>
10757 #endif
10758
10759 "
10760 if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
10761
10762 cat >>confdefs.h <<_ACEOF
10763 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
10764 _ACEOF
10765
10766
10767 fi
10768 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
10769 #ifdef HAVE_SYS_SOCKET_H
10770 #include <sys/socket.h>
10771 #endif
10772
10773 "
10774 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
10775
10776 cat >>confdefs.h <<_ACEOF
10777 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
10778 _ACEOF
10779
10780
10781 fi
10782
10783 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include <sys/types.h>
10784 #include <sys/socket.h>
10785 #include <netdb.h>
10786
10787 "
10788 if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
10789
10790 cat >>confdefs.h <<_ACEOF
10791 #define HAVE_STRUCT_ADDRINFO 1
10792 _ACEOF
10793
10794
10795 fi
10796
10797
10798   ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
10799 if test "x$ac_cv_type_intptr_t" = xyes; then :
10800
10801 $as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
10802
10803 else
10804   for ac_type in 'int' 'long int' 'long long int'; do
10805        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10806 /* end confdefs.h.  */
10807 $ac_includes_default
10808 int
10809 main ()
10810 {
10811 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
10812 test_array [0] = 0;
10813 return test_array [0];
10814
10815   ;
10816   return 0;
10817 }
10818 _ACEOF
10819 if ac_fn_c_try_compile "$LINENO"; then :
10820
10821 cat >>confdefs.h <<_ACEOF
10822 #define intptr_t $ac_type
10823 _ACEOF
10824
10825           ac_type=
10826 fi
10827 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10828        test -z "$ac_type" && break
10829      done
10830 fi
10831
10832
10833
10834   ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
10835 if test "x$ac_cv_type_uintptr_t" = xyes; then :
10836
10837 $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
10838
10839 else
10840   for ac_type in 'unsigned int' 'unsigned long int' \
10841         'unsigned long long int'; do
10842        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10843 /* end confdefs.h.  */
10844 $ac_includes_default
10845 int
10846 main ()
10847 {
10848 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
10849 test_array [0] = 0;
10850 return test_array [0];
10851
10852   ;
10853   return 0;
10854 }
10855 _ACEOF
10856 if ac_fn_c_try_compile "$LINENO"; then :
10857
10858 cat >>confdefs.h <<_ACEOF
10859 #define uintptr_t $ac_type
10860 _ACEOF
10861
10862           ac_type=
10863 fi
10864 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10865        test -z "$ac_type" && break
10866      done
10867 fi
10868
10869
10870
10871   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
10872 $as_echo_n "checking for unsigned long long int... " >&6; }
10873 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
10874   $as_echo_n "(cached) " >&6
10875 else
10876   ac_cv_type_unsigned_long_long_int=yes
10877      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
10878        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10879 /* end confdefs.h.  */
10880
10881   /* For now, do not test the preprocessor; as of 2007 there are too many
10882          implementations with broken preprocessors.  Perhaps this can
10883          be revisited in 2012.  In the meantime, code should not expect
10884          #if to work with literals wider than 32 bits.  */
10885       /* Test literals.  */
10886       long long int ll = 9223372036854775807ll;
10887       long long int nll = -9223372036854775807LL;
10888       unsigned long long int ull = 18446744073709551615ULL;
10889       /* Test constant expressions.   */
10890       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
10891                      ? 1 : -1)];
10892       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
10893                      ? 1 : -1)];
10894       int i = 63;
10895 int
10896 main ()
10897 {
10898 /* Test availability of runtime routines for shift and division.  */
10899       long long int llmax = 9223372036854775807ll;
10900       unsigned long long int ullmax = 18446744073709551615ull;
10901       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
10902               | (llmax / ll) | (llmax % ll)
10903               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
10904               | (ullmax / ull) | (ullmax % ull));
10905   ;
10906   return 0;
10907 }
10908
10909 _ACEOF
10910 if ac_fn_c_try_link "$LINENO"; then :
10911
10912 else
10913   ac_cv_type_unsigned_long_long_int=no
10914 fi
10915 rm -f core conftest.err conftest.$ac_objext \
10916     conftest$ac_exeext conftest.$ac_ext
10917      fi
10918 fi
10919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
10920 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
10921   if test $ac_cv_type_unsigned_long_long_int = yes; then
10922
10923 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
10924
10925   fi
10926
10927
10928
10929   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
10930 $as_echo_n "checking for long long int... " >&6; }
10931 if ${ac_cv_type_long_long_int+:} false; then :
10932   $as_echo_n "(cached) " >&6
10933 else
10934   ac_cv_type_long_long_int=yes
10935       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
10936         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
10937         if test $ac_cv_type_long_long_int = yes; then
10938                                   if test "$cross_compiling" = yes; then :
10939   :
10940 else
10941   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10942 /* end confdefs.h.  */
10943 #include <limits.h>
10944                  #ifndef LLONG_MAX
10945                  # define HALF \
10946                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
10947                  # define LLONG_MAX (HALF - 1 + HALF)
10948                  #endif
10949 int
10950 main ()
10951 {
10952 long long int n = 1;
10953                  int i;
10954                  for (i = 0; ; i++)
10955                    {
10956                      long long int m = n << i;
10957                      if (m >> i != n)
10958                        return 1;
10959                      if (LLONG_MAX / 2 < m)
10960                        break;
10961                    }
10962                  return 0;
10963   ;
10964   return 0;
10965 }
10966 _ACEOF
10967 if ac_fn_c_try_run "$LINENO"; then :
10968
10969 else
10970   ac_cv_type_long_long_int=no
10971 fi
10972 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10973   conftest.$ac_objext conftest.beam conftest.$ac_ext
10974 fi
10975
10976         fi
10977       fi
10978 fi
10979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
10980 $as_echo "$ac_cv_type_long_long_int" >&6; }
10981   if test $ac_cv_type_long_long_int = yes; then
10982
10983 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
10984
10985   fi
10986
10987
10988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
10989 $as_echo_n "checking for locale_t... " >&6; }
10990 if ${pgac_cv_type_locale_t+:} false; then :
10991   $as_echo_n "(cached) " >&6
10992 else
10993   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10994 /* end confdefs.h.  */
10995 #include <locale.h>
10996 locale_t x;
10997 int
10998 main ()
10999 {
11000
11001   ;
11002   return 0;
11003 }
11004 _ACEOF
11005 if ac_fn_c_try_compile "$LINENO"; then :
11006   pgac_cv_type_locale_t=yes
11007 else
11008   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11009 /* end confdefs.h.  */
11010 #include <xlocale.h>
11011 locale_t x;
11012 int
11013 main ()
11014 {
11015
11016   ;
11017   return 0;
11018 }
11019 _ACEOF
11020 if ac_fn_c_try_compile "$LINENO"; then :
11021   pgac_cv_type_locale_t='yes (in xlocale.h)'
11022 else
11023   pgac_cv_type_locale_t=no
11024 fi
11025 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11026 fi
11027 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11028 fi
11029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
11030 $as_echo "$pgac_cv_type_locale_t" >&6; }
11031 if test "$pgac_cv_type_locale_t" != no; then
11032
11033 $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
11034
11035 fi
11036 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
11037
11038 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
11039
11040 fi
11041
11042 ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
11043 #include <sys/param.h>
11044 #ifdef HAVE_SYS_UCRED_H
11045 #include <sys/ucred.h>
11046 #endif
11047 "
11048 if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
11049
11050 cat >>confdefs.h <<_ACEOF
11051 #define HAVE_STRUCT_CMSGCRED 1
11052 _ACEOF
11053
11054
11055 fi
11056
11057
11058 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
11059 #include <getopt.h>
11060 #endif
11061 "
11062 if test "x$ac_cv_type_struct_option" = xyes; then :
11063
11064 cat >>confdefs.h <<_ACEOF
11065 #define HAVE_STRUCT_OPTION 1
11066 _ACEOF
11067
11068
11069 fi
11070
11071
11072 if test "$with_zlib" = yes; then
11073   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
11074   # did not).  While we could work around the lack of z_streamp, it
11075   # seems unwise to encourage people to use such old zlib versions...
11076   ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
11077 "
11078 if test "x$ac_cv_type_z_streamp" = xyes; then :
11079
11080 else
11081   as_fn_error $? "zlib version is too old
11082 Use --without-zlib to disable zlib support." "$LINENO" 5
11083 fi
11084
11085 fi
11086
11087 # On PPC, check if assembler supports LWARX instruction's mutex hint bit
11088 case $host_cpu in
11089   ppc*|powerpc*)
11090     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports lwarx hint bit" >&5
11091 $as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
11092     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11093 /* end confdefs.h.  */
11094
11095 int
11096 main ()
11097 {
11098 int a = 0; int *p = &a; int r;
11099          __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
11100   ;
11101   return 0;
11102 }
11103 _ACEOF
11104 if ac_fn_c_try_compile "$LINENO"; then :
11105   pgac_cv_have_ppc_mutex_hint=yes
11106 else
11107   pgac_cv_have_ppc_mutex_hint=no
11108 fi
11109 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11110     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_ppc_mutex_hint" >&5
11111 $as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
11112     if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
11113
11114 $as_echo "#define HAVE_PPC_LWARX_MUTEX_HINT 1" >>confdefs.h
11115
11116     fi
11117   ;;
11118 esac
11119
11120 # Check largefile support.  You might think this is a system service not a
11121 # compiler characteristic, but you'd be wrong.  We must check this before
11122 # probing existence of related functions such as fseeko, since the largefile
11123 # defines can affect what is generated for that.
11124 if test "$PORTNAME" != "win32"; then
11125    # Check whether --enable-largefile was given.
11126 if test "${enable_largefile+set}" = set; then :
11127   enableval=$enable_largefile;
11128 fi
11129
11130 if test "$enable_largefile" != no; then
11131
11132   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
11133 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
11134 if ${ac_cv_sys_largefile_CC+:} false; then :
11135   $as_echo_n "(cached) " >&6
11136 else
11137   ac_cv_sys_largefile_CC=no
11138      if test "$GCC" != yes; then
11139        ac_save_CC=$CC
11140        while :; do
11141          # IRIX 6.2 and later do not support large files by default,
11142          # so use the C compiler's -n32 option if that helps.
11143          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11144 /* end confdefs.h.  */
11145 #include <sys/types.h>
11146  /* Check that off_t can represent 2**63 - 1 correctly.
11147     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11148     since some C++ compilers masquerading as C compilers
11149     incorrectly reject 9223372036854775807.  */
11150 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11151   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11152                        && LARGE_OFF_T % 2147483647 == 1)
11153                       ? 1 : -1];
11154 int
11155 main ()
11156 {
11157
11158   ;
11159   return 0;
11160 }
11161 _ACEOF
11162          if ac_fn_c_try_compile "$LINENO"; then :
11163   break
11164 fi
11165 rm -f core conftest.err conftest.$ac_objext
11166          CC="$CC -n32"
11167          if ac_fn_c_try_compile "$LINENO"; then :
11168   ac_cv_sys_largefile_CC=' -n32'; break
11169 fi
11170 rm -f core conftest.err conftest.$ac_objext
11171          break
11172        done
11173        CC=$ac_save_CC
11174        rm -f conftest.$ac_ext
11175     fi
11176 fi
11177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
11178 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
11179   if test "$ac_cv_sys_largefile_CC" != no; then
11180     CC=$CC$ac_cv_sys_largefile_CC
11181   fi
11182
11183   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
11184 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
11185 if ${ac_cv_sys_file_offset_bits+:} false; then :
11186   $as_echo_n "(cached) " >&6
11187 else
11188   while :; do
11189   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11190 /* end confdefs.h.  */
11191 #include <sys/types.h>
11192  /* Check that off_t can represent 2**63 - 1 correctly.
11193     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11194     since some C++ compilers masquerading as C compilers
11195     incorrectly reject 9223372036854775807.  */
11196 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11197   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11198                        && LARGE_OFF_T % 2147483647 == 1)
11199                       ? 1 : -1];
11200 int
11201 main ()
11202 {
11203
11204   ;
11205   return 0;
11206 }
11207 _ACEOF
11208 if ac_fn_c_try_compile "$LINENO"; then :
11209   ac_cv_sys_file_offset_bits=no; break
11210 fi
11211 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11212   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11213 /* end confdefs.h.  */
11214 #define _FILE_OFFSET_BITS 64
11215 #include <sys/types.h>
11216  /* Check that off_t can represent 2**63 - 1 correctly.
11217     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11218     since some C++ compilers masquerading as C compilers
11219     incorrectly reject 9223372036854775807.  */
11220 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11221   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11222                        && LARGE_OFF_T % 2147483647 == 1)
11223                       ? 1 : -1];
11224 int
11225 main ()
11226 {
11227
11228   ;
11229   return 0;
11230 }
11231 _ACEOF
11232 if ac_fn_c_try_compile "$LINENO"; then :
11233   ac_cv_sys_file_offset_bits=64; break
11234 fi
11235 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11236   ac_cv_sys_file_offset_bits=unknown
11237   break
11238 done
11239 fi
11240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
11241 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
11242 case $ac_cv_sys_file_offset_bits in #(
11243   no | unknown) ;;
11244   *)
11245 cat >>confdefs.h <<_ACEOF
11246 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
11247 _ACEOF
11248 ;;
11249 esac
11250 rm -rf conftest*
11251   if test $ac_cv_sys_file_offset_bits = unknown; then
11252     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
11253 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
11254 if ${ac_cv_sys_large_files+:} false; then :
11255   $as_echo_n "(cached) " >&6
11256 else
11257   while :; do
11258   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11259 /* end confdefs.h.  */
11260 #include <sys/types.h>
11261  /* Check that off_t can represent 2**63 - 1 correctly.
11262     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11263     since some C++ compilers masquerading as C compilers
11264     incorrectly reject 9223372036854775807.  */
11265 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11266   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11267                        && LARGE_OFF_T % 2147483647 == 1)
11268                       ? 1 : -1];
11269 int
11270 main ()
11271 {
11272
11273   ;
11274   return 0;
11275 }
11276 _ACEOF
11277 if ac_fn_c_try_compile "$LINENO"; then :
11278   ac_cv_sys_large_files=no; break
11279 fi
11280 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11281   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11282 /* end confdefs.h.  */
11283 #define _LARGE_FILES 1
11284 #include <sys/types.h>
11285  /* Check that off_t can represent 2**63 - 1 correctly.
11286     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11287     since some C++ compilers masquerading as C compilers
11288     incorrectly reject 9223372036854775807.  */
11289 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11290   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11291                        && LARGE_OFF_T % 2147483647 == 1)
11292                       ? 1 : -1];
11293 int
11294 main ()
11295 {
11296
11297   ;
11298   return 0;
11299 }
11300 _ACEOF
11301 if ac_fn_c_try_compile "$LINENO"; then :
11302   ac_cv_sys_large_files=1; break
11303 fi
11304 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11305   ac_cv_sys_large_files=unknown
11306   break
11307 done
11308 fi
11309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
11310 $as_echo "$ac_cv_sys_large_files" >&6; }
11311 case $ac_cv_sys_large_files in #(
11312   no | unknown) ;;
11313   *)
11314 cat >>confdefs.h <<_ACEOF
11315 #define _LARGE_FILES $ac_cv_sys_large_files
11316 _ACEOF
11317 ;;
11318 esac
11319 rm -rf conftest*
11320   fi
11321
11322
11323 fi
11324
11325
11326 fi
11327
11328 # Check for largefile support (must be after AC_SYS_LARGEFILE)
11329 # The cast to long int works around a bug in the HP C Compiler
11330 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11331 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11332 # This bug is HP SR number 8606223364.
11333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
11334 $as_echo_n "checking size of off_t... " >&6; }
11335 if ${ac_cv_sizeof_off_t+:} false; then :
11336   $as_echo_n "(cached) " >&6
11337 else
11338   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :
11339
11340 else
11341   if test "$ac_cv_type_off_t" = yes; then
11342      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11343 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11344 as_fn_error 77 "cannot compute sizeof (off_t)
11345 See \`config.log' for more details" "$LINENO" 5; }
11346    else
11347      ac_cv_sizeof_off_t=0
11348    fi
11349 fi
11350
11351 fi
11352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
11353 $as_echo "$ac_cv_sizeof_off_t" >&6; }
11354
11355
11356
11357 cat >>confdefs.h <<_ACEOF
11358 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
11359 _ACEOF
11360
11361
11362
11363 # If we don't have largefile support, can't handle segsize >= 2GB.
11364 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
11365    as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
11366 fi
11367
11368
11369 ##
11370 ## Functions, global variables
11371 ##
11372
11373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
11374 $as_echo_n "checking for int timezone... " >&6; }
11375 if ${pgac_cv_var_int_timezone+:} false; then :
11376   $as_echo_n "(cached) " >&6
11377 else
11378   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11379 /* end confdefs.h.  */
11380 #include <time.h>
11381 int res;
11382 int
11383 main ()
11384 {
11385 #ifndef __CYGWIN__
11386 res = timezone / 60;
11387 #else
11388 res = _timezone / 60;
11389 #endif
11390   ;
11391   return 0;
11392 }
11393 _ACEOF
11394 if ac_fn_c_try_link "$LINENO"; then :
11395   pgac_cv_var_int_timezone=yes
11396 else
11397   pgac_cv_var_int_timezone=no
11398 fi
11399 rm -f core conftest.err conftest.$ac_objext \
11400     conftest$ac_exeext conftest.$ac_ext
11401 fi
11402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
11403 $as_echo "$pgac_cv_var_int_timezone" >&6; }
11404 if test x"$pgac_cv_var_int_timezone" = xyes ; then
11405
11406 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
11407
11408 fi
11409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for accept()" >&5
11410 $as_echo_n "checking types of arguments for accept()... " >&6; }
11411  if ${ac_cv_func_accept_return+:} false; then :
11412   $as_echo_n "(cached) " >&6
11413 else
11414    if ${ac_cv_func_accept_arg1+:} false; then :
11415   $as_echo_n "(cached) " >&6
11416 else
11417     if ${ac_cv_func_accept_arg2+:} false; then :
11418   $as_echo_n "(cached) " >&6
11419 else
11420      if ${ac_cv_func_accept_arg3+:} false; then :
11421   $as_echo_n "(cached) " >&6
11422 else
11423       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL' 'SOCKET WSAAPI'; do
11424       for ac_cv_func_accept_arg1 in 'int' 'unsigned int' 'SOCKET'; do
11425        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
11426         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
11427          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11428 /* end confdefs.h.  */
11429 #ifdef HAVE_SYS_TYPES_H
11430 #include <sys/types.h>
11431 #endif
11432 #ifdef HAVE_SYS_SOCKET_H
11433 #include <sys/socket.h>
11434 #endif
11435 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
11436 int
11437 main ()
11438 {
11439
11440   ;
11441   return 0;
11442 }
11443 _ACEOF
11444 if ac_fn_c_try_compile "$LINENO"; then :
11445   ac_not_found=no; break 4
11446 else
11447   ac_not_found=yes
11448 fi
11449 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11450        done
11451       done
11452      done
11453     done
11454     if test "$ac_not_found" = yes; then
11455       as_fn_error $? "could not determine argument types" "$LINENO" 5
11456     fi
11457     if test "$ac_cv_func_accept_arg3" = "void"; then
11458       ac_cv_func_accept_arg3=int
11459     fi
11460
11461 fi
11462
11463 fi
11464
11465 fi
11466
11467 fi
11468  { $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
11469 $as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
11470
11471 cat >>confdefs.h <<_ACEOF
11472 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
11473 _ACEOF
11474
11475
11476 cat >>confdefs.h <<_ACEOF
11477 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
11478 _ACEOF
11479
11480
11481 cat >>confdefs.h <<_ACEOF
11482 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
11483 _ACEOF
11484
11485
11486 cat >>confdefs.h <<_ACEOF
11487 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
11488 _ACEOF
11489
11490
11491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
11492 $as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
11493 if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
11494   $as_echo_n "(cached) " >&6
11495 else
11496   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11497 /* end confdefs.h.  */
11498 #include <sys/time.h>
11499 int
11500 main ()
11501 {
11502 struct timeval *tp;
11503 struct timezone *tzp;
11504 gettimeofday(tp,tzp);
11505   ;
11506   return 0;
11507 }
11508 _ACEOF
11509 if ac_fn_c_try_compile "$LINENO"; then :
11510   pgac_cv_func_gettimeofday_1arg=no
11511 else
11512   pgac_cv_func_gettimeofday_1arg=yes
11513 fi
11514 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11515 fi
11516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5
11517 $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
11518 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
11519
11520 $as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
11521
11522 fi
11523
11524
11525 # Some versions of libedit contain strlcpy(), setproctitle(), and other
11526 # symbols that that library has no business exposing to the world.  Pending
11527 # acquisition of a clue by those developers, ignore libedit (including its
11528 # possible alias of libreadline) while checking for everything else.
11529 LIBS_including_readline="$LIBS"
11530 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
11531
11532 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
11533 do :
11534   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11535 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11536 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11537   cat >>confdefs.h <<_ACEOF
11538 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11539 _ACEOF
11540
11541 fi
11542 done
11543
11544
11545 ac_fn_c_check_func "$LINENO" "fseeko" "ac_cv_func_fseeko"
11546 if test "x$ac_cv_func_fseeko" = xyes; then :
11547   $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
11548
11549 else
11550   case " $LIBOBJS " in
11551   *" fseeko.$ac_objext "* ) ;;
11552   *) LIBOBJS="$LIBOBJS fseeko.$ac_objext"
11553  ;;
11554 esac
11555
11556 fi
11557
11558
11559 case $host_os in
11560         # NetBSD uses a custom fseeko/ftello built on fsetpos/fgetpos
11561         # Mingw uses macros to access Win32 API calls
11562         netbsd*|mingw*)
11563
11564 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
11565
11566                 ac_cv_func_fseeko=yes;;
11567         *)
11568                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
11569 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
11570 if ${ac_cv_sys_largefile_source+:} false; then :
11571   $as_echo_n "(cached) " >&6
11572 else
11573   while :; do
11574   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11575 /* end confdefs.h.  */
11576 #include <sys/types.h> /* for off_t */
11577      #include <stdio.h>
11578 int
11579 main ()
11580 {
11581 int (*fp) (FILE *, off_t, int) = fseeko;
11582      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
11583   ;
11584   return 0;
11585 }
11586 _ACEOF
11587 if ac_fn_c_try_link "$LINENO"; then :
11588   ac_cv_sys_largefile_source=no; break
11589 fi
11590 rm -f core conftest.err conftest.$ac_objext \
11591     conftest$ac_exeext conftest.$ac_ext
11592   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11593 /* end confdefs.h.  */
11594 #define _LARGEFILE_SOURCE 1
11595 #include <sys/types.h> /* for off_t */
11596      #include <stdio.h>
11597 int
11598 main ()
11599 {
11600 int (*fp) (FILE *, off_t, int) = fseeko;
11601      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
11602   ;
11603   return 0;
11604 }
11605 _ACEOF
11606 if ac_fn_c_try_link "$LINENO"; then :
11607   ac_cv_sys_largefile_source=1; break
11608 fi
11609 rm -f core conftest.err conftest.$ac_objext \
11610     conftest$ac_exeext conftest.$ac_ext
11611   ac_cv_sys_largefile_source=unknown
11612   break
11613 done
11614 fi
11615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
11616 $as_echo "$ac_cv_sys_largefile_source" >&6; }
11617 case $ac_cv_sys_largefile_source in #(
11618   no | unknown) ;;
11619   *)
11620 cat >>confdefs.h <<_ACEOF
11621 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
11622 _ACEOF
11623 ;;
11624 esac
11625 rm -rf conftest*
11626
11627 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
11628 # in glibc 2.1.3, but that breaks too many other things.
11629 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
11630 if test $ac_cv_sys_largefile_source != unknown; then
11631
11632 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
11633
11634 fi
11635 ;;
11636 esac
11637
11638 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
11639 # by calling it, 2009-04-02
11640 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
11641 if test "$PORTNAME" != "solaris"; then
11642 for ac_func in posix_fadvise
11643 do :
11644   ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
11645 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
11646   cat >>confdefs.h <<_ACEOF
11647 #define HAVE_POSIX_FADVISE 1
11648 _ACEOF
11649
11650 fi
11651 done
11652
11653 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
11654 "
11655 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
11656   ac_have_decl=1
11657 else
11658   ac_have_decl=0
11659 fi
11660
11661 cat >>confdefs.h <<_ACEOF
11662 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
11663 _ACEOF
11664
11665 fi
11666
11667 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
11668 "
11669 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
11670   ac_have_decl=1
11671 else
11672   ac_have_decl=0
11673 fi
11674
11675 cat >>confdefs.h <<_ACEOF
11676 #define HAVE_DECL_FDATASYNC $ac_have_decl
11677 _ACEOF
11678
11679 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
11680 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
11681   ac_have_decl=1
11682 else
11683   ac_have_decl=0
11684 fi
11685
11686 cat >>confdefs.h <<_ACEOF
11687 #define HAVE_DECL_STRLCAT $ac_have_decl
11688 _ACEOF
11689 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
11690 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
11691   ac_have_decl=1
11692 else
11693   ac_have_decl=0
11694 fi
11695
11696 cat >>confdefs.h <<_ACEOF
11697 #define HAVE_DECL_STRLCPY $ac_have_decl
11698 _ACEOF
11699
11700 # This is probably only present on Darwin, but may as well check always
11701 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
11702 "
11703 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
11704   ac_have_decl=1
11705 else
11706   ac_have_decl=0
11707 fi
11708
11709 cat >>confdefs.h <<_ACEOF
11710 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
11711 _ACEOF
11712
11713
11714 HAVE_IPV6=no
11715 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default
11716 #include <netinet/in.h>
11717 "
11718 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
11719
11720 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
11721
11722          HAVE_IPV6=yes
11723 fi
11724
11725
11726
11727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
11728 $as_echo_n "checking for PS_STRINGS... " >&6; }
11729 if ${pgac_cv_var_PS_STRINGS+:} false; then :
11730   $as_echo_n "(cached) " >&6
11731 else
11732   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11733 /* end confdefs.h.  */
11734 #include <machine/vmparam.h>
11735 #include <sys/exec.h>
11736
11737 int
11738 main ()
11739 {
11740 PS_STRINGS->ps_nargvstr = 1;
11741 PS_STRINGS->ps_argvstr = "foo";
11742   ;
11743   return 0;
11744 }
11745 _ACEOF
11746 if ac_fn_c_try_link "$LINENO"; then :
11747   pgac_cv_var_PS_STRINGS=yes
11748 else
11749   pgac_cv_var_PS_STRINGS=no
11750 fi
11751 rm -f core conftest.err conftest.$ac_objext \
11752     conftest$ac_exeext conftest.$ac_ext
11753 fi
11754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
11755 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
11756 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
11757
11758 $as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
11759
11760 fi
11761
11762
11763 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
11764 # is missing.  Yes, there are machines that have only one.  We may
11765 # also decide to use snprintf.c if snprintf() is present but does not
11766 # have all the features we need --- see below.
11767
11768 if test "$PORTNAME" = "win32"; then
11769   # Win32 gets snprintf.c built unconditionally.
11770   #
11771   # To properly translate all NLS languages strings, we must support the
11772   # *printf() %$ format, which allows *printf() arguments to be selected
11773   # by position in the translated string.
11774   #
11775   # libintl versions < 0.13 use the native *printf() functions, and Win32
11776   # *printf() doesn't understand %$, so we must use our /port versions,
11777   # which do understand %$. libintl versions >= 0.13 include their own
11778   # *printf versions on Win32.  The libintl 0.13 release note text is:
11779   #
11780   #   C format strings with positions, as they arise when a translator
11781   #   needs to reorder a sentence, are now supported on all platforms.
11782   #   On those few platforms (NetBSD and Woe32) for which the native
11783   #   printf()/fprintf()/... functions don't support such format
11784   #   strings, replacements are provided through <libintl.h>.
11785   #
11786   # We could use libintl >= 0.13's *printf() if we were sure that we had
11787   # a litint >= 0.13 at runtime, but seeing that there is no clean way
11788   # to guarantee that, it is best to just use our own, so we are sure to
11789   # get %$ support. In include/port.h we disable the *printf() macros
11790   # that might have been defined by libintl.
11791   #
11792   # We do this unconditionally whether NLS is used or not so we are sure
11793   # that all Win32 libraries and binaries behave the same.
11794   pgac_need_repl_snprintf=yes
11795 else
11796   pgac_need_repl_snprintf=no
11797   for ac_func in snprintf
11798 do :
11799   ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
11800 if test "x$ac_cv_func_snprintf" = xyes; then :
11801   cat >>confdefs.h <<_ACEOF
11802 #define HAVE_SNPRINTF 1
11803 _ACEOF
11804
11805 else
11806   pgac_need_repl_snprintf=yes
11807 fi
11808 done
11809
11810   for ac_func in vsnprintf
11811 do :
11812   ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
11813 if test "x$ac_cv_func_vsnprintf" = xyes; then :
11814   cat >>confdefs.h <<_ACEOF
11815 #define HAVE_VSNPRINTF 1
11816 _ACEOF
11817
11818 else
11819   pgac_need_repl_snprintf=yes
11820 fi
11821 done
11822
11823 fi
11824
11825
11826 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
11827 # include/c.h will provide declarations.  Note this is a separate test
11828 # from whether the functions exist in the C library --- there are
11829 # systems that have the functions but don't bother to declare them :-(
11830
11831 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11832 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
11833   ac_have_decl=1
11834 else
11835   ac_have_decl=0
11836 fi
11837
11838 cat >>confdefs.h <<_ACEOF
11839 #define HAVE_DECL_SNPRINTF $ac_have_decl
11840 _ACEOF
11841 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
11842 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
11843   ac_have_decl=1
11844 else
11845   ac_have_decl=0
11846 fi
11847
11848 cat >>confdefs.h <<_ACEOF
11849 #define HAVE_DECL_VSNPRINTF $ac_have_decl
11850 _ACEOF
11851
11852
11853
11854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf" >&5
11855 $as_echo_n "checking for isinf... " >&6; }
11856 if ${ac_cv_func_isinf+:} false; then :
11857   $as_echo_n "(cached) " >&6
11858 else
11859   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11860 /* end confdefs.h.  */
11861
11862 #include <math.h>
11863 double glob_double;
11864
11865 int
11866 main ()
11867 {
11868 return isinf(glob_double) ? 0 : 1;
11869   ;
11870   return 0;
11871 }
11872 _ACEOF
11873 if ac_fn_c_try_link "$LINENO"; then :
11874   ac_cv_func_isinf=yes
11875 else
11876   ac_cv_func_isinf=no
11877 fi
11878 rm -f core conftest.err conftest.$ac_objext \
11879     conftest$ac_exeext conftest.$ac_ext
11880 fi
11881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_isinf" >&5
11882 $as_echo "$ac_cv_func_isinf" >&6; }
11883
11884 if test $ac_cv_func_isinf = yes ; then
11885
11886 $as_echo "#define HAVE_ISINF 1" >>confdefs.h
11887
11888 else
11889   case " $LIBOBJS " in
11890   *" isinf.$ac_objext "* ) ;;
11891   *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
11892  ;;
11893 esac
11894
11895   # Look for a way to implement a substitute for isinf()
11896   for ac_func in fpclass fp_class fp_class_d class
11897 do :
11898   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11899 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11900 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11901   cat >>confdefs.h <<_ACEOF
11902 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11903 _ACEOF
11904  break
11905 fi
11906 done
11907
11908 fi
11909
11910 ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
11911 if test "x$ac_cv_func_crypt" = xyes; then :
11912   $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
11913
11914 else
11915   case " $LIBOBJS " in
11916   *" crypt.$ac_objext "* ) ;;
11917   *) LIBOBJS="$LIBOBJS crypt.$ac_objext"
11918  ;;
11919 esac
11920
11921 fi
11922
11923 ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
11924 if test "x$ac_cv_func_fls" = xyes; then :
11925   $as_echo "#define HAVE_FLS 1" >>confdefs.h
11926
11927 else
11928   case " $LIBOBJS " in
11929   *" fls.$ac_objext "* ) ;;
11930   *) LIBOBJS="$LIBOBJS fls.$ac_objext"
11931  ;;
11932 esac
11933
11934 fi
11935
11936 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
11937 if test "x$ac_cv_func_getopt" = xyes; then :
11938   $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
11939
11940 else
11941   case " $LIBOBJS " in
11942   *" getopt.$ac_objext "* ) ;;
11943   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
11944  ;;
11945 esac
11946
11947 fi
11948
11949 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
11950 if test "x$ac_cv_func_getrusage" = xyes; then :
11951   $as_echo "#define HAVE_GETRUSAGE 1" >>confdefs.h
11952
11953 else
11954   case " $LIBOBJS " in
11955   *" getrusage.$ac_objext "* ) ;;
11956   *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
11957  ;;
11958 esac
11959
11960 fi
11961
11962 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
11963 if test "x$ac_cv_func_inet_aton" = xyes; then :
11964   $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
11965
11966 else
11967   case " $LIBOBJS " in
11968   *" inet_aton.$ac_objext "* ) ;;
11969   *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
11970  ;;
11971 esac
11972
11973 fi
11974
11975 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
11976 if test "x$ac_cv_func_mkdtemp" = xyes; then :
11977   $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
11978
11979 else
11980   case " $LIBOBJS " in
11981   *" mkdtemp.$ac_objext "* ) ;;
11982   *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
11983  ;;
11984 esac
11985
11986 fi
11987
11988 ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
11989 if test "x$ac_cv_func_random" = xyes; then :
11990   $as_echo "#define HAVE_RANDOM 1" >>confdefs.h
11991
11992 else
11993   case " $LIBOBJS " in
11994   *" random.$ac_objext "* ) ;;
11995   *) LIBOBJS="$LIBOBJS random.$ac_objext"
11996  ;;
11997 esac
11998
11999 fi
12000
12001 ac_fn_c_check_func "$LINENO" "rint" "ac_cv_func_rint"
12002 if test "x$ac_cv_func_rint" = xyes; then :
12003   $as_echo "#define HAVE_RINT 1" >>confdefs.h
12004
12005 else
12006   case " $LIBOBJS " in
12007   *" rint.$ac_objext "* ) ;;
12008   *) LIBOBJS="$LIBOBJS rint.$ac_objext"
12009  ;;
12010 esac
12011
12012 fi
12013
12014 ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
12015 if test "x$ac_cv_func_srandom" = xyes; then :
12016   $as_echo "#define HAVE_SRANDOM 1" >>confdefs.h
12017
12018 else
12019   case " $LIBOBJS " in
12020   *" srandom.$ac_objext "* ) ;;
12021   *) LIBOBJS="$LIBOBJS srandom.$ac_objext"
12022  ;;
12023 esac
12024
12025 fi
12026
12027 ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
12028 if test "x$ac_cv_func_strerror" = xyes; then :
12029   $as_echo "#define HAVE_STRERROR 1" >>confdefs.h
12030
12031 else
12032   case " $LIBOBJS " in
12033   *" strerror.$ac_objext "* ) ;;
12034   *) LIBOBJS="$LIBOBJS strerror.$ac_objext"
12035  ;;
12036 esac
12037
12038 fi
12039
12040 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
12041 if test "x$ac_cv_func_strlcat" = xyes; then :
12042   $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
12043
12044 else
12045   case " $LIBOBJS " in
12046   *" strlcat.$ac_objext "* ) ;;
12047   *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
12048  ;;
12049 esac
12050
12051 fi
12052
12053 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
12054 if test "x$ac_cv_func_strlcpy" = xyes; then :
12055   $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
12056
12057 else
12058   case " $LIBOBJS " in
12059   *" strlcpy.$ac_objext "* ) ;;
12060   *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
12061  ;;
12062 esac
12063
12064 fi
12065
12066
12067
12068 case $host_os in
12069
12070         # Windows uses a specialised env handler
12071         # and doesn't need a replacement getpeereid because it doesn't use
12072         # Unix sockets.
12073         mingw*)
12074
12075 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
12076
12077
12078 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
12079
12080                 ac_cv_func_unsetenv=yes
12081                 ac_cv_func_getpeereid=yes;;
12082         *)
12083                 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
12084 if test "x$ac_cv_func_unsetenv" = xyes; then :
12085   $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
12086
12087 else
12088   case " $LIBOBJS " in
12089   *" unsetenv.$ac_objext "* ) ;;
12090   *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext"
12091  ;;
12092 esac
12093
12094 fi
12095
12096 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
12097 if test "x$ac_cv_func_getpeereid" = xyes; then :
12098   $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
12099
12100 else
12101   case " $LIBOBJS " in
12102   *" getpeereid.$ac_objext "* ) ;;
12103   *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
12104  ;;
12105 esac
12106
12107 fi
12108
12109
12110                 ;;
12111 esac
12112
12113 # System's version of getaddrinfo(), if any, may be used only if we found
12114 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
12115 # We use only our own getaddrinfo.c on Windows, but it's time to revisit that.
12116 if test x"$ac_cv_type_struct_addrinfo" = xyes && \
12117    test "$PORTNAME" != "win32"; then
12118   ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
12119 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
12120   $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
12121
12122 else
12123   case " $LIBOBJS " in
12124   *" getaddrinfo.$ac_objext "* ) ;;
12125   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
12126  ;;
12127 esac
12128
12129 fi
12130
12131
12132 else
12133   case " $LIBOBJS " in
12134   *" getaddrinfo.$ac_objext "* ) ;;
12135   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
12136  ;;
12137 esac
12138
12139 fi
12140
12141 # Similarly, use system's getopt_long() only if system provides struct option.
12142 if test x"$ac_cv_type_struct_option" = xyes ; then
12143   ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
12144 if test "x$ac_cv_func_getopt_long" = xyes; then :
12145   $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
12146
12147 else
12148   case " $LIBOBJS " in
12149   *" getopt_long.$ac_objext "* ) ;;
12150   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
12151  ;;
12152 esac
12153
12154 fi
12155
12156
12157 else
12158   case " $LIBOBJS " in
12159   *" getopt_long.$ac_objext "* ) ;;
12160   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
12161  ;;
12162 esac
12163
12164 fi
12165
12166 # Solaris' getopt() doesn't do what we want for long options, so always use
12167 # our version on that platform.
12168 if test "$PORTNAME" = "solaris"; then
12169   case " $LIBOBJS " in
12170   *" getopt.$ac_objext "* ) ;;
12171   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
12172  ;;
12173 esac
12174
12175 fi
12176
12177 # mingw has adopted a GNU-centric interpretation of optind/optreset,
12178 # so always use our version on Windows.
12179 if test "$PORTNAME" = "win32"; then
12180   case " $LIBOBJS " in
12181   *" getopt.$ac_objext "* ) ;;
12182   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
12183  ;;
12184 esac
12185
12186   case " $LIBOBJS " in
12187   *" getopt_long.$ac_objext "* ) ;;
12188   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
12189  ;;
12190 esac
12191
12192 fi
12193
12194 # Win32 (really MinGW) support
12195 if test "$PORTNAME" = "win32"; then
12196   ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
12197 if test "x$ac_cv_func_gettimeofday" = xyes; then :
12198   $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
12199
12200 else
12201   case " $LIBOBJS " in
12202   *" gettimeofday.$ac_objext "* ) ;;
12203   *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
12204  ;;
12205 esac
12206
12207 fi
12208
12209
12210   case " $LIBOBJS " in
12211   *" dirmod.$ac_objext "* ) ;;
12212   *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
12213  ;;
12214 esac
12215
12216   case " $LIBOBJS " in
12217   *" kill.$ac_objext "* ) ;;
12218   *) LIBOBJS="$LIBOBJS kill.$ac_objext"
12219  ;;
12220 esac
12221
12222   case " $LIBOBJS " in
12223   *" open.$ac_objext "* ) ;;
12224   *) LIBOBJS="$LIBOBJS open.$ac_objext"
12225  ;;
12226 esac
12227
12228   case " $LIBOBJS " in
12229   *" system.$ac_objext "* ) ;;
12230   *) LIBOBJS="$LIBOBJS system.$ac_objext"
12231  ;;
12232 esac
12233
12234   case " $LIBOBJS " in
12235   *" win32env.$ac_objext "* ) ;;
12236   *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
12237  ;;
12238 esac
12239
12240   case " $LIBOBJS " in
12241   *" win32error.$ac_objext "* ) ;;
12242   *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
12243  ;;
12244 esac
12245
12246   case " $LIBOBJS " in
12247   *" win32setlocale.$ac_objext "* ) ;;
12248   *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
12249  ;;
12250 esac
12251
12252
12253 $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
12254
12255   ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
12256 #define WIN32_LEAN_AND_MEAN
12257 #include <windows.h>
12258 #include <string.h>
12259 #include <dbghelp.h>
12260 "
12261 if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
12262
12263 cat >>confdefs.h <<_ACEOF
12264 #define HAVE_MINIDUMP_TYPE 1
12265 _ACEOF
12266
12267 pgac_minidump_type=yes
12268 else
12269   pgac_minidump_type=no
12270 fi
12271
12272 fi
12273 if test x"$pgac_minidump_type" = x"yes" ; then
12274   have_win32_dbghelp=yes
12275
12276 else
12277   have_win32_dbghelp=no
12278
12279 fi
12280
12281 # Cygwin needs only a bit of that
12282 if test "$PORTNAME" = "cygwin"; then
12283   case " $LIBOBJS " in
12284   *" dirmod.$ac_objext "* ) ;;
12285   *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
12286  ;;
12287 esac
12288
12289 fi
12290
12291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
12292 $as_echo_n "checking for sigsetjmp... " >&6; }
12293 if ${pgac_cv_func_sigsetjmp+:} false; then :
12294   $as_echo_n "(cached) " >&6
12295 else
12296   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12297 /* end confdefs.h.  */
12298 #include <setjmp.h>
12299 int
12300 main ()
12301 {
12302 sigjmp_buf x; sigsetjmp(x, 1);
12303   ;
12304   return 0;
12305 }
12306 _ACEOF
12307 if ac_fn_c_try_link "$LINENO"; then :
12308   pgac_cv_func_sigsetjmp=yes
12309 else
12310   pgac_cv_func_sigsetjmp=no
12311 fi
12312 rm -f core conftest.err conftest.$ac_objext \
12313     conftest$ac_exeext conftest.$ac_ext
12314 fi
12315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_sigsetjmp" >&5
12316 $as_echo "$pgac_cv_func_sigsetjmp" >&6; }
12317 if test x"$pgac_cv_func_sigsetjmp" = x"yes"; then
12318
12319 $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
12320
12321 fi
12322
12323 ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
12324 /* NetBSD declares sys_siglist in unistd.h.  */
12325 #ifdef HAVE_UNISTD_H
12326 # include <unistd.h>
12327 #endif
12328
12329 "
12330 if test "x$ac_cv_have_decl_sys_siglist" = xyes; then :
12331   ac_have_decl=1
12332 else
12333   ac_have_decl=0
12334 fi
12335
12336 cat >>confdefs.h <<_ACEOF
12337 #define HAVE_DECL_SYS_SIGLIST $ac_have_decl
12338 _ACEOF
12339
12340
12341
12342 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
12343 if test "x$ac_cv_func_syslog" = xyes; then :
12344   ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
12345 if test "x$ac_cv_header_syslog_h" = xyes; then :
12346
12347 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
12348
12349 fi
12350
12351
12352 fi
12353
12354
12355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
12356 $as_echo_n "checking for opterr... " >&6; }
12357 if ${pgac_cv_var_int_opterr+:} false; then :
12358   $as_echo_n "(cached) " >&6
12359 else
12360   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12361 /* end confdefs.h.  */
12362 #include <unistd.h>
12363 int
12364 main ()
12365 {
12366 extern int opterr; opterr = 1;
12367   ;
12368   return 0;
12369 }
12370 _ACEOF
12371 if ac_fn_c_try_link "$LINENO"; then :
12372   pgac_cv_var_int_opterr=yes
12373 else
12374   pgac_cv_var_int_opterr=no
12375 fi
12376 rm -f core conftest.err conftest.$ac_objext \
12377     conftest$ac_exeext conftest.$ac_ext
12378 fi
12379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
12380 $as_echo "$pgac_cv_var_int_opterr" >&6; }
12381 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
12382
12383 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
12384
12385 fi
12386
12387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
12388 $as_echo_n "checking for optreset... " >&6; }
12389 if ${pgac_cv_var_int_optreset+:} false; then :
12390   $as_echo_n "(cached) " >&6
12391 else
12392   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12393 /* end confdefs.h.  */
12394 #include <unistd.h>
12395 int
12396 main ()
12397 {
12398 extern int optreset; optreset = 1;
12399   ;
12400   return 0;
12401 }
12402 _ACEOF
12403 if ac_fn_c_try_link "$LINENO"; then :
12404   pgac_cv_var_int_optreset=yes
12405 else
12406   pgac_cv_var_int_optreset=no
12407 fi
12408 rm -f core conftest.err conftest.$ac_objext \
12409     conftest$ac_exeext conftest.$ac_ext
12410 fi
12411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
12412 $as_echo "$pgac_cv_var_int_optreset" >&6; }
12413 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
12414
12415 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
12416
12417 fi
12418
12419 for ac_func in strtoll strtoq
12420 do :
12421   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12422 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12423 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12424   cat >>confdefs.h <<_ACEOF
12425 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12426 _ACEOF
12427  break
12428 fi
12429 done
12430
12431 for ac_func in strtoull strtouq
12432 do :
12433   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12434 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12435 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12436   cat >>confdefs.h <<_ACEOF
12437 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12438 _ACEOF
12439  break
12440 fi
12441 done
12442
12443
12444 # Lastly, restore full LIBS list and check for readline/libedit symbols
12445 LIBS="$LIBS_including_readline"
12446
12447 if test "$with_readline" = yes; then
12448   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_append_character" >&5
12449 $as_echo_n "checking for rl_completion_append_character... " >&6; }
12450 if ${pgac_cv_var_rl_completion_append_character+:} false; then :
12451   $as_echo_n "(cached) " >&6
12452 else
12453   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12454 /* end confdefs.h.  */
12455 #include <stdio.h>
12456 #ifdef HAVE_READLINE_READLINE_H
12457 # include <readline/readline.h>
12458 #elif defined(HAVE_READLINE_H)
12459 # include <readline.h>
12460 #endif
12461
12462 int
12463 main ()
12464 {
12465 rl_completion_append_character = 'x';
12466   ;
12467   return 0;
12468 }
12469 _ACEOF
12470 if ac_fn_c_try_link "$LINENO"; then :
12471   pgac_cv_var_rl_completion_append_character=yes
12472 else
12473   pgac_cv_var_rl_completion_append_character=no
12474 fi
12475 rm -f core conftest.err conftest.$ac_objext \
12476     conftest$ac_exeext conftest.$ac_ext
12477 fi
12478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_append_character" >&5
12479 $as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
12480 if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
12481
12482 $as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
12483
12484 fi
12485   for ac_func in rl_completion_matches rl_filename_completion_function
12486 do :
12487   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12488 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12489 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12490   cat >>confdefs.h <<_ACEOF
12491 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12492 _ACEOF
12493
12494 fi
12495 done
12496
12497   for ac_func in append_history history_truncate_file
12498 do :
12499   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12500 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12501 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12502   cat >>confdefs.h <<_ACEOF
12503 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12504 _ACEOF
12505
12506 fi
12507 done
12508
12509 fi
12510
12511
12512 #
12513 # Pthreads
12514 #
12515 # For each platform, we need to know about any special compile and link
12516 # libraries, and whether the normal C function names are thread-safe.
12517 # See the comment at the top of src/port/thread.c for more information.
12518 # WIN32 doesn't need the pthread tests;  it always uses threads
12519 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then
12520
12521
12522
12523 ac_ext=c
12524 ac_cpp='$CPP $CPPFLAGS'
12525 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12526 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12527 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12528
12529 acx_pthread_ok=no
12530
12531 # We used to check for pthread.h first, but this fails if pthread.h
12532 # requires special compiler flags (e.g. on True64 or Sequent).
12533 # It gets checked for in the link test anyway.
12534
12535 # First of all, check if the user has set any of the PTHREAD_LIBS,
12536 # etcetera environment variables, and if threads linking works using
12537 # them:
12538 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
12539         save_CFLAGS="$CFLAGS"
12540         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
12541         save_LIBS="$LIBS"
12542         LIBS="$PTHREAD_LIBS $LIBS"
12543         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
12544 $as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
12545         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12546 /* end confdefs.h.  */
12547
12548 /* Override any GCC internal prototype to avoid an error.
12549    Use char because int might match the return type of a GCC
12550    builtin and then its argument prototype would still apply.  */
12551 #ifdef __cplusplus
12552 extern "C"
12553 #endif
12554 char pthread_join ();
12555 int
12556 main ()
12557 {
12558 return pthread_join ();
12559   ;
12560   return 0;
12561 }
12562 _ACEOF
12563 if ac_fn_c_try_link "$LINENO"; then :
12564   acx_pthread_ok=yes
12565 fi
12566 rm -f core conftest.err conftest.$ac_objext \
12567     conftest$ac_exeext conftest.$ac_ext
12568         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5
12569 $as_echo "$acx_pthread_ok" >&6; }
12570         if test x"$acx_pthread_ok" = xno; then
12571                 PTHREAD_LIBS=""
12572                 PTHREAD_CFLAGS=""
12573         fi
12574         LIBS="$save_LIBS"
12575         CFLAGS="$save_CFLAGS"
12576 fi
12577
12578 # We must check for the threads library under a number of different
12579 # names; the ordering is very important because some systems
12580 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
12581 # libraries is broken (non-POSIX).
12582
12583 # Create a list of thread flags to try.  Items starting with a "-" are
12584 # C compiler flags, and other items are library names, except for "none"
12585 # which indicates that we try without any flags at all, and "pthread-config"
12586 # which is a program returning the flags for the Pth emulation library.
12587
12588 acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config pthreadGC2"
12589
12590 # The ordering *is* (sometimes) important.  Some notes on the
12591 # individual items follow:
12592
12593 # pthreads: AIX (must check this before -lpthread)
12594 # none: in case threads are in libc; should be tried before -Kthread and
12595 #       other compiler flags to prevent continual compiler warnings
12596 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
12597 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
12598 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
12599 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
12600 # -pthreads: Solaris/gcc
12601 # -mthreads: Mingw32/gcc, Lynx/gcc
12602 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
12603 #      doesn't hurt to check since this sometimes defines pthreads too;
12604 #      also defines -D_REENTRANT)
12605 # pthread: Linux, etcetera
12606 # --thread-safe: KAI C++
12607 # pthread-config: use pthread-config program (for GNU Pth library)
12608
12609 case "${host_cpu}-${host_os}" in
12610         *solaris*)
12611
12612         # On Solaris (at least, for some versions), libc contains stubbed
12613         # (non-functional) versions of the pthreads routines, so link-based
12614         # tests will erroneously succeed.  (We need to link with -pthread or
12615         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
12616         # a function called by this macro, so we could check for that, but
12617         # who knows whether they'll stub that too in a future libc.)  So,
12618         # we'll just look for -pthreads and -lpthread first:
12619
12620         acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
12621         ;;
12622 esac
12623
12624 if test x"$acx_pthread_ok" = xno; then
12625 for flag in $acx_pthread_flags; do
12626
12627         tryPTHREAD_CFLAGS=""
12628         tryPTHREAD_LIBS=""
12629         case $flag in
12630                 none)
12631                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
12632 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
12633                 ;;
12634
12635                 -*)
12636                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
12637 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
12638                 tryPTHREAD_CFLAGS="$flag"
12639                 ;;
12640
12641                 pthread-config)
12642                 # skip this if we already have flags defined, for PostgreSQL
12643                 if test x"$PTHREAD_CFLAGS" != x -o x"$PTHREAD_LIBS" != x; then continue; fi
12644                 # Extract the first word of "pthread-config", so it can be a program name with args.
12645 set dummy pthread-config; ac_word=$2
12646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12647 $as_echo_n "checking for $ac_word... " >&6; }
12648 if ${ac_cv_prog_acx_pthread_config+:} false; then :
12649   $as_echo_n "(cached) " >&6
12650 else
12651   if test -n "$acx_pthread_config"; then
12652   ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
12653 else
12654 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12655 for as_dir in $PATH
12656 do
12657   IFS=$as_save_IFS
12658   test -z "$as_dir" && as_dir=.
12659     for ac_exec_ext in '' $ac_executable_extensions; do
12660   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12661     ac_cv_prog_acx_pthread_config="yes"
12662     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12663     break 2
12664   fi
12665 done
12666   done
12667 IFS=$as_save_IFS
12668
12669   test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
12670 fi
12671 fi
12672 acx_pthread_config=$ac_cv_prog_acx_pthread_config
12673 if test -n "$acx_pthread_config"; then
12674   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_config" >&5
12675 $as_echo "$acx_pthread_config" >&6; }
12676 else
12677   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12678 $as_echo "no" >&6; }
12679 fi
12680
12681
12682                 if test x"$acx_pthread_config" = xno; then continue; fi
12683                 tryPTHREAD_CFLAGS="`pthread-config --cflags`"
12684                 tryPTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
12685                 ;;
12686
12687                 *)
12688                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
12689 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
12690                 tryPTHREAD_LIBS="-l$flag"
12691                 ;;
12692         esac
12693
12694         save_LIBS="$LIBS"
12695         save_CFLAGS="$CFLAGS"
12696         LIBS="$tryPTHREAD_LIBS $PTHREAD_LIBS $LIBS"
12697         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
12698
12699         # Check for various functions.  We must include pthread.h,
12700         # since some functions may be macros.  (On the Sequent, we
12701         # need a special flag -Kthread to make this header compile.)
12702         # We check for pthread_join because it is in -lpthread on IRIX
12703         # while pthread_create is in libc.  We check for pthread_attr_init
12704         # due to DEC craziness with -lpthreads.  We check for
12705         # pthread_cleanup_push because it is one of the few pthread
12706         # functions on Solaris that doesn't have a non-functional libc stub.
12707         # We try pthread_create on general principles.
12708         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12709 /* end confdefs.h.  */
12710 #include <pthread.h>
12711 int
12712 main ()
12713 {
12714 pthread_t th; pthread_join(th, 0);
12715                      pthread_attr_init(0); pthread_cleanup_push(0, 0);
12716                      pthread_create(0,0,0,0); pthread_cleanup_pop(0);
12717   ;
12718   return 0;
12719 }
12720 _ACEOF
12721 if ac_fn_c_try_link "$LINENO"; then :
12722   acx_pthread_ok=yes
12723 else
12724   acx_pthread_ok=no
12725 fi
12726 rm -f core conftest.err conftest.$ac_objext \
12727     conftest$ac_exeext conftest.$ac_ext
12728
12729         if test "x$acx_pthread_ok" = xyes; then
12730             # Don't use options that are ignored by the compiler.
12731             # We find them by checking stderror.
12732             cat >conftest.$ac_ext <<_ACEOF
12733 int
12734 main (int argc, char **argv)
12735 {
12736   (void) argc;
12737   (void) argv;
12738   return 0;
12739 }
12740 _ACEOF
12741             rm -f conftest.$ac_objext conftest$ac_exeext
12742             # Check both linking and compiling, because they might tolerate different options.
12743             if test "`(eval $ac_link 2>&1 1>&5)`" = "" && test "`(eval $ac_compile 2>&1 1>&5)`" = ""; then
12744                 # The original macro breaks out of the loop at this point,
12745                 # but we continue trying flags because Linux needs -lpthread
12746                 # too to build libpq successfully.  The test above only
12747                 # tests for building binaries, not shared libraries.
12748                 PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
12749                 PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
12750             else   acx_pthread_ok=no
12751             fi
12752         fi
12753
12754         LIBS="$save_LIBS"
12755         CFLAGS="$save_CFLAGS"
12756
12757         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5
12758 $as_echo "$acx_pthread_ok" >&6; }
12759 done
12760 fi
12761
12762 # The original macro has a bunch of other tests here, which we have removed
12763 # because (a) Postgres doesn't need them, and (b) $acx_pthread_ok is not
12764 # meaningful at this point.
12765
12766
12767
12768
12769 ac_ext=c
12770 ac_cpp='$CPP $CPPFLAGS'
12771 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12772 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12773 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12774
12775         # set thread flags
12776
12777 # Some platforms use these, so just define them.  They can't hurt if they
12778 # are not supported.  For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
12779 # enables 5-arg getpwuid_r, among other things.
12780 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
12781
12782 # Check for *_r functions
12783 _CFLAGS="$CFLAGS"
12784 _LIBS="$LIBS"
12785 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
12786 LIBS="$LIBS $PTHREAD_LIBS"
12787
12788 if test "$PORTNAME" != "win32"; then
12789 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
12790 if test "x$ac_cv_header_pthread_h" = xyes; then :
12791
12792 else
12793   as_fn_error $? "
12794 pthread.h not found;  use --disable-thread-safety to disable thread safety" "$LINENO" 5
12795 fi
12796
12797
12798 fi
12799
12800 for ac_func in strerror_r getpwuid_r gethostbyname_r
12801 do :
12802   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12803 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12804 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12805   cat >>confdefs.h <<_ACEOF
12806 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12807 _ACEOF
12808
12809 fi
12810 done
12811
12812
12813 # Do test here with the proper thread flags
12814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
12815 $as_echo_n "checking whether strerror_r returns int... " >&6; }
12816 if ${pgac_cv_func_strerror_r_int+:} false; then :
12817   $as_echo_n "(cached) " >&6
12818 else
12819   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12820 /* end confdefs.h.  */
12821 #include <string.h>
12822 int
12823 main ()
12824 {
12825 #ifndef _AIX
12826 int strerror_r(int, char *, size_t);
12827 #else
12828 /* Older AIX has 'int' for the third argument so we don't test the args. */
12829 int strerror_r();
12830 #endif
12831   ;
12832   return 0;
12833 }
12834 _ACEOF
12835 if ac_fn_c_try_compile "$LINENO"; then :
12836   pgac_cv_func_strerror_r_int=yes
12837 else
12838   pgac_cv_func_strerror_r_int=no
12839 fi
12840 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12841 fi
12842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
12843 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
12844 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
12845
12846 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
12847
12848 fi
12849
12850
12851 CFLAGS="$_CFLAGS"
12852 LIBS="$_LIBS"
12853
12854 else
12855 # do not use values from template file
12856 PTHREAD_CFLAGS=
12857 PTHREAD_LIBS=
12858 fi
12859
12860
12861
12862
12863
12864 # We can test for libldap_r only after we know PTHREAD_LIBS
12865 if test "$with_ldap" = yes ; then
12866   _LIBS="$LIBS"
12867   if test "$PORTNAME" != "win32"; then
12868     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
12869 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
12870 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
12871   $as_echo_n "(cached) " >&6
12872 else
12873   ac_check_lib_save_LIBS=$LIBS
12874 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
12875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12876 /* end confdefs.h.  */
12877
12878 /* Override any GCC internal prototype to avoid an error.
12879    Use char because int might match the return type of a GCC
12880    builtin and then its argument prototype would still apply.  */
12881 #ifdef __cplusplus
12882 extern "C"
12883 #endif
12884 char ldap_bind ();
12885 int
12886 main ()
12887 {
12888 return ldap_bind ();
12889   ;
12890   return 0;
12891 }
12892 _ACEOF
12893 if ac_fn_c_try_link "$LINENO"; then :
12894   ac_cv_lib_ldap_ldap_bind=yes
12895 else
12896   ac_cv_lib_ldap_ldap_bind=no
12897 fi
12898 rm -f core conftest.err conftest.$ac_objext \
12899     conftest$ac_exeext conftest.$ac_ext
12900 LIBS=$ac_check_lib_save_LIBS
12901 fi
12902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
12903 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
12904 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
12905   cat >>confdefs.h <<_ACEOF
12906 #define HAVE_LIBLDAP 1
12907 _ACEOF
12908
12909   LIBS="-lldap $LIBS"
12910
12911 else
12912   as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
12913 fi
12914
12915     LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
12916     if test "$enable_thread_safety" = yes; then
12917       # on some platforms ldap_r fails to link without PTHREAD_LIBS
12918       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_simple_bind in -lldap_r" >&5
12919 $as_echo_n "checking for ldap_simple_bind in -lldap_r... " >&6; }
12920 if ${ac_cv_lib_ldap_r_ldap_simple_bind+:} false; then :
12921   $as_echo_n "(cached) " >&6
12922 else
12923   ac_check_lib_save_LIBS=$LIBS
12924 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
12925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12926 /* end confdefs.h.  */
12927
12928 /* Override any GCC internal prototype to avoid an error.
12929    Use char because int might match the return type of a GCC
12930    builtin and then its argument prototype would still apply.  */
12931 #ifdef __cplusplus
12932 extern "C"
12933 #endif
12934 char ldap_simple_bind ();
12935 int
12936 main ()
12937 {
12938 return ldap_simple_bind ();
12939   ;
12940   return 0;
12941 }
12942 _ACEOF
12943 if ac_fn_c_try_link "$LINENO"; then :
12944   ac_cv_lib_ldap_r_ldap_simple_bind=yes
12945 else
12946   ac_cv_lib_ldap_r_ldap_simple_bind=no
12947 fi
12948 rm -f core conftest.err conftest.$ac_objext \
12949     conftest$ac_exeext conftest.$ac_ext
12950 LIBS=$ac_check_lib_save_LIBS
12951 fi
12952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
12953 $as_echo "$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
12954 if test "x$ac_cv_lib_ldap_r_ldap_simple_bind" = xyes; then :
12955   cat >>confdefs.h <<_ACEOF
12956 #define HAVE_LIBLDAP_R 1
12957 _ACEOF
12958
12959   LIBS="-lldap_r $LIBS"
12960
12961 else
12962   as_fn_error $? "library 'ldap_r' is required for LDAP" "$LINENO" 5
12963 fi
12964
12965       LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
12966     else
12967       LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
12968     fi
12969   else
12970     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
12971 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
12972 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
12973   $as_echo_n "(cached) " >&6
12974 else
12975   ac_check_lib_save_LIBS=$LIBS
12976 LIBS="-lwldap32  $LIBS"
12977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12978 /* end confdefs.h.  */
12979
12980 /* Override any GCC internal prototype to avoid an error.
12981    Use char because int might match the return type of a GCC
12982    builtin and then its argument prototype would still apply.  */
12983 #ifdef __cplusplus
12984 extern "C"
12985 #endif
12986 char ldap_bind ();
12987 int
12988 main ()
12989 {
12990 return ldap_bind ();
12991   ;
12992   return 0;
12993 }
12994 _ACEOF
12995 if ac_fn_c_try_link "$LINENO"; then :
12996   ac_cv_lib_wldap32_ldap_bind=yes
12997 else
12998   ac_cv_lib_wldap32_ldap_bind=no
12999 fi
13000 rm -f core conftest.err conftest.$ac_objext \
13001     conftest$ac_exeext conftest.$ac_ext
13002 LIBS=$ac_check_lib_save_LIBS
13003 fi
13004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
13005 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
13006 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
13007   cat >>confdefs.h <<_ACEOF
13008 #define HAVE_LIBWLDAP32 1
13009 _ACEOF
13010
13011   LIBS="-lwldap32 $LIBS"
13012
13013 else
13014   as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
13015 fi
13016
13017     LDAP_LIBS_FE="-lwldap32"
13018     LDAP_LIBS_BE="-lwldap32"
13019   fi
13020   LIBS="$_LIBS"
13021 fi
13022
13023
13024
13025
13026 # This test makes sure that run tests work at all.  Sometimes a shared
13027 # library is found by the linker, but the runtime linker can't find it.
13028 # This check should come after all modifications of compiler or linker
13029 # variables, and before any other run tests.
13030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
13031 $as_echo_n "checking test program... " >&6; }
13032 if test "$cross_compiling" = yes; then :
13033   { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
13034 $as_echo "cross-compiling" >&6; }
13035 else
13036   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13037 /* end confdefs.h.  */
13038 int main() { return 0; }
13039 _ACEOF
13040 if ac_fn_c_try_run "$LINENO"; then :
13041   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
13042 $as_echo "ok" >&6; }
13043 else
13044   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
13045 $as_echo "failed" >&6; }
13046 as_fn_error $? "
13047 Could not execute a simple test program.  This may be a problem
13048 related to locating shared libraries.  Check the file 'config.log'
13049 for the exact reason." "$LINENO" 5
13050 fi
13051 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13052   conftest.$ac_objext conftest.beam conftest.$ac_ext
13053 fi
13054
13055
13056 # --------------------
13057 # Run tests below here
13058 # --------------------
13059
13060 # Force use of our snprintf if system's doesn't do arg control
13061 # See comment above at snprintf test for details.
13062 if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
13063   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports argument control" >&5
13064 $as_echo_n "checking whether snprintf supports argument control... " >&6; }
13065 if ${pgac_cv_snprintf_arg_control+:} false; then :
13066   $as_echo_n "(cached) " >&6
13067 else
13068   if test "$cross_compiling" = yes; then :
13069   pgac_cv_snprintf_arg_control=cross
13070 else
13071   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13072 /* end confdefs.h.  */
13073 #include <stdio.h>
13074 #include <string.h>
13075
13076 int main()
13077 {
13078   char buf[100];
13079
13080   /* can it swap arguments? */
13081   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
13082   if (strcmp(buf, "4 3") != 0)
13083     return 1;
13084   return 0;
13085 }
13086 _ACEOF
13087 if ac_fn_c_try_run "$LINENO"; then :
13088   pgac_cv_snprintf_arg_control=yes
13089 else
13090   pgac_cv_snprintf_arg_control=no
13091 fi
13092 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13093   conftest.$ac_objext conftest.beam conftest.$ac_ext
13094 fi
13095
13096
13097 fi
13098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_arg_control" >&5
13099 $as_echo "$pgac_cv_snprintf_arg_control" >&6; }
13100
13101   if test $pgac_cv_snprintf_arg_control != yes ; then
13102     pgac_need_repl_snprintf=yes
13103   fi
13104 fi
13105
13106
13107
13108
13109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
13110 $as_echo_n "checking whether long int is 64 bits... " >&6; }
13111 if ${pgac_cv_type_long_int_64+:} false; then :
13112   $as_echo_n "(cached) " >&6
13113 else
13114   if test "$cross_compiling" = yes; then :
13115   # If cross-compiling, check the size reported by the compiler and
13116 # trust that the arithmetic works.
13117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13118 /* end confdefs.h.  */
13119
13120 int
13121 main ()
13122 {
13123 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
13124 test_array [0] = 0;
13125 return test_array [0];
13126
13127   ;
13128   return 0;
13129 }
13130 _ACEOF
13131 if ac_fn_c_try_compile "$LINENO"; then :
13132   pgac_cv_type_long_int_64=yes
13133 else
13134   pgac_cv_type_long_int_64=no
13135 fi
13136 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13137 else
13138   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13139 /* end confdefs.h.  */
13140 typedef long int ac_int64;
13141
13142 /*
13143  * These are globals to discourage the compiler from folding all the
13144  * arithmetic tests down to compile-time constants.
13145  */
13146 ac_int64 a = 20000001;
13147 ac_int64 b = 40000005;
13148
13149 int does_int64_work()
13150 {
13151   ac_int64 c,d;
13152
13153   if (sizeof(ac_int64) != 8)
13154     return 0;                   /* definitely not the right size */
13155
13156   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
13157   c = a * b;
13158   d = (c + b) / b;
13159   if (d != a+1)
13160     return 0;
13161   return 1;
13162 }
13163 main() {
13164   exit(! does_int64_work());
13165 }
13166 _ACEOF
13167 if ac_fn_c_try_run "$LINENO"; then :
13168   pgac_cv_type_long_int_64=yes
13169 else
13170   pgac_cv_type_long_int_64=no
13171 fi
13172 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13173   conftest.$ac_objext conftest.beam conftest.$ac_ext
13174 fi
13175
13176 fi
13177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
13178 $as_echo "$pgac_cv_type_long_int_64" >&6; }
13179
13180 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
13181 if test x"$pgac_cv_type_long_int_64" = xyes ; then
13182
13183 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
13184
13185 fi
13186
13187
13188 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
13189   pg_int64_type="long int"
13190 else
13191   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
13192 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
13193 if ${pgac_cv_type_long_long_int_64+:} false; then :
13194   $as_echo_n "(cached) " >&6
13195 else
13196   if test "$cross_compiling" = yes; then :
13197   # If cross-compiling, check the size reported by the compiler and
13198 # trust that the arithmetic works.
13199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13200 /* end confdefs.h.  */
13201
13202 int
13203 main ()
13204 {
13205 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
13206 test_array [0] = 0;
13207 return test_array [0];
13208
13209   ;
13210   return 0;
13211 }
13212 _ACEOF
13213 if ac_fn_c_try_compile "$LINENO"; then :
13214   pgac_cv_type_long_long_int_64=yes
13215 else
13216   pgac_cv_type_long_long_int_64=no
13217 fi
13218 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13219 else
13220   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13221 /* end confdefs.h.  */
13222 typedef long long int ac_int64;
13223
13224 /*
13225  * These are globals to discourage the compiler from folding all the
13226  * arithmetic tests down to compile-time constants.
13227  */
13228 ac_int64 a = 20000001;
13229 ac_int64 b = 40000005;
13230
13231 int does_int64_work()
13232 {
13233   ac_int64 c,d;
13234
13235   if (sizeof(ac_int64) != 8)
13236     return 0;                   /* definitely not the right size */
13237
13238   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
13239   c = a * b;
13240   d = (c + b) / b;
13241   if (d != a+1)
13242     return 0;
13243   return 1;
13244 }
13245 main() {
13246   exit(! does_int64_work());
13247 }
13248 _ACEOF
13249 if ac_fn_c_try_run "$LINENO"; then :
13250   pgac_cv_type_long_long_int_64=yes
13251 else
13252   pgac_cv_type_long_long_int_64=no
13253 fi
13254 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13255   conftest.$ac_objext conftest.beam conftest.$ac_ext
13256 fi
13257
13258 fi
13259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
13260 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
13261
13262 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
13263 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
13264
13265 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
13266
13267 fi
13268
13269   if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
13270     pg_int64_type="long long int"
13271   else
13272     as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
13273   fi
13274 fi
13275
13276
13277 cat >>confdefs.h <<_ACEOF
13278 #define PG_INT64_TYPE $pg_int64_type
13279 _ACEOF
13280
13281
13282
13283 if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
13284   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13285 /* end confdefs.h.  */
13286
13287 #define INT64CONST(x)  x##LL
13288 long long int foo = INT64CONST(0x1234567890123456);
13289
13290 int
13291 main ()
13292 {
13293
13294   ;
13295   return 0;
13296 }
13297 _ACEOF
13298 if ac_fn_c_try_compile "$LINENO"; then :
13299
13300 $as_echo "#define HAVE_LL_CONSTANTS 1" >>confdefs.h
13301
13302 fi
13303 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13304 fi
13305
13306
13307 # If we found "long int" is 64 bits, assume snprintf handles it.  If
13308 # we found we need to use "long long int", better check.  We cope with
13309 # snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
13310 # work, fall back to our own snprintf emulation (which we know uses %lld).
13311
13312 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
13313   if test $pgac_need_repl_snprintf = no; then
13314     { $as_echo "$as_me:${as_lineno-$LINENO}: checking snprintf length modifier for long long int" >&5
13315 $as_echo_n "checking snprintf length modifier for long long int... " >&6; }
13316 if ${pgac_cv_snprintf_long_long_int_modifier+:} false; then :
13317   $as_echo_n "(cached) " >&6
13318 else
13319   for pgac_modifier in 'll' 'q' 'I64'; do
13320 if test "$cross_compiling" = yes; then :
13321   pgac_cv_snprintf_long_long_int_modifier=cross; break
13322 else
13323   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13324 /* end confdefs.h.  */
13325 #include <stdio.h>
13326 typedef long long int ac_int64;
13327 #define INT64_FORMAT "%${pgac_modifier}d"
13328
13329 ac_int64 a = 20000001;
13330 ac_int64 b = 40000005;
13331
13332 int does_int64_snprintf_work()
13333 {
13334   ac_int64 c;
13335   char buf[100];
13336
13337   if (sizeof(ac_int64) != 8)
13338     return 0;                   /* doesn't look like the right size */
13339
13340   c = a * b;
13341   snprintf(buf, 100, INT64_FORMAT, c);
13342   if (strcmp(buf, "800000140000005") != 0)
13343     return 0;                   /* either multiply or snprintf is busted */
13344   return 1;
13345 }
13346 main() {
13347   exit(! does_int64_snprintf_work());
13348 }
13349 _ACEOF
13350 if ac_fn_c_try_run "$LINENO"; then :
13351   pgac_cv_snprintf_long_long_int_modifier=$pgac_modifier; break
13352 fi
13353 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13354   conftest.$ac_objext conftest.beam conftest.$ac_ext
13355 fi
13356
13357 done
13358 fi
13359
13360 LONG_LONG_INT_MODIFIER=''
13361
13362 case $pgac_cv_snprintf_long_long_int_modifier in
13363   cross) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot test (not on host machine)" >&5
13364 $as_echo "cannot test (not on host machine)" >&6; };;
13365   ?*)    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_long_long_int_modifier" >&5
13366 $as_echo "$pgac_cv_snprintf_long_long_int_modifier" >&6; }
13367          LONG_LONG_INT_MODIFIER=$pgac_cv_snprintf_long_long_int_modifier;;
13368   *)     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13369 $as_echo "none" >&6; };;
13370 esac
13371     if test "$LONG_LONG_INT_MODIFIER" = ""; then
13372       # Force usage of our own snprintf, since system snprintf is broken
13373       pgac_need_repl_snprintf=yes
13374       LONG_LONG_INT_MODIFIER='ll'
13375     fi
13376   else
13377     # Here if we previously decided we needed to use our own snprintf
13378     LONG_LONG_INT_MODIFIER='ll'
13379   fi
13380 else
13381   # Here if we are not using 'long long int' at all
13382   LONG_LONG_INT_MODIFIER='l'
13383 fi
13384
13385 INT64_MODIFIER="\"$LONG_LONG_INT_MODIFIER\""
13386
13387
13388 cat >>confdefs.h <<_ACEOF
13389 #define INT64_MODIFIER $INT64_MODIFIER
13390 _ACEOF
13391
13392
13393 # Also force use of our snprintf if the system's doesn't support the %z flag.
13394 if test "$pgac_need_repl_snprintf" = no; then
13395   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports the %z modifier" >&5
13396 $as_echo_n "checking whether snprintf supports the %z modifier... " >&6; }
13397 if ${pgac_cv_snprintf_size_t_support+:} false; then :
13398   $as_echo_n "(cached) " >&6
13399 else
13400   if test "$cross_compiling" = yes; then :
13401   pgac_cv_snprintf_size_t_support=cross
13402 else
13403   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13404 /* end confdefs.h.  */
13405 #include <stdio.h>
13406 #include <string.h>
13407
13408 int main()
13409 {
13410   char bufz[100];
13411   char buf64[100];
13412
13413   /*
13414    * Print the largest unsigned number fitting in a size_t using both %zu
13415    * and the previously-determined format for 64-bit integers.  Note that
13416    * we don't run this code unless we know snprintf handles 64-bit ints.
13417    */
13418   bufz[0] = '\0';  /* in case snprintf fails to emit anything */
13419   snprintf(bufz, sizeof(bufz), "%zu", ~((size_t) 0));
13420   snprintf(buf64, sizeof(buf64), "%" INT64_MODIFIER "u",
13421     (unsigned PG_INT64_TYPE) ~((size_t) 0));
13422   if (strcmp(bufz, buf64) != 0)
13423     return 1;
13424   return 0;
13425 }
13426 _ACEOF
13427 if ac_fn_c_try_run "$LINENO"; then :
13428   pgac_cv_snprintf_size_t_support=yes
13429 else
13430   pgac_cv_snprintf_size_t_support=no
13431 fi
13432 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13433   conftest.$ac_objext conftest.beam conftest.$ac_ext
13434 fi
13435
13436
13437 fi
13438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_size_t_support" >&5
13439 $as_echo "$pgac_cv_snprintf_size_t_support" >&6; }
13440
13441   if test "$pgac_cv_snprintf_size_t_support" != yes; then
13442     pgac_need_repl_snprintf=yes
13443   fi
13444 fi
13445
13446 # Now we have checked all the reasons to replace snprintf
13447 if test $pgac_need_repl_snprintf = yes; then
13448
13449 $as_echo "#define USE_REPL_SNPRINTF 1" >>confdefs.h
13450
13451   case " $LIBOBJS " in
13452   *" snprintf.$ac_objext "* ) ;;
13453   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
13454  ;;
13455 esac
13456
13457 fi
13458
13459 # Check size of void *, size_t (enables tweaks for > 32bit address space)
13460 # The cast to long int works around a bug in the HP C Compiler
13461 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13462 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13463 # This bug is HP SR number 8606223364.
13464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
13465 $as_echo_n "checking size of void *... " >&6; }
13466 if ${ac_cv_sizeof_void_p+:} false; then :
13467   $as_echo_n "(cached) " >&6
13468 else
13469   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
13470
13471 else
13472   if test "$ac_cv_type_void_p" = yes; then
13473      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13474 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13475 as_fn_error 77 "cannot compute sizeof (void *)
13476 See \`config.log' for more details" "$LINENO" 5; }
13477    else
13478      ac_cv_sizeof_void_p=0
13479    fi
13480 fi
13481
13482 fi
13483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
13484 $as_echo "$ac_cv_sizeof_void_p" >&6; }
13485
13486
13487
13488 cat >>confdefs.h <<_ACEOF
13489 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
13490 _ACEOF
13491
13492
13493 # The cast to long int works around a bug in the HP C Compiler
13494 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13495 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13496 # This bug is HP SR number 8606223364.
13497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
13498 $as_echo_n "checking size of size_t... " >&6; }
13499 if ${ac_cv_sizeof_size_t+:} false; then :
13500   $as_echo_n "(cached) " >&6
13501 else
13502   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
13503
13504 else
13505   if test "$ac_cv_type_size_t" = yes; then
13506      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13507 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13508 as_fn_error 77 "cannot compute sizeof (size_t)
13509 See \`config.log' for more details" "$LINENO" 5; }
13510    else
13511      ac_cv_sizeof_size_t=0
13512    fi
13513 fi
13514
13515 fi
13516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
13517 $as_echo "$ac_cv_sizeof_size_t" >&6; }
13518
13519
13520
13521 cat >>confdefs.h <<_ACEOF
13522 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
13523 _ACEOF
13524
13525
13526 # The cast to long int works around a bug in the HP C Compiler
13527 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13528 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13529 # This bug is HP SR number 8606223364.
13530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
13531 $as_echo_n "checking size of long... " >&6; }
13532 if ${ac_cv_sizeof_long+:} false; then :
13533   $as_echo_n "(cached) " >&6
13534 else
13535   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
13536
13537 else
13538   if test "$ac_cv_type_long" = yes; then
13539      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13540 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13541 as_fn_error 77 "cannot compute sizeof (long)
13542 See \`config.log' for more details" "$LINENO" 5; }
13543    else
13544      ac_cv_sizeof_long=0
13545    fi
13546 fi
13547
13548 fi
13549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
13550 $as_echo "$ac_cv_sizeof_long" >&6; }
13551
13552
13553
13554 cat >>confdefs.h <<_ACEOF
13555 #define SIZEOF_LONG $ac_cv_sizeof_long
13556 _ACEOF
13557
13558
13559
13560 # Decide whether float4 is passed by value: user-selectable, enabled by default
13561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float4 passed by value" >&5
13562 $as_echo_n "checking whether to build with float4 passed by value... " >&6; }
13563
13564
13565 # Check whether --enable-float4-byval was given.
13566 if test "${enable_float4_byval+set}" = set; then :
13567   enableval=$enable_float4_byval;
13568   case $enableval in
13569     yes)
13570
13571 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
13572
13573                float4passbyval=true
13574       ;;
13575     no)
13576       float4passbyval=false
13577       ;;
13578     *)
13579       as_fn_error $? "no argument expected for --enable-float4-byval option" "$LINENO" 5
13580       ;;
13581   esac
13582
13583 else
13584   enable_float4_byval=yes
13585
13586 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
13587
13588                float4passbyval=true
13589 fi
13590
13591
13592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float4_byval" >&5
13593 $as_echo "$enable_float4_byval" >&6; }
13594
13595 cat >>confdefs.h <<_ACEOF
13596 #define FLOAT4PASSBYVAL $float4passbyval
13597 _ACEOF
13598
13599
13600 # Decide whether float8 is passed by value.
13601 # Note: this setting also controls int8 and related types such as timestamp.
13602 # If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
13603 # If not, trying to select it is an error.
13604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float8 passed by value" >&5
13605 $as_echo_n "checking whether to build with float8 passed by value... " >&6; }
13606 if test $ac_cv_sizeof_void_p -ge 8 ; then
13607
13608
13609 # Check whether --enable-float8-byval was given.
13610 if test "${enable_float8_byval+set}" = set; then :
13611   enableval=$enable_float8_byval;
13612   case $enableval in
13613     yes)
13614       :
13615       ;;
13616     no)
13617       :
13618       ;;
13619     *)
13620       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
13621       ;;
13622   esac
13623
13624 else
13625   enable_float8_byval=yes
13626
13627 fi
13628
13629
13630 else
13631
13632
13633 # Check whether --enable-float8-byval was given.
13634 if test "${enable_float8_byval+set}" = set; then :
13635   enableval=$enable_float8_byval;
13636   case $enableval in
13637     yes)
13638       :
13639       ;;
13640     no)
13641       :
13642       ;;
13643     *)
13644       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
13645       ;;
13646   esac
13647
13648 else
13649   enable_float8_byval=no
13650
13651 fi
13652
13653
13654   if test "$enable_float8_byval" = yes ; then
13655     as_fn_error $? "--enable-float8-byval is not supported on 32-bit platforms." "$LINENO" 5
13656   fi
13657 fi
13658 if test "$enable_float8_byval" = yes ; then
13659
13660 $as_echo "#define USE_FLOAT8_BYVAL 1" >>confdefs.h
13661
13662   float8passbyval=true
13663 else
13664   float8passbyval=false
13665 fi
13666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float8_byval" >&5
13667 $as_echo "$enable_float8_byval" >&6; }
13668
13669 cat >>confdefs.h <<_ACEOF
13670 #define FLOAT8PASSBYVAL $float8passbyval
13671 _ACEOF
13672
13673
13674 # Determine memory alignment requirements for the basic C data types.
13675
13676 # The cast to long int works around a bug in the HP C Compiler,
13677 # see AC_CHECK_SIZEOF for more information.
13678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
13679 $as_echo_n "checking alignment of short... " >&6; }
13680 if ${ac_cv_alignof_short+:} false; then :
13681   $as_echo_n "(cached) " >&6
13682 else
13683   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short"        "$ac_includes_default
13684 #ifndef offsetof
13685 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13686 #endif
13687 typedef struct { char x; short y; } ac__type_alignof_;"; then :
13688
13689 else
13690   if test "$ac_cv_type_short" = yes; then
13691      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13692 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13693 as_fn_error 77 "cannot compute alignment of short
13694 See \`config.log' for more details" "$LINENO" 5; }
13695    else
13696      ac_cv_alignof_short=0
13697    fi
13698 fi
13699
13700 fi
13701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
13702 $as_echo "$ac_cv_alignof_short" >&6; }
13703
13704
13705
13706 cat >>confdefs.h <<_ACEOF
13707 #define ALIGNOF_SHORT $ac_cv_alignof_short
13708 _ACEOF
13709
13710
13711 # The cast to long int works around a bug in the HP C Compiler,
13712 # see AC_CHECK_SIZEOF for more information.
13713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
13714 $as_echo_n "checking alignment of int... " >&6; }
13715 if ${ac_cv_alignof_int+:} false; then :
13716   $as_echo_n "(cached) " >&6
13717 else
13718   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int"        "$ac_includes_default
13719 #ifndef offsetof
13720 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13721 #endif
13722 typedef struct { char x; int y; } ac__type_alignof_;"; then :
13723
13724 else
13725   if test "$ac_cv_type_int" = yes; then
13726      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13727 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13728 as_fn_error 77 "cannot compute alignment of int
13729 See \`config.log' for more details" "$LINENO" 5; }
13730    else
13731      ac_cv_alignof_int=0
13732    fi
13733 fi
13734
13735 fi
13736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
13737 $as_echo "$ac_cv_alignof_int" >&6; }
13738
13739
13740
13741 cat >>confdefs.h <<_ACEOF
13742 #define ALIGNOF_INT $ac_cv_alignof_int
13743 _ACEOF
13744
13745
13746 # The cast to long int works around a bug in the HP C Compiler,
13747 # see AC_CHECK_SIZEOF for more information.
13748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
13749 $as_echo_n "checking alignment of long... " >&6; }
13750 if ${ac_cv_alignof_long+:} false; then :
13751   $as_echo_n "(cached) " >&6
13752 else
13753   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long"        "$ac_includes_default
13754 #ifndef offsetof
13755 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13756 #endif
13757 typedef struct { char x; long y; } ac__type_alignof_;"; then :
13758
13759 else
13760   if test "$ac_cv_type_long" = yes; then
13761      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13762 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13763 as_fn_error 77 "cannot compute alignment of long
13764 See \`config.log' for more details" "$LINENO" 5; }
13765    else
13766      ac_cv_alignof_long=0
13767    fi
13768 fi
13769
13770 fi
13771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
13772 $as_echo "$ac_cv_alignof_long" >&6; }
13773
13774
13775
13776 cat >>confdefs.h <<_ACEOF
13777 #define ALIGNOF_LONG $ac_cv_alignof_long
13778 _ACEOF
13779
13780
13781 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
13782   # The cast to long int works around a bug in the HP C Compiler,
13783 # see AC_CHECK_SIZEOF for more information.
13784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
13785 $as_echo_n "checking alignment of long long int... " >&6; }
13786 if ${ac_cv_alignof_long_long_int+:} false; then :
13787   $as_echo_n "(cached) " >&6
13788 else
13789   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int"        "$ac_includes_default
13790 #ifndef offsetof
13791 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13792 #endif
13793 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
13794
13795 else
13796   if test "$ac_cv_type_long_long_int" = yes; then
13797      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13798 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13799 as_fn_error 77 "cannot compute alignment of long long int
13800 See \`config.log' for more details" "$LINENO" 5; }
13801    else
13802      ac_cv_alignof_long_long_int=0
13803    fi
13804 fi
13805
13806 fi
13807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
13808 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
13809
13810
13811
13812 cat >>confdefs.h <<_ACEOF
13813 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
13814 _ACEOF
13815
13816
13817 fi
13818 # The cast to long int works around a bug in the HP C Compiler,
13819 # see AC_CHECK_SIZEOF for more information.
13820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
13821 $as_echo_n "checking alignment of double... " >&6; }
13822 if ${ac_cv_alignof_double+:} false; then :
13823   $as_echo_n "(cached) " >&6
13824 else
13825   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double"        "$ac_includes_default
13826 #ifndef offsetof
13827 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13828 #endif
13829 typedef struct { char x; double y; } ac__type_alignof_;"; then :
13830
13831 else
13832   if test "$ac_cv_type_double" = yes; then
13833      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13834 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13835 as_fn_error 77 "cannot compute alignment of double
13836 See \`config.log' for more details" "$LINENO" 5; }
13837    else
13838      ac_cv_alignof_double=0
13839    fi
13840 fi
13841
13842 fi
13843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
13844 $as_echo "$ac_cv_alignof_double" >&6; }
13845
13846
13847
13848 cat >>confdefs.h <<_ACEOF
13849 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
13850 _ACEOF
13851
13852
13853
13854 # Compute maximum alignment of any basic type.
13855 # We assume long's alignment is at least as strong as char, short, or int;
13856 # but we must check long long (if it exists) and double.
13857
13858 MAX_ALIGNOF=$ac_cv_alignof_long
13859 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
13860   MAX_ALIGNOF=$ac_cv_alignof_double
13861 fi
13862 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
13863   MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
13864 fi
13865
13866 cat >>confdefs.h <<_ACEOF
13867 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
13868 _ACEOF
13869
13870
13871
13872 # Some platforms predefine the types int8, int16, etc.  Only check
13873 # a (hopefully) representative subset.
13874 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
13875 "
13876 if test "x$ac_cv_type_int8" = xyes; then :
13877
13878 cat >>confdefs.h <<_ACEOF
13879 #define HAVE_INT8 1
13880 _ACEOF
13881
13882
13883 fi
13884 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
13885 "
13886 if test "x$ac_cv_type_uint8" = xyes; then :
13887
13888 cat >>confdefs.h <<_ACEOF
13889 #define HAVE_UINT8 1
13890 _ACEOF
13891
13892
13893 fi
13894 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
13895 "
13896 if test "x$ac_cv_type_int64" = xyes; then :
13897
13898 cat >>confdefs.h <<_ACEOF
13899 #define HAVE_INT64 1
13900 _ACEOF
13901
13902
13903 fi
13904 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
13905 "
13906 if test "x$ac_cv_type_uint64" = xyes; then :
13907
13908 cat >>confdefs.h <<_ACEOF
13909 #define HAVE_UINT64 1
13910 _ACEOF
13911
13912
13913 fi
13914
13915
13916 # We also check for sig_atomic_t, which *should* be defined per ANSI
13917 # C, but is missing on some old platforms.
13918 ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "#include <signal.h>
13919 "
13920 if test "x$ac_cv_type_sig_atomic_t" = xyes; then :
13921
13922 cat >>confdefs.h <<_ACEOF
13923 #define HAVE_SIG_ATOMIC_T 1
13924 _ACEOF
13925
13926
13927 fi
13928
13929
13930 # Check for extensions offering the integer scalar type __int128.
13931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
13932 $as_echo_n "checking for __int128... " >&6; }
13933 if ${pgac_cv__128bit_int+:} false; then :
13934   $as_echo_n "(cached) " >&6
13935 else
13936   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13937 /* end confdefs.h.  */
13938
13939 /*
13940  * These are globals to discourage the compiler from folding all the
13941  * arithmetic tests down to compile-time constants.  We do not have
13942  * convenient support for 64bit literals at this point...
13943  */
13944 __int128 a = 48828125;
13945 __int128 b = 97656255;
13946
13947 int
13948 main ()
13949 {
13950
13951 __int128 c,d;
13952 a = (a << 12) + 1; /* 200000000001 */
13953 b = (b << 12) + 5; /* 400000000005 */
13954 /* use the most relevant arithmetic ops */
13955 c = a * b;
13956 d = (c + b) / b;
13957 /* return different values, to prevent optimizations */
13958 if (d != a+1)
13959   return 0;
13960 return 1;
13961
13962   ;
13963   return 0;
13964 }
13965 _ACEOF
13966 if ac_fn_c_try_link "$LINENO"; then :
13967   pgac_cv__128bit_int=yes
13968 else
13969   pgac_cv__128bit_int=no
13970 fi
13971 rm -f core conftest.err conftest.$ac_objext \
13972     conftest$ac_exeext conftest.$ac_ext
13973 fi
13974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
13975 $as_echo "$pgac_cv__128bit_int" >&6; }
13976 if test x"$pgac_cv__128bit_int" = xyes ; then
13977
13978 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
13979
13980 fi
13981
13982 # Check for various atomic operations now that we have checked how to declare
13983 # 64bit integers.
13984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
13985 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
13986 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
13987   $as_echo_n "(cached) " >&6
13988 else
13989   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13990 /* end confdefs.h.  */
13991
13992 int
13993 main ()
13994 {
13995 char lock = 0;
13996    __sync_lock_test_and_set(&lock, 1);
13997    __sync_lock_release(&lock);
13998   ;
13999   return 0;
14000 }
14001 _ACEOF
14002 if ac_fn_c_try_link "$LINENO"; then :
14003   pgac_cv_gcc_sync_char_tas="yes"
14004 else
14005   pgac_cv_gcc_sync_char_tas="no"
14006 fi
14007 rm -f core conftest.err conftest.$ac_objext \
14008     conftest$ac_exeext conftest.$ac_ext
14009 fi
14010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
14011 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
14012 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
14013
14014 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
14015
14016 fi
14017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
14018 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
14019 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
14020   $as_echo_n "(cached) " >&6
14021 else
14022   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14023 /* end confdefs.h.  */
14024
14025 int
14026 main ()
14027 {
14028 int lock = 0;
14029    __sync_lock_test_and_set(&lock, 1);
14030    __sync_lock_release(&lock);
14031   ;
14032   return 0;
14033 }
14034 _ACEOF
14035 if ac_fn_c_try_link "$LINENO"; then :
14036   pgac_cv_gcc_sync_int32_tas="yes"
14037 else
14038   pgac_cv_gcc_sync_int32_tas="no"
14039 fi
14040 rm -f core conftest.err conftest.$ac_objext \
14041     conftest$ac_exeext conftest.$ac_ext
14042 fi
14043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
14044 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
14045 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
14046
14047 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
14048
14049 fi
14050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
14051 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
14052 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
14053   $as_echo_n "(cached) " >&6
14054 else
14055   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14056 /* end confdefs.h.  */
14057
14058 int
14059 main ()
14060 {
14061 int val = 0;
14062    __sync_val_compare_and_swap(&val, 0, 37);
14063   ;
14064   return 0;
14065 }
14066 _ACEOF
14067 if ac_fn_c_try_link "$LINENO"; then :
14068   pgac_cv_gcc_sync_int32_cas="yes"
14069 else
14070   pgac_cv_gcc_sync_int32_cas="no"
14071 fi
14072 rm -f core conftest.err conftest.$ac_objext \
14073     conftest$ac_exeext conftest.$ac_ext
14074 fi
14075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
14076 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
14077 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
14078
14079 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
14080
14081 fi
14082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
14083 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
14084 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
14085   $as_echo_n "(cached) " >&6
14086 else
14087   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14088 /* end confdefs.h.  */
14089
14090 int
14091 main ()
14092 {
14093 PG_INT64_TYPE lock = 0;
14094    __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
14095   ;
14096   return 0;
14097 }
14098 _ACEOF
14099 if ac_fn_c_try_link "$LINENO"; then :
14100   pgac_cv_gcc_sync_int64_cas="yes"
14101 else
14102   pgac_cv_gcc_sync_int64_cas="no"
14103 fi
14104 rm -f core conftest.err conftest.$ac_objext \
14105     conftest$ac_exeext conftest.$ac_ext
14106 fi
14107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
14108 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
14109 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
14110
14111 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
14112
14113 fi
14114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
14115 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
14116 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
14117   $as_echo_n "(cached) " >&6
14118 else
14119   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14120 /* end confdefs.h.  */
14121
14122 int
14123 main ()
14124 {
14125 int val = 0;
14126    int expect = 0;
14127    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
14128   ;
14129   return 0;
14130 }
14131 _ACEOF
14132 if ac_fn_c_try_link "$LINENO"; then :
14133   pgac_cv_gcc_atomic_int32_cas="yes"
14134 else
14135   pgac_cv_gcc_atomic_int32_cas="no"
14136 fi
14137 rm -f core conftest.err conftest.$ac_objext \
14138     conftest$ac_exeext conftest.$ac_ext
14139 fi
14140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
14141 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
14142 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
14143
14144 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
14145
14146 fi
14147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
14148 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
14149 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
14150   $as_echo_n "(cached) " >&6
14151 else
14152   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14153 /* end confdefs.h.  */
14154
14155 int
14156 main ()
14157 {
14158 PG_INT64_TYPE val = 0;
14159    PG_INT64_TYPE expect = 0;
14160    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
14161   ;
14162   return 0;
14163 }
14164 _ACEOF
14165 if ac_fn_c_try_link "$LINENO"; then :
14166   pgac_cv_gcc_atomic_int64_cas="yes"
14167 else
14168   pgac_cv_gcc_atomic_int64_cas="no"
14169 fi
14170 rm -f core conftest.err conftest.$ac_objext \
14171     conftest$ac_exeext conftest.$ac_ext
14172 fi
14173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
14174 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
14175 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
14176
14177 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
14178
14179 fi
14180
14181
14182 # Check for x86 cpuid instruction
14183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
14184 $as_echo_n "checking for __get_cpuid... " >&6; }
14185 if ${pgac_cv__get_cpuid+:} false; then :
14186   $as_echo_n "(cached) " >&6
14187 else
14188   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14189 /* end confdefs.h.  */
14190 #include <cpuid.h>
14191 int
14192 main ()
14193 {
14194 unsigned int exx[4] = {0, 0, 0, 0};
14195   __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
14196
14197   ;
14198   return 0;
14199 }
14200 _ACEOF
14201 if ac_fn_c_try_link "$LINENO"; then :
14202   pgac_cv__get_cpuid="yes"
14203 else
14204   pgac_cv__get_cpuid="no"
14205 fi
14206 rm -f core conftest.err conftest.$ac_objext \
14207     conftest$ac_exeext conftest.$ac_ext
14208 fi
14209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
14210 $as_echo "$pgac_cv__get_cpuid" >&6; }
14211 if test x"$pgac_cv__get_cpuid" = x"yes"; then
14212
14213 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
14214
14215 fi
14216
14217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
14218 $as_echo_n "checking for __cpuid... " >&6; }
14219 if ${pgac_cv__cpuid+:} false; then :
14220   $as_echo_n "(cached) " >&6
14221 else
14222   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14223 /* end confdefs.h.  */
14224 #include <intrin.h>
14225 int
14226 main ()
14227 {
14228 unsigned int exx[4] = {0, 0, 0, 0};
14229   __get_cpuid(exx[0], 1);
14230
14231   ;
14232   return 0;
14233 }
14234 _ACEOF
14235 if ac_fn_c_try_link "$LINENO"; then :
14236   pgac_cv__cpuid="yes"
14237 else
14238   pgac_cv__cpuid="no"
14239 fi
14240 rm -f core conftest.err conftest.$ac_objext \
14241     conftest$ac_exeext conftest.$ac_ext
14242 fi
14243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
14244 $as_echo "$pgac_cv__cpuid" >&6; }
14245 if test x"$pgac_cv__cpuid" = x"yes"; then
14246
14247 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
14248
14249 fi
14250
14251 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
14252 #
14253 # First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
14254 # with the default compiler flags. If not, check if adding the -msse4.2
14255 # flag helps. CFLAGS_SSE42 is set to -msse4.2 if that's required.
14256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
14257 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
14258 if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
14259   $as_echo_n "(cached) " >&6
14260 else
14261   pgac_save_CFLAGS=$CFLAGS
14262 CFLAGS="$pgac_save_CFLAGS "
14263 ac_save_c_werror_flag=$ac_c_werror_flag
14264 ac_c_werror_flag=yes
14265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14266 /* end confdefs.h.  */
14267 #include <nmmintrin.h>
14268 int
14269 main ()
14270 {
14271 unsigned int crc = 0;
14272    crc = _mm_crc32_u8(crc, 0);
14273    crc = _mm_crc32_u32(crc, 0);
14274   ;
14275   return 0;
14276 }
14277 _ACEOF
14278 if ac_fn_c_try_link "$LINENO"; then :
14279   pgac_cv_sse42_crc32_intrinsics_=yes
14280 else
14281   pgac_cv_sse42_crc32_intrinsics_=no
14282 fi
14283 rm -f core conftest.err conftest.$ac_objext \
14284     conftest$ac_exeext conftest.$ac_ext
14285 ac_c_werror_flag=$ac_save_c_werror_flag
14286 CFLAGS="$pgac_save_CFLAGS"
14287 fi
14288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
14289 $as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
14290 if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
14291   CFLAGS_SSE42=""
14292   pgac_sse42_crc32_intrinsics=yes
14293 fi
14294
14295 if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
14296   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
14297 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
14298 if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
14299   $as_echo_n "(cached) " >&6
14300 else
14301   pgac_save_CFLAGS=$CFLAGS
14302 CFLAGS="$pgac_save_CFLAGS -msse4.2"
14303 ac_save_c_werror_flag=$ac_c_werror_flag
14304 ac_c_werror_flag=yes
14305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14306 /* end confdefs.h.  */
14307 #include <nmmintrin.h>
14308 int
14309 main ()
14310 {
14311 unsigned int crc = 0;
14312    crc = _mm_crc32_u8(crc, 0);
14313    crc = _mm_crc32_u32(crc, 0);
14314   ;
14315   return 0;
14316 }
14317 _ACEOF
14318 if ac_fn_c_try_link "$LINENO"; then :
14319   pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
14320 else
14321   pgac_cv_sse42_crc32_intrinsics__msse4_2=no
14322 fi
14323 rm -f core conftest.err conftest.$ac_objext \
14324     conftest$ac_exeext conftest.$ac_ext
14325 ac_c_werror_flag=$ac_save_c_werror_flag
14326 CFLAGS="$pgac_save_CFLAGS"
14327 fi
14328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
14329 $as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
14330 if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
14331   CFLAGS_SSE42="-msse4.2"
14332   pgac_sse42_crc32_intrinsics=yes
14333 fi
14334
14335 fi
14336
14337
14338 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
14339 # define __SSE4_2__ in that case.
14340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14341 /* end confdefs.h.  */
14342
14343 int
14344 main ()
14345 {
14346
14347 #ifndef __SSE4_2__
14348 #error __SSE4_2__ not defined
14349 #endif
14350
14351   ;
14352   return 0;
14353 }
14354 _ACEOF
14355 if ac_fn_c_try_compile "$LINENO"; then :
14356   SSE4_2_TARGETED=1
14357 fi
14358 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14359
14360 # Select CRC-32C implementation.
14361 #
14362 # If we are targeting a processor that has SSE 4.2 instructions, we can use the
14363 # special CRC instructions for calculating CRC-32C. If we're not targeting such
14364 # a processor, but we can nevertheless produce code that uses the SSE
14365 # intrinsics, perhaps with some extra CFLAGS, compile both implementations and
14366 # select which one to use at runtime, depending on whether SSE 4.2 is supported
14367 # by the processor we're running on.
14368 #
14369 # You can override this logic by setting the appropriate USE_*_CRC32 flag to 1
14370 # in the template or configure command line.
14371 if test x"$USE_SSE42_CRC32C" = x"" && test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"" && test x"$USE_SLICING_BY_8_CRC32C" = x""; then
14372   if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
14373     USE_SSE42_CRC32C=1
14374   else
14375     # the CPUID instruction is needed for the runtime check.
14376     if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && (test x"$pgac_cv__get_cpuid" = x"yes" || test x"$pgac_cv__cpuid" = x"yes"); then
14377       USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
14378     else
14379       # fall back to slicing-by-8 algorithm which doesn't require any special
14380       # CPU support.
14381       USE_SLICING_BY_8_CRC32C=1
14382     fi
14383   fi
14384 fi
14385
14386 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
14387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
14388 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
14389 if test x"$USE_SSE42_CRC32C" = x"1"; then
14390
14391 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
14392
14393   PG_CRC32C_OBJS="pg_crc32c_sse42.o"
14394   { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
14395 $as_echo "SSE 4.2" >&6; }
14396 else
14397   if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
14398
14399 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
14400
14401     PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_choose.o"
14402     { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
14403 $as_echo "SSE 4.2 with runtime check" >&6; }
14404   else
14405
14406 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
14407
14408     PG_CRC32C_OBJS="pg_crc32c_sb8.o"
14409     { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
14410 $as_echo "slicing-by-8" >&6; }
14411   fi
14412 fi
14413
14414
14415
14416 # Check that POSIX signals are available if thread safety is enabled.
14417 if test "$PORTNAME" != "win32"
14418 then
14419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for POSIX signal interface" >&5
14420 $as_echo_n "checking for POSIX signal interface... " >&6; }
14421 if ${pgac_cv_func_posix_signals+:} false; then :
14422   $as_echo_n "(cached) " >&6
14423 else
14424   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14425 /* end confdefs.h.  */
14426 #include <signal.h>
14427
14428 int
14429 main ()
14430 {
14431 struct sigaction act, oact;
14432 sigemptyset(&act.sa_mask);
14433 act.sa_flags = SA_RESTART;
14434 sigaction(0, &act, &oact);
14435   ;
14436   return 0;
14437 }
14438 _ACEOF
14439 if ac_fn_c_try_link "$LINENO"; then :
14440   pgac_cv_func_posix_signals=yes
14441 else
14442   pgac_cv_func_posix_signals=no
14443 fi
14444 rm -f core conftest.err conftest.$ac_objext \
14445     conftest$ac_exeext conftest.$ac_ext
14446 fi
14447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_posix_signals" >&5
14448 $as_echo "$pgac_cv_func_posix_signals" >&6; }
14449 if test x"$pgac_cv_func_posix_signals" = xyes ; then
14450
14451 $as_echo "#define HAVE_POSIX_SIGNALS 1" >>confdefs.h
14452
14453 fi
14454 HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
14455
14456 if test "$pgac_cv_func_posix_signals" != yes -a "$enable_thread_safety" = yes; then
14457   as_fn_error $? "
14458 Thread-safety requires POSIX signals, which are not supported by this
14459 operating system;  use --disable-thread-safety to disable thread safety." "$LINENO" 5
14460 fi
14461 fi
14462
14463
14464 # Select semaphore implementation type.
14465 if test "$PORTNAME" != "win32"; then
14466   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
14467
14468 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
14469
14470     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
14471   else
14472     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
14473
14474 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
14475
14476       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
14477     else
14478
14479 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
14480
14481       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
14482     fi
14483   fi
14484 else
14485
14486 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
14487
14488   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
14489 fi
14490
14491
14492 # Select shared-memory implementation type.
14493 if test "$PORTNAME" != "win32"; then
14494
14495 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
14496
14497   SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
14498 else
14499
14500 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
14501
14502   SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
14503 fi
14504
14505 # Select latch implementation type.
14506 if test "$PORTNAME" != "win32"; then
14507   LATCH_IMPLEMENTATION="src/backend/port/unix_latch.c"
14508 else
14509   LATCH_IMPLEMENTATION="src/backend/port/win32_latch.c"
14510 fi
14511
14512 # If not set in template file, set bytes to use libc memset()
14513 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
14514   MEMSET_LOOP_LIMIT=1024
14515 fi
14516
14517 cat >>confdefs.h <<_ACEOF
14518 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
14519 _ACEOF
14520
14521
14522
14523 if test "$enable_nls" = yes ; then
14524
14525   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
14526 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
14527 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
14528   $as_echo_n "(cached) " >&6
14529 else
14530   ac_func_search_save_LIBS=$LIBS
14531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14532 /* end confdefs.h.  */
14533
14534 /* Override any GCC internal prototype to avoid an error.
14535    Use char because int might match the return type of a GCC
14536    builtin and then its argument prototype would still apply.  */
14537 #ifdef __cplusplus
14538 extern "C"
14539 #endif
14540 char bind_textdomain_codeset ();
14541 int
14542 main ()
14543 {
14544 return bind_textdomain_codeset ();
14545   ;
14546   return 0;
14547 }
14548 _ACEOF
14549 for ac_lib in '' intl; do
14550   if test -z "$ac_lib"; then
14551     ac_res="none required"
14552   else
14553     ac_res=-l$ac_lib
14554     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14555   fi
14556   if ac_fn_c_try_link "$LINENO"; then :
14557   ac_cv_search_bind_textdomain_codeset=$ac_res
14558 fi
14559 rm -f core conftest.err conftest.$ac_objext \
14560     conftest$ac_exeext
14561   if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
14562   break
14563 fi
14564 done
14565 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
14566
14567 else
14568   ac_cv_search_bind_textdomain_codeset=no
14569 fi
14570 rm conftest.$ac_ext
14571 LIBS=$ac_func_search_save_LIBS
14572 fi
14573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
14574 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
14575 ac_res=$ac_cv_search_bind_textdomain_codeset
14576 if test "$ac_res" != no; then :
14577   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14578
14579 else
14580   as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
14581 fi
14582
14583   ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
14584 if test "x$ac_cv_header_libintl_h" = xyes; then :
14585
14586 else
14587   as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
14588 fi
14589
14590
14591   for ac_prog in msgfmt
14592 do
14593   # Extract the first word of "$ac_prog", so it can be a program name with args.
14594 set dummy $ac_prog; ac_word=$2
14595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14596 $as_echo_n "checking for $ac_word... " >&6; }
14597 if ${ac_cv_prog_MSGFMT+:} false; then :
14598   $as_echo_n "(cached) " >&6
14599 else
14600   if test -n "$MSGFMT"; then
14601   ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
14602 else
14603 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14604 for as_dir in $PATH
14605 do
14606   IFS=$as_save_IFS
14607   test -z "$as_dir" && as_dir=.
14608     for ac_exec_ext in '' $ac_executable_extensions; do
14609   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14610     ac_cv_prog_MSGFMT="$ac_prog"
14611     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14612     break 2
14613   fi
14614 done
14615   done
14616 IFS=$as_save_IFS
14617
14618 fi
14619 fi
14620 MSGFMT=$ac_cv_prog_MSGFMT
14621 if test -n "$MSGFMT"; then
14622   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
14623 $as_echo "$MSGFMT" >&6; }
14624 else
14625   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14626 $as_echo "no" >&6; }
14627 fi
14628
14629
14630   test -n "$MSGFMT" && break
14631 done
14632
14633   if test -z "$MSGFMT"; then
14634     as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
14635   fi
14636   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
14637 $as_echo_n "checking for msgfmt flags... " >&6; }
14638 if ${pgac_cv_msgfmt_flags+:} false; then :
14639   $as_echo_n "(cached) " >&6
14640 else
14641   if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
14642     pgac_cv_msgfmt_flags=-c
14643 fi
14644 fi
14645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
14646 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
14647   MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
14648
14649   for ac_prog in msgmerge
14650 do
14651   # Extract the first word of "$ac_prog", so it can be a program name with args.
14652 set dummy $ac_prog; ac_word=$2
14653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14654 $as_echo_n "checking for $ac_word... " >&6; }
14655 if ${ac_cv_prog_MSGMERGE+:} false; then :
14656   $as_echo_n "(cached) " >&6
14657 else
14658   if test -n "$MSGMERGE"; then
14659   ac_cv_prog_MSGMERGE="$MSGMERGE" # Let the user override the test.
14660 else
14661 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14662 for as_dir in $PATH
14663 do
14664   IFS=$as_save_IFS
14665   test -z "$as_dir" && as_dir=.
14666     for ac_exec_ext in '' $ac_executable_extensions; do
14667   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14668     ac_cv_prog_MSGMERGE="$ac_prog"
14669     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14670     break 2
14671   fi
14672 done
14673   done
14674 IFS=$as_save_IFS
14675
14676 fi
14677 fi
14678 MSGMERGE=$ac_cv_prog_MSGMERGE
14679 if test -n "$MSGMERGE"; then
14680   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
14681 $as_echo "$MSGMERGE" >&6; }
14682 else
14683   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14684 $as_echo "no" >&6; }
14685 fi
14686
14687
14688   test -n "$MSGMERGE" && break
14689 done
14690
14691   for ac_prog in xgettext
14692 do
14693   # Extract the first word of "$ac_prog", so it can be a program name with args.
14694 set dummy $ac_prog; ac_word=$2
14695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14696 $as_echo_n "checking for $ac_word... " >&6; }
14697 if ${ac_cv_prog_XGETTEXT+:} false; then :
14698   $as_echo_n "(cached) " >&6
14699 else
14700   if test -n "$XGETTEXT"; then
14701   ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test.
14702 else
14703 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14704 for as_dir in $PATH
14705 do
14706   IFS=$as_save_IFS
14707   test -z "$as_dir" && as_dir=.
14708     for ac_exec_ext in '' $ac_executable_extensions; do
14709   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14710     ac_cv_prog_XGETTEXT="$ac_prog"
14711     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14712     break 2
14713   fi
14714 done
14715   done
14716 IFS=$as_save_IFS
14717
14718 fi
14719 fi
14720 XGETTEXT=$ac_cv_prog_XGETTEXT
14721 if test -n "$XGETTEXT"; then
14722   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
14723 $as_echo "$XGETTEXT" >&6; }
14724 else
14725   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14726 $as_echo "no" >&6; }
14727 fi
14728
14729
14730   test -n "$XGETTEXT" && break
14731 done
14732
14733
14734 fi
14735
14736 # Check for Tcl configuration script tclConfig.sh
14737 if test "$with_tcl" = yes; then
14738     for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84 tclsh8.3 tclsh83
14739 do
14740   # Extract the first word of "$ac_prog", so it can be a program name with args.
14741 set dummy $ac_prog; ac_word=$2
14742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14743 $as_echo_n "checking for $ac_word... " >&6; }
14744 if ${ac_cv_path_TCLSH+:} false; then :
14745   $as_echo_n "(cached) " >&6
14746 else
14747   case $TCLSH in
14748   [\\/]* | ?:[\\/]*)
14749   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
14750   ;;
14751   *)
14752   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14753 for as_dir in $PATH
14754 do
14755   IFS=$as_save_IFS
14756   test -z "$as_dir" && as_dir=.
14757     for ac_exec_ext in '' $ac_executable_extensions; do
14758   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14759     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
14760     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14761     break 2
14762   fi
14763 done
14764   done
14765 IFS=$as_save_IFS
14766
14767   ;;
14768 esac
14769 fi
14770 TCLSH=$ac_cv_path_TCLSH
14771 if test -n "$TCLSH"; then
14772   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
14773 $as_echo "$TCLSH" >&6; }
14774 else
14775   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14776 $as_echo "no" >&6; }
14777 fi
14778
14779
14780   test -n "$TCLSH" && break
14781 done
14782
14783 if test x"$TCLSH" = x""; then
14784   as_fn_error $? "Tcl shell not found" "$LINENO" 5
14785 fi
14786
14787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
14788 $as_echo_n "checking for tclConfig.sh... " >&6; }
14789 # Let user override test
14790 if test -z "$TCL_CONFIG_SH"; then
14791     pgac_test_dirs="$with_tclconfig"
14792
14793     set X $pgac_test_dirs; shift
14794     if test $# -eq 0; then
14795         test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
14796         set X `echo 'puts $auto_path' | $TCLSH`; shift
14797     fi
14798
14799     for pgac_dir do
14800         if test -r "$pgac_dir/tclConfig.sh"; then
14801             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
14802             break
14803         fi
14804     done
14805 fi
14806
14807 if test -z "$TCL_CONFIG_SH"; then
14808     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14809 $as_echo "no" >&6; }
14810     as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
14811 else
14812     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
14813 $as_echo "$TCL_CONFIG_SH" >&6; }
14814 fi
14815
14816
14817
14818     . "$TCL_CONFIG_SH"
14819 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
14820 eval TCL_LIBS=\"$TCL_LIBS\"
14821 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
14822 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
14823
14824         if test "$TCL_SHARED_BUILD" != 1; then
14825       as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
14826 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
14827     fi
14828     # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
14829     ac_save_CPPFLAGS=$CPPFLAGS
14830     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
14831     ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
14832 if test "x$ac_cv_header_tcl_h" = xyes; then :
14833
14834 else
14835   as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
14836 fi
14837
14838
14839     CPPFLAGS=$ac_save_CPPFLAGS
14840 fi
14841
14842 # check for <perl.h>
14843 if test "$with_perl" = yes; then
14844   ac_save_CPPFLAGS=$CPPFLAGS
14845   CPPFLAGS="$CPPFLAGS -I$perl_archlibexp/CORE"
14846   ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
14847 "
14848 if test "x$ac_cv_header_perl_h" = xyes; then :
14849
14850 else
14851   as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
14852 fi
14853
14854
14855   # While we're at it, check that we can link to libperl.
14856   # On most platforms, if perl.h is there then libperl.so will be too, but at
14857   # this writing Debian packages them separately.  There is no known reason to
14858   # waste cycles on separate probes for the Tcl or Python libraries, though.
14859   pgac_save_LIBS=$LIBS
14860   LIBS="$perl_embed_ldflags"
14861   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
14862 $as_echo_n "checking for libperl... " >&6; }
14863   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14864 /* end confdefs.h.  */
14865
14866 #include <EXTERN.h>
14867 #include <perl.h>
14868
14869 int
14870 main ()
14871 {
14872 perl_alloc();
14873   ;
14874   return 0;
14875 }
14876 _ACEOF
14877 if ac_fn_c_try_link "$LINENO"; then :
14878   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14879 $as_echo "yes" >&6; }
14880 else
14881   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14882 $as_echo "no" >&6; }
14883      as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
14884 fi
14885 rm -f core conftest.err conftest.$ac_objext \
14886     conftest$ac_exeext conftest.$ac_ext
14887   LIBS=$pgac_save_LIBS
14888   CPPFLAGS=$ac_save_CPPFLAGS
14889 fi
14890
14891 # check for <Python.h>
14892 if test "$with_python" = yes; then
14893   ac_save_CPPFLAGS=$CPPFLAGS
14894   CPPFLAGS="$python_includespec $CPPFLAGS"
14895   ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
14896 if test "x$ac_cv_header_Python_h" = xyes; then :
14897
14898 else
14899   as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
14900 fi
14901
14902
14903   CPPFLAGS=$ac_save_CPPFLAGS
14904 fi
14905
14906 #
14907 # Check for DocBook and tools
14908 #
14909 for ac_prog in onsgmls nsgmls
14910 do
14911   # Extract the first word of "$ac_prog", so it can be a program name with args.
14912 set dummy $ac_prog; ac_word=$2
14913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14914 $as_echo_n "checking for $ac_word... " >&6; }
14915 if ${ac_cv_prog_NSGMLS+:} false; then :
14916   $as_echo_n "(cached) " >&6
14917 else
14918   if test -n "$NSGMLS"; then
14919   ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
14920 else
14921 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14922 for as_dir in $PATH
14923 do
14924   IFS=$as_save_IFS
14925   test -z "$as_dir" && as_dir=.
14926     for ac_exec_ext in '' $ac_executable_extensions; do
14927   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14928     ac_cv_prog_NSGMLS="$ac_prog"
14929     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14930     break 2
14931   fi
14932 done
14933   done
14934 IFS=$as_save_IFS
14935
14936 fi
14937 fi
14938 NSGMLS=$ac_cv_prog_NSGMLS
14939 if test -n "$NSGMLS"; then
14940   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NSGMLS" >&5
14941 $as_echo "$NSGMLS" >&6; }
14942 else
14943   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14944 $as_echo "no" >&6; }
14945 fi
14946
14947
14948   test -n "$NSGMLS" && break
14949 done
14950
14951 for ac_prog in openjade jade
14952 do
14953   # Extract the first word of "$ac_prog", so it can be a program name with args.
14954 set dummy $ac_prog; ac_word=$2
14955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14956 $as_echo_n "checking for $ac_word... " >&6; }
14957 if ${ac_cv_prog_JADE+:} false; then :
14958   $as_echo_n "(cached) " >&6
14959 else
14960   if test -n "$JADE"; then
14961   ac_cv_prog_JADE="$JADE" # Let the user override the test.
14962 else
14963 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14964 for as_dir in $PATH
14965 do
14966   IFS=$as_save_IFS
14967   test -z "$as_dir" && as_dir=.
14968     for ac_exec_ext in '' $ac_executable_extensions; do
14969   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14970     ac_cv_prog_JADE="$ac_prog"
14971     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14972     break 2
14973   fi
14974 done
14975   done
14976 IFS=$as_save_IFS
14977
14978 fi
14979 fi
14980 JADE=$ac_cv_prog_JADE
14981 if test -n "$JADE"; then
14982   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JADE" >&5
14983 $as_echo "$JADE" >&6; }
14984 else
14985   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14986 $as_echo "no" >&6; }
14987 fi
14988
14989
14990   test -n "$JADE" && break
14991 done
14992
14993
14994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook V4.2" >&5
14995 $as_echo_n "checking for DocBook V4.2... " >&6; }
14996 if ${pgac_cv_check_docbook+:} false; then :
14997   $as_echo_n "(cached) " >&6
14998 else
14999   cat >conftest.sgml <<EOF
15000 <!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
15001 <book>
15002  <title>test</title>
15003  <chapter>
15004   <title>random</title>
15005    <sect1>
15006     <title>testsect</title>
15007     <para>text</para>
15008   </sect1>
15009  </chapter>
15010 </book>
15011 EOF
15012
15013 pgac_cv_check_docbook=no
15014
15015 if test -n "$NSGMLS"; then
15016   $NSGMLS -s conftest.sgml 1>&5 2>&1
15017   if test $? -eq 0; then
15018     pgac_cv_check_docbook=yes
15019   fi
15020 fi
15021 rm -f conftest.sgml
15022 fi
15023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_docbook" >&5
15024 $as_echo "$pgac_cv_check_docbook" >&6; }
15025
15026 have_docbook=$pgac_cv_check_docbook
15027
15028
15029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook stylesheets" >&5
15030 $as_echo_n "checking for DocBook stylesheets... " >&6; }
15031 if ${pgac_cv_path_stylesheets+:} false; then :
15032   $as_echo_n "(cached) " >&6
15033 else
15034   if test -n "$DOCBOOKSTYLE"; then
15035   pgac_cv_path_stylesheets=$DOCBOOKSTYLE
15036 else
15037   for pgac_prefix in /usr /usr/local /opt /sw; do
15038     for pgac_infix in share lib; do
15039       for pgac_postfix in \
15040         sgml/stylesheets/nwalsh-modular \
15041         sgml/stylesheets/docbook \
15042         sgml/stylesheets/dsssl/docbook \
15043         sgml/docbook-dsssl \
15044         sgml/docbook/dsssl/modular \
15045         sgml/docbook/stylesheet/dsssl/modular \
15046         sgml/docbook/dsssl-stylesheets \
15047         sgml/dsssl/docbook-dsssl-nwalsh
15048       do
15049         pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
15050         if test -r "$pgac_candidate/html/docbook.dsl" \
15051            && test -r "$pgac_candidate/print/docbook.dsl"
15052         then
15053           pgac_cv_path_stylesheets=$pgac_candidate
15054           break 3
15055         fi
15056       done
15057     done
15058   done
15059 fi
15060 fi
15061
15062 DOCBOOKSTYLE=$pgac_cv_path_stylesheets
15063
15064 if test -n "$DOCBOOKSTYLE"; then
15065   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOCBOOKSTYLE" >&5
15066 $as_echo "$DOCBOOKSTYLE" >&6; }
15067 else
15068   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15069 $as_echo "no" >&6; }
15070 fi
15071 if test -n "$DOCBOOKSTYLE" -a -r "$DOCBOOKSTYLE/bin/collateindex.pl"; then
15072   COLLATEINDEX="$DOCBOOKSTYLE/bin/collateindex.pl"
15073
15074 else
15075   # Extract the first word of "collateindex.pl", so it can be a program name with args.
15076 set dummy collateindex.pl; ac_word=$2
15077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15078 $as_echo_n "checking for $ac_word... " >&6; }
15079 if ${ac_cv_path_COLLATEINDEX+:} false; then :
15080   $as_echo_n "(cached) " >&6
15081 else
15082   case $COLLATEINDEX in
15083   [\\/]* | ?:[\\/]*)
15084   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
15085   ;;
15086   *)
15087   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15088 for as_dir in $PATH
15089 do
15090   IFS=$as_save_IFS
15091   test -z "$as_dir" && as_dir=.
15092     for ac_exec_ext in '' $ac_executable_extensions; do
15093   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15094     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
15095     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15096     break 2
15097   fi
15098 done
15099   done
15100 IFS=$as_save_IFS
15101
15102   ;;
15103 esac
15104 fi
15105 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
15106 if test -n "$COLLATEINDEX"; then
15107   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COLLATEINDEX" >&5
15108 $as_echo "$COLLATEINDEX" >&6; }
15109 else
15110   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15111 $as_echo "no" >&6; }
15112 fi
15113
15114
15115 fi
15116 for ac_prog in dbtoepub
15117 do
15118   # Extract the first word of "$ac_prog", so it can be a program name with args.
15119 set dummy $ac_prog; ac_word=$2
15120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15121 $as_echo_n "checking for $ac_word... " >&6; }
15122 if ${ac_cv_prog_DBTOEPUB+:} false; then :
15123   $as_echo_n "(cached) " >&6
15124 else
15125   if test -n "$DBTOEPUB"; then
15126   ac_cv_prog_DBTOEPUB="$DBTOEPUB" # Let the user override the test.
15127 else
15128 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15129 for as_dir in $PATH
15130 do
15131   IFS=$as_save_IFS
15132   test -z "$as_dir" && as_dir=.
15133     for ac_exec_ext in '' $ac_executable_extensions; do
15134   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15135     ac_cv_prog_DBTOEPUB="$ac_prog"
15136     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15137     break 2
15138   fi
15139 done
15140   done
15141 IFS=$as_save_IFS
15142
15143 fi
15144 fi
15145 DBTOEPUB=$ac_cv_prog_DBTOEPUB
15146 if test -n "$DBTOEPUB"; then
15147   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
15148 $as_echo "$DBTOEPUB" >&6; }
15149 else
15150   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15151 $as_echo "no" >&6; }
15152 fi
15153
15154
15155   test -n "$DBTOEPUB" && break
15156 done
15157
15158 for ac_prog in xmllint
15159 do
15160   # Extract the first word of "$ac_prog", so it can be a program name with args.
15161 set dummy $ac_prog; ac_word=$2
15162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15163 $as_echo_n "checking for $ac_word... " >&6; }
15164 if ${ac_cv_prog_XMLLINT+:} false; then :
15165   $as_echo_n "(cached) " >&6
15166 else
15167   if test -n "$XMLLINT"; then
15168   ac_cv_prog_XMLLINT="$XMLLINT" # Let the user override the test.
15169 else
15170 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15171 for as_dir in $PATH
15172 do
15173   IFS=$as_save_IFS
15174   test -z "$as_dir" && as_dir=.
15175     for ac_exec_ext in '' $ac_executable_extensions; do
15176   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15177     ac_cv_prog_XMLLINT="$ac_prog"
15178     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15179     break 2
15180   fi
15181 done
15182   done
15183 IFS=$as_save_IFS
15184
15185 fi
15186 fi
15187 XMLLINT=$ac_cv_prog_XMLLINT
15188 if test -n "$XMLLINT"; then
15189   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
15190 $as_echo "$XMLLINT" >&6; }
15191 else
15192   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15193 $as_echo "no" >&6; }
15194 fi
15195
15196
15197   test -n "$XMLLINT" && break
15198 done
15199
15200 for ac_prog in xsltproc
15201 do
15202   # Extract the first word of "$ac_prog", so it can be a program name with args.
15203 set dummy $ac_prog; ac_word=$2
15204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15205 $as_echo_n "checking for $ac_word... " >&6; }
15206 if ${ac_cv_prog_XSLTPROC+:} false; then :
15207   $as_echo_n "(cached) " >&6
15208 else
15209   if test -n "$XSLTPROC"; then
15210   ac_cv_prog_XSLTPROC="$XSLTPROC" # Let the user override the test.
15211 else
15212 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15213 for as_dir in $PATH
15214 do
15215   IFS=$as_save_IFS
15216   test -z "$as_dir" && as_dir=.
15217     for ac_exec_ext in '' $ac_executable_extensions; do
15218   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15219     ac_cv_prog_XSLTPROC="$ac_prog"
15220     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15221     break 2
15222   fi
15223 done
15224   done
15225 IFS=$as_save_IFS
15226
15227 fi
15228 fi
15229 XSLTPROC=$ac_cv_prog_XSLTPROC
15230 if test -n "$XSLTPROC"; then
15231   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
15232 $as_echo "$XSLTPROC" >&6; }
15233 else
15234   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15235 $as_echo "no" >&6; }
15236 fi
15237
15238
15239   test -n "$XSLTPROC" && break
15240 done
15241
15242 for ac_prog in osx sgml2xml sx
15243 do
15244   # Extract the first word of "$ac_prog", so it can be a program name with args.
15245 set dummy $ac_prog; ac_word=$2
15246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15247 $as_echo_n "checking for $ac_word... " >&6; }
15248 if ${ac_cv_prog_OSX+:} false; then :
15249   $as_echo_n "(cached) " >&6
15250 else
15251   if test -n "$OSX"; then
15252   ac_cv_prog_OSX="$OSX" # Let the user override the test.
15253 else
15254 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15255 for as_dir in $PATH
15256 do
15257   IFS=$as_save_IFS
15258   test -z "$as_dir" && as_dir=.
15259     for ac_exec_ext in '' $ac_executable_extensions; do
15260   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15261     ac_cv_prog_OSX="$ac_prog"
15262     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15263     break 2
15264   fi
15265 done
15266   done
15267 IFS=$as_save_IFS
15268
15269 fi
15270 fi
15271 OSX=$ac_cv_prog_OSX
15272 if test -n "$OSX"; then
15273   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OSX" >&5
15274 $as_echo "$OSX" >&6; }
15275 else
15276   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15277 $as_echo "no" >&6; }
15278 fi
15279
15280
15281   test -n "$OSX" && break
15282 done
15283
15284
15285 #
15286 # Check for test tools
15287 #
15288 if test "$enable_tap_tests" = yes; then
15289   for ac_prog in prove
15290 do
15291   # Extract the first word of "$ac_prog", so it can be a program name with args.
15292 set dummy $ac_prog; ac_word=$2
15293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15294 $as_echo_n "checking for $ac_word... " >&6; }
15295 if ${ac_cv_prog_PROVE+:} false; then :
15296   $as_echo_n "(cached) " >&6
15297 else
15298   if test -n "$PROVE"; then
15299   ac_cv_prog_PROVE="$PROVE" # Let the user override the test.
15300 else
15301 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15302 for as_dir in $PATH
15303 do
15304   IFS=$as_save_IFS
15305   test -z "$as_dir" && as_dir=.
15306     for ac_exec_ext in '' $ac_executable_extensions; do
15307   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15308     ac_cv_prog_PROVE="$ac_prog"
15309     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15310     break 2
15311   fi
15312 done
15313   done
15314 IFS=$as_save_IFS
15315
15316 fi
15317 fi
15318 PROVE=$ac_cv_prog_PROVE
15319 if test -n "$PROVE"; then
15320   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
15321 $as_echo "$PROVE" >&6; }
15322 else
15323   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15324 $as_echo "no" >&6; }
15325 fi
15326
15327
15328   test -n "$PROVE" && break
15329 done
15330
15331   if test -z "$PROVE"; then
15332     as_fn_error $? "prove not found" "$LINENO" 5
15333   fi
15334   if test -z "$PERL"; then
15335     as_fn_error $? "Perl not found" "$LINENO" 5
15336   fi
15337 fi
15338
15339 # Thread testing
15340
15341 # We have to run the thread test near the end so we have all our symbols
15342 # defined.  Cross compiling throws a warning.
15343 #
15344 if test "$enable_thread_safety" = yes; then
15345 if test "$PORTNAME" != "win32"
15346 then
15347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking thread safety of required library functions" >&5
15348 $as_echo_n "checking thread safety of required library functions... " >&6; }
15349
15350 _CFLAGS="$CFLAGS"
15351 _LIBS="$LIBS"
15352 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
15353 LIBS="$LIBS $PTHREAD_LIBS"
15354 if test "$cross_compiling" = yes; then :
15355   { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
15356 $as_echo "maybe" >&6; }
15357   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
15358 *** Skipping thread test program because of cross-compile build.
15359 *** Run the program in src/test/thread on the target machine.
15360 " >&5
15361 $as_echo "$as_me: WARNING:
15362 *** Skipping thread test program because of cross-compile build.
15363 *** Run the program in src/test/thread on the target machine.
15364 " >&2;}
15365 else
15366   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15367 /* end confdefs.h.  */
15368 #include "$srcdir/src/test/thread/thread_test.c"
15369 _ACEOF
15370 if ac_fn_c_try_run "$LINENO"; then :
15371   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15372 $as_echo "yes" >&6; }
15373 else
15374   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15375 $as_echo "no" >&6; }
15376   as_fn_error $? "thread test program failed
15377 This platform is not thread-safe.  Check the file 'config.log' or compile
15378 and run src/test/thread/thread_test for the exact reason.
15379 Use --disable-thread-safety to disable thread safety." "$LINENO" 5
15380 fi
15381 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15382   conftest.$ac_objext conftest.beam conftest.$ac_ext
15383 fi
15384
15385 CFLAGS="$_CFLAGS"
15386 LIBS="$_LIBS"
15387 else
15388 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** skipping thread test on Win32" >&5
15389 $as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
15390 fi
15391 fi
15392
15393 # If compiler will take -Wl,--as-needed (or various platform-specific
15394 # spellings thereof) then add that to LDFLAGS.  This is much easier than
15395 # trying to filter LIBS to the minimum for each executable.
15396 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
15397 # libreadline; therefore we postpone testing it until we know what library
15398 # dependencies readline has.  The test code will try to link with $LIBS.
15399 if test "$with_readline" = yes; then
15400   link_test_func=readline
15401 else
15402   link_test_func=exit
15403 fi
15404
15405 if test "$PORTNAME" = "darwin"; then
15406   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
15407 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
15408 if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
15409   $as_echo_n "(cached) " >&6
15410 else
15411   pgac_save_LDFLAGS=$LDFLAGS
15412 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
15413 if test "$cross_compiling" = yes; then :
15414   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
15415 else
15416   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15417 /* end confdefs.h.  */
15418 extern void $link_test_func (); void (*fptr) () = $link_test_func;
15419 int
15420 main ()
15421 {
15422
15423   ;
15424   return 0;
15425 }
15426 _ACEOF
15427 if ac_fn_c_try_run "$LINENO"; then :
15428   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
15429 else
15430   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
15431 fi
15432 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15433   conftest.$ac_objext conftest.beam conftest.$ac_ext
15434 fi
15435
15436 LDFLAGS="$pgac_save_LDFLAGS"
15437 fi
15438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
15439 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
15440 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
15441   LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
15442 fi
15443
15444 elif test "$PORTNAME" = "openbsd"; then
15445   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
15446 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
15447 if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
15448   $as_echo_n "(cached) " >&6
15449 else
15450   pgac_save_LDFLAGS=$LDFLAGS
15451 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
15452 if test "$cross_compiling" = yes; then :
15453   pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
15454 else
15455   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15456 /* end confdefs.h.  */
15457 extern void $link_test_func (); void (*fptr) () = $link_test_func;
15458 int
15459 main ()
15460 {
15461
15462   ;
15463   return 0;
15464 }
15465 _ACEOF
15466 if ac_fn_c_try_run "$LINENO"; then :
15467   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
15468 else
15469   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
15470 fi
15471 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15472   conftest.$ac_objext conftest.beam conftest.$ac_ext
15473 fi
15474
15475 LDFLAGS="$pgac_save_LDFLAGS"
15476 fi
15477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
15478 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
15479 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
15480   LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
15481 fi
15482
15483 else
15484   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
15485 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
15486 if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
15487   $as_echo_n "(cached) " >&6
15488 else
15489   pgac_save_LDFLAGS=$LDFLAGS
15490 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
15491 if test "$cross_compiling" = yes; then :
15492   pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
15493 else
15494   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15495 /* end confdefs.h.  */
15496 extern void $link_test_func (); void (*fptr) () = $link_test_func;
15497 int
15498 main ()
15499 {
15500
15501   ;
15502   return 0;
15503 }
15504 _ACEOF
15505 if ac_fn_c_try_run "$LINENO"; then :
15506   pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
15507 else
15508   pgac_cv_prog_cc_ldflags__Wl___as_needed=no
15509 fi
15510 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15511   conftest.$ac_objext conftest.beam conftest.$ac_ext
15512 fi
15513
15514 LDFLAGS="$pgac_save_LDFLAGS"
15515 fi
15516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
15517 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
15518 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
15519   LDFLAGS="$LDFLAGS -Wl,--as-needed"
15520 fi
15521
15522 fi
15523
15524 # Create compiler version string
15525 if test x"$GCC" = x"yes" ; then
15526   cc_string=`${CC} --version | sed q`
15527   case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
15528 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
15529   cc_string=`${CC} -V 2>&1 | sed q`
15530 else
15531   cc_string=$CC
15532 fi
15533
15534
15535 cat >>confdefs.h <<_ACEOF
15536 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
15537 _ACEOF
15538
15539
15540 # Supply a numeric version string for use by 3rd party add-ons
15541 # awk -F is a regex on some platforms, and not on others, so make "." a tab
15542 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
15543 tr '.' '        ' |
15544 $AWK '{printf "%d%02d%02d", $1, $2, (NF >= 3) ? $3 : 0}'`"
15545
15546 cat >>confdefs.h <<_ACEOF
15547 #define PG_VERSION_NUM $PG_VERSION_NUM
15548 _ACEOF
15549
15550
15551
15552 # Begin output steps
15553
15554 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
15555 $as_echo "$as_me: using compiler=$cc_string" >&6;}
15556 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
15557 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
15558 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
15559 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
15560 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
15561 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
15562
15563 # prepare build tree if outside source tree
15564 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
15565 # Note 2: /bin/pwd might be better than shell's built-in at getting
15566 #         a symlink-free name.
15567 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
15568   vpath_build=no
15569 else
15570   vpath_build=yes
15571   if test "$no_create" != yes; then
15572     $as_echo_n "preparing build tree... " >&6
15573     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
15574     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
15575       || as_fn_error $? "failed" "$LINENO" 5
15576     { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15577 $as_echo "done" >&6; }
15578   fi
15579 fi
15580
15581
15582
15583 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
15584
15585
15586 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}"
15587
15588
15589 if test "$PORTNAME" = "win32"; then
15590 ac_config_commands="$ac_config_commands check_win32_symlinks"
15591
15592 fi
15593
15594 ac_config_headers="$ac_config_headers src/include/pg_config.h"
15595
15596
15597 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
15598
15599
15600 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
15601
15602
15603 cat >confcache <<\_ACEOF
15604 # This file is a shell script that caches the results of configure
15605 # tests run on this system so they can be shared between configure
15606 # scripts and configure runs, see configure's option --config-cache.
15607 # It is not useful on other systems.  If it contains results you don't
15608 # want to keep, you may remove or edit it.
15609 #
15610 # config.status only pays attention to the cache file if you give it
15611 # the --recheck option to rerun configure.
15612 #
15613 # `ac_cv_env_foo' variables (set or unset) will be overridden when
15614 # loading this file, other *unset* `ac_cv_foo' will be assigned the
15615 # following values.
15616
15617 _ACEOF
15618
15619 # The following way of writing the cache mishandles newlines in values,
15620 # but we know of no workaround that is simple, portable, and efficient.
15621 # So, we kill variables containing newlines.
15622 # Ultrix sh set writes to stderr and can't be redirected directly,
15623 # and sets the high bit in the cache file unless we assign to the vars.
15624 (
15625   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15626     eval ac_val=\$$ac_var
15627     case $ac_val in #(
15628     *${as_nl}*)
15629       case $ac_var in #(
15630       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15631 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
15632       esac
15633       case $ac_var in #(
15634       _ | IFS | as_nl) ;; #(
15635       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15636       *) { eval $ac_var=; unset $ac_var;} ;;
15637       esac ;;
15638     esac
15639   done
15640
15641   (set) 2>&1 |
15642     case $as_nl`(ac_space=' '; set) 2>&1` in #(
15643     *${as_nl}ac_space=\ *)
15644       # `set' does not quote correctly, so add quotes: double-quote
15645       # substitution turns \\\\ into \\, and sed turns \\ into \.
15646       sed -n \
15647         "s/'/'\\\\''/g;
15648           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15649       ;; #(
15650     *)
15651       # `set' quotes correctly as required by POSIX, so do not add quotes.
15652       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
15653       ;;
15654     esac |
15655     sort
15656 ) |
15657   sed '
15658      /^ac_cv_env_/b end
15659      t clear
15660      :clear
15661      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15662      t end
15663      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15664      :end' >>confcache
15665 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15666   if test -w "$cache_file"; then
15667     if test "x$cache_file" != "x/dev/null"; then
15668       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15669 $as_echo "$as_me: updating cache $cache_file" >&6;}
15670       if test ! -f "$cache_file" || test -h "$cache_file"; then
15671         cat confcache >"$cache_file"
15672       else
15673         case $cache_file in #(
15674         */* | ?:*)
15675           mv -f confcache "$cache_file"$$ &&
15676           mv -f "$cache_file"$$ "$cache_file" ;; #(
15677         *)
15678           mv -f confcache "$cache_file" ;;
15679         esac
15680       fi
15681     fi
15682   else
15683     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15684 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
15685   fi
15686 fi
15687 rm -f confcache
15688
15689 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15690 # Let make expand exec_prefix.
15691 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15692
15693 DEFS=-DHAVE_CONFIG_H
15694
15695 ac_libobjs=
15696 ac_ltlibobjs=
15697 U=
15698 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15699   # 1. Remove the extension, and $U if already installed.
15700   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
15701   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
15702   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
15703   #    will be set to the directory where LIBOBJS objects are built.
15704   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15705   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
15706 done
15707 LIBOBJS=$ac_libobjs
15708
15709 LTLIBOBJS=$ac_ltlibobjs
15710
15711
15712
15713
15714 : "${CONFIG_STATUS=./config.status}"
15715 ac_write_fail=0
15716 ac_clean_files_save=$ac_clean_files
15717 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15718 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15719 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15720 as_write_fail=0
15721 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
15722 #! $SHELL
15723 # Generated by $as_me.
15724 # Run this file to recreate the current configuration.
15725 # Compiler output produced by configure, useful for debugging
15726 # configure, is in config.log if it exists.
15727
15728 debug=false
15729 ac_cs_recheck=false
15730 ac_cs_silent=false
15731
15732 SHELL=\${CONFIG_SHELL-$SHELL}
15733 export SHELL
15734 _ASEOF
15735 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15736 ## -------------------- ##
15737 ## M4sh Initialization. ##
15738 ## -------------------- ##
15739
15740 # Be more Bourne compatible
15741 DUALCASE=1; export DUALCASE # for MKS sh
15742 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
15743   emulate sh
15744   NULLCMD=:
15745   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
15746   # is contrary to our usage.  Disable this feature.
15747   alias -g '${1+"$@"}'='"$@"'
15748   setopt NO_GLOB_SUBST
15749 else
15750   case `(set -o) 2>/dev/null` in #(
15751   *posix*) :
15752     set -o posix ;; #(
15753   *) :
15754      ;;
15755 esac
15756 fi
15757
15758
15759 as_nl='
15760 '
15761 export as_nl
15762 # Printing a long string crashes Solaris 7 /usr/bin/printf.
15763 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15764 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15765 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15766 # Prefer a ksh shell builtin over an external printf program on Solaris,
15767 # but without wasting forks for bash or zsh.
15768 if test -z "$BASH_VERSION$ZSH_VERSION" \
15769     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15770   as_echo='print -r --'
15771   as_echo_n='print -rn --'
15772 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15773   as_echo='printf %s\n'
15774   as_echo_n='printf %s'
15775 else
15776   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15777     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15778     as_echo_n='/usr/ucb/echo -n'
15779   else
15780     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15781     as_echo_n_body='eval
15782       arg=$1;
15783       case $arg in #(
15784       *"$as_nl"*)
15785         expr "X$arg" : "X\\(.*\\)$as_nl";
15786         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15787       esac;
15788       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15789     '
15790     export as_echo_n_body
15791     as_echo_n='sh -c $as_echo_n_body as_echo'
15792   fi
15793   export as_echo_body
15794   as_echo='sh -c $as_echo_body as_echo'
15795 fi
15796
15797 # The user is always right.
15798 if test "${PATH_SEPARATOR+set}" != set; then
15799   PATH_SEPARATOR=:
15800   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15801     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15802       PATH_SEPARATOR=';'
15803   }
15804 fi
15805
15806
15807 # IFS
15808 # We need space, tab and new line, in precisely that order.  Quoting is
15809 # there to prevent editors from complaining about space-tab.
15810 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
15811 # splitting by setting IFS to empty value.)
15812 IFS=" ""        $as_nl"
15813
15814 # Find who we are.  Look in the path if we contain no directory separator.
15815 as_myself=
15816 case $0 in #((
15817   *[\\/]* ) as_myself=$0 ;;
15818   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15819 for as_dir in $PATH
15820 do
15821   IFS=$as_save_IFS
15822   test -z "$as_dir" && as_dir=.
15823     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15824   done
15825 IFS=$as_save_IFS
15826
15827      ;;
15828 esac
15829 # We did not find ourselves, most probably we were run as `sh COMMAND'
15830 # in which case we are not to be found in the path.
15831 if test "x$as_myself" = x; then
15832   as_myself=$0
15833 fi
15834 if test ! -f "$as_myself"; then
15835   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15836   exit 1
15837 fi
15838
15839 # Unset variables that we do not need and which cause bugs (e.g. in
15840 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
15841 # suppresses any "Segmentation fault" message there.  '((' could
15842 # trigger a bug in pdksh 5.2.14.
15843 for as_var in BASH_ENV ENV MAIL MAILPATH
15844 do eval test x\${$as_var+set} = xset \
15845   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
15846 done
15847 PS1='$ '
15848 PS2='> '
15849 PS4='+ '
15850
15851 # NLS nuisances.
15852 LC_ALL=C
15853 export LC_ALL
15854 LANGUAGE=C
15855 export LANGUAGE
15856
15857 # CDPATH.
15858 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15859
15860
15861 # as_fn_error STATUS ERROR [LINENO LOG_FD]
15862 # ----------------------------------------
15863 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15864 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
15865 # script with STATUS, using 1 if that was 0.
15866 as_fn_error ()
15867 {
15868   as_status=$1; test $as_status -eq 0 && as_status=1
15869   if test "$4"; then
15870     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15871     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
15872   fi
15873   $as_echo "$as_me: error: $2" >&2
15874   as_fn_exit $as_status
15875 } # as_fn_error
15876
15877
15878 # as_fn_set_status STATUS
15879 # -----------------------
15880 # Set $? to STATUS, without forking.
15881 as_fn_set_status ()
15882 {
15883   return $1
15884 } # as_fn_set_status
15885
15886 # as_fn_exit STATUS
15887 # -----------------
15888 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15889 as_fn_exit ()
15890 {
15891   set +e
15892   as_fn_set_status $1
15893   exit $1
15894 } # as_fn_exit
15895
15896 # as_fn_unset VAR
15897 # ---------------
15898 # Portably unset VAR.
15899 as_fn_unset ()
15900 {
15901   { eval $1=; unset $1;}
15902 }
15903 as_unset=as_fn_unset
15904 # as_fn_append VAR VALUE
15905 # ----------------------
15906 # Append the text in VALUE to the end of the definition contained in VAR. Take
15907 # advantage of any shell optimizations that allow amortized linear growth over
15908 # repeated appends, instead of the typical quadratic growth present in naive
15909 # implementations.
15910 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15911   eval 'as_fn_append ()
15912   {
15913     eval $1+=\$2
15914   }'
15915 else
15916   as_fn_append ()
15917   {
15918     eval $1=\$$1\$2
15919   }
15920 fi # as_fn_append
15921
15922 # as_fn_arith ARG...
15923 # ------------------
15924 # Perform arithmetic evaluation on the ARGs, and store the result in the
15925 # global $as_val. Take advantage of shells that can avoid forks. The arguments
15926 # must be portable across $(()) and expr.
15927 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15928   eval 'as_fn_arith ()
15929   {
15930     as_val=$(( $* ))
15931   }'
15932 else
15933   as_fn_arith ()
15934   {
15935     as_val=`expr "$@" || test $? -eq 1`
15936   }
15937 fi # as_fn_arith
15938
15939
15940 if expr a : '\(a\)' >/dev/null 2>&1 &&
15941    test "X`expr 00001 : '.*\(...\)'`" = X001; then
15942   as_expr=expr
15943 else
15944   as_expr=false
15945 fi
15946
15947 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15948   as_basename=basename
15949 else
15950   as_basename=false
15951 fi
15952
15953 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15954   as_dirname=dirname
15955 else
15956   as_dirname=false
15957 fi
15958
15959 as_me=`$as_basename -- "$0" ||
15960 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15961          X"$0" : 'X\(//\)$' \| \
15962          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
15963 $as_echo X/"$0" |
15964     sed '/^.*\/\([^/][^/]*\)\/*$/{
15965             s//\1/
15966             q
15967           }
15968           /^X\/\(\/\/\)$/{
15969             s//\1/
15970             q
15971           }
15972           /^X\/\(\/\).*/{
15973             s//\1/
15974             q
15975           }
15976           s/.*/./; q'`
15977
15978 # Avoid depending upon Character Ranges.
15979 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15980 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15981 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15982 as_cr_digits='0123456789'
15983 as_cr_alnum=$as_cr_Letters$as_cr_digits
15984
15985 ECHO_C= ECHO_N= ECHO_T=
15986 case `echo -n x` in #(((((
15987 -n*)
15988   case `echo 'xy\c'` in
15989   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
15990   xy)  ECHO_C='\c';;
15991   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
15992        ECHO_T=' ';;
15993   esac;;
15994 *)
15995   ECHO_N='-n';;
15996 esac
15997
15998 rm -f conf$$ conf$$.exe conf$$.file
15999 if test -d conf$$.dir; then
16000   rm -f conf$$.dir/conf$$.file
16001 else
16002   rm -f conf$$.dir
16003   mkdir conf$$.dir 2>/dev/null
16004 fi
16005 if (echo >conf$$.file) 2>/dev/null; then
16006   if ln -s conf$$.file conf$$ 2>/dev/null; then
16007     as_ln_s='ln -s'
16008     # ... but there are two gotchas:
16009     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16010     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
16011     # In both cases, we have to default to `cp -pR'.
16012     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
16013       as_ln_s='cp -pR'
16014   elif ln conf$$.file conf$$ 2>/dev/null; then
16015     as_ln_s=ln
16016   else
16017     as_ln_s='cp -pR'
16018   fi
16019 else
16020   as_ln_s='cp -pR'
16021 fi
16022 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16023 rmdir conf$$.dir 2>/dev/null
16024
16025
16026 # as_fn_mkdir_p
16027 # -------------
16028 # Create "$as_dir" as a directory, including parents if necessary.
16029 as_fn_mkdir_p ()
16030 {
16031
16032   case $as_dir in #(
16033   -*) as_dir=./$as_dir;;
16034   esac
16035   test -d "$as_dir" || eval $as_mkdir_p || {
16036     as_dirs=
16037     while :; do
16038       case $as_dir in #(
16039       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16040       *) as_qdir=$as_dir;;
16041       esac
16042       as_dirs="'$as_qdir' $as_dirs"
16043       as_dir=`$as_dirname -- "$as_dir" ||
16044 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16045          X"$as_dir" : 'X\(//\)[^/]' \| \
16046          X"$as_dir" : 'X\(//\)$' \| \
16047          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16048 $as_echo X"$as_dir" |
16049     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16050             s//\1/
16051             q
16052           }
16053           /^X\(\/\/\)[^/].*/{
16054             s//\1/
16055             q
16056           }
16057           /^X\(\/\/\)$/{
16058             s//\1/
16059             q
16060           }
16061           /^X\(\/\).*/{
16062             s//\1/
16063             q
16064           }
16065           s/.*/./; q'`
16066       test -d "$as_dir" && break
16067     done
16068     test -z "$as_dirs" || eval "mkdir $as_dirs"
16069   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
16070
16071
16072 } # as_fn_mkdir_p
16073 if mkdir -p . 2>/dev/null; then
16074   as_mkdir_p='mkdir -p "$as_dir"'
16075 else
16076   test -d ./-p && rmdir ./-p
16077   as_mkdir_p=false
16078 fi
16079
16080
16081 # as_fn_executable_p FILE
16082 # -----------------------
16083 # Test if FILE is an executable regular file.
16084 as_fn_executable_p ()
16085 {
16086   test -f "$1" && test -x "$1"
16087 } # as_fn_executable_p
16088 as_test_x='test -x'
16089 as_executable_p=as_fn_executable_p
16090
16091 # Sed expression to map a string onto a valid CPP name.
16092 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
16093
16094 # Sed expression to map a string onto a valid variable name.
16095 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
16096
16097
16098 exec 6>&1
16099 ## ----------------------------------- ##
16100 ## Main body of $CONFIG_STATUS script. ##
16101 ## ----------------------------------- ##
16102 _ASEOF
16103 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
16104
16105 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16106 # Save the log message, to keep $0 and so on meaningful, and to
16107 # report actual input values of CONFIG_FILES etc. instead of their
16108 # values after options handling.
16109 ac_log="
16110 This file was extended by PostgreSQL $as_me 9.5alpha1, which was
16111 generated by GNU Autoconf 2.69.  Invocation command line was
16112
16113   CONFIG_FILES    = $CONFIG_FILES
16114   CONFIG_HEADERS  = $CONFIG_HEADERS
16115   CONFIG_LINKS    = $CONFIG_LINKS
16116   CONFIG_COMMANDS = $CONFIG_COMMANDS
16117   $ $0 $@
16118
16119 on `(hostname || uname -n) 2>/dev/null | sed 1q`
16120 "
16121
16122 _ACEOF
16123
16124 case $ac_config_files in *"
16125 "*) set x $ac_config_files; shift; ac_config_files=$*;;
16126 esac
16127
16128 case $ac_config_headers in *"
16129 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16130 esac
16131
16132
16133 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16134 # Files that config.status was made for.
16135 config_files="$ac_config_files"
16136 config_headers="$ac_config_headers"
16137 config_links="$ac_config_links"
16138 config_commands="$ac_config_commands"
16139
16140 _ACEOF
16141
16142 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16143 ac_cs_usage="\
16144 \`$as_me' instantiates files and other configuration actions
16145 from templates according to the current configuration.  Unless the files
16146 and actions are specified as TAGs, all are instantiated by default.
16147
16148 Usage: $0 [OPTION]... [TAG]...
16149
16150   -h, --help       print this help, then exit
16151   -V, --version    print version number and configuration settings, then exit
16152       --config     print configuration, then exit
16153   -q, --quiet, --silent
16154                    do not print progress messages
16155   -d, --debug      don't remove temporary files
16156       --recheck    update $as_me by reconfiguring in the same conditions
16157       --file=FILE[:TEMPLATE]
16158                    instantiate the configuration file FILE
16159       --header=FILE[:TEMPLATE]
16160                    instantiate the configuration header FILE
16161
16162 Configuration files:
16163 $config_files
16164
16165 Configuration headers:
16166 $config_headers
16167
16168 Configuration links:
16169 $config_links
16170
16171 Configuration commands:
16172 $config_commands
16173
16174 Report bugs to <pgsql-bugs@postgresql.org>."
16175
16176 _ACEOF
16177 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16178 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
16179 ac_cs_version="\\
16180 PostgreSQL config.status 9.5alpha1
16181 configured by $0, generated by GNU Autoconf 2.69,
16182   with options \\"\$ac_cs_config\\"
16183
16184 Copyright (C) 2012 Free Software Foundation, Inc.
16185 This config.status script is free software; the Free Software Foundation
16186 gives unlimited permission to copy, distribute and modify it."
16187
16188 ac_pwd='$ac_pwd'
16189 srcdir='$srcdir'
16190 INSTALL='$INSTALL'
16191 MKDIR_P='$MKDIR_P'
16192 AWK='$AWK'
16193 test -n "\$AWK" || AWK=awk
16194 _ACEOF
16195
16196 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16197 # The default lists apply if the user does not specify any file.
16198 ac_need_defaults=:
16199 while test $# != 0
16200 do
16201   case $1 in
16202   --*=?*)
16203     ac_option=`expr "X$1" : 'X\([^=]*\)='`
16204     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
16205     ac_shift=:
16206     ;;
16207   --*=)
16208     ac_option=`expr "X$1" : 'X\([^=]*\)='`
16209     ac_optarg=
16210     ac_shift=:
16211     ;;
16212   *)
16213     ac_option=$1
16214     ac_optarg=$2
16215     ac_shift=shift
16216     ;;
16217   esac
16218
16219   case $ac_option in
16220   # Handling of the options.
16221   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16222     ac_cs_recheck=: ;;
16223   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
16224     $as_echo "$ac_cs_version"; exit ;;
16225   --config | --confi | --conf | --con | --co | --c )
16226     $as_echo "$ac_cs_config"; exit ;;
16227   --debug | --debu | --deb | --de | --d | -d )
16228     debug=: ;;
16229   --file | --fil | --fi | --f )
16230     $ac_shift
16231     case $ac_optarg in
16232     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16233     '') as_fn_error $? "missing file argument" ;;
16234     esac
16235     as_fn_append CONFIG_FILES " '$ac_optarg'"
16236     ac_need_defaults=false;;
16237   --header | --heade | --head | --hea )
16238     $ac_shift
16239     case $ac_optarg in
16240     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16241     esac
16242     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
16243     ac_need_defaults=false;;
16244   --he | --h)
16245     # Conflict between --help and --header
16246     as_fn_error $? "ambiguous option: \`$1'
16247 Try \`$0 --help' for more information.";;
16248   --help | --hel | -h )
16249     $as_echo "$ac_cs_usage"; exit ;;
16250   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16251   | -silent | --silent | --silen | --sile | --sil | --si | --s)
16252     ac_cs_silent=: ;;
16253
16254   # This is an error.
16255   -*) as_fn_error $? "unrecognized option: \`$1'
16256 Try \`$0 --help' for more information." ;;
16257
16258   *) as_fn_append ac_config_targets " $1"
16259      ac_need_defaults=false ;;
16260
16261   esac
16262   shift
16263 done
16264
16265 ac_configure_extra_args=
16266
16267 if $ac_cs_silent; then
16268   exec 6>/dev/null
16269   ac_configure_extra_args="$ac_configure_extra_args --silent"
16270 fi
16271
16272 _ACEOF
16273 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16274 if \$ac_cs_recheck; then
16275   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
16276   shift
16277   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16278   CONFIG_SHELL='$SHELL'
16279   export CONFIG_SHELL
16280   exec "\$@"
16281 fi
16282
16283 _ACEOF
16284 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16285 exec 5>>config.log
16286 {
16287   echo
16288   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16289 ## Running $as_me. ##
16290 _ASBOX
16291   $as_echo "$ac_log"
16292 } >&5
16293
16294 _ACEOF
16295 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16296 _ACEOF
16297
16298 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16299
16300 # Handling of arguments.
16301 for ac_config_target in $ac_config_targets
16302 do
16303   case $ac_config_target in
16304     "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
16305     "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
16306     "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
16307     "src/backend/port/dynloader.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
16308     "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
16309     "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
16310     "src/backend/port/pg_latch.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_latch.c:${LATCH_IMPLEMENTATION}" ;;
16311     "src/include/dynloader.h") CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
16312     "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
16313     "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
16314     "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
16315     "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
16316     "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
16317     "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
16318
16319   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
16320   esac
16321 done
16322
16323
16324 # If the user did not use the arguments to specify the items to instantiate,
16325 # then the envvar interface is used.  Set only those that are not.
16326 # We use the long form for the default assignment because of an extremely
16327 # bizarre bug on SunOS 4.1.3.
16328 if $ac_need_defaults; then
16329   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16330   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16331   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
16332   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16333 fi
16334
16335 # Have a temporary directory for convenience.  Make it in the build tree
16336 # simply because there is no reason against having it here, and in addition,
16337 # creating and moving files from /tmp can sometimes cause problems.
16338 # Hook for its removal unless debugging.
16339 # Note that there is a small window in which the directory will not be cleaned:
16340 # after its creation but before its name has been assigned to `$tmp'.
16341 $debug ||
16342 {
16343   tmp= ac_tmp=
16344   trap 'exit_status=$?
16345   : "${ac_tmp:=$tmp}"
16346   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
16347 ' 0
16348   trap 'as_fn_exit 1' 1 2 13 15
16349 }
16350 # Create a (secure) tmp directory for tmp files.
16351
16352 {
16353   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
16354   test -d "$tmp"
16355 }  ||
16356 {
16357   tmp=./conf$$-$RANDOM
16358   (umask 077 && mkdir "$tmp")
16359 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
16360 ac_tmp=$tmp
16361
16362 # Set up the scripts for CONFIG_FILES section.
16363 # No need to generate them if there are no CONFIG_FILES.
16364 # This happens for instance with `./config.status config.h'.
16365 if test -n "$CONFIG_FILES"; then
16366
16367
16368 ac_cr=`echo X | tr X '\015'`
16369 # On cygwin, bash can eat \r inside `` if the user requested igncr.
16370 # But we know of no other shell where ac_cr would be empty at this
16371 # point, so we can use a bashism as a fallback.
16372 if test "x$ac_cr" = x; then
16373   eval ac_cr=\$\'\\r\'
16374 fi
16375 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16376 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
16377   ac_cs_awk_cr='\\r'
16378 else
16379   ac_cs_awk_cr=$ac_cr
16380 fi
16381
16382 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
16383 _ACEOF
16384
16385
16386 {
16387   echo "cat >conf$$subs.awk <<_ACEOF" &&
16388   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16389   echo "_ACEOF"
16390 } >conf$$subs.sh ||
16391   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16392 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
16393 ac_delim='%!_!# '
16394 for ac_last_try in false false false false false :; do
16395   . ./conf$$subs.sh ||
16396     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16397
16398   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16399   if test $ac_delim_n = $ac_delim_num; then
16400     break
16401   elif $ac_last_try; then
16402     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16403   else
16404     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16405   fi
16406 done
16407 rm -f conf$$subs.sh
16408
16409 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16410 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
16411 _ACEOF
16412 sed -n '
16413 h
16414 s/^/S["/; s/!.*/"]=/
16415 p
16416 g
16417 s/^[^!]*!//
16418 :repl
16419 t repl
16420 s/'"$ac_delim"'$//
16421 t delim
16422 :nl
16423 h
16424 s/\(.\{148\}\)..*/\1/
16425 t more1
16426 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16427 p
16428 n
16429 b repl
16430 :more1
16431 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16432 p
16433 g
16434 s/.\{148\}//
16435 t nl
16436 :delim
16437 h
16438 s/\(.\{148\}\)..*/\1/
16439 t more2
16440 s/["\\]/\\&/g; s/^/"/; s/$/"/
16441 p
16442 b
16443 :more2
16444 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16445 p
16446 g
16447 s/.\{148\}//
16448 t delim
16449 ' <conf$$subs.awk | sed '
16450 /^[^""]/{
16451   N
16452   s/\n//
16453 }
16454 ' >>$CONFIG_STATUS || ac_write_fail=1
16455 rm -f conf$$subs.awk
16456 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16457 _ACAWK
16458 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
16459   for (key in S) S_is_set[key] = 1
16460   FS = "\a"
16461
16462 }
16463 {
16464   line = $ 0
16465   nfields = split(line, field, "@")
16466   substed = 0
16467   len = length(field[1])
16468   for (i = 2; i < nfields; i++) {
16469     key = field[i]
16470     keylen = length(key)
16471     if (S_is_set[key]) {
16472       value = S[key]
16473       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16474       len += length(value) + length(field[++i])
16475       substed = 1
16476     } else
16477       len += 1 + keylen
16478   }
16479
16480   print line
16481 }
16482
16483 _ACAWK
16484 _ACEOF
16485 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16486 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16487   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16488 else
16489   cat
16490 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
16491   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
16492 _ACEOF
16493
16494 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16495 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
16496 # trailing colons and then remove the whole line if VPATH becomes empty
16497 # (actually we leave an empty line to preserve line numbers).
16498 if test "x$srcdir" = x.; then
16499   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
16500 h
16501 s///
16502 s/^/:/
16503 s/[      ]*$/:/
16504 s/:\$(srcdir):/:/g
16505 s/:\${srcdir}:/:/g
16506 s/:@srcdir@:/:/g
16507 s/^:*//
16508 s/:*$//
16509 x
16510 s/\(=[   ]*\).*/\1/
16511 G
16512 s/\n//
16513 s/^[^=]*=[       ]*$//
16514 }'
16515 fi
16516
16517 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16518 fi # test -n "$CONFIG_FILES"
16519
16520 # Set up the scripts for CONFIG_HEADERS section.
16521 # No need to generate them if there are no CONFIG_HEADERS.
16522 # This happens for instance with `./config.status Makefile'.
16523 if test -n "$CONFIG_HEADERS"; then
16524 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
16525 BEGIN {
16526 _ACEOF
16527
16528 # Transform confdefs.h into an awk script `defines.awk', embedded as
16529 # here-document in config.status, that substitutes the proper values into
16530 # config.h.in to produce config.h.
16531
16532 # Create a delimiter string that does not exist in confdefs.h, to ease
16533 # handling of long lines.
16534 ac_delim='%!_!# '
16535 for ac_last_try in false false :; do
16536   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16537   if test -z "$ac_tt"; then
16538     break
16539   elif $ac_last_try; then
16540     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
16541   else
16542     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16543   fi
16544 done
16545
16546 # For the awk script, D is an array of macro values keyed by name,
16547 # likewise P contains macro parameters if any.  Preserve backslash
16548 # newline sequences.
16549
16550 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16551 sed -n '
16552 s/.\{148\}/&'"$ac_delim"'/g
16553 t rset
16554 :rset
16555 s/^[     ]*#[    ]*define[       ][      ]*/ /
16556 t def
16557 d
16558 :def
16559 s/\\$//
16560 t bsnl
16561 s/["\\]/\\&/g
16562 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
16563 D["\1"]=" \3"/p
16564 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
16565 d
16566 :bsnl
16567 s/["\\]/\\&/g
16568 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
16569 D["\1"]=" \3\\\\\\n"\\/p
16570 t cont
16571 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16572 t cont
16573 d
16574 :cont
16575 n
16576 s/.\{148\}/&'"$ac_delim"'/g
16577 t clear
16578 :clear
16579 s/\\$//
16580 t bsnlc
16581 s/["\\]/\\&/g; s/^/"/; s/$/"/p
16582 d
16583 :bsnlc
16584 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16585 b cont
16586 ' <confdefs.h | sed '
16587 s/'"$ac_delim"'/"\\\
16588 "/g' >>$CONFIG_STATUS || ac_write_fail=1
16589
16590 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16591   for (key in D) D_is_set[key] = 1
16592   FS = "\a"
16593 }
16594 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16595   line = \$ 0
16596   split(line, arg, " ")
16597   if (arg[1] == "#") {
16598     defundef = arg[2]
16599     mac1 = arg[3]
16600   } else {
16601     defundef = substr(arg[1], 2)
16602     mac1 = arg[2]
16603   }
16604   split(mac1, mac2, "(") #)
16605   macro = mac2[1]
16606   prefix = substr(line, 1, index(line, defundef) - 1)
16607   if (D_is_set[macro]) {
16608     # Preserve the white space surrounding the "#".
16609     print prefix "define", macro P[macro] D[macro]
16610     next
16611   } else {
16612     # Replace #undef with comments.  This is necessary, for example,
16613     # in the case of _POSIX_SOURCE, which is predefined and required
16614     # on some systems where configure will not decide to define it.
16615     if (defundef == "undef") {
16616       print "/*", prefix defundef, macro, "*/"
16617       next
16618     }
16619   }
16620 }
16621 { print }
16622 _ACAWK
16623 _ACEOF
16624 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16625   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
16626 fi # test -n "$CONFIG_HEADERS"
16627
16628
16629 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
16630 shift
16631 for ac_tag
16632 do
16633   case $ac_tag in
16634   :[FHLC]) ac_mode=$ac_tag; continue;;
16635   esac
16636   case $ac_mode$ac_tag in
16637   :[FHL]*:*);;
16638   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
16639   :[FH]-) ac_tag=-:-;;
16640   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16641   esac
16642   ac_save_IFS=$IFS
16643   IFS=:
16644   set x $ac_tag
16645   IFS=$ac_save_IFS
16646   shift
16647   ac_file=$1
16648   shift
16649
16650   case $ac_mode in
16651   :L) ac_source=$1;;
16652   :[FH])
16653     ac_file_inputs=
16654     for ac_f
16655     do
16656       case $ac_f in
16657       -) ac_f="$ac_tmp/stdin";;
16658       *) # Look for the file first in the build tree, then in the source tree
16659          # (if the path is not absolute).  The absolute path cannot be DOS-style,
16660          # because $ac_f cannot contain `:'.
16661          test -f "$ac_f" ||
16662            case $ac_f in
16663            [\\/$]*) false;;
16664            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16665            esac ||
16666            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
16667       esac
16668       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16669       as_fn_append ac_file_inputs " '$ac_f'"
16670     done
16671
16672     # Let's still pretend it is `configure' which instantiates (i.e., don't
16673     # use $as_me), people would be surprised to read:
16674     #    /* config.h.  Generated by config.status.  */
16675     configure_input='Generated from '`
16676           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16677         `' by configure.'
16678     if test x"$ac_file" != x-; then
16679       configure_input="$ac_file.  $configure_input"
16680       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16681 $as_echo "$as_me: creating $ac_file" >&6;}
16682     fi
16683     # Neutralize special characters interpreted by sed in replacement strings.
16684     case $configure_input in #(
16685     *\&* | *\|* | *\\* )
16686        ac_sed_conf_input=`$as_echo "$configure_input" |
16687        sed 's/[\\\\&|]/\\\\&/g'`;; #(
16688     *) ac_sed_conf_input=$configure_input;;
16689     esac
16690
16691     case $ac_tag in
16692     *:-:* | *:-) cat >"$ac_tmp/stdin" \
16693       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
16694     esac
16695     ;;
16696   esac
16697
16698   ac_dir=`$as_dirname -- "$ac_file" ||
16699 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16700          X"$ac_file" : 'X\(//\)[^/]' \| \
16701          X"$ac_file" : 'X\(//\)$' \| \
16702          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
16703 $as_echo X"$ac_file" |
16704     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16705             s//\1/
16706             q
16707           }
16708           /^X\(\/\/\)[^/].*/{
16709             s//\1/
16710             q
16711           }
16712           /^X\(\/\/\)$/{
16713             s//\1/
16714             q
16715           }
16716           /^X\(\/\).*/{
16717             s//\1/
16718             q
16719           }
16720           s/.*/./; q'`
16721   as_dir="$ac_dir"; as_fn_mkdir_p
16722   ac_builddir=.
16723
16724 case "$ac_dir" in
16725 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16726 *)
16727   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
16728   # A ".." for each directory in $ac_dir_suffix.
16729   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
16730   case $ac_top_builddir_sub in
16731   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16732   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16733   esac ;;
16734 esac
16735 ac_abs_top_builddir=$ac_pwd
16736 ac_abs_builddir=$ac_pwd$ac_dir_suffix
16737 # for backward compatibility:
16738 ac_top_builddir=$ac_top_build_prefix
16739
16740 case $srcdir in
16741   .)  # We are building in place.
16742     ac_srcdir=.
16743     ac_top_srcdir=$ac_top_builddir_sub
16744     ac_abs_top_srcdir=$ac_pwd ;;
16745   [\\/]* | ?:[\\/]* )  # Absolute name.
16746     ac_srcdir=$srcdir$ac_dir_suffix;
16747     ac_top_srcdir=$srcdir
16748     ac_abs_top_srcdir=$srcdir ;;
16749   *) # Relative name.
16750     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16751     ac_top_srcdir=$ac_top_build_prefix$srcdir
16752     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
16753 esac
16754 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
16755
16756
16757   case $ac_mode in
16758   :F)
16759   #
16760   # CONFIG_FILE
16761   #
16762
16763   case $INSTALL in
16764   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16765   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
16766   esac
16767   ac_MKDIR_P=$MKDIR_P
16768   case $MKDIR_P in
16769   [\\/$]* | ?:[\\/]* ) ;;
16770   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16771   esac
16772 _ACEOF
16773
16774 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16775 # If the template does not know about datarootdir, expand it.
16776 # FIXME: This hack should be removed a few years after 2.60.
16777 ac_datarootdir_hack=; ac_datarootdir_seen=
16778 ac_sed_dataroot='
16779 /datarootdir/ {
16780   p
16781   q
16782 }
16783 /@datadir@/p
16784 /@docdir@/p
16785 /@infodir@/p
16786 /@localedir@/p
16787 /@mandir@/p'
16788 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
16789 *datarootdir*) ac_datarootdir_seen=yes;;
16790 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
16791   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16792 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
16793 _ACEOF
16794 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16795   ac_datarootdir_hack='
16796   s&@datadir@&$datadir&g
16797   s&@docdir@&$docdir&g
16798   s&@infodir@&$infodir&g
16799   s&@localedir@&$localedir&g
16800   s&@mandir@&$mandir&g
16801   s&\\\${datarootdir}&$datarootdir&g' ;;
16802 esac
16803 _ACEOF
16804
16805 # Neutralize VPATH when `$srcdir' = `.'.
16806 # Shell code in configure.ac might set extrasub.
16807 # FIXME: do we really want to maintain this feature?
16808 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16809 ac_sed_extra="$ac_vpsub
16810 $extrasub
16811 _ACEOF
16812 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16813 :t
16814 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16815 s|@configure_input@|$ac_sed_conf_input|;t t
16816 s&@top_builddir@&$ac_top_builddir_sub&;t t
16817 s&@top_build_prefix@&$ac_top_build_prefix&;t t
16818 s&@srcdir@&$ac_srcdir&;t t
16819 s&@abs_srcdir@&$ac_abs_srcdir&;t t
16820 s&@top_srcdir@&$ac_top_srcdir&;t t
16821 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16822 s&@builddir@&$ac_builddir&;t t
16823 s&@abs_builddir@&$ac_abs_builddir&;t t
16824 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16825 s&@INSTALL@&$ac_INSTALL&;t t
16826 s&@MKDIR_P@&$ac_MKDIR_P&;t t
16827 $ac_datarootdir_hack
16828 "
16829 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16830   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16831
16832 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
16833   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16834   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
16835       "$ac_tmp/out"`; test -z "$ac_out"; } &&
16836   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16837 which seems to be undefined.  Please make sure it is defined" >&5
16838 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16839 which seems to be undefined.  Please make sure it is defined" >&2;}
16840
16841   rm -f "$ac_tmp/stdin"
16842   case $ac_file in
16843   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16844   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
16845   esac \
16846   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16847  ;;
16848   :H)
16849   #
16850   # CONFIG_HEADER
16851   #
16852   if test x"$ac_file" != x-; then
16853     {
16854       $as_echo "/* $configure_input  */" \
16855       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16856     } >"$ac_tmp/config.h" \
16857       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16858     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
16859       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16860 $as_echo "$as_me: $ac_file is unchanged" >&6;}
16861     else
16862       rm -f "$ac_file"
16863       mv "$ac_tmp/config.h" "$ac_file" \
16864         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16865     fi
16866   else
16867     $as_echo "/* $configure_input  */" \
16868       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
16869       || as_fn_error $? "could not create -" "$LINENO" 5
16870   fi
16871  ;;
16872   :L)
16873   #
16874   # CONFIG_LINK
16875   #
16876
16877   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
16878     :
16879   else
16880     # Prefer the file from the source tree if names are identical.
16881     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
16882       ac_source=$srcdir/$ac_source
16883     fi
16884
16885     { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
16886 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
16887
16888     if test ! -r "$ac_source"; then
16889       as_fn_error $? "$ac_source: file not found" "$LINENO" 5
16890     fi
16891     rm -f "$ac_file"
16892
16893     # Try a relative symlink, then a hard link, then a copy.
16894     case $ac_source in
16895     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
16896         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
16897     esac
16898     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
16899       ln "$ac_source" "$ac_file" 2>/dev/null ||
16900       cp -p "$ac_source" "$ac_file" ||
16901       as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
16902   fi
16903  ;;
16904   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
16905 $as_echo "$as_me: executing $ac_file commands" >&6;}
16906  ;;
16907   esac
16908
16909
16910   case $ac_file$ac_mode in
16911     "check_win32_symlinks":C)
16912 # Links sometimes fail undetected on Mingw -
16913 # so here we detect it and warn the user
16914 for FILE in $CONFIG_LINKS
16915  do
16916         # test -e works for symlinks in the MinGW console
16917         test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
16918 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
16919  done
16920  ;;
16921     "src/include/pg_config.h":H)
16922 # Update timestamp for pg_config.h (see Makefile.global)
16923 echo >src/include/stamp-h
16924  ;;
16925     "src/include/pg_config_ext.h":H)
16926 # Update timestamp for pg_config_ext.h (see Makefile.global)
16927 echo >src/include/stamp-ext-h
16928  ;;
16929     "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
16930
16931   esac
16932 done # for ac_tag
16933
16934
16935 as_fn_exit 0
16936 _ACEOF
16937 ac_clean_files=$ac_clean_files_save
16938
16939 test $ac_write_fail = 0 ||
16940   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
16941
16942
16943 # configure is writing to config.log, and then calls config.status.
16944 # config.status does its own redirection, appending to config.log.
16945 # Unfortunately, on DOS this fails, as config.log is still kept open
16946 # by configure, so config.status won't be able to write to it; its
16947 # output is simply discarded.  So we exec the FD to /dev/null,
16948 # effectively closing config.log, so it can be properly (re)opened and
16949 # appended to by config.status.  When coming back to configure, we
16950 # need to make the FD available again.
16951 if test "$no_create" != yes; then
16952   ac_cs_success=:
16953   ac_config_status_args=
16954   test "$silent" = yes &&
16955     ac_config_status_args="$ac_config_status_args --quiet"
16956   exec 5>/dev/null
16957   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
16958   exec 5>>config.log
16959   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16960   # would make configure fail if this is the last instruction.
16961   $ac_cs_success || as_fn_exit 1
16962 fi
16963 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16964   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16965 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
16966 fi
16967