]> granicus.if.org Git - postgresql/blob - configure
Stamp 9.6beta1.
[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.6beta1.
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-2016, 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.6beta1'
586 PACKAGE_STRING='PostgreSQL 9.6beta1'
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 PG_VERSION_NUM
631 PROVE
632 OSX
633 XSLTPROC
634 XMLLINT
635 DBTOEPUB
636 COLLATEINDEX
637 DOCBOOKSTYLE
638 have_docbook
639 JADE
640 NSGMLS
641 TCL_SHLIB_LD_LIBS
642 TCL_SHARED_BUILD
643 TCL_LIB_SPEC
644 TCL_LIBS
645 TCL_INCLUDE_SPEC
646 TCL_CONFIG_SH
647 TCLSH
648 XGETTEXT
649 MSGMERGE
650 MSGFMT_FLAGS
651 MSGFMT
652 PG_CRC32C_OBJS
653 CFLAGS_SSE42
654 have_win32_dbghelp
655 HAVE_IPV6
656 LIBOBJS
657 UUID_LIBS
658 LDAP_LIBS_BE
659 LDAP_LIBS_FE
660 PTHREAD_CFLAGS
661 PTHREAD_LIBS
662 PTHREAD_CC
663 ax_pthread_config
664 ZIC
665 python_additional_libs
666 python_libspec
667 python_libdir
668 python_includespec
669 python_version
670 python_majorversion
671 PYTHON
672 perl_embed_ldflags
673 perl_useshrplib
674 perl_privlibexp
675 perl_archlibexp
676 PERL
677 FLEXFLAGS
678 FLEX
679 BISONFLAGS
680 BISON
681 MKDIR_P
682 AWK
683 LN_S
684 TAR
685 install_bin
686 INSTALL_DATA
687 INSTALL_SCRIPT
688 INSTALL_PROGRAM
689 WINDRES
690 DLLWRAP
691 DLLTOOL
692 AR
693 STRIP_SHARED_LIB
694 STRIP_STATIC_LIB
695 STRIP
696 RANLIB
697 ld_R_works
698 with_gnu_ld
699 LD
700 LDFLAGS_SL
701 LDFLAGS_EX
702 ELF_SYS
703 EGREP
704 GREP
705 with_zlib
706 with_system_tzdata
707 with_libxslt
708 with_libxml
709 XML2_CONFIG
710 UUID_EXTRA_OBJS
711 with_uuid
712 with_systemd
713 with_selinux
714 with_openssl
715 krb_srvtab
716 with_python
717 with_perl
718 with_tcl
719 enable_thread_safety
720 INCLUDES
721 autodepend
722 TAS
723 GCC
724 CPP
725 CFLAGS_VECTOR
726 SUN_STUDIO_CC
727 OBJEXT
728 EXEEXT
729 ac_ct_CC
730 CPPFLAGS
731 LDFLAGS
732 CFLAGS
733 CC
734 enable_tap_tests
735 enable_dtrace
736 DTRACEFLAGS
737 DTRACE
738 enable_coverage
739 GENHTML
740 LCOV
741 GCOV
742 enable_debug
743 enable_rpath
744 default_port
745 WANTED_LANGUAGES
746 enable_nls
747 PORTNAME
748 host_os
749 host_vendor
750 host_cpu
751 host
752 build_os
753 build_vendor
754 build_cpu
755 build
756 PG_MAJORVERSION
757 configure_args
758 target_alias
759 host_alias
760 build_alias
761 LIBS
762 ECHO_T
763 ECHO_N
764 ECHO_C
765 DEFS
766 mandir
767 localedir
768 libdir
769 psdir
770 pdfdir
771 dvidir
772 htmldir
773 infodir
774 docdir
775 oldincludedir
776 includedir
777 localstatedir
778 sharedstatedir
779 sysconfdir
780 datadir
781 datarootdir
782 libexecdir
783 sbindir
784 bindir
785 program_transform_name
786 prefix
787 exec_prefix
788 PACKAGE_URL
789 PACKAGE_BUGREPORT
790 PACKAGE_STRING
791 PACKAGE_VERSION
792 PACKAGE_TARNAME
793 PACKAGE_NAME
794 PATH_SEPARATOR
795 SHELL'
796 ac_subst_files=''
797 ac_user_opts='
798 enable_option_checking
799 with_extra_version
800 with_template
801 with_includes
802 with_libraries
803 with_libs
804 enable_integer_datetimes
805 enable_nls
806 with_pgport
807 enable_rpath
808 enable_spinlocks
809 enable_atomics
810 enable_debug
811 enable_profiling
812 enable_coverage
813 enable_dtrace
814 enable_tap_tests
815 with_blocksize
816 with_segsize
817 with_wal_blocksize
818 with_wal_segsize
819 with_CC
820 enable_depend
821 enable_cassert
822 enable_thread_safety
823 with_tcl
824 with_tclconfig
825 with_perl
826 with_python
827 with_gssapi
828 with_krb_srvnam
829 with_pam
830 with_bsd_auth
831 with_ldap
832 with_bonjour
833 with_openssl
834 with_selinux
835 with_systemd
836 with_readline
837 with_libedit_preferred
838 with_uuid
839 with_ossp_uuid
840 with_libxml
841 with_libxslt
842 with_system_tzdata
843 with_zlib
844 with_gnu_ld
845 enable_largefile
846 enable_float4_byval
847 enable_float8_byval
848 '
849       ac_precious_vars='build_alias
850 host_alias
851 target_alias
852 CC
853 CFLAGS
854 LDFLAGS
855 LIBS
856 CPPFLAGS
857 CPP
858 LDFLAGS_EX
859 LDFLAGS_SL
860 DOCBOOKSTYLE'
861
862
863 # Initialize some variables set by options.
864 ac_init_help=
865 ac_init_version=false
866 ac_unrecognized_opts=
867 ac_unrecognized_sep=
868 # The variables have the same names as the options, with
869 # dashes changed to underlines.
870 cache_file=/dev/null
871 exec_prefix=NONE
872 no_create=
873 no_recursion=
874 prefix=NONE
875 program_prefix=NONE
876 program_suffix=NONE
877 program_transform_name=s,x,x,
878 silent=
879 site=
880 srcdir=
881 verbose=
882 x_includes=NONE
883 x_libraries=NONE
884
885 # Installation directory options.
886 # These are left unexpanded so users can "make install exec_prefix=/foo"
887 # and all the variables that are supposed to be based on exec_prefix
888 # by default will actually change.
889 # Use braces instead of parens because sh, perl, etc. also accept them.
890 # (The list follows the same order as the GNU Coding Standards.)
891 bindir='${exec_prefix}/bin'
892 sbindir='${exec_prefix}/sbin'
893 libexecdir='${exec_prefix}/libexec'
894 datarootdir='${prefix}/share'
895 datadir='${datarootdir}'
896 sysconfdir='${prefix}/etc'
897 sharedstatedir='${prefix}/com'
898 localstatedir='${prefix}/var'
899 includedir='${prefix}/include'
900 oldincludedir='/usr/include'
901 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
902 infodir='${datarootdir}/info'
903 htmldir='${docdir}'
904 dvidir='${docdir}'
905 pdfdir='${docdir}'
906 psdir='${docdir}'
907 libdir='${exec_prefix}/lib'
908 localedir='${datarootdir}/locale'
909 mandir='${datarootdir}/man'
910
911 ac_prev=
912 ac_dashdash=
913 for ac_option
914 do
915   # If the previous option needs an argument, assign it.
916   if test -n "$ac_prev"; then
917     eval $ac_prev=\$ac_option
918     ac_prev=
919     continue
920   fi
921
922   case $ac_option in
923   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
924   *=)   ac_optarg= ;;
925   *)    ac_optarg=yes ;;
926   esac
927
928   # Accept the important Cygnus configure options, so we can diagnose typos.
929
930   case $ac_dashdash$ac_option in
931   --)
932     ac_dashdash=yes ;;
933
934   -bindir | --bindir | --bindi | --bind | --bin | --bi)
935     ac_prev=bindir ;;
936   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
937     bindir=$ac_optarg ;;
938
939   -build | --build | --buil | --bui | --bu)
940     ac_prev=build_alias ;;
941   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
942     build_alias=$ac_optarg ;;
943
944   -cache-file | --cache-file | --cache-fil | --cache-fi \
945   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
946     ac_prev=cache_file ;;
947   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
948   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
949     cache_file=$ac_optarg ;;
950
951   --config-cache | -C)
952     cache_file=config.cache ;;
953
954   -datadir | --datadir | --datadi | --datad)
955     ac_prev=datadir ;;
956   -datadir=* | --datadir=* | --datadi=* | --datad=*)
957     datadir=$ac_optarg ;;
958
959   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
960   | --dataroo | --dataro | --datar)
961     ac_prev=datarootdir ;;
962   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
963   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
964     datarootdir=$ac_optarg ;;
965
966   -disable-* | --disable-*)
967     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
968     # Reject names that are not valid shell variable names.
969     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
970       as_fn_error $? "invalid feature name: $ac_useropt"
971     ac_useropt_orig=$ac_useropt
972     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
973     case $ac_user_opts in
974       *"
975 "enable_$ac_useropt"
976 "*) ;;
977       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
978          ac_unrecognized_sep=', ';;
979     esac
980     eval enable_$ac_useropt=no ;;
981
982   -docdir | --docdir | --docdi | --doc | --do)
983     ac_prev=docdir ;;
984   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
985     docdir=$ac_optarg ;;
986
987   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
988     ac_prev=dvidir ;;
989   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
990     dvidir=$ac_optarg ;;
991
992   -enable-* | --enable-*)
993     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
994     # Reject names that are not valid shell variable names.
995     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
996       as_fn_error $? "invalid feature name: $ac_useropt"
997     ac_useropt_orig=$ac_useropt
998     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
999     case $ac_user_opts in
1000       *"
1001 "enable_$ac_useropt"
1002 "*) ;;
1003       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1004          ac_unrecognized_sep=', ';;
1005     esac
1006     eval enable_$ac_useropt=\$ac_optarg ;;
1007
1008   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1009   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1010   | --exec | --exe | --ex)
1011     ac_prev=exec_prefix ;;
1012   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1013   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1014   | --exec=* | --exe=* | --ex=*)
1015     exec_prefix=$ac_optarg ;;
1016
1017   -gas | --gas | --ga | --g)
1018     # Obsolete; use --with-gas.
1019     with_gas=yes ;;
1020
1021   -help | --help | --hel | --he | -h)
1022     ac_init_help=long ;;
1023   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1024     ac_init_help=recursive ;;
1025   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1026     ac_init_help=short ;;
1027
1028   -host | --host | --hos | --ho)
1029     ac_prev=host_alias ;;
1030   -host=* | --host=* | --hos=* | --ho=*)
1031     host_alias=$ac_optarg ;;
1032
1033   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1034     ac_prev=htmldir ;;
1035   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1036   | --ht=*)
1037     htmldir=$ac_optarg ;;
1038
1039   -includedir | --includedir | --includedi | --included | --include \
1040   | --includ | --inclu | --incl | --inc)
1041     ac_prev=includedir ;;
1042   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1043   | --includ=* | --inclu=* | --incl=* | --inc=*)
1044     includedir=$ac_optarg ;;
1045
1046   -infodir | --infodir | --infodi | --infod | --info | --inf)
1047     ac_prev=infodir ;;
1048   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1049     infodir=$ac_optarg ;;
1050
1051   -libdir | --libdir | --libdi | --libd)
1052     ac_prev=libdir ;;
1053   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1054     libdir=$ac_optarg ;;
1055
1056   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1057   | --libexe | --libex | --libe)
1058     ac_prev=libexecdir ;;
1059   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1060   | --libexe=* | --libex=* | --libe=*)
1061     libexecdir=$ac_optarg ;;
1062
1063   -localedir | --localedir | --localedi | --localed | --locale)
1064     ac_prev=localedir ;;
1065   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1066     localedir=$ac_optarg ;;
1067
1068   -localstatedir | --localstatedir | --localstatedi | --localstated \
1069   | --localstate | --localstat | --localsta | --localst | --locals)
1070     ac_prev=localstatedir ;;
1071   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1072   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1073     localstatedir=$ac_optarg ;;
1074
1075   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1076     ac_prev=mandir ;;
1077   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1078     mandir=$ac_optarg ;;
1079
1080   -nfp | --nfp | --nf)
1081     # Obsolete; use --without-fp.
1082     with_fp=no ;;
1083
1084   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1085   | --no-cr | --no-c | -n)
1086     no_create=yes ;;
1087
1088   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1089   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1090     no_recursion=yes ;;
1091
1092   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1093   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1094   | --oldin | --oldi | --old | --ol | --o)
1095     ac_prev=oldincludedir ;;
1096   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1097   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1098   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1099     oldincludedir=$ac_optarg ;;
1100
1101   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1102     ac_prev=prefix ;;
1103   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1104     prefix=$ac_optarg ;;
1105
1106   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1107   | --program-pre | --program-pr | --program-p)
1108     ac_prev=program_prefix ;;
1109   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1110   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1111     program_prefix=$ac_optarg ;;
1112
1113   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1114   | --program-suf | --program-su | --program-s)
1115     ac_prev=program_suffix ;;
1116   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1117   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1118     program_suffix=$ac_optarg ;;
1119
1120   -program-transform-name | --program-transform-name \
1121   | --program-transform-nam | --program-transform-na \
1122   | --program-transform-n | --program-transform- \
1123   | --program-transform | --program-transfor \
1124   | --program-transfo | --program-transf \
1125   | --program-trans | --program-tran \
1126   | --progr-tra | --program-tr | --program-t)
1127     ac_prev=program_transform_name ;;
1128   -program-transform-name=* | --program-transform-name=* \
1129   | --program-transform-nam=* | --program-transform-na=* \
1130   | --program-transform-n=* | --program-transform-=* \
1131   | --program-transform=* | --program-transfor=* \
1132   | --program-transfo=* | --program-transf=* \
1133   | --program-trans=* | --program-tran=* \
1134   | --progr-tra=* | --program-tr=* | --program-t=*)
1135     program_transform_name=$ac_optarg ;;
1136
1137   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1138     ac_prev=pdfdir ;;
1139   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1140     pdfdir=$ac_optarg ;;
1141
1142   -psdir | --psdir | --psdi | --psd | --ps)
1143     ac_prev=psdir ;;
1144   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1145     psdir=$ac_optarg ;;
1146
1147   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1148   | -silent | --silent | --silen | --sile | --sil)
1149     silent=yes ;;
1150
1151   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1152     ac_prev=sbindir ;;
1153   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1154   | --sbi=* | --sb=*)
1155     sbindir=$ac_optarg ;;
1156
1157   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1158   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1159   | --sharedst | --shareds | --shared | --share | --shar \
1160   | --sha | --sh)
1161     ac_prev=sharedstatedir ;;
1162   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1163   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1164   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1165   | --sha=* | --sh=*)
1166     sharedstatedir=$ac_optarg ;;
1167
1168   -site | --site | --sit)
1169     ac_prev=site ;;
1170   -site=* | --site=* | --sit=*)
1171     site=$ac_optarg ;;
1172
1173   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1174     ac_prev=srcdir ;;
1175   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1176     srcdir=$ac_optarg ;;
1177
1178   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1179   | --syscon | --sysco | --sysc | --sys | --sy)
1180     ac_prev=sysconfdir ;;
1181   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1182   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1183     sysconfdir=$ac_optarg ;;
1184
1185   -target | --target | --targe | --targ | --tar | --ta | --t)
1186     ac_prev=target_alias ;;
1187   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1188     target_alias=$ac_optarg ;;
1189
1190   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1191     verbose=yes ;;
1192
1193   -version | --version | --versio | --versi | --vers | -V)
1194     ac_init_version=: ;;
1195
1196   -with-* | --with-*)
1197     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1198     # Reject names that are not valid shell variable names.
1199     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1200       as_fn_error $? "invalid package name: $ac_useropt"
1201     ac_useropt_orig=$ac_useropt
1202     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1203     case $ac_user_opts in
1204       *"
1205 "with_$ac_useropt"
1206 "*) ;;
1207       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1208          ac_unrecognized_sep=', ';;
1209     esac
1210     eval with_$ac_useropt=\$ac_optarg ;;
1211
1212   -without-* | --without-*)
1213     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1214     # Reject names that are not valid shell variable names.
1215     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1216       as_fn_error $? "invalid package name: $ac_useropt"
1217     ac_useropt_orig=$ac_useropt
1218     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1219     case $ac_user_opts in
1220       *"
1221 "with_$ac_useropt"
1222 "*) ;;
1223       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1224          ac_unrecognized_sep=', ';;
1225     esac
1226     eval with_$ac_useropt=no ;;
1227
1228   --x)
1229     # Obsolete; use --with-x.
1230     with_x=yes ;;
1231
1232   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1233   | --x-incl | --x-inc | --x-in | --x-i)
1234     ac_prev=x_includes ;;
1235   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1236   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1237     x_includes=$ac_optarg ;;
1238
1239   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1240   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1241     ac_prev=x_libraries ;;
1242   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1243   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1244     x_libraries=$ac_optarg ;;
1245
1246   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1247 Try \`$0 --help' for more information"
1248     ;;
1249
1250   *=*)
1251     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1252     # Reject names that are not valid shell variable names.
1253     case $ac_envvar in #(
1254       '' | [0-9]* | *[!_$as_cr_alnum]* )
1255       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1256     esac
1257     eval $ac_envvar=\$ac_optarg
1258     export $ac_envvar ;;
1259
1260   *)
1261     # FIXME: should be removed in autoconf 3.0.
1262     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1263     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1264       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1265     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1266     ;;
1267
1268   esac
1269 done
1270
1271 if test -n "$ac_prev"; then
1272   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1273   as_fn_error $? "missing argument to $ac_option"
1274 fi
1275
1276 if test -n "$ac_unrecognized_opts"; then
1277   case $enable_option_checking in
1278     no) ;;
1279     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1280     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1281   esac
1282 fi
1283
1284 # Check all directory arguments for consistency.
1285 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1286                 datadir sysconfdir sharedstatedir localstatedir includedir \
1287                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1288                 libdir localedir mandir
1289 do
1290   eval ac_val=\$$ac_var
1291   # Remove trailing slashes.
1292   case $ac_val in
1293     */ )
1294       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1295       eval $ac_var=\$ac_val;;
1296   esac
1297   # Be sure to have absolute directory names.
1298   case $ac_val in
1299     [\\/$]* | ?:[\\/]* )  continue;;
1300     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1301   esac
1302   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1303 done
1304
1305 # There might be people who depend on the old broken behavior: `$host'
1306 # used to hold the argument of --host etc.
1307 # FIXME: To remove some day.
1308 build=$build_alias
1309 host=$host_alias
1310 target=$target_alias
1311
1312 # FIXME: To remove some day.
1313 if test "x$host_alias" != x; then
1314   if test "x$build_alias" = x; then
1315     cross_compiling=maybe
1316   elif test "x$build_alias" != "x$host_alias"; then
1317     cross_compiling=yes
1318   fi
1319 fi
1320
1321 ac_tool_prefix=
1322 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1323
1324 test "$silent" = yes && exec 6>/dev/null
1325
1326
1327 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1328 ac_ls_di=`ls -di .` &&
1329 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1330   as_fn_error $? "working directory cannot be determined"
1331 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1332   as_fn_error $? "pwd does not report name of working directory"
1333
1334
1335 # Find the source files, if location was not specified.
1336 if test -z "$srcdir"; then
1337   ac_srcdir_defaulted=yes
1338   # Try the directory containing this script, then the parent directory.
1339   ac_confdir=`$as_dirname -- "$as_myself" ||
1340 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1341          X"$as_myself" : 'X\(//\)[^/]' \| \
1342          X"$as_myself" : 'X\(//\)$' \| \
1343          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1344 $as_echo X"$as_myself" |
1345     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1346             s//\1/
1347             q
1348           }
1349           /^X\(\/\/\)[^/].*/{
1350             s//\1/
1351             q
1352           }
1353           /^X\(\/\/\)$/{
1354             s//\1/
1355             q
1356           }
1357           /^X\(\/\).*/{
1358             s//\1/
1359             q
1360           }
1361           s/.*/./; q'`
1362   srcdir=$ac_confdir
1363   if test ! -r "$srcdir/$ac_unique_file"; then
1364     srcdir=..
1365   fi
1366 else
1367   ac_srcdir_defaulted=no
1368 fi
1369 if test ! -r "$srcdir/$ac_unique_file"; then
1370   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1371   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1372 fi
1373 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1374 ac_abs_confdir=`(
1375         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1376         pwd)`
1377 # When building in place, set srcdir=.
1378 if test "$ac_abs_confdir" = "$ac_pwd"; then
1379   srcdir=.
1380 fi
1381 # Remove unnecessary trailing slashes from srcdir.
1382 # Double slashes in file names in object file debugging info
1383 # mess up M-x gdb in Emacs.
1384 case $srcdir in
1385 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1386 esac
1387 for ac_var in $ac_precious_vars; do
1388   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1389   eval ac_env_${ac_var}_value=\$${ac_var}
1390   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1391   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1392 done
1393
1394 #
1395 # Report the --help message.
1396 #
1397 if test "$ac_init_help" = "long"; then
1398   # Omit some internal or obsolete options to make the list less imposing.
1399   # This message is too long to be a string in the A/UX 3.1 sh.
1400   cat <<_ACEOF
1401 \`configure' configures PostgreSQL 9.6beta1 to adapt to many kinds of systems.
1402
1403 Usage: $0 [OPTION]... [VAR=VALUE]...
1404
1405 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1406 VAR=VALUE.  See below for descriptions of some of the useful variables.
1407
1408 Defaults for the options are specified in brackets.
1409
1410 Configuration:
1411   -h, --help              display this help and exit
1412       --help=short        display options specific to this package
1413       --help=recursive    display the short help of all the included packages
1414   -V, --version           display version information and exit
1415   -q, --quiet, --silent   do not print \`checking ...' messages
1416       --cache-file=FILE   cache test results in FILE [disabled]
1417   -C, --config-cache      alias for \`--cache-file=config.cache'
1418   -n, --no-create         do not create output files
1419       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1420
1421 Installation directories:
1422   --prefix=PREFIX         install architecture-independent files in PREFIX
1423                           [$ac_default_prefix]
1424   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1425                           [PREFIX]
1426
1427 By default, \`make install' will install all the files in
1428 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1429 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1430 for instance \`--prefix=\$HOME'.
1431
1432 For better control, use the options below.
1433
1434 Fine tuning of the installation directories:
1435   --bindir=DIR            user executables [EPREFIX/bin]
1436   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1437   --libexecdir=DIR        program executables [EPREFIX/libexec]
1438   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1439   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1440   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1441   --libdir=DIR            object code libraries [EPREFIX/lib]
1442   --includedir=DIR        C header files [PREFIX/include]
1443   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1444   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1445   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1446   --infodir=DIR           info documentation [DATAROOTDIR/info]
1447   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1448   --mandir=DIR            man documentation [DATAROOTDIR/man]
1449   --docdir=DIR            documentation root [DATAROOTDIR/doc/postgresql]
1450   --htmldir=DIR           html documentation [DOCDIR]
1451   --dvidir=DIR            dvi documentation [DOCDIR]
1452   --pdfdir=DIR            pdf documentation [DOCDIR]
1453   --psdir=DIR             ps documentation [DOCDIR]
1454 _ACEOF
1455
1456   cat <<\_ACEOF
1457
1458 System types:
1459   --build=BUILD     configure for building on BUILD [guessed]
1460   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1461 _ACEOF
1462 fi
1463
1464 if test -n "$ac_init_help"; then
1465   case $ac_init_help in
1466      short | recursive ) echo "Configuration of PostgreSQL 9.6beta1:";;
1467    esac
1468   cat <<\_ACEOF
1469
1470 Optional Features:
1471   --disable-option-checking  ignore unrecognized --enable/--with options
1472   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1473   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1474   --disable-integer-datetimes
1475                           disable 64-bit integer date/time support
1476   --enable-nls[=LANGUAGES]
1477                           enable Native Language Support
1478   --disable-rpath         do not embed shared library search path in
1479                           executables
1480   --disable-spinlocks     do not use spinlocks
1481   --disable-atomics       do not use atomic operations
1482   --enable-debug          build with debugging symbols (-g)
1483   --enable-profiling      build with profiling enabled
1484   --enable-coverage       build with coverage testing instrumentation
1485   --enable-dtrace         build with DTrace support
1486   --enable-tap-tests      enable TAP tests (requires Perl and IPC::Run)
1487   --enable-depend         turn on automatic dependency tracking
1488   --enable-cassert        enable assertion checks (for debugging)
1489   --disable-thread-safety disable thread-safety in client libraries
1490   --disable-largefile     omit support for large files
1491   --disable-float4-byval  disable float4 passed by value
1492   --disable-float8-byval  disable float8 passed by value
1493
1494 Optional Packages:
1495   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1496   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1497   --with-extra-version=STRING
1498                           append STRING to version
1499   --with-template=NAME    override operating system template
1500   --with-includes=DIRS    look for additional header files in DIRS
1501   --with-libraries=DIRS   look for additional libraries in DIRS
1502   --with-libs=DIRS        alternative spelling of --with-libraries
1503   --with-pgport=PORTNUM   set default port number [5432]
1504   --with-blocksize=BLOCKSIZE
1505                           set table block size in kB [8]
1506   --with-segsize=SEGSIZE  set table segment size in GB [1]
1507   --with-wal-blocksize=BLOCKSIZE
1508                           set WAL block size in kB [8]
1509   --with-wal-segsize=SEGSIZE
1510                           set WAL segment size in MB [16]
1511   --with-CC=CMD           set compiler (deprecated)
1512   --with-tcl              build Tcl modules (PL/Tcl)
1513   --with-tclconfig=DIR    tclConfig.sh is in DIR
1514   --with-perl             build Perl modules (PL/Perl)
1515   --with-python           build Python modules (PL/Python)
1516   --with-gssapi           build with GSSAPI support
1517   --with-krb-srvnam=NAME  default service principal name in Kerberos (GSSAPI)
1518                           [postgres]
1519   --with-pam              build with PAM support
1520   --with-bsd-auth         build with BSD Authentication support
1521   --with-ldap             build with LDAP support
1522   --with-bonjour          build with Bonjour support
1523   --with-openssl          build with OpenSSL support
1524   --with-selinux          build with SELinux support
1525   --with-systemd          build with systemd support
1526   --without-readline      do not use GNU Readline nor BSD Libedit for editing
1527   --with-libedit-preferred
1528                           prefer BSD Libedit over GNU Readline
1529   --with-uuid=LIB         build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1530   --with-ossp-uuid        obsolete spelling of --with-uuid=ossp
1531   --with-libxml           build with XML support
1532   --with-libxslt          use XSLT support when building contrib/xml2
1533   --with-system-tzdata=DIR
1534                           use system time zone data in DIR
1535   --without-zlib          do not use Zlib
1536   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1537
1538 Some influential environment variables:
1539   CC          C compiler command
1540   CFLAGS      C compiler flags
1541   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1542               nonstandard directory <lib dir>
1543   LIBS        libraries to pass to the linker, e.g. -l<library>
1544   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1545               you have headers in a nonstandard directory <include dir>
1546   CPP         C preprocessor
1547   LDFLAGS_EX  extra linker flags for linking executables only
1548   LDFLAGS_SL  extra linker flags for linking shared libraries only
1549   DOCBOOKSTYLE
1550               location of DocBook stylesheets
1551
1552 Use these variables to override the choices made by `configure' or to help
1553 it to find libraries and programs with nonstandard names/locations.
1554
1555 Report bugs to <pgsql-bugs@postgresql.org>.
1556 _ACEOF
1557 ac_status=$?
1558 fi
1559
1560 if test "$ac_init_help" = "recursive"; then
1561   # If there are subdirs, report their specific --help.
1562   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1563     test -d "$ac_dir" ||
1564       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1565       continue
1566     ac_builddir=.
1567
1568 case "$ac_dir" in
1569 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1570 *)
1571   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1572   # A ".." for each directory in $ac_dir_suffix.
1573   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1574   case $ac_top_builddir_sub in
1575   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1576   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1577   esac ;;
1578 esac
1579 ac_abs_top_builddir=$ac_pwd
1580 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1581 # for backward compatibility:
1582 ac_top_builddir=$ac_top_build_prefix
1583
1584 case $srcdir in
1585   .)  # We are building in place.
1586     ac_srcdir=.
1587     ac_top_srcdir=$ac_top_builddir_sub
1588     ac_abs_top_srcdir=$ac_pwd ;;
1589   [\\/]* | ?:[\\/]* )  # Absolute name.
1590     ac_srcdir=$srcdir$ac_dir_suffix;
1591     ac_top_srcdir=$srcdir
1592     ac_abs_top_srcdir=$srcdir ;;
1593   *) # Relative name.
1594     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1595     ac_top_srcdir=$ac_top_build_prefix$srcdir
1596     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1597 esac
1598 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1599
1600     cd "$ac_dir" || { ac_status=$?; continue; }
1601     # Check for guested configure.
1602     if test -f "$ac_srcdir/configure.gnu"; then
1603       echo &&
1604       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1605     elif test -f "$ac_srcdir/configure"; then
1606       echo &&
1607       $SHELL "$ac_srcdir/configure" --help=recursive
1608     else
1609       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1610     fi || ac_status=$?
1611     cd "$ac_pwd" || { ac_status=$?; break; }
1612   done
1613 fi
1614
1615 test -n "$ac_init_help" && exit $ac_status
1616 if $ac_init_version; then
1617   cat <<\_ACEOF
1618 PostgreSQL configure 9.6beta1
1619 generated by GNU Autoconf 2.69
1620
1621 Copyright (C) 2012 Free Software Foundation, Inc.
1622 This configure script is free software; the Free Software Foundation
1623 gives unlimited permission to copy, distribute and modify it.
1624
1625 Copyright (c) 1996-2016, PostgreSQL Global Development Group
1626 _ACEOF
1627   exit
1628 fi
1629
1630 ## ------------------------ ##
1631 ## Autoconf initialization. ##
1632 ## ------------------------ ##
1633
1634 # ac_fn_c_try_compile LINENO
1635 # --------------------------
1636 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1637 ac_fn_c_try_compile ()
1638 {
1639   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1640   rm -f conftest.$ac_objext
1641   if { { ac_try="$ac_compile"
1642 case "(($ac_try" in
1643   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1644   *) ac_try_echo=$ac_try;;
1645 esac
1646 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1647 $as_echo "$ac_try_echo"; } >&5
1648   (eval "$ac_compile") 2>conftest.err
1649   ac_status=$?
1650   if test -s conftest.err; then
1651     grep -v '^ *+' conftest.err >conftest.er1
1652     cat conftest.er1 >&5
1653     mv -f conftest.er1 conftest.err
1654   fi
1655   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1656   test $ac_status = 0; } && {
1657          test -z "$ac_c_werror_flag" ||
1658          test ! -s conftest.err
1659        } && test -s conftest.$ac_objext; then :
1660   ac_retval=0
1661 else
1662   $as_echo "$as_me: failed program was:" >&5
1663 sed 's/^/| /' conftest.$ac_ext >&5
1664
1665         ac_retval=1
1666 fi
1667   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1668   as_fn_set_status $ac_retval
1669
1670 } # ac_fn_c_try_compile
1671
1672 # ac_fn_c_try_link LINENO
1673 # -----------------------
1674 # Try to link conftest.$ac_ext, and return whether this succeeded.
1675 ac_fn_c_try_link ()
1676 {
1677   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1678   rm -f conftest.$ac_objext conftest$ac_exeext
1679   if { { ac_try="$ac_link"
1680 case "(($ac_try" in
1681   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1682   *) ac_try_echo=$ac_try;;
1683 esac
1684 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1685 $as_echo "$ac_try_echo"; } >&5
1686   (eval "$ac_link") 2>conftest.err
1687   ac_status=$?
1688   if test -s conftest.err; then
1689     grep -v '^ *+' conftest.err >conftest.er1
1690     cat conftest.er1 >&5
1691     mv -f conftest.er1 conftest.err
1692   fi
1693   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1694   test $ac_status = 0; } && {
1695          test -z "$ac_c_werror_flag" ||
1696          test ! -s conftest.err
1697        } && test -s conftest$ac_exeext && {
1698          test "$cross_compiling" = yes ||
1699          test -x conftest$ac_exeext
1700        }; then :
1701   ac_retval=0
1702 else
1703   $as_echo "$as_me: failed program was:" >&5
1704 sed 's/^/| /' conftest.$ac_ext >&5
1705
1706         ac_retval=1
1707 fi
1708   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1709   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1710   # interfere with the next link command; also delete a directory that is
1711   # left behind by Apple's compiler.  We do this before executing the actions.
1712   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1713   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1714   as_fn_set_status $ac_retval
1715
1716 } # ac_fn_c_try_link
1717
1718 # ac_fn_c_try_cpp LINENO
1719 # ----------------------
1720 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1721 ac_fn_c_try_cpp ()
1722 {
1723   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1724   if { { ac_try="$ac_cpp conftest.$ac_ext"
1725 case "(($ac_try" in
1726   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1727   *) ac_try_echo=$ac_try;;
1728 esac
1729 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1730 $as_echo "$ac_try_echo"; } >&5
1731   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1732   ac_status=$?
1733   if test -s conftest.err; then
1734     grep -v '^ *+' conftest.err >conftest.er1
1735     cat conftest.er1 >&5
1736     mv -f conftest.er1 conftest.err
1737   fi
1738   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1739   test $ac_status = 0; } > conftest.i && {
1740          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1741          test ! -s conftest.err
1742        }; then :
1743   ac_retval=0
1744 else
1745   $as_echo "$as_me: failed program was:" >&5
1746 sed 's/^/| /' conftest.$ac_ext >&5
1747
1748     ac_retval=1
1749 fi
1750   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1751   as_fn_set_status $ac_retval
1752
1753 } # ac_fn_c_try_cpp
1754
1755 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1756 # -------------------------------------------------------
1757 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1758 # the include files in INCLUDES and setting the cache variable VAR
1759 # accordingly.
1760 ac_fn_c_check_header_mongrel ()
1761 {
1762   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1763   if eval \${$3+:} false; then :
1764   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1765 $as_echo_n "checking for $2... " >&6; }
1766 if eval \${$3+:} false; then :
1767   $as_echo_n "(cached) " >&6
1768 fi
1769 eval ac_res=\$$3
1770                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1771 $as_echo "$ac_res" >&6; }
1772 else
1773   # Is the header compilable?
1774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1775 $as_echo_n "checking $2 usability... " >&6; }
1776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1777 /* end confdefs.h.  */
1778 $4
1779 #include <$2>
1780 _ACEOF
1781 if ac_fn_c_try_compile "$LINENO"; then :
1782   ac_header_compiler=yes
1783 else
1784   ac_header_compiler=no
1785 fi
1786 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1788 $as_echo "$ac_header_compiler" >&6; }
1789
1790 # Is the header present?
1791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1792 $as_echo_n "checking $2 presence... " >&6; }
1793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1794 /* end confdefs.h.  */
1795 #include <$2>
1796 _ACEOF
1797 if ac_fn_c_try_cpp "$LINENO"; then :
1798   ac_header_preproc=yes
1799 else
1800   ac_header_preproc=no
1801 fi
1802 rm -f conftest.err conftest.i conftest.$ac_ext
1803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1804 $as_echo "$ac_header_preproc" >&6; }
1805
1806 # So?  What about this header?
1807 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1808   yes:no: )
1809     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1810 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1811     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1812 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1813     ;;
1814   no:yes:* )
1815     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1816 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1817     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1818 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1819     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1820 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1821     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1822 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1823     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1824 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1825 ( $as_echo "## ---------------------------------------- ##
1826 ## Report this to pgsql-bugs@postgresql.org ##
1827 ## ---------------------------------------- ##"
1828      ) | sed "s/^/$as_me: WARNING:     /" >&2
1829     ;;
1830 esac
1831   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1832 $as_echo_n "checking for $2... " >&6; }
1833 if eval \${$3+:} false; then :
1834   $as_echo_n "(cached) " >&6
1835 else
1836   eval "$3=\$ac_header_compiler"
1837 fi
1838 eval ac_res=\$$3
1839                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1840 $as_echo "$ac_res" >&6; }
1841 fi
1842   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1843
1844 } # ac_fn_c_check_header_mongrel
1845
1846 # ac_fn_c_try_run LINENO
1847 # ----------------------
1848 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1849 # that executables *can* be run.
1850 ac_fn_c_try_run ()
1851 {
1852   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1853   if { { ac_try="$ac_link"
1854 case "(($ac_try" in
1855   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1856   *) ac_try_echo=$ac_try;;
1857 esac
1858 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1859 $as_echo "$ac_try_echo"; } >&5
1860   (eval "$ac_link") 2>&5
1861   ac_status=$?
1862   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1863   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1864   { { case "(($ac_try" in
1865   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1866   *) ac_try_echo=$ac_try;;
1867 esac
1868 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1869 $as_echo "$ac_try_echo"; } >&5
1870   (eval "$ac_try") 2>&5
1871   ac_status=$?
1872   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1873   test $ac_status = 0; }; }; then :
1874   ac_retval=0
1875 else
1876   $as_echo "$as_me: program exited with status $ac_status" >&5
1877        $as_echo "$as_me: failed program was:" >&5
1878 sed 's/^/| /' conftest.$ac_ext >&5
1879
1880        ac_retval=$ac_status
1881 fi
1882   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1883   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1884   as_fn_set_status $ac_retval
1885
1886 } # ac_fn_c_try_run
1887
1888 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1889 # -------------------------------------------------------
1890 # Tests whether HEADER exists and can be compiled using the include files in
1891 # INCLUDES, setting the cache variable VAR accordingly.
1892 ac_fn_c_check_header_compile ()
1893 {
1894   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1895   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1896 $as_echo_n "checking for $2... " >&6; }
1897 if eval \${$3+:} false; then :
1898   $as_echo_n "(cached) " >&6
1899 else
1900   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1901 /* end confdefs.h.  */
1902 $4
1903 #include <$2>
1904 _ACEOF
1905 if ac_fn_c_try_compile "$LINENO"; then :
1906   eval "$3=yes"
1907 else
1908   eval "$3=no"
1909 fi
1910 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1911 fi
1912 eval ac_res=\$$3
1913                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1914 $as_echo "$ac_res" >&6; }
1915   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1916
1917 } # ac_fn_c_check_header_compile
1918
1919 # ac_fn_c_check_func LINENO FUNC VAR
1920 # ----------------------------------
1921 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1922 ac_fn_c_check_func ()
1923 {
1924   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1925   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1926 $as_echo_n "checking for $2... " >&6; }
1927 if eval \${$3+:} false; then :
1928   $as_echo_n "(cached) " >&6
1929 else
1930   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1931 /* end confdefs.h.  */
1932 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1933    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1934 #define $2 innocuous_$2
1935
1936 /* System header to define __stub macros and hopefully few prototypes,
1937     which can conflict with char $2 (); below.
1938     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1939     <limits.h> exists even on freestanding compilers.  */
1940
1941 #ifdef __STDC__
1942 # include <limits.h>
1943 #else
1944 # include <assert.h>
1945 #endif
1946
1947 #undef $2
1948
1949 /* Override any GCC internal prototype to avoid an error.
1950    Use char because int might match the return type of a GCC
1951    builtin and then its argument prototype would still apply.  */
1952 #ifdef __cplusplus
1953 extern "C"
1954 #endif
1955 char $2 ();
1956 /* The GNU C library defines this for functions which it implements
1957     to always fail with ENOSYS.  Some functions are actually named
1958     something starting with __ and the normal name is an alias.  */
1959 #if defined __stub_$2 || defined __stub___$2
1960 choke me
1961 #endif
1962
1963 int
1964 main ()
1965 {
1966 return $2 ();
1967   ;
1968   return 0;
1969 }
1970 _ACEOF
1971 if ac_fn_c_try_link "$LINENO"; then :
1972   eval "$3=yes"
1973 else
1974   eval "$3=no"
1975 fi
1976 rm -f core conftest.err conftest.$ac_objext \
1977     conftest$ac_exeext conftest.$ac_ext
1978 fi
1979 eval ac_res=\$$3
1980                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1981 $as_echo "$ac_res" >&6; }
1982   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1983
1984 } # ac_fn_c_check_func
1985
1986 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
1987 # ----------------------------------------------------
1988 # Tries to find if the field MEMBER exists in type AGGR, after including
1989 # INCLUDES, setting cache variable VAR accordingly.
1990 ac_fn_c_check_member ()
1991 {
1992   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1993   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
1994 $as_echo_n "checking for $2.$3... " >&6; }
1995 if eval \${$4+:} false; then :
1996   $as_echo_n "(cached) " >&6
1997 else
1998   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1999 /* end confdefs.h.  */
2000 $5
2001 int
2002 main ()
2003 {
2004 static $2 ac_aggr;
2005 if (ac_aggr.$3)
2006 return 0;
2007   ;
2008   return 0;
2009 }
2010 _ACEOF
2011 if ac_fn_c_try_compile "$LINENO"; then :
2012   eval "$4=yes"
2013 else
2014   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2015 /* end confdefs.h.  */
2016 $5
2017 int
2018 main ()
2019 {
2020 static $2 ac_aggr;
2021 if (sizeof ac_aggr.$3)
2022 return 0;
2023   ;
2024   return 0;
2025 }
2026 _ACEOF
2027 if ac_fn_c_try_compile "$LINENO"; then :
2028   eval "$4=yes"
2029 else
2030   eval "$4=no"
2031 fi
2032 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2033 fi
2034 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2035 fi
2036 eval ac_res=\$$4
2037                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2038 $as_echo "$ac_res" >&6; }
2039   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2040
2041 } # ac_fn_c_check_member
2042
2043 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2044 # -------------------------------------------
2045 # Tests whether TYPE exists after having included INCLUDES, setting cache
2046 # variable VAR accordingly.
2047 ac_fn_c_check_type ()
2048 {
2049   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2050   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2051 $as_echo_n "checking for $2... " >&6; }
2052 if eval \${$3+:} false; then :
2053   $as_echo_n "(cached) " >&6
2054 else
2055   eval "$3=no"
2056   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2057 /* end confdefs.h.  */
2058 $4
2059 int
2060 main ()
2061 {
2062 if (sizeof ($2))
2063          return 0;
2064   ;
2065   return 0;
2066 }
2067 _ACEOF
2068 if ac_fn_c_try_compile "$LINENO"; then :
2069   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2070 /* end confdefs.h.  */
2071 $4
2072 int
2073 main ()
2074 {
2075 if (sizeof (($2)))
2076             return 0;
2077   ;
2078   return 0;
2079 }
2080 _ACEOF
2081 if ac_fn_c_try_compile "$LINENO"; then :
2082
2083 else
2084   eval "$3=yes"
2085 fi
2086 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2087 fi
2088 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2089 fi
2090 eval ac_res=\$$3
2091                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2092 $as_echo "$ac_res" >&6; }
2093   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2094
2095 } # ac_fn_c_check_type
2096
2097 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2098 # --------------------------------------------
2099 # Tries to find the compile-time value of EXPR in a program that includes
2100 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2101 # computed
2102 ac_fn_c_compute_int ()
2103 {
2104   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2105   if test "$cross_compiling" = yes; then
2106     # Depending upon the size, compute the lo and hi bounds.
2107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2108 /* end confdefs.h.  */
2109 $4
2110 int
2111 main ()
2112 {
2113 static int test_array [1 - 2 * !(($2) >= 0)];
2114 test_array [0] = 0;
2115 return test_array [0];
2116
2117   ;
2118   return 0;
2119 }
2120 _ACEOF
2121 if ac_fn_c_try_compile "$LINENO"; then :
2122   ac_lo=0 ac_mid=0
2123   while :; do
2124     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2125 /* end confdefs.h.  */
2126 $4
2127 int
2128 main ()
2129 {
2130 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2131 test_array [0] = 0;
2132 return test_array [0];
2133
2134   ;
2135   return 0;
2136 }
2137 _ACEOF
2138 if ac_fn_c_try_compile "$LINENO"; then :
2139   ac_hi=$ac_mid; break
2140 else
2141   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2142                         if test $ac_lo -le $ac_mid; then
2143                           ac_lo= ac_hi=
2144                           break
2145                         fi
2146                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2147 fi
2148 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2149   done
2150 else
2151   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2152 /* end confdefs.h.  */
2153 $4
2154 int
2155 main ()
2156 {
2157 static int test_array [1 - 2 * !(($2) < 0)];
2158 test_array [0] = 0;
2159 return test_array [0];
2160
2161   ;
2162   return 0;
2163 }
2164 _ACEOF
2165 if ac_fn_c_try_compile "$LINENO"; then :
2166   ac_hi=-1 ac_mid=-1
2167   while :; do
2168     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2169 /* end confdefs.h.  */
2170 $4
2171 int
2172 main ()
2173 {
2174 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2175 test_array [0] = 0;
2176 return test_array [0];
2177
2178   ;
2179   return 0;
2180 }
2181 _ACEOF
2182 if ac_fn_c_try_compile "$LINENO"; then :
2183   ac_lo=$ac_mid; break
2184 else
2185   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2186                         if test $ac_mid -le $ac_hi; then
2187                           ac_lo= ac_hi=
2188                           break
2189                         fi
2190                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2191 fi
2192 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2193   done
2194 else
2195   ac_lo= ac_hi=
2196 fi
2197 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2198 fi
2199 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2200 # Binary search between lo and hi bounds.
2201 while test "x$ac_lo" != "x$ac_hi"; do
2202   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2203   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2204 /* end confdefs.h.  */
2205 $4
2206 int
2207 main ()
2208 {
2209 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2210 test_array [0] = 0;
2211 return test_array [0];
2212
2213   ;
2214   return 0;
2215 }
2216 _ACEOF
2217 if ac_fn_c_try_compile "$LINENO"; then :
2218   ac_hi=$ac_mid
2219 else
2220   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2221 fi
2222 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2223 done
2224 case $ac_lo in #((
2225 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2226 '') ac_retval=1 ;;
2227 esac
2228   else
2229     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2230 /* end confdefs.h.  */
2231 $4
2232 static long int longval () { return $2; }
2233 static unsigned long int ulongval () { return $2; }
2234 #include <stdio.h>
2235 #include <stdlib.h>
2236 int
2237 main ()
2238 {
2239
2240   FILE *f = fopen ("conftest.val", "w");
2241   if (! f)
2242     return 1;
2243   if (($2) < 0)
2244     {
2245       long int i = longval ();
2246       if (i != ($2))
2247         return 1;
2248       fprintf (f, "%ld", i);
2249     }
2250   else
2251     {
2252       unsigned long int i = ulongval ();
2253       if (i != ($2))
2254         return 1;
2255       fprintf (f, "%lu", i);
2256     }
2257   /* Do not output a trailing newline, as this causes \r\n confusion
2258      on some platforms.  */
2259   return ferror (f) || fclose (f) != 0;
2260
2261   ;
2262   return 0;
2263 }
2264 _ACEOF
2265 if ac_fn_c_try_run "$LINENO"; then :
2266   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2267 else
2268   ac_retval=1
2269 fi
2270 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2271   conftest.$ac_objext conftest.beam conftest.$ac_ext
2272 rm -f conftest.val
2273
2274   fi
2275   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2276   as_fn_set_status $ac_retval
2277
2278 } # ac_fn_c_compute_int
2279
2280 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2281 # ---------------------------------------------
2282 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2283 # accordingly.
2284 ac_fn_c_check_decl ()
2285 {
2286   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2287   as_decl_name=`echo $2|sed 's/ *(.*//'`
2288   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2289   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2290 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2291 if eval \${$3+:} false; then :
2292   $as_echo_n "(cached) " >&6
2293 else
2294   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2295 /* end confdefs.h.  */
2296 $4
2297 int
2298 main ()
2299 {
2300 #ifndef $as_decl_name
2301 #ifdef __cplusplus
2302   (void) $as_decl_use;
2303 #else
2304   (void) $as_decl_name;
2305 #endif
2306 #endif
2307
2308   ;
2309   return 0;
2310 }
2311 _ACEOF
2312 if ac_fn_c_try_compile "$LINENO"; then :
2313   eval "$3=yes"
2314 else
2315   eval "$3=no"
2316 fi
2317 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2318 fi
2319 eval ac_res=\$$3
2320                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2321 $as_echo "$ac_res" >&6; }
2322   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2323
2324 } # ac_fn_c_check_decl
2325 cat >config.log <<_ACEOF
2326 This file contains any messages produced by compilers while
2327 running configure, to aid debugging if configure makes a mistake.
2328
2329 It was created by PostgreSQL $as_me 9.6beta1, which was
2330 generated by GNU Autoconf 2.69.  Invocation command line was
2331
2332   $ $0 $@
2333
2334 _ACEOF
2335 exec 5>>config.log
2336 {
2337 cat <<_ASUNAME
2338 ## --------- ##
2339 ## Platform. ##
2340 ## --------- ##
2341
2342 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2343 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2344 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2345 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2346 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2347
2348 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2349 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2350
2351 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2352 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2353 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2354 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2355 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2356 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2357 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2358
2359 _ASUNAME
2360
2361 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2362 for as_dir in $PATH
2363 do
2364   IFS=$as_save_IFS
2365   test -z "$as_dir" && as_dir=.
2366     $as_echo "PATH: $as_dir"
2367   done
2368 IFS=$as_save_IFS
2369
2370 } >&5
2371
2372 cat >&5 <<_ACEOF
2373
2374
2375 ## ----------- ##
2376 ## Core tests. ##
2377 ## ----------- ##
2378
2379 _ACEOF
2380
2381
2382 # Keep a trace of the command line.
2383 # Strip out --no-create and --no-recursion so they do not pile up.
2384 # Strip out --silent because we don't want to record it for future runs.
2385 # Also quote any args containing shell meta-characters.
2386 # Make two passes to allow for proper duplicate-argument suppression.
2387 ac_configure_args=
2388 ac_configure_args0=
2389 ac_configure_args1=
2390 ac_must_keep_next=false
2391 for ac_pass in 1 2
2392 do
2393   for ac_arg
2394   do
2395     case $ac_arg in
2396     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2397     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2398     | -silent | --silent | --silen | --sile | --sil)
2399       continue ;;
2400     *\'*)
2401       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2402     esac
2403     case $ac_pass in
2404     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2405     2)
2406       as_fn_append ac_configure_args1 " '$ac_arg'"
2407       if test $ac_must_keep_next = true; then
2408         ac_must_keep_next=false # Got value, back to normal.
2409       else
2410         case $ac_arg in
2411           *=* | --config-cache | -C | -disable-* | --disable-* \
2412           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2413           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2414           | -with-* | --with-* | -without-* | --without-* | --x)
2415             case "$ac_configure_args0 " in
2416               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2417             esac
2418             ;;
2419           -* ) ac_must_keep_next=true ;;
2420         esac
2421       fi
2422       as_fn_append ac_configure_args " '$ac_arg'"
2423       ;;
2424     esac
2425   done
2426 done
2427 { ac_configure_args0=; unset ac_configure_args0;}
2428 { ac_configure_args1=; unset ac_configure_args1;}
2429
2430 # When interrupted or exit'd, cleanup temporary files, and complete
2431 # config.log.  We remove comments because anyway the quotes in there
2432 # would cause problems or look ugly.
2433 # WARNING: Use '\'' to represent an apostrophe within the trap.
2434 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2435 trap 'exit_status=$?
2436   # Save into config.log some information that might help in debugging.
2437   {
2438     echo
2439
2440     $as_echo "## ---------------- ##
2441 ## Cache variables. ##
2442 ## ---------------- ##"
2443     echo
2444     # The following way of writing the cache mishandles newlines in values,
2445 (
2446   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2447     eval ac_val=\$$ac_var
2448     case $ac_val in #(
2449     *${as_nl}*)
2450       case $ac_var in #(
2451       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2452 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2453       esac
2454       case $ac_var in #(
2455       _ | IFS | as_nl) ;; #(
2456       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2457       *) { eval $ac_var=; unset $ac_var;} ;;
2458       esac ;;
2459     esac
2460   done
2461   (set) 2>&1 |
2462     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2463     *${as_nl}ac_space=\ *)
2464       sed -n \
2465         "s/'\''/'\''\\\\'\'''\''/g;
2466           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2467       ;; #(
2468     *)
2469       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2470       ;;
2471     esac |
2472     sort
2473 )
2474     echo
2475
2476     $as_echo "## ----------------- ##
2477 ## Output variables. ##
2478 ## ----------------- ##"
2479     echo
2480     for ac_var in $ac_subst_vars
2481     do
2482       eval ac_val=\$$ac_var
2483       case $ac_val in
2484       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2485       esac
2486       $as_echo "$ac_var='\''$ac_val'\''"
2487     done | sort
2488     echo
2489
2490     if test -n "$ac_subst_files"; then
2491       $as_echo "## ------------------- ##
2492 ## File substitutions. ##
2493 ## ------------------- ##"
2494       echo
2495       for ac_var in $ac_subst_files
2496       do
2497         eval ac_val=\$$ac_var
2498         case $ac_val in
2499         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2500         esac
2501         $as_echo "$ac_var='\''$ac_val'\''"
2502       done | sort
2503       echo
2504     fi
2505
2506     if test -s confdefs.h; then
2507       $as_echo "## ----------- ##
2508 ## confdefs.h. ##
2509 ## ----------- ##"
2510       echo
2511       cat confdefs.h
2512       echo
2513     fi
2514     test "$ac_signal" != 0 &&
2515       $as_echo "$as_me: caught signal $ac_signal"
2516     $as_echo "$as_me: exit $exit_status"
2517   } >&5
2518   rm -f core *.core core.conftest.* &&
2519     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2520     exit $exit_status
2521 ' 0
2522 for ac_signal in 1 2 13 15; do
2523   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2524 done
2525 ac_signal=0
2526
2527 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2528 rm -f -r conftest* confdefs.h
2529
2530 $as_echo "/* confdefs.h */" > confdefs.h
2531
2532 # Predefined preprocessor variables.
2533
2534 cat >>confdefs.h <<_ACEOF
2535 #define PACKAGE_NAME "$PACKAGE_NAME"
2536 _ACEOF
2537
2538 cat >>confdefs.h <<_ACEOF
2539 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2540 _ACEOF
2541
2542 cat >>confdefs.h <<_ACEOF
2543 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2544 _ACEOF
2545
2546 cat >>confdefs.h <<_ACEOF
2547 #define PACKAGE_STRING "$PACKAGE_STRING"
2548 _ACEOF
2549
2550 cat >>confdefs.h <<_ACEOF
2551 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2552 _ACEOF
2553
2554 cat >>confdefs.h <<_ACEOF
2555 #define PACKAGE_URL "$PACKAGE_URL"
2556 _ACEOF
2557
2558
2559 # Let the site file select an alternate cache file if it wants to.
2560 # Prefer an explicitly selected file to automatically selected ones.
2561 ac_site_file1=NONE
2562 ac_site_file2=NONE
2563 if test -n "$CONFIG_SITE"; then
2564   # We do not want a PATH search for config.site.
2565   case $CONFIG_SITE in #((
2566     -*)  ac_site_file1=./$CONFIG_SITE;;
2567     */*) ac_site_file1=$CONFIG_SITE;;
2568     *)   ac_site_file1=./$CONFIG_SITE;;
2569   esac
2570 elif test "x$prefix" != xNONE; then
2571   ac_site_file1=$prefix/share/config.site
2572   ac_site_file2=$prefix/etc/config.site
2573 else
2574   ac_site_file1=$ac_default_prefix/share/config.site
2575   ac_site_file2=$ac_default_prefix/etc/config.site
2576 fi
2577 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2578 do
2579   test "x$ac_site_file" = xNONE && continue
2580   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2581     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2582 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2583     sed 's/^/| /' "$ac_site_file" >&5
2584     . "$ac_site_file" \
2585       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2586 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2587 as_fn_error $? "failed to load site script $ac_site_file
2588 See \`config.log' for more details" "$LINENO" 5; }
2589   fi
2590 done
2591
2592 if test -r "$cache_file"; then
2593   # Some versions of bash will fail to source /dev/null (special files
2594   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2595   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2596     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2597 $as_echo "$as_me: loading cache $cache_file" >&6;}
2598     case $cache_file in
2599       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2600       *)                      . "./$cache_file";;
2601     esac
2602   fi
2603 else
2604   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2605 $as_echo "$as_me: creating cache $cache_file" >&6;}
2606   >$cache_file
2607 fi
2608
2609 # Check that the precious variables saved in the cache have kept the same
2610 # value.
2611 ac_cache_corrupted=false
2612 for ac_var in $ac_precious_vars; do
2613   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2614   eval ac_new_set=\$ac_env_${ac_var}_set
2615   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2616   eval ac_new_val=\$ac_env_${ac_var}_value
2617   case $ac_old_set,$ac_new_set in
2618     set,)
2619       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2620 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2621       ac_cache_corrupted=: ;;
2622     ,set)
2623       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2624 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2625       ac_cache_corrupted=: ;;
2626     ,);;
2627     *)
2628       if test "x$ac_old_val" != "x$ac_new_val"; then
2629         # differences in whitespace do not lead to failure.
2630         ac_old_val_w=`echo x $ac_old_val`
2631         ac_new_val_w=`echo x $ac_new_val`
2632         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2633           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2634 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2635           ac_cache_corrupted=:
2636         else
2637           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2638 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2639           eval $ac_var=\$ac_old_val
2640         fi
2641         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2642 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2643         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2644 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2645       fi;;
2646   esac
2647   # Pass precious variables to config.status.
2648   if test "$ac_new_set" = set; then
2649     case $ac_new_val in
2650     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2651     *) ac_arg=$ac_var=$ac_new_val ;;
2652     esac
2653     case " $ac_configure_args " in
2654       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2655       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2656     esac
2657   fi
2658 done
2659 if $ac_cache_corrupted; then
2660   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2661 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2662   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2663 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2664   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2665 fi
2666 ## -------------------- ##
2667 ## Main body of script. ##
2668 ## -------------------- ##
2669
2670 ac_ext=c
2671 ac_cpp='$CPP $CPPFLAGS'
2672 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2673 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2674 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2675
2676
2677
2678
2679
2680
2681 ac_aux_dir=
2682 for ac_dir in config "$srcdir"/config; do
2683   if test -f "$ac_dir/install-sh"; then
2684     ac_aux_dir=$ac_dir
2685     ac_install_sh="$ac_aux_dir/install-sh -c"
2686     break
2687   elif test -f "$ac_dir/install.sh"; then
2688     ac_aux_dir=$ac_dir
2689     ac_install_sh="$ac_aux_dir/install.sh -c"
2690     break
2691   elif test -f "$ac_dir/shtool"; then
2692     ac_aux_dir=$ac_dir
2693     ac_install_sh="$ac_aux_dir/shtool install -c"
2694     break
2695   fi
2696 done
2697 if test -z "$ac_aux_dir"; then
2698   as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2699 fi
2700
2701 # These three variables are undocumented and unsupported,
2702 # and are intended to be withdrawn in a future Autoconf release.
2703 # They can cause serious problems if a builder's source tree is in a directory
2704 # whose full name contains unusual characters.
2705 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2706 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2707 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2708
2709
2710
2711 configure_args=$ac_configure_args
2712
2713
2714 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\.[0-9][0-9]*\)'`
2715
2716
2717 cat >>confdefs.h <<_ACEOF
2718 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2719 _ACEOF
2720
2721
2722
2723
2724
2725 # Check whether --with-extra-version was given.
2726 if test "${with_extra_version+set}" = set; then :
2727   withval=$with_extra_version;
2728   case $withval in
2729     yes)
2730       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2731       ;;
2732     no)
2733       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2734       ;;
2735     *)
2736       PG_VERSION="$PACKAGE_VERSION$withval"
2737       ;;
2738   esac
2739
2740 else
2741   PG_VERSION="$PACKAGE_VERSION"
2742 fi
2743
2744
2745
2746 cat >>confdefs.h <<_ACEOF
2747 #define PG_VERSION "$PG_VERSION"
2748 _ACEOF
2749
2750
2751 # Make sure we can run config.sub.
2752 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2753   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2754
2755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2756 $as_echo_n "checking build system type... " >&6; }
2757 if ${ac_cv_build+:} false; then :
2758   $as_echo_n "(cached) " >&6
2759 else
2760   ac_build_alias=$build_alias
2761 test "x$ac_build_alias" = x &&
2762   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2763 test "x$ac_build_alias" = x &&
2764   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2765 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2766   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2767
2768 fi
2769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2770 $as_echo "$ac_cv_build" >&6; }
2771 case $ac_cv_build in
2772 *-*-*) ;;
2773 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2774 esac
2775 build=$ac_cv_build
2776 ac_save_IFS=$IFS; IFS='-'
2777 set x $ac_cv_build
2778 shift
2779 build_cpu=$1
2780 build_vendor=$2
2781 shift; shift
2782 # Remember, the first character of IFS is used to create $*,
2783 # except with old shells:
2784 build_os=$*
2785 IFS=$ac_save_IFS
2786 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2787
2788
2789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2790 $as_echo_n "checking host system type... " >&6; }
2791 if ${ac_cv_host+:} false; then :
2792   $as_echo_n "(cached) " >&6
2793 else
2794   if test "x$host_alias" = x; then
2795   ac_cv_host=$ac_cv_build
2796 else
2797   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2798     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2799 fi
2800
2801 fi
2802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2803 $as_echo "$ac_cv_host" >&6; }
2804 case $ac_cv_host in
2805 *-*-*) ;;
2806 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2807 esac
2808 host=$ac_cv_host
2809 ac_save_IFS=$IFS; IFS='-'
2810 set x $ac_cv_host
2811 shift
2812 host_cpu=$1
2813 host_vendor=$2
2814 shift; shift
2815 # Remember, the first character of IFS is used to create $*,
2816 # except with old shells:
2817 host_os=$*
2818 IFS=$ac_save_IFS
2819 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2820
2821
2822
2823 template=
2824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2825 $as_echo_n "checking which template to use... " >&6; }
2826
2827
2828
2829
2830 # Check whether --with-template was given.
2831 if test "${with_template+set}" = set; then :
2832   withval=$with_template;
2833   case $withval in
2834     yes)
2835       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2836       ;;
2837     no)
2838       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2839       ;;
2840     *)
2841
2842   case $withval in
2843     list)   echo; ls "$srcdir/src/template"; exit;;
2844     *)      if test -f "$srcdir/src/template/$with_template" ; then
2845               template=$withval
2846             else
2847               as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2848             fi;;
2849   esac
2850
2851       ;;
2852   esac
2853
2854 else
2855
2856 # --with-template not given
2857
2858 case $host_os in
2859      aix*) template=aix ;;
2860   cygwin*) template=cygwin ;;
2861   darwin*) template=darwin ;;
2862 dragonfly*) template=netbsd ;;
2863  freebsd*) template=freebsd ;;
2864     hpux*) template=hpux ;;
2865  linux*|gnu*|k*bsd*-gnu)
2866            template=linux ;;
2867    mingw*) template=win32 ;;
2868   netbsd*) template=netbsd ;;
2869  openbsd*) template=openbsd ;;
2870      sco*) template=sco ;;
2871  solaris*) template=solaris ;;
2872    sysv5*) template=unixware ;;
2873 esac
2874
2875   if test x"$template" = x"" ; then
2876     as_fn_error $? "
2877 *******************************************************************
2878 PostgreSQL has apparently not been ported to your platform yet.
2879 To try a manual configuration, look into the src/template directory
2880 for a similar platform and use the '--with-template=' option.
2881
2882 Please also contact <pgsql-bugs@postgresql.org> to see about
2883 rectifying this.  Include the above 'checking host system type...'
2884 line.
2885 *******************************************************************
2886 " "$LINENO" 5
2887   fi
2888
2889
2890 fi
2891
2892
2893
2894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
2895 $as_echo "$template" >&6; }
2896
2897 PORTNAME=$template
2898
2899
2900 # Initialize default assumption that we do not need separate assembly code
2901 # for TAS (test-and-set).  This can be overridden by the template file
2902 # when it's executed.
2903 need_tas=no
2904 tas_file=dummy.s
2905
2906
2907
2908 ##
2909 ## Command line options
2910 ##
2911
2912 #
2913 # Add non-standard directories to the include path
2914 #
2915
2916
2917
2918 # Check whether --with-includes was given.
2919 if test "${with_includes+set}" = set; then :
2920   withval=$with_includes;
2921   case $withval in
2922     yes)
2923       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
2924       ;;
2925     no)
2926       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
2927       ;;
2928     *)
2929
2930       ;;
2931   esac
2932
2933 fi
2934
2935
2936
2937
2938 #
2939 # Add non-standard directories to the library search path
2940 #
2941
2942
2943
2944 # Check whether --with-libraries was given.
2945 if test "${with_libraries+set}" = set; then :
2946   withval=$with_libraries;
2947   case $withval in
2948     yes)
2949       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
2950       ;;
2951     no)
2952       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
2953       ;;
2954     *)
2955       LIBRARY_DIRS=$withval
2956       ;;
2957   esac
2958
2959 fi
2960
2961
2962
2963
2964
2965
2966 # Check whether --with-libs was given.
2967 if test "${with_libs+set}" = set; then :
2968   withval=$with_libs;
2969   case $withval in
2970     yes)
2971       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
2972       ;;
2973     no)
2974       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
2975       ;;
2976     *)
2977       LIBRARY_DIRS=$withval
2978       ;;
2979   esac
2980
2981 fi
2982
2983
2984
2985
2986 #
2987 # 64-bit integer date/time storage: enabled by default.
2988 #
2989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with 64-bit integer date/time support" >&5
2990 $as_echo_n "checking whether to build with 64-bit integer date/time support... " >&6; }
2991
2992
2993 # Check whether --enable-integer-datetimes was given.
2994 if test "${enable_integer_datetimes+set}" = set; then :
2995   enableval=$enable_integer_datetimes;
2996   case $enableval in
2997     yes)
2998
2999 $as_echo "#define USE_INTEGER_DATETIMES 1" >>confdefs.h
3000
3001       ;;
3002     no)
3003       :
3004       ;;
3005     *)
3006       as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3007       ;;
3008   esac
3009
3010 else
3011   enable_integer_datetimes=yes
3012
3013 $as_echo "#define USE_INTEGER_DATETIMES 1" >>confdefs.h
3014
3015 fi
3016
3017
3018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_integer_datetimes" >&5
3019 $as_echo "$enable_integer_datetimes" >&6; }
3020
3021
3022 #
3023 # NLS
3024 #
3025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3026 $as_echo_n "checking whether NLS is wanted... " >&6; }
3027
3028
3029 # Check whether --enable-nls was given.
3030 if test "${enable_nls+set}" = set; then :
3031   enableval=$enable_nls;
3032   case $enableval in
3033     yes)
3034       :
3035       ;;
3036     no)
3037       :
3038       ;;
3039     *)
3040       enable_nls=yes
3041 WANTED_LANGUAGES=$enableval
3042       ;;
3043   esac
3044
3045 else
3046   enable_nls=no
3047 fi
3048
3049
3050
3051 if test "$enable_nls" = yes; then
3052
3053 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3054
3055 fi
3056
3057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3058 $as_echo "$enable_nls" >&6; }
3059
3060
3061
3062 #
3063 # Default port number (--with-pgport), default 5432
3064 #
3065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3066 $as_echo_n "checking for default port number... " >&6; }
3067
3068
3069
3070 # Check whether --with-pgport was given.
3071 if test "${with_pgport+set}" = set; then :
3072   withval=$with_pgport;
3073   case $withval in
3074     yes)
3075       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3076       ;;
3077     no)
3078       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3079       ;;
3080     *)
3081       default_port=$withval
3082       ;;
3083   esac
3084
3085 else
3086   default_port=5432
3087 fi
3088
3089
3090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3091 $as_echo "$default_port" >&6; }
3092 # Need both of these because some places want an integer and some a string
3093
3094 cat >>confdefs.h <<_ACEOF
3095 #define DEF_PGPORT ${default_port}
3096 _ACEOF
3097
3098
3099 cat >>confdefs.h <<_ACEOF
3100 #define DEF_PGPORT_STR "${default_port}"
3101 _ACEOF
3102
3103
3104
3105 # It's worth validating port; you can get very confusing errors otherwise
3106 if test x"$default_port" = x""; then
3107   as_fn_error $? "invalid --with-pgport specification: empty string" "$LINENO" 5
3108 elif test ! x`echo "$default_port" | sed -e 's/[0-9]*//'` = x""; then
3109   as_fn_error $? "invalid --with-pgport specification: must be a number" "$LINENO" 5
3110 elif test ! x`echo "$default_port" | sed -e 's/^0.//'` = x"$default_port"; then
3111   as_fn_error $? "invalid --with-pgport specification: must not have leading 0" "$LINENO" 5
3112 elif test "$default_port" -lt "1" -o "$default_port" -gt "65535"; then
3113   as_fn_error $? "invalid --with-pgport specification: must be between 1 and 65535" "$LINENO" 5
3114 fi
3115
3116 #
3117 # '-rpath'-like feature can be disabled
3118 #
3119
3120
3121 # Check whether --enable-rpath was given.
3122 if test "${enable_rpath+set}" = set; then :
3123   enableval=$enable_rpath;
3124   case $enableval in
3125     yes)
3126       :
3127       ;;
3128     no)
3129       :
3130       ;;
3131     *)
3132       as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3133       ;;
3134   esac
3135
3136 else
3137   enable_rpath=yes
3138
3139 fi
3140
3141
3142
3143
3144 #
3145 # Spinlocks
3146 #
3147
3148
3149 # Check whether --enable-spinlocks was given.
3150 if test "${enable_spinlocks+set}" = set; then :
3151   enableval=$enable_spinlocks;
3152   case $enableval in
3153     yes)
3154       :
3155       ;;
3156     no)
3157       :
3158       ;;
3159     *)
3160       as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3161       ;;
3162   esac
3163
3164 else
3165   enable_spinlocks=yes
3166
3167 fi
3168
3169
3170
3171 #
3172 # Atomic operations
3173 #
3174
3175
3176 # Check whether --enable-atomics was given.
3177 if test "${enable_atomics+set}" = set; then :
3178   enableval=$enable_atomics;
3179   case $enableval in
3180     yes)
3181       :
3182       ;;
3183     no)
3184       :
3185       ;;
3186     *)
3187       as_fn_error $? "no argument expected for --enable-atomics option" "$LINENO" 5
3188       ;;
3189   esac
3190
3191 else
3192   enable_atomics=yes
3193
3194 fi
3195
3196
3197
3198 #
3199 # --enable-debug adds -g to compiler flags
3200 #
3201
3202
3203 # Check whether --enable-debug was given.
3204 if test "${enable_debug+set}" = set; then :
3205   enableval=$enable_debug;
3206   case $enableval in
3207     yes)
3208       :
3209       ;;
3210     no)
3211       :
3212       ;;
3213     *)
3214       as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3215       ;;
3216   esac
3217
3218 else
3219   enable_debug=no
3220
3221 fi
3222
3223
3224
3225
3226 #
3227 # --enable-profiling enables gcc profiling
3228 #
3229
3230
3231 # Check whether --enable-profiling was given.
3232 if test "${enable_profiling+set}" = set; then :
3233   enableval=$enable_profiling;
3234   case $enableval in
3235     yes)
3236       :
3237       ;;
3238     no)
3239       :
3240       ;;
3241     *)
3242       as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3243       ;;
3244   esac
3245
3246 else
3247   enable_profiling=no
3248
3249 fi
3250
3251
3252
3253 #
3254 # --enable-coverage enables generation of code coverage metrics with gcov
3255 #
3256
3257
3258 # Check whether --enable-coverage was given.
3259 if test "${enable_coverage+set}" = set; then :
3260   enableval=$enable_coverage;
3261   case $enableval in
3262     yes)
3263       for ac_prog in gcov
3264 do
3265   # Extract the first word of "$ac_prog", so it can be a program name with args.
3266 set dummy $ac_prog; ac_word=$2
3267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3268 $as_echo_n "checking for $ac_word... " >&6; }
3269 if ${ac_cv_prog_GCOV+:} false; then :
3270   $as_echo_n "(cached) " >&6
3271 else
3272   if test -n "$GCOV"; then
3273   ac_cv_prog_GCOV="$GCOV" # Let the user override the test.
3274 else
3275 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3276 for as_dir in $PATH
3277 do
3278   IFS=$as_save_IFS
3279   test -z "$as_dir" && as_dir=.
3280     for ac_exec_ext in '' $ac_executable_extensions; do
3281   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3282     ac_cv_prog_GCOV="$ac_prog"
3283     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3284     break 2
3285   fi
3286 done
3287   done
3288 IFS=$as_save_IFS
3289
3290 fi
3291 fi
3292 GCOV=$ac_cv_prog_GCOV
3293 if test -n "$GCOV"; then
3294   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3295 $as_echo "$GCOV" >&6; }
3296 else
3297   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3298 $as_echo "no" >&6; }
3299 fi
3300
3301
3302   test -n "$GCOV" && break
3303 done
3304
3305 if test -z "$GCOV"; then
3306   as_fn_error $? "gcov not found" "$LINENO" 5
3307 fi
3308 for ac_prog in lcov
3309 do
3310   # Extract the first word of "$ac_prog", so it can be a program name with args.
3311 set dummy $ac_prog; ac_word=$2
3312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3313 $as_echo_n "checking for $ac_word... " >&6; }
3314 if ${ac_cv_prog_LCOV+:} false; then :
3315   $as_echo_n "(cached) " >&6
3316 else
3317   if test -n "$LCOV"; then
3318   ac_cv_prog_LCOV="$LCOV" # Let the user override the test.
3319 else
3320 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3321 for as_dir in $PATH
3322 do
3323   IFS=$as_save_IFS
3324   test -z "$as_dir" && as_dir=.
3325     for ac_exec_ext in '' $ac_executable_extensions; do
3326   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3327     ac_cv_prog_LCOV="$ac_prog"
3328     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3329     break 2
3330   fi
3331 done
3332   done
3333 IFS=$as_save_IFS
3334
3335 fi
3336 fi
3337 LCOV=$ac_cv_prog_LCOV
3338 if test -n "$LCOV"; then
3339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3340 $as_echo "$LCOV" >&6; }
3341 else
3342   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3343 $as_echo "no" >&6; }
3344 fi
3345
3346
3347   test -n "$LCOV" && break
3348 done
3349
3350 if test -z "$LCOV"; then
3351   as_fn_error $? "lcov not found" "$LINENO" 5
3352 fi
3353 for ac_prog in genhtml
3354 do
3355   # Extract the first word of "$ac_prog", so it can be a program name with args.
3356 set dummy $ac_prog; ac_word=$2
3357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3358 $as_echo_n "checking for $ac_word... " >&6; }
3359 if ${ac_cv_prog_GENHTML+:} false; then :
3360   $as_echo_n "(cached) " >&6
3361 else
3362   if test -n "$GENHTML"; then
3363   ac_cv_prog_GENHTML="$GENHTML" # Let the user override the test.
3364 else
3365 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3366 for as_dir in $PATH
3367 do
3368   IFS=$as_save_IFS
3369   test -z "$as_dir" && as_dir=.
3370     for ac_exec_ext in '' $ac_executable_extensions; do
3371   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3372     ac_cv_prog_GENHTML="$ac_prog"
3373     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3374     break 2
3375   fi
3376 done
3377   done
3378 IFS=$as_save_IFS
3379
3380 fi
3381 fi
3382 GENHTML=$ac_cv_prog_GENHTML
3383 if test -n "$GENHTML"; then
3384   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3385 $as_echo "$GENHTML" >&6; }
3386 else
3387   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3388 $as_echo "no" >&6; }
3389 fi
3390
3391
3392   test -n "$GENHTML" && break
3393 done
3394
3395 if test -z "$GENHTML"; then
3396   as_fn_error $? "genhtml not found" "$LINENO" 5
3397 fi
3398       ;;
3399     no)
3400       :
3401       ;;
3402     *)
3403       as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3404       ;;
3405   esac
3406
3407 else
3408   enable_coverage=no
3409
3410 fi
3411
3412
3413
3414
3415 #
3416 # DTrace
3417 #
3418
3419
3420 # Check whether --enable-dtrace was given.
3421 if test "${enable_dtrace+set}" = set; then :
3422   enableval=$enable_dtrace;
3423   case $enableval in
3424     yes)
3425       for ac_prog in dtrace
3426 do
3427   # Extract the first word of "$ac_prog", so it can be a program name with args.
3428 set dummy $ac_prog; ac_word=$2
3429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3430 $as_echo_n "checking for $ac_word... " >&6; }
3431 if ${ac_cv_prog_DTRACE+:} false; then :
3432   $as_echo_n "(cached) " >&6
3433 else
3434   if test -n "$DTRACE"; then
3435   ac_cv_prog_DTRACE="$DTRACE" # Let the user override the test.
3436 else
3437 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3438 for as_dir in $PATH
3439 do
3440   IFS=$as_save_IFS
3441   test -z "$as_dir" && as_dir=.
3442     for ac_exec_ext in '' $ac_executable_extensions; do
3443   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3444     ac_cv_prog_DTRACE="$ac_prog"
3445     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3446     break 2
3447   fi
3448 done
3449   done
3450 IFS=$as_save_IFS
3451
3452 fi
3453 fi
3454 DTRACE=$ac_cv_prog_DTRACE
3455 if test -n "$DTRACE"; then
3456   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3457 $as_echo "$DTRACE" >&6; }
3458 else
3459   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3460 $as_echo "no" >&6; }
3461 fi
3462
3463
3464   test -n "$DTRACE" && break
3465 done
3466
3467 if test -z "$DTRACE"; then
3468   as_fn_error $? "dtrace not found" "$LINENO" 5
3469 fi
3470
3471       ;;
3472     no)
3473       :
3474       ;;
3475     *)
3476       as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3477       ;;
3478   esac
3479
3480 else
3481   enable_dtrace=no
3482
3483 fi
3484
3485
3486
3487
3488 #
3489 # TAP tests
3490 #
3491
3492
3493 # Check whether --enable-tap-tests was given.
3494 if test "${enable_tap_tests+set}" = set; then :
3495   enableval=$enable_tap_tests;
3496   case $enableval in
3497     yes)
3498       :
3499       ;;
3500     no)
3501       :
3502       ;;
3503     *)
3504       as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3505       ;;
3506   esac
3507
3508 else
3509   enable_tap_tests=no
3510
3511 fi
3512
3513
3514
3515
3516 #
3517 # Block size
3518 #
3519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3520 $as_echo_n "checking for block size... " >&6; }
3521
3522
3523
3524 # Check whether --with-blocksize was given.
3525 if test "${with_blocksize+set}" = set; then :
3526   withval=$with_blocksize;
3527   case $withval in
3528     yes)
3529       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3530       ;;
3531     no)
3532       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3533       ;;
3534     *)
3535       blocksize=$withval
3536       ;;
3537   esac
3538
3539 else
3540   blocksize=8
3541 fi
3542
3543
3544 case ${blocksize} in
3545   1) BLCKSZ=1024;;
3546   2) BLCKSZ=2048;;
3547   4) BLCKSZ=4096;;
3548   8) BLCKSZ=8192;;
3549  16) BLCKSZ=16384;;
3550  32) BLCKSZ=32768;;
3551   *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3552 esac
3553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3554 $as_echo "${blocksize}kB" >&6; }
3555
3556
3557 cat >>confdefs.h <<_ACEOF
3558 #define BLCKSZ ${BLCKSZ}
3559 _ACEOF
3560
3561
3562 #
3563 # Relation segment size
3564 #
3565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3566 $as_echo_n "checking for segment size... " >&6; }
3567
3568
3569
3570 # Check whether --with-segsize was given.
3571 if test "${with_segsize+set}" = set; then :
3572   withval=$with_segsize;
3573   case $withval in
3574     yes)
3575       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3576       ;;
3577     no)
3578       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3579       ;;
3580     *)
3581       segsize=$withval
3582       ;;
3583   esac
3584
3585 else
3586   segsize=1
3587 fi
3588
3589
3590 # this expression is set up to avoid unnecessary integer overflow
3591 # blocksize is already guaranteed to be a factor of 1024
3592 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3593 test $? -eq 0 || exit 1
3594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3595 $as_echo "${segsize}GB" >&6; }
3596
3597
3598 cat >>confdefs.h <<_ACEOF
3599 #define RELSEG_SIZE ${RELSEG_SIZE}
3600 _ACEOF
3601
3602
3603 #
3604 # WAL block size
3605 #
3606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3607 $as_echo_n "checking for WAL block size... " >&6; }
3608
3609
3610
3611 # Check whether --with-wal-blocksize was given.
3612 if test "${with_wal_blocksize+set}" = set; then :
3613   withval=$with_wal_blocksize;
3614   case $withval in
3615     yes)
3616       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3617       ;;
3618     no)
3619       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3620       ;;
3621     *)
3622       wal_blocksize=$withval
3623       ;;
3624   esac
3625
3626 else
3627   wal_blocksize=8
3628 fi
3629
3630
3631 case ${wal_blocksize} in
3632   1) XLOG_BLCKSZ=1024;;
3633   2) XLOG_BLCKSZ=2048;;
3634   4) XLOG_BLCKSZ=4096;;
3635   8) XLOG_BLCKSZ=8192;;
3636  16) XLOG_BLCKSZ=16384;;
3637  32) XLOG_BLCKSZ=32768;;
3638  64) XLOG_BLCKSZ=65536;;
3639   *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3640 esac
3641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3642 $as_echo "${wal_blocksize}kB" >&6; }
3643
3644
3645 cat >>confdefs.h <<_ACEOF
3646 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3647 _ACEOF
3648
3649
3650 #
3651 # WAL segment size
3652 #
3653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL segment size" >&5
3654 $as_echo_n "checking for WAL segment size... " >&6; }
3655
3656
3657
3658 # Check whether --with-wal-segsize was given.
3659 if test "${with_wal_segsize+set}" = set; then :
3660   withval=$with_wal_segsize;
3661   case $withval in
3662     yes)
3663       as_fn_error $? "argument required for --with-wal-segsize option" "$LINENO" 5
3664       ;;
3665     no)
3666       as_fn_error $? "argument required for --with-wal-segsize option" "$LINENO" 5
3667       ;;
3668     *)
3669       wal_segsize=$withval
3670       ;;
3671   esac
3672
3673 else
3674   wal_segsize=16
3675 fi
3676
3677
3678 case ${wal_segsize} in
3679   1) ;;
3680   2) ;;
3681   4) ;;
3682   8) ;;
3683  16) ;;
3684  32) ;;
3685  64) ;;
3686   *) as_fn_error $? "Invalid WAL segment size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3687 esac
3688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_segsize}MB" >&5
3689 $as_echo "${wal_segsize}MB" >&6; }
3690
3691
3692 cat >>confdefs.h <<_ACEOF
3693 #define XLOG_SEG_SIZE (${wal_segsize} * 1024 * 1024)
3694 _ACEOF
3695
3696
3697 #
3698 # C compiler
3699 #
3700
3701 # For historical reasons you can also use --with-CC to specify the C compiler
3702 # to use, although the standard way to do this is to set the CC environment
3703 # variable.
3704
3705
3706
3707 # Check whether --with-CC was given.
3708 if test "${with_CC+set}" = set; then :
3709   withval=$with_CC;
3710   case $withval in
3711     yes)
3712       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3713       ;;
3714     no)
3715       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3716       ;;
3717     *)
3718       CC=$with_CC
3719       ;;
3720   esac
3721
3722 fi
3723
3724
3725
3726 case $template in
3727   aix) pgac_cc_list="gcc xlc";;
3728     *) pgac_cc_list="gcc cc";;
3729 esac
3730
3731 ac_ext=c
3732 ac_cpp='$CPP $CPPFLAGS'
3733 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3734 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3735 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3736 if test -n "$ac_tool_prefix"; then
3737   for ac_prog in $pgac_cc_list
3738   do
3739     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3740 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3742 $as_echo_n "checking for $ac_word... " >&6; }
3743 if ${ac_cv_prog_CC+:} false; then :
3744   $as_echo_n "(cached) " >&6
3745 else
3746   if test -n "$CC"; then
3747   ac_cv_prog_CC="$CC" # Let the user override the test.
3748 else
3749 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3750 for as_dir in $PATH
3751 do
3752   IFS=$as_save_IFS
3753   test -z "$as_dir" && as_dir=.
3754     for ac_exec_ext in '' $ac_executable_extensions; do
3755   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3756     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3757     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3758     break 2
3759   fi
3760 done
3761   done
3762 IFS=$as_save_IFS
3763
3764 fi
3765 fi
3766 CC=$ac_cv_prog_CC
3767 if test -n "$CC"; then
3768   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3769 $as_echo "$CC" >&6; }
3770 else
3771   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3772 $as_echo "no" >&6; }
3773 fi
3774
3775
3776     test -n "$CC" && break
3777   done
3778 fi
3779 if test -z "$CC"; then
3780   ac_ct_CC=$CC
3781   for ac_prog in $pgac_cc_list
3782 do
3783   # Extract the first word of "$ac_prog", so it can be a program name with args.
3784 set dummy $ac_prog; ac_word=$2
3785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3786 $as_echo_n "checking for $ac_word... " >&6; }
3787 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3788   $as_echo_n "(cached) " >&6
3789 else
3790   if test -n "$ac_ct_CC"; then
3791   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3792 else
3793 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3794 for as_dir in $PATH
3795 do
3796   IFS=$as_save_IFS
3797   test -z "$as_dir" && as_dir=.
3798     for ac_exec_ext in '' $ac_executable_extensions; do
3799   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3800     ac_cv_prog_ac_ct_CC="$ac_prog"
3801     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3802     break 2
3803   fi
3804 done
3805   done
3806 IFS=$as_save_IFS
3807
3808 fi
3809 fi
3810 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3811 if test -n "$ac_ct_CC"; then
3812   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3813 $as_echo "$ac_ct_CC" >&6; }
3814 else
3815   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3816 $as_echo "no" >&6; }
3817 fi
3818
3819
3820   test -n "$ac_ct_CC" && break
3821 done
3822
3823   if test "x$ac_ct_CC" = x; then
3824     CC=""
3825   else
3826     case $cross_compiling:$ac_tool_warned in
3827 yes:)
3828 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3829 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3830 ac_tool_warned=yes ;;
3831 esac
3832     CC=$ac_ct_CC
3833   fi
3834 fi
3835
3836
3837 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3838 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3839 as_fn_error $? "no acceptable C compiler found in \$PATH
3840 See \`config.log' for more details" "$LINENO" 5; }
3841
3842 # Provide some information about the compiler.
3843 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3844 set X $ac_compile
3845 ac_compiler=$2
3846 for ac_option in --version -v -V -qversion; do
3847   { { ac_try="$ac_compiler $ac_option >&5"
3848 case "(($ac_try" in
3849   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3850   *) ac_try_echo=$ac_try;;
3851 esac
3852 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3853 $as_echo "$ac_try_echo"; } >&5
3854   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3855   ac_status=$?
3856   if test -s conftest.err; then
3857     sed '10a\
3858 ... rest of stderr output deleted ...
3859          10q' conftest.err >conftest.er1
3860     cat conftest.er1 >&5
3861   fi
3862   rm -f conftest.er1 conftest.err
3863   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3864   test $ac_status = 0; }
3865 done
3866
3867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3868 /* end confdefs.h.  */
3869
3870 int
3871 main ()
3872 {
3873
3874   ;
3875   return 0;
3876 }
3877 _ACEOF
3878 ac_clean_files_save=$ac_clean_files
3879 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3880 # Try to create an executable without -o first, disregard a.out.
3881 # It will help us diagnose broken compilers, and finding out an intuition
3882 # of exeext.
3883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3884 $as_echo_n "checking whether the C compiler works... " >&6; }
3885 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3886
3887 # The possible output files:
3888 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3889
3890 ac_rmfiles=
3891 for ac_file in $ac_files
3892 do
3893   case $ac_file in
3894     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3895     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3896   esac
3897 done
3898 rm -f $ac_rmfiles
3899
3900 if { { ac_try="$ac_link_default"
3901 case "(($ac_try" in
3902   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3903   *) ac_try_echo=$ac_try;;
3904 esac
3905 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3906 $as_echo "$ac_try_echo"; } >&5
3907   (eval "$ac_link_default") 2>&5
3908   ac_status=$?
3909   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3910   test $ac_status = 0; }; then :
3911   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3912 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3913 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3914 # so that the user can short-circuit this test for compilers unknown to
3915 # Autoconf.
3916 for ac_file in $ac_files ''
3917 do
3918   test -f "$ac_file" || continue
3919   case $ac_file in
3920     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3921         ;;
3922     [ab].out )
3923         # We found the default executable, but exeext='' is most
3924         # certainly right.
3925         break;;
3926     *.* )
3927         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3928         then :; else
3929            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3930         fi
3931         # We set ac_cv_exeext here because the later test for it is not
3932         # safe: cross compilers may not add the suffix if given an `-o'
3933         # argument, so we may need to know it at that point already.
3934         # Even if this section looks crufty: it has the advantage of
3935         # actually working.
3936         break;;
3937     * )
3938         break;;
3939   esac
3940 done
3941 test "$ac_cv_exeext" = no && ac_cv_exeext=
3942
3943 else
3944   ac_file=''
3945 fi
3946 if test -z "$ac_file"; then :
3947   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3948 $as_echo "no" >&6; }
3949 $as_echo "$as_me: failed program was:" >&5
3950 sed 's/^/| /' conftest.$ac_ext >&5
3951
3952 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3953 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3954 as_fn_error 77 "C compiler cannot create executables
3955 See \`config.log' for more details" "$LINENO" 5; }
3956 else
3957   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3958 $as_echo "yes" >&6; }
3959 fi
3960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3961 $as_echo_n "checking for C compiler default output file name... " >&6; }
3962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3963 $as_echo "$ac_file" >&6; }
3964 ac_exeext=$ac_cv_exeext
3965
3966 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3967 ac_clean_files=$ac_clean_files_save
3968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3969 $as_echo_n "checking for suffix of executables... " >&6; }
3970 if { { ac_try="$ac_link"
3971 case "(($ac_try" in
3972   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3973   *) ac_try_echo=$ac_try;;
3974 esac
3975 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3976 $as_echo "$ac_try_echo"; } >&5
3977   (eval "$ac_link") 2>&5
3978   ac_status=$?
3979   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3980   test $ac_status = 0; }; then :
3981   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3982 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3983 # work properly (i.e., refer to `conftest.exe'), while it won't with
3984 # `rm'.
3985 for ac_file in conftest.exe conftest conftest.*; do
3986   test -f "$ac_file" || continue
3987   case $ac_file in
3988     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3989     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3990           break;;
3991     * ) break;;
3992   esac
3993 done
3994 else
3995   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3996 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3997 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3998 See \`config.log' for more details" "$LINENO" 5; }
3999 fi
4000 rm -f conftest conftest$ac_cv_exeext
4001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4002 $as_echo "$ac_cv_exeext" >&6; }
4003
4004 rm -f conftest.$ac_ext
4005 EXEEXT=$ac_cv_exeext
4006 ac_exeext=$EXEEXT
4007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4008 /* end confdefs.h.  */
4009 #include <stdio.h>
4010 int
4011 main ()
4012 {
4013 FILE *f = fopen ("conftest.out", "w");
4014  return ferror (f) || fclose (f) != 0;
4015
4016   ;
4017   return 0;
4018 }
4019 _ACEOF
4020 ac_clean_files="$ac_clean_files conftest.out"
4021 # Check that the compiler produces executables we can run.  If not, either
4022 # the compiler is broken, or we cross compile.
4023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4024 $as_echo_n "checking whether we are cross compiling... " >&6; }
4025 if test "$cross_compiling" != yes; then
4026   { { ac_try="$ac_link"
4027 case "(($ac_try" in
4028   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4029   *) ac_try_echo=$ac_try;;
4030 esac
4031 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4032 $as_echo "$ac_try_echo"; } >&5
4033   (eval "$ac_link") 2>&5
4034   ac_status=$?
4035   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4036   test $ac_status = 0; }
4037   if { ac_try='./conftest$ac_cv_exeext'
4038   { { case "(($ac_try" in
4039   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4040   *) ac_try_echo=$ac_try;;
4041 esac
4042 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4043 $as_echo "$ac_try_echo"; } >&5
4044   (eval "$ac_try") 2>&5
4045   ac_status=$?
4046   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4047   test $ac_status = 0; }; }; then
4048     cross_compiling=no
4049   else
4050     if test "$cross_compiling" = maybe; then
4051         cross_compiling=yes
4052     else
4053         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4054 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4055 as_fn_error $? "cannot run C compiled programs.
4056 If you meant to cross compile, use \`--host'.
4057 See \`config.log' for more details" "$LINENO" 5; }
4058     fi
4059   fi
4060 fi
4061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4062 $as_echo "$cross_compiling" >&6; }
4063
4064 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4065 ac_clean_files=$ac_clean_files_save
4066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4067 $as_echo_n "checking for suffix of object files... " >&6; }
4068 if ${ac_cv_objext+:} false; then :
4069   $as_echo_n "(cached) " >&6
4070 else
4071   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4072 /* end confdefs.h.  */
4073
4074 int
4075 main ()
4076 {
4077
4078   ;
4079   return 0;
4080 }
4081 _ACEOF
4082 rm -f conftest.o conftest.obj
4083 if { { ac_try="$ac_compile"
4084 case "(($ac_try" in
4085   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4086   *) ac_try_echo=$ac_try;;
4087 esac
4088 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4089 $as_echo "$ac_try_echo"; } >&5
4090   (eval "$ac_compile") 2>&5
4091   ac_status=$?
4092   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4093   test $ac_status = 0; }; then :
4094   for ac_file in conftest.o conftest.obj conftest.*; do
4095   test -f "$ac_file" || continue;
4096   case $ac_file in
4097     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4098     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4099        break;;
4100   esac
4101 done
4102 else
4103   $as_echo "$as_me: failed program was:" >&5
4104 sed 's/^/| /' conftest.$ac_ext >&5
4105
4106 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4107 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4108 as_fn_error $? "cannot compute suffix of object files: cannot compile
4109 See \`config.log' for more details" "$LINENO" 5; }
4110 fi
4111 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4112 fi
4113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4114 $as_echo "$ac_cv_objext" >&6; }
4115 OBJEXT=$ac_cv_objext
4116 ac_objext=$OBJEXT
4117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4118 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4119 if ${ac_cv_c_compiler_gnu+:} false; then :
4120   $as_echo_n "(cached) " >&6
4121 else
4122   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4123 /* end confdefs.h.  */
4124
4125 int
4126 main ()
4127 {
4128 #ifndef __GNUC__
4129        choke me
4130 #endif
4131
4132   ;
4133   return 0;
4134 }
4135 _ACEOF
4136 if ac_fn_c_try_compile "$LINENO"; then :
4137   ac_compiler_gnu=yes
4138 else
4139   ac_compiler_gnu=no
4140 fi
4141 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4142 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4143
4144 fi
4145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4146 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4147 if test $ac_compiler_gnu = yes; then
4148   GCC=yes
4149 else
4150   GCC=
4151 fi
4152 ac_test_CFLAGS=${CFLAGS+set}
4153 ac_save_CFLAGS=$CFLAGS
4154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4155 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4156 if ${ac_cv_prog_cc_g+:} false; then :
4157   $as_echo_n "(cached) " >&6
4158 else
4159   ac_save_c_werror_flag=$ac_c_werror_flag
4160    ac_c_werror_flag=yes
4161    ac_cv_prog_cc_g=no
4162    CFLAGS="-g"
4163    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4164 /* end confdefs.h.  */
4165
4166 int
4167 main ()
4168 {
4169
4170   ;
4171   return 0;
4172 }
4173 _ACEOF
4174 if ac_fn_c_try_compile "$LINENO"; then :
4175   ac_cv_prog_cc_g=yes
4176 else
4177   CFLAGS=""
4178       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4179 /* end confdefs.h.  */
4180
4181 int
4182 main ()
4183 {
4184
4185   ;
4186   return 0;
4187 }
4188 _ACEOF
4189 if ac_fn_c_try_compile "$LINENO"; then :
4190
4191 else
4192   ac_c_werror_flag=$ac_save_c_werror_flag
4193          CFLAGS="-g"
4194          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4195 /* end confdefs.h.  */
4196
4197 int
4198 main ()
4199 {
4200
4201   ;
4202   return 0;
4203 }
4204 _ACEOF
4205 if ac_fn_c_try_compile "$LINENO"; then :
4206   ac_cv_prog_cc_g=yes
4207 fi
4208 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4209 fi
4210 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4211 fi
4212 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4213    ac_c_werror_flag=$ac_save_c_werror_flag
4214 fi
4215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4216 $as_echo "$ac_cv_prog_cc_g" >&6; }
4217 if test "$ac_test_CFLAGS" = set; then
4218   CFLAGS=$ac_save_CFLAGS
4219 elif test $ac_cv_prog_cc_g = yes; then
4220   if test "$GCC" = yes; then
4221     CFLAGS="-g -O2"
4222   else
4223     CFLAGS="-g"
4224   fi
4225 else
4226   if test "$GCC" = yes; then
4227     CFLAGS="-O2"
4228   else
4229     CFLAGS=
4230   fi
4231 fi
4232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4233 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4234 if ${ac_cv_prog_cc_c89+:} false; then :
4235   $as_echo_n "(cached) " >&6
4236 else
4237   ac_cv_prog_cc_c89=no
4238 ac_save_CC=$CC
4239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4240 /* end confdefs.h.  */
4241 #include <stdarg.h>
4242 #include <stdio.h>
4243 struct stat;
4244 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4245 struct buf { int x; };
4246 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4247 static char *e (p, i)
4248      char **p;
4249      int i;
4250 {
4251   return p[i];
4252 }
4253 static char *f (char * (*g) (char **, int), char **p, ...)
4254 {
4255   char *s;
4256   va_list v;
4257   va_start (v,p);
4258   s = g (p, va_arg (v,int));
4259   va_end (v);
4260   return s;
4261 }
4262
4263 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4264    function prototypes and stuff, but not '\xHH' hex character constants.
4265    These don't provoke an error unfortunately, instead are silently treated
4266    as 'x'.  The following induces an error, until -std is added to get
4267    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4268    array size at least.  It's necessary to write '\x00'==0 to get something
4269    that's true only with -std.  */
4270 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4271
4272 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4273    inside strings and character constants.  */
4274 #define FOO(x) 'x'
4275 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4276
4277 int test (int i, double x);
4278 struct s1 {int (*f) (int a);};
4279 struct s2 {int (*f) (double a);};
4280 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4281 int argc;
4282 char **argv;
4283 int
4284 main ()
4285 {
4286 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4287   ;
4288   return 0;
4289 }
4290 _ACEOF
4291 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4292         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4293 do
4294   CC="$ac_save_CC $ac_arg"
4295   if ac_fn_c_try_compile "$LINENO"; then :
4296   ac_cv_prog_cc_c89=$ac_arg
4297 fi
4298 rm -f core conftest.err conftest.$ac_objext
4299   test "x$ac_cv_prog_cc_c89" != "xno" && break
4300 done
4301 rm -f conftest.$ac_ext
4302 CC=$ac_save_CC
4303
4304 fi
4305 # AC_CACHE_VAL
4306 case "x$ac_cv_prog_cc_c89" in
4307   x)
4308     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4309 $as_echo "none needed" >&6; } ;;
4310   xno)
4311     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4312 $as_echo "unsupported" >&6; } ;;
4313   *)
4314     CC="$CC $ac_cv_prog_cc_c89"
4315     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4316 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4317 esac
4318 if test "x$ac_cv_prog_cc_c89" != xno; then :
4319
4320 fi
4321
4322 ac_ext=c
4323 ac_cpp='$CPP $CPPFLAGS'
4324 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4325 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4326 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4327
4328
4329 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4330 # but has idiosyncrasies of its own.  We assume icc will define
4331 # __INTEL_COMPILER regardless of CFLAGS.
4332
4333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4334 /* end confdefs.h.  */
4335
4336 int
4337 main ()
4338 {
4339 #ifndef __INTEL_COMPILER
4340 choke me
4341 #endif
4342   ;
4343   return 0;
4344 }
4345 _ACEOF
4346 if ac_fn_c_try_compile "$LINENO"; then :
4347   ICC=yes
4348 else
4349   ICC=no
4350 fi
4351 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4352
4353 # Check if it's Sun Studio compiler. We assume that
4354 # __SUNPRO_C will be defined for Sun Studio compilers
4355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4356 /* end confdefs.h.  */
4357
4358 int
4359 main ()
4360 {
4361 #ifndef __SUNPRO_C
4362 choke me
4363 #endif
4364   ;
4365   return 0;
4366 }
4367 _ACEOF
4368 if ac_fn_c_try_compile "$LINENO"; then :
4369   SUN_STUDIO_CC=yes
4370 else
4371   SUN_STUDIO_CC=no
4372 fi
4373 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4374
4375
4376
4377 unset CFLAGS
4378
4379 #
4380 # Read the template
4381 #
4382 . "$srcdir/src/template/$template" || exit
4383
4384 # CFLAGS are selected so:
4385 # If the user specifies something in the environment, that is used.
4386 # else:  If the template file set something, that is used.
4387 # else:  If coverage was enabled, don't set anything.
4388 # else:  If the compiler is GCC, then we use -O2.
4389 # else:  If the compiler is something else, then we use -O, unless debugging.
4390
4391 if test "$ac_env_CFLAGS_set" = set; then
4392   CFLAGS=$ac_env_CFLAGS_value
4393 elif test "${CFLAGS+set}" = set; then
4394   : # (keep what template set)
4395 elif test "$enable_coverage" = yes; then
4396   : # no optimization by default
4397 elif test "$GCC" = yes; then
4398   CFLAGS="-O2"
4399 else
4400   # if the user selected debug mode, don't use -O
4401   if test "$enable_debug" != yes; then
4402     CFLAGS="-O"
4403   fi
4404 fi
4405
4406 # CFLAGS we determined above will be added back at the end
4407 user_CFLAGS=$CFLAGS
4408 CFLAGS=""
4409
4410 # set CFLAGS_VECTOR from the environment, if available
4411 if test "$ac_env_CFLAGS_VECTOR_set" = set; then
4412   CFLAGS_VECTOR=$ac_env_CFLAGS_VECTOR_value
4413 fi
4414
4415 # Some versions of GCC support some additional useful warning flags.
4416 # Check whether they are supported, and add them to CFLAGS if so.
4417 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
4418 # but has its own.  Also check other compiler-specific flags here.
4419
4420 if test "$GCC" = yes -a "$ICC" = no; then
4421   CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
4422   # These work in some but not all gcc versions
4423   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5
4424 $as_echo_n "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
4425 if ${pgac_cv_prog_cc_cflags__Wdeclaration_after_statement+:} false; then :
4426   $as_echo_n "(cached) " >&6
4427 else
4428   pgac_save_CFLAGS=$CFLAGS
4429 CFLAGS="$pgac_save_CFLAGS -Wdeclaration-after-statement"
4430 ac_save_c_werror_flag=$ac_c_werror_flag
4431 ac_c_werror_flag=yes
4432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4433 /* end confdefs.h.  */
4434
4435 int
4436 main ()
4437 {
4438
4439   ;
4440   return 0;
4441 }
4442 _ACEOF
4443 if ac_fn_c_try_compile "$LINENO"; then :
4444   pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=yes
4445 else
4446   pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=no
4447 fi
4448 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4449 ac_c_werror_flag=$ac_save_c_werror_flag
4450 CFLAGS="$pgac_save_CFLAGS"
4451 fi
4452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&5
4453 $as_echo "$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&6; }
4454 if test x"$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" = x"yes"; then
4455   CFLAGS="$CFLAGS -Wdeclaration-after-statement"
4456 fi
4457
4458   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wendif-labels" >&5
4459 $as_echo_n "checking whether $CC supports -Wendif-labels... " >&6; }
4460 if ${pgac_cv_prog_cc_cflags__Wendif_labels+:} false; then :
4461   $as_echo_n "(cached) " >&6
4462 else
4463   pgac_save_CFLAGS=$CFLAGS
4464 CFLAGS="$pgac_save_CFLAGS -Wendif-labels"
4465 ac_save_c_werror_flag=$ac_c_werror_flag
4466 ac_c_werror_flag=yes
4467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4468 /* end confdefs.h.  */
4469
4470 int
4471 main ()
4472 {
4473
4474   ;
4475   return 0;
4476 }
4477 _ACEOF
4478 if ac_fn_c_try_compile "$LINENO"; then :
4479   pgac_cv_prog_cc_cflags__Wendif_labels=yes
4480 else
4481   pgac_cv_prog_cc_cflags__Wendif_labels=no
4482 fi
4483 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4484 ac_c_werror_flag=$ac_save_c_werror_flag
4485 CFLAGS="$pgac_save_CFLAGS"
4486 fi
4487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wendif_labels" >&5
4488 $as_echo "$pgac_cv_prog_cc_cflags__Wendif_labels" >&6; }
4489 if test x"$pgac_cv_prog_cc_cflags__Wendif_labels" = x"yes"; then
4490   CFLAGS="$CFLAGS -Wendif-labels"
4491 fi
4492
4493   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wmissing-format-attribute" >&5
4494 $as_echo_n "checking whether $CC supports -Wmissing-format-attribute... " >&6; }
4495 if ${pgac_cv_prog_cc_cflags__Wmissing_format_attribute+:} false; then :
4496   $as_echo_n "(cached) " >&6
4497 else
4498   pgac_save_CFLAGS=$CFLAGS
4499 CFLAGS="$pgac_save_CFLAGS -Wmissing-format-attribute"
4500 ac_save_c_werror_flag=$ac_c_werror_flag
4501 ac_c_werror_flag=yes
4502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4503 /* end confdefs.h.  */
4504
4505 int
4506 main ()
4507 {
4508
4509   ;
4510   return 0;
4511 }
4512 _ACEOF
4513 if ac_fn_c_try_compile "$LINENO"; then :
4514   pgac_cv_prog_cc_cflags__Wmissing_format_attribute=yes
4515 else
4516   pgac_cv_prog_cc_cflags__Wmissing_format_attribute=no
4517 fi
4518 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4519 ac_c_werror_flag=$ac_save_c_werror_flag
4520 CFLAGS="$pgac_save_CFLAGS"
4521 fi
4522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wmissing_format_attribute" >&5
4523 $as_echo "$pgac_cv_prog_cc_cflags__Wmissing_format_attribute" >&6; }
4524 if test x"$pgac_cv_prog_cc_cflags__Wmissing_format_attribute" = x"yes"; then
4525   CFLAGS="$CFLAGS -Wmissing-format-attribute"
4526 fi
4527
4528   # This was included in -Wall/-Wformat in older GCC versions
4529   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wformat-security" >&5
4530 $as_echo_n "checking whether $CC supports -Wformat-security... " >&6; }
4531 if ${pgac_cv_prog_cc_cflags__Wformat_security+:} false; then :
4532   $as_echo_n "(cached) " >&6
4533 else
4534   pgac_save_CFLAGS=$CFLAGS
4535 CFLAGS="$pgac_save_CFLAGS -Wformat-security"
4536 ac_save_c_werror_flag=$ac_c_werror_flag
4537 ac_c_werror_flag=yes
4538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4539 /* end confdefs.h.  */
4540
4541 int
4542 main ()
4543 {
4544
4545   ;
4546   return 0;
4547 }
4548 _ACEOF
4549 if ac_fn_c_try_compile "$LINENO"; then :
4550   pgac_cv_prog_cc_cflags__Wformat_security=yes
4551 else
4552   pgac_cv_prog_cc_cflags__Wformat_security=no
4553 fi
4554 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4555 ac_c_werror_flag=$ac_save_c_werror_flag
4556 CFLAGS="$pgac_save_CFLAGS"
4557 fi
4558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wformat_security" >&5
4559 $as_echo "$pgac_cv_prog_cc_cflags__Wformat_security" >&6; }
4560 if test x"$pgac_cv_prog_cc_cflags__Wformat_security" = x"yes"; then
4561   CFLAGS="$CFLAGS -Wformat-security"
4562 fi
4563
4564   # Disable strict-aliasing rules; needed for gcc 3.3+
4565   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-strict-aliasing" >&5
4566 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4567 if ${pgac_cv_prog_cc_cflags__fno_strict_aliasing+:} false; then :
4568   $as_echo_n "(cached) " >&6
4569 else
4570   pgac_save_CFLAGS=$CFLAGS
4571 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4572 ac_save_c_werror_flag=$ac_c_werror_flag
4573 ac_c_werror_flag=yes
4574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4575 /* end confdefs.h.  */
4576
4577 int
4578 main ()
4579 {
4580
4581   ;
4582   return 0;
4583 }
4584 _ACEOF
4585 if ac_fn_c_try_compile "$LINENO"; then :
4586   pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4587 else
4588   pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4589 fi
4590 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4591 ac_c_werror_flag=$ac_save_c_werror_flag
4592 CFLAGS="$pgac_save_CFLAGS"
4593 fi
4594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4595 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4596 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4597   CFLAGS="$CFLAGS -fno-strict-aliasing"
4598 fi
4599
4600   # Disable optimizations that assume no overflow; needed for gcc 4.3+
4601   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fwrapv" >&5
4602 $as_echo_n "checking whether $CC supports -fwrapv... " >&6; }
4603 if ${pgac_cv_prog_cc_cflags__fwrapv+:} false; then :
4604   $as_echo_n "(cached) " >&6
4605 else
4606   pgac_save_CFLAGS=$CFLAGS
4607 CFLAGS="$pgac_save_CFLAGS -fwrapv"
4608 ac_save_c_werror_flag=$ac_c_werror_flag
4609 ac_c_werror_flag=yes
4610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4611 /* end confdefs.h.  */
4612
4613 int
4614 main ()
4615 {
4616
4617   ;
4618   return 0;
4619 }
4620 _ACEOF
4621 if ac_fn_c_try_compile "$LINENO"; then :
4622   pgac_cv_prog_cc_cflags__fwrapv=yes
4623 else
4624   pgac_cv_prog_cc_cflags__fwrapv=no
4625 fi
4626 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4627 ac_c_werror_flag=$ac_save_c_werror_flag
4628 CFLAGS="$pgac_save_CFLAGS"
4629 fi
4630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fwrapv" >&5
4631 $as_echo "$pgac_cv_prog_cc_cflags__fwrapv" >&6; }
4632 if test x"$pgac_cv_prog_cc_cflags__fwrapv" = x"yes"; then
4633   CFLAGS="$CFLAGS -fwrapv"
4634 fi
4635
4636   # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
4637   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fexcess-precision=standard" >&5
4638 $as_echo_n "checking whether $CC supports -fexcess-precision=standard... " >&6; }
4639 if ${pgac_cv_prog_cc_cflags__fexcess_precision_standard+:} false; then :
4640   $as_echo_n "(cached) " >&6
4641 else
4642   pgac_save_CFLAGS=$CFLAGS
4643 CFLAGS="$pgac_save_CFLAGS -fexcess-precision=standard"
4644 ac_save_c_werror_flag=$ac_c_werror_flag
4645 ac_c_werror_flag=yes
4646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4647 /* end confdefs.h.  */
4648
4649 int
4650 main ()
4651 {
4652
4653   ;
4654   return 0;
4655 }
4656 _ACEOF
4657 if ac_fn_c_try_compile "$LINENO"; then :
4658   pgac_cv_prog_cc_cflags__fexcess_precision_standard=yes
4659 else
4660   pgac_cv_prog_cc_cflags__fexcess_precision_standard=no
4661 fi
4662 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4663 ac_c_werror_flag=$ac_save_c_werror_flag
4664 CFLAGS="$pgac_save_CFLAGS"
4665 fi
4666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fexcess_precision_standard" >&5
4667 $as_echo "$pgac_cv_prog_cc_cflags__fexcess_precision_standard" >&6; }
4668 if test x"$pgac_cv_prog_cc_cflags__fexcess_precision_standard" = x"yes"; then
4669   CFLAGS="$CFLAGS -fexcess-precision=standard"
4670 fi
4671
4672   # Optimization flags for specific files that benefit from vectorization
4673   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -funroll-loops" >&5
4674 $as_echo_n "checking whether $CC supports -funroll-loops... " >&6; }
4675 if ${pgac_cv_prog_cc_cflags__funroll_loops+:} false; then :
4676   $as_echo_n "(cached) " >&6
4677 else
4678   pgac_save_CFLAGS=$CFLAGS
4679 CFLAGS="$pgac_save_CFLAGS -funroll-loops"
4680 ac_save_c_werror_flag=$ac_c_werror_flag
4681 ac_c_werror_flag=yes
4682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4683 /* end confdefs.h.  */
4684
4685 int
4686 main ()
4687 {
4688
4689   ;
4690   return 0;
4691 }
4692 _ACEOF
4693 if ac_fn_c_try_compile "$LINENO"; then :
4694   pgac_cv_prog_cc_cflags__funroll_loops=yes
4695 else
4696   pgac_cv_prog_cc_cflags__funroll_loops=no
4697 fi
4698 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4699 ac_c_werror_flag=$ac_save_c_werror_flag
4700 CFLAGS="$pgac_save_CFLAGS"
4701 fi
4702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__funroll_loops" >&5
4703 $as_echo "$pgac_cv_prog_cc_cflags__funroll_loops" >&6; }
4704 if test x"$pgac_cv_prog_cc_cflags__funroll_loops" = x"yes"; then
4705   CFLAGS_VECTOR="${CFLAGS_VECTOR} -funroll-loops"
4706 fi
4707
4708   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -ftree-vectorize" >&5
4709 $as_echo_n "checking whether $CC supports -ftree-vectorize... " >&6; }
4710 if ${pgac_cv_prog_cc_cflags__ftree_vectorize+:} false; then :
4711   $as_echo_n "(cached) " >&6
4712 else
4713   pgac_save_CFLAGS=$CFLAGS
4714 CFLAGS="$pgac_save_CFLAGS -ftree-vectorize"
4715 ac_save_c_werror_flag=$ac_c_werror_flag
4716 ac_c_werror_flag=yes
4717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4718 /* end confdefs.h.  */
4719
4720 int
4721 main ()
4722 {
4723
4724   ;
4725   return 0;
4726 }
4727 _ACEOF
4728 if ac_fn_c_try_compile "$LINENO"; then :
4729   pgac_cv_prog_cc_cflags__ftree_vectorize=yes
4730 else
4731   pgac_cv_prog_cc_cflags__ftree_vectorize=no
4732 fi
4733 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4734 ac_c_werror_flag=$ac_save_c_werror_flag
4735 CFLAGS="$pgac_save_CFLAGS"
4736 fi
4737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__ftree_vectorize" >&5
4738 $as_echo "$pgac_cv_prog_cc_cflags__ftree_vectorize" >&6; }
4739 if test x"$pgac_cv_prog_cc_cflags__ftree_vectorize" = x"yes"; then
4740   CFLAGS_VECTOR="${CFLAGS_VECTOR} -ftree-vectorize"
4741 fi
4742
4743   # We want to suppress clang's unhelpful unused-command-line-argument warnings
4744   # but gcc won't complain about unrecognized -Wno-foo switches, so we have to
4745   # test for the positive form and if that works, add the negative form
4746   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wunused-command-line-argument" >&5
4747 $as_echo_n "checking whether $CC supports -Wunused-command-line-argument... " >&6; }
4748 if ${pgac_cv_prog_cc_cflags__Wunused_command_line_argument+:} false; then :
4749   $as_echo_n "(cached) " >&6
4750 else
4751   pgac_save_CFLAGS=$CFLAGS
4752 CFLAGS="$pgac_save_CFLAGS -Wunused-command-line-argument"
4753 ac_save_c_werror_flag=$ac_c_werror_flag
4754 ac_c_werror_flag=yes
4755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4756 /* end confdefs.h.  */
4757
4758 int
4759 main ()
4760 {
4761
4762   ;
4763   return 0;
4764 }
4765 _ACEOF
4766 if ac_fn_c_try_compile "$LINENO"; then :
4767   pgac_cv_prog_cc_cflags__Wunused_command_line_argument=yes
4768 else
4769   pgac_cv_prog_cc_cflags__Wunused_command_line_argument=no
4770 fi
4771 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4772 ac_c_werror_flag=$ac_save_c_werror_flag
4773 CFLAGS="$pgac_save_CFLAGS"
4774 fi
4775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wunused_command_line_argument" >&5
4776 $as_echo "$pgac_cv_prog_cc_cflags__Wunused_command_line_argument" >&6; }
4777 if test x"$pgac_cv_prog_cc_cflags__Wunused_command_line_argument" = x"yes"; then
4778   NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
4779 fi
4780
4781   if test -n "$NOT_THE_CFLAGS"; then
4782     CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
4783   fi
4784 elif test "$ICC" = yes; then
4785   # Intel's compiler has a bug/misoptimization in checking for
4786   # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
4787   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mp1" >&5
4788 $as_echo_n "checking whether $CC supports -mp1... " >&6; }
4789 if ${pgac_cv_prog_cc_cflags__mp1+:} false; then :
4790   $as_echo_n "(cached) " >&6
4791 else
4792   pgac_save_CFLAGS=$CFLAGS
4793 CFLAGS="$pgac_save_CFLAGS -mp1"
4794 ac_save_c_werror_flag=$ac_c_werror_flag
4795 ac_c_werror_flag=yes
4796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4797 /* end confdefs.h.  */
4798
4799 int
4800 main ()
4801 {
4802
4803   ;
4804   return 0;
4805 }
4806 _ACEOF
4807 if ac_fn_c_try_compile "$LINENO"; then :
4808   pgac_cv_prog_cc_cflags__mp1=yes
4809 else
4810   pgac_cv_prog_cc_cflags__mp1=no
4811 fi
4812 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4813 ac_c_werror_flag=$ac_save_c_werror_flag
4814 CFLAGS="$pgac_save_CFLAGS"
4815 fi
4816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__mp1" >&5
4817 $as_echo "$pgac_cv_prog_cc_cflags__mp1" >&6; }
4818 if test x"$pgac_cv_prog_cc_cflags__mp1" = x"yes"; then
4819   CFLAGS="$CFLAGS -mp1"
4820 fi
4821
4822   # Make sure strict aliasing is off (though this is said to be the default)
4823   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-strict-aliasing" >&5
4824 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4825 if ${pgac_cv_prog_cc_cflags__fno_strict_aliasing+:} false; then :
4826   $as_echo_n "(cached) " >&6
4827 else
4828   pgac_save_CFLAGS=$CFLAGS
4829 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4830 ac_save_c_werror_flag=$ac_c_werror_flag
4831 ac_c_werror_flag=yes
4832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4833 /* end confdefs.h.  */
4834
4835 int
4836 main ()
4837 {
4838
4839   ;
4840   return 0;
4841 }
4842 _ACEOF
4843 if ac_fn_c_try_compile "$LINENO"; then :
4844   pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4845 else
4846   pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4847 fi
4848 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4849 ac_c_werror_flag=$ac_save_c_werror_flag
4850 CFLAGS="$pgac_save_CFLAGS"
4851 fi
4852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4853 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4854 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4855   CFLAGS="$CFLAGS -fno-strict-aliasing"
4856 fi
4857
4858 elif test "$PORTNAME" = "aix"; then
4859   # AIX's xlc has to have strict aliasing turned off too
4860   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -qnoansialias" >&5
4861 $as_echo_n "checking whether $CC supports -qnoansialias... " >&6; }
4862 if ${pgac_cv_prog_cc_cflags__qnoansialias+:} false; then :
4863   $as_echo_n "(cached) " >&6
4864 else
4865   pgac_save_CFLAGS=$CFLAGS
4866 CFLAGS="$pgac_save_CFLAGS -qnoansialias"
4867 ac_save_c_werror_flag=$ac_c_werror_flag
4868 ac_c_werror_flag=yes
4869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4870 /* end confdefs.h.  */
4871
4872 int
4873 main ()
4874 {
4875
4876   ;
4877   return 0;
4878 }
4879 _ACEOF
4880 if ac_fn_c_try_compile "$LINENO"; then :
4881   pgac_cv_prog_cc_cflags__qnoansialias=yes
4882 else
4883   pgac_cv_prog_cc_cflags__qnoansialias=no
4884 fi
4885 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4886 ac_c_werror_flag=$ac_save_c_werror_flag
4887 CFLAGS="$pgac_save_CFLAGS"
4888 fi
4889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__qnoansialias" >&5
4890 $as_echo "$pgac_cv_prog_cc_cflags__qnoansialias" >&6; }
4891 if test x"$pgac_cv_prog_cc_cflags__qnoansialias" = x"yes"; then
4892   CFLAGS="$CFLAGS -qnoansialias"
4893 fi
4894
4895   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -qlonglong" >&5
4896 $as_echo_n "checking whether $CC supports -qlonglong... " >&6; }
4897 if ${pgac_cv_prog_cc_cflags__qlonglong+:} false; then :
4898   $as_echo_n "(cached) " >&6
4899 else
4900   pgac_save_CFLAGS=$CFLAGS
4901 CFLAGS="$pgac_save_CFLAGS -qlonglong"
4902 ac_save_c_werror_flag=$ac_c_werror_flag
4903 ac_c_werror_flag=yes
4904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4905 /* end confdefs.h.  */
4906
4907 int
4908 main ()
4909 {
4910
4911   ;
4912   return 0;
4913 }
4914 _ACEOF
4915 if ac_fn_c_try_compile "$LINENO"; then :
4916   pgac_cv_prog_cc_cflags__qlonglong=yes
4917 else
4918   pgac_cv_prog_cc_cflags__qlonglong=no
4919 fi
4920 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4921 ac_c_werror_flag=$ac_save_c_werror_flag
4922 CFLAGS="$pgac_save_CFLAGS"
4923 fi
4924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__qlonglong" >&5
4925 $as_echo "$pgac_cv_prog_cc_cflags__qlonglong" >&6; }
4926 if test x"$pgac_cv_prog_cc_cflags__qlonglong" = x"yes"; then
4927   CFLAGS="$CFLAGS -qlonglong"
4928 fi
4929
4930 elif test "$PORTNAME" = "hpux"; then
4931   # On some versions of HP-UX, libm functions do not set errno by default.
4932   # Fix that by using +Olibmerrno if the compiler recognizes it.
4933   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports +Olibmerrno" >&5
4934 $as_echo_n "checking whether $CC supports +Olibmerrno... " >&6; }
4935 if ${pgac_cv_prog_cc_cflags_pOlibmerrno+:} false; then :
4936   $as_echo_n "(cached) " >&6
4937 else
4938   pgac_save_CFLAGS=$CFLAGS
4939 CFLAGS="$pgac_save_CFLAGS +Olibmerrno"
4940 ac_save_c_werror_flag=$ac_c_werror_flag
4941 ac_c_werror_flag=yes
4942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4943 /* end confdefs.h.  */
4944
4945 int
4946 main ()
4947 {
4948
4949   ;
4950   return 0;
4951 }
4952 _ACEOF
4953 if ac_fn_c_try_compile "$LINENO"; then :
4954   pgac_cv_prog_cc_cflags_pOlibmerrno=yes
4955 else
4956   pgac_cv_prog_cc_cflags_pOlibmerrno=no
4957 fi
4958 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4959 ac_c_werror_flag=$ac_save_c_werror_flag
4960 CFLAGS="$pgac_save_CFLAGS"
4961 fi
4962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags_pOlibmerrno" >&5
4963 $as_echo "$pgac_cv_prog_cc_cflags_pOlibmerrno" >&6; }
4964 if test x"$pgac_cv_prog_cc_cflags_pOlibmerrno" = x"yes"; then
4965   CFLAGS="$CFLAGS +Olibmerrno"
4966 fi
4967
4968 fi
4969
4970 CFLAGS_VECTOR=$CFLAGS_VECTOR
4971
4972
4973 # supply -g if --enable-debug
4974 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
4975   CFLAGS="$CFLAGS -g"
4976 fi
4977
4978 # enable code coverage if --enable-coverage
4979 if test "$enable_coverage" = yes; then
4980   if test "$GCC" = yes; then
4981     CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
4982   else
4983     as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
4984   fi
4985 fi
4986
4987 # enable profiling if --enable-profiling
4988 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
4989   if test "$GCC" = yes; then
4990
4991 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
4992
4993     CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
4994   else
4995     as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
4996   fi
4997 fi
4998
4999 # We already have this in Makefile.win32, but configure needs it too
5000 if test "$PORTNAME" = "win32"; then
5001   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
5002 fi
5003
5004 # Now that we're done automatically adding stuff to CFLAGS, put back the
5005 # user-specified flags (if any) at the end.  This lets users override
5006 # the automatic additions.
5007 CFLAGS="$CFLAGS $user_CFLAGS"
5008
5009 # Check if the compiler still works with the final flag settings
5010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
5011 $as_echo_n "checking whether the C compiler still works... " >&6; }
5012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5013 /* end confdefs.h.  */
5014
5015 int
5016 main ()
5017 {
5018 return 0;
5019   ;
5020   return 0;
5021 }
5022 _ACEOF
5023 if ac_fn_c_try_link "$LINENO"; then :
5024   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5025 $as_echo "yes" >&6; }
5026 else
5027   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5028 $as_echo "no" >&6; }
5029    as_fn_error $? "cannot proceed" "$LINENO" 5
5030 fi
5031 rm -f core conftest.err conftest.$ac_objext \
5032     conftest$ac_exeext conftest.$ac_ext
5033
5034 # Defend against gcc -ffast-math
5035 if test "$GCC" = yes; then
5036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5037 /* end confdefs.h.  */
5038
5039 int
5040 main ()
5041 {
5042 #ifdef __FAST_MATH__
5043 choke me
5044 #endif
5045   ;
5046   return 0;
5047 }
5048 _ACEOF
5049 if ac_fn_c_try_compile "$LINENO"; then :
5050
5051 else
5052   as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
5053 fi
5054 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5055 fi
5056
5057 ac_ext=c
5058 ac_cpp='$CPP $CPPFLAGS'
5059 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5060 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5061 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5063 $as_echo_n "checking how to run the C preprocessor... " >&6; }
5064 # On Suns, sometimes $CPP names a directory.
5065 if test -n "$CPP" && test -d "$CPP"; then
5066   CPP=
5067 fi
5068 if test -z "$CPP"; then
5069   if ${ac_cv_prog_CPP+:} false; then :
5070   $as_echo_n "(cached) " >&6
5071 else
5072       # Double quotes because CPP needs to be expanded
5073     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5074     do
5075       ac_preproc_ok=false
5076 for ac_c_preproc_warn_flag in '' yes
5077 do
5078   # Use a header file that comes with gcc, so configuring glibc
5079   # with a fresh cross-compiler works.
5080   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5081   # <limits.h> exists even on freestanding compilers.
5082   # On the NeXT, cc -E runs the code through the compiler's parser,
5083   # not just through cpp. "Syntax error" is here to catch this case.
5084   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5085 /* end confdefs.h.  */
5086 #ifdef __STDC__
5087 # include <limits.h>
5088 #else
5089 # include <assert.h>
5090 #endif
5091                      Syntax error
5092 _ACEOF
5093 if ac_fn_c_try_cpp "$LINENO"; then :
5094
5095 else
5096   # Broken: fails on valid input.
5097 continue
5098 fi
5099 rm -f conftest.err conftest.i conftest.$ac_ext
5100
5101   # OK, works on sane cases.  Now check whether nonexistent headers
5102   # can be detected and how.
5103   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5104 /* end confdefs.h.  */
5105 #include <ac_nonexistent.h>
5106 _ACEOF
5107 if ac_fn_c_try_cpp "$LINENO"; then :
5108   # Broken: success on invalid input.
5109 continue
5110 else
5111   # Passes both tests.
5112 ac_preproc_ok=:
5113 break
5114 fi
5115 rm -f conftest.err conftest.i conftest.$ac_ext
5116
5117 done
5118 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5119 rm -f conftest.i conftest.err conftest.$ac_ext
5120 if $ac_preproc_ok; then :
5121   break
5122 fi
5123
5124     done
5125     ac_cv_prog_CPP=$CPP
5126
5127 fi
5128   CPP=$ac_cv_prog_CPP
5129 else
5130   ac_cv_prog_CPP=$CPP
5131 fi
5132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5133 $as_echo "$CPP" >&6; }
5134 ac_preproc_ok=false
5135 for ac_c_preproc_warn_flag in '' yes
5136 do
5137   # Use a header file that comes with gcc, so configuring glibc
5138   # with a fresh cross-compiler works.
5139   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5140   # <limits.h> exists even on freestanding compilers.
5141   # On the NeXT, cc -E runs the code through the compiler's parser,
5142   # not just through cpp. "Syntax error" is here to catch this case.
5143   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5144 /* end confdefs.h.  */
5145 #ifdef __STDC__
5146 # include <limits.h>
5147 #else
5148 # include <assert.h>
5149 #endif
5150                      Syntax error
5151 _ACEOF
5152 if ac_fn_c_try_cpp "$LINENO"; then :
5153
5154 else
5155   # Broken: fails on valid input.
5156 continue
5157 fi
5158 rm -f conftest.err conftest.i conftest.$ac_ext
5159
5160   # OK, works on sane cases.  Now check whether nonexistent headers
5161   # can be detected and how.
5162   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5163 /* end confdefs.h.  */
5164 #include <ac_nonexistent.h>
5165 _ACEOF
5166 if ac_fn_c_try_cpp "$LINENO"; then :
5167   # Broken: success on invalid input.
5168 continue
5169 else
5170   # Passes both tests.
5171 ac_preproc_ok=:
5172 break
5173 fi
5174 rm -f conftest.err conftest.i conftest.$ac_ext
5175
5176 done
5177 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5178 rm -f conftest.i conftest.err conftest.$ac_ext
5179 if $ac_preproc_ok; then :
5180
5181 else
5182   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5183 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5184 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5185 See \`config.log' for more details" "$LINENO" 5; }
5186 fi
5187
5188 ac_ext=c
5189 ac_cpp='$CPP $CPPFLAGS'
5190 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5191 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5192 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5193
5194
5195
5196
5197 #
5198 # Set up TAS assembly code if needed; the template file has now had its
5199 # chance to request this.
5200 #
5201 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
5202
5203
5204 if test "$need_tas" = yes ; then
5205   TAS=tas.o
5206 else
5207   TAS=""
5208 fi
5209
5210
5211
5212 #
5213 # Automatic dependency tracking
5214 #
5215
5216
5217 # Check whether --enable-depend was given.
5218 if test "${enable_depend+set}" = set; then :
5219   enableval=$enable_depend;
5220   case $enableval in
5221     yes)
5222       autodepend=yes
5223       ;;
5224     no)
5225       :
5226       ;;
5227     *)
5228       as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
5229       ;;
5230   esac
5231
5232 else
5233   enable_depend=no
5234
5235 fi
5236
5237
5238
5239
5240
5241 #
5242 # Enable assert checks
5243 #
5244
5245
5246 # Check whether --enable-cassert was given.
5247 if test "${enable_cassert+set}" = set; then :
5248   enableval=$enable_cassert;
5249   case $enableval in
5250     yes)
5251
5252 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
5253
5254       ;;
5255     no)
5256       :
5257       ;;
5258     *)
5259       as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
5260       ;;
5261   esac
5262
5263 else
5264   enable_cassert=no
5265
5266 fi
5267
5268
5269
5270
5271 #
5272 # Include directories
5273 #
5274 ac_save_IFS=$IFS
5275 IFS="${IFS}${PATH_SEPARATOR}"
5276 # SRCH_INC comes from the template file
5277 for dir in $with_includes $SRCH_INC; do
5278   if test -d "$dir"; then
5279     INCLUDES="$INCLUDES -I$dir"
5280   else
5281     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
5282 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
5283   fi
5284 done
5285 IFS=$ac_save_IFS
5286
5287
5288
5289 #
5290 # Library directories
5291 #
5292 ac_save_IFS=$IFS
5293 IFS="${IFS}${PATH_SEPARATOR}"
5294 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
5295 for dir in $LIBRARY_DIRS $SRCH_LIB; do
5296   if test -d "$dir"; then
5297     LIBDIRS="$LIBDIRS -L$dir"
5298   else
5299     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
5300 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
5301   fi
5302 done
5303 IFS=$ac_save_IFS
5304
5305 #
5306 # Enable thread-safe client libraries
5307 #
5308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
5309 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
5310
5311
5312 # Check whether --enable-thread-safety was given.
5313 if test "${enable_thread_safety+set}" = set; then :
5314   enableval=$enable_thread_safety;
5315   case $enableval in
5316     yes)
5317       :
5318       ;;
5319     no)
5320       :
5321       ;;
5322     *)
5323       as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
5324       ;;
5325   esac
5326
5327 else
5328   enable_thread_safety=yes
5329
5330 fi
5331
5332
5333 if test "$enable_thread_safety" = yes; then
5334
5335 $as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
5336
5337 fi
5338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
5339 $as_echo "$enable_thread_safety" >&6; }
5340
5341
5342 #
5343 # Optionally build Tcl modules (PL/Tcl)
5344 #
5345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
5346 $as_echo_n "checking whether to build with Tcl... " >&6; }
5347
5348
5349
5350 # Check whether --with-tcl was given.
5351 if test "${with_tcl+set}" = set; then :
5352   withval=$with_tcl;
5353   case $withval in
5354     yes)
5355       :
5356       ;;
5357     no)
5358       :
5359       ;;
5360     *)
5361       as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
5362       ;;
5363   esac
5364
5365 else
5366   with_tcl=no
5367
5368 fi
5369
5370
5371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
5372 $as_echo "$with_tcl" >&6; }
5373
5374
5375 # We see if the path to the Tcl/Tk configuration scripts is specified.
5376 # This will override the use of tclsh to find the paths to search.
5377
5378
5379
5380
5381 # Check whether --with-tclconfig was given.
5382 if test "${with_tclconfig+set}" = set; then :
5383   withval=$with_tclconfig;
5384   case $withval in
5385     yes)
5386       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
5387       ;;
5388     no)
5389       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
5390       ;;
5391     *)
5392
5393       ;;
5394   esac
5395
5396 fi
5397
5398
5399
5400 #
5401 # Optionally build Perl modules (PL/Perl)
5402 #
5403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
5404 $as_echo_n "checking whether to build Perl modules... " >&6; }
5405
5406
5407
5408 # Check whether --with-perl was given.
5409 if test "${with_perl+set}" = set; then :
5410   withval=$with_perl;
5411   case $withval in
5412     yes)
5413       :
5414       ;;
5415     no)
5416       :
5417       ;;
5418     *)
5419       as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
5420       ;;
5421   esac
5422
5423 else
5424   with_perl=no
5425
5426 fi
5427
5428
5429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
5430 $as_echo "$with_perl" >&6; }
5431
5432
5433 #
5434 # Optionally build Python modules (PL/Python)
5435 #
5436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
5437 $as_echo_n "checking whether to build Python modules... " >&6; }
5438
5439
5440
5441 # Check whether --with-python was given.
5442 if test "${with_python+set}" = set; then :
5443   withval=$with_python;
5444   case $withval in
5445     yes)
5446       :
5447       ;;
5448     no)
5449       :
5450       ;;
5451     *)
5452       as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
5453       ;;
5454   esac
5455
5456 else
5457   with_python=no
5458
5459 fi
5460
5461
5462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
5463 $as_echo "$with_python" >&6; }
5464
5465
5466 #
5467 # GSSAPI
5468 #
5469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
5470 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
5471
5472
5473
5474 # Check whether --with-gssapi was given.
5475 if test "${with_gssapi+set}" = set; then :
5476   withval=$with_gssapi;
5477   case $withval in
5478     yes)
5479
5480
5481 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
5482
5483   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
5484
5485       ;;
5486     no)
5487       :
5488       ;;
5489     *)
5490       as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
5491       ;;
5492   esac
5493
5494 else
5495   with_gssapi=no
5496
5497 fi
5498
5499
5500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
5501 $as_echo "$with_gssapi" >&6; }
5502
5503
5504
5505
5506
5507 #
5508 # Kerberos configuration parameters
5509 #
5510
5511
5512
5513 # Check whether --with-krb-srvnam was given.
5514 if test "${with_krb_srvnam+set}" = set; then :
5515   withval=$with_krb_srvnam;
5516   case $withval in
5517     yes)
5518       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
5519       ;;
5520     no)
5521       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
5522       ;;
5523     *)
5524
5525       ;;
5526   esac
5527
5528 else
5529   with_krb_srvnam="postgres"
5530 fi
5531
5532
5533
5534 cat >>confdefs.h <<_ACEOF
5535 #define PG_KRB_SRVNAM "$with_krb_srvnam"
5536 _ACEOF
5537
5538
5539
5540 #
5541 # PAM
5542 #
5543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
5544 $as_echo_n "checking whether to build with PAM support... " >&6; }
5545
5546
5547
5548 # Check whether --with-pam was given.
5549 if test "${with_pam+set}" = set; then :
5550   withval=$with_pam;
5551   case $withval in
5552     yes)
5553
5554 $as_echo "#define USE_PAM 1" >>confdefs.h
5555
5556       ;;
5557     no)
5558       :
5559       ;;
5560     *)
5561       as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
5562       ;;
5563   esac
5564
5565 else
5566   with_pam=no
5567
5568 fi
5569
5570
5571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
5572 $as_echo "$with_pam" >&6; }
5573
5574
5575 #
5576 # BSD AUTH
5577 #
5578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
5579 $as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
5580
5581
5582
5583 # Check whether --with-bsd-auth was given.
5584 if test "${with_bsd_auth+set}" = set; then :
5585   withval=$with_bsd_auth;
5586   case $withval in
5587     yes)
5588
5589 $as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
5590
5591       ;;
5592     no)
5593       :
5594       ;;
5595     *)
5596       as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
5597       ;;
5598   esac
5599
5600 else
5601   with_bsd_auth=no
5602
5603 fi
5604
5605
5606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
5607 $as_echo "$with_bsd_auth" >&6; }
5608
5609
5610 #
5611 # LDAP
5612 #
5613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
5614 $as_echo_n "checking whether to build with LDAP support... " >&6; }
5615
5616
5617
5618 # Check whether --with-ldap was given.
5619 if test "${with_ldap+set}" = set; then :
5620   withval=$with_ldap;
5621   case $withval in
5622     yes)
5623
5624 $as_echo "#define USE_LDAP 1" >>confdefs.h
5625
5626       ;;
5627     no)
5628       :
5629       ;;
5630     *)
5631       as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
5632       ;;
5633   esac
5634
5635 else
5636   with_ldap=no
5637
5638 fi
5639
5640
5641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
5642 $as_echo "$with_ldap" >&6; }
5643
5644
5645 #
5646 # Bonjour
5647 #
5648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
5649 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
5650
5651
5652
5653 # Check whether --with-bonjour was given.
5654 if test "${with_bonjour+set}" = set; then :
5655   withval=$with_bonjour;
5656   case $withval in
5657     yes)
5658
5659 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
5660
5661       ;;
5662     no)
5663       :
5664       ;;
5665     *)
5666       as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
5667       ;;
5668   esac
5669
5670 else
5671   with_bonjour=no
5672
5673 fi
5674
5675
5676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
5677 $as_echo "$with_bonjour" >&6; }
5678
5679
5680 #
5681 # OpenSSL
5682 #
5683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with OpenSSL support" >&5
5684 $as_echo_n "checking whether to build with OpenSSL support... " >&6; }
5685
5686
5687
5688 # Check whether --with-openssl was given.
5689 if test "${with_openssl+set}" = set; then :
5690   withval=$with_openssl;
5691   case $withval in
5692     yes)
5693
5694 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
5695
5696       ;;
5697     no)
5698       :
5699       ;;
5700     *)
5701       as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
5702       ;;
5703   esac
5704
5705 else
5706   with_openssl=no
5707
5708 fi
5709
5710
5711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_openssl" >&5
5712 $as_echo "$with_openssl" >&6; }
5713
5714
5715 #
5716 # SELinux
5717 #
5718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
5719 $as_echo_n "checking whether to build with SELinux support... " >&6; }
5720
5721
5722
5723 # Check whether --with-selinux was given.
5724 if test "${with_selinux+set}" = set; then :
5725   withval=$with_selinux;
5726   case $withval in
5727     yes)
5728       :
5729       ;;
5730     no)
5731       :
5732       ;;
5733     *)
5734       as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
5735       ;;
5736   esac
5737
5738 else
5739   with_selinux=no
5740
5741 fi
5742
5743
5744
5745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
5746 $as_echo "$with_selinux" >&6; }
5747
5748 #
5749 # Systemd
5750 #
5751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
5752 $as_echo_n "checking whether to build with systemd support... " >&6; }
5753
5754
5755
5756 # Check whether --with-systemd was given.
5757 if test "${with_systemd+set}" = set; then :
5758   withval=$with_systemd;
5759   case $withval in
5760     yes)
5761
5762 $as_echo "#define USE_SYSTEMD 1" >>confdefs.h
5763
5764       ;;
5765     no)
5766       :
5767       ;;
5768     *)
5769       as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
5770       ;;
5771   esac
5772
5773 else
5774   with_systemd=no
5775
5776 fi
5777
5778
5779
5780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
5781 $as_echo "$with_systemd" >&6; }
5782
5783 #
5784 # Readline
5785 #
5786
5787
5788
5789 # Check whether --with-readline was given.
5790 if test "${with_readline+set}" = set; then :
5791   withval=$with_readline;
5792   case $withval in
5793     yes)
5794       :
5795       ;;
5796     no)
5797       :
5798       ;;
5799     *)
5800       as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
5801       ;;
5802   esac
5803
5804 else
5805   with_readline=yes
5806
5807 fi
5808
5809
5810 # readline on MinGW has problems with backslashes in psql and other bugs.
5811 # This is particularly a problem with non-US code pages.
5812 # Therefore disable its use until we understand the cause. 2004-07-20
5813 if test "$PORTNAME" = "win32"; then
5814   if test "$with_readline" = yes; then
5815     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
5816 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
5817     with_readline=no
5818   fi
5819 fi
5820
5821
5822 #
5823 # Prefer libedit
5824 #
5825
5826
5827
5828 # Check whether --with-libedit-preferred was given.
5829 if test "${with_libedit_preferred+set}" = set; then :
5830   withval=$with_libedit_preferred;
5831   case $withval in
5832     yes)
5833       :
5834       ;;
5835     no)
5836       :
5837       ;;
5838     *)
5839       as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
5840       ;;
5841   esac
5842
5843 else
5844   with_libedit_preferred=no
5845
5846 fi
5847
5848
5849
5850
5851 #
5852 # UUID library
5853 #
5854 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
5855 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
5856 # UUID library.  More than one of these might be present on a given platform,
5857 # so we make the user say which one she wants.
5858 #
5859
5860
5861
5862 # Check whether --with-uuid was given.
5863 if test "${with_uuid+set}" = set; then :
5864   withval=$with_uuid;
5865   case $withval in
5866     yes)
5867       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
5868       ;;
5869     no)
5870       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
5871       ;;
5872     *)
5873
5874       ;;
5875   esac
5876
5877 fi
5878
5879
5880 if test x"$with_uuid" = x"" ; then
5881   with_uuid=no
5882 fi
5883
5884
5885
5886 # Check whether --with-ossp-uuid was given.
5887 if test "${with_ossp_uuid+set}" = set; then :
5888   withval=$with_ossp_uuid;
5889   case $withval in
5890     yes)
5891       :
5892       ;;
5893     no)
5894       :
5895       ;;
5896     *)
5897       as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
5898       ;;
5899   esac
5900
5901 else
5902   with_ossp_uuid=no
5903
5904 fi
5905
5906
5907 if test "$with_ossp_uuid" = yes ; then
5908   with_uuid=ossp
5909 fi
5910
5911 if test "$with_uuid" = bsd ; then
5912
5913 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
5914
5915   UUID_EXTRA_OBJS="md5.o sha1.o"
5916 elif test "$with_uuid" = e2fs ; then
5917
5918 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
5919
5920   UUID_EXTRA_OBJS="md5.o sha1.o"
5921 elif test "$with_uuid" = ossp ; then
5922
5923 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
5924
5925   UUID_EXTRA_OBJS=""
5926 elif test "$with_uuid" = no ; then
5927   UUID_EXTRA_OBJS=""
5928 else
5929   as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
5930 fi
5931
5932
5933
5934
5935 #
5936 # XML
5937 #
5938
5939
5940
5941 # Check whether --with-libxml was given.
5942 if test "${with_libxml+set}" = set; then :
5943   withval=$with_libxml;
5944   case $withval in
5945     yes)
5946
5947 $as_echo "#define USE_LIBXML 1" >>confdefs.h
5948
5949       ;;
5950     no)
5951       :
5952       ;;
5953     *)
5954       as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
5955       ;;
5956   esac
5957
5958 else
5959   with_libxml=no
5960
5961 fi
5962
5963
5964
5965 if test "$with_libxml" = yes ; then
5966   for ac_prog in xml2-config
5967 do
5968   # Extract the first word of "$ac_prog", so it can be a program name with args.
5969 set dummy $ac_prog; ac_word=$2
5970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5971 $as_echo_n "checking for $ac_word... " >&6; }
5972 if ${ac_cv_prog_XML2_CONFIG+:} false; then :
5973   $as_echo_n "(cached) " >&6
5974 else
5975   if test -n "$XML2_CONFIG"; then
5976   ac_cv_prog_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test.
5977 else
5978 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5979 for as_dir in $PATH
5980 do
5981   IFS=$as_save_IFS
5982   test -z "$as_dir" && as_dir=.
5983     for ac_exec_ext in '' $ac_executable_extensions; do
5984   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5985     ac_cv_prog_XML2_CONFIG="$ac_prog"
5986     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5987     break 2
5988   fi
5989 done
5990   done
5991 IFS=$as_save_IFS
5992
5993 fi
5994 fi
5995 XML2_CONFIG=$ac_cv_prog_XML2_CONFIG
5996 if test -n "$XML2_CONFIG"; then
5997   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
5998 $as_echo "$XML2_CONFIG" >&6; }
5999 else
6000   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6001 $as_echo "no" >&6; }
6002 fi
6003
6004
6005   test -n "$XML2_CONFIG" && break
6006 done
6007
6008   if test -n "$XML2_CONFIG"; then
6009     for pgac_option in `$XML2_CONFIG --cflags`; do
6010       case $pgac_option in
6011         -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
6012       esac
6013     done
6014     for pgac_option in `$XML2_CONFIG --libs`; do
6015       case $pgac_option in
6016         -L*) LDFLAGS="$LDFLAGS $pgac_option";;
6017       esac
6018     done
6019   fi
6020 fi
6021
6022
6023
6024 #
6025 # XSLT
6026 #
6027
6028
6029
6030 # Check whether --with-libxslt was given.
6031 if test "${with_libxslt+set}" = set; then :
6032   withval=$with_libxslt;
6033   case $withval in
6034     yes)
6035
6036 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
6037
6038       ;;
6039     no)
6040       :
6041       ;;
6042     *)
6043       as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
6044       ;;
6045   esac
6046
6047 else
6048   with_libxslt=no
6049
6050 fi
6051
6052
6053
6054
6055
6056
6057 #
6058 # tzdata
6059 #
6060
6061
6062
6063 # Check whether --with-system-tzdata was given.
6064 if test "${with_system_tzdata+set}" = set; then :
6065   withval=$with_system_tzdata;
6066   case $withval in
6067     yes)
6068       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
6069       ;;
6070     no)
6071       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
6072       ;;
6073     *)
6074
6075       ;;
6076   esac
6077
6078 fi
6079
6080
6081
6082
6083 #
6084 # Zlib
6085 #
6086
6087
6088
6089 # Check whether --with-zlib was given.
6090 if test "${with_zlib+set}" = set; then :
6091   withval=$with_zlib;
6092   case $withval in
6093     yes)
6094       :
6095       ;;
6096     no)
6097       :
6098       ;;
6099     *)
6100       as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
6101       ;;
6102   esac
6103
6104 else
6105   with_zlib=yes
6106
6107 fi
6108
6109
6110
6111
6112 #
6113 # Elf
6114 #
6115
6116 # Assume system is ELF if it predefines __ELF__ as 1,
6117 # otherwise believe host_os based default.
6118 case $host_os in
6119     freebsd1*|freebsd2*) elf=no;;
6120     freebsd3*|freebsd4*) elf=yes;;
6121 esac
6122
6123
6124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6125 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6126 if ${ac_cv_path_GREP+:} false; then :
6127   $as_echo_n "(cached) " >&6
6128 else
6129   if test -z "$GREP"; then
6130   ac_path_GREP_found=false
6131   # Loop through the user's path and test for each of PROGNAME-LIST
6132   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6133 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6134 do
6135   IFS=$as_save_IFS
6136   test -z "$as_dir" && as_dir=.
6137     for ac_prog in grep ggrep; do
6138     for ac_exec_ext in '' $ac_executable_extensions; do
6139       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6140       as_fn_executable_p "$ac_path_GREP" || continue
6141 # Check for GNU ac_path_GREP and select it if it is found.
6142   # Check for GNU $ac_path_GREP
6143 case `"$ac_path_GREP" --version 2>&1` in
6144 *GNU*)
6145   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6146 *)
6147   ac_count=0
6148   $as_echo_n 0123456789 >"conftest.in"
6149   while :
6150   do
6151     cat "conftest.in" "conftest.in" >"conftest.tmp"
6152     mv "conftest.tmp" "conftest.in"
6153     cp "conftest.in" "conftest.nl"
6154     $as_echo 'GREP' >> "conftest.nl"
6155     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6156     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6157     as_fn_arith $ac_count + 1 && ac_count=$as_val
6158     if test $ac_count -gt ${ac_path_GREP_max-0}; then
6159       # Best one so far, save it but keep looking for a better one
6160       ac_cv_path_GREP="$ac_path_GREP"
6161       ac_path_GREP_max=$ac_count
6162     fi
6163     # 10*(2^10) chars as input seems more than enough
6164     test $ac_count -gt 10 && break
6165   done
6166   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6167 esac
6168
6169       $ac_path_GREP_found && break 3
6170     done
6171   done
6172   done
6173 IFS=$as_save_IFS
6174   if test -z "$ac_cv_path_GREP"; then
6175     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6176   fi
6177 else
6178   ac_cv_path_GREP=$GREP
6179 fi
6180
6181 fi
6182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6183 $as_echo "$ac_cv_path_GREP" >&6; }
6184  GREP="$ac_cv_path_GREP"
6185
6186
6187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6188 $as_echo_n "checking for egrep... " >&6; }
6189 if ${ac_cv_path_EGREP+:} false; then :
6190   $as_echo_n "(cached) " >&6
6191 else
6192   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6193    then ac_cv_path_EGREP="$GREP -E"
6194    else
6195      if test -z "$EGREP"; then
6196   ac_path_EGREP_found=false
6197   # Loop through the user's path and test for each of PROGNAME-LIST
6198   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6199 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6200 do
6201   IFS=$as_save_IFS
6202   test -z "$as_dir" && as_dir=.
6203     for ac_prog in egrep; do
6204     for ac_exec_ext in '' $ac_executable_extensions; do
6205       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6206       as_fn_executable_p "$ac_path_EGREP" || continue
6207 # Check for GNU ac_path_EGREP and select it if it is found.
6208   # Check for GNU $ac_path_EGREP
6209 case `"$ac_path_EGREP" --version 2>&1` in
6210 *GNU*)
6211   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6212 *)
6213   ac_count=0
6214   $as_echo_n 0123456789 >"conftest.in"
6215   while :
6216   do
6217     cat "conftest.in" "conftest.in" >"conftest.tmp"
6218     mv "conftest.tmp" "conftest.in"
6219     cp "conftest.in" "conftest.nl"
6220     $as_echo 'EGREP' >> "conftest.nl"
6221     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6222     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6223     as_fn_arith $ac_count + 1 && ac_count=$as_val
6224     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6225       # Best one so far, save it but keep looking for a better one
6226       ac_cv_path_EGREP="$ac_path_EGREP"
6227       ac_path_EGREP_max=$ac_count
6228     fi
6229     # 10*(2^10) chars as input seems more than enough
6230     test $ac_count -gt 10 && break
6231   done
6232   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6233 esac
6234
6235       $ac_path_EGREP_found && break 3
6236     done
6237   done
6238   done
6239 IFS=$as_save_IFS
6240   if test -z "$ac_cv_path_EGREP"; then
6241     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6242   fi
6243 else
6244   ac_cv_path_EGREP=$EGREP
6245 fi
6246
6247    fi
6248 fi
6249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6250 $as_echo "$ac_cv_path_EGREP" >&6; }
6251  EGREP="$ac_cv_path_EGREP"
6252
6253
6254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6255 /* end confdefs.h.  */
6256 #if __ELF__
6257   yes
6258 #endif
6259
6260 _ACEOF
6261 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6262   $EGREP "yes" >/dev/null 2>&1; then :
6263   ELF_SYS=true
6264 else
6265   if test "X$elf" = "Xyes" ; then
6266   ELF_SYS=true
6267 else
6268   ELF_SYS=
6269 fi
6270 fi
6271 rm -f conftest*
6272
6273
6274
6275 #
6276 # Assignments
6277 #
6278
6279 CPPFLAGS="$CPPFLAGS $INCLUDES"
6280 LDFLAGS="$LDFLAGS $LIBDIRS"
6281
6282
6283
6284
6285
6286 # Check whether --with-gnu-ld was given.
6287 if test "${with_gnu_ld+set}" = set; then :
6288   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
6289 else
6290   with_gnu_ld=no
6291 fi
6292
6293 ac_prog=ld
6294 if test "$GCC" = yes; then
6295   # Check if gcc -print-prog-name=ld gives a path.
6296   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
6297 $as_echo_n "checking for ld used by GCC... " >&6; }
6298   case $host in
6299   *-*-mingw*)
6300     # gcc leaves a trailing carriage return which upsets mingw
6301     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6302   *)
6303     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6304   esac
6305   case "$ac_prog" in
6306     # Accept absolute paths.
6307     [\\/]* | [A-Za-z]:[\\/]*)
6308       re_direlt='/[^/][^/]*/\.\./'
6309       # Canonicalize the path of ld
6310       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
6311       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
6312         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
6313       done
6314       test -z "$LD" && LD="$ac_prog"
6315       ;;
6316   "")
6317     # If it fails, then pretend we aren't using GCC.
6318     ac_prog=ld
6319     ;;
6320   *)
6321     # If it is relative, then search for the first ld in PATH.
6322     with_gnu_ld=unknown
6323     ;;
6324   esac
6325 elif test "$with_gnu_ld" = yes; then
6326   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
6327 $as_echo_n "checking for GNU ld... " >&6; }
6328 else
6329   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
6330 $as_echo_n "checking for non-GNU ld... " >&6; }
6331 fi
6332 if ${ac_cv_path_LD+:} false; then :
6333   $as_echo_n "(cached) " >&6
6334 else
6335   if test -z "$LD"; then
6336   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
6337   for ac_dir in $PATH; do
6338     test -z "$ac_dir" && ac_dir=.
6339     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6340       ac_cv_path_LD="$ac_dir/$ac_prog"
6341       # Check to see if the program is GNU ld.  I'd rather use --version,
6342       # but apparently some GNU ld's only accept -v.
6343       # Break only if it was the GNU/non-GNU ld that we prefer.
6344       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
6345         test "$with_gnu_ld" != no && break
6346       else
6347         test "$with_gnu_ld" != yes && break
6348       fi
6349     fi
6350   done
6351   IFS="$ac_save_ifs"
6352 else
6353   ac_cv_path_LD="$LD" # Let the user override the test with a path.
6354 fi
6355 fi
6356
6357 LD="$ac_cv_path_LD"
6358 if test -n "$LD"; then
6359   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
6360 $as_echo "$LD" >&6; }
6361 else
6362   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6363 $as_echo "no" >&6; }
6364 fi
6365 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
6366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
6367 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
6368 if ${ac_cv_prog_gnu_ld+:} false; then :
6369   $as_echo_n "(cached) " >&6
6370 else
6371   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
6372 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
6373   ac_cv_prog_gnu_ld=yes
6374 else
6375   ac_cv_prog_gnu_ld=no
6376 fi
6377 fi
6378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
6379 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
6380 with_gnu_ld=$ac_cv_prog_gnu_ld
6381
6382
6383
6384
6385 case $host_os in sysv5*)
6386   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ld -R works" >&5
6387 $as_echo_n "checking whether ld -R works... " >&6; }
6388 if ${pgac_cv_prog_ld_R+:} false; then :
6389   $as_echo_n "(cached) " >&6
6390 else
6391
6392     pgac_save_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -Wl,-R/usr/lib"
6393     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6394 /* end confdefs.h.  */
6395
6396 int
6397 main ()
6398 {
6399
6400   ;
6401   return 0;
6402 }
6403 _ACEOF
6404 if ac_fn_c_try_link "$LINENO"; then :
6405   pgac_cv_prog_ld_R=yes
6406 else
6407   pgac_cv_prog_ld_R=no
6408 fi
6409 rm -f core conftest.err conftest.$ac_objext \
6410     conftest$ac_exeext conftest.$ac_ext
6411     LDFLAGS=$pgac_save_LDFLAGS
6412
6413 fi
6414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_ld_R" >&5
6415 $as_echo "$pgac_cv_prog_ld_R" >&6; }
6416   ld_R_works=$pgac_cv_prog_ld_R
6417
6418 esac
6419 if test -n "$ac_tool_prefix"; then
6420   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6421 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6423 $as_echo_n "checking for $ac_word... " >&6; }
6424 if ${ac_cv_prog_RANLIB+:} false; then :
6425   $as_echo_n "(cached) " >&6
6426 else
6427   if test -n "$RANLIB"; then
6428   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6429 else
6430 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6431 for as_dir in $PATH
6432 do
6433   IFS=$as_save_IFS
6434   test -z "$as_dir" && as_dir=.
6435     for ac_exec_ext in '' $ac_executable_extensions; do
6436   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6437     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6438     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6439     break 2
6440   fi
6441 done
6442   done
6443 IFS=$as_save_IFS
6444
6445 fi
6446 fi
6447 RANLIB=$ac_cv_prog_RANLIB
6448 if test -n "$RANLIB"; then
6449   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6450 $as_echo "$RANLIB" >&6; }
6451 else
6452   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6453 $as_echo "no" >&6; }
6454 fi
6455
6456
6457 fi
6458 if test -z "$ac_cv_prog_RANLIB"; then
6459   ac_ct_RANLIB=$RANLIB
6460   # Extract the first word of "ranlib", so it can be a program name with args.
6461 set dummy ranlib; ac_word=$2
6462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6463 $as_echo_n "checking for $ac_word... " >&6; }
6464 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6465   $as_echo_n "(cached) " >&6
6466 else
6467   if test -n "$ac_ct_RANLIB"; then
6468   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6469 else
6470 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6471 for as_dir in $PATH
6472 do
6473   IFS=$as_save_IFS
6474   test -z "$as_dir" && as_dir=.
6475     for ac_exec_ext in '' $ac_executable_extensions; do
6476   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6477     ac_cv_prog_ac_ct_RANLIB="ranlib"
6478     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6479     break 2
6480   fi
6481 done
6482   done
6483 IFS=$as_save_IFS
6484
6485 fi
6486 fi
6487 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6488 if test -n "$ac_ct_RANLIB"; then
6489   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6490 $as_echo "$ac_ct_RANLIB" >&6; }
6491 else
6492   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6493 $as_echo "no" >&6; }
6494 fi
6495
6496   if test "x$ac_ct_RANLIB" = x; then
6497     RANLIB=":"
6498   else
6499     case $cross_compiling:$ac_tool_warned in
6500 yes:)
6501 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6502 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6503 ac_tool_warned=yes ;;
6504 esac
6505     RANLIB=$ac_ct_RANLIB
6506   fi
6507 else
6508   RANLIB="$ac_cv_prog_RANLIB"
6509 fi
6510
6511
6512   if test -n "$ac_tool_prefix"; then
6513   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6514 set dummy ${ac_tool_prefix}strip; ac_word=$2
6515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6516 $as_echo_n "checking for $ac_word... " >&6; }
6517 if ${ac_cv_prog_STRIP+:} false; then :
6518   $as_echo_n "(cached) " >&6
6519 else
6520   if test -n "$STRIP"; then
6521   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6522 else
6523 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6524 for as_dir in $PATH
6525 do
6526   IFS=$as_save_IFS
6527   test -z "$as_dir" && as_dir=.
6528     for ac_exec_ext in '' $ac_executable_extensions; do
6529   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6530     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6531     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6532     break 2
6533   fi
6534 done
6535   done
6536 IFS=$as_save_IFS
6537
6538 fi
6539 fi
6540 STRIP=$ac_cv_prog_STRIP
6541 if test -n "$STRIP"; then
6542   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6543 $as_echo "$STRIP" >&6; }
6544 else
6545   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6546 $as_echo "no" >&6; }
6547 fi
6548
6549
6550 fi
6551 if test -z "$ac_cv_prog_STRIP"; then
6552   ac_ct_STRIP=$STRIP
6553   # Extract the first word of "strip", so it can be a program name with args.
6554 set dummy strip; ac_word=$2
6555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6556 $as_echo_n "checking for $ac_word... " >&6; }
6557 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
6558   $as_echo_n "(cached) " >&6
6559 else
6560   if test -n "$ac_ct_STRIP"; then
6561   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6562 else
6563 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6564 for as_dir in $PATH
6565 do
6566   IFS=$as_save_IFS
6567   test -z "$as_dir" && as_dir=.
6568     for ac_exec_ext in '' $ac_executable_extensions; do
6569   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6570     ac_cv_prog_ac_ct_STRIP="strip"
6571     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6572     break 2
6573   fi
6574 done
6575   done
6576 IFS=$as_save_IFS
6577
6578 fi
6579 fi
6580 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6581 if test -n "$ac_ct_STRIP"; then
6582   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6583 $as_echo "$ac_ct_STRIP" >&6; }
6584 else
6585   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6586 $as_echo "no" >&6; }
6587 fi
6588
6589   if test "x$ac_ct_STRIP" = x; then
6590     STRIP=":"
6591   else
6592     case $cross_compiling:$ac_tool_warned in
6593 yes:)
6594 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6595 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6596 ac_tool_warned=yes ;;
6597 esac
6598     STRIP=$ac_ct_STRIP
6599   fi
6600 else
6601   STRIP="$ac_cv_prog_STRIP"
6602 fi
6603
6604
6605   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
6606 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
6607   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
6608     STRIP_STATIC_LIB="$STRIP -x"
6609     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
6610     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6611 $as_echo "yes" >&6; }
6612   else
6613     case $host_os in
6614       darwin*)
6615         STRIP="$STRIP -x"
6616         STRIP_STATIC_LIB=$STRIP
6617         STRIP_SHARED_LIB=$STRIP
6618         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6619 $as_echo "yes" >&6; }
6620         ;;
6621       *)
6622         STRIP_STATIC_LIB=:
6623         STRIP_SHARED_LIB=:
6624         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6625 $as_echo "no" >&6; }
6626         ;;
6627     esac
6628   fi
6629
6630
6631
6632 if test -n "$ac_tool_prefix"; then
6633   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6634 set dummy ${ac_tool_prefix}ar; ac_word=$2
6635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6636 $as_echo_n "checking for $ac_word... " >&6; }
6637 if ${ac_cv_prog_AR+:} false; then :
6638   $as_echo_n "(cached) " >&6
6639 else
6640   if test -n "$AR"; then
6641   ac_cv_prog_AR="$AR" # Let the user override the test.
6642 else
6643 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6644 for as_dir in $PATH
6645 do
6646   IFS=$as_save_IFS
6647   test -z "$as_dir" && as_dir=.
6648     for ac_exec_ext in '' $ac_executable_extensions; do
6649   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6650     ac_cv_prog_AR="${ac_tool_prefix}ar"
6651     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6652     break 2
6653   fi
6654 done
6655   done
6656 IFS=$as_save_IFS
6657
6658 fi
6659 fi
6660 AR=$ac_cv_prog_AR
6661 if test -n "$AR"; then
6662   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6663 $as_echo "$AR" >&6; }
6664 else
6665   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6666 $as_echo "no" >&6; }
6667 fi
6668
6669
6670 fi
6671 if test -z "$ac_cv_prog_AR"; then
6672   ac_ct_AR=$AR
6673   # Extract the first word of "ar", so it can be a program name with args.
6674 set dummy ar; ac_word=$2
6675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6676 $as_echo_n "checking for $ac_word... " >&6; }
6677 if ${ac_cv_prog_ac_ct_AR+:} false; then :
6678   $as_echo_n "(cached) " >&6
6679 else
6680   if test -n "$ac_ct_AR"; then
6681   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6682 else
6683 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6684 for as_dir in $PATH
6685 do
6686   IFS=$as_save_IFS
6687   test -z "$as_dir" && as_dir=.
6688     for ac_exec_ext in '' $ac_executable_extensions; do
6689   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6690     ac_cv_prog_ac_ct_AR="ar"
6691     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6692     break 2
6693   fi
6694 done
6695   done
6696 IFS=$as_save_IFS
6697
6698 fi
6699 fi
6700 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6701 if test -n "$ac_ct_AR"; then
6702   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6703 $as_echo "$ac_ct_AR" >&6; }
6704 else
6705   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6706 $as_echo "no" >&6; }
6707 fi
6708
6709   if test "x$ac_ct_AR" = x; then
6710     AR="ar"
6711   else
6712     case $cross_compiling:$ac_tool_warned in
6713 yes:)
6714 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6715 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6716 ac_tool_warned=yes ;;
6717 esac
6718     AR=$ac_ct_AR
6719   fi
6720 else
6721   AR="$ac_cv_prog_AR"
6722 fi
6723
6724 if test "$PORTNAME" = "win32"; then
6725   if test -n "$ac_tool_prefix"; then
6726   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6727 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
6728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6729 $as_echo_n "checking for $ac_word... " >&6; }
6730 if ${ac_cv_prog_DLLTOOL+:} false; then :
6731   $as_echo_n "(cached) " >&6
6732 else
6733   if test -n "$DLLTOOL"; then
6734   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6735 else
6736 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6737 for as_dir in $PATH
6738 do
6739   IFS=$as_save_IFS
6740   test -z "$as_dir" && as_dir=.
6741     for ac_exec_ext in '' $ac_executable_extensions; do
6742   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6743     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
6744     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6745     break 2
6746   fi
6747 done
6748   done
6749 IFS=$as_save_IFS
6750
6751 fi
6752 fi
6753 DLLTOOL=$ac_cv_prog_DLLTOOL
6754 if test -n "$DLLTOOL"; then
6755   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
6756 $as_echo "$DLLTOOL" >&6; }
6757 else
6758   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6759 $as_echo "no" >&6; }
6760 fi
6761
6762
6763 fi
6764 if test -z "$ac_cv_prog_DLLTOOL"; then
6765   ac_ct_DLLTOOL=$DLLTOOL
6766   # Extract the first word of "dlltool", so it can be a program name with args.
6767 set dummy dlltool; ac_word=$2
6768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6769 $as_echo_n "checking for $ac_word... " >&6; }
6770 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
6771   $as_echo_n "(cached) " >&6
6772 else
6773   if test -n "$ac_ct_DLLTOOL"; then
6774   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6775 else
6776 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6777 for as_dir in $PATH
6778 do
6779   IFS=$as_save_IFS
6780   test -z "$as_dir" && as_dir=.
6781     for ac_exec_ext in '' $ac_executable_extensions; do
6782   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6783     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
6784     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6785     break 2
6786   fi
6787 done
6788   done
6789 IFS=$as_save_IFS
6790
6791 fi
6792 fi
6793 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6794 if test -n "$ac_ct_DLLTOOL"; then
6795   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
6796 $as_echo "$ac_ct_DLLTOOL" >&6; }
6797 else
6798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6799 $as_echo "no" >&6; }
6800 fi
6801
6802   if test "x$ac_ct_DLLTOOL" = x; then
6803     DLLTOOL="dlltool"
6804   else
6805     case $cross_compiling:$ac_tool_warned in
6806 yes:)
6807 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6808 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6809 ac_tool_warned=yes ;;
6810 esac
6811     DLLTOOL=$ac_ct_DLLTOOL
6812   fi
6813 else
6814   DLLTOOL="$ac_cv_prog_DLLTOOL"
6815 fi
6816
6817   if test -n "$ac_tool_prefix"; then
6818   # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
6819 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
6820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6821 $as_echo_n "checking for $ac_word... " >&6; }
6822 if ${ac_cv_prog_DLLWRAP+:} false; then :
6823   $as_echo_n "(cached) " >&6
6824 else
6825   if test -n "$DLLWRAP"; then
6826   ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
6827 else
6828 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6829 for as_dir in $PATH
6830 do
6831   IFS=$as_save_IFS
6832   test -z "$as_dir" && as_dir=.
6833     for ac_exec_ext in '' $ac_executable_extensions; do
6834   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6835     ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
6836     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6837     break 2
6838   fi
6839 done
6840   done
6841 IFS=$as_save_IFS
6842
6843 fi
6844 fi
6845 DLLWRAP=$ac_cv_prog_DLLWRAP
6846 if test -n "$DLLWRAP"; then
6847   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5
6848 $as_echo "$DLLWRAP" >&6; }
6849 else
6850   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6851 $as_echo "no" >&6; }
6852 fi
6853
6854
6855 fi
6856 if test -z "$ac_cv_prog_DLLWRAP"; then
6857   ac_ct_DLLWRAP=$DLLWRAP
6858   # Extract the first word of "dllwrap", so it can be a program name with args.
6859 set dummy dllwrap; ac_word=$2
6860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6861 $as_echo_n "checking for $ac_word... " >&6; }
6862 if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then :
6863   $as_echo_n "(cached) " >&6
6864 else
6865   if test -n "$ac_ct_DLLWRAP"; then
6866   ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
6867 else
6868 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6869 for as_dir in $PATH
6870 do
6871   IFS=$as_save_IFS
6872   test -z "$as_dir" && as_dir=.
6873     for ac_exec_ext in '' $ac_executable_extensions; do
6874   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6875     ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
6876     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6877     break 2
6878   fi
6879 done
6880   done
6881 IFS=$as_save_IFS
6882
6883 fi
6884 fi
6885 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
6886 if test -n "$ac_ct_DLLWRAP"; then
6887   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5
6888 $as_echo "$ac_ct_DLLWRAP" >&6; }
6889 else
6890   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6891 $as_echo "no" >&6; }
6892 fi
6893
6894   if test "x$ac_ct_DLLWRAP" = x; then
6895     DLLWRAP="dllwrap"
6896   else
6897     case $cross_compiling:$ac_tool_warned in
6898 yes:)
6899 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6900 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6901 ac_tool_warned=yes ;;
6902 esac
6903     DLLWRAP=$ac_ct_DLLWRAP
6904   fi
6905 else
6906   DLLWRAP="$ac_cv_prog_DLLWRAP"
6907 fi
6908
6909   if test -n "$ac_tool_prefix"; then
6910   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6911 set dummy ${ac_tool_prefix}windres; ac_word=$2
6912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6913 $as_echo_n "checking for $ac_word... " >&6; }
6914 if ${ac_cv_prog_WINDRES+:} false; then :
6915   $as_echo_n "(cached) " >&6
6916 else
6917   if test -n "$WINDRES"; then
6918   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
6919 else
6920 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6921 for as_dir in $PATH
6922 do
6923   IFS=$as_save_IFS
6924   test -z "$as_dir" && as_dir=.
6925     for ac_exec_ext in '' $ac_executable_extensions; do
6926   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6927     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
6928     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6929     break 2
6930   fi
6931 done
6932   done
6933 IFS=$as_save_IFS
6934
6935 fi
6936 fi
6937 WINDRES=$ac_cv_prog_WINDRES
6938 if test -n "$WINDRES"; then
6939   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
6940 $as_echo "$WINDRES" >&6; }
6941 else
6942   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6943 $as_echo "no" >&6; }
6944 fi
6945
6946
6947 fi
6948 if test -z "$ac_cv_prog_WINDRES"; then
6949   ac_ct_WINDRES=$WINDRES
6950   # Extract the first word of "windres", so it can be a program name with args.
6951 set dummy windres; ac_word=$2
6952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6953 $as_echo_n "checking for $ac_word... " >&6; }
6954 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
6955   $as_echo_n "(cached) " >&6
6956 else
6957   if test -n "$ac_ct_WINDRES"; then
6958   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
6959 else
6960 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6961 for as_dir in $PATH
6962 do
6963   IFS=$as_save_IFS
6964   test -z "$as_dir" && as_dir=.
6965     for ac_exec_ext in '' $ac_executable_extensions; do
6966   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6967     ac_cv_prog_ac_ct_WINDRES="windres"
6968     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6969     break 2
6970   fi
6971 done
6972   done
6973 IFS=$as_save_IFS
6974
6975 fi
6976 fi
6977 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6978 if test -n "$ac_ct_WINDRES"; then
6979   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
6980 $as_echo "$ac_ct_WINDRES" >&6; }
6981 else
6982   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6983 $as_echo "no" >&6; }
6984 fi
6985
6986   if test "x$ac_ct_WINDRES" = x; then
6987     WINDRES="windres"
6988   else
6989     case $cross_compiling:$ac_tool_warned in
6990 yes:)
6991 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6992 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6993 ac_tool_warned=yes ;;
6994 esac
6995     WINDRES=$ac_ct_WINDRES
6996   fi
6997 else
6998   WINDRES="$ac_cv_prog_WINDRES"
6999 fi
7000
7001 fi
7002
7003 # Find a good install program.  We prefer a C program (faster),
7004 # so one script is as good as another.  But avoid the broken or
7005 # incompatible versions:
7006 # SysV /etc/install, /usr/sbin/install
7007 # SunOS /usr/etc/install
7008 # IRIX /sbin/install
7009 # AIX /bin/install
7010 # AmigaOS /C/install, which installs bootblocks on floppy discs
7011 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7012 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
7013 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7014 # OS/2's system install, which has a completely different semantic
7015 # ./install, which can be erroneously created by make from ./install.sh.
7016 # Reject install programs that cannot install multiple files.
7017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7018 $as_echo_n "checking for a BSD-compatible install... " >&6; }
7019 if test -z "$INSTALL"; then
7020 if ${ac_cv_path_install+:} false; then :
7021   $as_echo_n "(cached) " >&6
7022 else
7023   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7024 for as_dir in $PATH
7025 do
7026   IFS=$as_save_IFS
7027   test -z "$as_dir" && as_dir=.
7028     # Account for people who put trailing slashes in PATH elements.
7029 case $as_dir/ in #((
7030   ./ | .// | /[cC]/* | \
7031   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7032   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7033   /usr/ucb/* ) ;;
7034   *)
7035     # OSF1 and SCO ODT 3.0 have their own names for install.
7036     # Don't use installbsd from OSF since it installs stuff as root
7037     # by default.
7038     for ac_prog in ginstall scoinst install; do
7039       for ac_exec_ext in '' $ac_executable_extensions; do
7040         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
7041           if test $ac_prog = install &&
7042             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7043             # AIX install.  It has an incompatible calling convention.
7044             :
7045           elif test $ac_prog = install &&
7046             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7047             # program-specific install script used by HP pwplus--don't use.
7048             :
7049           else
7050             rm -rf conftest.one conftest.two conftest.dir
7051             echo one > conftest.one
7052             echo two > conftest.two
7053             mkdir conftest.dir
7054             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7055               test -s conftest.one && test -s conftest.two &&
7056               test -s conftest.dir/conftest.one &&
7057               test -s conftest.dir/conftest.two
7058             then
7059               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7060               break 3
7061             fi
7062           fi
7063         fi
7064       done
7065     done
7066     ;;
7067 esac
7068
7069   done
7070 IFS=$as_save_IFS
7071
7072 rm -rf conftest.one conftest.two conftest.dir
7073
7074 fi
7075   if test "${ac_cv_path_install+set}" = set; then
7076     INSTALL=$ac_cv_path_install
7077   else
7078     # As a last resort, use the slow shell script.  Don't cache a
7079     # value for INSTALL within a source directory, because that will
7080     # break other packages using the cache if that directory is
7081     # removed, or if the value is a relative name.
7082     INSTALL=$ac_install_sh
7083   fi
7084 fi
7085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7086 $as_echo "$INSTALL" >&6; }
7087
7088 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7089 # It thinks the first close brace ends the variable substitution.
7090 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7091
7092 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7093
7094 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7095
7096 # When Autoconf chooses install-sh as install program it tries to generate
7097 # a relative path to it in each makefile where it subsitutes it. This clashes
7098 # with our Makefile.global concept. This workaround helps.
7099 case $INSTALL in
7100   *install-sh*) install_bin='';;
7101   *) install_bin=$INSTALL;;
7102 esac
7103
7104
7105 # Extract the first word of "tar", so it can be a program name with args.
7106 set dummy tar; ac_word=$2
7107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7108 $as_echo_n "checking for $ac_word... " >&6; }
7109 if ${ac_cv_path_TAR+:} false; then :
7110   $as_echo_n "(cached) " >&6
7111 else
7112   case $TAR in
7113   [\\/]* | ?:[\\/]*)
7114   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
7115   ;;
7116   *)
7117   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7118 for as_dir in $PATH
7119 do
7120   IFS=$as_save_IFS
7121   test -z "$as_dir" && as_dir=.
7122     for ac_exec_ext in '' $ac_executable_extensions; do
7123   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7124     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
7125     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7126     break 2
7127   fi
7128 done
7129   done
7130 IFS=$as_save_IFS
7131
7132   ;;
7133 esac
7134 fi
7135 TAR=$ac_cv_path_TAR
7136 if test -n "$TAR"; then
7137   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
7138 $as_echo "$TAR" >&6; }
7139 else
7140   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7141 $as_echo "no" >&6; }
7142 fi
7143
7144
7145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7146 $as_echo_n "checking whether ln -s works... " >&6; }
7147 LN_S=$as_ln_s
7148 if test "$LN_S" = "ln -s"; then
7149   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7150 $as_echo "yes" >&6; }
7151 else
7152   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7153 $as_echo "no, using $LN_S" >&6; }
7154 fi
7155
7156 for ac_prog in gawk mawk nawk awk
7157 do
7158   # Extract the first word of "$ac_prog", so it can be a program name with args.
7159 set dummy $ac_prog; ac_word=$2
7160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7161 $as_echo_n "checking for $ac_word... " >&6; }
7162 if ${ac_cv_prog_AWK+:} false; then :
7163   $as_echo_n "(cached) " >&6
7164 else
7165   if test -n "$AWK"; then
7166   ac_cv_prog_AWK="$AWK" # Let the user override the test.
7167 else
7168 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7169 for as_dir in $PATH
7170 do
7171   IFS=$as_save_IFS
7172   test -z "$as_dir" && as_dir=.
7173     for ac_exec_ext in '' $ac_executable_extensions; do
7174   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7175     ac_cv_prog_AWK="$ac_prog"
7176     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7177     break 2
7178   fi
7179 done
7180   done
7181 IFS=$as_save_IFS
7182
7183 fi
7184 fi
7185 AWK=$ac_cv_prog_AWK
7186 if test -n "$AWK"; then
7187   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7188 $as_echo "$AWK" >&6; }
7189 else
7190   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7191 $as_echo "no" >&6; }
7192 fi
7193
7194
7195   test -n "$AWK" && break
7196 done
7197
7198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
7199 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
7200 if test -z "$MKDIR_P"; then
7201   if ${ac_cv_path_mkdir+:} false; then :
7202   $as_echo_n "(cached) " >&6
7203 else
7204   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7205 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
7206 do
7207   IFS=$as_save_IFS
7208   test -z "$as_dir" && as_dir=.
7209     for ac_prog in mkdir gmkdir; do
7210          for ac_exec_ext in '' $ac_executable_extensions; do
7211            as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
7212            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
7213              'mkdir (GNU coreutils) '* | \
7214              'mkdir (coreutils) '* | \
7215              'mkdir (fileutils) '4.1*)
7216                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
7217                break 3;;
7218            esac
7219          done
7220        done
7221   done
7222 IFS=$as_save_IFS
7223
7224 fi
7225
7226   test -d ./--version && rmdir ./--version
7227   if test "${ac_cv_path_mkdir+set}" = set; then
7228     MKDIR_P="$ac_cv_path_mkdir -p"
7229   else
7230     # As a last resort, use the slow shell script.  Don't cache a
7231     # value for MKDIR_P within a source directory, because that will
7232     # break other packages using the cache if that directory is
7233     # removed, or if the value is a relative name.
7234     MKDIR_P="$ac_install_sh -d"
7235   fi
7236 fi
7237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
7238 $as_echo "$MKDIR_P" >&6; }
7239
7240 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
7241 # a relative path to it in each makefile where it subsitutes it. This clashes
7242 # with our Makefile.global concept. This workaround helps.
7243 case $MKDIR_P in
7244   *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
7245 esac
7246
7247 # Let the user override the search
7248 if test -z "$BISON"; then
7249   for ac_prog in bison
7250 do
7251   # Extract the first word of "$ac_prog", so it can be a program name with args.
7252 set dummy $ac_prog; ac_word=$2
7253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7254 $as_echo_n "checking for $ac_word... " >&6; }
7255 if ${ac_cv_path_BISON+:} false; then :
7256   $as_echo_n "(cached) " >&6
7257 else
7258   case $BISON in
7259   [\\/]* | ?:[\\/]*)
7260   ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
7261   ;;
7262   *)
7263   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7264 for as_dir in $PATH
7265 do
7266   IFS=$as_save_IFS
7267   test -z "$as_dir" && as_dir=.
7268     for ac_exec_ext in '' $ac_executable_extensions; do
7269   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7270     ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
7271     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7272     break 2
7273   fi
7274 done
7275   done
7276 IFS=$as_save_IFS
7277
7278   ;;
7279 esac
7280 fi
7281 BISON=$ac_cv_path_BISON
7282 if test -n "$BISON"; then
7283   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
7284 $as_echo "$BISON" >&6; }
7285 else
7286   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7287 $as_echo "no" >&6; }
7288 fi
7289
7290
7291   test -n "$BISON" && break
7292 done
7293
7294 fi
7295
7296 if test "$BISON"; then
7297   pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
7298   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
7299 $as_echo "$as_me: using $pgac_bison_version" >&6;}
7300   if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
7301   then
7302     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7303 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
7304 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
7305 $as_echo "$as_me: WARNING:
7306 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
7307 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
7308     BISON=""
7309   fi
7310   # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
7311   # of the now preferred %name-prefix "base_yy", but the latter
7312   # doesn't work with Bison 2.3 or less.  So for now we silence the
7313   # deprecation warnings.
7314   if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
7315   then
7316     BISONFLAGS="$BISONFLAGS -Wno-deprecated"
7317   fi
7318 fi
7319
7320 if test -z "$BISON"; then
7321   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7322 *** Without Bison you will not be able to build PostgreSQL from Git nor
7323 *** change any of the parser definition files.  You can obtain Bison from
7324 *** a GNU mirror site.  (If you are using the official distribution of
7325 *** PostgreSQL then you do not need to worry about this, because the Bison
7326 *** output is pre-generated.)" >&5
7327 $as_echo "$as_me: WARNING:
7328 *** Without Bison you will not be able to build PostgreSQL from Git nor
7329 *** change any of the parser definition files.  You can obtain Bison from
7330 *** a GNU mirror site.  (If you are using the official distribution of
7331 *** PostgreSQL then you do not need to worry about this, because the Bison
7332 *** output is pre-generated.)" >&2;}
7333 fi
7334 # We don't need AC_SUBST(BISON) because AC_PATH_PROG did it
7335
7336
7337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
7338 $as_echo_n "checking for flex... " >&6; }
7339 if ${pgac_cv_path_flex+:} false; then :
7340   $as_echo_n "(cached) " >&6
7341 else
7342   # Let the user override the test
7343 if test -n "$FLEX"; then
7344   pgac_cv_path_flex=$FLEX
7345 else
7346   pgac_save_IFS=$IFS
7347   IFS=$PATH_SEPARATOR
7348   for pgac_dir in $PATH; do
7349     IFS=$pgac_save_IFS
7350     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
7351       pgac_dir=`pwd`
7352     fi
7353     for pgac_prog in flex lex; do
7354       pgac_candidate="$pgac_dir/$pgac_prog"
7355       if test -f "$pgac_candidate" \
7356         && $pgac_candidate --version </dev/null >/dev/null 2>&1
7357       then
7358         echo '%%'  > conftest.l
7359         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
7360           pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
7361           if echo "$pgac_flex_version" | sed 's/[.a-z]/ /g' | $AWK '{ if ($1 == 2 && ($2 > 5 || ($2 == 5 && $3 >= 31))) exit 0; else exit 1;}'
7362           then
7363             pgac_cv_path_flex=$pgac_candidate
7364             break 2
7365           else
7366             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7367 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
7368 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
7369 $as_echo "$as_me: WARNING:
7370 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
7371 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
7372           fi
7373         fi
7374       fi
7375     done
7376   done
7377   rm -f conftest.l lex.yy.c
7378   : ${pgac_cv_path_flex=no}
7379 fi
7380
7381 fi
7382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
7383 $as_echo "$pgac_cv_path_flex" >&6; }
7384 if test x"$pgac_cv_path_flex" = x"no"; then
7385   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7386 *** Without Flex you will not be able to build PostgreSQL from Git nor
7387 *** change any of the scanner definition files.  You can obtain Flex from
7388 *** a GNU mirror site.  (If you are using the official distribution of
7389 *** PostgreSQL then you do not need to worry about this because the Flex
7390 *** output is pre-generated.)" >&5
7391 $as_echo "$as_me: WARNING:
7392 *** Without Flex you will not be able to build PostgreSQL from Git nor
7393 *** change any of the scanner definition files.  You can obtain Flex from
7394 *** a GNU mirror site.  (If you are using the official distribution of
7395 *** PostgreSQL then you do not need to worry about this because the Flex
7396 *** output is pre-generated.)" >&2;}
7397
7398   FLEX=
7399 else
7400   FLEX=$pgac_cv_path_flex
7401   pgac_flex_version=`$FLEX --version 2>/dev/null`
7402   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
7403 $as_echo "$as_me: using $pgac_flex_version" >&6;}
7404 fi
7405
7406
7407
7408
7409
7410 # Let the user override the search
7411 if test -z "$PERL"; then
7412   # Extract the first word of "perl", so it can be a program name with args.
7413 set dummy perl; ac_word=$2
7414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7415 $as_echo_n "checking for $ac_word... " >&6; }
7416 if ${ac_cv_path_PERL+:} false; then :
7417   $as_echo_n "(cached) " >&6
7418 else
7419   case $PERL in
7420   [\\/]* | ?:[\\/]*)
7421   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
7422   ;;
7423   *)
7424   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7425 for as_dir in $PATH
7426 do
7427   IFS=$as_save_IFS
7428   test -z "$as_dir" && as_dir=.
7429     for ac_exec_ext in '' $ac_executable_extensions; do
7430   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7431     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
7432     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7433     break 2
7434   fi
7435 done
7436   done
7437 IFS=$as_save_IFS
7438
7439   ;;
7440 esac
7441 fi
7442 PERL=$ac_cv_path_PERL
7443 if test -n "$PERL"; then
7444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
7445 $as_echo "$PERL" >&6; }
7446 else
7447   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7448 $as_echo "no" >&6; }
7449 fi
7450
7451
7452 fi
7453
7454 if test "$PERL"; then
7455   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'`
7456   { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
7457 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
7458   if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
7459     $AWK '{ if ($1 == 5 && $2 >= 8) exit 1; else exit 0;}'
7460   then
7461     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7462 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7463 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
7464 $as_echo "$as_me: WARNING:
7465 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7466 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
7467     PERL=""
7468   fi
7469 fi
7470
7471 if test -z "$PERL"; then
7472   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7473 *** Without Perl you will not be able to build PostgreSQL from Git.
7474 *** You can obtain Perl from any CPAN mirror site.
7475 *** (If you are using the official distribution of PostgreSQL then you do not
7476 *** need to worry about this, because the Perl output is pre-generated.)" >&5
7477 $as_echo "$as_me: WARNING:
7478 *** Without Perl you will not be able to build PostgreSQL from Git.
7479 *** You can obtain Perl from any CPAN mirror site.
7480 *** (If you are using the official distribution of PostgreSQL then you do not
7481 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
7482 fi
7483
7484 if test "$with_perl" = yes; then
7485   if test -z "$PERL"; then
7486     as_fn_error $? "Perl not found" "$LINENO" 5
7487   fi
7488
7489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
7490 $as_echo_n "checking for Perl archlibexp... " >&6; }
7491 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
7492 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
7493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
7494 $as_echo "$perl_archlibexp" >&6; }
7495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
7496 $as_echo_n "checking for Perl privlibexp... " >&6; }
7497 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
7498 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
7499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
7500 $as_echo "$perl_privlibexp" >&6; }
7501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
7502 $as_echo_n "checking for Perl useshrplib... " >&6; }
7503 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
7504 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
7505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
7506 $as_echo "$perl_useshrplib" >&6; }
7507   if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
7508     as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
7509 You might have to rebuild your Perl installation.  Refer to the
7510 documentation for details.  Use --without-perl to disable building
7511 PL/Perl." "$LINENO" 5
7512   fi
7513
7514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
7515 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
7516 if test "$PORTNAME" = "win32" ; then
7517 perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
7518 test -e "$perl_archlibexp/CORE/$perl_lib.lib" && perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
7519 else
7520 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
7521 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
7522 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
7523 fi
7524 if test -z "$perl_embed_ldflags" ; then
7525         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7526 $as_echo "no" >&6; }
7527         as_fn_error $? "could not determine flags for linking embedded Perl.
7528 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
7529 installed." "$LINENO" 5
7530 else
7531         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
7532 $as_echo "$perl_embed_ldflags" >&6; }
7533 fi
7534
7535 fi
7536
7537 if test "$with_python" = yes; then
7538   # Extract the first word of "python", so it can be a program name with args.
7539 set dummy python; ac_word=$2
7540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7541 $as_echo_n "checking for $ac_word... " >&6; }
7542 if ${ac_cv_path_PYTHON+:} false; then :
7543   $as_echo_n "(cached) " >&6
7544 else
7545   case $PYTHON in
7546   [\\/]* | ?:[\\/]*)
7547   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
7548   ;;
7549   *)
7550   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7551 for as_dir in $PATH
7552 do
7553   IFS=$as_save_IFS
7554   test -z "$as_dir" && as_dir=.
7555     for ac_exec_ext in '' $ac_executable_extensions; do
7556   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7557     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
7558     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7559     break 2
7560   fi
7561 done
7562   done
7563 IFS=$as_save_IFS
7564
7565   ;;
7566 esac
7567 fi
7568 PYTHON=$ac_cv_path_PYTHON
7569 if test -n "$PYTHON"; then
7570   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
7571 $as_echo "$PYTHON" >&6; }
7572 else
7573   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7574 $as_echo "no" >&6; }
7575 fi
7576
7577
7578 if test x"$PYTHON" = x""; then
7579   as_fn_error $? "Python not found" "$LINENO" 5
7580 fi
7581
7582
7583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python distutils module" >&5
7584 $as_echo_n "checking for Python distutils module... " >&6; }
7585 if "${PYTHON}" -c 'import distutils' 2>&5
7586 then
7587     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7588 $as_echo "yes" >&6; }
7589 else
7590     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7591 $as_echo "no" >&6; }
7592     as_fn_error $? "distutils module not found" "$LINENO" 5
7593 fi
7594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
7595 $as_echo_n "checking Python configuration directory... " >&6; }
7596 python_majorversion=`${PYTHON} -c "import sys; print(sys.version[0])"`
7597 python_version=`${PYTHON} -c "import sys; print(sys.version[:3])"`
7598 python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
7599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
7600 $as_echo "$python_configdir" >&6; }
7601
7602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directories" >&5
7603 $as_echo_n "checking Python include directories... " >&6; }
7604 python_includespec=`${PYTHON} -c "
7605 import distutils.sysconfig
7606 a = '-I' + distutils.sysconfig.get_python_inc(False)
7607 b = '-I' + distutils.sysconfig.get_python_inc(True)
7608 if a == b:
7609     print(a)
7610 else:
7611     print(a + ' ' + b)"`
7612 if test "$PORTNAME" = win32 ; then
7613     python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
7614 fi
7615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
7616 $as_echo "$python_includespec" >&6; }
7617
7618
7619
7620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
7621 $as_echo_n "checking how to link an embedded Python application... " >&6; }
7622
7623 python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
7624 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
7625 python_so=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('SO'))))"`
7626 ldlibrary=`echo "${python_ldlibrary}" | sed "s/${python_so}$//"`
7627 python_enable_shared=`${PYTHON} -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_vars().get('Py_ENABLE_SHARED',0))"`
7628
7629 if test x"${python_libdir}" != x"" -a x"${python_ldlibrary}" != x"" -a x"${python_ldlibrary}" != x"${ldlibrary}"
7630 then
7631         # New way: use the official shared library
7632         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
7633         python_libspec="-L${python_libdir} -l${ldlibrary}"
7634 else
7635         # Old way: use libpython from python_configdir
7636         python_libdir="${python_configdir}"
7637         # LDVERSION was introduced in Python 3.2.
7638         python_ldversion=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDVERSION'))))"`
7639         if test x"${python_ldversion}" = x""; then
7640                 python_ldversion=$python_version
7641         fi
7642         python_libspec="-L${python_libdir} -lpython${python_ldversion}"
7643 fi
7644
7645 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
7646
7647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
7648 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
7649
7650
7651
7652
7653   # We need libpython as a shared library.  With Python >=2.5, we
7654   # check the Py_ENABLE_SHARED setting.  On Debian, the setting is not
7655   # correct before the jessie release (http://bugs.debian.org/695979).
7656   # We also want to support older Python versions.  So as a fallback
7657   # we see if there is a file that is named like a shared library.
7658
7659   if test "$python_enable_shared" != 1; then
7660     if test "$PORTNAME" = darwin; then
7661       # OS X does supply a .dylib even though Py_ENABLE_SHARED does
7662       # not get set.  The file detection logic below doesn't succeed
7663       # on older OS X versions, so make it explicit.
7664       python_enable_shared=1
7665     elif test "$PORTNAME" = win32; then
7666       # Windows also needs an explicit override.
7667       python_enable_shared=1
7668     else
7669       # We don't know the platform shared library extension here yet,
7670       # so we try some candidates.
7671       for dlsuffix in .so .sl; do
7672         if ls "$python_libdir"/libpython*${dlsuffix}* >/dev/null 2>&1; then
7673           python_enable_shared=1
7674           break
7675         fi
7676       done
7677     fi
7678   fi
7679
7680   if test "$python_enable_shared" != 1; then
7681     as_fn_error $? "cannot build PL/Python because libpython is not a shared library
7682 You might have to rebuild your Python installation.  Refer to the
7683 documentation for details.  Use --without-python to disable building
7684 PL/Python." "$LINENO" 5
7685   fi
7686 fi
7687
7688 if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
7689   # Extract the first word of "zic", so it can be a program name with args.
7690 set dummy zic; ac_word=$2
7691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7692 $as_echo_n "checking for $ac_word... " >&6; }
7693 if ${ac_cv_path_ZIC+:} false; then :
7694   $as_echo_n "(cached) " >&6
7695 else
7696   case $ZIC in
7697   [\\/]* | ?:[\\/]*)
7698   ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
7699   ;;
7700   *)
7701   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7702 for as_dir in $PATH
7703 do
7704   IFS=$as_save_IFS
7705   test -z "$as_dir" && as_dir=.
7706     for ac_exec_ext in '' $ac_executable_extensions; do
7707   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7708     ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
7709     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7710     break 2
7711   fi
7712 done
7713   done
7714 IFS=$as_save_IFS
7715
7716   ;;
7717 esac
7718 fi
7719 ZIC=$ac_cv_path_ZIC
7720 if test -n "$ZIC"; then
7721   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
7722 $as_echo "$ZIC" >&6; }
7723 else
7724   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7725 $as_echo "no" >&6; }
7726 fi
7727
7728
7729   if test -z "$ZIC"; then
7730     as_fn_error $? "
7731 When cross-compiling, either use the option --with-system-tzdata to use
7732 existing time-zone data, or set the environment variable ZIC to a zic
7733 program to use during the build." "$LINENO" 5
7734   fi
7735 fi
7736
7737 #
7738 # Pthreads
7739 #
7740 # For each platform, we need to know about any special compile and link
7741 # libraries, and whether the normal C function names are thread-safe.
7742 # See the comment at the top of src/port/thread.c for more information.
7743 # WIN32 doesn't need the pthread tests;  it always uses threads
7744 #
7745 # These tests are run before the library-tests, because linking with the
7746 # other libraries can pull in the pthread functions as a side-effect.  We
7747 # want to use the -pthread or similar flags directly, and not rely on
7748 # the side-effects of linking with some other library.
7749 #
7750 # note: We have to use AS_IF here rather than plain if. The AC_CHECK_HEADER
7751 # invocation below is the first one in the script, and autoconf generates
7752 # additional code for that, which must not be inside the if-block. AS_IF
7753 # knows how to do that.
7754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7755 $as_echo_n "checking for ANSI C header files... " >&6; }
7756 if ${ac_cv_header_stdc+:} false; then :
7757   $as_echo_n "(cached) " >&6
7758 else
7759   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7760 /* end confdefs.h.  */
7761 #include <stdlib.h>
7762 #include <stdarg.h>
7763 #include <string.h>
7764 #include <float.h>
7765
7766 int
7767 main ()
7768 {
7769
7770   ;
7771   return 0;
7772 }
7773 _ACEOF
7774 if ac_fn_c_try_compile "$LINENO"; then :
7775   ac_cv_header_stdc=yes
7776 else
7777   ac_cv_header_stdc=no
7778 fi
7779 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7780
7781 if test $ac_cv_header_stdc = yes; then
7782   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7783   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7784 /* end confdefs.h.  */
7785 #include <string.h>
7786
7787 _ACEOF
7788 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7789   $EGREP "memchr" >/dev/null 2>&1; then :
7790
7791 else
7792   ac_cv_header_stdc=no
7793 fi
7794 rm -f conftest*
7795
7796 fi
7797
7798 if test $ac_cv_header_stdc = yes; then
7799   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7800   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7801 /* end confdefs.h.  */
7802 #include <stdlib.h>
7803
7804 _ACEOF
7805 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7806   $EGREP "free" >/dev/null 2>&1; then :
7807
7808 else
7809   ac_cv_header_stdc=no
7810 fi
7811 rm -f conftest*
7812
7813 fi
7814
7815 if test $ac_cv_header_stdc = yes; then
7816   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7817   if test "$cross_compiling" = yes; then :
7818   :
7819 else
7820   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7821 /* end confdefs.h.  */
7822 #include <ctype.h>
7823 #include <stdlib.h>
7824 #if ((' ' & 0x0FF) == 0x020)
7825 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7826 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7827 #else
7828 # define ISLOWER(c) \
7829                    (('a' <= (c) && (c) <= 'i') \
7830                      || ('j' <= (c) && (c) <= 'r') \
7831                      || ('s' <= (c) && (c) <= 'z'))
7832 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7833 #endif
7834
7835 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7836 int
7837 main ()
7838 {
7839   int i;
7840   for (i = 0; i < 256; i++)
7841     if (XOR (islower (i), ISLOWER (i))
7842         || toupper (i) != TOUPPER (i))
7843       return 2;
7844   return 0;
7845 }
7846 _ACEOF
7847 if ac_fn_c_try_run "$LINENO"; then :
7848
7849 else
7850   ac_cv_header_stdc=no
7851 fi
7852 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7853   conftest.$ac_objext conftest.beam conftest.$ac_ext
7854 fi
7855
7856 fi
7857 fi
7858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7859 $as_echo "$ac_cv_header_stdc" >&6; }
7860 if test $ac_cv_header_stdc = yes; then
7861
7862 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
7863
7864 fi
7865
7866 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
7867 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
7868                   inttypes.h stdint.h unistd.h
7869 do :
7870   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7871 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7872 "
7873 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7874   cat >>confdefs.h <<_ACEOF
7875 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7876 _ACEOF
7877
7878 fi
7879
7880 done
7881
7882
7883 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then :
7884    # then
7885
7886
7887
7888 ac_ext=c
7889 ac_cpp='$CPP $CPPFLAGS'
7890 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7891 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7892 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7893
7894 ax_pthread_ok=no
7895
7896 # We used to check for pthread.h first, but this fails if pthread.h
7897 # requires special compiler flags (e.g. on Tru64 or Sequent).
7898 # It gets checked for in the link test anyway.
7899
7900 # First of all, check if the user has set any of the PTHREAD_LIBS,
7901 # etcetera environment variables, and if threads linking works using
7902 # them:
7903 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
7904         save_CFLAGS="$CFLAGS"
7905         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
7906         save_LIBS="$LIBS"
7907         LIBS="$PTHREAD_LIBS $LIBS"
7908         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
7909 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
7910         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7911 /* end confdefs.h.  */
7912
7913 /* Override any GCC internal prototype to avoid an error.
7914    Use char because int might match the return type of a GCC
7915    builtin and then its argument prototype would still apply.  */
7916 #ifdef __cplusplus
7917 extern "C"
7918 #endif
7919 char pthread_join ();
7920 int
7921 main ()
7922 {
7923 return pthread_join ();
7924   ;
7925   return 0;
7926 }
7927 _ACEOF
7928 if ac_fn_c_try_link "$LINENO"; then :
7929   ax_pthread_ok=yes
7930 fi
7931 rm -f core conftest.err conftest.$ac_objext \
7932     conftest$ac_exeext conftest.$ac_ext
7933         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
7934 $as_echo "$ax_pthread_ok" >&6; }
7935         if test x"$ax_pthread_ok" = xno; then
7936                 PTHREAD_LIBS=""
7937                 PTHREAD_CFLAGS=""
7938         fi
7939         LIBS="$save_LIBS"
7940         CFLAGS="$save_CFLAGS"
7941 fi
7942
7943 # We must check for the threads library under a number of different
7944 # names; the ordering is very important because some systems
7945 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
7946 # libraries is broken (non-POSIX).
7947
7948 # Create a list of thread flags to try.  Items starting with a "-" are
7949 # C compiler flags, and other items are library names, except for "none"
7950 # which indicates that we try without any flags at all, and "pthread-config"
7951 # which is a program returning the flags for the Pth emulation library.
7952
7953 ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mt -mthreads pthread --thread-safe pthread-config"
7954
7955 # The ordering *is* (sometimes) important.  Some notes on the
7956 # individual items follow:
7957
7958 # pthreads: AIX (must check this before -lpthread)
7959 # none: in case threads are in libc; should be tried before -Kthread and
7960 #       other compiler flags to prevent continual compiler warnings
7961 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
7962 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
7963 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
7964 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
7965 # -pthreads: Solaris/gcc
7966 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
7967 #      doesn't hurt to check since this sometimes defines pthreads and
7968 #      -D_REENTRANT too), HP C (must be checked before -lpthread, which
7969 #      is present but should not be used directly)
7970 # -mthreads: Mingw32/gcc, Lynx/gcc
7971 # pthread: Linux, etcetera
7972 # --thread-safe: KAI C++
7973 # pthread-config: use pthread-config program (for GNU Pth library)
7974
7975 case $host_os in
7976
7977         hpux*)
7978
7979         # From the cc(1) man page: "[-mt] Sets various -D flags to enable
7980         # multi-threading and also sets -lpthread."
7981
7982         ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
7983         ;;
7984
7985         openedition*)
7986
7987         # IBM z/OS requires a feature-test macro to be defined in order to
7988         # enable POSIX threads at all, so give the user a hint if this is
7989         # not set. (We don't define these ourselves, as they can affect
7990         # other portions of the system API in unpredictable ways.)
7991
7992         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7993 /* end confdefs.h.  */
7994
7995 #            if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
7996              AX_PTHREAD_ZOS_MISSING
7997 #            endif
7998
7999 _ACEOF
8000 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8001   $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
8002   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
8003 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
8004 fi
8005 rm -f conftest*
8006
8007         ;;
8008
8009         solaris*)
8010
8011         # Newer versions of Solaris require the "-mt -lpthread" pair, and we
8012         # check that first.  On some older versions, libc contains stubbed
8013         # (non-functional) versions of the pthreads routines, so link-based
8014         # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
8015         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
8016         # a function called by this macro, so we could check for that, but
8017         # who knows whether they'll stub that too in a future libc.)  So
8018         # we'll look for -pthreads and -lpthread shortly thereafter.
8019
8020         ax_pthread_flags="-mt,pthread -pthreads -pthread pthread $ax_pthread_flags"
8021         ;;
8022 esac
8023
8024 # Older versions of Clang only give a warning instead of an error for an
8025 # unrecognized option, unless we specify -Werror. (We throw in some extra
8026 # Clang warning flags for good measure.)
8027
8028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler needs certain flags to reject unknown flags" >&5
8029 $as_echo_n "checking if compiler needs certain flags to reject unknown flags... " >&6; }
8030 if ${ax_cv_PTHREAD_REJECT_UNKNOWN+:} false; then :
8031   $as_echo_n "(cached) " >&6
8032 else
8033   ax_cv_PTHREAD_REJECT_UNKNOWN=unknown
8034      save_CFLAGS="$CFLAGS"
8035      ax_pthread_extra_flags="-Wunknown-warning-option -Wunused-command-line-argument"
8036      CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wfoobaz -foobaz"
8037      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8038 /* end confdefs.h.  */
8039 int foo(void);
8040 int
8041 main ()
8042 {
8043 foo()
8044   ;
8045   return 0;
8046 }
8047 _ACEOF
8048 if ac_fn_c_try_compile "$LINENO"; then :
8049   ax_cv_PTHREAD_REJECT_UNKNOWN="-Werror $ax_pthread_extra_flags"
8050 else
8051   ax_cv_PTHREAD_REJECT_UNKNOWN=no
8052 fi
8053 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8054      CFLAGS="$save_CFLAGS"
8055
8056 fi
8057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_REJECT_UNKNOWN" >&5
8058 $as_echo "$ax_cv_PTHREAD_REJECT_UNKNOWN" >&6; }
8059 ax_pthread_extra_flags=
8060 if test "x$ax_cv_PTHREAD_REJECT_UNKNOWN" != "xno"; then :
8061   ax_pthread_extra_flags="$ax_cv_PTHREAD_REJECT_UNKNOWN"
8062 fi
8063
8064 if test x"$ax_pthread_ok" = xno; then
8065 for flag in $ax_pthread_flags; do
8066
8067         case $flag in
8068                 none)
8069                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
8070 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
8071                 ;;
8072
8073                 -mt,pthread)
8074                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
8075 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
8076                 PTHREAD_CFLAGS="-mt"
8077                 PTHREAD_LIBS="-lpthread"
8078                 ;;
8079
8080                 -*)
8081                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
8082 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
8083                 PTHREAD_CFLAGS="$flag"
8084                 ;;
8085
8086                 pthread-config)
8087                 # Extract the first word of "pthread-config", so it can be a program name with args.
8088 set dummy pthread-config; ac_word=$2
8089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8090 $as_echo_n "checking for $ac_word... " >&6; }
8091 if ${ac_cv_prog_ax_pthread_config+:} false; then :
8092   $as_echo_n "(cached) " >&6
8093 else
8094   if test -n "$ax_pthread_config"; then
8095   ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
8096 else
8097 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8098 for as_dir in $PATH
8099 do
8100   IFS=$as_save_IFS
8101   test -z "$as_dir" && as_dir=.
8102     for ac_exec_ext in '' $ac_executable_extensions; do
8103   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8104     ac_cv_prog_ax_pthread_config="yes"
8105     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8106     break 2
8107   fi
8108 done
8109   done
8110 IFS=$as_save_IFS
8111
8112   test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
8113 fi
8114 fi
8115 ax_pthread_config=$ac_cv_prog_ax_pthread_config
8116 if test -n "$ax_pthread_config"; then
8117   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
8118 $as_echo "$ax_pthread_config" >&6; }
8119 else
8120   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8121 $as_echo "no" >&6; }
8122 fi
8123
8124
8125                 if test x"$ax_pthread_config" = xno; then continue; fi
8126                 PTHREAD_CFLAGS="`pthread-config --cflags`"
8127                 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
8128                 ;;
8129
8130                 *)
8131                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
8132 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
8133                 PTHREAD_LIBS="-l$flag"
8134                 ;;
8135         esac
8136
8137         save_LIBS="$LIBS"
8138         save_CFLAGS="$CFLAGS"
8139         LIBS="$PTHREAD_LIBS $LIBS"
8140         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
8141
8142         # Check for various functions.  We must include pthread.h,
8143         # since some functions may be macros.  (On the Sequent, we
8144         # need a special flag -Kthread to make this header compile.)
8145         # We check for pthread_join because it is in -lpthread on IRIX
8146         # while pthread_create is in libc.  We check for pthread_attr_init
8147         # due to DEC craziness with -lpthreads.  We check for
8148         # pthread_cleanup_push because it is one of the few pthread
8149         # functions on Solaris that doesn't have a non-functional libc stub.
8150         # We try pthread_create on general principles.
8151         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8152 /* end confdefs.h.  */
8153 #include <pthread.h>
8154                         static void routine(void *a) { a = 0; }
8155                         static void *start_routine(void *a) { return a; }
8156 int
8157 main ()
8158 {
8159 pthread_t th; pthread_attr_t attr;
8160                         pthread_create(&th, 0, start_routine, 0);
8161                         pthread_join(th, 0);
8162                         pthread_attr_init(&attr);
8163                         pthread_cleanup_push(routine, 0);
8164                         pthread_cleanup_pop(0) /* ; */
8165   ;
8166   return 0;
8167 }
8168 _ACEOF
8169 if ac_fn_c_try_link "$LINENO"; then :
8170   ax_pthread_ok=yes
8171 fi
8172 rm -f core conftest.err conftest.$ac_objext \
8173     conftest$ac_exeext conftest.$ac_ext
8174
8175         LIBS="$save_LIBS"
8176         CFLAGS="$save_CFLAGS"
8177
8178         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
8179 $as_echo "$ax_pthread_ok" >&6; }
8180         if test "x$ax_pthread_ok" = xyes; then
8181                 break;
8182         fi
8183
8184         PTHREAD_LIBS=""
8185         PTHREAD_CFLAGS=""
8186 done
8187 fi
8188
8189 # Various other checks:
8190 if test "x$ax_pthread_ok" = xyes; then
8191         save_LIBS="$LIBS"
8192         LIBS="$PTHREAD_LIBS $LIBS"
8193         save_CFLAGS="$CFLAGS"
8194         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
8195
8196         # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
8197         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
8198 $as_echo_n "checking for joinable pthread attribute... " >&6; }
8199 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
8200   $as_echo_n "(cached) " >&6
8201 else
8202   ax_cv_PTHREAD_JOINABLE_ATTR=unknown
8203              for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
8204                  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8205 /* end confdefs.h.  */
8206 #include <pthread.h>
8207 int
8208 main ()
8209 {
8210 int attr = $attr; return attr /* ; */
8211   ;
8212   return 0;
8213 }
8214 _ACEOF
8215 if ac_fn_c_try_link "$LINENO"; then :
8216   ax_cv_PTHREAD_JOINABLE_ATTR=$attr; break
8217 fi
8218 rm -f core conftest.err conftest.$ac_objext \
8219     conftest$ac_exeext conftest.$ac_ext
8220              done
8221
8222 fi
8223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
8224 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
8225         if test "$ax_cv_PTHREAD_JOINABLE_ATTR" != unknown && \
8226                test "$ax_cv_PTHREAD_JOINABLE_ATTR" != PTHREAD_CREATE_JOINABLE; then :
8227
8228 cat >>confdefs.h <<_ACEOF
8229 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
8230 _ACEOF
8231
8232 fi
8233
8234         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
8235 $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
8236 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
8237   $as_echo_n "(cached) " >&6
8238 else
8239   ax_cv_PTHREAD_SPECIAL_FLAGS=no
8240              ax_pthread_special_flags_added=no
8241              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8242 /* end confdefs.h.  */
8243
8244 #                 if !defined(_REENTRANT) && !defined(_THREAD_SAFE)
8245                   AX_PTHREAD_NEED_SPECIAL_FLAG
8246 #                 endif
8247
8248 _ACEOF
8249 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8250   $EGREP "AX_PTHREAD_NEED_SPECIAL_FLAG" >/dev/null 2>&1; then :
8251   case $host_os in
8252                   aix* | freebsd*)
8253                   ax_cv_PTHREAD_SPECIAL_FLAGS="-D_THREAD_SAFE"
8254                   ;;
8255                   darwin* | hpux* | osf* | solaris*)
8256                   ax_cv_PTHREAD_SPECIAL_FLAGS="-D_REENTRANT"
8257                   ;;
8258                   esac
8259
8260 fi
8261 rm -f conftest*
8262
8263
8264 fi
8265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
8266 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
8267         if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
8268                test "x$ax_pthread_special_flags_added" != "xyes"; then :
8269   PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
8270                ax_pthread_special_flags_added=yes
8271 fi
8272
8273         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
8274 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
8275 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
8276   $as_echo_n "(cached) " >&6
8277 else
8278   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8279 /* end confdefs.h.  */
8280 #include <pthread.h>
8281 int
8282 main ()
8283 {
8284 int i = PTHREAD_PRIO_INHERIT;
8285   ;
8286   return 0;
8287 }
8288 _ACEOF
8289 if ac_fn_c_try_link "$LINENO"; then :
8290   ax_cv_PTHREAD_PRIO_INHERIT=yes
8291 else
8292   ax_cv_PTHREAD_PRIO_INHERIT=no
8293 fi
8294 rm -f core conftest.err conftest.$ac_objext \
8295     conftest$ac_exeext conftest.$ac_ext
8296
8297 fi
8298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
8299 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
8300         if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
8301
8302 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
8303
8304 fi
8305
8306         LIBS="$save_LIBS"
8307         CFLAGS="$save_CFLAGS"
8308
8309         # More AIX lossage: compile with *_r variant
8310         if test "x$GCC" != xyes; then
8311             case $host_os in
8312                 aix*)
8313                 case "x/$CC" in #(
8314   x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
8315     #handle absolute path differently from PATH based program lookup
8316                    case "x$CC" in #(
8317   x/*) :
8318     if as_fn_executable_p ${CC}_r; then :
8319   PTHREAD_CC="${CC}_r"
8320 fi ;; #(
8321   *) :
8322     for ac_prog in ${CC}_r
8323 do
8324   # Extract the first word of "$ac_prog", so it can be a program name with args.
8325 set dummy $ac_prog; ac_word=$2
8326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8327 $as_echo_n "checking for $ac_word... " >&6; }
8328 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
8329   $as_echo_n "(cached) " >&6
8330 else
8331   if test -n "$PTHREAD_CC"; then
8332   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
8333 else
8334 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8335 for as_dir in $PATH
8336 do
8337   IFS=$as_save_IFS
8338   test -z "$as_dir" && as_dir=.
8339     for ac_exec_ext in '' $ac_executable_extensions; do
8340   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8341     ac_cv_prog_PTHREAD_CC="$ac_prog"
8342     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8343     break 2
8344   fi
8345 done
8346   done
8347 IFS=$as_save_IFS
8348
8349 fi
8350 fi
8351 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
8352 if test -n "$PTHREAD_CC"; then
8353   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
8354 $as_echo "$PTHREAD_CC" >&6; }
8355 else
8356   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8357 $as_echo "no" >&6; }
8358 fi
8359
8360
8361   test -n "$PTHREAD_CC" && break
8362 done
8363 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
8364  ;;
8365 esac ;; #(
8366   *) :
8367      ;;
8368 esac
8369                 ;;
8370             esac
8371         fi
8372 fi
8373
8374 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
8375
8376
8377
8378
8379
8380 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
8381 if test x"$ax_pthread_ok" = xyes; then
8382
8383 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
8384
8385         :
8386 else
8387         ax_pthread_ok=no
8388
8389 fi
8390 ac_ext=c
8391 ac_cpp='$CPP $CPPFLAGS'
8392 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8393 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8394 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8395
8396         # set thread flags
8397
8398 # Some platforms use these, so just define them.  They can't hurt if they
8399 # are not supported.  For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
8400 # enables 5-arg getpwuid_r, among other things.
8401 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
8402
8403 # Check for *_r functions
8404 _CFLAGS="$CFLAGS"
8405 _LIBS="$LIBS"
8406 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
8407 LIBS="$LIBS $PTHREAD_LIBS"
8408
8409 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
8410 if test "x$ac_cv_header_pthread_h" = xyes; then :
8411
8412 else
8413   as_fn_error $? "
8414 pthread.h not found;  use --disable-thread-safety to disable thread safety" "$LINENO" 5
8415 fi
8416
8417
8418
8419 for ac_func in strerror_r getpwuid_r gethostbyname_r
8420 do :
8421   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8422 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8423 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8424   cat >>confdefs.h <<_ACEOF
8425 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8426 _ACEOF
8427
8428 fi
8429 done
8430
8431
8432 # Do test here with the proper thread flags
8433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
8434 $as_echo_n "checking whether strerror_r returns int... " >&6; }
8435 if ${pgac_cv_func_strerror_r_int+:} false; then :
8436   $as_echo_n "(cached) " >&6
8437 else
8438   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8439 /* end confdefs.h.  */
8440 #include <string.h>
8441 int
8442 main ()
8443 {
8444 #ifndef _AIX
8445 int strerror_r(int, char *, size_t);
8446 #else
8447 /* Older AIX has 'int' for the third argument so we don't test the args. */
8448 int strerror_r();
8449 #endif
8450   ;
8451   return 0;
8452 }
8453 _ACEOF
8454 if ac_fn_c_try_compile "$LINENO"; then :
8455   pgac_cv_func_strerror_r_int=yes
8456 else
8457   pgac_cv_func_strerror_r_int=no
8458 fi
8459 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8460 fi
8461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
8462 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
8463 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
8464
8465 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
8466
8467 fi
8468
8469
8470 CFLAGS="$_CFLAGS"
8471 LIBS="$_LIBS"
8472
8473
8474 else
8475    # else
8476 # do not use values from template file
8477 PTHREAD_CFLAGS=
8478 PTHREAD_LIBS=
8479
8480 fi # fi
8481
8482
8483
8484
8485
8486 ##
8487 ## Libraries
8488 ##
8489 ## Most libraries are included only if they demonstrably provide a function
8490 ## we need, but libm is an exception: always include it, because there are
8491 ## too many compilers that play cute optimization games that will break
8492 ## probes for standard functions such as pow().
8493 ##
8494
8495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
8496 $as_echo_n "checking for main in -lm... " >&6; }
8497 if ${ac_cv_lib_m_main+:} false; then :
8498   $as_echo_n "(cached) " >&6
8499 else
8500   ac_check_lib_save_LIBS=$LIBS
8501 LIBS="-lm  $LIBS"
8502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8503 /* end confdefs.h.  */
8504
8505
8506 int
8507 main ()
8508 {
8509 return main ();
8510   ;
8511   return 0;
8512 }
8513 _ACEOF
8514 if ac_fn_c_try_link "$LINENO"; then :
8515   ac_cv_lib_m_main=yes
8516 else
8517   ac_cv_lib_m_main=no
8518 fi
8519 rm -f core conftest.err conftest.$ac_objext \
8520     conftest$ac_exeext conftest.$ac_ext
8521 LIBS=$ac_check_lib_save_LIBS
8522 fi
8523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
8524 $as_echo "$ac_cv_lib_m_main" >&6; }
8525 if test "x$ac_cv_lib_m_main" = xyes; then :
8526   cat >>confdefs.h <<_ACEOF
8527 #define HAVE_LIBM 1
8528 _ACEOF
8529
8530   LIBS="-lm $LIBS"
8531
8532 fi
8533
8534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
8535 $as_echo_n "checking for library containing setproctitle... " >&6; }
8536 if ${ac_cv_search_setproctitle+:} false; then :
8537   $as_echo_n "(cached) " >&6
8538 else
8539   ac_func_search_save_LIBS=$LIBS
8540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8541 /* end confdefs.h.  */
8542
8543 /* Override any GCC internal prototype to avoid an error.
8544    Use char because int might match the return type of a GCC
8545    builtin and then its argument prototype would still apply.  */
8546 #ifdef __cplusplus
8547 extern "C"
8548 #endif
8549 char setproctitle ();
8550 int
8551 main ()
8552 {
8553 return setproctitle ();
8554   ;
8555   return 0;
8556 }
8557 _ACEOF
8558 for ac_lib in '' util; do
8559   if test -z "$ac_lib"; then
8560     ac_res="none required"
8561   else
8562     ac_res=-l$ac_lib
8563     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8564   fi
8565   if ac_fn_c_try_link "$LINENO"; then :
8566   ac_cv_search_setproctitle=$ac_res
8567 fi
8568 rm -f core conftest.err conftest.$ac_objext \
8569     conftest$ac_exeext
8570   if ${ac_cv_search_setproctitle+:} false; then :
8571   break
8572 fi
8573 done
8574 if ${ac_cv_search_setproctitle+:} false; then :
8575
8576 else
8577   ac_cv_search_setproctitle=no
8578 fi
8579 rm conftest.$ac_ext
8580 LIBS=$ac_func_search_save_LIBS
8581 fi
8582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
8583 $as_echo "$ac_cv_search_setproctitle" >&6; }
8584 ac_res=$ac_cv_search_setproctitle
8585 if test "$ac_res" != no; then :
8586   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8587
8588 fi
8589
8590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
8591 $as_echo_n "checking for library containing dlopen... " >&6; }
8592 if ${ac_cv_search_dlopen+:} false; then :
8593   $as_echo_n "(cached) " >&6
8594 else
8595   ac_func_search_save_LIBS=$LIBS
8596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8597 /* end confdefs.h.  */
8598
8599 /* Override any GCC internal prototype to avoid an error.
8600    Use char because int might match the return type of a GCC
8601    builtin and then its argument prototype would still apply.  */
8602 #ifdef __cplusplus
8603 extern "C"
8604 #endif
8605 char dlopen ();
8606 int
8607 main ()
8608 {
8609 return dlopen ();
8610   ;
8611   return 0;
8612 }
8613 _ACEOF
8614 for ac_lib in '' dl; do
8615   if test -z "$ac_lib"; then
8616     ac_res="none required"
8617   else
8618     ac_res=-l$ac_lib
8619     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8620   fi
8621   if ac_fn_c_try_link "$LINENO"; then :
8622   ac_cv_search_dlopen=$ac_res
8623 fi
8624 rm -f core conftest.err conftest.$ac_objext \
8625     conftest$ac_exeext
8626   if ${ac_cv_search_dlopen+:} false; then :
8627   break
8628 fi
8629 done
8630 if ${ac_cv_search_dlopen+:} false; then :
8631
8632 else
8633   ac_cv_search_dlopen=no
8634 fi
8635 rm conftest.$ac_ext
8636 LIBS=$ac_func_search_save_LIBS
8637 fi
8638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
8639 $as_echo "$ac_cv_search_dlopen" >&6; }
8640 ac_res=$ac_cv_search_dlopen
8641 if test "$ac_res" != no; then :
8642   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8643
8644 fi
8645
8646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
8647 $as_echo_n "checking for library containing socket... " >&6; }
8648 if ${ac_cv_search_socket+:} false; then :
8649   $as_echo_n "(cached) " >&6
8650 else
8651   ac_func_search_save_LIBS=$LIBS
8652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8653 /* end confdefs.h.  */
8654
8655 /* Override any GCC internal prototype to avoid an error.
8656    Use char because int might match the return type of a GCC
8657    builtin and then its argument prototype would still apply.  */
8658 #ifdef __cplusplus
8659 extern "C"
8660 #endif
8661 char socket ();
8662 int
8663 main ()
8664 {
8665 return socket ();
8666   ;
8667   return 0;
8668 }
8669 _ACEOF
8670 for ac_lib in '' socket ws2_32; do
8671   if test -z "$ac_lib"; then
8672     ac_res="none required"
8673   else
8674     ac_res=-l$ac_lib
8675     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8676   fi
8677   if ac_fn_c_try_link "$LINENO"; then :
8678   ac_cv_search_socket=$ac_res
8679 fi
8680 rm -f core conftest.err conftest.$ac_objext \
8681     conftest$ac_exeext
8682   if ${ac_cv_search_socket+:} false; then :
8683   break
8684 fi
8685 done
8686 if ${ac_cv_search_socket+:} false; then :
8687
8688 else
8689   ac_cv_search_socket=no
8690 fi
8691 rm conftest.$ac_ext
8692 LIBS=$ac_func_search_save_LIBS
8693 fi
8694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
8695 $as_echo "$ac_cv_search_socket" >&6; }
8696 ac_res=$ac_cv_search_socket
8697 if test "$ac_res" != no; then :
8698   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8699
8700 fi
8701
8702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
8703 $as_echo_n "checking for library containing shl_load... " >&6; }
8704 if ${ac_cv_search_shl_load+:} false; then :
8705   $as_echo_n "(cached) " >&6
8706 else
8707   ac_func_search_save_LIBS=$LIBS
8708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8709 /* end confdefs.h.  */
8710
8711 /* Override any GCC internal prototype to avoid an error.
8712    Use char because int might match the return type of a GCC
8713    builtin and then its argument prototype would still apply.  */
8714 #ifdef __cplusplus
8715 extern "C"
8716 #endif
8717 char shl_load ();
8718 int
8719 main ()
8720 {
8721 return shl_load ();
8722   ;
8723   return 0;
8724 }
8725 _ACEOF
8726 for ac_lib in '' dld; do
8727   if test -z "$ac_lib"; then
8728     ac_res="none required"
8729   else
8730     ac_res=-l$ac_lib
8731     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8732   fi
8733   if ac_fn_c_try_link "$LINENO"; then :
8734   ac_cv_search_shl_load=$ac_res
8735 fi
8736 rm -f core conftest.err conftest.$ac_objext \
8737     conftest$ac_exeext
8738   if ${ac_cv_search_shl_load+:} false; then :
8739   break
8740 fi
8741 done
8742 if ${ac_cv_search_shl_load+:} false; then :
8743
8744 else
8745   ac_cv_search_shl_load=no
8746 fi
8747 rm conftest.$ac_ext
8748 LIBS=$ac_func_search_save_LIBS
8749 fi
8750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
8751 $as_echo "$ac_cv_search_shl_load" >&6; }
8752 ac_res=$ac_cv_search_shl_load
8753 if test "$ac_res" != no; then :
8754   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8755
8756 fi
8757
8758 # We only use libld in port/dynloader/aix.c
8759 case $host_os in
8760      aix*)
8761         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ldopen" >&5
8762 $as_echo_n "checking for library containing ldopen... " >&6; }
8763 if ${ac_cv_search_ldopen+:} false; then :
8764   $as_echo_n "(cached) " >&6
8765 else
8766   ac_func_search_save_LIBS=$LIBS
8767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8768 /* end confdefs.h.  */
8769
8770 /* Override any GCC internal prototype to avoid an error.
8771    Use char because int might match the return type of a GCC
8772    builtin and then its argument prototype would still apply.  */
8773 #ifdef __cplusplus
8774 extern "C"
8775 #endif
8776 char ldopen ();
8777 int
8778 main ()
8779 {
8780 return ldopen ();
8781   ;
8782   return 0;
8783 }
8784 _ACEOF
8785 for ac_lib in '' ld; do
8786   if test -z "$ac_lib"; then
8787     ac_res="none required"
8788   else
8789     ac_res=-l$ac_lib
8790     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8791   fi
8792   if ac_fn_c_try_link "$LINENO"; then :
8793   ac_cv_search_ldopen=$ac_res
8794 fi
8795 rm -f core conftest.err conftest.$ac_objext \
8796     conftest$ac_exeext
8797   if ${ac_cv_search_ldopen+:} false; then :
8798   break
8799 fi
8800 done
8801 if ${ac_cv_search_ldopen+:} false; then :
8802
8803 else
8804   ac_cv_search_ldopen=no
8805 fi
8806 rm conftest.$ac_ext
8807 LIBS=$ac_func_search_save_LIBS
8808 fi
8809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ldopen" >&5
8810 $as_echo "$ac_cv_search_ldopen" >&6; }
8811 ac_res=$ac_cv_search_ldopen
8812 if test "$ac_res" != no; then :
8813   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8814
8815 fi
8816
8817         ;;
8818 esac
8819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
8820 $as_echo_n "checking for library containing getopt_long... " >&6; }
8821 if ${ac_cv_search_getopt_long+:} false; then :
8822   $as_echo_n "(cached) " >&6
8823 else
8824   ac_func_search_save_LIBS=$LIBS
8825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8826 /* end confdefs.h.  */
8827
8828 /* Override any GCC internal prototype to avoid an error.
8829    Use char because int might match the return type of a GCC
8830    builtin and then its argument prototype would still apply.  */
8831 #ifdef __cplusplus
8832 extern "C"
8833 #endif
8834 char getopt_long ();
8835 int
8836 main ()
8837 {
8838 return getopt_long ();
8839   ;
8840   return 0;
8841 }
8842 _ACEOF
8843 for ac_lib in '' getopt gnugetopt; do
8844   if test -z "$ac_lib"; then
8845     ac_res="none required"
8846   else
8847     ac_res=-l$ac_lib
8848     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8849   fi
8850   if ac_fn_c_try_link "$LINENO"; then :
8851   ac_cv_search_getopt_long=$ac_res
8852 fi
8853 rm -f core conftest.err conftest.$ac_objext \
8854     conftest$ac_exeext
8855   if ${ac_cv_search_getopt_long+:} false; then :
8856   break
8857 fi
8858 done
8859 if ${ac_cv_search_getopt_long+:} false; then :
8860
8861 else
8862   ac_cv_search_getopt_long=no
8863 fi
8864 rm conftest.$ac_ext
8865 LIBS=$ac_func_search_save_LIBS
8866 fi
8867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
8868 $as_echo "$ac_cv_search_getopt_long" >&6; }
8869 ac_res=$ac_cv_search_getopt_long
8870 if test "$ac_res" != no; then :
8871   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8872
8873 fi
8874
8875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
8876 $as_echo_n "checking for library containing crypt... " >&6; }
8877 if ${ac_cv_search_crypt+:} false; then :
8878   $as_echo_n "(cached) " >&6
8879 else
8880   ac_func_search_save_LIBS=$LIBS
8881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8882 /* end confdefs.h.  */
8883
8884 /* Override any GCC internal prototype to avoid an error.
8885    Use char because int might match the return type of a GCC
8886    builtin and then its argument prototype would still apply.  */
8887 #ifdef __cplusplus
8888 extern "C"
8889 #endif
8890 char crypt ();
8891 int
8892 main ()
8893 {
8894 return crypt ();
8895   ;
8896   return 0;
8897 }
8898 _ACEOF
8899 for ac_lib in '' crypt; do
8900   if test -z "$ac_lib"; then
8901     ac_res="none required"
8902   else
8903     ac_res=-l$ac_lib
8904     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8905   fi
8906   if ac_fn_c_try_link "$LINENO"; then :
8907   ac_cv_search_crypt=$ac_res
8908 fi
8909 rm -f core conftest.err conftest.$ac_objext \
8910     conftest$ac_exeext
8911   if ${ac_cv_search_crypt+:} false; then :
8912   break
8913 fi
8914 done
8915 if ${ac_cv_search_crypt+:} false; then :
8916
8917 else
8918   ac_cv_search_crypt=no
8919 fi
8920 rm conftest.$ac_ext
8921 LIBS=$ac_func_search_save_LIBS
8922 fi
8923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
8924 $as_echo "$ac_cv_search_crypt" >&6; }
8925 ac_res=$ac_cv_search_crypt
8926 if test "$ac_res" != no; then :
8927   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8928
8929 fi
8930
8931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
8932 $as_echo_n "checking for library containing shm_open... " >&6; }
8933 if ${ac_cv_search_shm_open+:} false; then :
8934   $as_echo_n "(cached) " >&6
8935 else
8936   ac_func_search_save_LIBS=$LIBS
8937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8938 /* end confdefs.h.  */
8939
8940 /* Override any GCC internal prototype to avoid an error.
8941    Use char because int might match the return type of a GCC
8942    builtin and then its argument prototype would still apply.  */
8943 #ifdef __cplusplus
8944 extern "C"
8945 #endif
8946 char shm_open ();
8947 int
8948 main ()
8949 {
8950 return shm_open ();
8951   ;
8952   return 0;
8953 }
8954 _ACEOF
8955 for ac_lib in '' rt; do
8956   if test -z "$ac_lib"; then
8957     ac_res="none required"
8958   else
8959     ac_res=-l$ac_lib
8960     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8961   fi
8962   if ac_fn_c_try_link "$LINENO"; then :
8963   ac_cv_search_shm_open=$ac_res
8964 fi
8965 rm -f core conftest.err conftest.$ac_objext \
8966     conftest$ac_exeext
8967   if ${ac_cv_search_shm_open+:} false; then :
8968   break
8969 fi
8970 done
8971 if ${ac_cv_search_shm_open+:} false; then :
8972
8973 else
8974   ac_cv_search_shm_open=no
8975 fi
8976 rm conftest.$ac_ext
8977 LIBS=$ac_func_search_save_LIBS
8978 fi
8979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
8980 $as_echo "$ac_cv_search_shm_open" >&6; }
8981 ac_res=$ac_cv_search_shm_open
8982 if test "$ac_res" != no; then :
8983   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8984
8985 fi
8986
8987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
8988 $as_echo_n "checking for library containing shm_unlink... " >&6; }
8989 if ${ac_cv_search_shm_unlink+:} false; then :
8990   $as_echo_n "(cached) " >&6
8991 else
8992   ac_func_search_save_LIBS=$LIBS
8993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8994 /* end confdefs.h.  */
8995
8996 /* Override any GCC internal prototype to avoid an error.
8997    Use char because int might match the return type of a GCC
8998    builtin and then its argument prototype would still apply.  */
8999 #ifdef __cplusplus
9000 extern "C"
9001 #endif
9002 char shm_unlink ();
9003 int
9004 main ()
9005 {
9006 return shm_unlink ();
9007   ;
9008   return 0;
9009 }
9010 _ACEOF
9011 for ac_lib in '' rt; do
9012   if test -z "$ac_lib"; then
9013     ac_res="none required"
9014   else
9015     ac_res=-l$ac_lib
9016     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9017   fi
9018   if ac_fn_c_try_link "$LINENO"; then :
9019   ac_cv_search_shm_unlink=$ac_res
9020 fi
9021 rm -f core conftest.err conftest.$ac_objext \
9022     conftest$ac_exeext
9023   if ${ac_cv_search_shm_unlink+:} false; then :
9024   break
9025 fi
9026 done
9027 if ${ac_cv_search_shm_unlink+:} false; then :
9028
9029 else
9030   ac_cv_search_shm_unlink=no
9031 fi
9032 rm conftest.$ac_ext
9033 LIBS=$ac_func_search_save_LIBS
9034 fi
9035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
9036 $as_echo "$ac_cv_search_shm_unlink" >&6; }
9037 ac_res=$ac_cv_search_shm_unlink
9038 if test "$ac_res" != no; then :
9039   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9040
9041 fi
9042
9043 # Solaris:
9044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
9045 $as_echo_n "checking for library containing fdatasync... " >&6; }
9046 if ${ac_cv_search_fdatasync+:} false; then :
9047   $as_echo_n "(cached) " >&6
9048 else
9049   ac_func_search_save_LIBS=$LIBS
9050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9051 /* end confdefs.h.  */
9052
9053 /* Override any GCC internal prototype to avoid an error.
9054    Use char because int might match the return type of a GCC
9055    builtin and then its argument prototype would still apply.  */
9056 #ifdef __cplusplus
9057 extern "C"
9058 #endif
9059 char fdatasync ();
9060 int
9061 main ()
9062 {
9063 return fdatasync ();
9064   ;
9065   return 0;
9066 }
9067 _ACEOF
9068 for ac_lib in '' rt posix4; do
9069   if test -z "$ac_lib"; then
9070     ac_res="none required"
9071   else
9072     ac_res=-l$ac_lib
9073     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9074   fi
9075   if ac_fn_c_try_link "$LINENO"; then :
9076   ac_cv_search_fdatasync=$ac_res
9077 fi
9078 rm -f core conftest.err conftest.$ac_objext \
9079     conftest$ac_exeext
9080   if ${ac_cv_search_fdatasync+:} false; then :
9081   break
9082 fi
9083 done
9084 if ${ac_cv_search_fdatasync+:} false; then :
9085
9086 else
9087   ac_cv_search_fdatasync=no
9088 fi
9089 rm conftest.$ac_ext
9090 LIBS=$ac_func_search_save_LIBS
9091 fi
9092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
9093 $as_echo "$ac_cv_search_fdatasync" >&6; }
9094 ac_res=$ac_cv_search_fdatasync
9095 if test "$ac_res" != no; then :
9096   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9097
9098 fi
9099
9100 # Required for thread_test.c on Solaris
9101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sched_yield" >&5
9102 $as_echo_n "checking for library containing sched_yield... " >&6; }
9103 if ${ac_cv_search_sched_yield+:} false; then :
9104   $as_echo_n "(cached) " >&6
9105 else
9106   ac_func_search_save_LIBS=$LIBS
9107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9108 /* end confdefs.h.  */
9109
9110 /* Override any GCC internal prototype to avoid an error.
9111    Use char because int might match the return type of a GCC
9112    builtin and then its argument prototype would still apply.  */
9113 #ifdef __cplusplus
9114 extern "C"
9115 #endif
9116 char sched_yield ();
9117 int
9118 main ()
9119 {
9120 return sched_yield ();
9121   ;
9122   return 0;
9123 }
9124 _ACEOF
9125 for ac_lib in '' rt; do
9126   if test -z "$ac_lib"; then
9127     ac_res="none required"
9128   else
9129     ac_res=-l$ac_lib
9130     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9131   fi
9132   if ac_fn_c_try_link "$LINENO"; then :
9133   ac_cv_search_sched_yield=$ac_res
9134 fi
9135 rm -f core conftest.err conftest.$ac_objext \
9136     conftest$ac_exeext
9137   if ${ac_cv_search_sched_yield+:} false; then :
9138   break
9139 fi
9140 done
9141 if ${ac_cv_search_sched_yield+:} false; then :
9142
9143 else
9144   ac_cv_search_sched_yield=no
9145 fi
9146 rm conftest.$ac_ext
9147 LIBS=$ac_func_search_save_LIBS
9148 fi
9149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sched_yield" >&5
9150 $as_echo "$ac_cv_search_sched_yield" >&6; }
9151 ac_res=$ac_cv_search_sched_yield
9152 if test "$ac_res" != no; then :
9153   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9154
9155 fi
9156
9157 # Required for thread_test.c on Solaris 2.5:
9158 # Other ports use it too (HP-UX) so test unconditionally
9159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
9160 $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
9161 if ${ac_cv_search_gethostbyname_r+:} false; then :
9162   $as_echo_n "(cached) " >&6
9163 else
9164   ac_func_search_save_LIBS=$LIBS
9165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9166 /* end confdefs.h.  */
9167
9168 /* Override any GCC internal prototype to avoid an error.
9169    Use char because int might match the return type of a GCC
9170    builtin and then its argument prototype would still apply.  */
9171 #ifdef __cplusplus
9172 extern "C"
9173 #endif
9174 char gethostbyname_r ();
9175 int
9176 main ()
9177 {
9178 return gethostbyname_r ();
9179   ;
9180   return 0;
9181 }
9182 _ACEOF
9183 for ac_lib in '' nsl; do
9184   if test -z "$ac_lib"; then
9185     ac_res="none required"
9186   else
9187     ac_res=-l$ac_lib
9188     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9189   fi
9190   if ac_fn_c_try_link "$LINENO"; then :
9191   ac_cv_search_gethostbyname_r=$ac_res
9192 fi
9193 rm -f core conftest.err conftest.$ac_objext \
9194     conftest$ac_exeext
9195   if ${ac_cv_search_gethostbyname_r+:} false; then :
9196   break
9197 fi
9198 done
9199 if ${ac_cv_search_gethostbyname_r+:} false; then :
9200
9201 else
9202   ac_cv_search_gethostbyname_r=no
9203 fi
9204 rm conftest.$ac_ext
9205 LIBS=$ac_func_search_save_LIBS
9206 fi
9207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
9208 $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
9209 ac_res=$ac_cv_search_gethostbyname_r
9210 if test "$ac_res" != no; then :
9211   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9212
9213 fi
9214
9215 # Cygwin:
9216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
9217 $as_echo_n "checking for library containing shmget... " >&6; }
9218 if ${ac_cv_search_shmget+:} false; then :
9219   $as_echo_n "(cached) " >&6
9220 else
9221   ac_func_search_save_LIBS=$LIBS
9222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9223 /* end confdefs.h.  */
9224
9225 /* Override any GCC internal prototype to avoid an error.
9226    Use char because int might match the return type of a GCC
9227    builtin and then its argument prototype would still apply.  */
9228 #ifdef __cplusplus
9229 extern "C"
9230 #endif
9231 char shmget ();
9232 int
9233 main ()
9234 {
9235 return shmget ();
9236   ;
9237   return 0;
9238 }
9239 _ACEOF
9240 for ac_lib in '' cygipc; do
9241   if test -z "$ac_lib"; then
9242     ac_res="none required"
9243   else
9244     ac_res=-l$ac_lib
9245     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9246   fi
9247   if ac_fn_c_try_link "$LINENO"; then :
9248   ac_cv_search_shmget=$ac_res
9249 fi
9250 rm -f core conftest.err conftest.$ac_objext \
9251     conftest$ac_exeext
9252   if ${ac_cv_search_shmget+:} false; then :
9253   break
9254 fi
9255 done
9256 if ${ac_cv_search_shmget+:} false; then :
9257
9258 else
9259   ac_cv_search_shmget=no
9260 fi
9261 rm conftest.$ac_ext
9262 LIBS=$ac_func_search_save_LIBS
9263 fi
9264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
9265 $as_echo "$ac_cv_search_shmget" >&6; }
9266 ac_res=$ac_cv_search_shmget
9267 if test "$ac_res" != no; then :
9268   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9269
9270 fi
9271
9272
9273 if test "$with_readline" = yes; then
9274
9275
9276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
9277 $as_echo_n "checking for library containing readline... " >&6; }
9278 if ${pgac_cv_check_readline+:} false; then :
9279   $as_echo_n "(cached) " >&6
9280 else
9281   pgac_cv_check_readline=no
9282 pgac_save_LIBS=$LIBS
9283 if test x"$with_libedit_preferred" != x"yes"
9284 then    READLINE_ORDER="-lreadline -ledit"
9285 else    READLINE_ORDER="-ledit -lreadline"
9286 fi
9287 for pgac_rllib in $READLINE_ORDER ; do
9288   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
9289     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
9290     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9291 /* end confdefs.h.  */
9292
9293 /* Override any GCC internal prototype to avoid an error.
9294    Use char because int might match the return type of a GCC
9295    builtin and then its argument prototype would still apply.  */
9296 #ifdef __cplusplus
9297 extern "C"
9298 #endif
9299 char readline ();
9300 int
9301 main ()
9302 {
9303 return readline ();
9304   ;
9305   return 0;
9306 }
9307 _ACEOF
9308 if ac_fn_c_try_link "$LINENO"; then :
9309
9310       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
9311       # recognize dependent libraries; assume curses is needed if we didn't
9312       # find any dependency.
9313       case $host_os in
9314         netbsd* | openbsd* | irix*)
9315           if test x"$pgac_lib" = x"" ; then
9316             pgac_lib=" -lcurses"
9317           fi ;;
9318       esac
9319
9320       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
9321       break
9322
9323 fi
9324 rm -f core conftest.err conftest.$ac_objext \
9325     conftest$ac_exeext conftest.$ac_ext
9326   done
9327   if test "$pgac_cv_check_readline" != no ; then
9328     break
9329   fi
9330 done
9331 LIBS=$pgac_save_LIBS
9332
9333 fi
9334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
9335 $as_echo "$pgac_cv_check_readline" >&6; }
9336 if test "$pgac_cv_check_readline" != no ; then
9337   LIBS="$pgac_cv_check_readline $LIBS"
9338
9339 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
9340
9341 fi
9342
9343
9344   if test x"$pgac_cv_check_readline" = x"no"; then
9345     as_fn_error $? "readline library not found
9346 If you have readline already installed, see config.log for details on the
9347 failure.  It is possible the compiler isn't looking in the proper directory.
9348 Use --without-readline to disable readline support." "$LINENO" 5
9349   fi
9350 fi
9351
9352 if test "$with_zlib" = yes; then
9353   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
9354 $as_echo_n "checking for inflate in -lz... " >&6; }
9355 if ${ac_cv_lib_z_inflate+:} false; then :
9356   $as_echo_n "(cached) " >&6
9357 else
9358   ac_check_lib_save_LIBS=$LIBS
9359 LIBS="-lz  $LIBS"
9360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9361 /* end confdefs.h.  */
9362
9363 /* Override any GCC internal prototype to avoid an error.
9364    Use char because int might match the return type of a GCC
9365    builtin and then its argument prototype would still apply.  */
9366 #ifdef __cplusplus
9367 extern "C"
9368 #endif
9369 char inflate ();
9370 int
9371 main ()
9372 {
9373 return inflate ();
9374   ;
9375   return 0;
9376 }
9377 _ACEOF
9378 if ac_fn_c_try_link "$LINENO"; then :
9379   ac_cv_lib_z_inflate=yes
9380 else
9381   ac_cv_lib_z_inflate=no
9382 fi
9383 rm -f core conftest.err conftest.$ac_objext \
9384     conftest$ac_exeext conftest.$ac_ext
9385 LIBS=$ac_check_lib_save_LIBS
9386 fi
9387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
9388 $as_echo "$ac_cv_lib_z_inflate" >&6; }
9389 if test "x$ac_cv_lib_z_inflate" = xyes; then :
9390   cat >>confdefs.h <<_ACEOF
9391 #define HAVE_LIBZ 1
9392 _ACEOF
9393
9394   LIBS="-lz $LIBS"
9395
9396 else
9397   as_fn_error $? "zlib library not found
9398 If you have zlib already installed, see config.log for details on the
9399 failure.  It is possible the compiler isn't looking in the proper directory.
9400 Use --without-zlib to disable zlib support." "$LINENO" 5
9401 fi
9402
9403 fi
9404
9405 if test "$enable_spinlocks" = yes; then
9406
9407 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
9408
9409 else
9410   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9411 *** Not using spinlocks will cause poor performance." >&5
9412 $as_echo "$as_me: WARNING:
9413 *** Not using spinlocks will cause poor performance." >&2;}
9414 fi
9415
9416 if test "$enable_atomics" = yes; then
9417
9418 $as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
9419
9420 else
9421   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9422 *** Not using atomic operations will cause poor performance." >&5
9423 $as_echo "$as_me: WARNING:
9424 *** Not using atomic operations will cause poor performance." >&2;}
9425 fi
9426
9427 if test "$with_gssapi" = yes ; then
9428   if test "$PORTNAME" != "win32"; then
9429     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
9430 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
9431 if ${ac_cv_search_gss_init_sec_context+:} false; then :
9432   $as_echo_n "(cached) " >&6
9433 else
9434   ac_func_search_save_LIBS=$LIBS
9435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9436 /* end confdefs.h.  */
9437
9438 /* Override any GCC internal prototype to avoid an error.
9439    Use char because int might match the return type of a GCC
9440    builtin and then its argument prototype would still apply.  */
9441 #ifdef __cplusplus
9442 extern "C"
9443 #endif
9444 char gss_init_sec_context ();
9445 int
9446 main ()
9447 {
9448 return gss_init_sec_context ();
9449   ;
9450   return 0;
9451 }
9452 _ACEOF
9453 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
9454   if test -z "$ac_lib"; then
9455     ac_res="none required"
9456   else
9457     ac_res=-l$ac_lib
9458     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9459   fi
9460   if ac_fn_c_try_link "$LINENO"; then :
9461   ac_cv_search_gss_init_sec_context=$ac_res
9462 fi
9463 rm -f core conftest.err conftest.$ac_objext \
9464     conftest$ac_exeext
9465   if ${ac_cv_search_gss_init_sec_context+:} false; then :
9466   break
9467 fi
9468 done
9469 if ${ac_cv_search_gss_init_sec_context+:} false; then :
9470
9471 else
9472   ac_cv_search_gss_init_sec_context=no
9473 fi
9474 rm conftest.$ac_ext
9475 LIBS=$ac_func_search_save_LIBS
9476 fi
9477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
9478 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
9479 ac_res=$ac_cv_search_gss_init_sec_context
9480 if test "$ac_res" != no; then :
9481   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9482
9483 else
9484   as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
9485 fi
9486
9487   else
9488     LIBS="$LIBS -lgssapi32"
9489   fi
9490 fi
9491
9492 if test "$with_openssl" = yes ; then
9493     if test "$PORTNAME" != "win32"; then
9494      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
9495 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
9496 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
9497   $as_echo_n "(cached) " >&6
9498 else
9499   ac_check_lib_save_LIBS=$LIBS
9500 LIBS="-lcrypto  $LIBS"
9501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9502 /* end confdefs.h.  */
9503
9504 /* Override any GCC internal prototype to avoid an error.
9505    Use char because int might match the return type of a GCC
9506    builtin and then its argument prototype would still apply.  */
9507 #ifdef __cplusplus
9508 extern "C"
9509 #endif
9510 char CRYPTO_new_ex_data ();
9511 int
9512 main ()
9513 {
9514 return CRYPTO_new_ex_data ();
9515   ;
9516   return 0;
9517 }
9518 _ACEOF
9519 if ac_fn_c_try_link "$LINENO"; then :
9520   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
9521 else
9522   ac_cv_lib_crypto_CRYPTO_new_ex_data=no
9523 fi
9524 rm -f core conftest.err conftest.$ac_objext \
9525     conftest$ac_exeext conftest.$ac_ext
9526 LIBS=$ac_check_lib_save_LIBS
9527 fi
9528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
9529 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
9530 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
9531   cat >>confdefs.h <<_ACEOF
9532 #define HAVE_LIBCRYPTO 1
9533 _ACEOF
9534
9535   LIBS="-lcrypto $LIBS"
9536
9537 else
9538   as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
9539 fi
9540
9541      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5
9542 $as_echo_n "checking for SSL_library_init in -lssl... " >&6; }
9543 if ${ac_cv_lib_ssl_SSL_library_init+:} false; then :
9544   $as_echo_n "(cached) " >&6
9545 else
9546   ac_check_lib_save_LIBS=$LIBS
9547 LIBS="-lssl  $LIBS"
9548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9549 /* end confdefs.h.  */
9550
9551 /* Override any GCC internal prototype to avoid an error.
9552    Use char because int might match the return type of a GCC
9553    builtin and then its argument prototype would still apply.  */
9554 #ifdef __cplusplus
9555 extern "C"
9556 #endif
9557 char SSL_library_init ();
9558 int
9559 main ()
9560 {
9561 return SSL_library_init ();
9562   ;
9563   return 0;
9564 }
9565 _ACEOF
9566 if ac_fn_c_try_link "$LINENO"; then :
9567   ac_cv_lib_ssl_SSL_library_init=yes
9568 else
9569   ac_cv_lib_ssl_SSL_library_init=no
9570 fi
9571 rm -f core conftest.err conftest.$ac_objext \
9572     conftest$ac_exeext conftest.$ac_ext
9573 LIBS=$ac_check_lib_save_LIBS
9574 fi
9575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_library_init" >&5
9576 $as_echo "$ac_cv_lib_ssl_SSL_library_init" >&6; }
9577 if test "x$ac_cv_lib_ssl_SSL_library_init" = xyes; then :
9578   cat >>confdefs.h <<_ACEOF
9579 #define HAVE_LIBSSL 1
9580 _ACEOF
9581
9582   LIBS="-lssl $LIBS"
9583
9584 else
9585   as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
9586 fi
9587
9588   else
9589      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
9590 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
9591 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
9592   $as_echo_n "(cached) " >&6
9593 else
9594   ac_func_search_save_LIBS=$LIBS
9595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9596 /* end confdefs.h.  */
9597
9598 /* Override any GCC internal prototype to avoid an error.
9599    Use char because int might match the return type of a GCC
9600    builtin and then its argument prototype would still apply.  */
9601 #ifdef __cplusplus
9602 extern "C"
9603 #endif
9604 char CRYPTO_new_ex_data ();
9605 int
9606 main ()
9607 {
9608 return CRYPTO_new_ex_data ();
9609   ;
9610   return 0;
9611 }
9612 _ACEOF
9613 for ac_lib in '' eay32 crypto; do
9614   if test -z "$ac_lib"; then
9615     ac_res="none required"
9616   else
9617     ac_res=-l$ac_lib
9618     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9619   fi
9620   if ac_fn_c_try_link "$LINENO"; then :
9621   ac_cv_search_CRYPTO_new_ex_data=$ac_res
9622 fi
9623 rm -f core conftest.err conftest.$ac_objext \
9624     conftest$ac_exeext
9625   if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
9626   break
9627 fi
9628 done
9629 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
9630
9631 else
9632   ac_cv_search_CRYPTO_new_ex_data=no
9633 fi
9634 rm conftest.$ac_ext
9635 LIBS=$ac_func_search_save_LIBS
9636 fi
9637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
9638 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
9639 ac_res=$ac_cv_search_CRYPTO_new_ex_data
9640 if test "$ac_res" != no; then :
9641   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9642
9643 else
9644   as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
9645 fi
9646
9647      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_library_init" >&5
9648 $as_echo_n "checking for library containing SSL_library_init... " >&6; }
9649 if ${ac_cv_search_SSL_library_init+:} false; then :
9650   $as_echo_n "(cached) " >&6
9651 else
9652   ac_func_search_save_LIBS=$LIBS
9653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9654 /* end confdefs.h.  */
9655
9656 /* Override any GCC internal prototype to avoid an error.
9657    Use char because int might match the return type of a GCC
9658    builtin and then its argument prototype would still apply.  */
9659 #ifdef __cplusplus
9660 extern "C"
9661 #endif
9662 char SSL_library_init ();
9663 int
9664 main ()
9665 {
9666 return SSL_library_init ();
9667   ;
9668   return 0;
9669 }
9670 _ACEOF
9671 for ac_lib in '' ssleay32 ssl; do
9672   if test -z "$ac_lib"; then
9673     ac_res="none required"
9674   else
9675     ac_res=-l$ac_lib
9676     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9677   fi
9678   if ac_fn_c_try_link "$LINENO"; then :
9679   ac_cv_search_SSL_library_init=$ac_res
9680 fi
9681 rm -f core conftest.err conftest.$ac_objext \
9682     conftest$ac_exeext
9683   if ${ac_cv_search_SSL_library_init+:} false; then :
9684   break
9685 fi
9686 done
9687 if ${ac_cv_search_SSL_library_init+:} false; then :
9688
9689 else
9690   ac_cv_search_SSL_library_init=no
9691 fi
9692 rm conftest.$ac_ext
9693 LIBS=$ac_func_search_save_LIBS
9694 fi
9695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_library_init" >&5
9696 $as_echo "$ac_cv_search_SSL_library_init" >&6; }
9697 ac_res=$ac_cv_search_SSL_library_init
9698 if test "$ac_res" != no; then :
9699   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9700
9701 else
9702   as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
9703 fi
9704
9705   fi
9706   for ac_func in SSL_get_current_compression
9707 do :
9708   ac_fn_c_check_func "$LINENO" "SSL_get_current_compression" "ac_cv_func_SSL_get_current_compression"
9709 if test "x$ac_cv_func_SSL_get_current_compression" = xyes; then :
9710   cat >>confdefs.h <<_ACEOF
9711 #define HAVE_SSL_GET_CURRENT_COMPRESSION 1
9712 _ACEOF
9713
9714 fi
9715 done
9716
9717 fi
9718
9719 if test "$with_pam" = yes ; then
9720   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
9721 $as_echo_n "checking for pam_start in -lpam... " >&6; }
9722 if ${ac_cv_lib_pam_pam_start+:} false; then :
9723   $as_echo_n "(cached) " >&6
9724 else
9725   ac_check_lib_save_LIBS=$LIBS
9726 LIBS="-lpam  $LIBS"
9727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9728 /* end confdefs.h.  */
9729
9730 /* Override any GCC internal prototype to avoid an error.
9731    Use char because int might match the return type of a GCC
9732    builtin and then its argument prototype would still apply.  */
9733 #ifdef __cplusplus
9734 extern "C"
9735 #endif
9736 char pam_start ();
9737 int
9738 main ()
9739 {
9740 return pam_start ();
9741   ;
9742   return 0;
9743 }
9744 _ACEOF
9745 if ac_fn_c_try_link "$LINENO"; then :
9746   ac_cv_lib_pam_pam_start=yes
9747 else
9748   ac_cv_lib_pam_pam_start=no
9749 fi
9750 rm -f core conftest.err conftest.$ac_objext \
9751     conftest$ac_exeext conftest.$ac_ext
9752 LIBS=$ac_check_lib_save_LIBS
9753 fi
9754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
9755 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
9756 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
9757   cat >>confdefs.h <<_ACEOF
9758 #define HAVE_LIBPAM 1
9759 _ACEOF
9760
9761   LIBS="-lpam $LIBS"
9762
9763 else
9764   as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
9765 fi
9766
9767 fi
9768
9769 if test "$with_libxml" = yes ; then
9770   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
9771 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
9772 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
9773   $as_echo_n "(cached) " >&6
9774 else
9775   ac_check_lib_save_LIBS=$LIBS
9776 LIBS="-lxml2  $LIBS"
9777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9778 /* end confdefs.h.  */
9779
9780 /* Override any GCC internal prototype to avoid an error.
9781    Use char because int might match the return type of a GCC
9782    builtin and then its argument prototype would still apply.  */
9783 #ifdef __cplusplus
9784 extern "C"
9785 #endif
9786 char xmlSaveToBuffer ();
9787 int
9788 main ()
9789 {
9790 return xmlSaveToBuffer ();
9791   ;
9792   return 0;
9793 }
9794 _ACEOF
9795 if ac_fn_c_try_link "$LINENO"; then :
9796   ac_cv_lib_xml2_xmlSaveToBuffer=yes
9797 else
9798   ac_cv_lib_xml2_xmlSaveToBuffer=no
9799 fi
9800 rm -f core conftest.err conftest.$ac_objext \
9801     conftest$ac_exeext conftest.$ac_ext
9802 LIBS=$ac_check_lib_save_LIBS
9803 fi
9804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
9805 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
9806 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
9807   cat >>confdefs.h <<_ACEOF
9808 #define HAVE_LIBXML2 1
9809 _ACEOF
9810
9811   LIBS="-lxml2 $LIBS"
9812
9813 else
9814   as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
9815 fi
9816
9817 fi
9818
9819 if test "$with_libxslt" = yes ; then
9820   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
9821 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
9822 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
9823   $as_echo_n "(cached) " >&6
9824 else
9825   ac_check_lib_save_LIBS=$LIBS
9826 LIBS="-lxslt  $LIBS"
9827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9828 /* end confdefs.h.  */
9829
9830 /* Override any GCC internal prototype to avoid an error.
9831    Use char because int might match the return type of a GCC
9832    builtin and then its argument prototype would still apply.  */
9833 #ifdef __cplusplus
9834 extern "C"
9835 #endif
9836 char xsltCleanupGlobals ();
9837 int
9838 main ()
9839 {
9840 return xsltCleanupGlobals ();
9841   ;
9842   return 0;
9843 }
9844 _ACEOF
9845 if ac_fn_c_try_link "$LINENO"; then :
9846   ac_cv_lib_xslt_xsltCleanupGlobals=yes
9847 else
9848   ac_cv_lib_xslt_xsltCleanupGlobals=no
9849 fi
9850 rm -f core conftest.err conftest.$ac_objext \
9851     conftest$ac_exeext conftest.$ac_ext
9852 LIBS=$ac_check_lib_save_LIBS
9853 fi
9854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
9855 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
9856 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
9857   cat >>confdefs.h <<_ACEOF
9858 #define HAVE_LIBXSLT 1
9859 _ACEOF
9860
9861   LIBS="-lxslt $LIBS"
9862
9863 else
9864   as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
9865 fi
9866
9867 fi
9868
9869 # Note: We can test for libldap_r only after we know PTHREAD_LIBS
9870 if test "$with_ldap" = yes ; then
9871   _LIBS="$LIBS"
9872   if test "$PORTNAME" != "win32"; then
9873     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
9874 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
9875 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
9876   $as_echo_n "(cached) " >&6
9877 else
9878   ac_check_lib_save_LIBS=$LIBS
9879 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
9880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9881 /* end confdefs.h.  */
9882
9883 /* Override any GCC internal prototype to avoid an error.
9884    Use char because int might match the return type of a GCC
9885    builtin and then its argument prototype would still apply.  */
9886 #ifdef __cplusplus
9887 extern "C"
9888 #endif
9889 char ldap_bind ();
9890 int
9891 main ()
9892 {
9893 return ldap_bind ();
9894   ;
9895   return 0;
9896 }
9897 _ACEOF
9898 if ac_fn_c_try_link "$LINENO"; then :
9899   ac_cv_lib_ldap_ldap_bind=yes
9900 else
9901   ac_cv_lib_ldap_ldap_bind=no
9902 fi
9903 rm -f core conftest.err conftest.$ac_objext \
9904     conftest$ac_exeext conftest.$ac_ext
9905 LIBS=$ac_check_lib_save_LIBS
9906 fi
9907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
9908 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
9909 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
9910   cat >>confdefs.h <<_ACEOF
9911 #define HAVE_LIBLDAP 1
9912 _ACEOF
9913
9914   LIBS="-lldap $LIBS"
9915
9916 else
9917   as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
9918 fi
9919
9920     LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
9921     if test "$enable_thread_safety" = yes; then
9922       # on some platforms ldap_r fails to link without PTHREAD_LIBS
9923       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_simple_bind in -lldap_r" >&5
9924 $as_echo_n "checking for ldap_simple_bind in -lldap_r... " >&6; }
9925 if ${ac_cv_lib_ldap_r_ldap_simple_bind+:} false; then :
9926   $as_echo_n "(cached) " >&6
9927 else
9928   ac_check_lib_save_LIBS=$LIBS
9929 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
9930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9931 /* end confdefs.h.  */
9932
9933 /* Override any GCC internal prototype to avoid an error.
9934    Use char because int might match the return type of a GCC
9935    builtin and then its argument prototype would still apply.  */
9936 #ifdef __cplusplus
9937 extern "C"
9938 #endif
9939 char ldap_simple_bind ();
9940 int
9941 main ()
9942 {
9943 return ldap_simple_bind ();
9944   ;
9945   return 0;
9946 }
9947 _ACEOF
9948 if ac_fn_c_try_link "$LINENO"; then :
9949   ac_cv_lib_ldap_r_ldap_simple_bind=yes
9950 else
9951   ac_cv_lib_ldap_r_ldap_simple_bind=no
9952 fi
9953 rm -f core conftest.err conftest.$ac_objext \
9954     conftest$ac_exeext conftest.$ac_ext
9955 LIBS=$ac_check_lib_save_LIBS
9956 fi
9957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
9958 $as_echo "$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
9959 if test "x$ac_cv_lib_ldap_r_ldap_simple_bind" = xyes; then :
9960   cat >>confdefs.h <<_ACEOF
9961 #define HAVE_LIBLDAP_R 1
9962 _ACEOF
9963
9964   LIBS="-lldap_r $LIBS"
9965
9966 else
9967   as_fn_error $? "library 'ldap_r' is required for LDAP" "$LINENO" 5
9968 fi
9969
9970       LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
9971     else
9972       LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
9973     fi
9974   else
9975     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
9976 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
9977 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
9978   $as_echo_n "(cached) " >&6
9979 else
9980   ac_check_lib_save_LIBS=$LIBS
9981 LIBS="-lwldap32  $LIBS"
9982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9983 /* end confdefs.h.  */
9984
9985 /* Override any GCC internal prototype to avoid an error.
9986    Use char because int might match the return type of a GCC
9987    builtin and then its argument prototype would still apply.  */
9988 #ifdef __cplusplus
9989 extern "C"
9990 #endif
9991 char ldap_bind ();
9992 int
9993 main ()
9994 {
9995 return ldap_bind ();
9996   ;
9997   return 0;
9998 }
9999 _ACEOF
10000 if ac_fn_c_try_link "$LINENO"; then :
10001   ac_cv_lib_wldap32_ldap_bind=yes
10002 else
10003   ac_cv_lib_wldap32_ldap_bind=no
10004 fi
10005 rm -f core conftest.err conftest.$ac_objext \
10006     conftest$ac_exeext conftest.$ac_ext
10007 LIBS=$ac_check_lib_save_LIBS
10008 fi
10009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
10010 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
10011 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
10012   cat >>confdefs.h <<_ACEOF
10013 #define HAVE_LIBWLDAP32 1
10014 _ACEOF
10015
10016   LIBS="-lwldap32 $LIBS"
10017
10018 else
10019   as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
10020 fi
10021
10022     LDAP_LIBS_FE="-lwldap32"
10023     LDAP_LIBS_BE="-lwldap32"
10024   fi
10025   LIBS="$_LIBS"
10026 fi
10027
10028
10029
10030 # for contrib/sepgsql
10031 if test "$with_selinux" = yes; then
10032   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
10033 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
10034 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
10035   $as_echo_n "(cached) " >&6
10036 else
10037   ac_check_lib_save_LIBS=$LIBS
10038 LIBS="-lselinux  $LIBS"
10039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10040 /* end confdefs.h.  */
10041
10042 /* Override any GCC internal prototype to avoid an error.
10043    Use char because int might match the return type of a GCC
10044    builtin and then its argument prototype would still apply.  */
10045 #ifdef __cplusplus
10046 extern "C"
10047 #endif
10048 char security_compute_create_name ();
10049 int
10050 main ()
10051 {
10052 return security_compute_create_name ();
10053   ;
10054   return 0;
10055 }
10056 _ACEOF
10057 if ac_fn_c_try_link "$LINENO"; then :
10058   ac_cv_lib_selinux_security_compute_create_name=yes
10059 else
10060   ac_cv_lib_selinux_security_compute_create_name=no
10061 fi
10062 rm -f core conftest.err conftest.$ac_objext \
10063     conftest$ac_exeext conftest.$ac_ext
10064 LIBS=$ac_check_lib_save_LIBS
10065 fi
10066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
10067 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
10068 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
10069   cat >>confdefs.h <<_ACEOF
10070 #define HAVE_LIBSELINUX 1
10071 _ACEOF
10072
10073   LIBS="-lselinux $LIBS"
10074
10075 else
10076   as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
10077 fi
10078
10079 fi
10080
10081 # for contrib/uuid-ossp
10082 if test "$with_uuid" = bsd ; then
10083   # On BSD, the UUID functions are in libc
10084   ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
10085 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
10086   UUID_LIBS=""
10087 else
10088   as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
10089 fi
10090
10091 elif test "$with_uuid" = e2fs ; then
10092   # On OS X, the UUID functions are in libc
10093   ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
10094 if test "x$ac_cv_func_uuid_generate" = xyes; then :
10095   UUID_LIBS=""
10096 else
10097   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
10098 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
10099 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
10100   $as_echo_n "(cached) " >&6
10101 else
10102   ac_check_lib_save_LIBS=$LIBS
10103 LIBS="-luuid  $LIBS"
10104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10105 /* end confdefs.h.  */
10106
10107 /* Override any GCC internal prototype to avoid an error.
10108    Use char because int might match the return type of a GCC
10109    builtin and then its argument prototype would still apply.  */
10110 #ifdef __cplusplus
10111 extern "C"
10112 #endif
10113 char uuid_generate ();
10114 int
10115 main ()
10116 {
10117 return uuid_generate ();
10118   ;
10119   return 0;
10120 }
10121 _ACEOF
10122 if ac_fn_c_try_link "$LINENO"; then :
10123   ac_cv_lib_uuid_uuid_generate=yes
10124 else
10125   ac_cv_lib_uuid_uuid_generate=no
10126 fi
10127 rm -f core conftest.err conftest.$ac_objext \
10128     conftest$ac_exeext conftest.$ac_ext
10129 LIBS=$ac_check_lib_save_LIBS
10130 fi
10131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
10132 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
10133 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
10134   UUID_LIBS="-luuid"
10135 else
10136   as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
10137 fi
10138
10139 fi
10140
10141 elif test "$with_uuid" = ossp ; then
10142   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
10143 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
10144 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
10145   $as_echo_n "(cached) " >&6
10146 else
10147   ac_check_lib_save_LIBS=$LIBS
10148 LIBS="-lossp-uuid  $LIBS"
10149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10150 /* end confdefs.h.  */
10151
10152 /* Override any GCC internal prototype to avoid an error.
10153    Use char because int might match the return type of a GCC
10154    builtin and then its argument prototype would still apply.  */
10155 #ifdef __cplusplus
10156 extern "C"
10157 #endif
10158 char uuid_export ();
10159 int
10160 main ()
10161 {
10162 return uuid_export ();
10163   ;
10164   return 0;
10165 }
10166 _ACEOF
10167 if ac_fn_c_try_link "$LINENO"; then :
10168   ac_cv_lib_ossp_uuid_uuid_export=yes
10169 else
10170   ac_cv_lib_ossp_uuid_uuid_export=no
10171 fi
10172 rm -f core conftest.err conftest.$ac_objext \
10173     conftest$ac_exeext conftest.$ac_ext
10174 LIBS=$ac_check_lib_save_LIBS
10175 fi
10176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
10177 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
10178 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
10179   UUID_LIBS="-lossp-uuid"
10180 else
10181   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
10182 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
10183 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
10184   $as_echo_n "(cached) " >&6
10185 else
10186   ac_check_lib_save_LIBS=$LIBS
10187 LIBS="-luuid  $LIBS"
10188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10189 /* end confdefs.h.  */
10190
10191 /* Override any GCC internal prototype to avoid an error.
10192    Use char because int might match the return type of a GCC
10193    builtin and then its argument prototype would still apply.  */
10194 #ifdef __cplusplus
10195 extern "C"
10196 #endif
10197 char uuid_export ();
10198 int
10199 main ()
10200 {
10201 return uuid_export ();
10202   ;
10203   return 0;
10204 }
10205 _ACEOF
10206 if ac_fn_c_try_link "$LINENO"; then :
10207   ac_cv_lib_uuid_uuid_export=yes
10208 else
10209   ac_cv_lib_uuid_uuid_export=no
10210 fi
10211 rm -f core conftest.err conftest.$ac_objext \
10212     conftest$ac_exeext conftest.$ac_ext
10213 LIBS=$ac_check_lib_save_LIBS
10214 fi
10215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
10216 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
10217 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
10218   UUID_LIBS="-luuid"
10219 else
10220   as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
10221 fi
10222
10223 fi
10224
10225 fi
10226
10227
10228
10229 ##
10230 ## Header files
10231 ##
10232
10233 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/epoll.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
10234 do :
10235   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10236 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10237 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10238   cat >>confdefs.h <<_ACEOF
10239 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10240 _ACEOF
10241
10242 fi
10243
10244 done
10245
10246
10247 # On BSD, test for net/if.h will fail unless sys/socket.h
10248 # is included first.
10249 for ac_header in net/if.h
10250 do :
10251   ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
10252 #ifdef HAVE_SYS_SOCKET_H
10253 #include <sys/socket.h>
10254 #endif
10255
10256 "
10257 if test "x$ac_cv_header_net_if_h" = xyes; then :
10258   cat >>confdefs.h <<_ACEOF
10259 #define HAVE_NET_IF_H 1
10260 _ACEOF
10261
10262 fi
10263
10264 done
10265
10266
10267 # On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
10268 # is included first.
10269 for ac_header in sys/ucred.h
10270 do :
10271   ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
10272 #include <sys/param.h>
10273
10274 "
10275 if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
10276   cat >>confdefs.h <<_ACEOF
10277 #define HAVE_SYS_UCRED_H 1
10278 _ACEOF
10279
10280 fi
10281
10282 done
10283
10284
10285 # At least on IRIX, test for netinet/tcp.h will fail unless
10286 # netinet/in.h is included first.
10287 for ac_header in netinet/in.h
10288 do :
10289   ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
10290 if test "x$ac_cv_header_netinet_in_h" = xyes; then :
10291   cat >>confdefs.h <<_ACEOF
10292 #define HAVE_NETINET_IN_H 1
10293 _ACEOF
10294
10295 fi
10296
10297 done
10298
10299 for ac_header in netinet/tcp.h
10300 do :
10301   ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
10302 #ifdef HAVE_NETINET_IN_H
10303 #include <netinet/in.h>
10304 #endif
10305
10306 "
10307 if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
10308   cat >>confdefs.h <<_ACEOF
10309 #define HAVE_NETINET_TCP_H 1
10310 _ACEOF
10311
10312 fi
10313
10314 done
10315
10316
10317 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
10318   for ac_header in readline/readline.h
10319 do :
10320   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
10321 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
10322   cat >>confdefs.h <<_ACEOF
10323 #define HAVE_READLINE_READLINE_H 1
10324 _ACEOF
10325
10326 else
10327   for ac_header in readline.h
10328 do :
10329   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
10330 if test "x$ac_cv_header_readline_h" = xyes; then :
10331   cat >>confdefs.h <<_ACEOF
10332 #define HAVE_READLINE_H 1
10333 _ACEOF
10334
10335 else
10336   as_fn_error $? "readline header not found
10337 If you have readline already installed, see config.log for details on the
10338 failure.  It is possible the compiler isn't looking in the proper directory.
10339 Use --without-readline to disable readline support." "$LINENO" 5
10340 fi
10341
10342 done
10343
10344 fi
10345
10346 done
10347
10348   for ac_header in readline/history.h
10349 do :
10350   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
10351 if test "x$ac_cv_header_readline_history_h" = xyes; then :
10352   cat >>confdefs.h <<_ACEOF
10353 #define HAVE_READLINE_HISTORY_H 1
10354 _ACEOF
10355
10356 else
10357   for ac_header in history.h
10358 do :
10359   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
10360 if test "x$ac_cv_header_history_h" = xyes; then :
10361   cat >>confdefs.h <<_ACEOF
10362 #define HAVE_HISTORY_H 1
10363 _ACEOF
10364
10365 else
10366   as_fn_error $? "history header not found
10367 If you have readline already installed, see config.log for details on the
10368 failure.  It is possible the compiler isn't looking in the proper directory.
10369 Use --without-readline to disable readline support." "$LINENO" 5
10370 fi
10371
10372 done
10373
10374 fi
10375
10376 done
10377
10378 fi
10379
10380 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
10381 # Some installations of libedit usurp /usr/include/readline/, which seems
10382 # bad practice, since in combined installations readline will have its headers
10383 # there.  We might have to resort to AC_EGREP checks to make sure we found
10384 # the proper header...
10385   for ac_header in editline/readline.h
10386 do :
10387   ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
10388 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
10389   cat >>confdefs.h <<_ACEOF
10390 #define HAVE_EDITLINE_READLINE_H 1
10391 _ACEOF
10392
10393 else
10394   for ac_header in readline.h
10395 do :
10396   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
10397 if test "x$ac_cv_header_readline_h" = xyes; then :
10398   cat >>confdefs.h <<_ACEOF
10399 #define HAVE_READLINE_H 1
10400 _ACEOF
10401
10402 else
10403   for ac_header in readline/readline.h
10404 do :
10405   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
10406 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
10407   cat >>confdefs.h <<_ACEOF
10408 #define HAVE_READLINE_READLINE_H 1
10409 _ACEOF
10410
10411 else
10412   as_fn_error $? "readline header not found
10413 If you have libedit already installed, see config.log for details on the
10414 failure.  It is possible the compiler isn't looking in the proper directory.
10415 Use --without-readline to disable libedit support." "$LINENO" 5
10416 fi
10417
10418 done
10419
10420 fi
10421
10422 done
10423
10424 fi
10425
10426 done
10427
10428 # Note: in a libedit installation, history.h is sometimes a dummy, and may
10429 # not be there at all.  Hence, don't complain if not found.  We must check
10430 # though, since in yet other versions it is an independent header.
10431   for ac_header in editline/history.h
10432 do :
10433   ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
10434 if test "x$ac_cv_header_editline_history_h" = xyes; then :
10435   cat >>confdefs.h <<_ACEOF
10436 #define HAVE_EDITLINE_HISTORY_H 1
10437 _ACEOF
10438
10439 else
10440   for ac_header in history.h
10441 do :
10442   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
10443 if test "x$ac_cv_header_history_h" = xyes; then :
10444   cat >>confdefs.h <<_ACEOF
10445 #define HAVE_HISTORY_H 1
10446 _ACEOF
10447
10448 else
10449   for ac_header in readline/history.h
10450 do :
10451   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
10452 if test "x$ac_cv_header_readline_history_h" = xyes; then :
10453   cat >>confdefs.h <<_ACEOF
10454 #define HAVE_READLINE_HISTORY_H 1
10455 _ACEOF
10456
10457 fi
10458
10459 done
10460
10461 fi
10462
10463 done
10464
10465 fi
10466
10467 done
10468
10469 fi
10470
10471 if test "$with_zlib" = yes; then
10472   ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
10473 if test "x$ac_cv_header_zlib_h" = xyes; then :
10474
10475 else
10476   as_fn_error $? "zlib header not found
10477 If you have zlib already installed, see config.log for details on the
10478 failure.  It is possible the compiler isn't looking in the proper directory.
10479 Use --without-zlib to disable zlib support." "$LINENO" 5
10480 fi
10481
10482
10483 fi
10484
10485 if test "$with_gssapi" = yes ; then
10486   for ac_header in gssapi/gssapi.h
10487 do :
10488   ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
10489 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
10490   cat >>confdefs.h <<_ACEOF
10491 #define HAVE_GSSAPI_GSSAPI_H 1
10492 _ACEOF
10493
10494 else
10495   for ac_header in gssapi.h
10496 do :
10497   ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
10498 if test "x$ac_cv_header_gssapi_h" = xyes; then :
10499   cat >>confdefs.h <<_ACEOF
10500 #define HAVE_GSSAPI_H 1
10501 _ACEOF
10502
10503 else
10504   as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
10505 fi
10506
10507 done
10508
10509 fi
10510
10511 done
10512
10513 fi
10514
10515 if test "$with_openssl" = yes ; then
10516   ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
10517 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
10518
10519 else
10520   as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
10521 fi
10522
10523
10524   ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
10525 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
10526
10527 else
10528   as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
10529 fi
10530
10531
10532 fi
10533
10534 if test "$with_pam" = yes ; then
10535   for ac_header in security/pam_appl.h
10536 do :
10537   ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
10538 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
10539   cat >>confdefs.h <<_ACEOF
10540 #define HAVE_SECURITY_PAM_APPL_H 1
10541 _ACEOF
10542
10543 else
10544   for ac_header in pam/pam_appl.h
10545 do :
10546   ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
10547 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
10548   cat >>confdefs.h <<_ACEOF
10549 #define HAVE_PAM_PAM_APPL_H 1
10550 _ACEOF
10551
10552 else
10553   as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
10554 fi
10555
10556 done
10557
10558 fi
10559
10560 done
10561
10562 fi
10563
10564 if test "$with_bsd_auth" = yes ; then
10565   ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
10566 if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
10567
10568 else
10569   as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
10570 fi
10571
10572
10573 fi
10574
10575 if test "$with_systemd" = yes ; then
10576   ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
10577 if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
10578
10579 else
10580   as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
10581 fi
10582
10583
10584 fi
10585
10586 if test "$with_libxml" = yes ; then
10587   ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
10588 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
10589
10590 else
10591   as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
10592 fi
10593
10594
10595 fi
10596
10597 if test "$with_libxslt" = yes ; then
10598   ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
10599 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
10600
10601 else
10602   as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
10603 fi
10604
10605
10606 fi
10607
10608 if test "$with_ldap" = yes ; then
10609   if test "$PORTNAME" != "win32"; then
10610      for ac_header in ldap.h
10611 do :
10612   ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
10613 if test "x$ac_cv_header_ldap_h" = xyes; then :
10614   cat >>confdefs.h <<_ACEOF
10615 #define HAVE_LDAP_H 1
10616 _ACEOF
10617
10618 else
10619   as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
10620 fi
10621
10622 done
10623
10624      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
10625 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
10626 if ${pgac_cv_ldap_safe+:} false; then :
10627   $as_echo_n "(cached) " >&6
10628 else
10629   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10630 /* end confdefs.h.  */
10631 #include <ldap.h>
10632 #if !defined(LDAP_VENDOR_VERSION) || \
10633      (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
10634       LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
10635 choke me
10636 #endif
10637 int
10638 main ()
10639 {
10640
10641   ;
10642   return 0;
10643 }
10644 _ACEOF
10645 if ac_fn_c_try_compile "$LINENO"; then :
10646   pgac_cv_ldap_safe=yes
10647 else
10648   pgac_cv_ldap_safe=no
10649 fi
10650 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10651 fi
10652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
10653 $as_echo "$pgac_cv_ldap_safe" >&6; }
10654
10655 if test "$pgac_cv_ldap_safe" != yes; then
10656   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10657 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
10658 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
10659 *** also uses LDAP will crash on exit." >&5
10660 $as_echo "$as_me: WARNING:
10661 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
10662 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
10663 *** also uses LDAP will crash on exit." >&2;}
10664 fi
10665   else
10666      for ac_header in winldap.h
10667 do :
10668   ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
10669 #include <windows.h>
10670
10671 "
10672 if test "x$ac_cv_header_winldap_h" = xyes; then :
10673   cat >>confdefs.h <<_ACEOF
10674 #define HAVE_WINLDAP_H 1
10675 _ACEOF
10676
10677 else
10678   as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
10679 fi
10680
10681 done
10682
10683   fi
10684 fi
10685
10686 if test "$with_bonjour" = yes ; then
10687   ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
10688 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
10689
10690 else
10691   as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
10692 fi
10693
10694
10695 fi
10696
10697 # for contrib/uuid-ossp
10698 if test "$with_uuid" = bsd ; then
10699   for ac_header in uuid.h
10700 do :
10701   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
10702 if test "x$ac_cv_header_uuid_h" = xyes; then :
10703   cat >>confdefs.h <<_ACEOF
10704 #define HAVE_UUID_H 1
10705 _ACEOF
10706  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10707 /* end confdefs.h.  */
10708 #include <uuid.h>
10709
10710 _ACEOF
10711 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10712   $EGREP "uuid_to_string" >/dev/null 2>&1; then :
10713
10714 else
10715   as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
10716 fi
10717 rm -f conftest*
10718
10719 else
10720   as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
10721 fi
10722
10723 done
10724
10725 elif test "$with_uuid" = e2fs ; then
10726   for ac_header in uuid/uuid.h
10727 do :
10728   ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
10729 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
10730   cat >>confdefs.h <<_ACEOF
10731 #define HAVE_UUID_UUID_H 1
10732 _ACEOF
10733  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10734 /* end confdefs.h.  */
10735 #include <uuid/uuid.h>
10736
10737 _ACEOF
10738 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10739   $EGREP "uuid_generate" >/dev/null 2>&1; then :
10740
10741 else
10742   as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
10743 fi
10744 rm -f conftest*
10745
10746 else
10747   for ac_header in uuid.h
10748 do :
10749   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
10750 if test "x$ac_cv_header_uuid_h" = xyes; then :
10751   cat >>confdefs.h <<_ACEOF
10752 #define HAVE_UUID_H 1
10753 _ACEOF
10754  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10755 /* end confdefs.h.  */
10756 #include <uuid.h>
10757
10758 _ACEOF
10759 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10760   $EGREP "uuid_generate" >/dev/null 2>&1; then :
10761
10762 else
10763   as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
10764 fi
10765 rm -f conftest*
10766
10767 else
10768   as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
10769 fi
10770
10771 done
10772
10773 fi
10774
10775 done
10776
10777 elif test "$with_uuid" = ossp ; then
10778   for ac_header in ossp/uuid.h
10779 do :
10780   ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
10781 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
10782   cat >>confdefs.h <<_ACEOF
10783 #define HAVE_OSSP_UUID_H 1
10784 _ACEOF
10785  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10786 /* end confdefs.h.  */
10787 #include <ossp/uuid.h>
10788
10789 _ACEOF
10790 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10791   $EGREP "uuid_export" >/dev/null 2>&1; then :
10792
10793 else
10794   as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
10795 fi
10796 rm -f conftest*
10797
10798 else
10799   for ac_header in uuid.h
10800 do :
10801   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
10802 if test "x$ac_cv_header_uuid_h" = xyes; then :
10803   cat >>confdefs.h <<_ACEOF
10804 #define HAVE_UUID_H 1
10805 _ACEOF
10806  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10807 /* end confdefs.h.  */
10808 #include <uuid.h>
10809
10810 _ACEOF
10811 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10812   $EGREP "uuid_export" >/dev/null 2>&1; then :
10813
10814 else
10815   as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
10816 fi
10817 rm -f conftest*
10818
10819 else
10820   as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
10821 fi
10822
10823 done
10824
10825 fi
10826
10827 done
10828
10829 fi
10830
10831 if test "$PORTNAME" = "win32" ; then
10832    for ac_header in crtdefs.h
10833 do :
10834   ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
10835 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
10836   cat >>confdefs.h <<_ACEOF
10837 #define HAVE_CRTDEFS_H 1
10838 _ACEOF
10839
10840 fi
10841
10842 done
10843
10844 fi
10845
10846 ##
10847 ## Types, structures, compiler characteristics
10848 ##
10849
10850   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
10851 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
10852 if ${ac_cv_c_bigendian+:} false; then :
10853   $as_echo_n "(cached) " >&6
10854 else
10855   ac_cv_c_bigendian=unknown
10856     # See if we're dealing with a universal compiler.
10857     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10858 /* end confdefs.h.  */
10859 #ifndef __APPLE_CC__
10860                not a universal capable compiler
10861              #endif
10862              typedef int dummy;
10863
10864 _ACEOF
10865 if ac_fn_c_try_compile "$LINENO"; then :
10866
10867         # Check for potential -arch flags.  It is not universal unless
10868         # there are at least two -arch flags with different values.
10869         ac_arch=
10870         ac_prev=
10871         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
10872          if test -n "$ac_prev"; then
10873            case $ac_word in
10874              i?86 | x86_64 | ppc | ppc64)
10875                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
10876                  ac_arch=$ac_word
10877                else
10878                  ac_cv_c_bigendian=universal
10879                  break
10880                fi
10881                ;;
10882            esac
10883            ac_prev=
10884          elif test "x$ac_word" = "x-arch"; then
10885            ac_prev=arch
10886          fi
10887        done
10888 fi
10889 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10890     if test $ac_cv_c_bigendian = unknown; then
10891       # See if sys/param.h defines the BYTE_ORDER macro.
10892       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10893 /* end confdefs.h.  */
10894 #include <sys/types.h>
10895              #include <sys/param.h>
10896
10897 int
10898 main ()
10899 {
10900 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
10901                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
10902                      && LITTLE_ENDIAN)
10903               bogus endian macros
10904              #endif
10905
10906   ;
10907   return 0;
10908 }
10909 _ACEOF
10910 if ac_fn_c_try_compile "$LINENO"; then :
10911   # It does; now see whether it defined to BIG_ENDIAN or not.
10912          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10913 /* end confdefs.h.  */
10914 #include <sys/types.h>
10915                 #include <sys/param.h>
10916
10917 int
10918 main ()
10919 {
10920 #if BYTE_ORDER != BIG_ENDIAN
10921                  not big endian
10922                 #endif
10923
10924   ;
10925   return 0;
10926 }
10927 _ACEOF
10928 if ac_fn_c_try_compile "$LINENO"; then :
10929   ac_cv_c_bigendian=yes
10930 else
10931   ac_cv_c_bigendian=no
10932 fi
10933 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10934 fi
10935 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10936     fi
10937     if test $ac_cv_c_bigendian = unknown; then
10938       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
10939       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10940 /* end confdefs.h.  */
10941 #include <limits.h>
10942
10943 int
10944 main ()
10945 {
10946 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
10947               bogus endian macros
10948              #endif
10949
10950   ;
10951   return 0;
10952 }
10953 _ACEOF
10954 if ac_fn_c_try_compile "$LINENO"; then :
10955   # It does; now see whether it defined to _BIG_ENDIAN or not.
10956          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10957 /* end confdefs.h.  */
10958 #include <limits.h>
10959
10960 int
10961 main ()
10962 {
10963 #ifndef _BIG_ENDIAN
10964                  not big endian
10965                 #endif
10966
10967   ;
10968   return 0;
10969 }
10970 _ACEOF
10971 if ac_fn_c_try_compile "$LINENO"; then :
10972   ac_cv_c_bigendian=yes
10973 else
10974   ac_cv_c_bigendian=no
10975 fi
10976 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10977 fi
10978 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10979     fi
10980     if test $ac_cv_c_bigendian = unknown; then
10981       # Compile a test program.
10982       if test "$cross_compiling" = yes; then :
10983   # Try to guess by grepping values from an object file.
10984          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10985 /* end confdefs.h.  */
10986 short int ascii_mm[] =
10987                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
10988                 short int ascii_ii[] =
10989                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
10990                 int use_ascii (int i) {
10991                   return ascii_mm[i] + ascii_ii[i];
10992                 }
10993                 short int ebcdic_ii[] =
10994                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
10995                 short int ebcdic_mm[] =
10996                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
10997                 int use_ebcdic (int i) {
10998                   return ebcdic_mm[i] + ebcdic_ii[i];
10999                 }
11000                 extern int foo;
11001
11002 int
11003 main ()
11004 {
11005 return use_ascii (foo) == use_ebcdic (foo);
11006   ;
11007   return 0;
11008 }
11009 _ACEOF
11010 if ac_fn_c_try_compile "$LINENO"; then :
11011   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
11012               ac_cv_c_bigendian=yes
11013             fi
11014             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
11015               if test "$ac_cv_c_bigendian" = unknown; then
11016                 ac_cv_c_bigendian=no
11017               else
11018                 # finding both strings is unlikely to happen, but who knows?
11019                 ac_cv_c_bigendian=unknown
11020               fi
11021             fi
11022 fi
11023 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11024 else
11025   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11026 /* end confdefs.h.  */
11027 $ac_includes_default
11028 int
11029 main ()
11030 {
11031
11032              /* Are we little or big endian?  From Harbison&Steele.  */
11033              union
11034              {
11035                long int l;
11036                char c[sizeof (long int)];
11037              } u;
11038              u.l = 1;
11039              return u.c[sizeof (long int) - 1] == 1;
11040
11041   ;
11042   return 0;
11043 }
11044 _ACEOF
11045 if ac_fn_c_try_run "$LINENO"; then :
11046   ac_cv_c_bigendian=no
11047 else
11048   ac_cv_c_bigendian=yes
11049 fi
11050 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11051   conftest.$ac_objext conftest.beam conftest.$ac_ext
11052 fi
11053
11054     fi
11055 fi
11056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
11057 $as_echo "$ac_cv_c_bigendian" >&6; }
11058  case $ac_cv_c_bigendian in #(
11059    yes)
11060      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
11061 ;; #(
11062    no)
11063       ;; #(
11064    universal)
11065
11066 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
11067
11068      ;; #(
11069    *)
11070      as_fn_error $? "unknown endianness
11071  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
11072  esac
11073
11074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
11075 $as_echo_n "checking for inline... " >&6; }
11076 if ${ac_cv_c_inline+:} false; then :
11077   $as_echo_n "(cached) " >&6
11078 else
11079   ac_cv_c_inline=no
11080 for ac_kw in inline __inline__ __inline; do
11081   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11082 /* end confdefs.h.  */
11083 #ifndef __cplusplus
11084 typedef int foo_t;
11085 static $ac_kw foo_t static_foo () {return 0; }
11086 $ac_kw foo_t foo () {return 0; }
11087 #endif
11088
11089 _ACEOF
11090 if ac_fn_c_try_compile "$LINENO"; then :
11091   ac_cv_c_inline=$ac_kw
11092 fi
11093 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11094   test "$ac_cv_c_inline" != no && break
11095 done
11096
11097 fi
11098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
11099 $as_echo "$ac_cv_c_inline" >&6; }
11100
11101 case $ac_cv_c_inline in
11102   inline | yes) ;;
11103   *)
11104     case $ac_cv_c_inline in
11105       no) ac_val=;;
11106       *) ac_val=$ac_cv_c_inline;;
11107     esac
11108     cat >>confdefs.h <<_ACEOF
11109 #ifndef __cplusplus
11110 #define inline $ac_val
11111 #endif
11112 _ACEOF
11113     ;;
11114 esac
11115
11116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
11117 $as_echo_n "checking for printf format archetype... " >&6; }
11118 if ${pgac_cv_printf_archetype+:} false; then :
11119   $as_echo_n "(cached) " >&6
11120 else
11121   ac_save_c_werror_flag=$ac_c_werror_flag
11122 ac_c_werror_flag=yes
11123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11124 /* end confdefs.h.  */
11125 extern int
11126 pgac_write(int ignore, const char *fmt,...)
11127 __attribute__((format(gnu_printf, 2, 3)));
11128 int
11129 main ()
11130 {
11131
11132   ;
11133   return 0;
11134 }
11135 _ACEOF
11136 if ac_fn_c_try_compile "$LINENO"; then :
11137   pgac_cv_printf_archetype=gnu_printf
11138 else
11139   pgac_cv_printf_archetype=printf
11140 fi
11141 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11142 ac_c_werror_flag=$ac_save_c_werror_flag
11143 fi
11144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
11145 $as_echo "$pgac_cv_printf_archetype" >&6; }
11146
11147 cat >>confdefs.h <<_ACEOF
11148 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
11149 _ACEOF
11150
11151
11152
11153   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array members" >&5
11154 $as_echo_n "checking for flexible array members... " >&6; }
11155 if ${ac_cv_c_flexmember+:} false; then :
11156   $as_echo_n "(cached) " >&6
11157 else
11158   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11159 /* end confdefs.h.  */
11160 #include <stdlib.h>
11161             #include <stdio.h>
11162             #include <stddef.h>
11163             struct s { int n; double d[]; };
11164 int
11165 main ()
11166 {
11167 int m = getchar ();
11168             struct s *p = malloc (offsetof (struct s, d)
11169                                   + m * sizeof (double));
11170             p->d[0] = 0.0;
11171             return p->d != (double *) NULL;
11172   ;
11173   return 0;
11174 }
11175 _ACEOF
11176 if ac_fn_c_try_compile "$LINENO"; then :
11177   ac_cv_c_flexmember=yes
11178 else
11179   ac_cv_c_flexmember=no
11180 fi
11181 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11182 fi
11183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
11184 $as_echo "$ac_cv_c_flexmember" >&6; }
11185   if test $ac_cv_c_flexmember = yes; then
11186
11187 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
11188
11189   else
11190     $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
11191
11192   fi
11193
11194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed types" >&5
11195 $as_echo_n "checking for signed types... " >&6; }
11196 if ${pgac_cv_c_signed+:} false; then :
11197   $as_echo_n "(cached) " >&6
11198 else
11199   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11200 /* end confdefs.h.  */
11201
11202 int
11203 main ()
11204 {
11205 signed char c; signed short s; signed int i;
11206   ;
11207   return 0;
11208 }
11209 _ACEOF
11210 if ac_fn_c_try_compile "$LINENO"; then :
11211   pgac_cv_c_signed=yes
11212 else
11213   pgac_cv_c_signed=no
11214 fi
11215 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11216 fi
11217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_signed" >&5
11218 $as_echo "$pgac_cv_c_signed" >&6; }
11219 if test x"$pgac_cv_c_signed" = xno ; then
11220
11221 $as_echo "#define signed /**/" >>confdefs.h
11222
11223 fi
11224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5
11225 $as_echo_n "checking for __func__... " >&6; }
11226 if ${pgac_cv_funcname_func_support+:} false; then :
11227   $as_echo_n "(cached) " >&6
11228 else
11229   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11230 /* end confdefs.h.  */
11231 #include <stdio.h>
11232 int
11233 main ()
11234 {
11235 printf("%s\n", __func__);
11236   ;
11237   return 0;
11238 }
11239 _ACEOF
11240 if ac_fn_c_try_compile "$LINENO"; then :
11241   pgac_cv_funcname_func_support=yes
11242 else
11243   pgac_cv_funcname_func_support=no
11244 fi
11245 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11246 fi
11247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_func_support" >&5
11248 $as_echo "$pgac_cv_funcname_func_support" >&6; }
11249 if test x"$pgac_cv_funcname_func_support" = xyes ; then
11250
11251 $as_echo "#define HAVE_FUNCNAME__FUNC 1" >>confdefs.h
11252
11253 else
11254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__" >&5
11255 $as_echo_n "checking for __FUNCTION__... " >&6; }
11256 if ${pgac_cv_funcname_function_support+:} false; then :
11257   $as_echo_n "(cached) " >&6
11258 else
11259   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11260 /* end confdefs.h.  */
11261 #include <stdio.h>
11262 int
11263 main ()
11264 {
11265 printf("%s\n", __FUNCTION__);
11266   ;
11267   return 0;
11268 }
11269 _ACEOF
11270 if ac_fn_c_try_compile "$LINENO"; then :
11271   pgac_cv_funcname_function_support=yes
11272 else
11273   pgac_cv_funcname_function_support=no
11274 fi
11275 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11276 fi
11277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_function_support" >&5
11278 $as_echo "$pgac_cv_funcname_function_support" >&6; }
11279 if test x"$pgac_cv_funcname_function_support" = xyes ; then
11280
11281 $as_echo "#define HAVE_FUNCNAME__FUNCTION 1" >>confdefs.h
11282
11283 fi
11284 fi
11285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
11286 $as_echo_n "checking for _Static_assert... " >&6; }
11287 if ${pgac_cv__static_assert+:} false; then :
11288   $as_echo_n "(cached) " >&6
11289 else
11290   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11291 /* end confdefs.h.  */
11292
11293 int
11294 main ()
11295 {
11296 ({ _Static_assert(1, "foo"); })
11297   ;
11298   return 0;
11299 }
11300 _ACEOF
11301 if ac_fn_c_try_link "$LINENO"; then :
11302   pgac_cv__static_assert=yes
11303 else
11304   pgac_cv__static_assert=no
11305 fi
11306 rm -f core conftest.err conftest.$ac_objext \
11307     conftest$ac_exeext conftest.$ac_ext
11308 fi
11309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
11310 $as_echo "$pgac_cv__static_assert" >&6; }
11311 if test x"$pgac_cv__static_assert" = xyes ; then
11312
11313 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
11314
11315 fi
11316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
11317 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
11318 if ${pgac_cv__types_compatible+:} false; then :
11319   $as_echo_n "(cached) " >&6
11320 else
11321   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11322 /* end confdefs.h.  */
11323
11324 int
11325 main ()
11326 {
11327  int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
11328   ;
11329   return 0;
11330 }
11331 _ACEOF
11332 if ac_fn_c_try_compile "$LINENO"; then :
11333   pgac_cv__types_compatible=yes
11334 else
11335   pgac_cv__types_compatible=no
11336 fi
11337 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11338 fi
11339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
11340 $as_echo "$pgac_cv__types_compatible" >&6; }
11341 if test x"$pgac_cv__types_compatible" = xyes ; then
11342
11343 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
11344
11345 fi
11346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
11347 $as_echo_n "checking for __builtin_bswap32... " >&6; }
11348 if ${pgac_cv__builtin_bswap32+:} false; then :
11349   $as_echo_n "(cached) " >&6
11350 else
11351   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11352 /* end confdefs.h.  */
11353 static unsigned long int x = __builtin_bswap32(0xaabbccdd);
11354
11355 _ACEOF
11356 if ac_fn_c_try_compile "$LINENO"; then :
11357   pgac_cv__builtin_bswap32=yes
11358 else
11359   pgac_cv__builtin_bswap32=no
11360 fi
11361 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11362 fi
11363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
11364 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
11365 if test x"$pgac_cv__builtin_bswap32" = xyes ; then
11366
11367 $as_echo "#define HAVE__BUILTIN_BSWAP32 1" >>confdefs.h
11368
11369 fi
11370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
11371 $as_echo_n "checking for __builtin_bswap64... " >&6; }
11372 if ${pgac_cv__builtin_bswap64+:} false; then :
11373   $as_echo_n "(cached) " >&6
11374 else
11375   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11376 /* end confdefs.h.  */
11377 static unsigned long int x = __builtin_bswap64(0xaabbccddeeff0011);
11378
11379 _ACEOF
11380 if ac_fn_c_try_compile "$LINENO"; then :
11381   pgac_cv__builtin_bswap64=yes
11382 else
11383   pgac_cv__builtin_bswap64=no
11384 fi
11385 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11386 fi
11387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
11388 $as_echo "$pgac_cv__builtin_bswap64" >&6; }
11389 if test x"$pgac_cv__builtin_bswap64" = xyes ; then
11390
11391 $as_echo "#define HAVE__BUILTIN_BSWAP64 1" >>confdefs.h
11392
11393 fi
11394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
11395 $as_echo_n "checking for __builtin_constant_p... " >&6; }
11396 if ${pgac_cv__builtin_constant_p+:} false; then :
11397   $as_echo_n "(cached) " >&6
11398 else
11399   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11400 /* end confdefs.h.  */
11401 static int x; static int y[__builtin_constant_p(x) ? x : 1];
11402
11403 _ACEOF
11404 if ac_fn_c_try_compile "$LINENO"; then :
11405   pgac_cv__builtin_constant_p=yes
11406 else
11407   pgac_cv__builtin_constant_p=no
11408 fi
11409 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11410 fi
11411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
11412 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
11413 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
11414
11415 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
11416
11417 fi
11418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
11419 $as_echo_n "checking for __builtin_unreachable... " >&6; }
11420 if ${pgac_cv__builtin_unreachable+:} false; then :
11421   $as_echo_n "(cached) " >&6
11422 else
11423   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11424 /* end confdefs.h.  */
11425
11426 int
11427 main ()
11428 {
11429 __builtin_unreachable();
11430   ;
11431   return 0;
11432 }
11433 _ACEOF
11434 if ac_fn_c_try_link "$LINENO"; then :
11435   pgac_cv__builtin_unreachable=yes
11436 else
11437   pgac_cv__builtin_unreachable=no
11438 fi
11439 rm -f core conftest.err conftest.$ac_objext \
11440     conftest$ac_exeext conftest.$ac_ext
11441 fi
11442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
11443 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
11444 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
11445
11446 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
11447
11448 fi
11449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __VA_ARGS__" >&5
11450 $as_echo_n "checking for __VA_ARGS__... " >&6; }
11451 if ${pgac_cv__va_args+:} false; then :
11452   $as_echo_n "(cached) " >&6
11453 else
11454   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11455 /* end confdefs.h.  */
11456 #include <stdio.h>
11457 int
11458 main ()
11459 {
11460 #define debug(...) fprintf(stderr, __VA_ARGS__)
11461 debug("%s", "blarg");
11462
11463   ;
11464   return 0;
11465 }
11466 _ACEOF
11467 if ac_fn_c_try_compile "$LINENO"; then :
11468   pgac_cv__va_args=yes
11469 else
11470   pgac_cv__va_args=no
11471 fi
11472 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11473 fi
11474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__va_args" >&5
11475 $as_echo "$pgac_cv__va_args" >&6; }
11476 if test x"$pgac_cv__va_args" = xyes ; then
11477
11478 $as_echo "#define HAVE__VA_ARGS 1" >>confdefs.h
11479
11480 fi
11481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11482 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
11483 if ${ac_cv_struct_tm+:} false; then :
11484   $as_echo_n "(cached) " >&6
11485 else
11486   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11487 /* end confdefs.h.  */
11488 #include <sys/types.h>
11489 #include <time.h>
11490
11491 int
11492 main ()
11493 {
11494 struct tm tm;
11495                                      int *p = &tm.tm_sec;
11496                                      return !p;
11497   ;
11498   return 0;
11499 }
11500 _ACEOF
11501 if ac_fn_c_try_compile "$LINENO"; then :
11502   ac_cv_struct_tm=time.h
11503 else
11504   ac_cv_struct_tm=sys/time.h
11505 fi
11506 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11507 fi
11508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11509 $as_echo "$ac_cv_struct_tm" >&6; }
11510 if test $ac_cv_struct_tm = sys/time.h; then
11511
11512 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
11513
11514 fi
11515
11516 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
11517 #include <$ac_cv_struct_tm>
11518
11519 "
11520 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
11521
11522 cat >>confdefs.h <<_ACEOF
11523 #define HAVE_STRUCT_TM_TM_ZONE 1
11524 _ACEOF
11525
11526
11527 fi
11528
11529 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11530
11531 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
11532
11533 fi
11534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11535 $as_echo_n "checking for tzname... " >&6; }
11536 if ${ac_cv_var_tzname+:} false; then :
11537   $as_echo_n "(cached) " >&6
11538 else
11539   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11540 /* end confdefs.h.  */
11541 #include <time.h>
11542 #ifndef tzname /* For SGI.  */
11543 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
11544 #endif
11545
11546 int
11547 main ()
11548 {
11549 atoi(*tzname);
11550   ;
11551   return 0;
11552 }
11553 _ACEOF
11554 if ac_fn_c_try_link "$LINENO"; then :
11555   ac_cv_var_tzname=yes
11556 else
11557   ac_cv_var_tzname=no
11558 fi
11559 rm -f core conftest.err conftest.$ac_objext \
11560     conftest$ac_exeext conftest.$ac_ext
11561 fi
11562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11563 $as_echo "$ac_cv_var_tzname" >&6; }
11564 if test $ac_cv_var_tzname = yes; then
11565
11566 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
11567
11568 fi
11569
11570 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
11571 #include <sys/ipc.h>
11572 #include <sys/sem.h>
11573 "
11574 if test "x$ac_cv_type_union_semun" = xyes; then :
11575
11576 cat >>confdefs.h <<_ACEOF
11577 #define HAVE_UNION_SEMUN 1
11578 _ACEOF
11579
11580
11581 fi
11582
11583 ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
11584 #ifdef HAVE_SYS_UN_H
11585 #include <sys/un.h>
11586 #endif
11587
11588 "
11589 if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
11590
11591 $as_echo "#define HAVE_UNIX_SOCKETS 1" >>confdefs.h
11592
11593 fi
11594
11595 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
11596 #ifdef HAVE_SYS_SOCKET_H
11597 #include <sys/socket.h>
11598 #endif
11599
11600 "
11601 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
11602
11603 cat >>confdefs.h <<_ACEOF
11604 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
11605 _ACEOF
11606
11607
11608 fi
11609
11610 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
11611 #ifdef HAVE_SYS_SOCKET_H
11612 #include <sys/socket.h>
11613 #endif
11614
11615 "
11616 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
11617
11618 cat >>confdefs.h <<_ACEOF
11619 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
11620 _ACEOF
11621
11622
11623 fi
11624 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
11625 #ifdef HAVE_SYS_SOCKET_H
11626 #include <sys/socket.h>
11627 #endif
11628
11629 "
11630 if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
11631
11632 cat >>confdefs.h <<_ACEOF
11633 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
11634 _ACEOF
11635
11636
11637 fi
11638 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
11639 #ifdef HAVE_SYS_SOCKET_H
11640 #include <sys/socket.h>
11641 #endif
11642
11643 "
11644 if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
11645
11646 cat >>confdefs.h <<_ACEOF
11647 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
11648 _ACEOF
11649
11650
11651 fi
11652 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
11653 #ifdef HAVE_SYS_SOCKET_H
11654 #include <sys/socket.h>
11655 #endif
11656
11657 "
11658 if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
11659
11660 cat >>confdefs.h <<_ACEOF
11661 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
11662 _ACEOF
11663
11664
11665 fi
11666 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
11667 #ifdef HAVE_SYS_SOCKET_H
11668 #include <sys/socket.h>
11669 #endif
11670
11671 "
11672 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
11673
11674 cat >>confdefs.h <<_ACEOF
11675 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
11676 _ACEOF
11677
11678
11679 fi
11680
11681 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include <sys/types.h>
11682 #include <sys/socket.h>
11683 #include <netdb.h>
11684
11685 "
11686 if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
11687
11688 cat >>confdefs.h <<_ACEOF
11689 #define HAVE_STRUCT_ADDRINFO 1
11690 _ACEOF
11691
11692
11693 fi
11694
11695
11696   ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
11697 if test "x$ac_cv_type_intptr_t" = xyes; then :
11698
11699 $as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
11700
11701 else
11702   for ac_type in 'int' 'long int' 'long long int'; do
11703        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11704 /* end confdefs.h.  */
11705 $ac_includes_default
11706 int
11707 main ()
11708 {
11709 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
11710 test_array [0] = 0;
11711 return test_array [0];
11712
11713   ;
11714   return 0;
11715 }
11716 _ACEOF
11717 if ac_fn_c_try_compile "$LINENO"; then :
11718
11719 cat >>confdefs.h <<_ACEOF
11720 #define intptr_t $ac_type
11721 _ACEOF
11722
11723           ac_type=
11724 fi
11725 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11726        test -z "$ac_type" && break
11727      done
11728 fi
11729
11730
11731
11732   ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
11733 if test "x$ac_cv_type_uintptr_t" = xyes; then :
11734
11735 $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
11736
11737 else
11738   for ac_type in 'unsigned int' 'unsigned long int' \
11739         'unsigned long long int'; do
11740        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11741 /* end confdefs.h.  */
11742 $ac_includes_default
11743 int
11744 main ()
11745 {
11746 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
11747 test_array [0] = 0;
11748 return test_array [0];
11749
11750   ;
11751   return 0;
11752 }
11753 _ACEOF
11754 if ac_fn_c_try_compile "$LINENO"; then :
11755
11756 cat >>confdefs.h <<_ACEOF
11757 #define uintptr_t $ac_type
11758 _ACEOF
11759
11760           ac_type=
11761 fi
11762 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11763        test -z "$ac_type" && break
11764      done
11765 fi
11766
11767
11768
11769   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
11770 $as_echo_n "checking for unsigned long long int... " >&6; }
11771 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
11772   $as_echo_n "(cached) " >&6
11773 else
11774   ac_cv_type_unsigned_long_long_int=yes
11775      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
11776        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11777 /* end confdefs.h.  */
11778
11779   /* For now, do not test the preprocessor; as of 2007 there are too many
11780          implementations with broken preprocessors.  Perhaps this can
11781          be revisited in 2012.  In the meantime, code should not expect
11782          #if to work with literals wider than 32 bits.  */
11783       /* Test literals.  */
11784       long long int ll = 9223372036854775807ll;
11785       long long int nll = -9223372036854775807LL;
11786       unsigned long long int ull = 18446744073709551615ULL;
11787       /* Test constant expressions.   */
11788       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
11789                      ? 1 : -1)];
11790       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
11791                      ? 1 : -1)];
11792       int i = 63;
11793 int
11794 main ()
11795 {
11796 /* Test availability of runtime routines for shift and division.  */
11797       long long int llmax = 9223372036854775807ll;
11798       unsigned long long int ullmax = 18446744073709551615ull;
11799       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
11800               | (llmax / ll) | (llmax % ll)
11801               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
11802               | (ullmax / ull) | (ullmax % ull));
11803   ;
11804   return 0;
11805 }
11806
11807 _ACEOF
11808 if ac_fn_c_try_link "$LINENO"; then :
11809
11810 else
11811   ac_cv_type_unsigned_long_long_int=no
11812 fi
11813 rm -f core conftest.err conftest.$ac_objext \
11814     conftest$ac_exeext conftest.$ac_ext
11815      fi
11816 fi
11817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
11818 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
11819   if test $ac_cv_type_unsigned_long_long_int = yes; then
11820
11821 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
11822
11823   fi
11824
11825
11826
11827   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
11828 $as_echo_n "checking for long long int... " >&6; }
11829 if ${ac_cv_type_long_long_int+:} false; then :
11830   $as_echo_n "(cached) " >&6
11831 else
11832   ac_cv_type_long_long_int=yes
11833       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
11834         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
11835         if test $ac_cv_type_long_long_int = yes; then
11836                                   if test "$cross_compiling" = yes; then :
11837   :
11838 else
11839   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11840 /* end confdefs.h.  */
11841 #include <limits.h>
11842                  #ifndef LLONG_MAX
11843                  # define HALF \
11844                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
11845                  # define LLONG_MAX (HALF - 1 + HALF)
11846                  #endif
11847 int
11848 main ()
11849 {
11850 long long int n = 1;
11851                  int i;
11852                  for (i = 0; ; i++)
11853                    {
11854                      long long int m = n << i;
11855                      if (m >> i != n)
11856                        return 1;
11857                      if (LLONG_MAX / 2 < m)
11858                        break;
11859                    }
11860                  return 0;
11861   ;
11862   return 0;
11863 }
11864 _ACEOF
11865 if ac_fn_c_try_run "$LINENO"; then :
11866
11867 else
11868   ac_cv_type_long_long_int=no
11869 fi
11870 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11871   conftest.$ac_objext conftest.beam conftest.$ac_ext
11872 fi
11873
11874         fi
11875       fi
11876 fi
11877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
11878 $as_echo "$ac_cv_type_long_long_int" >&6; }
11879   if test $ac_cv_type_long_long_int = yes; then
11880
11881 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
11882
11883   fi
11884
11885
11886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
11887 $as_echo_n "checking for locale_t... " >&6; }
11888 if ${pgac_cv_type_locale_t+:} false; then :
11889   $as_echo_n "(cached) " >&6
11890 else
11891   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11892 /* end confdefs.h.  */
11893 #include <locale.h>
11894 locale_t x;
11895 int
11896 main ()
11897 {
11898
11899   ;
11900   return 0;
11901 }
11902 _ACEOF
11903 if ac_fn_c_try_compile "$LINENO"; then :
11904   pgac_cv_type_locale_t=yes
11905 else
11906   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11907 /* end confdefs.h.  */
11908 #include <xlocale.h>
11909 locale_t x;
11910 int
11911 main ()
11912 {
11913
11914   ;
11915   return 0;
11916 }
11917 _ACEOF
11918 if ac_fn_c_try_compile "$LINENO"; then :
11919   pgac_cv_type_locale_t='yes (in xlocale.h)'
11920 else
11921   pgac_cv_type_locale_t=no
11922 fi
11923 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11924 fi
11925 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11926 fi
11927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
11928 $as_echo "$pgac_cv_type_locale_t" >&6; }
11929 if test "$pgac_cv_type_locale_t" != no; then
11930
11931 $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
11932
11933 fi
11934 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
11935
11936 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
11937
11938 fi
11939
11940 ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
11941 #include <sys/param.h>
11942 #ifdef HAVE_SYS_UCRED_H
11943 #include <sys/ucred.h>
11944 #endif
11945 "
11946 if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
11947
11948 cat >>confdefs.h <<_ACEOF
11949 #define HAVE_STRUCT_CMSGCRED 1
11950 _ACEOF
11951
11952
11953 fi
11954
11955
11956 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
11957 #include <getopt.h>
11958 #endif
11959 "
11960 if test "x$ac_cv_type_struct_option" = xyes; then :
11961
11962 cat >>confdefs.h <<_ACEOF
11963 #define HAVE_STRUCT_OPTION 1
11964 _ACEOF
11965
11966
11967 fi
11968
11969
11970 if test "$with_zlib" = yes; then
11971   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
11972   # did not).  While we could work around the lack of z_streamp, it
11973   # seems unwise to encourage people to use such old zlib versions...
11974   ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
11975 "
11976 if test "x$ac_cv_type_z_streamp" = xyes; then :
11977
11978 else
11979   as_fn_error $? "zlib version is too old
11980 Use --without-zlib to disable zlib support." "$LINENO" 5
11981 fi
11982
11983 fi
11984
11985 # On PPC, check if assembler supports LWARX instruction's mutex hint bit
11986 case $host_cpu in
11987   ppc*|powerpc*)
11988     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports lwarx hint bit" >&5
11989 $as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
11990     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11991 /* end confdefs.h.  */
11992
11993 int
11994 main ()
11995 {
11996 int a = 0; int *p = &a; int r;
11997          __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
11998   ;
11999   return 0;
12000 }
12001 _ACEOF
12002 if ac_fn_c_try_compile "$LINENO"; then :
12003   pgac_cv_have_ppc_mutex_hint=yes
12004 else
12005   pgac_cv_have_ppc_mutex_hint=no
12006 fi
12007 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12008     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_ppc_mutex_hint" >&5
12009 $as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
12010     if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
12011
12012 $as_echo "#define HAVE_PPC_LWARX_MUTEX_HINT 1" >>confdefs.h
12013
12014     fi
12015   ;;
12016 esac
12017
12018 # Check largefile support.  You might think this is a system service not a
12019 # compiler characteristic, but you'd be wrong.  We must check this before
12020 # probing existence of related functions such as fseeko, since the largefile
12021 # defines can affect what is generated for that.
12022 if test "$PORTNAME" != "win32"; then
12023    # Check whether --enable-largefile was given.
12024 if test "${enable_largefile+set}" = set; then :
12025   enableval=$enable_largefile;
12026 fi
12027
12028 if test "$enable_largefile" != no; then
12029
12030   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
12031 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
12032 if ${ac_cv_sys_largefile_CC+:} false; then :
12033   $as_echo_n "(cached) " >&6
12034 else
12035   ac_cv_sys_largefile_CC=no
12036      if test "$GCC" != yes; then
12037        ac_save_CC=$CC
12038        while :; do
12039          # IRIX 6.2 and later do not support large files by default,
12040          # so use the C compiler's -n32 option if that helps.
12041          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12042 /* end confdefs.h.  */
12043 #include <sys/types.h>
12044  /* Check that off_t can represent 2**63 - 1 correctly.
12045     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12046     since some C++ compilers masquerading as C compilers
12047     incorrectly reject 9223372036854775807.  */
12048 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12049   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12050                        && LARGE_OFF_T % 2147483647 == 1)
12051                       ? 1 : -1];
12052 int
12053 main ()
12054 {
12055
12056   ;
12057   return 0;
12058 }
12059 _ACEOF
12060          if ac_fn_c_try_compile "$LINENO"; then :
12061   break
12062 fi
12063 rm -f core conftest.err conftest.$ac_objext
12064          CC="$CC -n32"
12065          if ac_fn_c_try_compile "$LINENO"; then :
12066   ac_cv_sys_largefile_CC=' -n32'; break
12067 fi
12068 rm -f core conftest.err conftest.$ac_objext
12069          break
12070        done
12071        CC=$ac_save_CC
12072        rm -f conftest.$ac_ext
12073     fi
12074 fi
12075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
12076 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
12077   if test "$ac_cv_sys_largefile_CC" != no; then
12078     CC=$CC$ac_cv_sys_largefile_CC
12079   fi
12080
12081   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12082 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
12083 if ${ac_cv_sys_file_offset_bits+:} false; then :
12084   $as_echo_n "(cached) " >&6
12085 else
12086   while :; do
12087   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12088 /* end confdefs.h.  */
12089 #include <sys/types.h>
12090  /* Check that off_t can represent 2**63 - 1 correctly.
12091     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12092     since some C++ compilers masquerading as C compilers
12093     incorrectly reject 9223372036854775807.  */
12094 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12095   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12096                        && LARGE_OFF_T % 2147483647 == 1)
12097                       ? 1 : -1];
12098 int
12099 main ()
12100 {
12101
12102   ;
12103   return 0;
12104 }
12105 _ACEOF
12106 if ac_fn_c_try_compile "$LINENO"; then :
12107   ac_cv_sys_file_offset_bits=no; break
12108 fi
12109 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12110   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12111 /* end confdefs.h.  */
12112 #define _FILE_OFFSET_BITS 64
12113 #include <sys/types.h>
12114  /* Check that off_t can represent 2**63 - 1 correctly.
12115     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12116     since some C++ compilers masquerading as C compilers
12117     incorrectly reject 9223372036854775807.  */
12118 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12119   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12120                        && LARGE_OFF_T % 2147483647 == 1)
12121                       ? 1 : -1];
12122 int
12123 main ()
12124 {
12125
12126   ;
12127   return 0;
12128 }
12129 _ACEOF
12130 if ac_fn_c_try_compile "$LINENO"; then :
12131   ac_cv_sys_file_offset_bits=64; break
12132 fi
12133 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12134   ac_cv_sys_file_offset_bits=unknown
12135   break
12136 done
12137 fi
12138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
12139 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
12140 case $ac_cv_sys_file_offset_bits in #(
12141   no | unknown) ;;
12142   *)
12143 cat >>confdefs.h <<_ACEOF
12144 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
12145 _ACEOF
12146 ;;
12147 esac
12148 rm -rf conftest*
12149   if test $ac_cv_sys_file_offset_bits = unknown; then
12150     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
12151 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
12152 if ${ac_cv_sys_large_files+:} false; then :
12153   $as_echo_n "(cached) " >&6
12154 else
12155   while :; do
12156   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12157 /* end confdefs.h.  */
12158 #include <sys/types.h>
12159  /* Check that off_t can represent 2**63 - 1 correctly.
12160     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12161     since some C++ compilers masquerading as C compilers
12162     incorrectly reject 9223372036854775807.  */
12163 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12164   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12165                        && LARGE_OFF_T % 2147483647 == 1)
12166                       ? 1 : -1];
12167 int
12168 main ()
12169 {
12170
12171   ;
12172   return 0;
12173 }
12174 _ACEOF
12175 if ac_fn_c_try_compile "$LINENO"; then :
12176   ac_cv_sys_large_files=no; break
12177 fi
12178 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12179   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12180 /* end confdefs.h.  */
12181 #define _LARGE_FILES 1
12182 #include <sys/types.h>
12183  /* Check that off_t can represent 2**63 - 1 correctly.
12184     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12185     since some C++ compilers masquerading as C compilers
12186     incorrectly reject 9223372036854775807.  */
12187 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12188   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12189                        && LARGE_OFF_T % 2147483647 == 1)
12190                       ? 1 : -1];
12191 int
12192 main ()
12193 {
12194
12195   ;
12196   return 0;
12197 }
12198 _ACEOF
12199 if ac_fn_c_try_compile "$LINENO"; then :
12200   ac_cv_sys_large_files=1; break
12201 fi
12202 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12203   ac_cv_sys_large_files=unknown
12204   break
12205 done
12206 fi
12207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
12208 $as_echo "$ac_cv_sys_large_files" >&6; }
12209 case $ac_cv_sys_large_files in #(
12210   no | unknown) ;;
12211   *)
12212 cat >>confdefs.h <<_ACEOF
12213 #define _LARGE_FILES $ac_cv_sys_large_files
12214 _ACEOF
12215 ;;
12216 esac
12217 rm -rf conftest*
12218   fi
12219
12220
12221 fi
12222
12223
12224 fi
12225
12226 # Check for largefile support (must be after AC_SYS_LARGEFILE)
12227 # The cast to long int works around a bug in the HP C Compiler
12228 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12229 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12230 # This bug is HP SR number 8606223364.
12231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
12232 $as_echo_n "checking size of off_t... " >&6; }
12233 if ${ac_cv_sizeof_off_t+:} false; then :
12234   $as_echo_n "(cached) " >&6
12235 else
12236   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :
12237
12238 else
12239   if test "$ac_cv_type_off_t" = yes; then
12240      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12241 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12242 as_fn_error 77 "cannot compute sizeof (off_t)
12243 See \`config.log' for more details" "$LINENO" 5; }
12244    else
12245      ac_cv_sizeof_off_t=0
12246    fi
12247 fi
12248
12249 fi
12250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
12251 $as_echo "$ac_cv_sizeof_off_t" >&6; }
12252
12253
12254
12255 cat >>confdefs.h <<_ACEOF
12256 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
12257 _ACEOF
12258
12259
12260
12261 # If we don't have largefile support, can't handle segsize >= 2GB.
12262 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
12263    as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
12264 fi
12265
12266
12267 ##
12268 ## Functions, global variables
12269 ##
12270
12271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
12272 $as_echo_n "checking for int timezone... " >&6; }
12273 if ${pgac_cv_var_int_timezone+:} false; then :
12274   $as_echo_n "(cached) " >&6
12275 else
12276   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12277 /* end confdefs.h.  */
12278 #include <time.h>
12279 int res;
12280 int
12281 main ()
12282 {
12283 #ifndef __CYGWIN__
12284 res = timezone / 60;
12285 #else
12286 res = _timezone / 60;
12287 #endif
12288   ;
12289   return 0;
12290 }
12291 _ACEOF
12292 if ac_fn_c_try_link "$LINENO"; then :
12293   pgac_cv_var_int_timezone=yes
12294 else
12295   pgac_cv_var_int_timezone=no
12296 fi
12297 rm -f core conftest.err conftest.$ac_objext \
12298     conftest$ac_exeext conftest.$ac_ext
12299 fi
12300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
12301 $as_echo "$pgac_cv_var_int_timezone" >&6; }
12302 if test x"$pgac_cv_var_int_timezone" = xyes ; then
12303
12304 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
12305
12306 fi
12307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for accept()" >&5
12308 $as_echo_n "checking types of arguments for accept()... " >&6; }
12309  if ${ac_cv_func_accept_return+:} false; then :
12310   $as_echo_n "(cached) " >&6
12311 else
12312    if ${ac_cv_func_accept_arg1+:} false; then :
12313   $as_echo_n "(cached) " >&6
12314 else
12315     if ${ac_cv_func_accept_arg2+:} false; then :
12316   $as_echo_n "(cached) " >&6
12317 else
12318      if ${ac_cv_func_accept_arg3+:} false; then :
12319   $as_echo_n "(cached) " >&6
12320 else
12321       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL' 'SOCKET WSAAPI'; do
12322       for ac_cv_func_accept_arg1 in 'int' 'unsigned int' 'SOCKET'; do
12323        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
12324         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
12325          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12326 /* end confdefs.h.  */
12327 #ifdef HAVE_SYS_TYPES_H
12328 #include <sys/types.h>
12329 #endif
12330 #ifdef HAVE_SYS_SOCKET_H
12331 #include <sys/socket.h>
12332 #endif
12333 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
12334 _ACEOF
12335 if ac_fn_c_try_compile "$LINENO"; then :
12336   ac_not_found=no; break 4
12337 else
12338   ac_not_found=yes
12339 fi
12340 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12341        done
12342       done
12343      done
12344     done
12345     if test "$ac_not_found" = yes; then
12346       as_fn_error $? "could not determine argument types" "$LINENO" 5
12347     fi
12348     if test "$ac_cv_func_accept_arg3" = "void"; then
12349       ac_cv_func_accept_arg3=int
12350     fi
12351
12352 fi
12353
12354 fi
12355
12356 fi
12357
12358 fi
12359  { $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
12360 $as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
12361
12362 cat >>confdefs.h <<_ACEOF
12363 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
12364 _ACEOF
12365
12366
12367 cat >>confdefs.h <<_ACEOF
12368 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
12369 _ACEOF
12370
12371
12372 cat >>confdefs.h <<_ACEOF
12373 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
12374 _ACEOF
12375
12376
12377 cat >>confdefs.h <<_ACEOF
12378 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
12379 _ACEOF
12380
12381
12382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
12383 $as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
12384 if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
12385   $as_echo_n "(cached) " >&6
12386 else
12387   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12388 /* end confdefs.h.  */
12389 #include <sys/time.h>
12390 int
12391 main ()
12392 {
12393 struct timeval *tp;
12394 struct timezone *tzp;
12395 gettimeofday(tp,tzp);
12396   ;
12397   return 0;
12398 }
12399 _ACEOF
12400 if ac_fn_c_try_compile "$LINENO"; then :
12401   pgac_cv_func_gettimeofday_1arg=no
12402 else
12403   pgac_cv_func_gettimeofday_1arg=yes
12404 fi
12405 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12406 fi
12407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5
12408 $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
12409 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
12410
12411 $as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
12412
12413 fi
12414
12415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcstombs_l declaration" >&5
12416 $as_echo_n "checking for wcstombs_l declaration... " >&6; }
12417 if ${pgac_cv_func_wcstombs_l+:} false; then :
12418   $as_echo_n "(cached) " >&6
12419 else
12420   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12421 /* end confdefs.h.  */
12422 #include <stdlib.h>
12423 #include <locale.h>
12424 int
12425 main ()
12426 {
12427 #ifndef wcstombs_l
12428 (void) wcstombs_l;
12429 #endif
12430   ;
12431   return 0;
12432 }
12433 _ACEOF
12434 if ac_fn_c_try_compile "$LINENO"; then :
12435   pgac_cv_func_wcstombs_l='yes'
12436 else
12437   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12438 /* end confdefs.h.  */
12439 #include <stdlib.h>
12440 #include <locale.h>
12441 #include <xlocale.h>
12442 int
12443 main ()
12444 {
12445 #ifndef wcstombs_l
12446 (void) wcstombs_l;
12447 #endif
12448   ;
12449   return 0;
12450 }
12451 _ACEOF
12452 if ac_fn_c_try_compile "$LINENO"; then :
12453   pgac_cv_func_wcstombs_l='yes (in xlocale.h)'
12454 else
12455   pgac_cv_func_wcstombs_l='no'
12456 fi
12457 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12458 fi
12459 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12460 fi
12461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_wcstombs_l" >&5
12462 $as_echo "$pgac_cv_func_wcstombs_l" >&6; }
12463 if test "$pgac_cv_func_wcstombs_l" = 'yes (in xlocale.h)'; then
12464
12465 $as_echo "#define WCSTOMBS_L_IN_XLOCALE 1" >>confdefs.h
12466
12467 fi
12468
12469 # Some versions of libedit contain strlcpy(), setproctitle(), and other
12470 # symbols that that library has no business exposing to the world.  Pending
12471 # acquisition of a clue by those developers, ignore libedit (including its
12472 # possible alias of libreadline) while checking for everything else.
12473 LIBS_including_readline="$LIBS"
12474 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
12475
12476 for ac_func in cbrt dlopen fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memmove poll pstat pthread_is_threaded_np readlink setproctitle setsid shm_open symlink sync_file_range towlower utime utimes wcstombs wcstombs_l
12477 do :
12478   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12479 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12480 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12481   cat >>confdefs.h <<_ACEOF
12482 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12483 _ACEOF
12484
12485 fi
12486 done
12487
12488
12489 ac_fn_c_check_func "$LINENO" "fseeko" "ac_cv_func_fseeko"
12490 if test "x$ac_cv_func_fseeko" = xyes; then :
12491   $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
12492
12493 else
12494   case " $LIBOBJS " in
12495   *" fseeko.$ac_objext "* ) ;;
12496   *) LIBOBJS="$LIBOBJS fseeko.$ac_objext"
12497  ;;
12498 esac
12499
12500 fi
12501
12502
12503 case $host_os in
12504         # NetBSD uses a custom fseeko/ftello built on fsetpos/fgetpos
12505         # Mingw uses macros to access Win32 API calls
12506         netbsd*|mingw*)
12507
12508 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
12509
12510                 ac_cv_func_fseeko=yes;;
12511         *)
12512                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
12513 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
12514 if ${ac_cv_sys_largefile_source+:} false; then :
12515   $as_echo_n "(cached) " >&6
12516 else
12517   while :; do
12518   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12519 /* end confdefs.h.  */
12520 #include <sys/types.h> /* for off_t */
12521      #include <stdio.h>
12522 int
12523 main ()
12524 {
12525 int (*fp) (FILE *, off_t, int) = fseeko;
12526      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
12527   ;
12528   return 0;
12529 }
12530 _ACEOF
12531 if ac_fn_c_try_link "$LINENO"; then :
12532   ac_cv_sys_largefile_source=no; break
12533 fi
12534 rm -f core conftest.err conftest.$ac_objext \
12535     conftest$ac_exeext conftest.$ac_ext
12536   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12537 /* end confdefs.h.  */
12538 #define _LARGEFILE_SOURCE 1
12539 #include <sys/types.h> /* for off_t */
12540      #include <stdio.h>
12541 int
12542 main ()
12543 {
12544 int (*fp) (FILE *, off_t, int) = fseeko;
12545      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
12546   ;
12547   return 0;
12548 }
12549 _ACEOF
12550 if ac_fn_c_try_link "$LINENO"; then :
12551   ac_cv_sys_largefile_source=1; break
12552 fi
12553 rm -f core conftest.err conftest.$ac_objext \
12554     conftest$ac_exeext conftest.$ac_ext
12555   ac_cv_sys_largefile_source=unknown
12556   break
12557 done
12558 fi
12559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
12560 $as_echo "$ac_cv_sys_largefile_source" >&6; }
12561 case $ac_cv_sys_largefile_source in #(
12562   no | unknown) ;;
12563   *)
12564 cat >>confdefs.h <<_ACEOF
12565 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
12566 _ACEOF
12567 ;;
12568 esac
12569 rm -rf conftest*
12570
12571 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
12572 # in glibc 2.1.3, but that breaks too many other things.
12573 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
12574 if test $ac_cv_sys_largefile_source != unknown; then
12575
12576 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
12577
12578 fi
12579 ;;
12580 esac
12581
12582 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
12583 # by calling it, 2009-04-02
12584 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
12585 if test "$PORTNAME" != "solaris"; then
12586 for ac_func in posix_fadvise
12587 do :
12588   ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
12589 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
12590   cat >>confdefs.h <<_ACEOF
12591 #define HAVE_POSIX_FADVISE 1
12592 _ACEOF
12593
12594 fi
12595 done
12596
12597 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
12598 "
12599 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
12600   ac_have_decl=1
12601 else
12602   ac_have_decl=0
12603 fi
12604
12605 cat >>confdefs.h <<_ACEOF
12606 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
12607 _ACEOF
12608
12609 fi
12610
12611 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
12612 "
12613 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
12614   ac_have_decl=1
12615 else
12616   ac_have_decl=0
12617 fi
12618
12619 cat >>confdefs.h <<_ACEOF
12620 #define HAVE_DECL_FDATASYNC $ac_have_decl
12621 _ACEOF
12622
12623 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
12624 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
12625   ac_have_decl=1
12626 else
12627   ac_have_decl=0
12628 fi
12629
12630 cat >>confdefs.h <<_ACEOF
12631 #define HAVE_DECL_STRLCAT $ac_have_decl
12632 _ACEOF
12633 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
12634 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
12635   ac_have_decl=1
12636 else
12637   ac_have_decl=0
12638 fi
12639
12640 cat >>confdefs.h <<_ACEOF
12641 #define HAVE_DECL_STRLCPY $ac_have_decl
12642 _ACEOF
12643
12644 # This is probably only present on Darwin, but may as well check always
12645 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
12646 "
12647 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
12648   ac_have_decl=1
12649 else
12650   ac_have_decl=0
12651 fi
12652
12653 cat >>confdefs.h <<_ACEOF
12654 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
12655 _ACEOF
12656
12657
12658 HAVE_IPV6=no
12659 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default
12660 #include <netinet/in.h>
12661 "
12662 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
12663
12664 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
12665
12666          HAVE_IPV6=yes
12667 fi
12668
12669
12670
12671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
12672 $as_echo_n "checking for PS_STRINGS... " >&6; }
12673 if ${pgac_cv_var_PS_STRINGS+:} false; then :
12674   $as_echo_n "(cached) " >&6
12675 else
12676   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12677 /* end confdefs.h.  */
12678 #include <machine/vmparam.h>
12679 #include <sys/exec.h>
12680
12681 int
12682 main ()
12683 {
12684 PS_STRINGS->ps_nargvstr = 1;
12685 PS_STRINGS->ps_argvstr = "foo";
12686   ;
12687   return 0;
12688 }
12689 _ACEOF
12690 if ac_fn_c_try_link "$LINENO"; then :
12691   pgac_cv_var_PS_STRINGS=yes
12692 else
12693   pgac_cv_var_PS_STRINGS=no
12694 fi
12695 rm -f core conftest.err conftest.$ac_objext \
12696     conftest$ac_exeext conftest.$ac_ext
12697 fi
12698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
12699 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
12700 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
12701
12702 $as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
12703
12704 fi
12705
12706
12707 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
12708 # is missing.  Yes, there are machines that have only one.  We may
12709 # also decide to use snprintf.c if snprintf() is present but does not
12710 # have all the features we need --- see below.
12711
12712 if test "$PORTNAME" = "win32"; then
12713   # Win32 gets snprintf.c built unconditionally.
12714   #
12715   # To properly translate all NLS languages strings, we must support the
12716   # *printf() %$ format, which allows *printf() arguments to be selected
12717   # by position in the translated string.
12718   #
12719   # libintl versions < 0.13 use the native *printf() functions, and Win32
12720   # *printf() doesn't understand %$, so we must use our /port versions,
12721   # which do understand %$. libintl versions >= 0.13 include their own
12722   # *printf versions on Win32.  The libintl 0.13 release note text is:
12723   #
12724   #   C format strings with positions, as they arise when a translator
12725   #   needs to reorder a sentence, are now supported on all platforms.
12726   #   On those few platforms (NetBSD and Woe32) for which the native
12727   #   printf()/fprintf()/... functions don't support such format
12728   #   strings, replacements are provided through <libintl.h>.
12729   #
12730   # We could use libintl >= 0.13's *printf() if we were sure that we had
12731   # a litint >= 0.13 at runtime, but seeing that there is no clean way
12732   # to guarantee that, it is best to just use our own, so we are sure to
12733   # get %$ support. In include/port.h we disable the *printf() macros
12734   # that might have been defined by libintl.
12735   #
12736   # We do this unconditionally whether NLS is used or not so we are sure
12737   # that all Win32 libraries and binaries behave the same.
12738   pgac_need_repl_snprintf=yes
12739 else
12740   pgac_need_repl_snprintf=no
12741   for ac_func in snprintf
12742 do :
12743   ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
12744 if test "x$ac_cv_func_snprintf" = xyes; then :
12745   cat >>confdefs.h <<_ACEOF
12746 #define HAVE_SNPRINTF 1
12747 _ACEOF
12748
12749 else
12750   pgac_need_repl_snprintf=yes
12751 fi
12752 done
12753
12754   for ac_func in vsnprintf
12755 do :
12756   ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
12757 if test "x$ac_cv_func_vsnprintf" = xyes; then :
12758   cat >>confdefs.h <<_ACEOF
12759 #define HAVE_VSNPRINTF 1
12760 _ACEOF
12761
12762 else
12763   pgac_need_repl_snprintf=yes
12764 fi
12765 done
12766
12767 fi
12768
12769
12770 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
12771 # include/c.h will provide declarations.  Note this is a separate test
12772 # from whether the functions exist in the C library --- there are
12773 # systems that have the functions but don't bother to declare them :-(
12774
12775 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
12776 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
12777   ac_have_decl=1
12778 else
12779   ac_have_decl=0
12780 fi
12781
12782 cat >>confdefs.h <<_ACEOF
12783 #define HAVE_DECL_SNPRINTF $ac_have_decl
12784 _ACEOF
12785 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
12786 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
12787   ac_have_decl=1
12788 else
12789   ac_have_decl=0
12790 fi
12791
12792 cat >>confdefs.h <<_ACEOF
12793 #define HAVE_DECL_VSNPRINTF $ac_have_decl
12794 _ACEOF
12795
12796
12797
12798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf" >&5
12799 $as_echo_n "checking for isinf... " >&6; }
12800 if ${ac_cv_func_isinf+:} false; then :
12801   $as_echo_n "(cached) " >&6
12802 else
12803   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12804 /* end confdefs.h.  */
12805
12806 #include <math.h>
12807 double glob_double;
12808
12809 int
12810 main ()
12811 {
12812 return isinf(glob_double) ? 0 : 1;
12813   ;
12814   return 0;
12815 }
12816 _ACEOF
12817 if ac_fn_c_try_link "$LINENO"; then :
12818   ac_cv_func_isinf=yes
12819 else
12820   ac_cv_func_isinf=no
12821 fi
12822 rm -f core conftest.err conftest.$ac_objext \
12823     conftest$ac_exeext conftest.$ac_ext
12824 fi
12825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_isinf" >&5
12826 $as_echo "$ac_cv_func_isinf" >&6; }
12827
12828 if test $ac_cv_func_isinf = yes ; then
12829
12830 $as_echo "#define HAVE_ISINF 1" >>confdefs.h
12831
12832 else
12833   case " $LIBOBJS " in
12834   *" isinf.$ac_objext "* ) ;;
12835   *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
12836  ;;
12837 esac
12838
12839   # Look for a way to implement a substitute for isinf()
12840   for ac_func in fpclass fp_class fp_class_d class
12841 do :
12842   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12843 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12844 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12845   cat >>confdefs.h <<_ACEOF
12846 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12847 _ACEOF
12848  break
12849 fi
12850 done
12851
12852 fi
12853
12854 ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
12855 if test "x$ac_cv_func_crypt" = xyes; then :
12856   $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
12857
12858 else
12859   case " $LIBOBJS " in
12860   *" crypt.$ac_objext "* ) ;;
12861   *) LIBOBJS="$LIBOBJS crypt.$ac_objext"
12862  ;;
12863 esac
12864
12865 fi
12866
12867 ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
12868 if test "x$ac_cv_func_fls" = xyes; then :
12869   $as_echo "#define HAVE_FLS 1" >>confdefs.h
12870
12871 else
12872   case " $LIBOBJS " in
12873   *" fls.$ac_objext "* ) ;;
12874   *) LIBOBJS="$LIBOBJS fls.$ac_objext"
12875  ;;
12876 esac
12877
12878 fi
12879
12880 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
12881 if test "x$ac_cv_func_getopt" = xyes; then :
12882   $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
12883
12884 else
12885   case " $LIBOBJS " in
12886   *" getopt.$ac_objext "* ) ;;
12887   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
12888  ;;
12889 esac
12890
12891 fi
12892
12893 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
12894 if test "x$ac_cv_func_getrusage" = xyes; then :
12895   $as_echo "#define HAVE_GETRUSAGE 1" >>confdefs.h
12896
12897 else
12898   case " $LIBOBJS " in
12899   *" getrusage.$ac_objext "* ) ;;
12900   *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
12901  ;;
12902 esac
12903
12904 fi
12905
12906 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
12907 if test "x$ac_cv_func_inet_aton" = xyes; then :
12908   $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
12909
12910 else
12911   case " $LIBOBJS " in
12912   *" inet_aton.$ac_objext "* ) ;;
12913   *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
12914  ;;
12915 esac
12916
12917 fi
12918
12919 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
12920 if test "x$ac_cv_func_mkdtemp" = xyes; then :
12921   $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
12922
12923 else
12924   case " $LIBOBJS " in
12925   *" mkdtemp.$ac_objext "* ) ;;
12926   *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
12927  ;;
12928 esac
12929
12930 fi
12931
12932 ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
12933 if test "x$ac_cv_func_random" = xyes; then :
12934   $as_echo "#define HAVE_RANDOM 1" >>confdefs.h
12935
12936 else
12937   case " $LIBOBJS " in
12938   *" random.$ac_objext "* ) ;;
12939   *) LIBOBJS="$LIBOBJS random.$ac_objext"
12940  ;;
12941 esac
12942
12943 fi
12944
12945 ac_fn_c_check_func "$LINENO" "rint" "ac_cv_func_rint"
12946 if test "x$ac_cv_func_rint" = xyes; then :
12947   $as_echo "#define HAVE_RINT 1" >>confdefs.h
12948
12949 else
12950   case " $LIBOBJS " in
12951   *" rint.$ac_objext "* ) ;;
12952   *) LIBOBJS="$LIBOBJS rint.$ac_objext"
12953  ;;
12954 esac
12955
12956 fi
12957
12958 ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
12959 if test "x$ac_cv_func_srandom" = xyes; then :
12960   $as_echo "#define HAVE_SRANDOM 1" >>confdefs.h
12961
12962 else
12963   case " $LIBOBJS " in
12964   *" srandom.$ac_objext "* ) ;;
12965   *) LIBOBJS="$LIBOBJS srandom.$ac_objext"
12966  ;;
12967 esac
12968
12969 fi
12970
12971 ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
12972 if test "x$ac_cv_func_strerror" = xyes; then :
12973   $as_echo "#define HAVE_STRERROR 1" >>confdefs.h
12974
12975 else
12976   case " $LIBOBJS " in
12977   *" strerror.$ac_objext "* ) ;;
12978   *) LIBOBJS="$LIBOBJS strerror.$ac_objext"
12979  ;;
12980 esac
12981
12982 fi
12983
12984 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
12985 if test "x$ac_cv_func_strlcat" = xyes; then :
12986   $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
12987
12988 else
12989   case " $LIBOBJS " in
12990   *" strlcat.$ac_objext "* ) ;;
12991   *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
12992  ;;
12993 esac
12994
12995 fi
12996
12997 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
12998 if test "x$ac_cv_func_strlcpy" = xyes; then :
12999   $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
13000
13001 else
13002   case " $LIBOBJS " in
13003   *" strlcpy.$ac_objext "* ) ;;
13004   *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
13005  ;;
13006 esac
13007
13008 fi
13009
13010
13011
13012 case $host_os in
13013
13014         # Windows uses a specialised env handler
13015         # and doesn't need a replacement getpeereid because it doesn't use
13016         # Unix sockets.
13017         mingw*)
13018
13019 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
13020
13021
13022 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
13023
13024                 ac_cv_func_unsetenv=yes
13025                 ac_cv_func_getpeereid=yes;;
13026         *)
13027                 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
13028 if test "x$ac_cv_func_unsetenv" = xyes; then :
13029   $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
13030
13031 else
13032   case " $LIBOBJS " in
13033   *" unsetenv.$ac_objext "* ) ;;
13034   *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext"
13035  ;;
13036 esac
13037
13038 fi
13039
13040 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
13041 if test "x$ac_cv_func_getpeereid" = xyes; then :
13042   $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
13043
13044 else
13045   case " $LIBOBJS " in
13046   *" getpeereid.$ac_objext "* ) ;;
13047   *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
13048  ;;
13049 esac
13050
13051 fi
13052
13053
13054                 ;;
13055 esac
13056
13057 # System's version of getaddrinfo(), if any, may be used only if we found
13058 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
13059 # We use only our own getaddrinfo.c on Windows, but it's time to revisit that.
13060 if test x"$ac_cv_type_struct_addrinfo" = xyes && \
13061    test "$PORTNAME" != "win32"; then
13062   ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
13063 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
13064   $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
13065
13066 else
13067   case " $LIBOBJS " in
13068   *" getaddrinfo.$ac_objext "* ) ;;
13069   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
13070  ;;
13071 esac
13072
13073 fi
13074
13075
13076 else
13077   case " $LIBOBJS " in
13078   *" getaddrinfo.$ac_objext "* ) ;;
13079   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
13080  ;;
13081 esac
13082
13083 fi
13084
13085 # Similarly, use system's getopt_long() only if system provides struct option.
13086 if test x"$ac_cv_type_struct_option" = xyes ; then
13087   ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
13088 if test "x$ac_cv_func_getopt_long" = xyes; then :
13089   $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
13090
13091 else
13092   case " $LIBOBJS " in
13093   *" getopt_long.$ac_objext "* ) ;;
13094   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
13095  ;;
13096 esac
13097
13098 fi
13099
13100
13101 else
13102   case " $LIBOBJS " in
13103   *" getopt_long.$ac_objext "* ) ;;
13104   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
13105  ;;
13106 esac
13107
13108 fi
13109
13110 # Solaris' getopt() doesn't do what we want for long options, so always use
13111 # our version on that platform.
13112 if test "$PORTNAME" = "solaris"; then
13113   case " $LIBOBJS " in
13114   *" getopt.$ac_objext "* ) ;;
13115   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
13116  ;;
13117 esac
13118
13119 fi
13120
13121 # mingw has adopted a GNU-centric interpretation of optind/optreset,
13122 # so always use our version on Windows.
13123 if test "$PORTNAME" = "win32"; then
13124   case " $LIBOBJS " in
13125   *" getopt.$ac_objext "* ) ;;
13126   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
13127  ;;
13128 esac
13129
13130   case " $LIBOBJS " in
13131   *" getopt_long.$ac_objext "* ) ;;
13132   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
13133  ;;
13134 esac
13135
13136 fi
13137
13138 # Win32 (really MinGW) support
13139 if test "$PORTNAME" = "win32"; then
13140   ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
13141 if test "x$ac_cv_func_gettimeofday" = xyes; then :
13142   $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
13143
13144 else
13145   case " $LIBOBJS " in
13146   *" gettimeofday.$ac_objext "* ) ;;
13147   *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
13148  ;;
13149 esac
13150
13151 fi
13152
13153
13154   case " $LIBOBJS " in
13155   *" dirmod.$ac_objext "* ) ;;
13156   *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
13157  ;;
13158 esac
13159
13160   case " $LIBOBJS " in
13161   *" kill.$ac_objext "* ) ;;
13162   *) LIBOBJS="$LIBOBJS kill.$ac_objext"
13163  ;;
13164 esac
13165
13166   case " $LIBOBJS " in
13167   *" open.$ac_objext "* ) ;;
13168   *) LIBOBJS="$LIBOBJS open.$ac_objext"
13169  ;;
13170 esac
13171
13172   case " $LIBOBJS " in
13173   *" system.$ac_objext "* ) ;;
13174   *) LIBOBJS="$LIBOBJS system.$ac_objext"
13175  ;;
13176 esac
13177
13178   case " $LIBOBJS " in
13179   *" win32env.$ac_objext "* ) ;;
13180   *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
13181  ;;
13182 esac
13183
13184   case " $LIBOBJS " in
13185   *" win32error.$ac_objext "* ) ;;
13186   *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
13187  ;;
13188 esac
13189
13190   case " $LIBOBJS " in
13191   *" win32security.$ac_objext "* ) ;;
13192   *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
13193  ;;
13194 esac
13195
13196   case " $LIBOBJS " in
13197   *" win32setlocale.$ac_objext "* ) ;;
13198   *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
13199  ;;
13200 esac
13201
13202
13203 $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
13204
13205   ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
13206 #define WIN32_LEAN_AND_MEAN
13207 #include <windows.h>
13208 #include <string.h>
13209 #include <dbghelp.h>
13210 "
13211 if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
13212
13213 cat >>confdefs.h <<_ACEOF
13214 #define HAVE_MINIDUMP_TYPE 1
13215 _ACEOF
13216
13217 pgac_minidump_type=yes
13218 else
13219   pgac_minidump_type=no
13220 fi
13221
13222 fi
13223 if test x"$pgac_minidump_type" = x"yes" ; then
13224   have_win32_dbghelp=yes
13225
13226 else
13227   have_win32_dbghelp=no
13228
13229 fi
13230
13231 # Cygwin needs only a bit of that
13232 if test "$PORTNAME" = "cygwin"; then
13233   case " $LIBOBJS " in
13234   *" dirmod.$ac_objext "* ) ;;
13235   *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
13236  ;;
13237 esac
13238
13239 fi
13240
13241 ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
13242 /* NetBSD declares sys_siglist in unistd.h.  */
13243 #ifdef HAVE_UNISTD_H
13244 # include <unistd.h>
13245 #endif
13246
13247 "
13248 if test "x$ac_cv_have_decl_sys_siglist" = xyes; then :
13249   ac_have_decl=1
13250 else
13251   ac_have_decl=0
13252 fi
13253
13254 cat >>confdefs.h <<_ACEOF
13255 #define HAVE_DECL_SYS_SIGLIST $ac_have_decl
13256 _ACEOF
13257
13258
13259 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
13260 if test "x$ac_cv_func_syslog" = xyes; then :
13261   ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
13262 if test "x$ac_cv_header_syslog_h" = xyes; then :
13263
13264 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
13265
13266 fi
13267
13268
13269 fi
13270
13271
13272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
13273 $as_echo_n "checking for opterr... " >&6; }
13274 if ${pgac_cv_var_int_opterr+:} false; then :
13275   $as_echo_n "(cached) " >&6
13276 else
13277   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13278 /* end confdefs.h.  */
13279 #include <unistd.h>
13280 int
13281 main ()
13282 {
13283 extern int opterr; opterr = 1;
13284   ;
13285   return 0;
13286 }
13287 _ACEOF
13288 if ac_fn_c_try_link "$LINENO"; then :
13289   pgac_cv_var_int_opterr=yes
13290 else
13291   pgac_cv_var_int_opterr=no
13292 fi
13293 rm -f core conftest.err conftest.$ac_objext \
13294     conftest$ac_exeext conftest.$ac_ext
13295 fi
13296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
13297 $as_echo "$pgac_cv_var_int_opterr" >&6; }
13298 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
13299
13300 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
13301
13302 fi
13303
13304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
13305 $as_echo_n "checking for optreset... " >&6; }
13306 if ${pgac_cv_var_int_optreset+:} false; then :
13307   $as_echo_n "(cached) " >&6
13308 else
13309   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13310 /* end confdefs.h.  */
13311 #include <unistd.h>
13312 int
13313 main ()
13314 {
13315 extern int optreset; optreset = 1;
13316   ;
13317   return 0;
13318 }
13319 _ACEOF
13320 if ac_fn_c_try_link "$LINENO"; then :
13321   pgac_cv_var_int_optreset=yes
13322 else
13323   pgac_cv_var_int_optreset=no
13324 fi
13325 rm -f core conftest.err conftest.$ac_objext \
13326     conftest$ac_exeext conftest.$ac_ext
13327 fi
13328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
13329 $as_echo "$pgac_cv_var_int_optreset" >&6; }
13330 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
13331
13332 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
13333
13334 fi
13335
13336 for ac_func in strtoll strtoq
13337 do :
13338   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13339 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13340 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13341   cat >>confdefs.h <<_ACEOF
13342 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13343 _ACEOF
13344  break
13345 fi
13346 done
13347
13348 for ac_func in strtoull strtouq
13349 do :
13350   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13351 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13352 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13353   cat >>confdefs.h <<_ACEOF
13354 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13355 _ACEOF
13356  break
13357 fi
13358 done
13359
13360
13361 # Lastly, restore full LIBS list and check for readline/libedit symbols
13362 LIBS="$LIBS_including_readline"
13363
13364 if test "$with_readline" = yes; then
13365   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_append_character" >&5
13366 $as_echo_n "checking for rl_completion_append_character... " >&6; }
13367 if ${pgac_cv_var_rl_completion_append_character+:} false; then :
13368   $as_echo_n "(cached) " >&6
13369 else
13370   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13371 /* end confdefs.h.  */
13372 #include <stdio.h>
13373 #ifdef HAVE_READLINE_READLINE_H
13374 # include <readline/readline.h>
13375 #elif defined(HAVE_READLINE_H)
13376 # include <readline.h>
13377 #endif
13378
13379 int
13380 main ()
13381 {
13382 rl_completion_append_character = 'x';
13383   ;
13384   return 0;
13385 }
13386 _ACEOF
13387 if ac_fn_c_try_link "$LINENO"; then :
13388   pgac_cv_var_rl_completion_append_character=yes
13389 else
13390   pgac_cv_var_rl_completion_append_character=no
13391 fi
13392 rm -f core conftest.err conftest.$ac_objext \
13393     conftest$ac_exeext conftest.$ac_ext
13394 fi
13395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_append_character" >&5
13396 $as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
13397 if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
13398
13399 $as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
13400
13401 fi
13402   for ac_func in rl_completion_matches rl_filename_completion_function rl_reset_screen_size
13403 do :
13404   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13405 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13406 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13407   cat >>confdefs.h <<_ACEOF
13408 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13409 _ACEOF
13410
13411 fi
13412 done
13413
13414   for ac_func in append_history history_truncate_file
13415 do :
13416   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13417 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13418 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13419   cat >>confdefs.h <<_ACEOF
13420 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13421 _ACEOF
13422
13423 fi
13424 done
13425
13426 fi
13427
13428
13429 # This test makes sure that run tests work at all.  Sometimes a shared
13430 # library is found by the linker, but the runtime linker can't find it.
13431 # This check should come after all modifications of compiler or linker
13432 # variables, and before any other run tests.
13433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
13434 $as_echo_n "checking test program... " >&6; }
13435 if test "$cross_compiling" = yes; then :
13436   { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
13437 $as_echo "cross-compiling" >&6; }
13438 else
13439   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13440 /* end confdefs.h.  */
13441 int main() { return 0; }
13442 _ACEOF
13443 if ac_fn_c_try_run "$LINENO"; then :
13444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
13445 $as_echo "ok" >&6; }
13446 else
13447   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
13448 $as_echo "failed" >&6; }
13449 as_fn_error $? "
13450 Could not execute a simple test program.  This may be a problem
13451 related to locating shared libraries.  Check the file 'config.log'
13452 for the exact reason." "$LINENO" 5
13453 fi
13454 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13455   conftest.$ac_objext conftest.beam conftest.$ac_ext
13456 fi
13457
13458
13459 # --------------------
13460 # Run tests below here
13461 # --------------------
13462
13463 # Force use of our snprintf if system's doesn't do arg control
13464 # See comment above at snprintf test for details.
13465 if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
13466   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports argument control" >&5
13467 $as_echo_n "checking whether snprintf supports argument control... " >&6; }
13468 if ${pgac_cv_snprintf_arg_control+:} false; then :
13469   $as_echo_n "(cached) " >&6
13470 else
13471   if test "$cross_compiling" = yes; then :
13472   pgac_cv_snprintf_arg_control=cross
13473 else
13474   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13475 /* end confdefs.h.  */
13476 #include <stdio.h>
13477 #include <string.h>
13478
13479 int main()
13480 {
13481   char buf[100];
13482
13483   /* can it swap arguments? */
13484   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
13485   if (strcmp(buf, "4 3") != 0)
13486     return 1;
13487   return 0;
13488 }
13489 _ACEOF
13490 if ac_fn_c_try_run "$LINENO"; then :
13491   pgac_cv_snprintf_arg_control=yes
13492 else
13493   pgac_cv_snprintf_arg_control=no
13494 fi
13495 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13496   conftest.$ac_objext conftest.beam conftest.$ac_ext
13497 fi
13498
13499
13500 fi
13501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_arg_control" >&5
13502 $as_echo "$pgac_cv_snprintf_arg_control" >&6; }
13503
13504   if test $pgac_cv_snprintf_arg_control != yes ; then
13505     pgac_need_repl_snprintf=yes
13506   fi
13507 fi
13508
13509
13510
13511
13512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
13513 $as_echo_n "checking whether long int is 64 bits... " >&6; }
13514 if ${pgac_cv_type_long_int_64+:} false; then :
13515   $as_echo_n "(cached) " >&6
13516 else
13517   if test "$cross_compiling" = yes; then :
13518   # If cross-compiling, check the size reported by the compiler and
13519 # trust that the arithmetic works.
13520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13521 /* end confdefs.h.  */
13522
13523 int
13524 main ()
13525 {
13526 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
13527 test_array [0] = 0;
13528 return test_array [0];
13529
13530   ;
13531   return 0;
13532 }
13533 _ACEOF
13534 if ac_fn_c_try_compile "$LINENO"; then :
13535   pgac_cv_type_long_int_64=yes
13536 else
13537   pgac_cv_type_long_int_64=no
13538 fi
13539 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13540 else
13541   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13542 /* end confdefs.h.  */
13543 typedef long int ac_int64;
13544
13545 /*
13546  * These are globals to discourage the compiler from folding all the
13547  * arithmetic tests down to compile-time constants.
13548  */
13549 ac_int64 a = 20000001;
13550 ac_int64 b = 40000005;
13551
13552 int does_int64_work()
13553 {
13554   ac_int64 c,d;
13555
13556   if (sizeof(ac_int64) != 8)
13557     return 0;                   /* definitely not the right size */
13558
13559   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
13560   c = a * b;
13561   d = (c + b) / b;
13562   if (d != a+1)
13563     return 0;
13564   return 1;
13565 }
13566 main() {
13567   exit(! does_int64_work());
13568 }
13569 _ACEOF
13570 if ac_fn_c_try_run "$LINENO"; then :
13571   pgac_cv_type_long_int_64=yes
13572 else
13573   pgac_cv_type_long_int_64=no
13574 fi
13575 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13576   conftest.$ac_objext conftest.beam conftest.$ac_ext
13577 fi
13578
13579 fi
13580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
13581 $as_echo "$pgac_cv_type_long_int_64" >&6; }
13582
13583 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
13584 if test x"$pgac_cv_type_long_int_64" = xyes ; then
13585
13586 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
13587
13588 fi
13589
13590
13591 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
13592   pg_int64_type="long int"
13593 else
13594   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
13595 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
13596 if ${pgac_cv_type_long_long_int_64+:} false; then :
13597   $as_echo_n "(cached) " >&6
13598 else
13599   if test "$cross_compiling" = yes; then :
13600   # If cross-compiling, check the size reported by the compiler and
13601 # trust that the arithmetic works.
13602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13603 /* end confdefs.h.  */
13604
13605 int
13606 main ()
13607 {
13608 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
13609 test_array [0] = 0;
13610 return test_array [0];
13611
13612   ;
13613   return 0;
13614 }
13615 _ACEOF
13616 if ac_fn_c_try_compile "$LINENO"; then :
13617   pgac_cv_type_long_long_int_64=yes
13618 else
13619   pgac_cv_type_long_long_int_64=no
13620 fi
13621 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13622 else
13623   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13624 /* end confdefs.h.  */
13625 typedef long long int ac_int64;
13626
13627 /*
13628  * These are globals to discourage the compiler from folding all the
13629  * arithmetic tests down to compile-time constants.
13630  */
13631 ac_int64 a = 20000001;
13632 ac_int64 b = 40000005;
13633
13634 int does_int64_work()
13635 {
13636   ac_int64 c,d;
13637
13638   if (sizeof(ac_int64) != 8)
13639     return 0;                   /* definitely not the right size */
13640
13641   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
13642   c = a * b;
13643   d = (c + b) / b;
13644   if (d != a+1)
13645     return 0;
13646   return 1;
13647 }
13648 main() {
13649   exit(! does_int64_work());
13650 }
13651 _ACEOF
13652 if ac_fn_c_try_run "$LINENO"; then :
13653   pgac_cv_type_long_long_int_64=yes
13654 else
13655   pgac_cv_type_long_long_int_64=no
13656 fi
13657 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13658   conftest.$ac_objext conftest.beam conftest.$ac_ext
13659 fi
13660
13661 fi
13662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
13663 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
13664
13665 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
13666 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
13667
13668 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
13669
13670 fi
13671
13672   if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
13673     pg_int64_type="long long int"
13674   else
13675     as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
13676   fi
13677 fi
13678
13679
13680 cat >>confdefs.h <<_ACEOF
13681 #define PG_INT64_TYPE $pg_int64_type
13682 _ACEOF
13683
13684
13685
13686 if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
13687   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13688 /* end confdefs.h.  */
13689
13690 #define INT64CONST(x)  x##LL
13691 long long int foo = INT64CONST(0x1234567890123456);
13692
13693 _ACEOF
13694 if ac_fn_c_try_compile "$LINENO"; then :
13695
13696 $as_echo "#define HAVE_LL_CONSTANTS 1" >>confdefs.h
13697
13698 fi
13699 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13700 fi
13701
13702
13703 # If we found "long int" is 64 bits, assume snprintf handles it.  If
13704 # we found we need to use "long long int", better check.  We cope with
13705 # snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
13706 # work, fall back to our own snprintf emulation (which we know uses %lld).
13707
13708 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
13709   if test $pgac_need_repl_snprintf = no; then
13710     { $as_echo "$as_me:${as_lineno-$LINENO}: checking snprintf length modifier for long long int" >&5
13711 $as_echo_n "checking snprintf length modifier for long long int... " >&6; }
13712 if ${pgac_cv_snprintf_long_long_int_modifier+:} false; then :
13713   $as_echo_n "(cached) " >&6
13714 else
13715   for pgac_modifier in 'll' 'q' 'I64'; do
13716 if test "$cross_compiling" = yes; then :
13717   pgac_cv_snprintf_long_long_int_modifier=cross; break
13718 else
13719   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13720 /* end confdefs.h.  */
13721 #include <stdio.h>
13722 typedef long long int ac_int64;
13723 #define INT64_FORMAT "%${pgac_modifier}d"
13724
13725 ac_int64 a = 20000001;
13726 ac_int64 b = 40000005;
13727
13728 int does_int64_snprintf_work()
13729 {
13730   ac_int64 c;
13731   char buf[100];
13732
13733   if (sizeof(ac_int64) != 8)
13734     return 0;                   /* doesn't look like the right size */
13735
13736   c = a * b;
13737   snprintf(buf, 100, INT64_FORMAT, c);
13738   if (strcmp(buf, "800000140000005") != 0)
13739     return 0;                   /* either multiply or snprintf is busted */
13740   return 1;
13741 }
13742 main() {
13743   exit(! does_int64_snprintf_work());
13744 }
13745 _ACEOF
13746 if ac_fn_c_try_run "$LINENO"; then :
13747   pgac_cv_snprintf_long_long_int_modifier=$pgac_modifier; break
13748 fi
13749 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13750   conftest.$ac_objext conftest.beam conftest.$ac_ext
13751 fi
13752
13753 done
13754 fi
13755
13756 LONG_LONG_INT_MODIFIER=''
13757
13758 case $pgac_cv_snprintf_long_long_int_modifier in
13759   cross) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot test (not on host machine)" >&5
13760 $as_echo "cannot test (not on host machine)" >&6; };;
13761   ?*)    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_long_long_int_modifier" >&5
13762 $as_echo "$pgac_cv_snprintf_long_long_int_modifier" >&6; }
13763          LONG_LONG_INT_MODIFIER=$pgac_cv_snprintf_long_long_int_modifier;;
13764   *)     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13765 $as_echo "none" >&6; };;
13766 esac
13767     if test "$LONG_LONG_INT_MODIFIER" = ""; then
13768       # Force usage of our own snprintf, since system snprintf is broken
13769       pgac_need_repl_snprintf=yes
13770       LONG_LONG_INT_MODIFIER='ll'
13771     fi
13772   else
13773     # Here if we previously decided we needed to use our own snprintf
13774     LONG_LONG_INT_MODIFIER='ll'
13775   fi
13776 else
13777   # Here if we are not using 'long long int' at all
13778   LONG_LONG_INT_MODIFIER='l'
13779 fi
13780
13781 INT64_MODIFIER="\"$LONG_LONG_INT_MODIFIER\""
13782
13783
13784 cat >>confdefs.h <<_ACEOF
13785 #define INT64_MODIFIER $INT64_MODIFIER
13786 _ACEOF
13787
13788
13789 # Also force use of our snprintf if the system's doesn't support the %z flag.
13790 if test "$pgac_need_repl_snprintf" = no; then
13791   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports the %z modifier" >&5
13792 $as_echo_n "checking whether snprintf supports the %z modifier... " >&6; }
13793 if ${pgac_cv_snprintf_size_t_support+:} false; then :
13794   $as_echo_n "(cached) " >&6
13795 else
13796   if test "$cross_compiling" = yes; then :
13797   pgac_cv_snprintf_size_t_support=cross
13798 else
13799   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13800 /* end confdefs.h.  */
13801 #include <stdio.h>
13802 #include <string.h>
13803
13804 int main()
13805 {
13806   char bufz[100];
13807   char buf64[100];
13808
13809   /*
13810    * Print the largest unsigned number fitting in a size_t using both %zu
13811    * and the previously-determined format for 64-bit integers.  Note that
13812    * we don't run this code unless we know snprintf handles 64-bit ints.
13813    */
13814   bufz[0] = '\0';  /* in case snprintf fails to emit anything */
13815   snprintf(bufz, sizeof(bufz), "%zu", ~((size_t) 0));
13816   snprintf(buf64, sizeof(buf64), "%" INT64_MODIFIER "u",
13817     (unsigned PG_INT64_TYPE) ~((size_t) 0));
13818   if (strcmp(bufz, buf64) != 0)
13819     return 1;
13820   return 0;
13821 }
13822 _ACEOF
13823 if ac_fn_c_try_run "$LINENO"; then :
13824   pgac_cv_snprintf_size_t_support=yes
13825 else
13826   pgac_cv_snprintf_size_t_support=no
13827 fi
13828 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13829   conftest.$ac_objext conftest.beam conftest.$ac_ext
13830 fi
13831
13832
13833 fi
13834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_size_t_support" >&5
13835 $as_echo "$pgac_cv_snprintf_size_t_support" >&6; }
13836
13837   if test "$pgac_cv_snprintf_size_t_support" != yes; then
13838     pgac_need_repl_snprintf=yes
13839   fi
13840 fi
13841
13842 # Now we have checked all the reasons to replace snprintf
13843 if test $pgac_need_repl_snprintf = yes; then
13844
13845 $as_echo "#define USE_REPL_SNPRINTF 1" >>confdefs.h
13846
13847   case " $LIBOBJS " in
13848   *" snprintf.$ac_objext "* ) ;;
13849   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
13850  ;;
13851 esac
13852
13853 fi
13854
13855 # Check size of void *, size_t (enables tweaks for > 32bit address space)
13856 # The cast to long int works around a bug in the HP C Compiler
13857 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13858 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13859 # This bug is HP SR number 8606223364.
13860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
13861 $as_echo_n "checking size of void *... " >&6; }
13862 if ${ac_cv_sizeof_void_p+:} false; then :
13863   $as_echo_n "(cached) " >&6
13864 else
13865   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
13866
13867 else
13868   if test "$ac_cv_type_void_p" = yes; then
13869      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13870 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13871 as_fn_error 77 "cannot compute sizeof (void *)
13872 See \`config.log' for more details" "$LINENO" 5; }
13873    else
13874      ac_cv_sizeof_void_p=0
13875    fi
13876 fi
13877
13878 fi
13879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
13880 $as_echo "$ac_cv_sizeof_void_p" >&6; }
13881
13882
13883
13884 cat >>confdefs.h <<_ACEOF
13885 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
13886 _ACEOF
13887
13888
13889 # The cast to long int works around a bug in the HP C Compiler
13890 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13891 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13892 # This bug is HP SR number 8606223364.
13893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
13894 $as_echo_n "checking size of size_t... " >&6; }
13895 if ${ac_cv_sizeof_size_t+:} false; then :
13896   $as_echo_n "(cached) " >&6
13897 else
13898   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
13899
13900 else
13901   if test "$ac_cv_type_size_t" = yes; then
13902      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13903 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13904 as_fn_error 77 "cannot compute sizeof (size_t)
13905 See \`config.log' for more details" "$LINENO" 5; }
13906    else
13907      ac_cv_sizeof_size_t=0
13908    fi
13909 fi
13910
13911 fi
13912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
13913 $as_echo "$ac_cv_sizeof_size_t" >&6; }
13914
13915
13916
13917 cat >>confdefs.h <<_ACEOF
13918 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
13919 _ACEOF
13920
13921
13922 # The cast to long int works around a bug in the HP C Compiler
13923 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13924 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13925 # This bug is HP SR number 8606223364.
13926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
13927 $as_echo_n "checking size of long... " >&6; }
13928 if ${ac_cv_sizeof_long+:} false; then :
13929   $as_echo_n "(cached) " >&6
13930 else
13931   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
13932
13933 else
13934   if test "$ac_cv_type_long" = yes; then
13935      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13936 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13937 as_fn_error 77 "cannot compute sizeof (long)
13938 See \`config.log' for more details" "$LINENO" 5; }
13939    else
13940      ac_cv_sizeof_long=0
13941    fi
13942 fi
13943
13944 fi
13945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
13946 $as_echo "$ac_cv_sizeof_long" >&6; }
13947
13948
13949
13950 cat >>confdefs.h <<_ACEOF
13951 #define SIZEOF_LONG $ac_cv_sizeof_long
13952 _ACEOF
13953
13954
13955
13956 # Decide whether float4 is passed by value: user-selectable, enabled by default
13957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float4 passed by value" >&5
13958 $as_echo_n "checking whether to build with float4 passed by value... " >&6; }
13959
13960
13961 # Check whether --enable-float4-byval was given.
13962 if test "${enable_float4_byval+set}" = set; then :
13963   enableval=$enable_float4_byval;
13964   case $enableval in
13965     yes)
13966
13967 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
13968
13969                float4passbyval=true
13970       ;;
13971     no)
13972       float4passbyval=false
13973       ;;
13974     *)
13975       as_fn_error $? "no argument expected for --enable-float4-byval option" "$LINENO" 5
13976       ;;
13977   esac
13978
13979 else
13980   enable_float4_byval=yes
13981
13982 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
13983
13984                float4passbyval=true
13985 fi
13986
13987
13988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float4_byval" >&5
13989 $as_echo "$enable_float4_byval" >&6; }
13990
13991 cat >>confdefs.h <<_ACEOF
13992 #define FLOAT4PASSBYVAL $float4passbyval
13993 _ACEOF
13994
13995
13996 # Decide whether float8 is passed by value.
13997 # Note: this setting also controls int8 and related types such as timestamp.
13998 # If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
13999 # If not, trying to select it is an error.
14000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float8 passed by value" >&5
14001 $as_echo_n "checking whether to build with float8 passed by value... " >&6; }
14002 if test $ac_cv_sizeof_void_p -ge 8 ; then
14003
14004
14005 # Check whether --enable-float8-byval was given.
14006 if test "${enable_float8_byval+set}" = set; then :
14007   enableval=$enable_float8_byval;
14008   case $enableval in
14009     yes)
14010       :
14011       ;;
14012     no)
14013       :
14014       ;;
14015     *)
14016       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
14017       ;;
14018   esac
14019
14020 else
14021   enable_float8_byval=yes
14022
14023 fi
14024
14025
14026 else
14027
14028
14029 # Check whether --enable-float8-byval was given.
14030 if test "${enable_float8_byval+set}" = set; then :
14031   enableval=$enable_float8_byval;
14032   case $enableval in
14033     yes)
14034       :
14035       ;;
14036     no)
14037       :
14038       ;;
14039     *)
14040       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
14041       ;;
14042   esac
14043
14044 else
14045   enable_float8_byval=no
14046
14047 fi
14048
14049
14050   if test "$enable_float8_byval" = yes ; then
14051     as_fn_error $? "--enable-float8-byval is not supported on 32-bit platforms." "$LINENO" 5
14052   fi
14053 fi
14054 if test "$enable_float8_byval" = yes ; then
14055
14056 $as_echo "#define USE_FLOAT8_BYVAL 1" >>confdefs.h
14057
14058   float8passbyval=true
14059 else
14060   float8passbyval=false
14061 fi
14062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float8_byval" >&5
14063 $as_echo "$enable_float8_byval" >&6; }
14064
14065 cat >>confdefs.h <<_ACEOF
14066 #define FLOAT8PASSBYVAL $float8passbyval
14067 _ACEOF
14068
14069
14070 # Determine memory alignment requirements for the basic C data types.
14071
14072 # The cast to long int works around a bug in the HP C Compiler,
14073 # see AC_CHECK_SIZEOF for more information.
14074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
14075 $as_echo_n "checking alignment of short... " >&6; }
14076 if ${ac_cv_alignof_short+:} false; then :
14077   $as_echo_n "(cached) " >&6
14078 else
14079   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short"        "$ac_includes_default
14080 #ifndef offsetof
14081 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14082 #endif
14083 typedef struct { char x; short y; } ac__type_alignof_;"; then :
14084
14085 else
14086   if test "$ac_cv_type_short" = yes; then
14087      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14088 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14089 as_fn_error 77 "cannot compute alignment of short
14090 See \`config.log' for more details" "$LINENO" 5; }
14091    else
14092      ac_cv_alignof_short=0
14093    fi
14094 fi
14095
14096 fi
14097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
14098 $as_echo "$ac_cv_alignof_short" >&6; }
14099
14100
14101
14102 cat >>confdefs.h <<_ACEOF
14103 #define ALIGNOF_SHORT $ac_cv_alignof_short
14104 _ACEOF
14105
14106
14107 # The cast to long int works around a bug in the HP C Compiler,
14108 # see AC_CHECK_SIZEOF for more information.
14109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
14110 $as_echo_n "checking alignment of int... " >&6; }
14111 if ${ac_cv_alignof_int+:} false; then :
14112   $as_echo_n "(cached) " >&6
14113 else
14114   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int"        "$ac_includes_default
14115 #ifndef offsetof
14116 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14117 #endif
14118 typedef struct { char x; int y; } ac__type_alignof_;"; then :
14119
14120 else
14121   if test "$ac_cv_type_int" = yes; then
14122      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14123 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14124 as_fn_error 77 "cannot compute alignment of int
14125 See \`config.log' for more details" "$LINENO" 5; }
14126    else
14127      ac_cv_alignof_int=0
14128    fi
14129 fi
14130
14131 fi
14132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
14133 $as_echo "$ac_cv_alignof_int" >&6; }
14134
14135
14136
14137 cat >>confdefs.h <<_ACEOF
14138 #define ALIGNOF_INT $ac_cv_alignof_int
14139 _ACEOF
14140
14141
14142 # The cast to long int works around a bug in the HP C Compiler,
14143 # see AC_CHECK_SIZEOF for more information.
14144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
14145 $as_echo_n "checking alignment of long... " >&6; }
14146 if ${ac_cv_alignof_long+:} false; then :
14147   $as_echo_n "(cached) " >&6
14148 else
14149   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long"        "$ac_includes_default
14150 #ifndef offsetof
14151 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14152 #endif
14153 typedef struct { char x; long y; } ac__type_alignof_;"; then :
14154
14155 else
14156   if test "$ac_cv_type_long" = yes; then
14157      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14158 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14159 as_fn_error 77 "cannot compute alignment of long
14160 See \`config.log' for more details" "$LINENO" 5; }
14161    else
14162      ac_cv_alignof_long=0
14163    fi
14164 fi
14165
14166 fi
14167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
14168 $as_echo "$ac_cv_alignof_long" >&6; }
14169
14170
14171
14172 cat >>confdefs.h <<_ACEOF
14173 #define ALIGNOF_LONG $ac_cv_alignof_long
14174 _ACEOF
14175
14176
14177 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
14178   # The cast to long int works around a bug in the HP C Compiler,
14179 # see AC_CHECK_SIZEOF for more information.
14180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
14181 $as_echo_n "checking alignment of long long int... " >&6; }
14182 if ${ac_cv_alignof_long_long_int+:} false; then :
14183   $as_echo_n "(cached) " >&6
14184 else
14185   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int"        "$ac_includes_default
14186 #ifndef offsetof
14187 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14188 #endif
14189 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
14190
14191 else
14192   if test "$ac_cv_type_long_long_int" = yes; then
14193      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14194 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14195 as_fn_error 77 "cannot compute alignment of long long int
14196 See \`config.log' for more details" "$LINENO" 5; }
14197    else
14198      ac_cv_alignof_long_long_int=0
14199    fi
14200 fi
14201
14202 fi
14203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
14204 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
14205
14206
14207
14208 cat >>confdefs.h <<_ACEOF
14209 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
14210 _ACEOF
14211
14212
14213 fi
14214 # The cast to long int works around a bug in the HP C Compiler,
14215 # see AC_CHECK_SIZEOF for more information.
14216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
14217 $as_echo_n "checking alignment of double... " >&6; }
14218 if ${ac_cv_alignof_double+:} false; then :
14219   $as_echo_n "(cached) " >&6
14220 else
14221   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double"        "$ac_includes_default
14222 #ifndef offsetof
14223 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14224 #endif
14225 typedef struct { char x; double y; } ac__type_alignof_;"; then :
14226
14227 else
14228   if test "$ac_cv_type_double" = yes; then
14229      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14230 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14231 as_fn_error 77 "cannot compute alignment of double
14232 See \`config.log' for more details" "$LINENO" 5; }
14233    else
14234      ac_cv_alignof_double=0
14235    fi
14236 fi
14237
14238 fi
14239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
14240 $as_echo "$ac_cv_alignof_double" >&6; }
14241
14242
14243
14244 cat >>confdefs.h <<_ACEOF
14245 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
14246 _ACEOF
14247
14248
14249
14250 # Compute maximum alignment of any basic type.
14251 # We assume long's alignment is at least as strong as char, short, or int;
14252 # but we must check long long (if it exists) and double.
14253
14254 MAX_ALIGNOF=$ac_cv_alignof_long
14255 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
14256   MAX_ALIGNOF=$ac_cv_alignof_double
14257 fi
14258 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
14259   MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
14260 fi
14261
14262 cat >>confdefs.h <<_ACEOF
14263 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
14264 _ACEOF
14265
14266
14267
14268 # Some platforms predefine the types int8, int16, etc.  Only check
14269 # a (hopefully) representative subset.
14270 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
14271 "
14272 if test "x$ac_cv_type_int8" = xyes; then :
14273
14274 cat >>confdefs.h <<_ACEOF
14275 #define HAVE_INT8 1
14276 _ACEOF
14277
14278
14279 fi
14280 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
14281 "
14282 if test "x$ac_cv_type_uint8" = xyes; then :
14283
14284 cat >>confdefs.h <<_ACEOF
14285 #define HAVE_UINT8 1
14286 _ACEOF
14287
14288
14289 fi
14290 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
14291 "
14292 if test "x$ac_cv_type_int64" = xyes; then :
14293
14294 cat >>confdefs.h <<_ACEOF
14295 #define HAVE_INT64 1
14296 _ACEOF
14297
14298
14299 fi
14300 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
14301 "
14302 if test "x$ac_cv_type_uint64" = xyes; then :
14303
14304 cat >>confdefs.h <<_ACEOF
14305 #define HAVE_UINT64 1
14306 _ACEOF
14307
14308
14309 fi
14310
14311
14312 # Check for extensions offering the integer scalar type __int128.
14313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
14314 $as_echo_n "checking for __int128... " >&6; }
14315 if ${pgac_cv__128bit_int+:} false; then :
14316   $as_echo_n "(cached) " >&6
14317 else
14318   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14319 /* end confdefs.h.  */
14320
14321 /*
14322  * These are globals to discourage the compiler from folding all the
14323  * arithmetic tests down to compile-time constants.  We do not have
14324  * convenient support for 64bit literals at this point...
14325  */
14326 __int128 a = 48828125;
14327 __int128 b = 97656255;
14328
14329 int
14330 main ()
14331 {
14332
14333 __int128 c,d;
14334 a = (a << 12) + 1; /* 200000000001 */
14335 b = (b << 12) + 5; /* 400000000005 */
14336 /* use the most relevant arithmetic ops */
14337 c = a * b;
14338 d = (c + b) / b;
14339 /* return different values, to prevent optimizations */
14340 if (d != a+1)
14341   return 0;
14342 return 1;
14343
14344   ;
14345   return 0;
14346 }
14347 _ACEOF
14348 if ac_fn_c_try_link "$LINENO"; then :
14349   pgac_cv__128bit_int=yes
14350 else
14351   pgac_cv__128bit_int=no
14352 fi
14353 rm -f core conftest.err conftest.$ac_objext \
14354     conftest$ac_exeext conftest.$ac_ext
14355 fi
14356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
14357 $as_echo "$pgac_cv__128bit_int" >&6; }
14358 if test x"$pgac_cv__128bit_int" = xyes ; then
14359
14360 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
14361
14362 fi
14363
14364 # Check for various atomic operations now that we have checked how to declare
14365 # 64bit integers.
14366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
14367 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
14368 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
14369   $as_echo_n "(cached) " >&6
14370 else
14371   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14372 /* end confdefs.h.  */
14373
14374 int
14375 main ()
14376 {
14377 char lock = 0;
14378    __sync_lock_test_and_set(&lock, 1);
14379    __sync_lock_release(&lock);
14380   ;
14381   return 0;
14382 }
14383 _ACEOF
14384 if ac_fn_c_try_link "$LINENO"; then :
14385   pgac_cv_gcc_sync_char_tas="yes"
14386 else
14387   pgac_cv_gcc_sync_char_tas="no"
14388 fi
14389 rm -f core conftest.err conftest.$ac_objext \
14390     conftest$ac_exeext conftest.$ac_ext
14391 fi
14392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
14393 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
14394 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
14395
14396 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
14397
14398 fi
14399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
14400 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
14401 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
14402   $as_echo_n "(cached) " >&6
14403 else
14404   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14405 /* end confdefs.h.  */
14406
14407 int
14408 main ()
14409 {
14410 int lock = 0;
14411    __sync_lock_test_and_set(&lock, 1);
14412    __sync_lock_release(&lock);
14413   ;
14414   return 0;
14415 }
14416 _ACEOF
14417 if ac_fn_c_try_link "$LINENO"; then :
14418   pgac_cv_gcc_sync_int32_tas="yes"
14419 else
14420   pgac_cv_gcc_sync_int32_tas="no"
14421 fi
14422 rm -f core conftest.err conftest.$ac_objext \
14423     conftest$ac_exeext conftest.$ac_ext
14424 fi
14425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
14426 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
14427 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
14428
14429 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
14430
14431 fi
14432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
14433 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
14434 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
14435   $as_echo_n "(cached) " >&6
14436 else
14437   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14438 /* end confdefs.h.  */
14439
14440 int
14441 main ()
14442 {
14443 int val = 0;
14444    __sync_val_compare_and_swap(&val, 0, 37);
14445   ;
14446   return 0;
14447 }
14448 _ACEOF
14449 if ac_fn_c_try_link "$LINENO"; then :
14450   pgac_cv_gcc_sync_int32_cas="yes"
14451 else
14452   pgac_cv_gcc_sync_int32_cas="no"
14453 fi
14454 rm -f core conftest.err conftest.$ac_objext \
14455     conftest$ac_exeext conftest.$ac_ext
14456 fi
14457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
14458 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
14459 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
14460
14461 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
14462
14463 fi
14464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
14465 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
14466 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
14467   $as_echo_n "(cached) " >&6
14468 else
14469   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14470 /* end confdefs.h.  */
14471
14472 int
14473 main ()
14474 {
14475 PG_INT64_TYPE lock = 0;
14476    __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
14477   ;
14478   return 0;
14479 }
14480 _ACEOF
14481 if ac_fn_c_try_link "$LINENO"; then :
14482   pgac_cv_gcc_sync_int64_cas="yes"
14483 else
14484   pgac_cv_gcc_sync_int64_cas="no"
14485 fi
14486 rm -f core conftest.err conftest.$ac_objext \
14487     conftest$ac_exeext conftest.$ac_ext
14488 fi
14489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
14490 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
14491 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
14492
14493 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
14494
14495 fi
14496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
14497 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
14498 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
14499   $as_echo_n "(cached) " >&6
14500 else
14501   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14502 /* end confdefs.h.  */
14503
14504 int
14505 main ()
14506 {
14507 int val = 0;
14508    int expect = 0;
14509    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
14510   ;
14511   return 0;
14512 }
14513 _ACEOF
14514 if ac_fn_c_try_link "$LINENO"; then :
14515   pgac_cv_gcc_atomic_int32_cas="yes"
14516 else
14517   pgac_cv_gcc_atomic_int32_cas="no"
14518 fi
14519 rm -f core conftest.err conftest.$ac_objext \
14520     conftest$ac_exeext conftest.$ac_ext
14521 fi
14522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
14523 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
14524 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
14525
14526 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
14527
14528 fi
14529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
14530 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
14531 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
14532   $as_echo_n "(cached) " >&6
14533 else
14534   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14535 /* end confdefs.h.  */
14536
14537 int
14538 main ()
14539 {
14540 PG_INT64_TYPE val = 0;
14541    PG_INT64_TYPE expect = 0;
14542    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
14543   ;
14544   return 0;
14545 }
14546 _ACEOF
14547 if ac_fn_c_try_link "$LINENO"; then :
14548   pgac_cv_gcc_atomic_int64_cas="yes"
14549 else
14550   pgac_cv_gcc_atomic_int64_cas="no"
14551 fi
14552 rm -f core conftest.err conftest.$ac_objext \
14553     conftest$ac_exeext conftest.$ac_ext
14554 fi
14555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
14556 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
14557 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
14558
14559 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
14560
14561 fi
14562
14563
14564 # Check for x86 cpuid instruction
14565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
14566 $as_echo_n "checking for __get_cpuid... " >&6; }
14567 if ${pgac_cv__get_cpuid+:} false; then :
14568   $as_echo_n "(cached) " >&6
14569 else
14570   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14571 /* end confdefs.h.  */
14572 #include <cpuid.h>
14573 int
14574 main ()
14575 {
14576 unsigned int exx[4] = {0, 0, 0, 0};
14577   __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
14578
14579   ;
14580   return 0;
14581 }
14582 _ACEOF
14583 if ac_fn_c_try_link "$LINENO"; then :
14584   pgac_cv__get_cpuid="yes"
14585 else
14586   pgac_cv__get_cpuid="no"
14587 fi
14588 rm -f core conftest.err conftest.$ac_objext \
14589     conftest$ac_exeext conftest.$ac_ext
14590 fi
14591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
14592 $as_echo "$pgac_cv__get_cpuid" >&6; }
14593 if test x"$pgac_cv__get_cpuid" = x"yes"; then
14594
14595 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
14596
14597 fi
14598
14599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
14600 $as_echo_n "checking for __cpuid... " >&6; }
14601 if ${pgac_cv__cpuid+:} false; then :
14602   $as_echo_n "(cached) " >&6
14603 else
14604   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14605 /* end confdefs.h.  */
14606 #include <intrin.h>
14607 int
14608 main ()
14609 {
14610 unsigned int exx[4] = {0, 0, 0, 0};
14611   __get_cpuid(exx[0], 1);
14612
14613   ;
14614   return 0;
14615 }
14616 _ACEOF
14617 if ac_fn_c_try_link "$LINENO"; then :
14618   pgac_cv__cpuid="yes"
14619 else
14620   pgac_cv__cpuid="no"
14621 fi
14622 rm -f core conftest.err conftest.$ac_objext \
14623     conftest$ac_exeext conftest.$ac_ext
14624 fi
14625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
14626 $as_echo "$pgac_cv__cpuid" >&6; }
14627 if test x"$pgac_cv__cpuid" = x"yes"; then
14628
14629 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
14630
14631 fi
14632
14633 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
14634 #
14635 # First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
14636 # with the default compiler flags. If not, check if adding the -msse4.2
14637 # flag helps. CFLAGS_SSE42 is set to -msse4.2 if that's required.
14638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
14639 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
14640 if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
14641   $as_echo_n "(cached) " >&6
14642 else
14643   pgac_save_CFLAGS=$CFLAGS
14644 CFLAGS="$pgac_save_CFLAGS "
14645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14646 /* end confdefs.h.  */
14647 #include <nmmintrin.h>
14648 int
14649 main ()
14650 {
14651 unsigned int crc = 0;
14652    crc = _mm_crc32_u8(crc, 0);
14653    crc = _mm_crc32_u32(crc, 0);
14654    /* return computed value, to prevent the above being optimized away */
14655    return crc == 0;
14656   ;
14657   return 0;
14658 }
14659 _ACEOF
14660 if ac_fn_c_try_link "$LINENO"; then :
14661   pgac_cv_sse42_crc32_intrinsics_=yes
14662 else
14663   pgac_cv_sse42_crc32_intrinsics_=no
14664 fi
14665 rm -f core conftest.err conftest.$ac_objext \
14666     conftest$ac_exeext conftest.$ac_ext
14667 CFLAGS="$pgac_save_CFLAGS"
14668 fi
14669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
14670 $as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
14671 if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
14672   CFLAGS_SSE42=""
14673   pgac_sse42_crc32_intrinsics=yes
14674 fi
14675
14676 if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
14677   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
14678 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
14679 if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
14680   $as_echo_n "(cached) " >&6
14681 else
14682   pgac_save_CFLAGS=$CFLAGS
14683 CFLAGS="$pgac_save_CFLAGS -msse4.2"
14684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14685 /* end confdefs.h.  */
14686 #include <nmmintrin.h>
14687 int
14688 main ()
14689 {
14690 unsigned int crc = 0;
14691    crc = _mm_crc32_u8(crc, 0);
14692    crc = _mm_crc32_u32(crc, 0);
14693    /* return computed value, to prevent the above being optimized away */
14694    return crc == 0;
14695   ;
14696   return 0;
14697 }
14698 _ACEOF
14699 if ac_fn_c_try_link "$LINENO"; then :
14700   pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
14701 else
14702   pgac_cv_sse42_crc32_intrinsics__msse4_2=no
14703 fi
14704 rm -f core conftest.err conftest.$ac_objext \
14705     conftest$ac_exeext conftest.$ac_ext
14706 CFLAGS="$pgac_save_CFLAGS"
14707 fi
14708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
14709 $as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
14710 if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
14711   CFLAGS_SSE42="-msse4.2"
14712   pgac_sse42_crc32_intrinsics=yes
14713 fi
14714
14715 fi
14716
14717
14718 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
14719 # define __SSE4_2__ in that case.
14720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14721 /* end confdefs.h.  */
14722
14723 int
14724 main ()
14725 {
14726
14727 #ifndef __SSE4_2__
14728 #error __SSE4_2__ not defined
14729 #endif
14730
14731   ;
14732   return 0;
14733 }
14734 _ACEOF
14735 if ac_fn_c_try_compile "$LINENO"; then :
14736   SSE4_2_TARGETED=1
14737 fi
14738 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14739
14740 # Select CRC-32C implementation.
14741 #
14742 # If we are targeting a processor that has SSE 4.2 instructions, we can use the
14743 # special CRC instructions for calculating CRC-32C. If we're not targeting such
14744 # a processor, but we can nevertheless produce code that uses the SSE
14745 # intrinsics, perhaps with some extra CFLAGS, compile both implementations and
14746 # select which one to use at runtime, depending on whether SSE 4.2 is supported
14747 # by the processor we're running on.
14748 #
14749 # You can override this logic by setting the appropriate USE_*_CRC32 flag to 1
14750 # in the template or configure command line.
14751 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
14752   if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
14753     USE_SSE42_CRC32C=1
14754   else
14755     # the CPUID instruction is needed for the runtime check.
14756     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
14757       USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
14758     else
14759       # fall back to slicing-by-8 algorithm which doesn't require any special
14760       # CPU support.
14761       USE_SLICING_BY_8_CRC32C=1
14762     fi
14763   fi
14764 fi
14765
14766 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
14767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
14768 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
14769 if test x"$USE_SSE42_CRC32C" = x"1"; then
14770
14771 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
14772
14773   PG_CRC32C_OBJS="pg_crc32c_sse42.o"
14774   { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
14775 $as_echo "SSE 4.2" >&6; }
14776 else
14777   if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
14778
14779 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
14780
14781     PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_choose.o"
14782     { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
14783 $as_echo "SSE 4.2 with runtime check" >&6; }
14784   else
14785
14786 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
14787
14788     PG_CRC32C_OBJS="pg_crc32c_sb8.o"
14789     { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
14790 $as_echo "slicing-by-8" >&6; }
14791   fi
14792 fi
14793
14794
14795
14796 # Select semaphore implementation type.
14797 if test "$PORTNAME" != "win32"; then
14798   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
14799
14800 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
14801
14802     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
14803   else
14804     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
14805
14806 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
14807
14808       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
14809     else
14810
14811 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
14812
14813       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
14814     fi
14815   fi
14816 else
14817
14818 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
14819
14820   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
14821 fi
14822
14823
14824 # Select shared-memory implementation type.
14825 if test "$PORTNAME" != "win32"; then
14826
14827 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
14828
14829   SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
14830 else
14831
14832 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
14833
14834   SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
14835 fi
14836
14837 # If not set in template file, set bytes to use libc memset()
14838 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
14839   MEMSET_LOOP_LIMIT=1024
14840 fi
14841
14842 cat >>confdefs.h <<_ACEOF
14843 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
14844 _ACEOF
14845
14846
14847
14848 if test "$enable_nls" = yes ; then
14849
14850   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
14851 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
14852 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
14853   $as_echo_n "(cached) " >&6
14854 else
14855   ac_func_search_save_LIBS=$LIBS
14856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14857 /* end confdefs.h.  */
14858
14859 /* Override any GCC internal prototype to avoid an error.
14860    Use char because int might match the return type of a GCC
14861    builtin and then its argument prototype would still apply.  */
14862 #ifdef __cplusplus
14863 extern "C"
14864 #endif
14865 char bind_textdomain_codeset ();
14866 int
14867 main ()
14868 {
14869 return bind_textdomain_codeset ();
14870   ;
14871   return 0;
14872 }
14873 _ACEOF
14874 for ac_lib in '' intl; do
14875   if test -z "$ac_lib"; then
14876     ac_res="none required"
14877   else
14878     ac_res=-l$ac_lib
14879     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14880   fi
14881   if ac_fn_c_try_link "$LINENO"; then :
14882   ac_cv_search_bind_textdomain_codeset=$ac_res
14883 fi
14884 rm -f core conftest.err conftest.$ac_objext \
14885     conftest$ac_exeext
14886   if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
14887   break
14888 fi
14889 done
14890 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
14891
14892 else
14893   ac_cv_search_bind_textdomain_codeset=no
14894 fi
14895 rm conftest.$ac_ext
14896 LIBS=$ac_func_search_save_LIBS
14897 fi
14898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
14899 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
14900 ac_res=$ac_cv_search_bind_textdomain_codeset
14901 if test "$ac_res" != no; then :
14902   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14903
14904 else
14905   as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
14906 fi
14907
14908   ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
14909 if test "x$ac_cv_header_libintl_h" = xyes; then :
14910
14911 else
14912   as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
14913 fi
14914
14915
14916   for ac_prog in msgfmt
14917 do
14918   # Extract the first word of "$ac_prog", so it can be a program name with args.
14919 set dummy $ac_prog; ac_word=$2
14920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14921 $as_echo_n "checking for $ac_word... " >&6; }
14922 if ${ac_cv_prog_MSGFMT+:} false; then :
14923   $as_echo_n "(cached) " >&6
14924 else
14925   if test -n "$MSGFMT"; then
14926   ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
14927 else
14928 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14929 for as_dir in $PATH
14930 do
14931   IFS=$as_save_IFS
14932   test -z "$as_dir" && as_dir=.
14933     for ac_exec_ext in '' $ac_executable_extensions; do
14934   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14935     ac_cv_prog_MSGFMT="$ac_prog"
14936     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14937     break 2
14938   fi
14939 done
14940   done
14941 IFS=$as_save_IFS
14942
14943 fi
14944 fi
14945 MSGFMT=$ac_cv_prog_MSGFMT
14946 if test -n "$MSGFMT"; then
14947   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
14948 $as_echo "$MSGFMT" >&6; }
14949 else
14950   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14951 $as_echo "no" >&6; }
14952 fi
14953
14954
14955   test -n "$MSGFMT" && break
14956 done
14957
14958   if test -z "$MSGFMT"; then
14959     as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
14960   fi
14961   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
14962 $as_echo_n "checking for msgfmt flags... " >&6; }
14963 if ${pgac_cv_msgfmt_flags+:} false; then :
14964   $as_echo_n "(cached) " >&6
14965 else
14966   if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
14967     pgac_cv_msgfmt_flags=-c
14968 fi
14969 fi
14970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
14971 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
14972   MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
14973
14974   for ac_prog in msgmerge
14975 do
14976   # Extract the first word of "$ac_prog", so it can be a program name with args.
14977 set dummy $ac_prog; ac_word=$2
14978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14979 $as_echo_n "checking for $ac_word... " >&6; }
14980 if ${ac_cv_prog_MSGMERGE+:} false; then :
14981   $as_echo_n "(cached) " >&6
14982 else
14983   if test -n "$MSGMERGE"; then
14984   ac_cv_prog_MSGMERGE="$MSGMERGE" # Let the user override the test.
14985 else
14986 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14987 for as_dir in $PATH
14988 do
14989   IFS=$as_save_IFS
14990   test -z "$as_dir" && as_dir=.
14991     for ac_exec_ext in '' $ac_executable_extensions; do
14992   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14993     ac_cv_prog_MSGMERGE="$ac_prog"
14994     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14995     break 2
14996   fi
14997 done
14998   done
14999 IFS=$as_save_IFS
15000
15001 fi
15002 fi
15003 MSGMERGE=$ac_cv_prog_MSGMERGE
15004 if test -n "$MSGMERGE"; then
15005   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
15006 $as_echo "$MSGMERGE" >&6; }
15007 else
15008   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15009 $as_echo "no" >&6; }
15010 fi
15011
15012
15013   test -n "$MSGMERGE" && break
15014 done
15015
15016   for ac_prog in xgettext
15017 do
15018   # Extract the first word of "$ac_prog", so it can be a program name with args.
15019 set dummy $ac_prog; ac_word=$2
15020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15021 $as_echo_n "checking for $ac_word... " >&6; }
15022 if ${ac_cv_prog_XGETTEXT+:} false; then :
15023   $as_echo_n "(cached) " >&6
15024 else
15025   if test -n "$XGETTEXT"; then
15026   ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test.
15027 else
15028 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15029 for as_dir in $PATH
15030 do
15031   IFS=$as_save_IFS
15032   test -z "$as_dir" && as_dir=.
15033     for ac_exec_ext in '' $ac_executable_extensions; do
15034   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15035     ac_cv_prog_XGETTEXT="$ac_prog"
15036     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15037     break 2
15038   fi
15039 done
15040   done
15041 IFS=$as_save_IFS
15042
15043 fi
15044 fi
15045 XGETTEXT=$ac_cv_prog_XGETTEXT
15046 if test -n "$XGETTEXT"; then
15047   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
15048 $as_echo "$XGETTEXT" >&6; }
15049 else
15050   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15051 $as_echo "no" >&6; }
15052 fi
15053
15054
15055   test -n "$XGETTEXT" && break
15056 done
15057
15058
15059 fi
15060
15061 # Check for Tcl configuration script tclConfig.sh
15062 if test "$with_tcl" = yes; then
15063     for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
15064 do
15065   # Extract the first word of "$ac_prog", so it can be a program name with args.
15066 set dummy $ac_prog; ac_word=$2
15067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15068 $as_echo_n "checking for $ac_word... " >&6; }
15069 if ${ac_cv_path_TCLSH+:} false; then :
15070   $as_echo_n "(cached) " >&6
15071 else
15072   case $TCLSH in
15073   [\\/]* | ?:[\\/]*)
15074   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
15075   ;;
15076   *)
15077   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15078 for as_dir in $PATH
15079 do
15080   IFS=$as_save_IFS
15081   test -z "$as_dir" && as_dir=.
15082     for ac_exec_ext in '' $ac_executable_extensions; do
15083   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15084     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
15085     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15086     break 2
15087   fi
15088 done
15089   done
15090 IFS=$as_save_IFS
15091
15092   ;;
15093 esac
15094 fi
15095 TCLSH=$ac_cv_path_TCLSH
15096 if test -n "$TCLSH"; then
15097   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
15098 $as_echo "$TCLSH" >&6; }
15099 else
15100   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15101 $as_echo "no" >&6; }
15102 fi
15103
15104
15105   test -n "$TCLSH" && break
15106 done
15107
15108 if test x"$TCLSH" = x""; then
15109   as_fn_error $? "Tcl shell not found" "$LINENO" 5
15110 fi
15111
15112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
15113 $as_echo_n "checking for tclConfig.sh... " >&6; }
15114 # Let user override test
15115 if test -z "$TCL_CONFIG_SH"; then
15116     pgac_test_dirs="$with_tclconfig"
15117
15118     set X $pgac_test_dirs; shift
15119     if test $# -eq 0; then
15120         test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
15121         set X `echo 'puts $auto_path' | $TCLSH`; shift
15122     fi
15123
15124     for pgac_dir do
15125         if test -r "$pgac_dir/tclConfig.sh"; then
15126             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
15127             break
15128         fi
15129     done
15130 fi
15131
15132 if test -z "$TCL_CONFIG_SH"; then
15133     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15134 $as_echo "no" >&6; }
15135     as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
15136 else
15137     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
15138 $as_echo "$TCL_CONFIG_SH" >&6; }
15139 fi
15140
15141
15142
15143     . "$TCL_CONFIG_SH"
15144 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
15145 eval TCL_LIBS=\"$TCL_LIBS\"
15146 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
15147 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
15148
15149         if test "$TCL_SHARED_BUILD" != 1; then
15150       as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
15151 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
15152     fi
15153     # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
15154     ac_save_CPPFLAGS=$CPPFLAGS
15155     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
15156     ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
15157 if test "x$ac_cv_header_tcl_h" = xyes; then :
15158
15159 else
15160   as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
15161 fi
15162
15163
15164     CPPFLAGS=$ac_save_CPPFLAGS
15165 fi
15166
15167 # check for <perl.h>
15168 if test "$with_perl" = yes; then
15169   ac_save_CPPFLAGS=$CPPFLAGS
15170   CPPFLAGS="$CPPFLAGS -I$perl_archlibexp/CORE"
15171   ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
15172 "
15173 if test "x$ac_cv_header_perl_h" = xyes; then :
15174
15175 else
15176   as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
15177 fi
15178
15179
15180   # While we're at it, check that we can link to libperl.
15181   # On most platforms, if perl.h is there then libperl.so will be too, but at
15182   # this writing Debian packages them separately.  There is no known reason to
15183   # waste cycles on separate probes for the Tcl or Python libraries, though.
15184   pgac_save_LIBS=$LIBS
15185   LIBS="$perl_embed_ldflags"
15186   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
15187 $as_echo_n "checking for libperl... " >&6; }
15188   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15189 /* end confdefs.h.  */
15190
15191 #include <EXTERN.h>
15192 #include <perl.h>
15193
15194 int
15195 main ()
15196 {
15197 perl_alloc();
15198   ;
15199   return 0;
15200 }
15201 _ACEOF
15202 if ac_fn_c_try_link "$LINENO"; then :
15203   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15204 $as_echo "yes" >&6; }
15205 else
15206   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15207 $as_echo "no" >&6; }
15208      as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
15209 fi
15210 rm -f core conftest.err conftest.$ac_objext \
15211     conftest$ac_exeext conftest.$ac_ext
15212   LIBS=$pgac_save_LIBS
15213   CPPFLAGS=$ac_save_CPPFLAGS
15214 fi
15215
15216 # check for <Python.h>
15217 if test "$with_python" = yes; then
15218   ac_save_CPPFLAGS=$CPPFLAGS
15219   CPPFLAGS="$python_includespec $CPPFLAGS"
15220   ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
15221 if test "x$ac_cv_header_Python_h" = xyes; then :
15222
15223 else
15224   as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
15225 fi
15226
15227
15228   CPPFLAGS=$ac_save_CPPFLAGS
15229 fi
15230
15231 #
15232 # Check for DocBook and tools
15233 #
15234 for ac_prog in onsgmls nsgmls
15235 do
15236   # Extract the first word of "$ac_prog", so it can be a program name with args.
15237 set dummy $ac_prog; ac_word=$2
15238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15239 $as_echo_n "checking for $ac_word... " >&6; }
15240 if ${ac_cv_prog_NSGMLS+:} false; then :
15241   $as_echo_n "(cached) " >&6
15242 else
15243   if test -n "$NSGMLS"; then
15244   ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
15245 else
15246 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15247 for as_dir in $PATH
15248 do
15249   IFS=$as_save_IFS
15250   test -z "$as_dir" && as_dir=.
15251     for ac_exec_ext in '' $ac_executable_extensions; do
15252   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15253     ac_cv_prog_NSGMLS="$ac_prog"
15254     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15255     break 2
15256   fi
15257 done
15258   done
15259 IFS=$as_save_IFS
15260
15261 fi
15262 fi
15263 NSGMLS=$ac_cv_prog_NSGMLS
15264 if test -n "$NSGMLS"; then
15265   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NSGMLS" >&5
15266 $as_echo "$NSGMLS" >&6; }
15267 else
15268   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15269 $as_echo "no" >&6; }
15270 fi
15271
15272
15273   test -n "$NSGMLS" && break
15274 done
15275
15276 for ac_prog in openjade jade
15277 do
15278   # Extract the first word of "$ac_prog", so it can be a program name with args.
15279 set dummy $ac_prog; ac_word=$2
15280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15281 $as_echo_n "checking for $ac_word... " >&6; }
15282 if ${ac_cv_prog_JADE+:} false; then :
15283   $as_echo_n "(cached) " >&6
15284 else
15285   if test -n "$JADE"; then
15286   ac_cv_prog_JADE="$JADE" # Let the user override the test.
15287 else
15288 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15289 for as_dir in $PATH
15290 do
15291   IFS=$as_save_IFS
15292   test -z "$as_dir" && as_dir=.
15293     for ac_exec_ext in '' $ac_executable_extensions; do
15294   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15295     ac_cv_prog_JADE="$ac_prog"
15296     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15297     break 2
15298   fi
15299 done
15300   done
15301 IFS=$as_save_IFS
15302
15303 fi
15304 fi
15305 JADE=$ac_cv_prog_JADE
15306 if test -n "$JADE"; then
15307   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JADE" >&5
15308 $as_echo "$JADE" >&6; }
15309 else
15310   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15311 $as_echo "no" >&6; }
15312 fi
15313
15314
15315   test -n "$JADE" && break
15316 done
15317
15318
15319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook V4.2" >&5
15320 $as_echo_n "checking for DocBook V4.2... " >&6; }
15321 if ${pgac_cv_check_docbook+:} false; then :
15322   $as_echo_n "(cached) " >&6
15323 else
15324   cat >conftest.sgml <<EOF
15325 <!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
15326 <book>
15327  <title>test</title>
15328  <chapter>
15329   <title>random</title>
15330    <sect1>
15331     <title>testsect</title>
15332     <para>text</para>
15333   </sect1>
15334  </chapter>
15335 </book>
15336 EOF
15337
15338 pgac_cv_check_docbook=no
15339
15340 if test -n "$NSGMLS"; then
15341   $NSGMLS -s conftest.sgml 1>&5 2>&1
15342   if test $? -eq 0; then
15343     pgac_cv_check_docbook=yes
15344   fi
15345 fi
15346 rm -f conftest.sgml
15347 fi
15348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_docbook" >&5
15349 $as_echo "$pgac_cv_check_docbook" >&6; }
15350
15351 have_docbook=$pgac_cv_check_docbook
15352
15353
15354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook stylesheets" >&5
15355 $as_echo_n "checking for DocBook stylesheets... " >&6; }
15356 if ${pgac_cv_path_stylesheets+:} false; then :
15357   $as_echo_n "(cached) " >&6
15358 else
15359   if test -n "$DOCBOOKSTYLE"; then
15360   pgac_cv_path_stylesheets=$DOCBOOKSTYLE
15361 else
15362   for pgac_prefix in /usr /usr/local /opt /sw; do
15363     for pgac_infix in share lib; do
15364       for pgac_postfix in \
15365         sgml/stylesheets/nwalsh-modular \
15366         sgml/stylesheets/docbook \
15367         sgml/stylesheets/dsssl/docbook \
15368         sgml/docbook-dsssl \
15369         sgml/docbook/dsssl/modular \
15370         sgml/docbook/stylesheet/dsssl/modular \
15371         sgml/docbook/dsssl-stylesheets \
15372         sgml/dsssl/docbook-dsssl-nwalsh
15373       do
15374         pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
15375         if test -r "$pgac_candidate/html/docbook.dsl" \
15376            && test -r "$pgac_candidate/print/docbook.dsl"
15377         then
15378           pgac_cv_path_stylesheets=$pgac_candidate
15379           break 3
15380         fi
15381       done
15382     done
15383   done
15384 fi
15385 fi
15386
15387 DOCBOOKSTYLE=$pgac_cv_path_stylesheets
15388
15389 if test -n "$DOCBOOKSTYLE"; then
15390   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOCBOOKSTYLE" >&5
15391 $as_echo "$DOCBOOKSTYLE" >&6; }
15392 else
15393   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15394 $as_echo "no" >&6; }
15395 fi
15396 if test -n "$DOCBOOKSTYLE" -a -r "$DOCBOOKSTYLE/bin/collateindex.pl"; then
15397   COLLATEINDEX="$DOCBOOKSTYLE/bin/collateindex.pl"
15398
15399 else
15400   # Extract the first word of "collateindex.pl", so it can be a program name with args.
15401 set dummy collateindex.pl; ac_word=$2
15402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15403 $as_echo_n "checking for $ac_word... " >&6; }
15404 if ${ac_cv_path_COLLATEINDEX+:} false; then :
15405   $as_echo_n "(cached) " >&6
15406 else
15407   case $COLLATEINDEX in
15408   [\\/]* | ?:[\\/]*)
15409   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
15410   ;;
15411   *)
15412   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15413 for as_dir in $PATH
15414 do
15415   IFS=$as_save_IFS
15416   test -z "$as_dir" && as_dir=.
15417     for ac_exec_ext in '' $ac_executable_extensions; do
15418   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15419     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
15420     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15421     break 2
15422   fi
15423 done
15424   done
15425 IFS=$as_save_IFS
15426
15427   ;;
15428 esac
15429 fi
15430 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
15431 if test -n "$COLLATEINDEX"; then
15432   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COLLATEINDEX" >&5
15433 $as_echo "$COLLATEINDEX" >&6; }
15434 else
15435   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15436 $as_echo "no" >&6; }
15437 fi
15438
15439
15440 fi
15441 for ac_prog in dbtoepub
15442 do
15443   # Extract the first word of "$ac_prog", so it can be a program name with args.
15444 set dummy $ac_prog; ac_word=$2
15445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15446 $as_echo_n "checking for $ac_word... " >&6; }
15447 if ${ac_cv_prog_DBTOEPUB+:} false; then :
15448   $as_echo_n "(cached) " >&6
15449 else
15450   if test -n "$DBTOEPUB"; then
15451   ac_cv_prog_DBTOEPUB="$DBTOEPUB" # Let the user override the test.
15452 else
15453 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15454 for as_dir in $PATH
15455 do
15456   IFS=$as_save_IFS
15457   test -z "$as_dir" && as_dir=.
15458     for ac_exec_ext in '' $ac_executable_extensions; do
15459   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15460     ac_cv_prog_DBTOEPUB="$ac_prog"
15461     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15462     break 2
15463   fi
15464 done
15465   done
15466 IFS=$as_save_IFS
15467
15468 fi
15469 fi
15470 DBTOEPUB=$ac_cv_prog_DBTOEPUB
15471 if test -n "$DBTOEPUB"; then
15472   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
15473 $as_echo "$DBTOEPUB" >&6; }
15474 else
15475   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15476 $as_echo "no" >&6; }
15477 fi
15478
15479
15480   test -n "$DBTOEPUB" && break
15481 done
15482
15483 for ac_prog in xmllint
15484 do
15485   # Extract the first word of "$ac_prog", so it can be a program name with args.
15486 set dummy $ac_prog; ac_word=$2
15487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15488 $as_echo_n "checking for $ac_word... " >&6; }
15489 if ${ac_cv_prog_XMLLINT+:} false; then :
15490   $as_echo_n "(cached) " >&6
15491 else
15492   if test -n "$XMLLINT"; then
15493   ac_cv_prog_XMLLINT="$XMLLINT" # Let the user override the test.
15494 else
15495 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15496 for as_dir in $PATH
15497 do
15498   IFS=$as_save_IFS
15499   test -z "$as_dir" && as_dir=.
15500     for ac_exec_ext in '' $ac_executable_extensions; do
15501   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15502     ac_cv_prog_XMLLINT="$ac_prog"
15503     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15504     break 2
15505   fi
15506 done
15507   done
15508 IFS=$as_save_IFS
15509
15510 fi
15511 fi
15512 XMLLINT=$ac_cv_prog_XMLLINT
15513 if test -n "$XMLLINT"; then
15514   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
15515 $as_echo "$XMLLINT" >&6; }
15516 else
15517   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15518 $as_echo "no" >&6; }
15519 fi
15520
15521
15522   test -n "$XMLLINT" && break
15523 done
15524
15525 for ac_prog in xsltproc
15526 do
15527   # Extract the first word of "$ac_prog", so it can be a program name with args.
15528 set dummy $ac_prog; ac_word=$2
15529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15530 $as_echo_n "checking for $ac_word... " >&6; }
15531 if ${ac_cv_prog_XSLTPROC+:} false; then :
15532   $as_echo_n "(cached) " >&6
15533 else
15534   if test -n "$XSLTPROC"; then
15535   ac_cv_prog_XSLTPROC="$XSLTPROC" # Let the user override the test.
15536 else
15537 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15538 for as_dir in $PATH
15539 do
15540   IFS=$as_save_IFS
15541   test -z "$as_dir" && as_dir=.
15542     for ac_exec_ext in '' $ac_executable_extensions; do
15543   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15544     ac_cv_prog_XSLTPROC="$ac_prog"
15545     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15546     break 2
15547   fi
15548 done
15549   done
15550 IFS=$as_save_IFS
15551
15552 fi
15553 fi
15554 XSLTPROC=$ac_cv_prog_XSLTPROC
15555 if test -n "$XSLTPROC"; then
15556   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
15557 $as_echo "$XSLTPROC" >&6; }
15558 else
15559   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15560 $as_echo "no" >&6; }
15561 fi
15562
15563
15564   test -n "$XSLTPROC" && break
15565 done
15566
15567 for ac_prog in osx sgml2xml sx
15568 do
15569   # Extract the first word of "$ac_prog", so it can be a program name with args.
15570 set dummy $ac_prog; ac_word=$2
15571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15572 $as_echo_n "checking for $ac_word... " >&6; }
15573 if ${ac_cv_prog_OSX+:} false; then :
15574   $as_echo_n "(cached) " >&6
15575 else
15576   if test -n "$OSX"; then
15577   ac_cv_prog_OSX="$OSX" # Let the user override the test.
15578 else
15579 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15580 for as_dir in $PATH
15581 do
15582   IFS=$as_save_IFS
15583   test -z "$as_dir" && as_dir=.
15584     for ac_exec_ext in '' $ac_executable_extensions; do
15585   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15586     ac_cv_prog_OSX="$ac_prog"
15587     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15588     break 2
15589   fi
15590 done
15591   done
15592 IFS=$as_save_IFS
15593
15594 fi
15595 fi
15596 OSX=$ac_cv_prog_OSX
15597 if test -n "$OSX"; then
15598   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OSX" >&5
15599 $as_echo "$OSX" >&6; }
15600 else
15601   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15602 $as_echo "no" >&6; }
15603 fi
15604
15605
15606   test -n "$OSX" && break
15607 done
15608
15609
15610 #
15611 # Check for test tools
15612 #
15613 if test "$enable_tap_tests" = yes; then
15614   for ac_prog in prove
15615 do
15616   # Extract the first word of "$ac_prog", so it can be a program name with args.
15617 set dummy $ac_prog; ac_word=$2
15618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15619 $as_echo_n "checking for $ac_word... " >&6; }
15620 if ${ac_cv_prog_PROVE+:} false; then :
15621   $as_echo_n "(cached) " >&6
15622 else
15623   if test -n "$PROVE"; then
15624   ac_cv_prog_PROVE="$PROVE" # Let the user override the test.
15625 else
15626 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15627 for as_dir in $PATH
15628 do
15629   IFS=$as_save_IFS
15630   test -z "$as_dir" && as_dir=.
15631     for ac_exec_ext in '' $ac_executable_extensions; do
15632   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15633     ac_cv_prog_PROVE="$ac_prog"
15634     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15635     break 2
15636   fi
15637 done
15638   done
15639 IFS=$as_save_IFS
15640
15641 fi
15642 fi
15643 PROVE=$ac_cv_prog_PROVE
15644 if test -n "$PROVE"; then
15645   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
15646 $as_echo "$PROVE" >&6; }
15647 else
15648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15649 $as_echo "no" >&6; }
15650 fi
15651
15652
15653   test -n "$PROVE" && break
15654 done
15655
15656   if test -z "$PROVE"; then
15657     as_fn_error $? "prove not found" "$LINENO" 5
15658   fi
15659   if test -z "$PERL"; then
15660     as_fn_error $? "Perl not found" "$LINENO" 5
15661   fi
15662 fi
15663
15664 # Thread testing
15665
15666 # We have to run the thread test near the end so we have all our symbols
15667 # defined.  Cross compiling throws a warning.
15668 #
15669 if test "$enable_thread_safety" = yes; then
15670 if test "$PORTNAME" != "win32"
15671 then
15672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking thread safety of required library functions" >&5
15673 $as_echo_n "checking thread safety of required library functions... " >&6; }
15674
15675 _CFLAGS="$CFLAGS"
15676 _LIBS="$LIBS"
15677 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
15678 LIBS="$LIBS $PTHREAD_LIBS"
15679 if test "$cross_compiling" = yes; then :
15680   { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
15681 $as_echo "maybe" >&6; }
15682   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
15683 *** Skipping thread test program because of cross-compile build.
15684 *** Run the program in src/test/thread on the target machine.
15685 " >&5
15686 $as_echo "$as_me: WARNING:
15687 *** Skipping thread test program because of cross-compile build.
15688 *** Run the program in src/test/thread on the target machine.
15689 " >&2;}
15690 else
15691   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15692 /* end confdefs.h.  */
15693 #include "$srcdir/src/test/thread/thread_test.c"
15694 _ACEOF
15695 if ac_fn_c_try_run "$LINENO"; then :
15696   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15697 $as_echo "yes" >&6; }
15698 else
15699   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15700 $as_echo "no" >&6; }
15701   as_fn_error $? "thread test program failed
15702 This platform is not thread-safe.  Check the file 'config.log' or compile
15703 and run src/test/thread/thread_test for the exact reason.
15704 Use --disable-thread-safety to disable thread safety." "$LINENO" 5
15705 fi
15706 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15707   conftest.$ac_objext conftest.beam conftest.$ac_ext
15708 fi
15709
15710 CFLAGS="$_CFLAGS"
15711 LIBS="$_LIBS"
15712 else
15713 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** skipping thread test on Win32" >&5
15714 $as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
15715 fi
15716 fi
15717
15718 # If compiler will take -Wl,--as-needed (or various platform-specific
15719 # spellings thereof) then add that to LDFLAGS.  This is much easier than
15720 # trying to filter LIBS to the minimum for each executable.
15721 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
15722 # libreadline; therefore we postpone testing it until we know what library
15723 # dependencies readline has.  The test code will try to link with $LIBS.
15724 if test "$with_readline" = yes; then
15725   link_test_func=readline
15726 else
15727   link_test_func=exit
15728 fi
15729
15730 if test "$PORTNAME" = "darwin"; then
15731   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
15732 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
15733 if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
15734   $as_echo_n "(cached) " >&6
15735 else
15736   pgac_save_LDFLAGS=$LDFLAGS
15737 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
15738 if test "$cross_compiling" = yes; then :
15739   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
15740 else
15741   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15742 /* end confdefs.h.  */
15743 extern void $link_test_func (); void (*fptr) () = $link_test_func;
15744 int
15745 main ()
15746 {
15747
15748   ;
15749   return 0;
15750 }
15751 _ACEOF
15752 if ac_fn_c_try_run "$LINENO"; then :
15753   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
15754 else
15755   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
15756 fi
15757 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15758   conftest.$ac_objext conftest.beam conftest.$ac_ext
15759 fi
15760
15761 LDFLAGS="$pgac_save_LDFLAGS"
15762 fi
15763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
15764 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
15765 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
15766   LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
15767 fi
15768
15769 elif test "$PORTNAME" = "openbsd"; then
15770   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
15771 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
15772 if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
15773   $as_echo_n "(cached) " >&6
15774 else
15775   pgac_save_LDFLAGS=$LDFLAGS
15776 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
15777 if test "$cross_compiling" = yes; then :
15778   pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
15779 else
15780   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15781 /* end confdefs.h.  */
15782 extern void $link_test_func (); void (*fptr) () = $link_test_func;
15783 int
15784 main ()
15785 {
15786
15787   ;
15788   return 0;
15789 }
15790 _ACEOF
15791 if ac_fn_c_try_run "$LINENO"; then :
15792   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
15793 else
15794   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
15795 fi
15796 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15797   conftest.$ac_objext conftest.beam conftest.$ac_ext
15798 fi
15799
15800 LDFLAGS="$pgac_save_LDFLAGS"
15801 fi
15802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
15803 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
15804 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
15805   LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
15806 fi
15807
15808 else
15809   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
15810 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
15811 if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
15812   $as_echo_n "(cached) " >&6
15813 else
15814   pgac_save_LDFLAGS=$LDFLAGS
15815 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
15816 if test "$cross_compiling" = yes; then :
15817   pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
15818 else
15819   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15820 /* end confdefs.h.  */
15821 extern void $link_test_func (); void (*fptr) () = $link_test_func;
15822 int
15823 main ()
15824 {
15825
15826   ;
15827   return 0;
15828 }
15829 _ACEOF
15830 if ac_fn_c_try_run "$LINENO"; then :
15831   pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
15832 else
15833   pgac_cv_prog_cc_ldflags__Wl___as_needed=no
15834 fi
15835 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15836   conftest.$ac_objext conftest.beam conftest.$ac_ext
15837 fi
15838
15839 LDFLAGS="$pgac_save_LDFLAGS"
15840 fi
15841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
15842 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
15843 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
15844   LDFLAGS="$LDFLAGS -Wl,--as-needed"
15845 fi
15846
15847 fi
15848
15849 # Create compiler version string
15850 if test x"$GCC" = x"yes" ; then
15851   cc_string=`${CC} --version | sed q`
15852   case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
15853 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
15854   cc_string=`${CC} -V 2>&1 | sed q`
15855 else
15856   cc_string=$CC
15857 fi
15858
15859
15860 cat >>confdefs.h <<_ACEOF
15861 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
15862 _ACEOF
15863
15864
15865 # Supply a numeric version string for use by 3rd party add-ons
15866 # awk -F is a regex on some platforms, and not on others, so make "." a tab
15867 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
15868 tr '.' '        ' |
15869 $AWK '{printf "%d%02d%02d", $1, $2, (NF >= 3) ? $3 : 0}'`"
15870
15871 cat >>confdefs.h <<_ACEOF
15872 #define PG_VERSION_NUM $PG_VERSION_NUM
15873 _ACEOF
15874
15875
15876
15877
15878 # Begin output steps
15879
15880 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
15881 $as_echo "$as_me: using compiler=$cc_string" >&6;}
15882 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
15883 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
15884 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
15885 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
15886 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
15887 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
15888
15889 # prepare build tree if outside source tree
15890 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
15891 # Note 2: /bin/pwd might be better than shell's built-in at getting
15892 #         a symlink-free name.
15893 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
15894   vpath_build=no
15895 else
15896   vpath_build=yes
15897   if test "$no_create" != yes; then
15898     $as_echo_n "preparing build tree... " >&6
15899     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
15900     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
15901       || as_fn_error $? "failed" "$LINENO" 5
15902     { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15903 $as_echo "done" >&6; }
15904   fi
15905 fi
15906
15907
15908
15909 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
15910
15911
15912 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/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}"
15913
15914
15915 if test "$PORTNAME" = "win32"; then
15916 ac_config_commands="$ac_config_commands check_win32_symlinks"
15917
15918 fi
15919
15920 ac_config_headers="$ac_config_headers src/include/pg_config.h"
15921
15922
15923 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
15924
15925
15926 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
15927
15928
15929 cat >confcache <<\_ACEOF
15930 # This file is a shell script that caches the results of configure
15931 # tests run on this system so they can be shared between configure
15932 # scripts and configure runs, see configure's option --config-cache.
15933 # It is not useful on other systems.  If it contains results you don't
15934 # want to keep, you may remove or edit it.
15935 #
15936 # config.status only pays attention to the cache file if you give it
15937 # the --recheck option to rerun configure.
15938 #
15939 # `ac_cv_env_foo' variables (set or unset) will be overridden when
15940 # loading this file, other *unset* `ac_cv_foo' will be assigned the
15941 # following values.
15942
15943 _ACEOF
15944
15945 # The following way of writing the cache mishandles newlines in values,
15946 # but we know of no workaround that is simple, portable, and efficient.
15947 # So, we kill variables containing newlines.
15948 # Ultrix sh set writes to stderr and can't be redirected directly,
15949 # and sets the high bit in the cache file unless we assign to the vars.
15950 (
15951   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15952     eval ac_val=\$$ac_var
15953     case $ac_val in #(
15954     *${as_nl}*)
15955       case $ac_var in #(
15956       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15957 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
15958       esac
15959       case $ac_var in #(
15960       _ | IFS | as_nl) ;; #(
15961       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15962       *) { eval $ac_var=; unset $ac_var;} ;;
15963       esac ;;
15964     esac
15965   done
15966
15967   (set) 2>&1 |
15968     case $as_nl`(ac_space=' '; set) 2>&1` in #(
15969     *${as_nl}ac_space=\ *)
15970       # `set' does not quote correctly, so add quotes: double-quote
15971       # substitution turns \\\\ into \\, and sed turns \\ into \.
15972       sed -n \
15973         "s/'/'\\\\''/g;
15974           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15975       ;; #(
15976     *)
15977       # `set' quotes correctly as required by POSIX, so do not add quotes.
15978       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
15979       ;;
15980     esac |
15981     sort
15982 ) |
15983   sed '
15984      /^ac_cv_env_/b end
15985      t clear
15986      :clear
15987      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15988      t end
15989      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15990      :end' >>confcache
15991 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15992   if test -w "$cache_file"; then
15993     if test "x$cache_file" != "x/dev/null"; then
15994       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15995 $as_echo "$as_me: updating cache $cache_file" >&6;}
15996       if test ! -f "$cache_file" || test -h "$cache_file"; then
15997         cat confcache >"$cache_file"
15998       else
15999         case $cache_file in #(
16000         */* | ?:*)
16001           mv -f confcache "$cache_file"$$ &&
16002           mv -f "$cache_file"$$ "$cache_file" ;; #(
16003         *)
16004           mv -f confcache "$cache_file" ;;
16005         esac
16006       fi
16007     fi
16008   else
16009     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16010 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
16011   fi
16012 fi
16013 rm -f confcache
16014
16015 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16016 # Let make expand exec_prefix.
16017 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16018
16019 DEFS=-DHAVE_CONFIG_H
16020
16021 ac_libobjs=
16022 ac_ltlibobjs=
16023 U=
16024 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16025   # 1. Remove the extension, and $U if already installed.
16026   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
16027   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
16028   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
16029   #    will be set to the directory where LIBOBJS objects are built.
16030   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16031   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
16032 done
16033 LIBOBJS=$ac_libobjs
16034
16035 LTLIBOBJS=$ac_ltlibobjs
16036
16037
16038
16039
16040 : "${CONFIG_STATUS=./config.status}"
16041 ac_write_fail=0
16042 ac_clean_files_save=$ac_clean_files
16043 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16044 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16045 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16046 as_write_fail=0
16047 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
16048 #! $SHELL
16049 # Generated by $as_me.
16050 # Run this file to recreate the current configuration.
16051 # Compiler output produced by configure, useful for debugging
16052 # configure, is in config.log if it exists.
16053
16054 debug=false
16055 ac_cs_recheck=false
16056 ac_cs_silent=false
16057
16058 SHELL=\${CONFIG_SHELL-$SHELL}
16059 export SHELL
16060 _ASEOF
16061 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16062 ## -------------------- ##
16063 ## M4sh Initialization. ##
16064 ## -------------------- ##
16065
16066 # Be more Bourne compatible
16067 DUALCASE=1; export DUALCASE # for MKS sh
16068 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
16069   emulate sh
16070   NULLCMD=:
16071   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
16072   # is contrary to our usage.  Disable this feature.
16073   alias -g '${1+"$@"}'='"$@"'
16074   setopt NO_GLOB_SUBST
16075 else
16076   case `(set -o) 2>/dev/null` in #(
16077   *posix*) :
16078     set -o posix ;; #(
16079   *) :
16080      ;;
16081 esac
16082 fi
16083
16084
16085 as_nl='
16086 '
16087 export as_nl
16088 # Printing a long string crashes Solaris 7 /usr/bin/printf.
16089 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16090 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16091 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16092 # Prefer a ksh shell builtin over an external printf program on Solaris,
16093 # but without wasting forks for bash or zsh.
16094 if test -z "$BASH_VERSION$ZSH_VERSION" \
16095     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16096   as_echo='print -r --'
16097   as_echo_n='print -rn --'
16098 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16099   as_echo='printf %s\n'
16100   as_echo_n='printf %s'
16101 else
16102   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16103     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16104     as_echo_n='/usr/ucb/echo -n'
16105   else
16106     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16107     as_echo_n_body='eval
16108       arg=$1;
16109       case $arg in #(
16110       *"$as_nl"*)
16111         expr "X$arg" : "X\\(.*\\)$as_nl";
16112         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16113       esac;
16114       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16115     '
16116     export as_echo_n_body
16117     as_echo_n='sh -c $as_echo_n_body as_echo'
16118   fi
16119   export as_echo_body
16120   as_echo='sh -c $as_echo_body as_echo'
16121 fi
16122
16123 # The user is always right.
16124 if test "${PATH_SEPARATOR+set}" != set; then
16125   PATH_SEPARATOR=:
16126   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16127     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16128       PATH_SEPARATOR=';'
16129   }
16130 fi
16131
16132
16133 # IFS
16134 # We need space, tab and new line, in precisely that order.  Quoting is
16135 # there to prevent editors from complaining about space-tab.
16136 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
16137 # splitting by setting IFS to empty value.)
16138 IFS=" ""        $as_nl"
16139
16140 # Find who we are.  Look in the path if we contain no directory separator.
16141 as_myself=
16142 case $0 in #((
16143   *[\\/]* ) as_myself=$0 ;;
16144   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16145 for as_dir in $PATH
16146 do
16147   IFS=$as_save_IFS
16148   test -z "$as_dir" && as_dir=.
16149     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16150   done
16151 IFS=$as_save_IFS
16152
16153      ;;
16154 esac
16155 # We did not find ourselves, most probably we were run as `sh COMMAND'
16156 # in which case we are not to be found in the path.
16157 if test "x$as_myself" = x; then
16158   as_myself=$0
16159 fi
16160 if test ! -f "$as_myself"; then
16161   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16162   exit 1
16163 fi
16164
16165 # Unset variables that we do not need and which cause bugs (e.g. in
16166 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
16167 # suppresses any "Segmentation fault" message there.  '((' could
16168 # trigger a bug in pdksh 5.2.14.
16169 for as_var in BASH_ENV ENV MAIL MAILPATH
16170 do eval test x\${$as_var+set} = xset \
16171   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
16172 done
16173 PS1='$ '
16174 PS2='> '
16175 PS4='+ '
16176
16177 # NLS nuisances.
16178 LC_ALL=C
16179 export LC_ALL
16180 LANGUAGE=C
16181 export LANGUAGE
16182
16183 # CDPATH.
16184 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16185
16186
16187 # as_fn_error STATUS ERROR [LINENO LOG_FD]
16188 # ----------------------------------------
16189 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16190 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
16191 # script with STATUS, using 1 if that was 0.
16192 as_fn_error ()
16193 {
16194   as_status=$1; test $as_status -eq 0 && as_status=1
16195   if test "$4"; then
16196     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16197     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
16198   fi
16199   $as_echo "$as_me: error: $2" >&2
16200   as_fn_exit $as_status
16201 } # as_fn_error
16202
16203
16204 # as_fn_set_status STATUS
16205 # -----------------------
16206 # Set $? to STATUS, without forking.
16207 as_fn_set_status ()
16208 {
16209   return $1
16210 } # as_fn_set_status
16211
16212 # as_fn_exit STATUS
16213 # -----------------
16214 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16215 as_fn_exit ()
16216 {
16217   set +e
16218   as_fn_set_status $1
16219   exit $1
16220 } # as_fn_exit
16221
16222 # as_fn_unset VAR
16223 # ---------------
16224 # Portably unset VAR.
16225 as_fn_unset ()
16226 {
16227   { eval $1=; unset $1;}
16228 }
16229 as_unset=as_fn_unset
16230 # as_fn_append VAR VALUE
16231 # ----------------------
16232 # Append the text in VALUE to the end of the definition contained in VAR. Take
16233 # advantage of any shell optimizations that allow amortized linear growth over
16234 # repeated appends, instead of the typical quadratic growth present in naive
16235 # implementations.
16236 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16237   eval 'as_fn_append ()
16238   {
16239     eval $1+=\$2
16240   }'
16241 else
16242   as_fn_append ()
16243   {
16244     eval $1=\$$1\$2
16245   }
16246 fi # as_fn_append
16247
16248 # as_fn_arith ARG...
16249 # ------------------
16250 # Perform arithmetic evaluation on the ARGs, and store the result in the
16251 # global $as_val. Take advantage of shells that can avoid forks. The arguments
16252 # must be portable across $(()) and expr.
16253 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16254   eval 'as_fn_arith ()
16255   {
16256     as_val=$(( $* ))
16257   }'
16258 else
16259   as_fn_arith ()
16260   {
16261     as_val=`expr "$@" || test $? -eq 1`
16262   }
16263 fi # as_fn_arith
16264
16265
16266 if expr a : '\(a\)' >/dev/null 2>&1 &&
16267    test "X`expr 00001 : '.*\(...\)'`" = X001; then
16268   as_expr=expr
16269 else
16270   as_expr=false
16271 fi
16272
16273 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16274   as_basename=basename
16275 else
16276   as_basename=false
16277 fi
16278
16279 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16280   as_dirname=dirname
16281 else
16282   as_dirname=false
16283 fi
16284
16285 as_me=`$as_basename -- "$0" ||
16286 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16287          X"$0" : 'X\(//\)$' \| \
16288          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
16289 $as_echo X/"$0" |
16290     sed '/^.*\/\([^/][^/]*\)\/*$/{
16291             s//\1/
16292             q
16293           }
16294           /^X\/\(\/\/\)$/{
16295             s//\1/
16296             q
16297           }
16298           /^X\/\(\/\).*/{
16299             s//\1/
16300             q
16301           }
16302           s/.*/./; q'`
16303
16304 # Avoid depending upon Character Ranges.
16305 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16306 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16307 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16308 as_cr_digits='0123456789'
16309 as_cr_alnum=$as_cr_Letters$as_cr_digits
16310
16311 ECHO_C= ECHO_N= ECHO_T=
16312 case `echo -n x` in #(((((
16313 -n*)
16314   case `echo 'xy\c'` in
16315   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
16316   xy)  ECHO_C='\c';;
16317   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
16318        ECHO_T=' ';;
16319   esac;;
16320 *)
16321   ECHO_N='-n';;
16322 esac
16323
16324 rm -f conf$$ conf$$.exe conf$$.file
16325 if test -d conf$$.dir; then
16326   rm -f conf$$.dir/conf$$.file
16327 else
16328   rm -f conf$$.dir
16329   mkdir conf$$.dir 2>/dev/null
16330 fi
16331 if (echo >conf$$.file) 2>/dev/null; then
16332   if ln -s conf$$.file conf$$ 2>/dev/null; then
16333     as_ln_s='ln -s'
16334     # ... but there are two gotchas:
16335     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16336     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
16337     # In both cases, we have to default to `cp -pR'.
16338     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
16339       as_ln_s='cp -pR'
16340   elif ln conf$$.file conf$$ 2>/dev/null; then
16341     as_ln_s=ln
16342   else
16343     as_ln_s='cp -pR'
16344   fi
16345 else
16346   as_ln_s='cp -pR'
16347 fi
16348 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16349 rmdir conf$$.dir 2>/dev/null
16350
16351
16352 # as_fn_mkdir_p
16353 # -------------
16354 # Create "$as_dir" as a directory, including parents if necessary.
16355 as_fn_mkdir_p ()
16356 {
16357
16358   case $as_dir in #(
16359   -*) as_dir=./$as_dir;;
16360   esac
16361   test -d "$as_dir" || eval $as_mkdir_p || {
16362     as_dirs=
16363     while :; do
16364       case $as_dir in #(
16365       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16366       *) as_qdir=$as_dir;;
16367       esac
16368       as_dirs="'$as_qdir' $as_dirs"
16369       as_dir=`$as_dirname -- "$as_dir" ||
16370 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16371          X"$as_dir" : 'X\(//\)[^/]' \| \
16372          X"$as_dir" : 'X\(//\)$' \| \
16373          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16374 $as_echo X"$as_dir" |
16375     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16376             s//\1/
16377             q
16378           }
16379           /^X\(\/\/\)[^/].*/{
16380             s//\1/
16381             q
16382           }
16383           /^X\(\/\/\)$/{
16384             s//\1/
16385             q
16386           }
16387           /^X\(\/\).*/{
16388             s//\1/
16389             q
16390           }
16391           s/.*/./; q'`
16392       test -d "$as_dir" && break
16393     done
16394     test -z "$as_dirs" || eval "mkdir $as_dirs"
16395   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
16396
16397
16398 } # as_fn_mkdir_p
16399 if mkdir -p . 2>/dev/null; then
16400   as_mkdir_p='mkdir -p "$as_dir"'
16401 else
16402   test -d ./-p && rmdir ./-p
16403   as_mkdir_p=false
16404 fi
16405
16406
16407 # as_fn_executable_p FILE
16408 # -----------------------
16409 # Test if FILE is an executable regular file.
16410 as_fn_executable_p ()
16411 {
16412   test -f "$1" && test -x "$1"
16413 } # as_fn_executable_p
16414 as_test_x='test -x'
16415 as_executable_p=as_fn_executable_p
16416
16417 # Sed expression to map a string onto a valid CPP name.
16418 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
16419
16420 # Sed expression to map a string onto a valid variable name.
16421 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
16422
16423
16424 exec 6>&1
16425 ## ----------------------------------- ##
16426 ## Main body of $CONFIG_STATUS script. ##
16427 ## ----------------------------------- ##
16428 _ASEOF
16429 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
16430
16431 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16432 # Save the log message, to keep $0 and so on meaningful, and to
16433 # report actual input values of CONFIG_FILES etc. instead of their
16434 # values after options handling.
16435 ac_log="
16436 This file was extended by PostgreSQL $as_me 9.6beta1, which was
16437 generated by GNU Autoconf 2.69.  Invocation command line was
16438
16439   CONFIG_FILES    = $CONFIG_FILES
16440   CONFIG_HEADERS  = $CONFIG_HEADERS
16441   CONFIG_LINKS    = $CONFIG_LINKS
16442   CONFIG_COMMANDS = $CONFIG_COMMANDS
16443   $ $0 $@
16444
16445 on `(hostname || uname -n) 2>/dev/null | sed 1q`
16446 "
16447
16448 _ACEOF
16449
16450 case $ac_config_files in *"
16451 "*) set x $ac_config_files; shift; ac_config_files=$*;;
16452 esac
16453
16454 case $ac_config_headers in *"
16455 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16456 esac
16457
16458
16459 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16460 # Files that config.status was made for.
16461 config_files="$ac_config_files"
16462 config_headers="$ac_config_headers"
16463 config_links="$ac_config_links"
16464 config_commands="$ac_config_commands"
16465
16466 _ACEOF
16467
16468 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16469 ac_cs_usage="\
16470 \`$as_me' instantiates files and other configuration actions
16471 from templates according to the current configuration.  Unless the files
16472 and actions are specified as TAGs, all are instantiated by default.
16473
16474 Usage: $0 [OPTION]... [TAG]...
16475
16476   -h, --help       print this help, then exit
16477   -V, --version    print version number and configuration settings, then exit
16478       --config     print configuration, then exit
16479   -q, --quiet, --silent
16480                    do not print progress messages
16481   -d, --debug      don't remove temporary files
16482       --recheck    update $as_me by reconfiguring in the same conditions
16483       --file=FILE[:TEMPLATE]
16484                    instantiate the configuration file FILE
16485       --header=FILE[:TEMPLATE]
16486                    instantiate the configuration header FILE
16487
16488 Configuration files:
16489 $config_files
16490
16491 Configuration headers:
16492 $config_headers
16493
16494 Configuration links:
16495 $config_links
16496
16497 Configuration commands:
16498 $config_commands
16499
16500 Report bugs to <pgsql-bugs@postgresql.org>."
16501
16502 _ACEOF
16503 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16504 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
16505 ac_cs_version="\\
16506 PostgreSQL config.status 9.6beta1
16507 configured by $0, generated by GNU Autoconf 2.69,
16508   with options \\"\$ac_cs_config\\"
16509
16510 Copyright (C) 2012 Free Software Foundation, Inc.
16511 This config.status script is free software; the Free Software Foundation
16512 gives unlimited permission to copy, distribute and modify it."
16513
16514 ac_pwd='$ac_pwd'
16515 srcdir='$srcdir'
16516 INSTALL='$INSTALL'
16517 MKDIR_P='$MKDIR_P'
16518 AWK='$AWK'
16519 test -n "\$AWK" || AWK=awk
16520 _ACEOF
16521
16522 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16523 # The default lists apply if the user does not specify any file.
16524 ac_need_defaults=:
16525 while test $# != 0
16526 do
16527   case $1 in
16528   --*=?*)
16529     ac_option=`expr "X$1" : 'X\([^=]*\)='`
16530     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
16531     ac_shift=:
16532     ;;
16533   --*=)
16534     ac_option=`expr "X$1" : 'X\([^=]*\)='`
16535     ac_optarg=
16536     ac_shift=:
16537     ;;
16538   *)
16539     ac_option=$1
16540     ac_optarg=$2
16541     ac_shift=shift
16542     ;;
16543   esac
16544
16545   case $ac_option in
16546   # Handling of the options.
16547   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16548     ac_cs_recheck=: ;;
16549   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
16550     $as_echo "$ac_cs_version"; exit ;;
16551   --config | --confi | --conf | --con | --co | --c )
16552     $as_echo "$ac_cs_config"; exit ;;
16553   --debug | --debu | --deb | --de | --d | -d )
16554     debug=: ;;
16555   --file | --fil | --fi | --f )
16556     $ac_shift
16557     case $ac_optarg in
16558     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16559     '') as_fn_error $? "missing file argument" ;;
16560     esac
16561     as_fn_append CONFIG_FILES " '$ac_optarg'"
16562     ac_need_defaults=false;;
16563   --header | --heade | --head | --hea )
16564     $ac_shift
16565     case $ac_optarg in
16566     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16567     esac
16568     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
16569     ac_need_defaults=false;;
16570   --he | --h)
16571     # Conflict between --help and --header
16572     as_fn_error $? "ambiguous option: \`$1'
16573 Try \`$0 --help' for more information.";;
16574   --help | --hel | -h )
16575     $as_echo "$ac_cs_usage"; exit ;;
16576   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16577   | -silent | --silent | --silen | --sile | --sil | --si | --s)
16578     ac_cs_silent=: ;;
16579
16580   # This is an error.
16581   -*) as_fn_error $? "unrecognized option: \`$1'
16582 Try \`$0 --help' for more information." ;;
16583
16584   *) as_fn_append ac_config_targets " $1"
16585      ac_need_defaults=false ;;
16586
16587   esac
16588   shift
16589 done
16590
16591 ac_configure_extra_args=
16592
16593 if $ac_cs_silent; then
16594   exec 6>/dev/null
16595   ac_configure_extra_args="$ac_configure_extra_args --silent"
16596 fi
16597
16598 _ACEOF
16599 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16600 if \$ac_cs_recheck; then
16601   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
16602   shift
16603   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16604   CONFIG_SHELL='$SHELL'
16605   export CONFIG_SHELL
16606   exec "\$@"
16607 fi
16608
16609 _ACEOF
16610 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16611 exec 5>>config.log
16612 {
16613   echo
16614   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16615 ## Running $as_me. ##
16616 _ASBOX
16617   $as_echo "$ac_log"
16618 } >&5
16619
16620 _ACEOF
16621 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16622 _ACEOF
16623
16624 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16625
16626 # Handling of arguments.
16627 for ac_config_target in $ac_config_targets
16628 do
16629   case $ac_config_target in
16630     "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
16631     "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
16632     "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
16633     "src/backend/port/dynloader.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
16634     "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
16635     "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
16636     "src/include/dynloader.h") CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
16637     "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
16638     "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
16639     "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
16640     "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
16641     "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
16642     "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
16643
16644   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
16645   esac
16646 done
16647
16648
16649 # If the user did not use the arguments to specify the items to instantiate,
16650 # then the envvar interface is used.  Set only those that are not.
16651 # We use the long form for the default assignment because of an extremely
16652 # bizarre bug on SunOS 4.1.3.
16653 if $ac_need_defaults; then
16654   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16655   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16656   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
16657   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16658 fi
16659
16660 # Have a temporary directory for convenience.  Make it in the build tree
16661 # simply because there is no reason against having it here, and in addition,
16662 # creating and moving files from /tmp can sometimes cause problems.
16663 # Hook for its removal unless debugging.
16664 # Note that there is a small window in which the directory will not be cleaned:
16665 # after its creation but before its name has been assigned to `$tmp'.
16666 $debug ||
16667 {
16668   tmp= ac_tmp=
16669   trap 'exit_status=$?
16670   : "${ac_tmp:=$tmp}"
16671   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
16672 ' 0
16673   trap 'as_fn_exit 1' 1 2 13 15
16674 }
16675 # Create a (secure) tmp directory for tmp files.
16676
16677 {
16678   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
16679   test -d "$tmp"
16680 }  ||
16681 {
16682   tmp=./conf$$-$RANDOM
16683   (umask 077 && mkdir "$tmp")
16684 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
16685 ac_tmp=$tmp
16686
16687 # Set up the scripts for CONFIG_FILES section.
16688 # No need to generate them if there are no CONFIG_FILES.
16689 # This happens for instance with `./config.status config.h'.
16690 if test -n "$CONFIG_FILES"; then
16691
16692
16693 ac_cr=`echo X | tr X '\015'`
16694 # On cygwin, bash can eat \r inside `` if the user requested igncr.
16695 # But we know of no other shell where ac_cr would be empty at this
16696 # point, so we can use a bashism as a fallback.
16697 if test "x$ac_cr" = x; then
16698   eval ac_cr=\$\'\\r\'
16699 fi
16700 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16701 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
16702   ac_cs_awk_cr='\\r'
16703 else
16704   ac_cs_awk_cr=$ac_cr
16705 fi
16706
16707 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
16708 _ACEOF
16709
16710
16711 {
16712   echo "cat >conf$$subs.awk <<_ACEOF" &&
16713   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16714   echo "_ACEOF"
16715 } >conf$$subs.sh ||
16716   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16717 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
16718 ac_delim='%!_!# '
16719 for ac_last_try in false false false false false :; do
16720   . ./conf$$subs.sh ||
16721     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16722
16723   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16724   if test $ac_delim_n = $ac_delim_num; then
16725     break
16726   elif $ac_last_try; then
16727     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16728   else
16729     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16730   fi
16731 done
16732 rm -f conf$$subs.sh
16733
16734 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16735 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
16736 _ACEOF
16737 sed -n '
16738 h
16739 s/^/S["/; s/!.*/"]=/
16740 p
16741 g
16742 s/^[^!]*!//
16743 :repl
16744 t repl
16745 s/'"$ac_delim"'$//
16746 t delim
16747 :nl
16748 h
16749 s/\(.\{148\}\)..*/\1/
16750 t more1
16751 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16752 p
16753 n
16754 b repl
16755 :more1
16756 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16757 p
16758 g
16759 s/.\{148\}//
16760 t nl
16761 :delim
16762 h
16763 s/\(.\{148\}\)..*/\1/
16764 t more2
16765 s/["\\]/\\&/g; s/^/"/; s/$/"/
16766 p
16767 b
16768 :more2
16769 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16770 p
16771 g
16772 s/.\{148\}//
16773 t delim
16774 ' <conf$$subs.awk | sed '
16775 /^[^""]/{
16776   N
16777   s/\n//
16778 }
16779 ' >>$CONFIG_STATUS || ac_write_fail=1
16780 rm -f conf$$subs.awk
16781 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16782 _ACAWK
16783 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
16784   for (key in S) S_is_set[key] = 1
16785   FS = "\a"
16786
16787 }
16788 {
16789   line = $ 0
16790   nfields = split(line, field, "@")
16791   substed = 0
16792   len = length(field[1])
16793   for (i = 2; i < nfields; i++) {
16794     key = field[i]
16795     keylen = length(key)
16796     if (S_is_set[key]) {
16797       value = S[key]
16798       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16799       len += length(value) + length(field[++i])
16800       substed = 1
16801     } else
16802       len += 1 + keylen
16803   }
16804
16805   print line
16806 }
16807
16808 _ACAWK
16809 _ACEOF
16810 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16811 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16812   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16813 else
16814   cat
16815 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
16816   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
16817 _ACEOF
16818
16819 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16820 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
16821 # trailing colons and then remove the whole line if VPATH becomes empty
16822 # (actually we leave an empty line to preserve line numbers).
16823 if test "x$srcdir" = x.; then
16824   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
16825 h
16826 s///
16827 s/^/:/
16828 s/[      ]*$/:/
16829 s/:\$(srcdir):/:/g
16830 s/:\${srcdir}:/:/g
16831 s/:@srcdir@:/:/g
16832 s/^:*//
16833 s/:*$//
16834 x
16835 s/\(=[   ]*\).*/\1/
16836 G
16837 s/\n//
16838 s/^[^=]*=[       ]*$//
16839 }'
16840 fi
16841
16842 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16843 fi # test -n "$CONFIG_FILES"
16844
16845 # Set up the scripts for CONFIG_HEADERS section.
16846 # No need to generate them if there are no CONFIG_HEADERS.
16847 # This happens for instance with `./config.status Makefile'.
16848 if test -n "$CONFIG_HEADERS"; then
16849 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
16850 BEGIN {
16851 _ACEOF
16852
16853 # Transform confdefs.h into an awk script `defines.awk', embedded as
16854 # here-document in config.status, that substitutes the proper values into
16855 # config.h.in to produce config.h.
16856
16857 # Create a delimiter string that does not exist in confdefs.h, to ease
16858 # handling of long lines.
16859 ac_delim='%!_!# '
16860 for ac_last_try in false false :; do
16861   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16862   if test -z "$ac_tt"; then
16863     break
16864   elif $ac_last_try; then
16865     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
16866   else
16867     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16868   fi
16869 done
16870
16871 # For the awk script, D is an array of macro values keyed by name,
16872 # likewise P contains macro parameters if any.  Preserve backslash
16873 # newline sequences.
16874
16875 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16876 sed -n '
16877 s/.\{148\}/&'"$ac_delim"'/g
16878 t rset
16879 :rset
16880 s/^[     ]*#[    ]*define[       ][      ]*/ /
16881 t def
16882 d
16883 :def
16884 s/\\$//
16885 t bsnl
16886 s/["\\]/\\&/g
16887 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
16888 D["\1"]=" \3"/p
16889 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
16890 d
16891 :bsnl
16892 s/["\\]/\\&/g
16893 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
16894 D["\1"]=" \3\\\\\\n"\\/p
16895 t cont
16896 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16897 t cont
16898 d
16899 :cont
16900 n
16901 s/.\{148\}/&'"$ac_delim"'/g
16902 t clear
16903 :clear
16904 s/\\$//
16905 t bsnlc
16906 s/["\\]/\\&/g; s/^/"/; s/$/"/p
16907 d
16908 :bsnlc
16909 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16910 b cont
16911 ' <confdefs.h | sed '
16912 s/'"$ac_delim"'/"\\\
16913 "/g' >>$CONFIG_STATUS || ac_write_fail=1
16914
16915 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16916   for (key in D) D_is_set[key] = 1
16917   FS = "\a"
16918 }
16919 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16920   line = \$ 0
16921   split(line, arg, " ")
16922   if (arg[1] == "#") {
16923     defundef = arg[2]
16924     mac1 = arg[3]
16925   } else {
16926     defundef = substr(arg[1], 2)
16927     mac1 = arg[2]
16928   }
16929   split(mac1, mac2, "(") #)
16930   macro = mac2[1]
16931   prefix = substr(line, 1, index(line, defundef) - 1)
16932   if (D_is_set[macro]) {
16933     # Preserve the white space surrounding the "#".
16934     print prefix "define", macro P[macro] D[macro]
16935     next
16936   } else {
16937     # Replace #undef with comments.  This is necessary, for example,
16938     # in the case of _POSIX_SOURCE, which is predefined and required
16939     # on some systems where configure will not decide to define it.
16940     if (defundef == "undef") {
16941       print "/*", prefix defundef, macro, "*/"
16942       next
16943     }
16944   }
16945 }
16946 { print }
16947 _ACAWK
16948 _ACEOF
16949 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16950   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
16951 fi # test -n "$CONFIG_HEADERS"
16952
16953
16954 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
16955 shift
16956 for ac_tag
16957 do
16958   case $ac_tag in
16959   :[FHLC]) ac_mode=$ac_tag; continue;;
16960   esac
16961   case $ac_mode$ac_tag in
16962   :[FHL]*:*);;
16963   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
16964   :[FH]-) ac_tag=-:-;;
16965   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16966   esac
16967   ac_save_IFS=$IFS
16968   IFS=:
16969   set x $ac_tag
16970   IFS=$ac_save_IFS
16971   shift
16972   ac_file=$1
16973   shift
16974
16975   case $ac_mode in
16976   :L) ac_source=$1;;
16977   :[FH])
16978     ac_file_inputs=
16979     for ac_f
16980     do
16981       case $ac_f in
16982       -) ac_f="$ac_tmp/stdin";;
16983       *) # Look for the file first in the build tree, then in the source tree
16984          # (if the path is not absolute).  The absolute path cannot be DOS-style,
16985          # because $ac_f cannot contain `:'.
16986          test -f "$ac_f" ||
16987            case $ac_f in
16988            [\\/$]*) false;;
16989            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16990            esac ||
16991            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
16992       esac
16993       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16994       as_fn_append ac_file_inputs " '$ac_f'"
16995     done
16996
16997     # Let's still pretend it is `configure' which instantiates (i.e., don't
16998     # use $as_me), people would be surprised to read:
16999     #    /* config.h.  Generated by config.status.  */
17000     configure_input='Generated from '`
17001           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17002         `' by configure.'
17003     if test x"$ac_file" != x-; then
17004       configure_input="$ac_file.  $configure_input"
17005       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17006 $as_echo "$as_me: creating $ac_file" >&6;}
17007     fi
17008     # Neutralize special characters interpreted by sed in replacement strings.
17009     case $configure_input in #(
17010     *\&* | *\|* | *\\* )
17011        ac_sed_conf_input=`$as_echo "$configure_input" |
17012        sed 's/[\\\\&|]/\\\\&/g'`;; #(
17013     *) ac_sed_conf_input=$configure_input;;
17014     esac
17015
17016     case $ac_tag in
17017     *:-:* | *:-) cat >"$ac_tmp/stdin" \
17018       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
17019     esac
17020     ;;
17021   esac
17022
17023   ac_dir=`$as_dirname -- "$ac_file" ||
17024 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17025          X"$ac_file" : 'X\(//\)[^/]' \| \
17026          X"$ac_file" : 'X\(//\)$' \| \
17027          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
17028 $as_echo X"$ac_file" |
17029     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17030             s//\1/
17031             q
17032           }
17033           /^X\(\/\/\)[^/].*/{
17034             s//\1/
17035             q
17036           }
17037           /^X\(\/\/\)$/{
17038             s//\1/
17039             q
17040           }
17041           /^X\(\/\).*/{
17042             s//\1/
17043             q
17044           }
17045           s/.*/./; q'`
17046   as_dir="$ac_dir"; as_fn_mkdir_p
17047   ac_builddir=.
17048
17049 case "$ac_dir" in
17050 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17051 *)
17052   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
17053   # A ".." for each directory in $ac_dir_suffix.
17054   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
17055   case $ac_top_builddir_sub in
17056   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17057   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17058   esac ;;
17059 esac
17060 ac_abs_top_builddir=$ac_pwd
17061 ac_abs_builddir=$ac_pwd$ac_dir_suffix
17062 # for backward compatibility:
17063 ac_top_builddir=$ac_top_build_prefix
17064
17065 case $srcdir in
17066   .)  # We are building in place.
17067     ac_srcdir=.
17068     ac_top_srcdir=$ac_top_builddir_sub
17069     ac_abs_top_srcdir=$ac_pwd ;;
17070   [\\/]* | ?:[\\/]* )  # Absolute name.
17071     ac_srcdir=$srcdir$ac_dir_suffix;
17072     ac_top_srcdir=$srcdir
17073     ac_abs_top_srcdir=$srcdir ;;
17074   *) # Relative name.
17075     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17076     ac_top_srcdir=$ac_top_build_prefix$srcdir
17077     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
17078 esac
17079 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
17080
17081
17082   case $ac_mode in
17083   :F)
17084   #
17085   # CONFIG_FILE
17086   #
17087
17088   case $INSTALL in
17089   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
17090   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
17091   esac
17092   ac_MKDIR_P=$MKDIR_P
17093   case $MKDIR_P in
17094   [\\/$]* | ?:[\\/]* ) ;;
17095   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17096   esac
17097 _ACEOF
17098
17099 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17100 # If the template does not know about datarootdir, expand it.
17101 # FIXME: This hack should be removed a few years after 2.60.
17102 ac_datarootdir_hack=; ac_datarootdir_seen=
17103 ac_sed_dataroot='
17104 /datarootdir/ {
17105   p
17106   q
17107 }
17108 /@datadir@/p
17109 /@docdir@/p
17110 /@infodir@/p
17111 /@localedir@/p
17112 /@mandir@/p'
17113 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
17114 *datarootdir*) ac_datarootdir_seen=yes;;
17115 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
17116   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17117 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
17118 _ACEOF
17119 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17120   ac_datarootdir_hack='
17121   s&@datadir@&$datadir&g
17122   s&@docdir@&$docdir&g
17123   s&@infodir@&$infodir&g
17124   s&@localedir@&$localedir&g
17125   s&@mandir@&$mandir&g
17126   s&\\\${datarootdir}&$datarootdir&g' ;;
17127 esac
17128 _ACEOF
17129
17130 # Neutralize VPATH when `$srcdir' = `.'.
17131 # Shell code in configure.ac might set extrasub.
17132 # FIXME: do we really want to maintain this feature?
17133 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17134 ac_sed_extra="$ac_vpsub
17135 $extrasub
17136 _ACEOF
17137 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17138 :t
17139 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17140 s|@configure_input@|$ac_sed_conf_input|;t t
17141 s&@top_builddir@&$ac_top_builddir_sub&;t t
17142 s&@top_build_prefix@&$ac_top_build_prefix&;t t
17143 s&@srcdir@&$ac_srcdir&;t t
17144 s&@abs_srcdir@&$ac_abs_srcdir&;t t
17145 s&@top_srcdir@&$ac_top_srcdir&;t t
17146 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17147 s&@builddir@&$ac_builddir&;t t
17148 s&@abs_builddir@&$ac_abs_builddir&;t t
17149 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17150 s&@INSTALL@&$ac_INSTALL&;t t
17151 s&@MKDIR_P@&$ac_MKDIR_P&;t t
17152 $ac_datarootdir_hack
17153 "
17154 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17155   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17156
17157 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
17158   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17159   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
17160       "$ac_tmp/out"`; test -z "$ac_out"; } &&
17161   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17162 which seems to be undefined.  Please make sure it is defined" >&5
17163 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17164 which seems to be undefined.  Please make sure it is defined" >&2;}
17165
17166   rm -f "$ac_tmp/stdin"
17167   case $ac_file in
17168   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17169   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
17170   esac \
17171   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17172  ;;
17173   :H)
17174   #
17175   # CONFIG_HEADER
17176   #
17177   if test x"$ac_file" != x-; then
17178     {
17179       $as_echo "/* $configure_input  */" \
17180       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17181     } >"$ac_tmp/config.h" \
17182       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17183     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
17184       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17185 $as_echo "$as_me: $ac_file is unchanged" >&6;}
17186     else
17187       rm -f "$ac_file"
17188       mv "$ac_tmp/config.h" "$ac_file" \
17189         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17190     fi
17191   else
17192     $as_echo "/* $configure_input  */" \
17193       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
17194       || as_fn_error $? "could not create -" "$LINENO" 5
17195   fi
17196  ;;
17197   :L)
17198   #
17199   # CONFIG_LINK
17200   #
17201
17202   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
17203     :
17204   else
17205     # Prefer the file from the source tree if names are identical.
17206     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
17207       ac_source=$srcdir/$ac_source
17208     fi
17209
17210     { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
17211 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
17212
17213     if test ! -r "$ac_source"; then
17214       as_fn_error $? "$ac_source: file not found" "$LINENO" 5
17215     fi
17216     rm -f "$ac_file"
17217
17218     # Try a relative symlink, then a hard link, then a copy.
17219     case $ac_source in
17220     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
17221         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
17222     esac
17223     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
17224       ln "$ac_source" "$ac_file" 2>/dev/null ||
17225       cp -p "$ac_source" "$ac_file" ||
17226       as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
17227   fi
17228  ;;
17229   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
17230 $as_echo "$as_me: executing $ac_file commands" >&6;}
17231  ;;
17232   esac
17233
17234
17235   case $ac_file$ac_mode in
17236     "check_win32_symlinks":C)
17237 # Links sometimes fail undetected on Mingw -
17238 # so here we detect it and warn the user
17239 for FILE in $CONFIG_LINKS
17240  do
17241         # test -e works for symlinks in the MinGW console
17242         test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
17243 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
17244  done
17245  ;;
17246     "src/include/pg_config.h":H)
17247 # Update timestamp for pg_config.h (see Makefile.global)
17248 echo >src/include/stamp-h
17249  ;;
17250     "src/include/pg_config_ext.h":H)
17251 # Update timestamp for pg_config_ext.h (see Makefile.global)
17252 echo >src/include/stamp-ext-h
17253  ;;
17254     "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
17255
17256   esac
17257 done # for ac_tag
17258
17259
17260 as_fn_exit 0
17261 _ACEOF
17262 ac_clean_files=$ac_clean_files_save
17263
17264 test $ac_write_fail = 0 ||
17265   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
17266
17267
17268 # configure is writing to config.log, and then calls config.status.
17269 # config.status does its own redirection, appending to config.log.
17270 # Unfortunately, on DOS this fails, as config.log is still kept open
17271 # by configure, so config.status won't be able to write to it; its
17272 # output is simply discarded.  So we exec the FD to /dev/null,
17273 # effectively closing config.log, so it can be properly (re)opened and
17274 # appended to by config.status.  When coming back to configure, we
17275 # need to make the FD available again.
17276 if test "$no_create" != yes; then
17277   ac_cs_success=:
17278   ac_config_status_args=
17279   test "$silent" = yes &&
17280     ac_config_status_args="$ac_config_status_args --quiet"
17281   exec 5>/dev/null
17282   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
17283   exec 5>>config.log
17284   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17285   # would make configure fail if this is the last instruction.
17286   $ac_cs_success || as_fn_exit 1
17287 fi
17288 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17289   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17290 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
17291 fi
17292