]> granicus.if.org Git - postgresql/blob - configure
postgres_fdw: Teach IMPORT FOREIGN SCHEMA about partitioning.
[postgresql] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for PostgreSQL 10devel.
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-2017, 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='10devel'
586 PACKAGE_STRING='PostgreSQL 10devel'
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 with_gnu_ld
698 LD
699 LDFLAGS_SL
700 LDFLAGS_EX
701 ELF_SYS
702 EGREP
703 GREP
704 with_zlib
705 with_system_tzdata
706 with_libxslt
707 with_libxml
708 XML2_CONFIG
709 UUID_EXTRA_OBJS
710 with_uuid
711 with_systemd
712 with_selinux
713 with_openssl
714 krb_srvtab
715 with_python
716 with_perl
717 with_tcl
718 ICU_LIBS
719 ICU_CFLAGS
720 PKG_CONFIG_LIBDIR
721 PKG_CONFIG_PATH
722 PKG_CONFIG
723 with_icu
724 enable_thread_safety
725 INCLUDES
726 autodepend
727 TAS
728 GCC
729 CPP
730 CFLAGS_VECTOR
731 SUN_STUDIO_CC
732 OBJEXT
733 EXEEXT
734 ac_ct_CC
735 CPPFLAGS
736 LDFLAGS
737 CFLAGS
738 CC
739 enable_tap_tests
740 enable_dtrace
741 DTRACEFLAGS
742 DTRACE
743 enable_coverage
744 GENHTML
745 LCOV
746 GCOV
747 enable_debug
748 enable_strong_random
749 enable_rpath
750 default_port
751 WANTED_LANGUAGES
752 enable_nls
753 PORTNAME
754 host_os
755 host_vendor
756 host_cpu
757 host
758 build_os
759 build_vendor
760 build_cpu
761 build
762 PG_MAJORVERSION
763 configure_args
764 target_alias
765 host_alias
766 build_alias
767 LIBS
768 ECHO_T
769 ECHO_N
770 ECHO_C
771 DEFS
772 mandir
773 localedir
774 libdir
775 psdir
776 pdfdir
777 dvidir
778 htmldir
779 infodir
780 docdir
781 oldincludedir
782 includedir
783 localstatedir
784 sharedstatedir
785 sysconfdir
786 datadir
787 datarootdir
788 libexecdir
789 sbindir
790 bindir
791 program_transform_name
792 prefix
793 exec_prefix
794 PACKAGE_URL
795 PACKAGE_BUGREPORT
796 PACKAGE_STRING
797 PACKAGE_VERSION
798 PACKAGE_TARNAME
799 PACKAGE_NAME
800 PATH_SEPARATOR
801 SHELL'
802 ac_subst_files=''
803 ac_user_opts='
804 enable_option_checking
805 with_extra_version
806 with_template
807 with_includes
808 with_libraries
809 with_libs
810 enable_integer_datetimes
811 enable_nls
812 with_pgport
813 enable_rpath
814 enable_spinlocks
815 enable_atomics
816 enable_strong_random
817 enable_debug
818 enable_profiling
819 enable_coverage
820 enable_dtrace
821 enable_tap_tests
822 with_blocksize
823 with_segsize
824 with_wal_blocksize
825 with_wal_segsize
826 with_CC
827 enable_depend
828 enable_cassert
829 enable_thread_safety
830 with_icu
831 with_tcl
832 with_tclconfig
833 with_perl
834 with_python
835 with_gssapi
836 with_krb_srvnam
837 with_pam
838 with_bsd_auth
839 with_ldap
840 with_bonjour
841 with_openssl
842 with_selinux
843 with_systemd
844 with_readline
845 with_libedit_preferred
846 with_uuid
847 with_ossp_uuid
848 with_libxml
849 with_libxslt
850 with_system_tzdata
851 with_zlib
852 with_gnu_ld
853 enable_largefile
854 enable_float4_byval
855 enable_float8_byval
856 '
857       ac_precious_vars='build_alias
858 host_alias
859 target_alias
860 CC
861 CFLAGS
862 LDFLAGS
863 LIBS
864 CPPFLAGS
865 CPP
866 PKG_CONFIG
867 PKG_CONFIG_PATH
868 PKG_CONFIG_LIBDIR
869 ICU_CFLAGS
870 ICU_LIBS
871 LDFLAGS_EX
872 LDFLAGS_SL
873 DOCBOOKSTYLE'
874
875
876 # Initialize some variables set by options.
877 ac_init_help=
878 ac_init_version=false
879 ac_unrecognized_opts=
880 ac_unrecognized_sep=
881 # The variables have the same names as the options, with
882 # dashes changed to underlines.
883 cache_file=/dev/null
884 exec_prefix=NONE
885 no_create=
886 no_recursion=
887 prefix=NONE
888 program_prefix=NONE
889 program_suffix=NONE
890 program_transform_name=s,x,x,
891 silent=
892 site=
893 srcdir=
894 verbose=
895 x_includes=NONE
896 x_libraries=NONE
897
898 # Installation directory options.
899 # These are left unexpanded so users can "make install exec_prefix=/foo"
900 # and all the variables that are supposed to be based on exec_prefix
901 # by default will actually change.
902 # Use braces instead of parens because sh, perl, etc. also accept them.
903 # (The list follows the same order as the GNU Coding Standards.)
904 bindir='${exec_prefix}/bin'
905 sbindir='${exec_prefix}/sbin'
906 libexecdir='${exec_prefix}/libexec'
907 datarootdir='${prefix}/share'
908 datadir='${datarootdir}'
909 sysconfdir='${prefix}/etc'
910 sharedstatedir='${prefix}/com'
911 localstatedir='${prefix}/var'
912 includedir='${prefix}/include'
913 oldincludedir='/usr/include'
914 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
915 infodir='${datarootdir}/info'
916 htmldir='${docdir}'
917 dvidir='${docdir}'
918 pdfdir='${docdir}'
919 psdir='${docdir}'
920 libdir='${exec_prefix}/lib'
921 localedir='${datarootdir}/locale'
922 mandir='${datarootdir}/man'
923
924 ac_prev=
925 ac_dashdash=
926 for ac_option
927 do
928   # If the previous option needs an argument, assign it.
929   if test -n "$ac_prev"; then
930     eval $ac_prev=\$ac_option
931     ac_prev=
932     continue
933   fi
934
935   case $ac_option in
936   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
937   *=)   ac_optarg= ;;
938   *)    ac_optarg=yes ;;
939   esac
940
941   # Accept the important Cygnus configure options, so we can diagnose typos.
942
943   case $ac_dashdash$ac_option in
944   --)
945     ac_dashdash=yes ;;
946
947   -bindir | --bindir | --bindi | --bind | --bin | --bi)
948     ac_prev=bindir ;;
949   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
950     bindir=$ac_optarg ;;
951
952   -build | --build | --buil | --bui | --bu)
953     ac_prev=build_alias ;;
954   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
955     build_alias=$ac_optarg ;;
956
957   -cache-file | --cache-file | --cache-fil | --cache-fi \
958   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
959     ac_prev=cache_file ;;
960   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
961   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
962     cache_file=$ac_optarg ;;
963
964   --config-cache | -C)
965     cache_file=config.cache ;;
966
967   -datadir | --datadir | --datadi | --datad)
968     ac_prev=datadir ;;
969   -datadir=* | --datadir=* | --datadi=* | --datad=*)
970     datadir=$ac_optarg ;;
971
972   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
973   | --dataroo | --dataro | --datar)
974     ac_prev=datarootdir ;;
975   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
976   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
977     datarootdir=$ac_optarg ;;
978
979   -disable-* | --disable-*)
980     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
981     # Reject names that are not valid shell variable names.
982     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
983       as_fn_error $? "invalid feature name: $ac_useropt"
984     ac_useropt_orig=$ac_useropt
985     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
986     case $ac_user_opts in
987       *"
988 "enable_$ac_useropt"
989 "*) ;;
990       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
991          ac_unrecognized_sep=', ';;
992     esac
993     eval enable_$ac_useropt=no ;;
994
995   -docdir | --docdir | --docdi | --doc | --do)
996     ac_prev=docdir ;;
997   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
998     docdir=$ac_optarg ;;
999
1000   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1001     ac_prev=dvidir ;;
1002   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1003     dvidir=$ac_optarg ;;
1004
1005   -enable-* | --enable-*)
1006     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1007     # Reject names that are not valid shell variable names.
1008     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1009       as_fn_error $? "invalid feature name: $ac_useropt"
1010     ac_useropt_orig=$ac_useropt
1011     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1012     case $ac_user_opts in
1013       *"
1014 "enable_$ac_useropt"
1015 "*) ;;
1016       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1017          ac_unrecognized_sep=', ';;
1018     esac
1019     eval enable_$ac_useropt=\$ac_optarg ;;
1020
1021   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1022   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1023   | --exec | --exe | --ex)
1024     ac_prev=exec_prefix ;;
1025   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1026   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1027   | --exec=* | --exe=* | --ex=*)
1028     exec_prefix=$ac_optarg ;;
1029
1030   -gas | --gas | --ga | --g)
1031     # Obsolete; use --with-gas.
1032     with_gas=yes ;;
1033
1034   -help | --help | --hel | --he | -h)
1035     ac_init_help=long ;;
1036   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1037     ac_init_help=recursive ;;
1038   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1039     ac_init_help=short ;;
1040
1041   -host | --host | --hos | --ho)
1042     ac_prev=host_alias ;;
1043   -host=* | --host=* | --hos=* | --ho=*)
1044     host_alias=$ac_optarg ;;
1045
1046   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1047     ac_prev=htmldir ;;
1048   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1049   | --ht=*)
1050     htmldir=$ac_optarg ;;
1051
1052   -includedir | --includedir | --includedi | --included | --include \
1053   | --includ | --inclu | --incl | --inc)
1054     ac_prev=includedir ;;
1055   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1056   | --includ=* | --inclu=* | --incl=* | --inc=*)
1057     includedir=$ac_optarg ;;
1058
1059   -infodir | --infodir | --infodi | --infod | --info | --inf)
1060     ac_prev=infodir ;;
1061   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1062     infodir=$ac_optarg ;;
1063
1064   -libdir | --libdir | --libdi | --libd)
1065     ac_prev=libdir ;;
1066   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1067     libdir=$ac_optarg ;;
1068
1069   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1070   | --libexe | --libex | --libe)
1071     ac_prev=libexecdir ;;
1072   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1073   | --libexe=* | --libex=* | --libe=*)
1074     libexecdir=$ac_optarg ;;
1075
1076   -localedir | --localedir | --localedi | --localed | --locale)
1077     ac_prev=localedir ;;
1078   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1079     localedir=$ac_optarg ;;
1080
1081   -localstatedir | --localstatedir | --localstatedi | --localstated \
1082   | --localstate | --localstat | --localsta | --localst | --locals)
1083     ac_prev=localstatedir ;;
1084   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1085   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1086     localstatedir=$ac_optarg ;;
1087
1088   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1089     ac_prev=mandir ;;
1090   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1091     mandir=$ac_optarg ;;
1092
1093   -nfp | --nfp | --nf)
1094     # Obsolete; use --without-fp.
1095     with_fp=no ;;
1096
1097   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1098   | --no-cr | --no-c | -n)
1099     no_create=yes ;;
1100
1101   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1102   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1103     no_recursion=yes ;;
1104
1105   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1106   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1107   | --oldin | --oldi | --old | --ol | --o)
1108     ac_prev=oldincludedir ;;
1109   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1110   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1111   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1112     oldincludedir=$ac_optarg ;;
1113
1114   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1115     ac_prev=prefix ;;
1116   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1117     prefix=$ac_optarg ;;
1118
1119   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1120   | --program-pre | --program-pr | --program-p)
1121     ac_prev=program_prefix ;;
1122   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1123   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1124     program_prefix=$ac_optarg ;;
1125
1126   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1127   | --program-suf | --program-su | --program-s)
1128     ac_prev=program_suffix ;;
1129   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1130   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1131     program_suffix=$ac_optarg ;;
1132
1133   -program-transform-name | --program-transform-name \
1134   | --program-transform-nam | --program-transform-na \
1135   | --program-transform-n | --program-transform- \
1136   | --program-transform | --program-transfor \
1137   | --program-transfo | --program-transf \
1138   | --program-trans | --program-tran \
1139   | --progr-tra | --program-tr | --program-t)
1140     ac_prev=program_transform_name ;;
1141   -program-transform-name=* | --program-transform-name=* \
1142   | --program-transform-nam=* | --program-transform-na=* \
1143   | --program-transform-n=* | --program-transform-=* \
1144   | --program-transform=* | --program-transfor=* \
1145   | --program-transfo=* | --program-transf=* \
1146   | --program-trans=* | --program-tran=* \
1147   | --progr-tra=* | --program-tr=* | --program-t=*)
1148     program_transform_name=$ac_optarg ;;
1149
1150   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1151     ac_prev=pdfdir ;;
1152   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1153     pdfdir=$ac_optarg ;;
1154
1155   -psdir | --psdir | --psdi | --psd | --ps)
1156     ac_prev=psdir ;;
1157   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1158     psdir=$ac_optarg ;;
1159
1160   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1161   | -silent | --silent | --silen | --sile | --sil)
1162     silent=yes ;;
1163
1164   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1165     ac_prev=sbindir ;;
1166   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1167   | --sbi=* | --sb=*)
1168     sbindir=$ac_optarg ;;
1169
1170   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1171   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1172   | --sharedst | --shareds | --shared | --share | --shar \
1173   | --sha | --sh)
1174     ac_prev=sharedstatedir ;;
1175   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1176   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1177   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1178   | --sha=* | --sh=*)
1179     sharedstatedir=$ac_optarg ;;
1180
1181   -site | --site | --sit)
1182     ac_prev=site ;;
1183   -site=* | --site=* | --sit=*)
1184     site=$ac_optarg ;;
1185
1186   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1187     ac_prev=srcdir ;;
1188   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1189     srcdir=$ac_optarg ;;
1190
1191   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1192   | --syscon | --sysco | --sysc | --sys | --sy)
1193     ac_prev=sysconfdir ;;
1194   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1195   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1196     sysconfdir=$ac_optarg ;;
1197
1198   -target | --target | --targe | --targ | --tar | --ta | --t)
1199     ac_prev=target_alias ;;
1200   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1201     target_alias=$ac_optarg ;;
1202
1203   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1204     verbose=yes ;;
1205
1206   -version | --version | --versio | --versi | --vers | -V)
1207     ac_init_version=: ;;
1208
1209   -with-* | --with-*)
1210     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1211     # Reject names that are not valid shell variable names.
1212     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1213       as_fn_error $? "invalid package name: $ac_useropt"
1214     ac_useropt_orig=$ac_useropt
1215     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1216     case $ac_user_opts in
1217       *"
1218 "with_$ac_useropt"
1219 "*) ;;
1220       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1221          ac_unrecognized_sep=', ';;
1222     esac
1223     eval with_$ac_useropt=\$ac_optarg ;;
1224
1225   -without-* | --without-*)
1226     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1227     # Reject names that are not valid shell variable names.
1228     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1229       as_fn_error $? "invalid package name: $ac_useropt"
1230     ac_useropt_orig=$ac_useropt
1231     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1232     case $ac_user_opts in
1233       *"
1234 "with_$ac_useropt"
1235 "*) ;;
1236       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1237          ac_unrecognized_sep=', ';;
1238     esac
1239     eval with_$ac_useropt=no ;;
1240
1241   --x)
1242     # Obsolete; use --with-x.
1243     with_x=yes ;;
1244
1245   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1246   | --x-incl | --x-inc | --x-in | --x-i)
1247     ac_prev=x_includes ;;
1248   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1249   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1250     x_includes=$ac_optarg ;;
1251
1252   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1253   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1254     ac_prev=x_libraries ;;
1255   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1256   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1257     x_libraries=$ac_optarg ;;
1258
1259   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1260 Try \`$0 --help' for more information"
1261     ;;
1262
1263   *=*)
1264     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1265     # Reject names that are not valid shell variable names.
1266     case $ac_envvar in #(
1267       '' | [0-9]* | *[!_$as_cr_alnum]* )
1268       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1269     esac
1270     eval $ac_envvar=\$ac_optarg
1271     export $ac_envvar ;;
1272
1273   *)
1274     # FIXME: should be removed in autoconf 3.0.
1275     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1276     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1277       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1278     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1279     ;;
1280
1281   esac
1282 done
1283
1284 if test -n "$ac_prev"; then
1285   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1286   as_fn_error $? "missing argument to $ac_option"
1287 fi
1288
1289 if test -n "$ac_unrecognized_opts"; then
1290   case $enable_option_checking in
1291     no) ;;
1292     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1293     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1294   esac
1295 fi
1296
1297 # Check all directory arguments for consistency.
1298 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1299                 datadir sysconfdir sharedstatedir localstatedir includedir \
1300                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1301                 libdir localedir mandir
1302 do
1303   eval ac_val=\$$ac_var
1304   # Remove trailing slashes.
1305   case $ac_val in
1306     */ )
1307       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1308       eval $ac_var=\$ac_val;;
1309   esac
1310   # Be sure to have absolute directory names.
1311   case $ac_val in
1312     [\\/$]* | ?:[\\/]* )  continue;;
1313     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1314   esac
1315   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1316 done
1317
1318 # There might be people who depend on the old broken behavior: `$host'
1319 # used to hold the argument of --host etc.
1320 # FIXME: To remove some day.
1321 build=$build_alias
1322 host=$host_alias
1323 target=$target_alias
1324
1325 # FIXME: To remove some day.
1326 if test "x$host_alias" != x; then
1327   if test "x$build_alias" = x; then
1328     cross_compiling=maybe
1329   elif test "x$build_alias" != "x$host_alias"; then
1330     cross_compiling=yes
1331   fi
1332 fi
1333
1334 ac_tool_prefix=
1335 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1336
1337 test "$silent" = yes && exec 6>/dev/null
1338
1339
1340 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1341 ac_ls_di=`ls -di .` &&
1342 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1343   as_fn_error $? "working directory cannot be determined"
1344 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1345   as_fn_error $? "pwd does not report name of working directory"
1346
1347
1348 # Find the source files, if location was not specified.
1349 if test -z "$srcdir"; then
1350   ac_srcdir_defaulted=yes
1351   # Try the directory containing this script, then the parent directory.
1352   ac_confdir=`$as_dirname -- "$as_myself" ||
1353 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1354          X"$as_myself" : 'X\(//\)[^/]' \| \
1355          X"$as_myself" : 'X\(//\)$' \| \
1356          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1357 $as_echo X"$as_myself" |
1358     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1359             s//\1/
1360             q
1361           }
1362           /^X\(\/\/\)[^/].*/{
1363             s//\1/
1364             q
1365           }
1366           /^X\(\/\/\)$/{
1367             s//\1/
1368             q
1369           }
1370           /^X\(\/\).*/{
1371             s//\1/
1372             q
1373           }
1374           s/.*/./; q'`
1375   srcdir=$ac_confdir
1376   if test ! -r "$srcdir/$ac_unique_file"; then
1377     srcdir=..
1378   fi
1379 else
1380   ac_srcdir_defaulted=no
1381 fi
1382 if test ! -r "$srcdir/$ac_unique_file"; then
1383   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1384   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1385 fi
1386 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1387 ac_abs_confdir=`(
1388         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1389         pwd)`
1390 # When building in place, set srcdir=.
1391 if test "$ac_abs_confdir" = "$ac_pwd"; then
1392   srcdir=.
1393 fi
1394 # Remove unnecessary trailing slashes from srcdir.
1395 # Double slashes in file names in object file debugging info
1396 # mess up M-x gdb in Emacs.
1397 case $srcdir in
1398 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1399 esac
1400 for ac_var in $ac_precious_vars; do
1401   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1402   eval ac_env_${ac_var}_value=\$${ac_var}
1403   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1404   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1405 done
1406
1407 #
1408 # Report the --help message.
1409 #
1410 if test "$ac_init_help" = "long"; then
1411   # Omit some internal or obsolete options to make the list less imposing.
1412   # This message is too long to be a string in the A/UX 3.1 sh.
1413   cat <<_ACEOF
1414 \`configure' configures PostgreSQL 10devel to adapt to many kinds of systems.
1415
1416 Usage: $0 [OPTION]... [VAR=VALUE]...
1417
1418 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1419 VAR=VALUE.  See below for descriptions of some of the useful variables.
1420
1421 Defaults for the options are specified in brackets.
1422
1423 Configuration:
1424   -h, --help              display this help and exit
1425       --help=short        display options specific to this package
1426       --help=recursive    display the short help of all the included packages
1427   -V, --version           display version information and exit
1428   -q, --quiet, --silent   do not print \`checking ...' messages
1429       --cache-file=FILE   cache test results in FILE [disabled]
1430   -C, --config-cache      alias for \`--cache-file=config.cache'
1431   -n, --no-create         do not create output files
1432       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1433
1434 Installation directories:
1435   --prefix=PREFIX         install architecture-independent files in PREFIX
1436                           [$ac_default_prefix]
1437   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1438                           [PREFIX]
1439
1440 By default, \`make install' will install all the files in
1441 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1442 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1443 for instance \`--prefix=\$HOME'.
1444
1445 For better control, use the options below.
1446
1447 Fine tuning of the installation directories:
1448   --bindir=DIR            user executables [EPREFIX/bin]
1449   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1450   --libexecdir=DIR        program executables [EPREFIX/libexec]
1451   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1452   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1453   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1454   --libdir=DIR            object code libraries [EPREFIX/lib]
1455   --includedir=DIR        C header files [PREFIX/include]
1456   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1457   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1458   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1459   --infodir=DIR           info documentation [DATAROOTDIR/info]
1460   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1461   --mandir=DIR            man documentation [DATAROOTDIR/man]
1462   --docdir=DIR            documentation root [DATAROOTDIR/doc/postgresql]
1463   --htmldir=DIR           html documentation [DOCDIR]
1464   --dvidir=DIR            dvi documentation [DOCDIR]
1465   --pdfdir=DIR            pdf documentation [DOCDIR]
1466   --psdir=DIR             ps documentation [DOCDIR]
1467 _ACEOF
1468
1469   cat <<\_ACEOF
1470
1471 System types:
1472   --build=BUILD     configure for building on BUILD [guessed]
1473   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1474 _ACEOF
1475 fi
1476
1477 if test -n "$ac_init_help"; then
1478   case $ac_init_help in
1479      short | recursive ) echo "Configuration of PostgreSQL 10devel:";;
1480    esac
1481   cat <<\_ACEOF
1482
1483 Optional Features:
1484   --disable-option-checking  ignore unrecognized --enable/--with options
1485   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1486   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1487   --disable-integer-datetimes
1488                           obsolete option, no longer supported
1489   --enable-nls[=LANGUAGES]
1490                           enable Native Language Support
1491   --disable-rpath         do not embed shared library search path in
1492                           executables
1493   --disable-spinlocks     do not use spinlocks
1494   --disable-atomics       do not use atomic operations
1495   --disable-strong-random do not use a strong random number source
1496   --enable-debug          build with debugging symbols (-g)
1497   --enable-profiling      build with profiling enabled
1498   --enable-coverage       build with coverage testing instrumentation
1499   --enable-dtrace         build with DTrace support
1500   --enable-tap-tests      enable TAP tests (requires Perl and IPC::Run)
1501   --enable-depend         turn on automatic dependency tracking
1502   --enable-cassert        enable assertion checks (for debugging)
1503   --disable-thread-safety disable thread-safety in client libraries
1504   --disable-largefile     omit support for large files
1505   --disable-float4-byval  disable float4 passed by value
1506   --disable-float8-byval  disable float8 passed by value
1507
1508 Optional Packages:
1509   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1510   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1511   --with-extra-version=STRING
1512                           append STRING to version
1513   --with-template=NAME    override operating system template
1514   --with-includes=DIRS    look for additional header files in DIRS
1515   --with-libraries=DIRS   look for additional libraries in DIRS
1516   --with-libs=DIRS        alternative spelling of --with-libraries
1517   --with-pgport=PORTNUM   set default port number [5432]
1518   --with-blocksize=BLOCKSIZE
1519                           set table block size in kB [8]
1520   --with-segsize=SEGSIZE  set table segment size in GB [1]
1521   --with-wal-blocksize=BLOCKSIZE
1522                           set WAL block size in kB [8]
1523   --with-wal-segsize=SEGSIZE
1524                           set WAL segment size in MB [16]
1525   --with-CC=CMD           set compiler (deprecated)
1526   --with-icu              build with ICU support
1527   --with-tcl              build Tcl modules (PL/Tcl)
1528   --with-tclconfig=DIR    tclConfig.sh is in DIR
1529   --with-perl             build Perl modules (PL/Perl)
1530   --with-python           build Python modules (PL/Python)
1531   --with-gssapi           build with GSSAPI support
1532   --with-krb-srvnam=NAME  default service principal name in Kerberos (GSSAPI)
1533                           [postgres]
1534   --with-pam              build with PAM support
1535   --with-bsd-auth         build with BSD Authentication support
1536   --with-ldap             build with LDAP support
1537   --with-bonjour          build with Bonjour support
1538   --with-openssl          build with OpenSSL support
1539   --with-selinux          build with SELinux support
1540   --with-systemd          build with systemd support
1541   --without-readline      do not use GNU Readline nor BSD Libedit for editing
1542   --with-libedit-preferred
1543                           prefer BSD Libedit over GNU Readline
1544   --with-uuid=LIB         build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1545   --with-ossp-uuid        obsolete spelling of --with-uuid=ossp
1546   --with-libxml           build with XML support
1547   --with-libxslt          use XSLT support when building contrib/xml2
1548   --with-system-tzdata=DIR
1549                           use system time zone data in DIR
1550   --without-zlib          do not use Zlib
1551   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1552
1553 Some influential environment variables:
1554   CC          C compiler command
1555   CFLAGS      C compiler flags
1556   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1557               nonstandard directory <lib dir>
1558   LIBS        libraries to pass to the linker, e.g. -l<library>
1559   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1560               you have headers in a nonstandard directory <include dir>
1561   CPP         C preprocessor
1562   PKG_CONFIG  path to pkg-config utility
1563   PKG_CONFIG_PATH
1564               directories to add to pkg-config's search path
1565   PKG_CONFIG_LIBDIR
1566               path overriding pkg-config's built-in search path
1567   ICU_CFLAGS  C compiler flags for ICU, overriding pkg-config
1568   ICU_LIBS    linker flags for ICU, overriding pkg-config
1569   LDFLAGS_EX  extra linker flags for linking executables only
1570   LDFLAGS_SL  extra linker flags for linking shared libraries only
1571   DOCBOOKSTYLE
1572               location of DocBook stylesheets
1573
1574 Use these variables to override the choices made by `configure' or to help
1575 it to find libraries and programs with nonstandard names/locations.
1576
1577 Report bugs to <pgsql-bugs@postgresql.org>.
1578 _ACEOF
1579 ac_status=$?
1580 fi
1581
1582 if test "$ac_init_help" = "recursive"; then
1583   # If there are subdirs, report their specific --help.
1584   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1585     test -d "$ac_dir" ||
1586       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1587       continue
1588     ac_builddir=.
1589
1590 case "$ac_dir" in
1591 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1592 *)
1593   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1594   # A ".." for each directory in $ac_dir_suffix.
1595   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1596   case $ac_top_builddir_sub in
1597   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1598   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1599   esac ;;
1600 esac
1601 ac_abs_top_builddir=$ac_pwd
1602 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1603 # for backward compatibility:
1604 ac_top_builddir=$ac_top_build_prefix
1605
1606 case $srcdir in
1607   .)  # We are building in place.
1608     ac_srcdir=.
1609     ac_top_srcdir=$ac_top_builddir_sub
1610     ac_abs_top_srcdir=$ac_pwd ;;
1611   [\\/]* | ?:[\\/]* )  # Absolute name.
1612     ac_srcdir=$srcdir$ac_dir_suffix;
1613     ac_top_srcdir=$srcdir
1614     ac_abs_top_srcdir=$srcdir ;;
1615   *) # Relative name.
1616     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1617     ac_top_srcdir=$ac_top_build_prefix$srcdir
1618     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1619 esac
1620 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1621
1622     cd "$ac_dir" || { ac_status=$?; continue; }
1623     # Check for guested configure.
1624     if test -f "$ac_srcdir/configure.gnu"; then
1625       echo &&
1626       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1627     elif test -f "$ac_srcdir/configure"; then
1628       echo &&
1629       $SHELL "$ac_srcdir/configure" --help=recursive
1630     else
1631       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1632     fi || ac_status=$?
1633     cd "$ac_pwd" || { ac_status=$?; break; }
1634   done
1635 fi
1636
1637 test -n "$ac_init_help" && exit $ac_status
1638 if $ac_init_version; then
1639   cat <<\_ACEOF
1640 PostgreSQL configure 10devel
1641 generated by GNU Autoconf 2.69
1642
1643 Copyright (C) 2012 Free Software Foundation, Inc.
1644 This configure script is free software; the Free Software Foundation
1645 gives unlimited permission to copy, distribute and modify it.
1646
1647 Copyright (c) 1996-2017, PostgreSQL Global Development Group
1648 _ACEOF
1649   exit
1650 fi
1651
1652 ## ------------------------ ##
1653 ## Autoconf initialization. ##
1654 ## ------------------------ ##
1655
1656 # ac_fn_c_try_compile LINENO
1657 # --------------------------
1658 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1659 ac_fn_c_try_compile ()
1660 {
1661   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1662   rm -f conftest.$ac_objext
1663   if { { ac_try="$ac_compile"
1664 case "(($ac_try" in
1665   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1666   *) ac_try_echo=$ac_try;;
1667 esac
1668 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1669 $as_echo "$ac_try_echo"; } >&5
1670   (eval "$ac_compile") 2>conftest.err
1671   ac_status=$?
1672   if test -s conftest.err; then
1673     grep -v '^ *+' conftest.err >conftest.er1
1674     cat conftest.er1 >&5
1675     mv -f conftest.er1 conftest.err
1676   fi
1677   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1678   test $ac_status = 0; } && {
1679          test -z "$ac_c_werror_flag" ||
1680          test ! -s conftest.err
1681        } && test -s conftest.$ac_objext; then :
1682   ac_retval=0
1683 else
1684   $as_echo "$as_me: failed program was:" >&5
1685 sed 's/^/| /' conftest.$ac_ext >&5
1686
1687         ac_retval=1
1688 fi
1689   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1690   as_fn_set_status $ac_retval
1691
1692 } # ac_fn_c_try_compile
1693
1694 # ac_fn_c_try_link LINENO
1695 # -----------------------
1696 # Try to link conftest.$ac_ext, and return whether this succeeded.
1697 ac_fn_c_try_link ()
1698 {
1699   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1700   rm -f conftest.$ac_objext conftest$ac_exeext
1701   if { { ac_try="$ac_link"
1702 case "(($ac_try" in
1703   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1704   *) ac_try_echo=$ac_try;;
1705 esac
1706 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1707 $as_echo "$ac_try_echo"; } >&5
1708   (eval "$ac_link") 2>conftest.err
1709   ac_status=$?
1710   if test -s conftest.err; then
1711     grep -v '^ *+' conftest.err >conftest.er1
1712     cat conftest.er1 >&5
1713     mv -f conftest.er1 conftest.err
1714   fi
1715   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1716   test $ac_status = 0; } && {
1717          test -z "$ac_c_werror_flag" ||
1718          test ! -s conftest.err
1719        } && test -s conftest$ac_exeext && {
1720          test "$cross_compiling" = yes ||
1721          test -x conftest$ac_exeext
1722        }; then :
1723   ac_retval=0
1724 else
1725   $as_echo "$as_me: failed program was:" >&5
1726 sed 's/^/| /' conftest.$ac_ext >&5
1727
1728         ac_retval=1
1729 fi
1730   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1731   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1732   # interfere with the next link command; also delete a directory that is
1733   # left behind by Apple's compiler.  We do this before executing the actions.
1734   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1735   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1736   as_fn_set_status $ac_retval
1737
1738 } # ac_fn_c_try_link
1739
1740 # ac_fn_c_try_cpp LINENO
1741 # ----------------------
1742 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1743 ac_fn_c_try_cpp ()
1744 {
1745   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1746   if { { ac_try="$ac_cpp conftest.$ac_ext"
1747 case "(($ac_try" in
1748   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1749   *) ac_try_echo=$ac_try;;
1750 esac
1751 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1752 $as_echo "$ac_try_echo"; } >&5
1753   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1754   ac_status=$?
1755   if test -s conftest.err; then
1756     grep -v '^ *+' conftest.err >conftest.er1
1757     cat conftest.er1 >&5
1758     mv -f conftest.er1 conftest.err
1759   fi
1760   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1761   test $ac_status = 0; } > conftest.i && {
1762          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1763          test ! -s conftest.err
1764        }; then :
1765   ac_retval=0
1766 else
1767   $as_echo "$as_me: failed program was:" >&5
1768 sed 's/^/| /' conftest.$ac_ext >&5
1769
1770     ac_retval=1
1771 fi
1772   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1773   as_fn_set_status $ac_retval
1774
1775 } # ac_fn_c_try_cpp
1776
1777 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1778 # -------------------------------------------------------
1779 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1780 # the include files in INCLUDES and setting the cache variable VAR
1781 # accordingly.
1782 ac_fn_c_check_header_mongrel ()
1783 {
1784   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1785   if eval \${$3+:} false; then :
1786   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1787 $as_echo_n "checking for $2... " >&6; }
1788 if eval \${$3+:} false; then :
1789   $as_echo_n "(cached) " >&6
1790 fi
1791 eval ac_res=\$$3
1792                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1793 $as_echo "$ac_res" >&6; }
1794 else
1795   # Is the header compilable?
1796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1797 $as_echo_n "checking $2 usability... " >&6; }
1798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1799 /* end confdefs.h.  */
1800 $4
1801 #include <$2>
1802 _ACEOF
1803 if ac_fn_c_try_compile "$LINENO"; then :
1804   ac_header_compiler=yes
1805 else
1806   ac_header_compiler=no
1807 fi
1808 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1810 $as_echo "$ac_header_compiler" >&6; }
1811
1812 # Is the header present?
1813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1814 $as_echo_n "checking $2 presence... " >&6; }
1815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1816 /* end confdefs.h.  */
1817 #include <$2>
1818 _ACEOF
1819 if ac_fn_c_try_cpp "$LINENO"; then :
1820   ac_header_preproc=yes
1821 else
1822   ac_header_preproc=no
1823 fi
1824 rm -f conftest.err conftest.i conftest.$ac_ext
1825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1826 $as_echo "$ac_header_preproc" >&6; }
1827
1828 # So?  What about this header?
1829 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1830   yes:no: )
1831     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1832 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1833     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1834 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1835     ;;
1836   no:yes:* )
1837     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1838 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1839     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1840 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1841     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1842 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1843     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1844 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1845     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1846 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1847 ( $as_echo "## ---------------------------------------- ##
1848 ## Report this to pgsql-bugs@postgresql.org ##
1849 ## ---------------------------------------- ##"
1850      ) | sed "s/^/$as_me: WARNING:     /" >&2
1851     ;;
1852 esac
1853   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1854 $as_echo_n "checking for $2... " >&6; }
1855 if eval \${$3+:} false; then :
1856   $as_echo_n "(cached) " >&6
1857 else
1858   eval "$3=\$ac_header_compiler"
1859 fi
1860 eval ac_res=\$$3
1861                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1862 $as_echo "$ac_res" >&6; }
1863 fi
1864   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1865
1866 } # ac_fn_c_check_header_mongrel
1867
1868 # ac_fn_c_try_run LINENO
1869 # ----------------------
1870 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1871 # that executables *can* be run.
1872 ac_fn_c_try_run ()
1873 {
1874   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1875   if { { ac_try="$ac_link"
1876 case "(($ac_try" in
1877   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1878   *) ac_try_echo=$ac_try;;
1879 esac
1880 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1881 $as_echo "$ac_try_echo"; } >&5
1882   (eval "$ac_link") 2>&5
1883   ac_status=$?
1884   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1885   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1886   { { case "(($ac_try" in
1887   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1888   *) ac_try_echo=$ac_try;;
1889 esac
1890 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1891 $as_echo "$ac_try_echo"; } >&5
1892   (eval "$ac_try") 2>&5
1893   ac_status=$?
1894   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1895   test $ac_status = 0; }; }; then :
1896   ac_retval=0
1897 else
1898   $as_echo "$as_me: program exited with status $ac_status" >&5
1899        $as_echo "$as_me: failed program was:" >&5
1900 sed 's/^/| /' conftest.$ac_ext >&5
1901
1902        ac_retval=$ac_status
1903 fi
1904   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1905   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1906   as_fn_set_status $ac_retval
1907
1908 } # ac_fn_c_try_run
1909
1910 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1911 # -------------------------------------------------------
1912 # Tests whether HEADER exists and can be compiled using the include files in
1913 # INCLUDES, setting the cache variable VAR accordingly.
1914 ac_fn_c_check_header_compile ()
1915 {
1916   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1917   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1918 $as_echo_n "checking for $2... " >&6; }
1919 if eval \${$3+:} false; then :
1920   $as_echo_n "(cached) " >&6
1921 else
1922   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1923 /* end confdefs.h.  */
1924 $4
1925 #include <$2>
1926 _ACEOF
1927 if ac_fn_c_try_compile "$LINENO"; then :
1928   eval "$3=yes"
1929 else
1930   eval "$3=no"
1931 fi
1932 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1933 fi
1934 eval ac_res=\$$3
1935                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1936 $as_echo "$ac_res" >&6; }
1937   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1938
1939 } # ac_fn_c_check_header_compile
1940
1941 # ac_fn_c_check_func LINENO FUNC VAR
1942 # ----------------------------------
1943 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1944 ac_fn_c_check_func ()
1945 {
1946   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1947   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1948 $as_echo_n "checking for $2... " >&6; }
1949 if eval \${$3+:} false; then :
1950   $as_echo_n "(cached) " >&6
1951 else
1952   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1953 /* end confdefs.h.  */
1954 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1955    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1956 #define $2 innocuous_$2
1957
1958 /* System header to define __stub macros and hopefully few prototypes,
1959     which can conflict with char $2 (); below.
1960     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1961     <limits.h> exists even on freestanding compilers.  */
1962
1963 #ifdef __STDC__
1964 # include <limits.h>
1965 #else
1966 # include <assert.h>
1967 #endif
1968
1969 #undef $2
1970
1971 /* Override any GCC internal prototype to avoid an error.
1972    Use char because int might match the return type of a GCC
1973    builtin and then its argument prototype would still apply.  */
1974 #ifdef __cplusplus
1975 extern "C"
1976 #endif
1977 char $2 ();
1978 /* The GNU C library defines this for functions which it implements
1979     to always fail with ENOSYS.  Some functions are actually named
1980     something starting with __ and the normal name is an alias.  */
1981 #if defined __stub_$2 || defined __stub___$2
1982 choke me
1983 #endif
1984
1985 int
1986 main ()
1987 {
1988 return $2 ();
1989   ;
1990   return 0;
1991 }
1992 _ACEOF
1993 if ac_fn_c_try_link "$LINENO"; then :
1994   eval "$3=yes"
1995 else
1996   eval "$3=no"
1997 fi
1998 rm -f core conftest.err conftest.$ac_objext \
1999     conftest$ac_exeext conftest.$ac_ext
2000 fi
2001 eval ac_res=\$$3
2002                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2003 $as_echo "$ac_res" >&6; }
2004   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2005
2006 } # ac_fn_c_check_func
2007
2008 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2009 # ----------------------------------------------------
2010 # Tries to find if the field MEMBER exists in type AGGR, after including
2011 # INCLUDES, setting cache variable VAR accordingly.
2012 ac_fn_c_check_member ()
2013 {
2014   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2015   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2016 $as_echo_n "checking for $2.$3... " >&6; }
2017 if eval \${$4+:} false; then :
2018   $as_echo_n "(cached) " >&6
2019 else
2020   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2021 /* end confdefs.h.  */
2022 $5
2023 int
2024 main ()
2025 {
2026 static $2 ac_aggr;
2027 if (ac_aggr.$3)
2028 return 0;
2029   ;
2030   return 0;
2031 }
2032 _ACEOF
2033 if ac_fn_c_try_compile "$LINENO"; then :
2034   eval "$4=yes"
2035 else
2036   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2037 /* end confdefs.h.  */
2038 $5
2039 int
2040 main ()
2041 {
2042 static $2 ac_aggr;
2043 if (sizeof ac_aggr.$3)
2044 return 0;
2045   ;
2046   return 0;
2047 }
2048 _ACEOF
2049 if ac_fn_c_try_compile "$LINENO"; then :
2050   eval "$4=yes"
2051 else
2052   eval "$4=no"
2053 fi
2054 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2055 fi
2056 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2057 fi
2058 eval ac_res=\$$4
2059                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2060 $as_echo "$ac_res" >&6; }
2061   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2062
2063 } # ac_fn_c_check_member
2064
2065 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2066 # -------------------------------------------
2067 # Tests whether TYPE exists after having included INCLUDES, setting cache
2068 # variable VAR accordingly.
2069 ac_fn_c_check_type ()
2070 {
2071   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2072   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2073 $as_echo_n "checking for $2... " >&6; }
2074 if eval \${$3+:} false; then :
2075   $as_echo_n "(cached) " >&6
2076 else
2077   eval "$3=no"
2078   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2079 /* end confdefs.h.  */
2080 $4
2081 int
2082 main ()
2083 {
2084 if (sizeof ($2))
2085          return 0;
2086   ;
2087   return 0;
2088 }
2089 _ACEOF
2090 if ac_fn_c_try_compile "$LINENO"; then :
2091   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2092 /* end confdefs.h.  */
2093 $4
2094 int
2095 main ()
2096 {
2097 if (sizeof (($2)))
2098             return 0;
2099   ;
2100   return 0;
2101 }
2102 _ACEOF
2103 if ac_fn_c_try_compile "$LINENO"; then :
2104
2105 else
2106   eval "$3=yes"
2107 fi
2108 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2109 fi
2110 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2111 fi
2112 eval ac_res=\$$3
2113                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2114 $as_echo "$ac_res" >&6; }
2115   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2116
2117 } # ac_fn_c_check_type
2118
2119 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2120 # --------------------------------------------
2121 # Tries to find the compile-time value of EXPR in a program that includes
2122 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2123 # computed
2124 ac_fn_c_compute_int ()
2125 {
2126   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2127   if test "$cross_compiling" = yes; then
2128     # Depending upon the size, compute the lo and hi bounds.
2129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2130 /* end confdefs.h.  */
2131 $4
2132 int
2133 main ()
2134 {
2135 static int test_array [1 - 2 * !(($2) >= 0)];
2136 test_array [0] = 0;
2137 return test_array [0];
2138
2139   ;
2140   return 0;
2141 }
2142 _ACEOF
2143 if ac_fn_c_try_compile "$LINENO"; then :
2144   ac_lo=0 ac_mid=0
2145   while :; do
2146     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2147 /* end confdefs.h.  */
2148 $4
2149 int
2150 main ()
2151 {
2152 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2153 test_array [0] = 0;
2154 return test_array [0];
2155
2156   ;
2157   return 0;
2158 }
2159 _ACEOF
2160 if ac_fn_c_try_compile "$LINENO"; then :
2161   ac_hi=$ac_mid; break
2162 else
2163   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2164                         if test $ac_lo -le $ac_mid; then
2165                           ac_lo= ac_hi=
2166                           break
2167                         fi
2168                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2169 fi
2170 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2171   done
2172 else
2173   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2174 /* end confdefs.h.  */
2175 $4
2176 int
2177 main ()
2178 {
2179 static int test_array [1 - 2 * !(($2) < 0)];
2180 test_array [0] = 0;
2181 return test_array [0];
2182
2183   ;
2184   return 0;
2185 }
2186 _ACEOF
2187 if ac_fn_c_try_compile "$LINENO"; then :
2188   ac_hi=-1 ac_mid=-1
2189   while :; do
2190     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2191 /* end confdefs.h.  */
2192 $4
2193 int
2194 main ()
2195 {
2196 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2197 test_array [0] = 0;
2198 return test_array [0];
2199
2200   ;
2201   return 0;
2202 }
2203 _ACEOF
2204 if ac_fn_c_try_compile "$LINENO"; then :
2205   ac_lo=$ac_mid; break
2206 else
2207   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2208                         if test $ac_mid -le $ac_hi; then
2209                           ac_lo= ac_hi=
2210                           break
2211                         fi
2212                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2213 fi
2214 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2215   done
2216 else
2217   ac_lo= ac_hi=
2218 fi
2219 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2220 fi
2221 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2222 # Binary search between lo and hi bounds.
2223 while test "x$ac_lo" != "x$ac_hi"; do
2224   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2225   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2226 /* end confdefs.h.  */
2227 $4
2228 int
2229 main ()
2230 {
2231 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2232 test_array [0] = 0;
2233 return test_array [0];
2234
2235   ;
2236   return 0;
2237 }
2238 _ACEOF
2239 if ac_fn_c_try_compile "$LINENO"; then :
2240   ac_hi=$ac_mid
2241 else
2242   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2243 fi
2244 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2245 done
2246 case $ac_lo in #((
2247 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2248 '') ac_retval=1 ;;
2249 esac
2250   else
2251     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2252 /* end confdefs.h.  */
2253 $4
2254 static long int longval () { return $2; }
2255 static unsigned long int ulongval () { return $2; }
2256 #include <stdio.h>
2257 #include <stdlib.h>
2258 int
2259 main ()
2260 {
2261
2262   FILE *f = fopen ("conftest.val", "w");
2263   if (! f)
2264     return 1;
2265   if (($2) < 0)
2266     {
2267       long int i = longval ();
2268       if (i != ($2))
2269         return 1;
2270       fprintf (f, "%ld", i);
2271     }
2272   else
2273     {
2274       unsigned long int i = ulongval ();
2275       if (i != ($2))
2276         return 1;
2277       fprintf (f, "%lu", i);
2278     }
2279   /* Do not output a trailing newline, as this causes \r\n confusion
2280      on some platforms.  */
2281   return ferror (f) || fclose (f) != 0;
2282
2283   ;
2284   return 0;
2285 }
2286 _ACEOF
2287 if ac_fn_c_try_run "$LINENO"; then :
2288   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2289 else
2290   ac_retval=1
2291 fi
2292 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2293   conftest.$ac_objext conftest.beam conftest.$ac_ext
2294 rm -f conftest.val
2295
2296   fi
2297   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2298   as_fn_set_status $ac_retval
2299
2300 } # ac_fn_c_compute_int
2301
2302 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2303 # ---------------------------------------------
2304 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2305 # accordingly.
2306 ac_fn_c_check_decl ()
2307 {
2308   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2309   as_decl_name=`echo $2|sed 's/ *(.*//'`
2310   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2311   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2312 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2313 if eval \${$3+:} false; then :
2314   $as_echo_n "(cached) " >&6
2315 else
2316   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2317 /* end confdefs.h.  */
2318 $4
2319 int
2320 main ()
2321 {
2322 #ifndef $as_decl_name
2323 #ifdef __cplusplus
2324   (void) $as_decl_use;
2325 #else
2326   (void) $as_decl_name;
2327 #endif
2328 #endif
2329
2330   ;
2331   return 0;
2332 }
2333 _ACEOF
2334 if ac_fn_c_try_compile "$LINENO"; then :
2335   eval "$3=yes"
2336 else
2337   eval "$3=no"
2338 fi
2339 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2340 fi
2341 eval ac_res=\$$3
2342                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2343 $as_echo "$ac_res" >&6; }
2344   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2345
2346 } # ac_fn_c_check_decl
2347 cat >config.log <<_ACEOF
2348 This file contains any messages produced by compilers while
2349 running configure, to aid debugging if configure makes a mistake.
2350
2351 It was created by PostgreSQL $as_me 10devel, which was
2352 generated by GNU Autoconf 2.69.  Invocation command line was
2353
2354   $ $0 $@
2355
2356 _ACEOF
2357 exec 5>>config.log
2358 {
2359 cat <<_ASUNAME
2360 ## --------- ##
2361 ## Platform. ##
2362 ## --------- ##
2363
2364 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2365 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2366 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2367 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2368 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2369
2370 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2371 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2372
2373 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2374 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2375 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2376 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2377 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2378 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2379 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2380
2381 _ASUNAME
2382
2383 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2384 for as_dir in $PATH
2385 do
2386   IFS=$as_save_IFS
2387   test -z "$as_dir" && as_dir=.
2388     $as_echo "PATH: $as_dir"
2389   done
2390 IFS=$as_save_IFS
2391
2392 } >&5
2393
2394 cat >&5 <<_ACEOF
2395
2396
2397 ## ----------- ##
2398 ## Core tests. ##
2399 ## ----------- ##
2400
2401 _ACEOF
2402
2403
2404 # Keep a trace of the command line.
2405 # Strip out --no-create and --no-recursion so they do not pile up.
2406 # Strip out --silent because we don't want to record it for future runs.
2407 # Also quote any args containing shell meta-characters.
2408 # Make two passes to allow for proper duplicate-argument suppression.
2409 ac_configure_args=
2410 ac_configure_args0=
2411 ac_configure_args1=
2412 ac_must_keep_next=false
2413 for ac_pass in 1 2
2414 do
2415   for ac_arg
2416   do
2417     case $ac_arg in
2418     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2419     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2420     | -silent | --silent | --silen | --sile | --sil)
2421       continue ;;
2422     *\'*)
2423       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2424     esac
2425     case $ac_pass in
2426     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2427     2)
2428       as_fn_append ac_configure_args1 " '$ac_arg'"
2429       if test $ac_must_keep_next = true; then
2430         ac_must_keep_next=false # Got value, back to normal.
2431       else
2432         case $ac_arg in
2433           *=* | --config-cache | -C | -disable-* | --disable-* \
2434           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2435           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2436           | -with-* | --with-* | -without-* | --without-* | --x)
2437             case "$ac_configure_args0 " in
2438               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2439             esac
2440             ;;
2441           -* ) ac_must_keep_next=true ;;
2442         esac
2443       fi
2444       as_fn_append ac_configure_args " '$ac_arg'"
2445       ;;
2446     esac
2447   done
2448 done
2449 { ac_configure_args0=; unset ac_configure_args0;}
2450 { ac_configure_args1=; unset ac_configure_args1;}
2451
2452 # When interrupted or exit'd, cleanup temporary files, and complete
2453 # config.log.  We remove comments because anyway the quotes in there
2454 # would cause problems or look ugly.
2455 # WARNING: Use '\'' to represent an apostrophe within the trap.
2456 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2457 trap 'exit_status=$?
2458   # Save into config.log some information that might help in debugging.
2459   {
2460     echo
2461
2462     $as_echo "## ---------------- ##
2463 ## Cache variables. ##
2464 ## ---------------- ##"
2465     echo
2466     # The following way of writing the cache mishandles newlines in values,
2467 (
2468   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2469     eval ac_val=\$$ac_var
2470     case $ac_val in #(
2471     *${as_nl}*)
2472       case $ac_var in #(
2473       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2474 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2475       esac
2476       case $ac_var in #(
2477       _ | IFS | as_nl) ;; #(
2478       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2479       *) { eval $ac_var=; unset $ac_var;} ;;
2480       esac ;;
2481     esac
2482   done
2483   (set) 2>&1 |
2484     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2485     *${as_nl}ac_space=\ *)
2486       sed -n \
2487         "s/'\''/'\''\\\\'\'''\''/g;
2488           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2489       ;; #(
2490     *)
2491       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2492       ;;
2493     esac |
2494     sort
2495 )
2496     echo
2497
2498     $as_echo "## ----------------- ##
2499 ## Output variables. ##
2500 ## ----------------- ##"
2501     echo
2502     for ac_var in $ac_subst_vars
2503     do
2504       eval ac_val=\$$ac_var
2505       case $ac_val in
2506       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2507       esac
2508       $as_echo "$ac_var='\''$ac_val'\''"
2509     done | sort
2510     echo
2511
2512     if test -n "$ac_subst_files"; then
2513       $as_echo "## ------------------- ##
2514 ## File substitutions. ##
2515 ## ------------------- ##"
2516       echo
2517       for ac_var in $ac_subst_files
2518       do
2519         eval ac_val=\$$ac_var
2520         case $ac_val in
2521         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2522         esac
2523         $as_echo "$ac_var='\''$ac_val'\''"
2524       done | sort
2525       echo
2526     fi
2527
2528     if test -s confdefs.h; then
2529       $as_echo "## ----------- ##
2530 ## confdefs.h. ##
2531 ## ----------- ##"
2532       echo
2533       cat confdefs.h
2534       echo
2535     fi
2536     test "$ac_signal" != 0 &&
2537       $as_echo "$as_me: caught signal $ac_signal"
2538     $as_echo "$as_me: exit $exit_status"
2539   } >&5
2540   rm -f core *.core core.conftest.* &&
2541     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2542     exit $exit_status
2543 ' 0
2544 for ac_signal in 1 2 13 15; do
2545   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2546 done
2547 ac_signal=0
2548
2549 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2550 rm -f -r conftest* confdefs.h
2551
2552 $as_echo "/* confdefs.h */" > confdefs.h
2553
2554 # Predefined preprocessor variables.
2555
2556 cat >>confdefs.h <<_ACEOF
2557 #define PACKAGE_NAME "$PACKAGE_NAME"
2558 _ACEOF
2559
2560 cat >>confdefs.h <<_ACEOF
2561 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2562 _ACEOF
2563
2564 cat >>confdefs.h <<_ACEOF
2565 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2566 _ACEOF
2567
2568 cat >>confdefs.h <<_ACEOF
2569 #define PACKAGE_STRING "$PACKAGE_STRING"
2570 _ACEOF
2571
2572 cat >>confdefs.h <<_ACEOF
2573 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2574 _ACEOF
2575
2576 cat >>confdefs.h <<_ACEOF
2577 #define PACKAGE_URL "$PACKAGE_URL"
2578 _ACEOF
2579
2580
2581 # Let the site file select an alternate cache file if it wants to.
2582 # Prefer an explicitly selected file to automatically selected ones.
2583 ac_site_file1=NONE
2584 ac_site_file2=NONE
2585 if test -n "$CONFIG_SITE"; then
2586   # We do not want a PATH search for config.site.
2587   case $CONFIG_SITE in #((
2588     -*)  ac_site_file1=./$CONFIG_SITE;;
2589     */*) ac_site_file1=$CONFIG_SITE;;
2590     *)   ac_site_file1=./$CONFIG_SITE;;
2591   esac
2592 elif test "x$prefix" != xNONE; then
2593   ac_site_file1=$prefix/share/config.site
2594   ac_site_file2=$prefix/etc/config.site
2595 else
2596   ac_site_file1=$ac_default_prefix/share/config.site
2597   ac_site_file2=$ac_default_prefix/etc/config.site
2598 fi
2599 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2600 do
2601   test "x$ac_site_file" = xNONE && continue
2602   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2603     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2604 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2605     sed 's/^/| /' "$ac_site_file" >&5
2606     . "$ac_site_file" \
2607       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2608 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2609 as_fn_error $? "failed to load site script $ac_site_file
2610 See \`config.log' for more details" "$LINENO" 5; }
2611   fi
2612 done
2613
2614 if test -r "$cache_file"; then
2615   # Some versions of bash will fail to source /dev/null (special files
2616   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2617   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2618     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2619 $as_echo "$as_me: loading cache $cache_file" >&6;}
2620     case $cache_file in
2621       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2622       *)                      . "./$cache_file";;
2623     esac
2624   fi
2625 else
2626   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2627 $as_echo "$as_me: creating cache $cache_file" >&6;}
2628   >$cache_file
2629 fi
2630
2631 # Check that the precious variables saved in the cache have kept the same
2632 # value.
2633 ac_cache_corrupted=false
2634 for ac_var in $ac_precious_vars; do
2635   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2636   eval ac_new_set=\$ac_env_${ac_var}_set
2637   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2638   eval ac_new_val=\$ac_env_${ac_var}_value
2639   case $ac_old_set,$ac_new_set in
2640     set,)
2641       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2642 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2643       ac_cache_corrupted=: ;;
2644     ,set)
2645       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2646 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2647       ac_cache_corrupted=: ;;
2648     ,);;
2649     *)
2650       if test "x$ac_old_val" != "x$ac_new_val"; then
2651         # differences in whitespace do not lead to failure.
2652         ac_old_val_w=`echo x $ac_old_val`
2653         ac_new_val_w=`echo x $ac_new_val`
2654         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2655           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2656 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2657           ac_cache_corrupted=:
2658         else
2659           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2660 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2661           eval $ac_var=\$ac_old_val
2662         fi
2663         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2664 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2665         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2666 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2667       fi;;
2668   esac
2669   # Pass precious variables to config.status.
2670   if test "$ac_new_set" = set; then
2671     case $ac_new_val in
2672     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2673     *) ac_arg=$ac_var=$ac_new_val ;;
2674     esac
2675     case " $ac_configure_args " in
2676       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2677       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2678     esac
2679   fi
2680 done
2681 if $ac_cache_corrupted; then
2682   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2683 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2684   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2685 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2686   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2687 fi
2688 ## -------------------- ##
2689 ## Main body of script. ##
2690 ## -------------------- ##
2691
2692 ac_ext=c
2693 ac_cpp='$CPP $CPPFLAGS'
2694 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2695 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2696 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2697
2698
2699
2700
2701
2702
2703 ac_aux_dir=
2704 for ac_dir in config "$srcdir"/config; do
2705   if test -f "$ac_dir/install-sh"; then
2706     ac_aux_dir=$ac_dir
2707     ac_install_sh="$ac_aux_dir/install-sh -c"
2708     break
2709   elif test -f "$ac_dir/install.sh"; then
2710     ac_aux_dir=$ac_dir
2711     ac_install_sh="$ac_aux_dir/install.sh -c"
2712     break
2713   elif test -f "$ac_dir/shtool"; then
2714     ac_aux_dir=$ac_dir
2715     ac_install_sh="$ac_aux_dir/shtool install -c"
2716     break
2717   fi
2718 done
2719 if test -z "$ac_aux_dir"; then
2720   as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2721 fi
2722
2723 # These three variables are undocumented and unsupported,
2724 # and are intended to be withdrawn in a future Autoconf release.
2725 # They can cause serious problems if a builder's source tree is in a directory
2726 # whose full name contains unusual characters.
2727 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2728 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2729 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2730
2731
2732
2733 configure_args=$ac_configure_args
2734
2735
2736 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`
2737
2738
2739 cat >>confdefs.h <<_ACEOF
2740 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2741 _ACEOF
2742
2743
2744
2745
2746
2747 # Check whether --with-extra-version was given.
2748 if test "${with_extra_version+set}" = set; then :
2749   withval=$with_extra_version;
2750   case $withval in
2751     yes)
2752       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2753       ;;
2754     no)
2755       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2756       ;;
2757     *)
2758       PG_VERSION="$PACKAGE_VERSION$withval"
2759       ;;
2760   esac
2761
2762 else
2763   PG_VERSION="$PACKAGE_VERSION"
2764 fi
2765
2766
2767
2768 cat >>confdefs.h <<_ACEOF
2769 #define PG_VERSION "$PG_VERSION"
2770 _ACEOF
2771
2772
2773 # Make sure we can run config.sub.
2774 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2775   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2776
2777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2778 $as_echo_n "checking build system type... " >&6; }
2779 if ${ac_cv_build+:} false; then :
2780   $as_echo_n "(cached) " >&6
2781 else
2782   ac_build_alias=$build_alias
2783 test "x$ac_build_alias" = x &&
2784   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2785 test "x$ac_build_alias" = x &&
2786   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2787 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2788   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2789
2790 fi
2791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2792 $as_echo "$ac_cv_build" >&6; }
2793 case $ac_cv_build in
2794 *-*-*) ;;
2795 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2796 esac
2797 build=$ac_cv_build
2798 ac_save_IFS=$IFS; IFS='-'
2799 set x $ac_cv_build
2800 shift
2801 build_cpu=$1
2802 build_vendor=$2
2803 shift; shift
2804 # Remember, the first character of IFS is used to create $*,
2805 # except with old shells:
2806 build_os=$*
2807 IFS=$ac_save_IFS
2808 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2809
2810
2811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2812 $as_echo_n "checking host system type... " >&6; }
2813 if ${ac_cv_host+:} false; then :
2814   $as_echo_n "(cached) " >&6
2815 else
2816   if test "x$host_alias" = x; then
2817   ac_cv_host=$ac_cv_build
2818 else
2819   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2820     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2821 fi
2822
2823 fi
2824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2825 $as_echo "$ac_cv_host" >&6; }
2826 case $ac_cv_host in
2827 *-*-*) ;;
2828 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2829 esac
2830 host=$ac_cv_host
2831 ac_save_IFS=$IFS; IFS='-'
2832 set x $ac_cv_host
2833 shift
2834 host_cpu=$1
2835 host_vendor=$2
2836 shift; shift
2837 # Remember, the first character of IFS is used to create $*,
2838 # except with old shells:
2839 host_os=$*
2840 IFS=$ac_save_IFS
2841 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2842
2843
2844
2845 template=
2846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2847 $as_echo_n "checking which template to use... " >&6; }
2848
2849
2850
2851
2852 # Check whether --with-template was given.
2853 if test "${with_template+set}" = set; then :
2854   withval=$with_template;
2855   case $withval in
2856     yes)
2857       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2858       ;;
2859     no)
2860       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2861       ;;
2862     *)
2863
2864   case $withval in
2865     list)   echo; ls "$srcdir/src/template"; exit;;
2866     *)      if test -f "$srcdir/src/template/$with_template" ; then
2867               template=$withval
2868             else
2869               as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2870             fi;;
2871   esac
2872
2873       ;;
2874   esac
2875
2876 else
2877
2878 # --with-template not given
2879
2880 case $host_os in
2881      aix*) template=aix ;;
2882   cygwin*) template=cygwin ;;
2883   darwin*) template=darwin ;;
2884 dragonfly*) template=netbsd ;;
2885  freebsd*) template=freebsd ;;
2886     hpux*) template=hpux ;;
2887  linux*|gnu*|k*bsd*-gnu)
2888            template=linux ;;
2889    mingw*) template=win32 ;;
2890   netbsd*) template=netbsd ;;
2891  openbsd*) template=openbsd ;;
2892  solaris*) template=solaris ;;
2893 esac
2894
2895   if test x"$template" = x"" ; then
2896     as_fn_error $? "
2897 *******************************************************************
2898 PostgreSQL has apparently not been ported to your platform yet.
2899 To try a manual configuration, look into the src/template directory
2900 for a similar platform and use the '--with-template=' option.
2901
2902 Please also contact <pgsql-bugs@postgresql.org> to see about
2903 rectifying this.  Include the above 'checking host system type...'
2904 line.
2905 *******************************************************************
2906 " "$LINENO" 5
2907   fi
2908
2909
2910 fi
2911
2912
2913
2914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
2915 $as_echo "$template" >&6; }
2916
2917 PORTNAME=$template
2918
2919
2920 # Initialize default assumption that we do not need separate assembly code
2921 # for TAS (test-and-set).  This can be overridden by the template file
2922 # when it's executed.
2923 need_tas=no
2924 tas_file=dummy.s
2925
2926
2927
2928 ##
2929 ## Command line options
2930 ##
2931
2932 #
2933 # Add non-standard directories to the include path
2934 #
2935
2936
2937
2938 # Check whether --with-includes was given.
2939 if test "${with_includes+set}" = set; then :
2940   withval=$with_includes;
2941   case $withval in
2942     yes)
2943       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
2944       ;;
2945     no)
2946       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
2947       ;;
2948     *)
2949
2950       ;;
2951   esac
2952
2953 fi
2954
2955
2956
2957
2958 #
2959 # Add non-standard directories to the library search path
2960 #
2961
2962
2963
2964 # Check whether --with-libraries was given.
2965 if test "${with_libraries+set}" = set; then :
2966   withval=$with_libraries;
2967   case $withval in
2968     yes)
2969       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
2970       ;;
2971     no)
2972       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
2973       ;;
2974     *)
2975       LIBRARY_DIRS=$withval
2976       ;;
2977   esac
2978
2979 fi
2980
2981
2982
2983
2984
2985
2986 # Check whether --with-libs was given.
2987 if test "${with_libs+set}" = set; then :
2988   withval=$with_libs;
2989   case $withval in
2990     yes)
2991       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
2992       ;;
2993     no)
2994       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
2995       ;;
2996     *)
2997       LIBRARY_DIRS=$withval
2998       ;;
2999   esac
3000
3001 fi
3002
3003
3004
3005
3006 #
3007 # 64-bit integer date/time storage is now the only option, but to avoid
3008 # unnecessary breakage of build scripts, continue to accept an explicit
3009 # "--enable-integer-datetimes" switch.
3010 #
3011
3012
3013 # Check whether --enable-integer-datetimes was given.
3014 if test "${enable_integer_datetimes+set}" = set; then :
3015   enableval=$enable_integer_datetimes;
3016   case $enableval in
3017     yes)
3018       :
3019       ;;
3020     no)
3021       as_fn_error $? "--disable-integer-datetimes is no longer supported" "$LINENO" 5
3022       ;;
3023     *)
3024       as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3025       ;;
3026   esac
3027
3028 else
3029   enable_integer_datetimes=yes
3030
3031 fi
3032
3033
3034
3035
3036 #
3037 # NLS
3038 #
3039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3040 $as_echo_n "checking whether NLS is wanted... " >&6; }
3041
3042
3043 # Check whether --enable-nls was given.
3044 if test "${enable_nls+set}" = set; then :
3045   enableval=$enable_nls;
3046   case $enableval in
3047     yes)
3048       :
3049       ;;
3050     no)
3051       :
3052       ;;
3053     *)
3054       enable_nls=yes
3055 WANTED_LANGUAGES=$enableval
3056       ;;
3057   esac
3058
3059 else
3060   enable_nls=no
3061 fi
3062
3063
3064
3065 if test "$enable_nls" = yes; then
3066
3067 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3068
3069 fi
3070
3071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3072 $as_echo "$enable_nls" >&6; }
3073
3074
3075
3076 #
3077 # Default port number (--with-pgport), default 5432
3078 #
3079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3080 $as_echo_n "checking for default port number... " >&6; }
3081
3082
3083
3084 # Check whether --with-pgport was given.
3085 if test "${with_pgport+set}" = set; then :
3086   withval=$with_pgport;
3087   case $withval in
3088     yes)
3089       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3090       ;;
3091     no)
3092       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3093       ;;
3094     *)
3095       default_port=$withval
3096       ;;
3097   esac
3098
3099 else
3100   default_port=5432
3101 fi
3102
3103
3104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3105 $as_echo "$default_port" >&6; }
3106 # Need both of these because some places want an integer and some a string
3107
3108 cat >>confdefs.h <<_ACEOF
3109 #define DEF_PGPORT ${default_port}
3110 _ACEOF
3111
3112
3113 cat >>confdefs.h <<_ACEOF
3114 #define DEF_PGPORT_STR "${default_port}"
3115 _ACEOF
3116
3117
3118
3119 # It's worth validating port; you can get very confusing errors otherwise
3120 if test x"$default_port" = x""; then
3121   as_fn_error $? "invalid --with-pgport specification: empty string" "$LINENO" 5
3122 elif test ! x`echo "$default_port" | sed -e 's/[0-9]*//'` = x""; then
3123   as_fn_error $? "invalid --with-pgport specification: must be a number" "$LINENO" 5
3124 elif test ! x`echo "$default_port" | sed -e 's/^0.//'` = x"$default_port"; then
3125   as_fn_error $? "invalid --with-pgport specification: must not have leading 0" "$LINENO" 5
3126 elif test "$default_port" -lt "1" -o "$default_port" -gt "65535"; then
3127   as_fn_error $? "invalid --with-pgport specification: must be between 1 and 65535" "$LINENO" 5
3128 fi
3129
3130 #
3131 # '-rpath'-like feature can be disabled
3132 #
3133
3134
3135 # Check whether --enable-rpath was given.
3136 if test "${enable_rpath+set}" = set; then :
3137   enableval=$enable_rpath;
3138   case $enableval in
3139     yes)
3140       :
3141       ;;
3142     no)
3143       :
3144       ;;
3145     *)
3146       as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3147       ;;
3148   esac
3149
3150 else
3151   enable_rpath=yes
3152
3153 fi
3154
3155
3156
3157
3158 #
3159 # Spinlocks
3160 #
3161
3162
3163 # Check whether --enable-spinlocks was given.
3164 if test "${enable_spinlocks+set}" = set; then :
3165   enableval=$enable_spinlocks;
3166   case $enableval in
3167     yes)
3168       :
3169       ;;
3170     no)
3171       :
3172       ;;
3173     *)
3174       as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3175       ;;
3176   esac
3177
3178 else
3179   enable_spinlocks=yes
3180
3181 fi
3182
3183
3184
3185 #
3186 # Atomic operations
3187 #
3188
3189
3190 # Check whether --enable-atomics was given.
3191 if test "${enable_atomics+set}" = set; then :
3192   enableval=$enable_atomics;
3193   case $enableval in
3194     yes)
3195       :
3196       ;;
3197     no)
3198       :
3199       ;;
3200     *)
3201       as_fn_error $? "no argument expected for --enable-atomics option" "$LINENO" 5
3202       ;;
3203   esac
3204
3205 else
3206   enable_atomics=yes
3207
3208 fi
3209
3210
3211
3212 #
3213 # Random number generation
3214 #
3215
3216
3217 # Check whether --enable-strong-random was given.
3218 if test "${enable_strong_random+set}" = set; then :
3219   enableval=$enable_strong_random;
3220   case $enableval in
3221     yes)
3222       :
3223       ;;
3224     no)
3225       :
3226       ;;
3227     *)
3228       as_fn_error $? "no argument expected for --enable-strong-random option" "$LINENO" 5
3229       ;;
3230   esac
3231
3232 else
3233   enable_strong_random=yes
3234
3235 fi
3236
3237
3238
3239
3240 #
3241 # --enable-debug adds -g to compiler flags
3242 #
3243
3244
3245 # Check whether --enable-debug was given.
3246 if test "${enable_debug+set}" = set; then :
3247   enableval=$enable_debug;
3248   case $enableval in
3249     yes)
3250       :
3251       ;;
3252     no)
3253       :
3254       ;;
3255     *)
3256       as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3257       ;;
3258   esac
3259
3260 else
3261   enable_debug=no
3262
3263 fi
3264
3265
3266
3267
3268 #
3269 # --enable-profiling enables gcc profiling
3270 #
3271
3272
3273 # Check whether --enable-profiling was given.
3274 if test "${enable_profiling+set}" = set; then :
3275   enableval=$enable_profiling;
3276   case $enableval in
3277     yes)
3278       :
3279       ;;
3280     no)
3281       :
3282       ;;
3283     *)
3284       as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3285       ;;
3286   esac
3287
3288 else
3289   enable_profiling=no
3290
3291 fi
3292
3293
3294
3295 #
3296 # --enable-coverage enables generation of code coverage metrics with gcov
3297 #
3298
3299
3300 # Check whether --enable-coverage was given.
3301 if test "${enable_coverage+set}" = set; then :
3302   enableval=$enable_coverage;
3303   case $enableval in
3304     yes)
3305       for ac_prog in gcov
3306 do
3307   # Extract the first word of "$ac_prog", so it can be a program name with args.
3308 set dummy $ac_prog; ac_word=$2
3309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3310 $as_echo_n "checking for $ac_word... " >&6; }
3311 if ${ac_cv_prog_GCOV+:} false; then :
3312   $as_echo_n "(cached) " >&6
3313 else
3314   if test -n "$GCOV"; then
3315   ac_cv_prog_GCOV="$GCOV" # Let the user override the test.
3316 else
3317 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3318 for as_dir in $PATH
3319 do
3320   IFS=$as_save_IFS
3321   test -z "$as_dir" && as_dir=.
3322     for ac_exec_ext in '' $ac_executable_extensions; do
3323   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3324     ac_cv_prog_GCOV="$ac_prog"
3325     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3326     break 2
3327   fi
3328 done
3329   done
3330 IFS=$as_save_IFS
3331
3332 fi
3333 fi
3334 GCOV=$ac_cv_prog_GCOV
3335 if test -n "$GCOV"; then
3336   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3337 $as_echo "$GCOV" >&6; }
3338 else
3339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3340 $as_echo "no" >&6; }
3341 fi
3342
3343
3344   test -n "$GCOV" && break
3345 done
3346
3347 if test -z "$GCOV"; then
3348   as_fn_error $? "gcov not found" "$LINENO" 5
3349 fi
3350 for ac_prog in lcov
3351 do
3352   # Extract the first word of "$ac_prog", so it can be a program name with args.
3353 set dummy $ac_prog; ac_word=$2
3354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3355 $as_echo_n "checking for $ac_word... " >&6; }
3356 if ${ac_cv_prog_LCOV+:} false; then :
3357   $as_echo_n "(cached) " >&6
3358 else
3359   if test -n "$LCOV"; then
3360   ac_cv_prog_LCOV="$LCOV" # Let the user override the test.
3361 else
3362 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3363 for as_dir in $PATH
3364 do
3365   IFS=$as_save_IFS
3366   test -z "$as_dir" && as_dir=.
3367     for ac_exec_ext in '' $ac_executable_extensions; do
3368   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3369     ac_cv_prog_LCOV="$ac_prog"
3370     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3371     break 2
3372   fi
3373 done
3374   done
3375 IFS=$as_save_IFS
3376
3377 fi
3378 fi
3379 LCOV=$ac_cv_prog_LCOV
3380 if test -n "$LCOV"; then
3381   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3382 $as_echo "$LCOV" >&6; }
3383 else
3384   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3385 $as_echo "no" >&6; }
3386 fi
3387
3388
3389   test -n "$LCOV" && break
3390 done
3391
3392 if test -z "$LCOV"; then
3393   as_fn_error $? "lcov not found" "$LINENO" 5
3394 fi
3395 for ac_prog in genhtml
3396 do
3397   # Extract the first word of "$ac_prog", so it can be a program name with args.
3398 set dummy $ac_prog; ac_word=$2
3399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3400 $as_echo_n "checking for $ac_word... " >&6; }
3401 if ${ac_cv_prog_GENHTML+:} false; then :
3402   $as_echo_n "(cached) " >&6
3403 else
3404   if test -n "$GENHTML"; then
3405   ac_cv_prog_GENHTML="$GENHTML" # Let the user override the test.
3406 else
3407 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3408 for as_dir in $PATH
3409 do
3410   IFS=$as_save_IFS
3411   test -z "$as_dir" && as_dir=.
3412     for ac_exec_ext in '' $ac_executable_extensions; do
3413   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3414     ac_cv_prog_GENHTML="$ac_prog"
3415     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3416     break 2
3417   fi
3418 done
3419   done
3420 IFS=$as_save_IFS
3421
3422 fi
3423 fi
3424 GENHTML=$ac_cv_prog_GENHTML
3425 if test -n "$GENHTML"; then
3426   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3427 $as_echo "$GENHTML" >&6; }
3428 else
3429   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3430 $as_echo "no" >&6; }
3431 fi
3432
3433
3434   test -n "$GENHTML" && break
3435 done
3436
3437 if test -z "$GENHTML"; then
3438   as_fn_error $? "genhtml not found" "$LINENO" 5
3439 fi
3440       ;;
3441     no)
3442       :
3443       ;;
3444     *)
3445       as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3446       ;;
3447   esac
3448
3449 else
3450   enable_coverage=no
3451
3452 fi
3453
3454
3455
3456
3457 #
3458 # DTrace
3459 #
3460
3461
3462 # Check whether --enable-dtrace was given.
3463 if test "${enable_dtrace+set}" = set; then :
3464   enableval=$enable_dtrace;
3465   case $enableval in
3466     yes)
3467       for ac_prog in dtrace
3468 do
3469   # Extract the first word of "$ac_prog", so it can be a program name with args.
3470 set dummy $ac_prog; ac_word=$2
3471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3472 $as_echo_n "checking for $ac_word... " >&6; }
3473 if ${ac_cv_prog_DTRACE+:} false; then :
3474   $as_echo_n "(cached) " >&6
3475 else
3476   if test -n "$DTRACE"; then
3477   ac_cv_prog_DTRACE="$DTRACE" # Let the user override the test.
3478 else
3479 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3480 for as_dir in $PATH
3481 do
3482   IFS=$as_save_IFS
3483   test -z "$as_dir" && as_dir=.
3484     for ac_exec_ext in '' $ac_executable_extensions; do
3485   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3486     ac_cv_prog_DTRACE="$ac_prog"
3487     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3488     break 2
3489   fi
3490 done
3491   done
3492 IFS=$as_save_IFS
3493
3494 fi
3495 fi
3496 DTRACE=$ac_cv_prog_DTRACE
3497 if test -n "$DTRACE"; then
3498   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3499 $as_echo "$DTRACE" >&6; }
3500 else
3501   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3502 $as_echo "no" >&6; }
3503 fi
3504
3505
3506   test -n "$DTRACE" && break
3507 done
3508
3509 if test -z "$DTRACE"; then
3510   as_fn_error $? "dtrace not found" "$LINENO" 5
3511 fi
3512
3513       ;;
3514     no)
3515       :
3516       ;;
3517     *)
3518       as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3519       ;;
3520   esac
3521
3522 else
3523   enable_dtrace=no
3524
3525 fi
3526
3527
3528
3529
3530 #
3531 # TAP tests
3532 #
3533
3534
3535 # Check whether --enable-tap-tests was given.
3536 if test "${enable_tap_tests+set}" = set; then :
3537   enableval=$enable_tap_tests;
3538   case $enableval in
3539     yes)
3540       :
3541       ;;
3542     no)
3543       :
3544       ;;
3545     *)
3546       as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3547       ;;
3548   esac
3549
3550 else
3551   enable_tap_tests=no
3552
3553 fi
3554
3555
3556
3557
3558 #
3559 # Block size
3560 #
3561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3562 $as_echo_n "checking for block size... " >&6; }
3563
3564
3565
3566 # Check whether --with-blocksize was given.
3567 if test "${with_blocksize+set}" = set; then :
3568   withval=$with_blocksize;
3569   case $withval in
3570     yes)
3571       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3572       ;;
3573     no)
3574       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3575       ;;
3576     *)
3577       blocksize=$withval
3578       ;;
3579   esac
3580
3581 else
3582   blocksize=8
3583 fi
3584
3585
3586 case ${blocksize} in
3587   1) BLCKSZ=1024;;
3588   2) BLCKSZ=2048;;
3589   4) BLCKSZ=4096;;
3590   8) BLCKSZ=8192;;
3591  16) BLCKSZ=16384;;
3592  32) BLCKSZ=32768;;
3593   *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3594 esac
3595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3596 $as_echo "${blocksize}kB" >&6; }
3597
3598
3599 cat >>confdefs.h <<_ACEOF
3600 #define BLCKSZ ${BLCKSZ}
3601 _ACEOF
3602
3603
3604 #
3605 # Relation segment size
3606 #
3607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3608 $as_echo_n "checking for segment size... " >&6; }
3609
3610
3611
3612 # Check whether --with-segsize was given.
3613 if test "${with_segsize+set}" = set; then :
3614   withval=$with_segsize;
3615   case $withval in
3616     yes)
3617       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3618       ;;
3619     no)
3620       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3621       ;;
3622     *)
3623       segsize=$withval
3624       ;;
3625   esac
3626
3627 else
3628   segsize=1
3629 fi
3630
3631
3632 # this expression is set up to avoid unnecessary integer overflow
3633 # blocksize is already guaranteed to be a factor of 1024
3634 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3635 test $? -eq 0 || exit 1
3636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3637 $as_echo "${segsize}GB" >&6; }
3638
3639
3640 cat >>confdefs.h <<_ACEOF
3641 #define RELSEG_SIZE ${RELSEG_SIZE}
3642 _ACEOF
3643
3644
3645 #
3646 # WAL block size
3647 #
3648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3649 $as_echo_n "checking for WAL block size... " >&6; }
3650
3651
3652
3653 # Check whether --with-wal-blocksize was given.
3654 if test "${with_wal_blocksize+set}" = set; then :
3655   withval=$with_wal_blocksize;
3656   case $withval in
3657     yes)
3658       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3659       ;;
3660     no)
3661       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3662       ;;
3663     *)
3664       wal_blocksize=$withval
3665       ;;
3666   esac
3667
3668 else
3669   wal_blocksize=8
3670 fi
3671
3672
3673 case ${wal_blocksize} in
3674   1) XLOG_BLCKSZ=1024;;
3675   2) XLOG_BLCKSZ=2048;;
3676   4) XLOG_BLCKSZ=4096;;
3677   8) XLOG_BLCKSZ=8192;;
3678  16) XLOG_BLCKSZ=16384;;
3679  32) XLOG_BLCKSZ=32768;;
3680  64) XLOG_BLCKSZ=65536;;
3681   *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3682 esac
3683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3684 $as_echo "${wal_blocksize}kB" >&6; }
3685
3686
3687 cat >>confdefs.h <<_ACEOF
3688 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3689 _ACEOF
3690
3691
3692 #
3693 # WAL segment size
3694 #
3695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL segment size" >&5
3696 $as_echo_n "checking for WAL segment size... " >&6; }
3697
3698
3699
3700 # Check whether --with-wal-segsize was given.
3701 if test "${with_wal_segsize+set}" = set; then :
3702   withval=$with_wal_segsize;
3703   case $withval in
3704     yes)
3705       as_fn_error $? "argument required for --with-wal-segsize option" "$LINENO" 5
3706       ;;
3707     no)
3708       as_fn_error $? "argument required for --with-wal-segsize option" "$LINENO" 5
3709       ;;
3710     *)
3711       wal_segsize=$withval
3712       ;;
3713   esac
3714
3715 else
3716   wal_segsize=16
3717 fi
3718
3719
3720 case ${wal_segsize} in
3721   1) ;;
3722   2) ;;
3723   4) ;;
3724   8) ;;
3725  16) ;;
3726  32) ;;
3727  64) ;;
3728   *) as_fn_error $? "Invalid WAL segment size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3729 esac
3730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_segsize}MB" >&5
3731 $as_echo "${wal_segsize}MB" >&6; }
3732
3733
3734 cat >>confdefs.h <<_ACEOF
3735 #define XLOG_SEG_SIZE (${wal_segsize} * 1024 * 1024)
3736 _ACEOF
3737
3738
3739 #
3740 # C compiler
3741 #
3742
3743 # For historical reasons you can also use --with-CC to specify the C compiler
3744 # to use, although the standard way to do this is to set the CC environment
3745 # variable.
3746
3747
3748
3749 # Check whether --with-CC was given.
3750 if test "${with_CC+set}" = set; then :
3751   withval=$with_CC;
3752   case $withval in
3753     yes)
3754       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3755       ;;
3756     no)
3757       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3758       ;;
3759     *)
3760       CC=$with_CC
3761       ;;
3762   esac
3763
3764 fi
3765
3766
3767
3768 case $template in
3769   aix) pgac_cc_list="gcc xlc";;
3770     *) pgac_cc_list="gcc cc";;
3771 esac
3772
3773 ac_ext=c
3774 ac_cpp='$CPP $CPPFLAGS'
3775 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3776 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3777 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3778 if test -n "$ac_tool_prefix"; then
3779   for ac_prog in $pgac_cc_list
3780   do
3781     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3782 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3784 $as_echo_n "checking for $ac_word... " >&6; }
3785 if ${ac_cv_prog_CC+:} false; then :
3786   $as_echo_n "(cached) " >&6
3787 else
3788   if test -n "$CC"; then
3789   ac_cv_prog_CC="$CC" # Let the user override the test.
3790 else
3791 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3792 for as_dir in $PATH
3793 do
3794   IFS=$as_save_IFS
3795   test -z "$as_dir" && as_dir=.
3796     for ac_exec_ext in '' $ac_executable_extensions; do
3797   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3798     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3799     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3800     break 2
3801   fi
3802 done
3803   done
3804 IFS=$as_save_IFS
3805
3806 fi
3807 fi
3808 CC=$ac_cv_prog_CC
3809 if test -n "$CC"; then
3810   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3811 $as_echo "$CC" >&6; }
3812 else
3813   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3814 $as_echo "no" >&6; }
3815 fi
3816
3817
3818     test -n "$CC" && break
3819   done
3820 fi
3821 if test -z "$CC"; then
3822   ac_ct_CC=$CC
3823   for ac_prog in $pgac_cc_list
3824 do
3825   # Extract the first word of "$ac_prog", so it can be a program name with args.
3826 set dummy $ac_prog; ac_word=$2
3827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3828 $as_echo_n "checking for $ac_word... " >&6; }
3829 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3830   $as_echo_n "(cached) " >&6
3831 else
3832   if test -n "$ac_ct_CC"; then
3833   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3834 else
3835 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3836 for as_dir in $PATH
3837 do
3838   IFS=$as_save_IFS
3839   test -z "$as_dir" && as_dir=.
3840     for ac_exec_ext in '' $ac_executable_extensions; do
3841   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3842     ac_cv_prog_ac_ct_CC="$ac_prog"
3843     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3844     break 2
3845   fi
3846 done
3847   done
3848 IFS=$as_save_IFS
3849
3850 fi
3851 fi
3852 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3853 if test -n "$ac_ct_CC"; then
3854   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3855 $as_echo "$ac_ct_CC" >&6; }
3856 else
3857   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3858 $as_echo "no" >&6; }
3859 fi
3860
3861
3862   test -n "$ac_ct_CC" && break
3863 done
3864
3865   if test "x$ac_ct_CC" = x; then
3866     CC=""
3867   else
3868     case $cross_compiling:$ac_tool_warned in
3869 yes:)
3870 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3871 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3872 ac_tool_warned=yes ;;
3873 esac
3874     CC=$ac_ct_CC
3875   fi
3876 fi
3877
3878
3879 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3880 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3881 as_fn_error $? "no acceptable C compiler found in \$PATH
3882 See \`config.log' for more details" "$LINENO" 5; }
3883
3884 # Provide some information about the compiler.
3885 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3886 set X $ac_compile
3887 ac_compiler=$2
3888 for ac_option in --version -v -V -qversion; do
3889   { { ac_try="$ac_compiler $ac_option >&5"
3890 case "(($ac_try" in
3891   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3892   *) ac_try_echo=$ac_try;;
3893 esac
3894 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3895 $as_echo "$ac_try_echo"; } >&5
3896   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3897   ac_status=$?
3898   if test -s conftest.err; then
3899     sed '10a\
3900 ... rest of stderr output deleted ...
3901          10q' conftest.err >conftest.er1
3902     cat conftest.er1 >&5
3903   fi
3904   rm -f conftest.er1 conftest.err
3905   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3906   test $ac_status = 0; }
3907 done
3908
3909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3910 /* end confdefs.h.  */
3911
3912 int
3913 main ()
3914 {
3915
3916   ;
3917   return 0;
3918 }
3919 _ACEOF
3920 ac_clean_files_save=$ac_clean_files
3921 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3922 # Try to create an executable without -o first, disregard a.out.
3923 # It will help us diagnose broken compilers, and finding out an intuition
3924 # of exeext.
3925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3926 $as_echo_n "checking whether the C compiler works... " >&6; }
3927 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3928
3929 # The possible output files:
3930 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3931
3932 ac_rmfiles=
3933 for ac_file in $ac_files
3934 do
3935   case $ac_file in
3936     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3937     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3938   esac
3939 done
3940 rm -f $ac_rmfiles
3941
3942 if { { ac_try="$ac_link_default"
3943 case "(($ac_try" in
3944   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3945   *) ac_try_echo=$ac_try;;
3946 esac
3947 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3948 $as_echo "$ac_try_echo"; } >&5
3949   (eval "$ac_link_default") 2>&5
3950   ac_status=$?
3951   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3952   test $ac_status = 0; }; then :
3953   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3954 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3955 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3956 # so that the user can short-circuit this test for compilers unknown to
3957 # Autoconf.
3958 for ac_file in $ac_files ''
3959 do
3960   test -f "$ac_file" || continue
3961   case $ac_file in
3962     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3963         ;;
3964     [ab].out )
3965         # We found the default executable, but exeext='' is most
3966         # certainly right.
3967         break;;
3968     *.* )
3969         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3970         then :; else
3971            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3972         fi
3973         # We set ac_cv_exeext here because the later test for it is not
3974         # safe: cross compilers may not add the suffix if given an `-o'
3975         # argument, so we may need to know it at that point already.
3976         # Even if this section looks crufty: it has the advantage of
3977         # actually working.
3978         break;;
3979     * )
3980         break;;
3981   esac
3982 done
3983 test "$ac_cv_exeext" = no && ac_cv_exeext=
3984
3985 else
3986   ac_file=''
3987 fi
3988 if test -z "$ac_file"; then :
3989   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3990 $as_echo "no" >&6; }
3991 $as_echo "$as_me: failed program was:" >&5
3992 sed 's/^/| /' conftest.$ac_ext >&5
3993
3994 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3995 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3996 as_fn_error 77 "C compiler cannot create executables
3997 See \`config.log' for more details" "$LINENO" 5; }
3998 else
3999   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4000 $as_echo "yes" >&6; }
4001 fi
4002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4003 $as_echo_n "checking for C compiler default output file name... " >&6; }
4004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4005 $as_echo "$ac_file" >&6; }
4006 ac_exeext=$ac_cv_exeext
4007
4008 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4009 ac_clean_files=$ac_clean_files_save
4010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4011 $as_echo_n "checking for suffix of executables... " >&6; }
4012 if { { ac_try="$ac_link"
4013 case "(($ac_try" in
4014   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4015   *) ac_try_echo=$ac_try;;
4016 esac
4017 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4018 $as_echo "$ac_try_echo"; } >&5
4019   (eval "$ac_link") 2>&5
4020   ac_status=$?
4021   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4022   test $ac_status = 0; }; then :
4023   # If both `conftest.exe' and `conftest' are `present' (well, observable)
4024 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4025 # work properly (i.e., refer to `conftest.exe'), while it won't with
4026 # `rm'.
4027 for ac_file in conftest.exe conftest conftest.*; do
4028   test -f "$ac_file" || continue
4029   case $ac_file in
4030     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4031     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4032           break;;
4033     * ) break;;
4034   esac
4035 done
4036 else
4037   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4038 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4039 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4040 See \`config.log' for more details" "$LINENO" 5; }
4041 fi
4042 rm -f conftest conftest$ac_cv_exeext
4043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4044 $as_echo "$ac_cv_exeext" >&6; }
4045
4046 rm -f conftest.$ac_ext
4047 EXEEXT=$ac_cv_exeext
4048 ac_exeext=$EXEEXT
4049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4050 /* end confdefs.h.  */
4051 #include <stdio.h>
4052 int
4053 main ()
4054 {
4055 FILE *f = fopen ("conftest.out", "w");
4056  return ferror (f) || fclose (f) != 0;
4057
4058   ;
4059   return 0;
4060 }
4061 _ACEOF
4062 ac_clean_files="$ac_clean_files conftest.out"
4063 # Check that the compiler produces executables we can run.  If not, either
4064 # the compiler is broken, or we cross compile.
4065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4066 $as_echo_n "checking whether we are cross compiling... " >&6; }
4067 if test "$cross_compiling" != yes; then
4068   { { ac_try="$ac_link"
4069 case "(($ac_try" in
4070   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4071   *) ac_try_echo=$ac_try;;
4072 esac
4073 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4074 $as_echo "$ac_try_echo"; } >&5
4075   (eval "$ac_link") 2>&5
4076   ac_status=$?
4077   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4078   test $ac_status = 0; }
4079   if { ac_try='./conftest$ac_cv_exeext'
4080   { { case "(($ac_try" in
4081   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4082   *) ac_try_echo=$ac_try;;
4083 esac
4084 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4085 $as_echo "$ac_try_echo"; } >&5
4086   (eval "$ac_try") 2>&5
4087   ac_status=$?
4088   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4089   test $ac_status = 0; }; }; then
4090     cross_compiling=no
4091   else
4092     if test "$cross_compiling" = maybe; then
4093         cross_compiling=yes
4094     else
4095         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4096 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4097 as_fn_error $? "cannot run C compiled programs.
4098 If you meant to cross compile, use \`--host'.
4099 See \`config.log' for more details" "$LINENO" 5; }
4100     fi
4101   fi
4102 fi
4103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4104 $as_echo "$cross_compiling" >&6; }
4105
4106 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4107 ac_clean_files=$ac_clean_files_save
4108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4109 $as_echo_n "checking for suffix of object files... " >&6; }
4110 if ${ac_cv_objext+:} false; then :
4111   $as_echo_n "(cached) " >&6
4112 else
4113   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4114 /* end confdefs.h.  */
4115
4116 int
4117 main ()
4118 {
4119
4120   ;
4121   return 0;
4122 }
4123 _ACEOF
4124 rm -f conftest.o conftest.obj
4125 if { { ac_try="$ac_compile"
4126 case "(($ac_try" in
4127   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4128   *) ac_try_echo=$ac_try;;
4129 esac
4130 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4131 $as_echo "$ac_try_echo"; } >&5
4132   (eval "$ac_compile") 2>&5
4133   ac_status=$?
4134   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4135   test $ac_status = 0; }; then :
4136   for ac_file in conftest.o conftest.obj conftest.*; do
4137   test -f "$ac_file" || continue;
4138   case $ac_file in
4139     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4140     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4141        break;;
4142   esac
4143 done
4144 else
4145   $as_echo "$as_me: failed program was:" >&5
4146 sed 's/^/| /' conftest.$ac_ext >&5
4147
4148 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4149 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4150 as_fn_error $? "cannot compute suffix of object files: cannot compile
4151 See \`config.log' for more details" "$LINENO" 5; }
4152 fi
4153 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4154 fi
4155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4156 $as_echo "$ac_cv_objext" >&6; }
4157 OBJEXT=$ac_cv_objext
4158 ac_objext=$OBJEXT
4159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4160 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4161 if ${ac_cv_c_compiler_gnu+:} false; then :
4162   $as_echo_n "(cached) " >&6
4163 else
4164   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4165 /* end confdefs.h.  */
4166
4167 int
4168 main ()
4169 {
4170 #ifndef __GNUC__
4171        choke me
4172 #endif
4173
4174   ;
4175   return 0;
4176 }
4177 _ACEOF
4178 if ac_fn_c_try_compile "$LINENO"; then :
4179   ac_compiler_gnu=yes
4180 else
4181   ac_compiler_gnu=no
4182 fi
4183 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4184 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4185
4186 fi
4187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4188 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4189 if test $ac_compiler_gnu = yes; then
4190   GCC=yes
4191 else
4192   GCC=
4193 fi
4194 ac_test_CFLAGS=${CFLAGS+set}
4195 ac_save_CFLAGS=$CFLAGS
4196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4197 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4198 if ${ac_cv_prog_cc_g+:} false; then :
4199   $as_echo_n "(cached) " >&6
4200 else
4201   ac_save_c_werror_flag=$ac_c_werror_flag
4202    ac_c_werror_flag=yes
4203    ac_cv_prog_cc_g=no
4204    CFLAGS="-g"
4205    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4206 /* end confdefs.h.  */
4207
4208 int
4209 main ()
4210 {
4211
4212   ;
4213   return 0;
4214 }
4215 _ACEOF
4216 if ac_fn_c_try_compile "$LINENO"; then :
4217   ac_cv_prog_cc_g=yes
4218 else
4219   CFLAGS=""
4220       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4221 /* end confdefs.h.  */
4222
4223 int
4224 main ()
4225 {
4226
4227   ;
4228   return 0;
4229 }
4230 _ACEOF
4231 if ac_fn_c_try_compile "$LINENO"; then :
4232
4233 else
4234   ac_c_werror_flag=$ac_save_c_werror_flag
4235          CFLAGS="-g"
4236          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4237 /* end confdefs.h.  */
4238
4239 int
4240 main ()
4241 {
4242
4243   ;
4244   return 0;
4245 }
4246 _ACEOF
4247 if ac_fn_c_try_compile "$LINENO"; then :
4248   ac_cv_prog_cc_g=yes
4249 fi
4250 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4251 fi
4252 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4253 fi
4254 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4255    ac_c_werror_flag=$ac_save_c_werror_flag
4256 fi
4257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4258 $as_echo "$ac_cv_prog_cc_g" >&6; }
4259 if test "$ac_test_CFLAGS" = set; then
4260   CFLAGS=$ac_save_CFLAGS
4261 elif test $ac_cv_prog_cc_g = yes; then
4262   if test "$GCC" = yes; then
4263     CFLAGS="-g -O2"
4264   else
4265     CFLAGS="-g"
4266   fi
4267 else
4268   if test "$GCC" = yes; then
4269     CFLAGS="-O2"
4270   else
4271     CFLAGS=
4272   fi
4273 fi
4274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4275 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4276 if ${ac_cv_prog_cc_c89+:} false; then :
4277   $as_echo_n "(cached) " >&6
4278 else
4279   ac_cv_prog_cc_c89=no
4280 ac_save_CC=$CC
4281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4282 /* end confdefs.h.  */
4283 #include <stdarg.h>
4284 #include <stdio.h>
4285 struct stat;
4286 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4287 struct buf { int x; };
4288 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4289 static char *e (p, i)
4290      char **p;
4291      int i;
4292 {
4293   return p[i];
4294 }
4295 static char *f (char * (*g) (char **, int), char **p, ...)
4296 {
4297   char *s;
4298   va_list v;
4299   va_start (v,p);
4300   s = g (p, va_arg (v,int));
4301   va_end (v);
4302   return s;
4303 }
4304
4305 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4306    function prototypes and stuff, but not '\xHH' hex character constants.
4307    These don't provoke an error unfortunately, instead are silently treated
4308    as 'x'.  The following induces an error, until -std is added to get
4309    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4310    array size at least.  It's necessary to write '\x00'==0 to get something
4311    that's true only with -std.  */
4312 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4313
4314 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4315    inside strings and character constants.  */
4316 #define FOO(x) 'x'
4317 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4318
4319 int test (int i, double x);
4320 struct s1 {int (*f) (int a);};
4321 struct s2 {int (*f) (double a);};
4322 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4323 int argc;
4324 char **argv;
4325 int
4326 main ()
4327 {
4328 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4329   ;
4330   return 0;
4331 }
4332 _ACEOF
4333 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4334         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4335 do
4336   CC="$ac_save_CC $ac_arg"
4337   if ac_fn_c_try_compile "$LINENO"; then :
4338   ac_cv_prog_cc_c89=$ac_arg
4339 fi
4340 rm -f core conftest.err conftest.$ac_objext
4341   test "x$ac_cv_prog_cc_c89" != "xno" && break
4342 done
4343 rm -f conftest.$ac_ext
4344 CC=$ac_save_CC
4345
4346 fi
4347 # AC_CACHE_VAL
4348 case "x$ac_cv_prog_cc_c89" in
4349   x)
4350     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4351 $as_echo "none needed" >&6; } ;;
4352   xno)
4353     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4354 $as_echo "unsupported" >&6; } ;;
4355   *)
4356     CC="$CC $ac_cv_prog_cc_c89"
4357     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4358 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4359 esac
4360 if test "x$ac_cv_prog_cc_c89" != xno; then :
4361
4362 fi
4363
4364 ac_ext=c
4365 ac_cpp='$CPP $CPPFLAGS'
4366 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4367 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4368 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4369
4370
4371 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4372 # but has idiosyncrasies of its own.  We assume icc will define
4373 # __INTEL_COMPILER regardless of CFLAGS.
4374
4375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4376 /* end confdefs.h.  */
4377
4378 int
4379 main ()
4380 {
4381 #ifndef __INTEL_COMPILER
4382 choke me
4383 #endif
4384   ;
4385   return 0;
4386 }
4387 _ACEOF
4388 if ac_fn_c_try_compile "$LINENO"; then :
4389   ICC=yes
4390 else
4391   ICC=no
4392 fi
4393 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4394
4395 # Check if it's Sun Studio compiler. We assume that
4396 # __SUNPRO_C will be defined for Sun Studio compilers
4397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4398 /* end confdefs.h.  */
4399
4400 int
4401 main ()
4402 {
4403 #ifndef __SUNPRO_C
4404 choke me
4405 #endif
4406   ;
4407   return 0;
4408 }
4409 _ACEOF
4410 if ac_fn_c_try_compile "$LINENO"; then :
4411   SUN_STUDIO_CC=yes
4412 else
4413   SUN_STUDIO_CC=no
4414 fi
4415 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4416
4417
4418
4419 unset CFLAGS
4420
4421 #
4422 # Read the template
4423 #
4424 . "$srcdir/src/template/$template" || exit
4425
4426 # CFLAGS are selected so:
4427 # If the user specifies something in the environment, that is used.
4428 # else:  If the template file set something, that is used.
4429 # else:  If coverage was enabled, don't set anything.
4430 # else:  If the compiler is GCC, then we use -O2.
4431 # else:  If the compiler is something else, then we use -O, unless debugging.
4432
4433 if test "$ac_env_CFLAGS_set" = set; then
4434   CFLAGS=$ac_env_CFLAGS_value
4435 elif test "${CFLAGS+set}" = set; then
4436   : # (keep what template set)
4437 elif test "$enable_coverage" = yes; then
4438   : # no optimization by default
4439 elif test "$GCC" = yes; then
4440   CFLAGS="-O2"
4441 else
4442   # if the user selected debug mode, don't use -O
4443   if test "$enable_debug" != yes; then
4444     CFLAGS="-O"
4445   fi
4446 fi
4447
4448 # CFLAGS we determined above will be added back at the end
4449 user_CFLAGS=$CFLAGS
4450 CFLAGS=""
4451
4452 # set CFLAGS_VECTOR from the environment, if available
4453 if test "$ac_env_CFLAGS_VECTOR_set" = set; then
4454   CFLAGS_VECTOR=$ac_env_CFLAGS_VECTOR_value
4455 fi
4456
4457 # Some versions of GCC support some additional useful warning flags.
4458 # Check whether they are supported, and add them to CFLAGS if so.
4459 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
4460 # but has its own.  Also check other compiler-specific flags here.
4461
4462 if test "$GCC" = yes -a "$ICC" = no; then
4463   CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
4464   # These work in some but not all gcc versions
4465   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5
4466 $as_echo_n "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
4467 if ${pgac_cv_prog_cc_cflags__Wdeclaration_after_statement+:} false; then :
4468   $as_echo_n "(cached) " >&6
4469 else
4470   pgac_save_CFLAGS=$CFLAGS
4471 CFLAGS="$pgac_save_CFLAGS -Wdeclaration-after-statement"
4472 ac_save_c_werror_flag=$ac_c_werror_flag
4473 ac_c_werror_flag=yes
4474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4475 /* end confdefs.h.  */
4476
4477 int
4478 main ()
4479 {
4480
4481   ;
4482   return 0;
4483 }
4484 _ACEOF
4485 if ac_fn_c_try_compile "$LINENO"; then :
4486   pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=yes
4487 else
4488   pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=no
4489 fi
4490 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4491 ac_c_werror_flag=$ac_save_c_werror_flag
4492 CFLAGS="$pgac_save_CFLAGS"
4493 fi
4494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&5
4495 $as_echo "$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&6; }
4496 if test x"$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" = x"yes"; then
4497   CFLAGS="$CFLAGS -Wdeclaration-after-statement"
4498 fi
4499
4500   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wendif-labels" >&5
4501 $as_echo_n "checking whether $CC supports -Wendif-labels... " >&6; }
4502 if ${pgac_cv_prog_cc_cflags__Wendif_labels+:} false; then :
4503   $as_echo_n "(cached) " >&6
4504 else
4505   pgac_save_CFLAGS=$CFLAGS
4506 CFLAGS="$pgac_save_CFLAGS -Wendif-labels"
4507 ac_save_c_werror_flag=$ac_c_werror_flag
4508 ac_c_werror_flag=yes
4509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4510 /* end confdefs.h.  */
4511
4512 int
4513 main ()
4514 {
4515
4516   ;
4517   return 0;
4518 }
4519 _ACEOF
4520 if ac_fn_c_try_compile "$LINENO"; then :
4521   pgac_cv_prog_cc_cflags__Wendif_labels=yes
4522 else
4523   pgac_cv_prog_cc_cflags__Wendif_labels=no
4524 fi
4525 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4526 ac_c_werror_flag=$ac_save_c_werror_flag
4527 CFLAGS="$pgac_save_CFLAGS"
4528 fi
4529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wendif_labels" >&5
4530 $as_echo "$pgac_cv_prog_cc_cflags__Wendif_labels" >&6; }
4531 if test x"$pgac_cv_prog_cc_cflags__Wendif_labels" = x"yes"; then
4532   CFLAGS="$CFLAGS -Wendif-labels"
4533 fi
4534
4535   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wmissing-format-attribute" >&5
4536 $as_echo_n "checking whether $CC supports -Wmissing-format-attribute... " >&6; }
4537 if ${pgac_cv_prog_cc_cflags__Wmissing_format_attribute+:} false; then :
4538   $as_echo_n "(cached) " >&6
4539 else
4540   pgac_save_CFLAGS=$CFLAGS
4541 CFLAGS="$pgac_save_CFLAGS -Wmissing-format-attribute"
4542 ac_save_c_werror_flag=$ac_c_werror_flag
4543 ac_c_werror_flag=yes
4544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4545 /* end confdefs.h.  */
4546
4547 int
4548 main ()
4549 {
4550
4551   ;
4552   return 0;
4553 }
4554 _ACEOF
4555 if ac_fn_c_try_compile "$LINENO"; then :
4556   pgac_cv_prog_cc_cflags__Wmissing_format_attribute=yes
4557 else
4558   pgac_cv_prog_cc_cflags__Wmissing_format_attribute=no
4559 fi
4560 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4561 ac_c_werror_flag=$ac_save_c_werror_flag
4562 CFLAGS="$pgac_save_CFLAGS"
4563 fi
4564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wmissing_format_attribute" >&5
4565 $as_echo "$pgac_cv_prog_cc_cflags__Wmissing_format_attribute" >&6; }
4566 if test x"$pgac_cv_prog_cc_cflags__Wmissing_format_attribute" = x"yes"; then
4567   CFLAGS="$CFLAGS -Wmissing-format-attribute"
4568 fi
4569
4570   # This was included in -Wall/-Wformat in older GCC versions
4571   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wformat-security" >&5
4572 $as_echo_n "checking whether $CC supports -Wformat-security... " >&6; }
4573 if ${pgac_cv_prog_cc_cflags__Wformat_security+:} false; then :
4574   $as_echo_n "(cached) " >&6
4575 else
4576   pgac_save_CFLAGS=$CFLAGS
4577 CFLAGS="$pgac_save_CFLAGS -Wformat-security"
4578 ac_save_c_werror_flag=$ac_c_werror_flag
4579 ac_c_werror_flag=yes
4580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4581 /* end confdefs.h.  */
4582
4583 int
4584 main ()
4585 {
4586
4587   ;
4588   return 0;
4589 }
4590 _ACEOF
4591 if ac_fn_c_try_compile "$LINENO"; then :
4592   pgac_cv_prog_cc_cflags__Wformat_security=yes
4593 else
4594   pgac_cv_prog_cc_cflags__Wformat_security=no
4595 fi
4596 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4597 ac_c_werror_flag=$ac_save_c_werror_flag
4598 CFLAGS="$pgac_save_CFLAGS"
4599 fi
4600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wformat_security" >&5
4601 $as_echo "$pgac_cv_prog_cc_cflags__Wformat_security" >&6; }
4602 if test x"$pgac_cv_prog_cc_cflags__Wformat_security" = x"yes"; then
4603   CFLAGS="$CFLAGS -Wformat-security"
4604 fi
4605
4606   # Disable strict-aliasing rules; needed for gcc 3.3+
4607   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-strict-aliasing" >&5
4608 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4609 if ${pgac_cv_prog_cc_cflags__fno_strict_aliasing+:} false; then :
4610   $as_echo_n "(cached) " >&6
4611 else
4612   pgac_save_CFLAGS=$CFLAGS
4613 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4614 ac_save_c_werror_flag=$ac_c_werror_flag
4615 ac_c_werror_flag=yes
4616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4617 /* end confdefs.h.  */
4618
4619 int
4620 main ()
4621 {
4622
4623   ;
4624   return 0;
4625 }
4626 _ACEOF
4627 if ac_fn_c_try_compile "$LINENO"; then :
4628   pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4629 else
4630   pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4631 fi
4632 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4633 ac_c_werror_flag=$ac_save_c_werror_flag
4634 CFLAGS="$pgac_save_CFLAGS"
4635 fi
4636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4637 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4638 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4639   CFLAGS="$CFLAGS -fno-strict-aliasing"
4640 fi
4641
4642   # Disable optimizations that assume no overflow; needed for gcc 4.3+
4643   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fwrapv" >&5
4644 $as_echo_n "checking whether $CC supports -fwrapv... " >&6; }
4645 if ${pgac_cv_prog_cc_cflags__fwrapv+:} false; then :
4646   $as_echo_n "(cached) " >&6
4647 else
4648   pgac_save_CFLAGS=$CFLAGS
4649 CFLAGS="$pgac_save_CFLAGS -fwrapv"
4650 ac_save_c_werror_flag=$ac_c_werror_flag
4651 ac_c_werror_flag=yes
4652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4653 /* end confdefs.h.  */
4654
4655 int
4656 main ()
4657 {
4658
4659   ;
4660   return 0;
4661 }
4662 _ACEOF
4663 if ac_fn_c_try_compile "$LINENO"; then :
4664   pgac_cv_prog_cc_cflags__fwrapv=yes
4665 else
4666   pgac_cv_prog_cc_cflags__fwrapv=no
4667 fi
4668 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4669 ac_c_werror_flag=$ac_save_c_werror_flag
4670 CFLAGS="$pgac_save_CFLAGS"
4671 fi
4672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fwrapv" >&5
4673 $as_echo "$pgac_cv_prog_cc_cflags__fwrapv" >&6; }
4674 if test x"$pgac_cv_prog_cc_cflags__fwrapv" = x"yes"; then
4675   CFLAGS="$CFLAGS -fwrapv"
4676 fi
4677
4678   # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
4679   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fexcess-precision=standard" >&5
4680 $as_echo_n "checking whether $CC supports -fexcess-precision=standard... " >&6; }
4681 if ${pgac_cv_prog_cc_cflags__fexcess_precision_standard+:} false; then :
4682   $as_echo_n "(cached) " >&6
4683 else
4684   pgac_save_CFLAGS=$CFLAGS
4685 CFLAGS="$pgac_save_CFLAGS -fexcess-precision=standard"
4686 ac_save_c_werror_flag=$ac_c_werror_flag
4687 ac_c_werror_flag=yes
4688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4689 /* end confdefs.h.  */
4690
4691 int
4692 main ()
4693 {
4694
4695   ;
4696   return 0;
4697 }
4698 _ACEOF
4699 if ac_fn_c_try_compile "$LINENO"; then :
4700   pgac_cv_prog_cc_cflags__fexcess_precision_standard=yes
4701 else
4702   pgac_cv_prog_cc_cflags__fexcess_precision_standard=no
4703 fi
4704 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4705 ac_c_werror_flag=$ac_save_c_werror_flag
4706 CFLAGS="$pgac_save_CFLAGS"
4707 fi
4708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fexcess_precision_standard" >&5
4709 $as_echo "$pgac_cv_prog_cc_cflags__fexcess_precision_standard" >&6; }
4710 if test x"$pgac_cv_prog_cc_cflags__fexcess_precision_standard" = x"yes"; then
4711   CFLAGS="$CFLAGS -fexcess-precision=standard"
4712 fi
4713
4714   # Optimization flags for specific files that benefit from vectorization
4715   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -funroll-loops" >&5
4716 $as_echo_n "checking whether $CC supports -funroll-loops... " >&6; }
4717 if ${pgac_cv_prog_cc_cflags__funroll_loops+:} false; then :
4718   $as_echo_n "(cached) " >&6
4719 else
4720   pgac_save_CFLAGS=$CFLAGS
4721 CFLAGS="$pgac_save_CFLAGS -funroll-loops"
4722 ac_save_c_werror_flag=$ac_c_werror_flag
4723 ac_c_werror_flag=yes
4724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4725 /* end confdefs.h.  */
4726
4727 int
4728 main ()
4729 {
4730
4731   ;
4732   return 0;
4733 }
4734 _ACEOF
4735 if ac_fn_c_try_compile "$LINENO"; then :
4736   pgac_cv_prog_cc_cflags__funroll_loops=yes
4737 else
4738   pgac_cv_prog_cc_cflags__funroll_loops=no
4739 fi
4740 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4741 ac_c_werror_flag=$ac_save_c_werror_flag
4742 CFLAGS="$pgac_save_CFLAGS"
4743 fi
4744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__funroll_loops" >&5
4745 $as_echo "$pgac_cv_prog_cc_cflags__funroll_loops" >&6; }
4746 if test x"$pgac_cv_prog_cc_cflags__funroll_loops" = x"yes"; then
4747   CFLAGS_VECTOR="${CFLAGS_VECTOR} -funroll-loops"
4748 fi
4749
4750   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -ftree-vectorize" >&5
4751 $as_echo_n "checking whether $CC supports -ftree-vectorize... " >&6; }
4752 if ${pgac_cv_prog_cc_cflags__ftree_vectorize+:} false; then :
4753   $as_echo_n "(cached) " >&6
4754 else
4755   pgac_save_CFLAGS=$CFLAGS
4756 CFLAGS="$pgac_save_CFLAGS -ftree-vectorize"
4757 ac_save_c_werror_flag=$ac_c_werror_flag
4758 ac_c_werror_flag=yes
4759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4760 /* end confdefs.h.  */
4761
4762 int
4763 main ()
4764 {
4765
4766   ;
4767   return 0;
4768 }
4769 _ACEOF
4770 if ac_fn_c_try_compile "$LINENO"; then :
4771   pgac_cv_prog_cc_cflags__ftree_vectorize=yes
4772 else
4773   pgac_cv_prog_cc_cflags__ftree_vectorize=no
4774 fi
4775 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4776 ac_c_werror_flag=$ac_save_c_werror_flag
4777 CFLAGS="$pgac_save_CFLAGS"
4778 fi
4779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__ftree_vectorize" >&5
4780 $as_echo "$pgac_cv_prog_cc_cflags__ftree_vectorize" >&6; }
4781 if test x"$pgac_cv_prog_cc_cflags__ftree_vectorize" = x"yes"; then
4782   CFLAGS_VECTOR="${CFLAGS_VECTOR} -ftree-vectorize"
4783 fi
4784
4785   # We want to suppress clang's unhelpful unused-command-line-argument warnings
4786   # but gcc won't complain about unrecognized -Wno-foo switches, so we have to
4787   # test for the positive form and if that works, add the negative form
4788   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wunused-command-line-argument" >&5
4789 $as_echo_n "checking whether $CC supports -Wunused-command-line-argument... " >&6; }
4790 if ${pgac_cv_prog_cc_cflags__Wunused_command_line_argument+:} false; then :
4791   $as_echo_n "(cached) " >&6
4792 else
4793   pgac_save_CFLAGS=$CFLAGS
4794 CFLAGS="$pgac_save_CFLAGS -Wunused-command-line-argument"
4795 ac_save_c_werror_flag=$ac_c_werror_flag
4796 ac_c_werror_flag=yes
4797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4798 /* end confdefs.h.  */
4799
4800 int
4801 main ()
4802 {
4803
4804   ;
4805   return 0;
4806 }
4807 _ACEOF
4808 if ac_fn_c_try_compile "$LINENO"; then :
4809   pgac_cv_prog_cc_cflags__Wunused_command_line_argument=yes
4810 else
4811   pgac_cv_prog_cc_cflags__Wunused_command_line_argument=no
4812 fi
4813 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4814 ac_c_werror_flag=$ac_save_c_werror_flag
4815 CFLAGS="$pgac_save_CFLAGS"
4816 fi
4817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wunused_command_line_argument" >&5
4818 $as_echo "$pgac_cv_prog_cc_cflags__Wunused_command_line_argument" >&6; }
4819 if test x"$pgac_cv_prog_cc_cflags__Wunused_command_line_argument" = x"yes"; then
4820   NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
4821 fi
4822
4823   if test -n "$NOT_THE_CFLAGS"; then
4824     CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
4825   fi
4826 elif test "$ICC" = yes; then
4827   # Intel's compiler has a bug/misoptimization in checking for
4828   # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
4829   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mp1" >&5
4830 $as_echo_n "checking whether $CC supports -mp1... " >&6; }
4831 if ${pgac_cv_prog_cc_cflags__mp1+:} false; then :
4832   $as_echo_n "(cached) " >&6
4833 else
4834   pgac_save_CFLAGS=$CFLAGS
4835 CFLAGS="$pgac_save_CFLAGS -mp1"
4836 ac_save_c_werror_flag=$ac_c_werror_flag
4837 ac_c_werror_flag=yes
4838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4839 /* end confdefs.h.  */
4840
4841 int
4842 main ()
4843 {
4844
4845   ;
4846   return 0;
4847 }
4848 _ACEOF
4849 if ac_fn_c_try_compile "$LINENO"; then :
4850   pgac_cv_prog_cc_cflags__mp1=yes
4851 else
4852   pgac_cv_prog_cc_cflags__mp1=no
4853 fi
4854 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4855 ac_c_werror_flag=$ac_save_c_werror_flag
4856 CFLAGS="$pgac_save_CFLAGS"
4857 fi
4858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__mp1" >&5
4859 $as_echo "$pgac_cv_prog_cc_cflags__mp1" >&6; }
4860 if test x"$pgac_cv_prog_cc_cflags__mp1" = x"yes"; then
4861   CFLAGS="$CFLAGS -mp1"
4862 fi
4863
4864   # Make sure strict aliasing is off (though this is said to be the default)
4865   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-strict-aliasing" >&5
4866 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4867 if ${pgac_cv_prog_cc_cflags__fno_strict_aliasing+:} false; then :
4868   $as_echo_n "(cached) " >&6
4869 else
4870   pgac_save_CFLAGS=$CFLAGS
4871 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4872 ac_save_c_werror_flag=$ac_c_werror_flag
4873 ac_c_werror_flag=yes
4874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4875 /* end confdefs.h.  */
4876
4877 int
4878 main ()
4879 {
4880
4881   ;
4882   return 0;
4883 }
4884 _ACEOF
4885 if ac_fn_c_try_compile "$LINENO"; then :
4886   pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4887 else
4888   pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4889 fi
4890 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4891 ac_c_werror_flag=$ac_save_c_werror_flag
4892 CFLAGS="$pgac_save_CFLAGS"
4893 fi
4894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4895 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4896 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4897   CFLAGS="$CFLAGS -fno-strict-aliasing"
4898 fi
4899
4900 elif test "$PORTNAME" = "aix"; then
4901   # AIX's xlc has to have strict aliasing turned off too
4902   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -qnoansialias" >&5
4903 $as_echo_n "checking whether $CC supports -qnoansialias... " >&6; }
4904 if ${pgac_cv_prog_cc_cflags__qnoansialias+:} false; then :
4905   $as_echo_n "(cached) " >&6
4906 else
4907   pgac_save_CFLAGS=$CFLAGS
4908 CFLAGS="$pgac_save_CFLAGS -qnoansialias"
4909 ac_save_c_werror_flag=$ac_c_werror_flag
4910 ac_c_werror_flag=yes
4911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4912 /* end confdefs.h.  */
4913
4914 int
4915 main ()
4916 {
4917
4918   ;
4919   return 0;
4920 }
4921 _ACEOF
4922 if ac_fn_c_try_compile "$LINENO"; then :
4923   pgac_cv_prog_cc_cflags__qnoansialias=yes
4924 else
4925   pgac_cv_prog_cc_cflags__qnoansialias=no
4926 fi
4927 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4928 ac_c_werror_flag=$ac_save_c_werror_flag
4929 CFLAGS="$pgac_save_CFLAGS"
4930 fi
4931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__qnoansialias" >&5
4932 $as_echo "$pgac_cv_prog_cc_cflags__qnoansialias" >&6; }
4933 if test x"$pgac_cv_prog_cc_cflags__qnoansialias" = x"yes"; then
4934   CFLAGS="$CFLAGS -qnoansialias"
4935 fi
4936
4937   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -qlonglong" >&5
4938 $as_echo_n "checking whether $CC supports -qlonglong... " >&6; }
4939 if ${pgac_cv_prog_cc_cflags__qlonglong+:} false; then :
4940   $as_echo_n "(cached) " >&6
4941 else
4942   pgac_save_CFLAGS=$CFLAGS
4943 CFLAGS="$pgac_save_CFLAGS -qlonglong"
4944 ac_save_c_werror_flag=$ac_c_werror_flag
4945 ac_c_werror_flag=yes
4946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4947 /* end confdefs.h.  */
4948
4949 int
4950 main ()
4951 {
4952
4953   ;
4954   return 0;
4955 }
4956 _ACEOF
4957 if ac_fn_c_try_compile "$LINENO"; then :
4958   pgac_cv_prog_cc_cflags__qlonglong=yes
4959 else
4960   pgac_cv_prog_cc_cflags__qlonglong=no
4961 fi
4962 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4963 ac_c_werror_flag=$ac_save_c_werror_flag
4964 CFLAGS="$pgac_save_CFLAGS"
4965 fi
4966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__qlonglong" >&5
4967 $as_echo "$pgac_cv_prog_cc_cflags__qlonglong" >&6; }
4968 if test x"$pgac_cv_prog_cc_cflags__qlonglong" = x"yes"; then
4969   CFLAGS="$CFLAGS -qlonglong"
4970 fi
4971
4972 elif test "$PORTNAME" = "hpux"; then
4973   # On some versions of HP-UX, libm functions do not set errno by default.
4974   # Fix that by using +Olibmerrno if the compiler recognizes it.
4975   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports +Olibmerrno" >&5
4976 $as_echo_n "checking whether $CC supports +Olibmerrno... " >&6; }
4977 if ${pgac_cv_prog_cc_cflags_pOlibmerrno+:} false; then :
4978   $as_echo_n "(cached) " >&6
4979 else
4980   pgac_save_CFLAGS=$CFLAGS
4981 CFLAGS="$pgac_save_CFLAGS +Olibmerrno"
4982 ac_save_c_werror_flag=$ac_c_werror_flag
4983 ac_c_werror_flag=yes
4984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4985 /* end confdefs.h.  */
4986
4987 int
4988 main ()
4989 {
4990
4991   ;
4992   return 0;
4993 }
4994 _ACEOF
4995 if ac_fn_c_try_compile "$LINENO"; then :
4996   pgac_cv_prog_cc_cflags_pOlibmerrno=yes
4997 else
4998   pgac_cv_prog_cc_cflags_pOlibmerrno=no
4999 fi
5000 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5001 ac_c_werror_flag=$ac_save_c_werror_flag
5002 CFLAGS="$pgac_save_CFLAGS"
5003 fi
5004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags_pOlibmerrno" >&5
5005 $as_echo "$pgac_cv_prog_cc_cflags_pOlibmerrno" >&6; }
5006 if test x"$pgac_cv_prog_cc_cflags_pOlibmerrno" = x"yes"; then
5007   CFLAGS="$CFLAGS +Olibmerrno"
5008 fi
5009
5010 fi
5011
5012 CFLAGS_VECTOR=$CFLAGS_VECTOR
5013
5014
5015 # supply -g if --enable-debug
5016 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
5017   CFLAGS="$CFLAGS -g"
5018 fi
5019
5020 # enable code coverage if --enable-coverage
5021 if test "$enable_coverage" = yes; then
5022   if test "$GCC" = yes; then
5023     CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
5024   else
5025     as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
5026   fi
5027 fi
5028
5029 # enable profiling if --enable-profiling
5030 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
5031   if test "$GCC" = yes; then
5032
5033 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
5034
5035     CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
5036   else
5037     as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
5038   fi
5039 fi
5040
5041 # We already have this in Makefile.win32, but configure needs it too
5042 if test "$PORTNAME" = "win32"; then
5043   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
5044 fi
5045
5046 # Now that we're done automatically adding stuff to CFLAGS, put back the
5047 # user-specified flags (if any) at the end.  This lets users override
5048 # the automatic additions.
5049 CFLAGS="$CFLAGS $user_CFLAGS"
5050
5051 # Check if the compiler still works with the final flag settings
5052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
5053 $as_echo_n "checking whether the C compiler still works... " >&6; }
5054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5055 /* end confdefs.h.  */
5056
5057 int
5058 main ()
5059 {
5060 return 0;
5061   ;
5062   return 0;
5063 }
5064 _ACEOF
5065 if ac_fn_c_try_link "$LINENO"; then :
5066   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5067 $as_echo "yes" >&6; }
5068 else
5069   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5070 $as_echo "no" >&6; }
5071    as_fn_error $? "cannot proceed" "$LINENO" 5
5072 fi
5073 rm -f core conftest.err conftest.$ac_objext \
5074     conftest$ac_exeext conftest.$ac_ext
5075
5076 # Defend against gcc -ffast-math
5077 if test "$GCC" = yes; then
5078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5079 /* end confdefs.h.  */
5080
5081 int
5082 main ()
5083 {
5084 #ifdef __FAST_MATH__
5085 choke me
5086 #endif
5087   ;
5088   return 0;
5089 }
5090 _ACEOF
5091 if ac_fn_c_try_compile "$LINENO"; then :
5092
5093 else
5094   as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
5095 fi
5096 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5097 fi
5098
5099 ac_ext=c
5100 ac_cpp='$CPP $CPPFLAGS'
5101 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5102 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5103 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5105 $as_echo_n "checking how to run the C preprocessor... " >&6; }
5106 # On Suns, sometimes $CPP names a directory.
5107 if test -n "$CPP" && test -d "$CPP"; then
5108   CPP=
5109 fi
5110 if test -z "$CPP"; then
5111   if ${ac_cv_prog_CPP+:} false; then :
5112   $as_echo_n "(cached) " >&6
5113 else
5114       # Double quotes because CPP needs to be expanded
5115     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5116     do
5117       ac_preproc_ok=false
5118 for ac_c_preproc_warn_flag in '' yes
5119 do
5120   # Use a header file that comes with gcc, so configuring glibc
5121   # with a fresh cross-compiler works.
5122   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5123   # <limits.h> exists even on freestanding compilers.
5124   # On the NeXT, cc -E runs the code through the compiler's parser,
5125   # not just through cpp. "Syntax error" is here to catch this case.
5126   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5127 /* end confdefs.h.  */
5128 #ifdef __STDC__
5129 # include <limits.h>
5130 #else
5131 # include <assert.h>
5132 #endif
5133                      Syntax error
5134 _ACEOF
5135 if ac_fn_c_try_cpp "$LINENO"; then :
5136
5137 else
5138   # Broken: fails on valid input.
5139 continue
5140 fi
5141 rm -f conftest.err conftest.i conftest.$ac_ext
5142
5143   # OK, works on sane cases.  Now check whether nonexistent headers
5144   # can be detected and how.
5145   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5146 /* end confdefs.h.  */
5147 #include <ac_nonexistent.h>
5148 _ACEOF
5149 if ac_fn_c_try_cpp "$LINENO"; then :
5150   # Broken: success on invalid input.
5151 continue
5152 else
5153   # Passes both tests.
5154 ac_preproc_ok=:
5155 break
5156 fi
5157 rm -f conftest.err conftest.i conftest.$ac_ext
5158
5159 done
5160 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5161 rm -f conftest.i conftest.err conftest.$ac_ext
5162 if $ac_preproc_ok; then :
5163   break
5164 fi
5165
5166     done
5167     ac_cv_prog_CPP=$CPP
5168
5169 fi
5170   CPP=$ac_cv_prog_CPP
5171 else
5172   ac_cv_prog_CPP=$CPP
5173 fi
5174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5175 $as_echo "$CPP" >&6; }
5176 ac_preproc_ok=false
5177 for ac_c_preproc_warn_flag in '' yes
5178 do
5179   # Use a header file that comes with gcc, so configuring glibc
5180   # with a fresh cross-compiler works.
5181   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5182   # <limits.h> exists even on freestanding compilers.
5183   # On the NeXT, cc -E runs the code through the compiler's parser,
5184   # not just through cpp. "Syntax error" is here to catch this case.
5185   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5186 /* end confdefs.h.  */
5187 #ifdef __STDC__
5188 # include <limits.h>
5189 #else
5190 # include <assert.h>
5191 #endif
5192                      Syntax error
5193 _ACEOF
5194 if ac_fn_c_try_cpp "$LINENO"; then :
5195
5196 else
5197   # Broken: fails on valid input.
5198 continue
5199 fi
5200 rm -f conftest.err conftest.i conftest.$ac_ext
5201
5202   # OK, works on sane cases.  Now check whether nonexistent headers
5203   # can be detected and how.
5204   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5205 /* end confdefs.h.  */
5206 #include <ac_nonexistent.h>
5207 _ACEOF
5208 if ac_fn_c_try_cpp "$LINENO"; then :
5209   # Broken: success on invalid input.
5210 continue
5211 else
5212   # Passes both tests.
5213 ac_preproc_ok=:
5214 break
5215 fi
5216 rm -f conftest.err conftest.i conftest.$ac_ext
5217
5218 done
5219 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5220 rm -f conftest.i conftest.err conftest.$ac_ext
5221 if $ac_preproc_ok; then :
5222
5223 else
5224   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5225 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5226 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5227 See \`config.log' for more details" "$LINENO" 5; }
5228 fi
5229
5230 ac_ext=c
5231 ac_cpp='$CPP $CPPFLAGS'
5232 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5233 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5234 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5235
5236
5237
5238
5239 #
5240 # Set up TAS assembly code if needed; the template file has now had its
5241 # chance to request this.
5242 #
5243 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
5244
5245
5246 if test "$need_tas" = yes ; then
5247   TAS=tas.o
5248 else
5249   TAS=""
5250 fi
5251
5252
5253
5254 #
5255 # Automatic dependency tracking
5256 #
5257
5258
5259 # Check whether --enable-depend was given.
5260 if test "${enable_depend+set}" = set; then :
5261   enableval=$enable_depend;
5262   case $enableval in
5263     yes)
5264       autodepend=yes
5265       ;;
5266     no)
5267       :
5268       ;;
5269     *)
5270       as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
5271       ;;
5272   esac
5273
5274 else
5275   enable_depend=no
5276
5277 fi
5278
5279
5280
5281
5282
5283 #
5284 # Enable assert checks
5285 #
5286
5287
5288 # Check whether --enable-cassert was given.
5289 if test "${enable_cassert+set}" = set; then :
5290   enableval=$enable_cassert;
5291   case $enableval in
5292     yes)
5293
5294 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
5295
5296       ;;
5297     no)
5298       :
5299       ;;
5300     *)
5301       as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
5302       ;;
5303   esac
5304
5305 else
5306   enable_cassert=no
5307
5308 fi
5309
5310
5311
5312
5313 #
5314 # Include directories
5315 #
5316 ac_save_IFS=$IFS
5317 IFS="${IFS}${PATH_SEPARATOR}"
5318 # SRCH_INC comes from the template file
5319 for dir in $with_includes $SRCH_INC; do
5320   if test -d "$dir"; then
5321     INCLUDES="$INCLUDES -I$dir"
5322   else
5323     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
5324 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
5325   fi
5326 done
5327 IFS=$ac_save_IFS
5328
5329
5330
5331 #
5332 # Library directories
5333 #
5334 ac_save_IFS=$IFS
5335 IFS="${IFS}${PATH_SEPARATOR}"
5336 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
5337 for dir in $LIBRARY_DIRS $SRCH_LIB; do
5338   if test -d "$dir"; then
5339     LIBDIRS="$LIBDIRS -L$dir"
5340   else
5341     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
5342 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
5343   fi
5344 done
5345 IFS=$ac_save_IFS
5346
5347 #
5348 # Enable thread-safe client libraries
5349 #
5350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
5351 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
5352
5353
5354 # Check whether --enable-thread-safety was given.
5355 if test "${enable_thread_safety+set}" = set; then :
5356   enableval=$enable_thread_safety;
5357   case $enableval in
5358     yes)
5359       :
5360       ;;
5361     no)
5362       :
5363       ;;
5364     *)
5365       as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
5366       ;;
5367   esac
5368
5369 else
5370   enable_thread_safety=yes
5371
5372 fi
5373
5374
5375 if test "$enable_thread_safety" = yes; then
5376
5377 $as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
5378
5379 fi
5380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
5381 $as_echo "$enable_thread_safety" >&6; }
5382
5383
5384 #
5385 # ICU
5386 #
5387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ICU support" >&5
5388 $as_echo_n "checking whether to build with ICU support... " >&6; }
5389
5390
5391
5392 # Check whether --with-icu was given.
5393 if test "${with_icu+set}" = set; then :
5394   withval=$with_icu;
5395   case $withval in
5396     yes)
5397
5398 $as_echo "#define USE_ICU 1" >>confdefs.h
5399
5400       ;;
5401     no)
5402       :
5403       ;;
5404     *)
5405       as_fn_error $? "no argument expected for --with-icu option" "$LINENO" 5
5406       ;;
5407   esac
5408
5409 else
5410   with_icu=no
5411
5412 fi
5413
5414
5415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icu" >&5
5416 $as_echo "$with_icu" >&6; }
5417
5418
5419 if test "$with_icu" = yes; then
5420
5421
5422
5423
5424
5425
5426
5427 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
5428         if test -n "$ac_tool_prefix"; then
5429   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
5430 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
5431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5432 $as_echo_n "checking for $ac_word... " >&6; }
5433 if ${ac_cv_path_PKG_CONFIG+:} false; then :
5434   $as_echo_n "(cached) " >&6
5435 else
5436   case $PKG_CONFIG in
5437   [\\/]* | ?:[\\/]*)
5438   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
5439   ;;
5440   *)
5441   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5442 for as_dir in $PATH
5443 do
5444   IFS=$as_save_IFS
5445   test -z "$as_dir" && as_dir=.
5446     for ac_exec_ext in '' $ac_executable_extensions; do
5447   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5448     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5449     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5450     break 2
5451   fi
5452 done
5453   done
5454 IFS=$as_save_IFS
5455
5456   ;;
5457 esac
5458 fi
5459 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
5460 if test -n "$PKG_CONFIG"; then
5461   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
5462 $as_echo "$PKG_CONFIG" >&6; }
5463 else
5464   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5465 $as_echo "no" >&6; }
5466 fi
5467
5468
5469 fi
5470 if test -z "$ac_cv_path_PKG_CONFIG"; then
5471   ac_pt_PKG_CONFIG=$PKG_CONFIG
5472   # Extract the first word of "pkg-config", so it can be a program name with args.
5473 set dummy pkg-config; ac_word=$2
5474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5475 $as_echo_n "checking for $ac_word... " >&6; }
5476 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
5477   $as_echo_n "(cached) " >&6
5478 else
5479   case $ac_pt_PKG_CONFIG in
5480   [\\/]* | ?:[\\/]*)
5481   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
5482   ;;
5483   *)
5484   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5485 for as_dir in $PATH
5486 do
5487   IFS=$as_save_IFS
5488   test -z "$as_dir" && as_dir=.
5489     for ac_exec_ext in '' $ac_executable_extensions; do
5490   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5491     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5492     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5493     break 2
5494   fi
5495 done
5496   done
5497 IFS=$as_save_IFS
5498
5499   ;;
5500 esac
5501 fi
5502 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
5503 if test -n "$ac_pt_PKG_CONFIG"; then
5504   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
5505 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
5506 else
5507   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5508 $as_echo "no" >&6; }
5509 fi
5510
5511   if test "x$ac_pt_PKG_CONFIG" = x; then
5512     PKG_CONFIG=""
5513   else
5514     case $cross_compiling:$ac_tool_warned in
5515 yes:)
5516 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5517 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5518 ac_tool_warned=yes ;;
5519 esac
5520     PKG_CONFIG=$ac_pt_PKG_CONFIG
5521   fi
5522 else
5523   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
5524 fi
5525
5526 fi
5527 if test -n "$PKG_CONFIG"; then
5528         _pkg_min_version=0.9.0
5529         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
5530 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
5531         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
5532                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5533 $as_echo "yes" >&6; }
5534         else
5535                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5536 $as_echo "no" >&6; }
5537                 PKG_CONFIG=""
5538         fi
5539 fi
5540
5541 pkg_failed=no
5542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5
5543 $as_echo_n "checking for icu-uc icu-i18n... " >&6; }
5544
5545 if test -n "$ICU_CFLAGS"; then
5546     pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
5547  elif test -n "$PKG_CONFIG"; then
5548     if test -n "$PKG_CONFIG" && \
5549     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
5550   ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
5551   ac_status=$?
5552   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5553   test $ac_status = 0; }; then
5554   pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc icu-i18n" 2>/dev/null`
5555                       test "x$?" != "x0" && pkg_failed=yes
5556 else
5557   pkg_failed=yes
5558 fi
5559  else
5560     pkg_failed=untried
5561 fi
5562 if test -n "$ICU_LIBS"; then
5563     pkg_cv_ICU_LIBS="$ICU_LIBS"
5564  elif test -n "$PKG_CONFIG"; then
5565     if test -n "$PKG_CONFIG" && \
5566     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
5567   ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
5568   ac_status=$?
5569   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5570   test $ac_status = 0; }; then
5571   pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc icu-i18n" 2>/dev/null`
5572                       test "x$?" != "x0" && pkg_failed=yes
5573 else
5574   pkg_failed=yes
5575 fi
5576  else
5577     pkg_failed=untried
5578 fi
5579
5580
5581
5582 if test $pkg_failed = yes; then
5583         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5584 $as_echo "no" >&6; }
5585
5586 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
5587         _pkg_short_errors_supported=yes
5588 else
5589         _pkg_short_errors_supported=no
5590 fi
5591         if test $_pkg_short_errors_supported = yes; then
5592                 ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
5593         else
5594                 ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
5595         fi
5596         # Put the nasty error message in config.log where it belongs
5597         echo "$ICU_PKG_ERRORS" >&5
5598
5599         as_fn_error $? "Package requirements (icu-uc icu-i18n) were not met:
5600
5601 $ICU_PKG_ERRORS
5602
5603 Consider adjusting the PKG_CONFIG_PATH environment variable if you
5604 installed software in a non-standard prefix.
5605
5606 Alternatively, you may set the environment variables ICU_CFLAGS
5607 and ICU_LIBS to avoid the need to call pkg-config.
5608 See the pkg-config man page for more details." "$LINENO" 5
5609 elif test $pkg_failed = untried; then
5610         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5611 $as_echo "no" >&6; }
5612         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5613 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5614 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
5615 is in your PATH or set the PKG_CONFIG environment variable to the full
5616 path to pkg-config.
5617
5618 Alternatively, you may set the environment variables ICU_CFLAGS
5619 and ICU_LIBS to avoid the need to call pkg-config.
5620 See the pkg-config man page for more details.
5621
5622 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
5623 See \`config.log' for more details" "$LINENO" 5; }
5624 else
5625         ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
5626         ICU_LIBS=$pkg_cv_ICU_LIBS
5627         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5628 $as_echo "yes" >&6; }
5629
5630 fi
5631 fi
5632
5633 #
5634 # Optionally build Tcl modules (PL/Tcl)
5635 #
5636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
5637 $as_echo_n "checking whether to build with Tcl... " >&6; }
5638
5639
5640
5641 # Check whether --with-tcl was given.
5642 if test "${with_tcl+set}" = set; then :
5643   withval=$with_tcl;
5644   case $withval in
5645     yes)
5646       :
5647       ;;
5648     no)
5649       :
5650       ;;
5651     *)
5652       as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
5653       ;;
5654   esac
5655
5656 else
5657   with_tcl=no
5658
5659 fi
5660
5661
5662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
5663 $as_echo "$with_tcl" >&6; }
5664
5665
5666 # We see if the path to the Tcl/Tk configuration scripts is specified.
5667 # This will override the use of tclsh to find the paths to search.
5668
5669
5670
5671
5672 # Check whether --with-tclconfig was given.
5673 if test "${with_tclconfig+set}" = set; then :
5674   withval=$with_tclconfig;
5675   case $withval in
5676     yes)
5677       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
5678       ;;
5679     no)
5680       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
5681       ;;
5682     *)
5683
5684       ;;
5685   esac
5686
5687 fi
5688
5689
5690
5691 #
5692 # Optionally build Perl modules (PL/Perl)
5693 #
5694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
5695 $as_echo_n "checking whether to build Perl modules... " >&6; }
5696
5697
5698
5699 # Check whether --with-perl was given.
5700 if test "${with_perl+set}" = set; then :
5701   withval=$with_perl;
5702   case $withval in
5703     yes)
5704       :
5705       ;;
5706     no)
5707       :
5708       ;;
5709     *)
5710       as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
5711       ;;
5712   esac
5713
5714 else
5715   with_perl=no
5716
5717 fi
5718
5719
5720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
5721 $as_echo "$with_perl" >&6; }
5722
5723
5724 #
5725 # Optionally build Python modules (PL/Python)
5726 #
5727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
5728 $as_echo_n "checking whether to build Python modules... " >&6; }
5729
5730
5731
5732 # Check whether --with-python was given.
5733 if test "${with_python+set}" = set; then :
5734   withval=$with_python;
5735   case $withval in
5736     yes)
5737       :
5738       ;;
5739     no)
5740       :
5741       ;;
5742     *)
5743       as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
5744       ;;
5745   esac
5746
5747 else
5748   with_python=no
5749
5750 fi
5751
5752
5753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
5754 $as_echo "$with_python" >&6; }
5755
5756
5757 #
5758 # GSSAPI
5759 #
5760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
5761 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
5762
5763
5764
5765 # Check whether --with-gssapi was given.
5766 if test "${with_gssapi+set}" = set; then :
5767   withval=$with_gssapi;
5768   case $withval in
5769     yes)
5770
5771
5772 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
5773
5774   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
5775
5776       ;;
5777     no)
5778       :
5779       ;;
5780     *)
5781       as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
5782       ;;
5783   esac
5784
5785 else
5786   with_gssapi=no
5787
5788 fi
5789
5790
5791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
5792 $as_echo "$with_gssapi" >&6; }
5793
5794
5795
5796
5797
5798 #
5799 # Kerberos configuration parameters
5800 #
5801
5802
5803
5804 # Check whether --with-krb-srvnam was given.
5805 if test "${with_krb_srvnam+set}" = set; then :
5806   withval=$with_krb_srvnam;
5807   case $withval in
5808     yes)
5809       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
5810       ;;
5811     no)
5812       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
5813       ;;
5814     *)
5815
5816       ;;
5817   esac
5818
5819 else
5820   with_krb_srvnam="postgres"
5821 fi
5822
5823
5824
5825 cat >>confdefs.h <<_ACEOF
5826 #define PG_KRB_SRVNAM "$with_krb_srvnam"
5827 _ACEOF
5828
5829
5830
5831 #
5832 # PAM
5833 #
5834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
5835 $as_echo_n "checking whether to build with PAM support... " >&6; }
5836
5837
5838
5839 # Check whether --with-pam was given.
5840 if test "${with_pam+set}" = set; then :
5841   withval=$with_pam;
5842   case $withval in
5843     yes)
5844
5845 $as_echo "#define USE_PAM 1" >>confdefs.h
5846
5847       ;;
5848     no)
5849       :
5850       ;;
5851     *)
5852       as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
5853       ;;
5854   esac
5855
5856 else
5857   with_pam=no
5858
5859 fi
5860
5861
5862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
5863 $as_echo "$with_pam" >&6; }
5864
5865
5866 #
5867 # BSD AUTH
5868 #
5869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
5870 $as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
5871
5872
5873
5874 # Check whether --with-bsd-auth was given.
5875 if test "${with_bsd_auth+set}" = set; then :
5876   withval=$with_bsd_auth;
5877   case $withval in
5878     yes)
5879
5880 $as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
5881
5882       ;;
5883     no)
5884       :
5885       ;;
5886     *)
5887       as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
5888       ;;
5889   esac
5890
5891 else
5892   with_bsd_auth=no
5893
5894 fi
5895
5896
5897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
5898 $as_echo "$with_bsd_auth" >&6; }
5899
5900
5901 #
5902 # LDAP
5903 #
5904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
5905 $as_echo_n "checking whether to build with LDAP support... " >&6; }
5906
5907
5908
5909 # Check whether --with-ldap was given.
5910 if test "${with_ldap+set}" = set; then :
5911   withval=$with_ldap;
5912   case $withval in
5913     yes)
5914
5915 $as_echo "#define USE_LDAP 1" >>confdefs.h
5916
5917       ;;
5918     no)
5919       :
5920       ;;
5921     *)
5922       as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
5923       ;;
5924   esac
5925
5926 else
5927   with_ldap=no
5928
5929 fi
5930
5931
5932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
5933 $as_echo "$with_ldap" >&6; }
5934
5935
5936 #
5937 # Bonjour
5938 #
5939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
5940 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
5941
5942
5943
5944 # Check whether --with-bonjour was given.
5945 if test "${with_bonjour+set}" = set; then :
5946   withval=$with_bonjour;
5947   case $withval in
5948     yes)
5949
5950 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
5951
5952       ;;
5953     no)
5954       :
5955       ;;
5956     *)
5957       as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
5958       ;;
5959   esac
5960
5961 else
5962   with_bonjour=no
5963
5964 fi
5965
5966
5967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
5968 $as_echo "$with_bonjour" >&6; }
5969
5970
5971 #
5972 # OpenSSL
5973 #
5974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with OpenSSL support" >&5
5975 $as_echo_n "checking whether to build with OpenSSL support... " >&6; }
5976
5977
5978
5979 # Check whether --with-openssl was given.
5980 if test "${with_openssl+set}" = set; then :
5981   withval=$with_openssl;
5982   case $withval in
5983     yes)
5984
5985 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
5986
5987       ;;
5988     no)
5989       :
5990       ;;
5991     *)
5992       as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
5993       ;;
5994   esac
5995
5996 else
5997   with_openssl=no
5998
5999 fi
6000
6001
6002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_openssl" >&5
6003 $as_echo "$with_openssl" >&6; }
6004
6005
6006 #
6007 # SELinux
6008 #
6009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
6010 $as_echo_n "checking whether to build with SELinux support... " >&6; }
6011
6012
6013
6014 # Check whether --with-selinux was given.
6015 if test "${with_selinux+set}" = set; then :
6016   withval=$with_selinux;
6017   case $withval in
6018     yes)
6019       :
6020       ;;
6021     no)
6022       :
6023       ;;
6024     *)
6025       as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
6026       ;;
6027   esac
6028
6029 else
6030   with_selinux=no
6031
6032 fi
6033
6034
6035
6036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
6037 $as_echo "$with_selinux" >&6; }
6038
6039 #
6040 # Systemd
6041 #
6042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
6043 $as_echo_n "checking whether to build with systemd support... " >&6; }
6044
6045
6046
6047 # Check whether --with-systemd was given.
6048 if test "${with_systemd+set}" = set; then :
6049   withval=$with_systemd;
6050   case $withval in
6051     yes)
6052
6053 $as_echo "#define USE_SYSTEMD 1" >>confdefs.h
6054
6055       ;;
6056     no)
6057       :
6058       ;;
6059     *)
6060       as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
6061       ;;
6062   esac
6063
6064 else
6065   with_systemd=no
6066
6067 fi
6068
6069
6070
6071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
6072 $as_echo "$with_systemd" >&6; }
6073
6074 #
6075 # Readline
6076 #
6077
6078
6079
6080 # Check whether --with-readline was given.
6081 if test "${with_readline+set}" = set; then :
6082   withval=$with_readline;
6083   case $withval in
6084     yes)
6085       :
6086       ;;
6087     no)
6088       :
6089       ;;
6090     *)
6091       as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
6092       ;;
6093   esac
6094
6095 else
6096   with_readline=yes
6097
6098 fi
6099
6100
6101 # readline on MinGW has problems with backslashes in psql and other bugs.
6102 # This is particularly a problem with non-US code pages.
6103 # Therefore disable its use until we understand the cause. 2004-07-20
6104 if test "$PORTNAME" = "win32"; then
6105   if test "$with_readline" = yes; then
6106     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
6107 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
6108     with_readline=no
6109   fi
6110 fi
6111
6112
6113 #
6114 # Prefer libedit
6115 #
6116
6117
6118
6119 # Check whether --with-libedit-preferred was given.
6120 if test "${with_libedit_preferred+set}" = set; then :
6121   withval=$with_libedit_preferred;
6122   case $withval in
6123     yes)
6124       :
6125       ;;
6126     no)
6127       :
6128       ;;
6129     *)
6130       as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
6131       ;;
6132   esac
6133
6134 else
6135   with_libedit_preferred=no
6136
6137 fi
6138
6139
6140
6141
6142 #
6143 # UUID library
6144 #
6145 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
6146 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
6147 # UUID library.  More than one of these might be present on a given platform,
6148 # so we make the user say which one she wants.
6149 #
6150
6151
6152
6153 # Check whether --with-uuid was given.
6154 if test "${with_uuid+set}" = set; then :
6155   withval=$with_uuid;
6156   case $withval in
6157     yes)
6158       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
6159       ;;
6160     no)
6161       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
6162       ;;
6163     *)
6164
6165       ;;
6166   esac
6167
6168 fi
6169
6170
6171 if test x"$with_uuid" = x"" ; then
6172   with_uuid=no
6173 fi
6174
6175
6176
6177 # Check whether --with-ossp-uuid was given.
6178 if test "${with_ossp_uuid+set}" = set; then :
6179   withval=$with_ossp_uuid;
6180   case $withval in
6181     yes)
6182       :
6183       ;;
6184     no)
6185       :
6186       ;;
6187     *)
6188       as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
6189       ;;
6190   esac
6191
6192 else
6193   with_ossp_uuid=no
6194
6195 fi
6196
6197
6198 if test "$with_ossp_uuid" = yes ; then
6199   with_uuid=ossp
6200 fi
6201
6202 if test "$with_uuid" = bsd ; then
6203
6204 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
6205
6206   UUID_EXTRA_OBJS="md5.o sha1.o"
6207 elif test "$with_uuid" = e2fs ; then
6208
6209 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
6210
6211   UUID_EXTRA_OBJS="md5.o sha1.o"
6212 elif test "$with_uuid" = ossp ; then
6213
6214 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
6215
6216   UUID_EXTRA_OBJS=""
6217 elif test "$with_uuid" = no ; then
6218   UUID_EXTRA_OBJS=""
6219 else
6220   as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
6221 fi
6222
6223
6224
6225
6226 #
6227 # XML
6228 #
6229
6230
6231
6232 # Check whether --with-libxml was given.
6233 if test "${with_libxml+set}" = set; then :
6234   withval=$with_libxml;
6235   case $withval in
6236     yes)
6237
6238 $as_echo "#define USE_LIBXML 1" >>confdefs.h
6239
6240       ;;
6241     no)
6242       :
6243       ;;
6244     *)
6245       as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
6246       ;;
6247   esac
6248
6249 else
6250   with_libxml=no
6251
6252 fi
6253
6254
6255
6256 if test "$with_libxml" = yes ; then
6257   for ac_prog in xml2-config
6258 do
6259   # Extract the first word of "$ac_prog", so it can be a program name with args.
6260 set dummy $ac_prog; ac_word=$2
6261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6262 $as_echo_n "checking for $ac_word... " >&6; }
6263 if ${ac_cv_prog_XML2_CONFIG+:} false; then :
6264   $as_echo_n "(cached) " >&6
6265 else
6266   if test -n "$XML2_CONFIG"; then
6267   ac_cv_prog_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test.
6268 else
6269 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6270 for as_dir in $PATH
6271 do
6272   IFS=$as_save_IFS
6273   test -z "$as_dir" && as_dir=.
6274     for ac_exec_ext in '' $ac_executable_extensions; do
6275   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6276     ac_cv_prog_XML2_CONFIG="$ac_prog"
6277     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6278     break 2
6279   fi
6280 done
6281   done
6282 IFS=$as_save_IFS
6283
6284 fi
6285 fi
6286 XML2_CONFIG=$ac_cv_prog_XML2_CONFIG
6287 if test -n "$XML2_CONFIG"; then
6288   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
6289 $as_echo "$XML2_CONFIG" >&6; }
6290 else
6291   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6292 $as_echo "no" >&6; }
6293 fi
6294
6295
6296   test -n "$XML2_CONFIG" && break
6297 done
6298
6299   if test -n "$XML2_CONFIG"; then
6300     for pgac_option in `$XML2_CONFIG --cflags`; do
6301       case $pgac_option in
6302         -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
6303       esac
6304     done
6305     for pgac_option in `$XML2_CONFIG --libs`; do
6306       case $pgac_option in
6307         -L*) LDFLAGS="$LDFLAGS $pgac_option";;
6308       esac
6309     done
6310   fi
6311 fi
6312
6313
6314
6315 #
6316 # XSLT
6317 #
6318
6319
6320
6321 # Check whether --with-libxslt was given.
6322 if test "${with_libxslt+set}" = set; then :
6323   withval=$with_libxslt;
6324   case $withval in
6325     yes)
6326
6327 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
6328
6329       ;;
6330     no)
6331       :
6332       ;;
6333     *)
6334       as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
6335       ;;
6336   esac
6337
6338 else
6339   with_libxslt=no
6340
6341 fi
6342
6343
6344
6345
6346
6347
6348 #
6349 # tzdata
6350 #
6351
6352
6353
6354 # Check whether --with-system-tzdata was given.
6355 if test "${with_system_tzdata+set}" = set; then :
6356   withval=$with_system_tzdata;
6357   case $withval in
6358     yes)
6359       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
6360       ;;
6361     no)
6362       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
6363       ;;
6364     *)
6365
6366       ;;
6367   esac
6368
6369 fi
6370
6371
6372
6373
6374 #
6375 # Zlib
6376 #
6377
6378
6379
6380 # Check whether --with-zlib was given.
6381 if test "${with_zlib+set}" = set; then :
6382   withval=$with_zlib;
6383   case $withval in
6384     yes)
6385       :
6386       ;;
6387     no)
6388       :
6389       ;;
6390     *)
6391       as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
6392       ;;
6393   esac
6394
6395 else
6396   with_zlib=yes
6397
6398 fi
6399
6400
6401
6402
6403 #
6404 # Elf
6405 #
6406
6407 # Assume system is ELF if it predefines __ELF__ as 1,
6408 # otherwise believe host_os based default.
6409 case $host_os in
6410     freebsd1*|freebsd2*) elf=no;;
6411     freebsd3*|freebsd4*) elf=yes;;
6412 esac
6413
6414
6415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6416 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6417 if ${ac_cv_path_GREP+:} false; then :
6418   $as_echo_n "(cached) " >&6
6419 else
6420   if test -z "$GREP"; then
6421   ac_path_GREP_found=false
6422   # Loop through the user's path and test for each of PROGNAME-LIST
6423   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6424 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6425 do
6426   IFS=$as_save_IFS
6427   test -z "$as_dir" && as_dir=.
6428     for ac_prog in grep ggrep; do
6429     for ac_exec_ext in '' $ac_executable_extensions; do
6430       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6431       as_fn_executable_p "$ac_path_GREP" || continue
6432 # Check for GNU ac_path_GREP and select it if it is found.
6433   # Check for GNU $ac_path_GREP
6434 case `"$ac_path_GREP" --version 2>&1` in
6435 *GNU*)
6436   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6437 *)
6438   ac_count=0
6439   $as_echo_n 0123456789 >"conftest.in"
6440   while :
6441   do
6442     cat "conftest.in" "conftest.in" >"conftest.tmp"
6443     mv "conftest.tmp" "conftest.in"
6444     cp "conftest.in" "conftest.nl"
6445     $as_echo 'GREP' >> "conftest.nl"
6446     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6447     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6448     as_fn_arith $ac_count + 1 && ac_count=$as_val
6449     if test $ac_count -gt ${ac_path_GREP_max-0}; then
6450       # Best one so far, save it but keep looking for a better one
6451       ac_cv_path_GREP="$ac_path_GREP"
6452       ac_path_GREP_max=$ac_count
6453     fi
6454     # 10*(2^10) chars as input seems more than enough
6455     test $ac_count -gt 10 && break
6456   done
6457   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6458 esac
6459
6460       $ac_path_GREP_found && break 3
6461     done
6462   done
6463   done
6464 IFS=$as_save_IFS
6465   if test -z "$ac_cv_path_GREP"; then
6466     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6467   fi
6468 else
6469   ac_cv_path_GREP=$GREP
6470 fi
6471
6472 fi
6473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6474 $as_echo "$ac_cv_path_GREP" >&6; }
6475  GREP="$ac_cv_path_GREP"
6476
6477
6478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6479 $as_echo_n "checking for egrep... " >&6; }
6480 if ${ac_cv_path_EGREP+:} false; then :
6481   $as_echo_n "(cached) " >&6
6482 else
6483   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6484    then ac_cv_path_EGREP="$GREP -E"
6485    else
6486      if test -z "$EGREP"; then
6487   ac_path_EGREP_found=false
6488   # Loop through the user's path and test for each of PROGNAME-LIST
6489   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6490 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6491 do
6492   IFS=$as_save_IFS
6493   test -z "$as_dir" && as_dir=.
6494     for ac_prog in egrep; do
6495     for ac_exec_ext in '' $ac_executable_extensions; do
6496       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6497       as_fn_executable_p "$ac_path_EGREP" || continue
6498 # Check for GNU ac_path_EGREP and select it if it is found.
6499   # Check for GNU $ac_path_EGREP
6500 case `"$ac_path_EGREP" --version 2>&1` in
6501 *GNU*)
6502   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6503 *)
6504   ac_count=0
6505   $as_echo_n 0123456789 >"conftest.in"
6506   while :
6507   do
6508     cat "conftest.in" "conftest.in" >"conftest.tmp"
6509     mv "conftest.tmp" "conftest.in"
6510     cp "conftest.in" "conftest.nl"
6511     $as_echo 'EGREP' >> "conftest.nl"
6512     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6513     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6514     as_fn_arith $ac_count + 1 && ac_count=$as_val
6515     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6516       # Best one so far, save it but keep looking for a better one
6517       ac_cv_path_EGREP="$ac_path_EGREP"
6518       ac_path_EGREP_max=$ac_count
6519     fi
6520     # 10*(2^10) chars as input seems more than enough
6521     test $ac_count -gt 10 && break
6522   done
6523   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6524 esac
6525
6526       $ac_path_EGREP_found && break 3
6527     done
6528   done
6529   done
6530 IFS=$as_save_IFS
6531   if test -z "$ac_cv_path_EGREP"; then
6532     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6533   fi
6534 else
6535   ac_cv_path_EGREP=$EGREP
6536 fi
6537
6538    fi
6539 fi
6540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6541 $as_echo "$ac_cv_path_EGREP" >&6; }
6542  EGREP="$ac_cv_path_EGREP"
6543
6544
6545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6546 /* end confdefs.h.  */
6547 #if __ELF__
6548   yes
6549 #endif
6550
6551 _ACEOF
6552 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6553   $EGREP "yes" >/dev/null 2>&1; then :
6554   ELF_SYS=true
6555 else
6556   if test "X$elf" = "Xyes" ; then
6557   ELF_SYS=true
6558 else
6559   ELF_SYS=
6560 fi
6561 fi
6562 rm -f conftest*
6563
6564
6565
6566 #
6567 # Assignments
6568 #
6569
6570 CPPFLAGS="$CPPFLAGS $INCLUDES"
6571 LDFLAGS="$LDFLAGS $LIBDIRS"
6572
6573
6574
6575
6576
6577 # Check whether --with-gnu-ld was given.
6578 if test "${with_gnu_ld+set}" = set; then :
6579   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
6580 else
6581   with_gnu_ld=no
6582 fi
6583
6584 ac_prog=ld
6585 if test "$GCC" = yes; then
6586   # Check if gcc -print-prog-name=ld gives a path.
6587   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
6588 $as_echo_n "checking for ld used by GCC... " >&6; }
6589   case $host in
6590   *-*-mingw*)
6591     # gcc leaves a trailing carriage return which upsets mingw
6592     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6593   *)
6594     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6595   esac
6596   case "$ac_prog" in
6597     # Accept absolute paths.
6598     [\\/]* | [A-Za-z]:[\\/]*)
6599       re_direlt='/[^/][^/]*/\.\./'
6600       # Canonicalize the path of ld
6601       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
6602       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
6603         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
6604       done
6605       test -z "$LD" && LD="$ac_prog"
6606       ;;
6607   "")
6608     # If it fails, then pretend we aren't using GCC.
6609     ac_prog=ld
6610     ;;
6611   *)
6612     # If it is relative, then search for the first ld in PATH.
6613     with_gnu_ld=unknown
6614     ;;
6615   esac
6616 elif test "$with_gnu_ld" = yes; then
6617   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
6618 $as_echo_n "checking for GNU ld... " >&6; }
6619 else
6620   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
6621 $as_echo_n "checking for non-GNU ld... " >&6; }
6622 fi
6623 if ${ac_cv_path_LD+:} false; then :
6624   $as_echo_n "(cached) " >&6
6625 else
6626   if test -z "$LD"; then
6627   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
6628   for ac_dir in $PATH; do
6629     test -z "$ac_dir" && ac_dir=.
6630     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6631       ac_cv_path_LD="$ac_dir/$ac_prog"
6632       # Check to see if the program is GNU ld.  I'd rather use --version,
6633       # but apparently some GNU ld's only accept -v.
6634       # Break only if it was the GNU/non-GNU ld that we prefer.
6635       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
6636         test "$with_gnu_ld" != no && break
6637       else
6638         test "$with_gnu_ld" != yes && break
6639       fi
6640     fi
6641   done
6642   IFS="$ac_save_ifs"
6643 else
6644   ac_cv_path_LD="$LD" # Let the user override the test with a path.
6645 fi
6646 fi
6647
6648 LD="$ac_cv_path_LD"
6649 if test -n "$LD"; then
6650   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
6651 $as_echo "$LD" >&6; }
6652 else
6653   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6654 $as_echo "no" >&6; }
6655 fi
6656 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
6657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
6658 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
6659 if ${ac_cv_prog_gnu_ld+:} false; then :
6660   $as_echo_n "(cached) " >&6
6661 else
6662   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
6663 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
6664   ac_cv_prog_gnu_ld=yes
6665 else
6666   ac_cv_prog_gnu_ld=no
6667 fi
6668 fi
6669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
6670 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
6671 with_gnu_ld=$ac_cv_prog_gnu_ld
6672
6673
6674
6675
6676 if test -n "$ac_tool_prefix"; then
6677   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6678 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6680 $as_echo_n "checking for $ac_word... " >&6; }
6681 if ${ac_cv_prog_RANLIB+:} false; then :
6682   $as_echo_n "(cached) " >&6
6683 else
6684   if test -n "$RANLIB"; then
6685   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6686 else
6687 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6688 for as_dir in $PATH
6689 do
6690   IFS=$as_save_IFS
6691   test -z "$as_dir" && as_dir=.
6692     for ac_exec_ext in '' $ac_executable_extensions; do
6693   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6694     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6695     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6696     break 2
6697   fi
6698 done
6699   done
6700 IFS=$as_save_IFS
6701
6702 fi
6703 fi
6704 RANLIB=$ac_cv_prog_RANLIB
6705 if test -n "$RANLIB"; then
6706   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6707 $as_echo "$RANLIB" >&6; }
6708 else
6709   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6710 $as_echo "no" >&6; }
6711 fi
6712
6713
6714 fi
6715 if test -z "$ac_cv_prog_RANLIB"; then
6716   ac_ct_RANLIB=$RANLIB
6717   # Extract the first word of "ranlib", so it can be a program name with args.
6718 set dummy ranlib; ac_word=$2
6719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6720 $as_echo_n "checking for $ac_word... " >&6; }
6721 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6722   $as_echo_n "(cached) " >&6
6723 else
6724   if test -n "$ac_ct_RANLIB"; then
6725   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6726 else
6727 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6728 for as_dir in $PATH
6729 do
6730   IFS=$as_save_IFS
6731   test -z "$as_dir" && as_dir=.
6732     for ac_exec_ext in '' $ac_executable_extensions; do
6733   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6734     ac_cv_prog_ac_ct_RANLIB="ranlib"
6735     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6736     break 2
6737   fi
6738 done
6739   done
6740 IFS=$as_save_IFS
6741
6742 fi
6743 fi
6744 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6745 if test -n "$ac_ct_RANLIB"; then
6746   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6747 $as_echo "$ac_ct_RANLIB" >&6; }
6748 else
6749   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6750 $as_echo "no" >&6; }
6751 fi
6752
6753   if test "x$ac_ct_RANLIB" = x; then
6754     RANLIB=":"
6755   else
6756     case $cross_compiling:$ac_tool_warned in
6757 yes:)
6758 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6759 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6760 ac_tool_warned=yes ;;
6761 esac
6762     RANLIB=$ac_ct_RANLIB
6763   fi
6764 else
6765   RANLIB="$ac_cv_prog_RANLIB"
6766 fi
6767
6768
6769   if test -n "$ac_tool_prefix"; then
6770   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6771 set dummy ${ac_tool_prefix}strip; ac_word=$2
6772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6773 $as_echo_n "checking for $ac_word... " >&6; }
6774 if ${ac_cv_prog_STRIP+:} false; then :
6775   $as_echo_n "(cached) " >&6
6776 else
6777   if test -n "$STRIP"; then
6778   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6779 else
6780 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6781 for as_dir in $PATH
6782 do
6783   IFS=$as_save_IFS
6784   test -z "$as_dir" && as_dir=.
6785     for ac_exec_ext in '' $ac_executable_extensions; do
6786   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6787     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6788     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6789     break 2
6790   fi
6791 done
6792   done
6793 IFS=$as_save_IFS
6794
6795 fi
6796 fi
6797 STRIP=$ac_cv_prog_STRIP
6798 if test -n "$STRIP"; then
6799   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6800 $as_echo "$STRIP" >&6; }
6801 else
6802   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6803 $as_echo "no" >&6; }
6804 fi
6805
6806
6807 fi
6808 if test -z "$ac_cv_prog_STRIP"; then
6809   ac_ct_STRIP=$STRIP
6810   # Extract the first word of "strip", so it can be a program name with args.
6811 set dummy strip; ac_word=$2
6812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6813 $as_echo_n "checking for $ac_word... " >&6; }
6814 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
6815   $as_echo_n "(cached) " >&6
6816 else
6817   if test -n "$ac_ct_STRIP"; then
6818   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6819 else
6820 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6821 for as_dir in $PATH
6822 do
6823   IFS=$as_save_IFS
6824   test -z "$as_dir" && as_dir=.
6825     for ac_exec_ext in '' $ac_executable_extensions; do
6826   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6827     ac_cv_prog_ac_ct_STRIP="strip"
6828     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6829     break 2
6830   fi
6831 done
6832   done
6833 IFS=$as_save_IFS
6834
6835 fi
6836 fi
6837 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6838 if test -n "$ac_ct_STRIP"; then
6839   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6840 $as_echo "$ac_ct_STRIP" >&6; }
6841 else
6842   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6843 $as_echo "no" >&6; }
6844 fi
6845
6846   if test "x$ac_ct_STRIP" = x; then
6847     STRIP=":"
6848   else
6849     case $cross_compiling:$ac_tool_warned in
6850 yes:)
6851 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6852 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6853 ac_tool_warned=yes ;;
6854 esac
6855     STRIP=$ac_ct_STRIP
6856   fi
6857 else
6858   STRIP="$ac_cv_prog_STRIP"
6859 fi
6860
6861
6862   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
6863 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
6864   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
6865     STRIP_STATIC_LIB="$STRIP -x"
6866     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
6867     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6868 $as_echo "yes" >&6; }
6869   else
6870     case $host_os in
6871       darwin*)
6872         STRIP="$STRIP -x"
6873         STRIP_STATIC_LIB=$STRIP
6874         STRIP_SHARED_LIB=$STRIP
6875         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6876 $as_echo "yes" >&6; }
6877         ;;
6878       *)
6879         STRIP_STATIC_LIB=:
6880         STRIP_SHARED_LIB=:
6881         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6882 $as_echo "no" >&6; }
6883         ;;
6884     esac
6885   fi
6886
6887
6888
6889 if test -n "$ac_tool_prefix"; then
6890   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6891 set dummy ${ac_tool_prefix}ar; ac_word=$2
6892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6893 $as_echo_n "checking for $ac_word... " >&6; }
6894 if ${ac_cv_prog_AR+:} false; then :
6895   $as_echo_n "(cached) " >&6
6896 else
6897   if test -n "$AR"; then
6898   ac_cv_prog_AR="$AR" # Let the user override the test.
6899 else
6900 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6901 for as_dir in $PATH
6902 do
6903   IFS=$as_save_IFS
6904   test -z "$as_dir" && as_dir=.
6905     for ac_exec_ext in '' $ac_executable_extensions; do
6906   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6907     ac_cv_prog_AR="${ac_tool_prefix}ar"
6908     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6909     break 2
6910   fi
6911 done
6912   done
6913 IFS=$as_save_IFS
6914
6915 fi
6916 fi
6917 AR=$ac_cv_prog_AR
6918 if test -n "$AR"; then
6919   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6920 $as_echo "$AR" >&6; }
6921 else
6922   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6923 $as_echo "no" >&6; }
6924 fi
6925
6926
6927 fi
6928 if test -z "$ac_cv_prog_AR"; then
6929   ac_ct_AR=$AR
6930   # Extract the first word of "ar", so it can be a program name with args.
6931 set dummy ar; ac_word=$2
6932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6933 $as_echo_n "checking for $ac_word... " >&6; }
6934 if ${ac_cv_prog_ac_ct_AR+:} false; then :
6935   $as_echo_n "(cached) " >&6
6936 else
6937   if test -n "$ac_ct_AR"; then
6938   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6939 else
6940 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6941 for as_dir in $PATH
6942 do
6943   IFS=$as_save_IFS
6944   test -z "$as_dir" && as_dir=.
6945     for ac_exec_ext in '' $ac_executable_extensions; do
6946   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6947     ac_cv_prog_ac_ct_AR="ar"
6948     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6949     break 2
6950   fi
6951 done
6952   done
6953 IFS=$as_save_IFS
6954
6955 fi
6956 fi
6957 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6958 if test -n "$ac_ct_AR"; then
6959   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6960 $as_echo "$ac_ct_AR" >&6; }
6961 else
6962   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6963 $as_echo "no" >&6; }
6964 fi
6965
6966   if test "x$ac_ct_AR" = x; then
6967     AR="ar"
6968   else
6969     case $cross_compiling:$ac_tool_warned in
6970 yes:)
6971 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6972 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6973 ac_tool_warned=yes ;;
6974 esac
6975     AR=$ac_ct_AR
6976   fi
6977 else
6978   AR="$ac_cv_prog_AR"
6979 fi
6980
6981 if test "$PORTNAME" = "win32"; then
6982   if test -n "$ac_tool_prefix"; then
6983   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6984 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
6985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6986 $as_echo_n "checking for $ac_word... " >&6; }
6987 if ${ac_cv_prog_DLLTOOL+:} false; then :
6988   $as_echo_n "(cached) " >&6
6989 else
6990   if test -n "$DLLTOOL"; then
6991   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6992 else
6993 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6994 for as_dir in $PATH
6995 do
6996   IFS=$as_save_IFS
6997   test -z "$as_dir" && as_dir=.
6998     for ac_exec_ext in '' $ac_executable_extensions; do
6999   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7000     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
7001     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7002     break 2
7003   fi
7004 done
7005   done
7006 IFS=$as_save_IFS
7007
7008 fi
7009 fi
7010 DLLTOOL=$ac_cv_prog_DLLTOOL
7011 if test -n "$DLLTOOL"; then
7012   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7013 $as_echo "$DLLTOOL" >&6; }
7014 else
7015   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7016 $as_echo "no" >&6; }
7017 fi
7018
7019
7020 fi
7021 if test -z "$ac_cv_prog_DLLTOOL"; then
7022   ac_ct_DLLTOOL=$DLLTOOL
7023   # Extract the first word of "dlltool", so it can be a program name with args.
7024 set dummy dlltool; ac_word=$2
7025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7026 $as_echo_n "checking for $ac_word... " >&6; }
7027 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
7028   $as_echo_n "(cached) " >&6
7029 else
7030   if test -n "$ac_ct_DLLTOOL"; then
7031   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7032 else
7033 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7034 for as_dir in $PATH
7035 do
7036   IFS=$as_save_IFS
7037   test -z "$as_dir" && as_dir=.
7038     for ac_exec_ext in '' $ac_executable_extensions; do
7039   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7040     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
7041     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7042     break 2
7043   fi
7044 done
7045   done
7046 IFS=$as_save_IFS
7047
7048 fi
7049 fi
7050 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7051 if test -n "$ac_ct_DLLTOOL"; then
7052   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7053 $as_echo "$ac_ct_DLLTOOL" >&6; }
7054 else
7055   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7056 $as_echo "no" >&6; }
7057 fi
7058
7059   if test "x$ac_ct_DLLTOOL" = x; then
7060     DLLTOOL="dlltool"
7061   else
7062     case $cross_compiling:$ac_tool_warned in
7063 yes:)
7064 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7065 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7066 ac_tool_warned=yes ;;
7067 esac
7068     DLLTOOL=$ac_ct_DLLTOOL
7069   fi
7070 else
7071   DLLTOOL="$ac_cv_prog_DLLTOOL"
7072 fi
7073
7074   if test -n "$ac_tool_prefix"; then
7075   # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
7076 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
7077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7078 $as_echo_n "checking for $ac_word... " >&6; }
7079 if ${ac_cv_prog_DLLWRAP+:} false; then :
7080   $as_echo_n "(cached) " >&6
7081 else
7082   if test -n "$DLLWRAP"; then
7083   ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
7084 else
7085 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7086 for as_dir in $PATH
7087 do
7088   IFS=$as_save_IFS
7089   test -z "$as_dir" && as_dir=.
7090     for ac_exec_ext in '' $ac_executable_extensions; do
7091   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7092     ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
7093     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7094     break 2
7095   fi
7096 done
7097   done
7098 IFS=$as_save_IFS
7099
7100 fi
7101 fi
7102 DLLWRAP=$ac_cv_prog_DLLWRAP
7103 if test -n "$DLLWRAP"; then
7104   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5
7105 $as_echo "$DLLWRAP" >&6; }
7106 else
7107   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7108 $as_echo "no" >&6; }
7109 fi
7110
7111
7112 fi
7113 if test -z "$ac_cv_prog_DLLWRAP"; then
7114   ac_ct_DLLWRAP=$DLLWRAP
7115   # Extract the first word of "dllwrap", so it can be a program name with args.
7116 set dummy dllwrap; ac_word=$2
7117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7118 $as_echo_n "checking for $ac_word... " >&6; }
7119 if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then :
7120   $as_echo_n "(cached) " >&6
7121 else
7122   if test -n "$ac_ct_DLLWRAP"; then
7123   ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
7124 else
7125 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7126 for as_dir in $PATH
7127 do
7128   IFS=$as_save_IFS
7129   test -z "$as_dir" && as_dir=.
7130     for ac_exec_ext in '' $ac_executable_extensions; do
7131   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7132     ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
7133     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7134     break 2
7135   fi
7136 done
7137   done
7138 IFS=$as_save_IFS
7139
7140 fi
7141 fi
7142 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
7143 if test -n "$ac_ct_DLLWRAP"; then
7144   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5
7145 $as_echo "$ac_ct_DLLWRAP" >&6; }
7146 else
7147   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7148 $as_echo "no" >&6; }
7149 fi
7150
7151   if test "x$ac_ct_DLLWRAP" = x; then
7152     DLLWRAP="dllwrap"
7153   else
7154     case $cross_compiling:$ac_tool_warned in
7155 yes:)
7156 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7157 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7158 ac_tool_warned=yes ;;
7159 esac
7160     DLLWRAP=$ac_ct_DLLWRAP
7161   fi
7162 else
7163   DLLWRAP="$ac_cv_prog_DLLWRAP"
7164 fi
7165
7166   if test -n "$ac_tool_prefix"; then
7167   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7168 set dummy ${ac_tool_prefix}windres; ac_word=$2
7169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7170 $as_echo_n "checking for $ac_word... " >&6; }
7171 if ${ac_cv_prog_WINDRES+:} false; then :
7172   $as_echo_n "(cached) " >&6
7173 else
7174   if test -n "$WINDRES"; then
7175   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7176 else
7177 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7178 for as_dir in $PATH
7179 do
7180   IFS=$as_save_IFS
7181   test -z "$as_dir" && as_dir=.
7182     for ac_exec_ext in '' $ac_executable_extensions; do
7183   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7184     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
7185     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7186     break 2
7187   fi
7188 done
7189   done
7190 IFS=$as_save_IFS
7191
7192 fi
7193 fi
7194 WINDRES=$ac_cv_prog_WINDRES
7195 if test -n "$WINDRES"; then
7196   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7197 $as_echo "$WINDRES" >&6; }
7198 else
7199   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7200 $as_echo "no" >&6; }
7201 fi
7202
7203
7204 fi
7205 if test -z "$ac_cv_prog_WINDRES"; then
7206   ac_ct_WINDRES=$WINDRES
7207   # Extract the first word of "windres", so it can be a program name with args.
7208 set dummy windres; ac_word=$2
7209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7210 $as_echo_n "checking for $ac_word... " >&6; }
7211 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
7212   $as_echo_n "(cached) " >&6
7213 else
7214   if test -n "$ac_ct_WINDRES"; then
7215   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7216 else
7217 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7218 for as_dir in $PATH
7219 do
7220   IFS=$as_save_IFS
7221   test -z "$as_dir" && as_dir=.
7222     for ac_exec_ext in '' $ac_executable_extensions; do
7223   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7224     ac_cv_prog_ac_ct_WINDRES="windres"
7225     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7226     break 2
7227   fi
7228 done
7229   done
7230 IFS=$as_save_IFS
7231
7232 fi
7233 fi
7234 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7235 if test -n "$ac_ct_WINDRES"; then
7236   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7237 $as_echo "$ac_ct_WINDRES" >&6; }
7238 else
7239   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7240 $as_echo "no" >&6; }
7241 fi
7242
7243   if test "x$ac_ct_WINDRES" = x; then
7244     WINDRES="windres"
7245   else
7246     case $cross_compiling:$ac_tool_warned in
7247 yes:)
7248 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7249 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7250 ac_tool_warned=yes ;;
7251 esac
7252     WINDRES=$ac_ct_WINDRES
7253   fi
7254 else
7255   WINDRES="$ac_cv_prog_WINDRES"
7256 fi
7257
7258 fi
7259
7260 # Find a good install program.  We prefer a C program (faster),
7261 # so one script is as good as another.  But avoid the broken or
7262 # incompatible versions:
7263 # SysV /etc/install, /usr/sbin/install
7264 # SunOS /usr/etc/install
7265 # IRIX /sbin/install
7266 # AIX /bin/install
7267 # AmigaOS /C/install, which installs bootblocks on floppy discs
7268 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7269 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
7270 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7271 # OS/2's system install, which has a completely different semantic
7272 # ./install, which can be erroneously created by make from ./install.sh.
7273 # Reject install programs that cannot install multiple files.
7274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7275 $as_echo_n "checking for a BSD-compatible install... " >&6; }
7276 if test -z "$INSTALL"; then
7277 if ${ac_cv_path_install+:} false; then :
7278   $as_echo_n "(cached) " >&6
7279 else
7280   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7281 for as_dir in $PATH
7282 do
7283   IFS=$as_save_IFS
7284   test -z "$as_dir" && as_dir=.
7285     # Account for people who put trailing slashes in PATH elements.
7286 case $as_dir/ in #((
7287   ./ | .// | /[cC]/* | \
7288   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7289   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7290   /usr/ucb/* ) ;;
7291   *)
7292     # OSF1 and SCO ODT 3.0 have their own names for install.
7293     # Don't use installbsd from OSF since it installs stuff as root
7294     # by default.
7295     for ac_prog in ginstall scoinst install; do
7296       for ac_exec_ext in '' $ac_executable_extensions; do
7297         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
7298           if test $ac_prog = install &&
7299             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7300             # AIX install.  It has an incompatible calling convention.
7301             :
7302           elif test $ac_prog = install &&
7303             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7304             # program-specific install script used by HP pwplus--don't use.
7305             :
7306           else
7307             rm -rf conftest.one conftest.two conftest.dir
7308             echo one > conftest.one
7309             echo two > conftest.two
7310             mkdir conftest.dir
7311             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7312               test -s conftest.one && test -s conftest.two &&
7313               test -s conftest.dir/conftest.one &&
7314               test -s conftest.dir/conftest.two
7315             then
7316               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7317               break 3
7318             fi
7319           fi
7320         fi
7321       done
7322     done
7323     ;;
7324 esac
7325
7326   done
7327 IFS=$as_save_IFS
7328
7329 rm -rf conftest.one conftest.two conftest.dir
7330
7331 fi
7332   if test "${ac_cv_path_install+set}" = set; then
7333     INSTALL=$ac_cv_path_install
7334   else
7335     # As a last resort, use the slow shell script.  Don't cache a
7336     # value for INSTALL within a source directory, because that will
7337     # break other packages using the cache if that directory is
7338     # removed, or if the value is a relative name.
7339     INSTALL=$ac_install_sh
7340   fi
7341 fi
7342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7343 $as_echo "$INSTALL" >&6; }
7344
7345 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7346 # It thinks the first close brace ends the variable substitution.
7347 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7348
7349 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7350
7351 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7352
7353 # When Autoconf chooses install-sh as install program it tries to generate
7354 # a relative path to it in each makefile where it substitutes it. This clashes
7355 # with our Makefile.global concept. This workaround helps.
7356 case $INSTALL in
7357   *install-sh*) install_bin='';;
7358   *) install_bin=$INSTALL;;
7359 esac
7360
7361
7362 # Extract the first word of "tar", so it can be a program name with args.
7363 set dummy tar; ac_word=$2
7364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7365 $as_echo_n "checking for $ac_word... " >&6; }
7366 if ${ac_cv_path_TAR+:} false; then :
7367   $as_echo_n "(cached) " >&6
7368 else
7369   case $TAR in
7370   [\\/]* | ?:[\\/]*)
7371   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
7372   ;;
7373   *)
7374   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7375 for as_dir in $PATH
7376 do
7377   IFS=$as_save_IFS
7378   test -z "$as_dir" && as_dir=.
7379     for ac_exec_ext in '' $ac_executable_extensions; do
7380   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7381     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
7382     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7383     break 2
7384   fi
7385 done
7386   done
7387 IFS=$as_save_IFS
7388
7389   ;;
7390 esac
7391 fi
7392 TAR=$ac_cv_path_TAR
7393 if test -n "$TAR"; then
7394   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
7395 $as_echo "$TAR" >&6; }
7396 else
7397   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7398 $as_echo "no" >&6; }
7399 fi
7400
7401
7402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7403 $as_echo_n "checking whether ln -s works... " >&6; }
7404 LN_S=$as_ln_s
7405 if test "$LN_S" = "ln -s"; then
7406   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7407 $as_echo "yes" >&6; }
7408 else
7409   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7410 $as_echo "no, using $LN_S" >&6; }
7411 fi
7412
7413 for ac_prog in gawk mawk nawk awk
7414 do
7415   # Extract the first word of "$ac_prog", so it can be a program name with args.
7416 set dummy $ac_prog; ac_word=$2
7417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7418 $as_echo_n "checking for $ac_word... " >&6; }
7419 if ${ac_cv_prog_AWK+:} false; then :
7420   $as_echo_n "(cached) " >&6
7421 else
7422   if test -n "$AWK"; then
7423   ac_cv_prog_AWK="$AWK" # Let the user override the test.
7424 else
7425 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7426 for as_dir in $PATH
7427 do
7428   IFS=$as_save_IFS
7429   test -z "$as_dir" && as_dir=.
7430     for ac_exec_ext in '' $ac_executable_extensions; do
7431   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7432     ac_cv_prog_AWK="$ac_prog"
7433     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7434     break 2
7435   fi
7436 done
7437   done
7438 IFS=$as_save_IFS
7439
7440 fi
7441 fi
7442 AWK=$ac_cv_prog_AWK
7443 if test -n "$AWK"; then
7444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7445 $as_echo "$AWK" >&6; }
7446 else
7447   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7448 $as_echo "no" >&6; }
7449 fi
7450
7451
7452   test -n "$AWK" && break
7453 done
7454
7455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
7456 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
7457 if test -z "$MKDIR_P"; then
7458   if ${ac_cv_path_mkdir+:} false; then :
7459   $as_echo_n "(cached) " >&6
7460 else
7461   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7462 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
7463 do
7464   IFS=$as_save_IFS
7465   test -z "$as_dir" && as_dir=.
7466     for ac_prog in mkdir gmkdir; do
7467          for ac_exec_ext in '' $ac_executable_extensions; do
7468            as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
7469            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
7470              'mkdir (GNU coreutils) '* | \
7471              'mkdir (coreutils) '* | \
7472              'mkdir (fileutils) '4.1*)
7473                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
7474                break 3;;
7475            esac
7476          done
7477        done
7478   done
7479 IFS=$as_save_IFS
7480
7481 fi
7482
7483   test -d ./--version && rmdir ./--version
7484   if test "${ac_cv_path_mkdir+set}" = set; then
7485     MKDIR_P="$ac_cv_path_mkdir -p"
7486   else
7487     # As a last resort, use the slow shell script.  Don't cache a
7488     # value for MKDIR_P within a source directory, because that will
7489     # break other packages using the cache if that directory is
7490     # removed, or if the value is a relative name.
7491     MKDIR_P="$ac_install_sh -d"
7492   fi
7493 fi
7494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
7495 $as_echo "$MKDIR_P" >&6; }
7496
7497 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
7498 # a relative path to it in each makefile where it substitutes it. This clashes
7499 # with our Makefile.global concept. This workaround helps.
7500 case $MKDIR_P in
7501   *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
7502 esac
7503
7504 # Let the user override the search
7505 if test -z "$BISON"; then
7506   for ac_prog in bison
7507 do
7508   # Extract the first word of "$ac_prog", so it can be a program name with args.
7509 set dummy $ac_prog; ac_word=$2
7510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7511 $as_echo_n "checking for $ac_word... " >&6; }
7512 if ${ac_cv_path_BISON+:} false; then :
7513   $as_echo_n "(cached) " >&6
7514 else
7515   case $BISON in
7516   [\\/]* | ?:[\\/]*)
7517   ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
7518   ;;
7519   *)
7520   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7521 for as_dir in $PATH
7522 do
7523   IFS=$as_save_IFS
7524   test -z "$as_dir" && as_dir=.
7525     for ac_exec_ext in '' $ac_executable_extensions; do
7526   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7527     ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
7528     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7529     break 2
7530   fi
7531 done
7532   done
7533 IFS=$as_save_IFS
7534
7535   ;;
7536 esac
7537 fi
7538 BISON=$ac_cv_path_BISON
7539 if test -n "$BISON"; then
7540   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
7541 $as_echo "$BISON" >&6; }
7542 else
7543   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7544 $as_echo "no" >&6; }
7545 fi
7546
7547
7548   test -n "$BISON" && break
7549 done
7550
7551 fi
7552
7553 if test "$BISON"; then
7554   pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
7555   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
7556 $as_echo "$as_me: using $pgac_bison_version" >&6;}
7557   if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
7558   then
7559     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7560 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
7561 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
7562 $as_echo "$as_me: WARNING:
7563 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
7564 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
7565     BISON=""
7566   fi
7567   # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
7568   # of the now preferred %name-prefix "base_yy", but the latter
7569   # doesn't work with Bison 2.3 or less.  So for now we silence the
7570   # deprecation warnings.
7571   if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
7572   then
7573     BISONFLAGS="$BISONFLAGS -Wno-deprecated"
7574   fi
7575 fi
7576
7577 if test -z "$BISON"; then
7578   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7579 *** Without Bison you will not be able to build PostgreSQL from Git nor
7580 *** change any of the parser definition files.  You can obtain Bison from
7581 *** a GNU mirror site.  (If you are using the official distribution of
7582 *** PostgreSQL then you do not need to worry about this, because the Bison
7583 *** output is pre-generated.)" >&5
7584 $as_echo "$as_me: WARNING:
7585 *** Without Bison you will not be able to build PostgreSQL from Git nor
7586 *** change any of the parser definition files.  You can obtain Bison from
7587 *** a GNU mirror site.  (If you are using the official distribution of
7588 *** PostgreSQL then you do not need to worry about this, because the Bison
7589 *** output is pre-generated.)" >&2;}
7590 fi
7591 # We don't need AC_SUBST(BISON) because AC_PATH_PROG did it
7592
7593
7594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
7595 $as_echo_n "checking for flex... " >&6; }
7596 if ${pgac_cv_path_flex+:} false; then :
7597   $as_echo_n "(cached) " >&6
7598 else
7599   # Let the user override the test
7600 if test -n "$FLEX"; then
7601   pgac_cv_path_flex=$FLEX
7602 else
7603   pgac_save_IFS=$IFS
7604   IFS=$PATH_SEPARATOR
7605   for pgac_dir in $PATH; do
7606     IFS=$pgac_save_IFS
7607     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
7608       pgac_dir=`pwd`
7609     fi
7610     for pgac_prog in flex lex; do
7611       pgac_candidate="$pgac_dir/$pgac_prog"
7612       if test -f "$pgac_candidate" \
7613         && $pgac_candidate --version </dev/null >/dev/null 2>&1
7614       then
7615         echo '%%'  > conftest.l
7616         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
7617           pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
7618           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;}'
7619           then
7620             pgac_cv_path_flex=$pgac_candidate
7621             break 2
7622           else
7623             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7624 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
7625 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
7626 $as_echo "$as_me: WARNING:
7627 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
7628 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
7629           fi
7630         fi
7631       fi
7632     done
7633   done
7634   rm -f conftest.l lex.yy.c
7635   : ${pgac_cv_path_flex=no}
7636 fi
7637
7638 fi
7639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
7640 $as_echo "$pgac_cv_path_flex" >&6; }
7641 if test x"$pgac_cv_path_flex" = x"no"; then
7642   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7643 *** Without Flex you will not be able to build PostgreSQL from Git nor
7644 *** change any of the scanner definition files.  You can obtain Flex from
7645 *** a GNU mirror site.  (If you are using the official distribution of
7646 *** PostgreSQL then you do not need to worry about this because the Flex
7647 *** output is pre-generated.)" >&5
7648 $as_echo "$as_me: WARNING:
7649 *** Without Flex you will not be able to build PostgreSQL from Git nor
7650 *** change any of the scanner definition files.  You can obtain Flex from
7651 *** a GNU mirror site.  (If you are using the official distribution of
7652 *** PostgreSQL then you do not need to worry about this because the Flex
7653 *** output is pre-generated.)" >&2;}
7654
7655   FLEX=
7656 else
7657   FLEX=$pgac_cv_path_flex
7658   pgac_flex_version=`$FLEX --version 2>/dev/null`
7659   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
7660 $as_echo "$as_me: using $pgac_flex_version" >&6;}
7661 fi
7662
7663
7664
7665
7666
7667 # Let the user override the search
7668 if test -z "$PERL"; then
7669   # Extract the first word of "perl", so it can be a program name with args.
7670 set dummy perl; ac_word=$2
7671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7672 $as_echo_n "checking for $ac_word... " >&6; }
7673 if ${ac_cv_path_PERL+:} false; then :
7674   $as_echo_n "(cached) " >&6
7675 else
7676   case $PERL in
7677   [\\/]* | ?:[\\/]*)
7678   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
7679   ;;
7680   *)
7681   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7682 for as_dir in $PATH
7683 do
7684   IFS=$as_save_IFS
7685   test -z "$as_dir" && as_dir=.
7686     for ac_exec_ext in '' $ac_executable_extensions; do
7687   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7688     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
7689     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7690     break 2
7691   fi
7692 done
7693   done
7694 IFS=$as_save_IFS
7695
7696   ;;
7697 esac
7698 fi
7699 PERL=$ac_cv_path_PERL
7700 if test -n "$PERL"; then
7701   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
7702 $as_echo "$PERL" >&6; }
7703 else
7704   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7705 $as_echo "no" >&6; }
7706 fi
7707
7708
7709 fi
7710
7711 if test "$PERL"; then
7712   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'`
7713   { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
7714 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
7715   if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
7716     $AWK '{ if ($1 == 5 && $2 >= 8) exit 1; else exit 0;}'
7717   then
7718     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7719 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7720 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
7721 $as_echo "$as_me: WARNING:
7722 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7723 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
7724     PERL=""
7725   fi
7726 fi
7727
7728 if test -z "$PERL"; then
7729   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7730 *** Without Perl you will not be able to build PostgreSQL from Git.
7731 *** You can obtain Perl from any CPAN mirror site.
7732 *** (If you are using the official distribution of PostgreSQL then you do not
7733 *** need to worry about this, because the Perl output is pre-generated.)" >&5
7734 $as_echo "$as_me: WARNING:
7735 *** Without Perl you will not be able to build PostgreSQL from Git.
7736 *** You can obtain Perl from any CPAN mirror site.
7737 *** (If you are using the official distribution of PostgreSQL then you do not
7738 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
7739 fi
7740
7741 if test "$with_perl" = yes; then
7742   if test -z "$PERL"; then
7743     as_fn_error $? "Perl not found" "$LINENO" 5
7744   fi
7745
7746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
7747 $as_echo_n "checking for Perl archlibexp... " >&6; }
7748 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
7749 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
7750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
7751 $as_echo "$perl_archlibexp" >&6; }
7752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
7753 $as_echo_n "checking for Perl privlibexp... " >&6; }
7754 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
7755 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
7756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
7757 $as_echo "$perl_privlibexp" >&6; }
7758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
7759 $as_echo_n "checking for Perl useshrplib... " >&6; }
7760 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
7761 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
7762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
7763 $as_echo "$perl_useshrplib" >&6; }
7764   if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
7765     as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
7766 You might have to rebuild your Perl installation.  Refer to the
7767 documentation for details.  Use --without-perl to disable building
7768 PL/Perl." "$LINENO" 5
7769   fi
7770
7771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
7772 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
7773 if test "$PORTNAME" = "win32" ; then
7774 perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
7775 test -e "$perl_archlibexp/CORE/$perl_lib.lib" && perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
7776 else
7777 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
7778 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
7779 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
7780 fi
7781 if test -z "$perl_embed_ldflags" ; then
7782         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7783 $as_echo "no" >&6; }
7784         as_fn_error $? "could not determine flags for linking embedded Perl.
7785 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
7786 installed." "$LINENO" 5
7787 else
7788         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
7789 $as_echo "$perl_embed_ldflags" >&6; }
7790 fi
7791
7792 fi
7793
7794 if test "$with_python" = yes; then
7795   # Extract the first word of "python", so it can be a program name with args.
7796 set dummy python; ac_word=$2
7797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7798 $as_echo_n "checking for $ac_word... " >&6; }
7799 if ${ac_cv_path_PYTHON+:} false; then :
7800   $as_echo_n "(cached) " >&6
7801 else
7802   case $PYTHON in
7803   [\\/]* | ?:[\\/]*)
7804   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
7805   ;;
7806   *)
7807   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7808 for as_dir in $PATH
7809 do
7810   IFS=$as_save_IFS
7811   test -z "$as_dir" && as_dir=.
7812     for ac_exec_ext in '' $ac_executable_extensions; do
7813   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7814     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
7815     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7816     break 2
7817   fi
7818 done
7819   done
7820 IFS=$as_save_IFS
7821
7822   ;;
7823 esac
7824 fi
7825 PYTHON=$ac_cv_path_PYTHON
7826 if test -n "$PYTHON"; then
7827   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
7828 $as_echo "$PYTHON" >&6; }
7829 else
7830   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7831 $as_echo "no" >&6; }
7832 fi
7833
7834
7835 if test x"$PYTHON" = x""; then
7836   as_fn_error $? "Python not found" "$LINENO" 5
7837 fi
7838
7839
7840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python distutils module" >&5
7841 $as_echo_n "checking for Python distutils module... " >&6; }
7842 if "${PYTHON}" -c 'import distutils' 2>&5
7843 then
7844     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7845 $as_echo "yes" >&6; }
7846 else
7847     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7848 $as_echo "no" >&6; }
7849     as_fn_error $? "distutils module not found" "$LINENO" 5
7850 fi
7851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
7852 $as_echo_n "checking Python configuration directory... " >&6; }
7853 python_majorversion=`${PYTHON} -c "import sys; print(sys.version[0])"`
7854 python_minorversion=`${PYTHON} -c "import sys; print(sys.version[2])"`
7855 python_version=`${PYTHON} -c "import sys; print(sys.version[:3])"`
7856 python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
7857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
7858 $as_echo "$python_configdir" >&6; }
7859
7860 # Reject unsupported Python versions as soon as practical.
7861 if test "$python_majorversion" -lt 3 -a "$python_minorversion" -lt 4; then
7862   as_fn_error $? "Python version $python_version is too old (version 2.4 or later is required)" "$LINENO" 5
7863 fi
7864
7865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directories" >&5
7866 $as_echo_n "checking Python include directories... " >&6; }
7867 python_includespec=`${PYTHON} -c "
7868 import distutils.sysconfig
7869 a = '-I' + distutils.sysconfig.get_python_inc(False)
7870 b = '-I' + distutils.sysconfig.get_python_inc(True)
7871 if a == b:
7872     print(a)
7873 else:
7874     print(a + ' ' + b)"`
7875 if test "$PORTNAME" = win32 ; then
7876     python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
7877 fi
7878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
7879 $as_echo "$python_includespec" >&6; }
7880
7881
7882
7883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
7884 $as_echo_n "checking how to link an embedded Python application... " >&6; }
7885
7886 python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
7887 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
7888
7889 # If LDLIBRARY exists and has a shlib extension, use it verbatim.
7890 ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
7891 if test -e "${python_libdir}/${python_ldlibrary}" -a x"${python_ldlibrary}" != x"${ldlibrary}"
7892 then
7893         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
7894         found_shlib=1
7895 else
7896         # Otherwise, guess the base name of the shlib.
7897         # LDVERSION was added in Python 3.2, before that use VERSION,
7898         # or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS.
7899         python_ldversion=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDVERSION'))))"`
7900         if test x"${python_ldversion}" != x""; then
7901                 ldlibrary="python${python_ldversion}"
7902         else
7903                 python_version_var=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('VERSION'))))"`
7904                 if test x"${python_version_var}" != x""; then
7905                         ldlibrary="python${python_version_var}"
7906                 else
7907                         ldlibrary="python${python_version}"
7908                 fi
7909         fi
7910         # Search for a likely-looking file.
7911         found_shlib=0
7912         for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
7913         do
7914                 # We don't know the platform DLSUFFIX here, so check 'em all.
7915                 for e in .so .dll .dylib .sl; do
7916                         if test -e "$d/lib${ldlibrary}$e"; then
7917                                 python_libdir="$d"
7918                                 found_shlib=1
7919                                 break 2
7920                         fi
7921                 done
7922         done
7923         # Some platforms (OpenBSD) require us to accept a bare versioned shlib
7924         # (".so.n.n") as well. However, check this only after failing to find
7925         # ".so" anywhere, because yet other platforms (Debian) put the .so
7926         # symlink in a different directory from the underlying versioned shlib.
7927         if test "$found_shlib" != 1; then
7928                 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
7929                 do
7930                         for f in "$d/lib${ldlibrary}.so."* ; do
7931                                 if test -e "$f"; then
7932                                         python_libdir="$d"
7933                                         found_shlib=1
7934                                         break 2
7935                                 fi
7936                         done
7937                 done
7938         fi
7939         # As usual, Windows has its own ideas.  Possible default library
7940         # locations include c:/Windows/System32 and (for Cygwin) /usr/bin,
7941         # and the "lib" prefix might not be there.
7942         if test "$found_shlib" != 1 -a \( "$PORTNAME" = win32 -o "$PORTNAME" = cygwin \); then
7943                 for d in "${python_libdir}" "${python_configdir}" c:/Windows/System32 /usr/bin
7944                 do
7945                         for f in "$d/lib${ldlibrary}.dll" "$d/${ldlibrary}.dll" ; do
7946                                 if test -e "$f"; then
7947                                         python_libdir="$d"
7948                                         found_shlib=1
7949                                         break 2
7950                                 fi
7951                         done
7952                 done
7953         fi
7954 fi
7955 if test "$found_shlib" != 1; then
7956         as_fn_error $? "could not find shared library for Python
7957 You might have to rebuild your Python installation.  Refer to the
7958 documentation for details.  Use --without-python to disable building
7959 PL/Python." "$LINENO" 5
7960 fi
7961 python_libspec="-L${python_libdir} -l${ldlibrary}"
7962
7963 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
7964
7965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
7966 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
7967
7968
7969
7970 fi
7971
7972 if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
7973   # Extract the first word of "zic", so it can be a program name with args.
7974 set dummy zic; ac_word=$2
7975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7976 $as_echo_n "checking for $ac_word... " >&6; }
7977 if ${ac_cv_path_ZIC+:} false; then :
7978   $as_echo_n "(cached) " >&6
7979 else
7980   case $ZIC in
7981   [\\/]* | ?:[\\/]*)
7982   ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
7983   ;;
7984   *)
7985   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7986 for as_dir in $PATH
7987 do
7988   IFS=$as_save_IFS
7989   test -z "$as_dir" && as_dir=.
7990     for ac_exec_ext in '' $ac_executable_extensions; do
7991   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7992     ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
7993     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7994     break 2
7995   fi
7996 done
7997   done
7998 IFS=$as_save_IFS
7999
8000   ;;
8001 esac
8002 fi
8003 ZIC=$ac_cv_path_ZIC
8004 if test -n "$ZIC"; then
8005   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
8006 $as_echo "$ZIC" >&6; }
8007 else
8008   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8009 $as_echo "no" >&6; }
8010 fi
8011
8012
8013   if test -z "$ZIC"; then
8014     as_fn_error $? "
8015 When cross-compiling, either use the option --with-system-tzdata to use
8016 existing time-zone data, or set the environment variable ZIC to a zic
8017 program to use during the build." "$LINENO" 5
8018   fi
8019 fi
8020
8021 #
8022 # Pthreads
8023 #
8024 # For each platform, we need to know about any special compile and link
8025 # libraries, and whether the normal C function names are thread-safe.
8026 # See the comment at the top of src/port/thread.c for more information.
8027 # WIN32 doesn't need the pthread tests;  it always uses threads
8028 #
8029 # These tests are run before the library-tests, because linking with the
8030 # other libraries can pull in the pthread functions as a side-effect.  We
8031 # want to use the -pthread or similar flags directly, and not rely on
8032 # the side-effects of linking with some other library.
8033 #
8034 # note: We have to use AS_IF here rather than plain if. The AC_CHECK_HEADER
8035 # invocation below is the first one in the script, and autoconf generates
8036 # additional code for that, which must not be inside the if-block. AS_IF
8037 # knows how to do that.
8038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
8039 $as_echo_n "checking for ANSI C header files... " >&6; }
8040 if ${ac_cv_header_stdc+:} false; then :
8041   $as_echo_n "(cached) " >&6
8042 else
8043   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8044 /* end confdefs.h.  */
8045 #include <stdlib.h>
8046 #include <stdarg.h>
8047 #include <string.h>
8048 #include <float.h>
8049
8050 int
8051 main ()
8052 {
8053
8054   ;
8055   return 0;
8056 }
8057 _ACEOF
8058 if ac_fn_c_try_compile "$LINENO"; then :
8059   ac_cv_header_stdc=yes
8060 else
8061   ac_cv_header_stdc=no
8062 fi
8063 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8064
8065 if test $ac_cv_header_stdc = yes; then
8066   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8067   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8068 /* end confdefs.h.  */
8069 #include <string.h>
8070
8071 _ACEOF
8072 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8073   $EGREP "memchr" >/dev/null 2>&1; then :
8074
8075 else
8076   ac_cv_header_stdc=no
8077 fi
8078 rm -f conftest*
8079
8080 fi
8081
8082 if test $ac_cv_header_stdc = yes; then
8083   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8084   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8085 /* end confdefs.h.  */
8086 #include <stdlib.h>
8087
8088 _ACEOF
8089 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8090   $EGREP "free" >/dev/null 2>&1; then :
8091
8092 else
8093   ac_cv_header_stdc=no
8094 fi
8095 rm -f conftest*
8096
8097 fi
8098
8099 if test $ac_cv_header_stdc = yes; then
8100   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8101   if test "$cross_compiling" = yes; then :
8102   :
8103 else
8104   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8105 /* end confdefs.h.  */
8106 #include <ctype.h>
8107 #include <stdlib.h>
8108 #if ((' ' & 0x0FF) == 0x020)
8109 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8110 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8111 #else
8112 # define ISLOWER(c) \
8113                    (('a' <= (c) && (c) <= 'i') \
8114                      || ('j' <= (c) && (c) <= 'r') \
8115                      || ('s' <= (c) && (c) <= 'z'))
8116 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8117 #endif
8118
8119 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8120 int
8121 main ()
8122 {
8123   int i;
8124   for (i = 0; i < 256; i++)
8125     if (XOR (islower (i), ISLOWER (i))
8126         || toupper (i) != TOUPPER (i))
8127       return 2;
8128   return 0;
8129 }
8130 _ACEOF
8131 if ac_fn_c_try_run "$LINENO"; then :
8132
8133 else
8134   ac_cv_header_stdc=no
8135 fi
8136 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8137   conftest.$ac_objext conftest.beam conftest.$ac_ext
8138 fi
8139
8140 fi
8141 fi
8142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
8143 $as_echo "$ac_cv_header_stdc" >&6; }
8144 if test $ac_cv_header_stdc = yes; then
8145
8146 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
8147
8148 fi
8149
8150 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
8151 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
8152                   inttypes.h stdint.h unistd.h
8153 do :
8154   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8155 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
8156 "
8157 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8158   cat >>confdefs.h <<_ACEOF
8159 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8160 _ACEOF
8161
8162 fi
8163
8164 done
8165
8166
8167 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then :
8168    # then
8169
8170
8171
8172 ac_ext=c
8173 ac_cpp='$CPP $CPPFLAGS'
8174 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8175 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8176 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8177
8178 ax_pthread_ok=no
8179
8180 # We used to check for pthread.h first, but this fails if pthread.h
8181 # requires special compiler flags (e.g. on Tru64 or Sequent).
8182 # It gets checked for in the link test anyway.
8183
8184 # First of all, check if the user has set any of the PTHREAD_LIBS,
8185 # etcetera environment variables, and if threads linking works using
8186 # them:
8187 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
8188         save_CFLAGS="$CFLAGS"
8189         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
8190         save_LIBS="$LIBS"
8191         LIBS="$PTHREAD_LIBS $LIBS"
8192         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
8193 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
8194         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8195 /* end confdefs.h.  */
8196
8197 /* Override any GCC internal prototype to avoid an error.
8198    Use char because int might match the return type of a GCC
8199    builtin and then its argument prototype would still apply.  */
8200 #ifdef __cplusplus
8201 extern "C"
8202 #endif
8203 char pthread_join ();
8204 int
8205 main ()
8206 {
8207 return pthread_join ();
8208   ;
8209   return 0;
8210 }
8211 _ACEOF
8212 if ac_fn_c_try_link "$LINENO"; then :
8213   ax_pthread_ok=yes
8214 fi
8215 rm -f core conftest.err conftest.$ac_objext \
8216     conftest$ac_exeext conftest.$ac_ext
8217         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
8218 $as_echo "$ax_pthread_ok" >&6; }
8219         if test x"$ax_pthread_ok" = xno; then
8220                 PTHREAD_LIBS=""
8221                 PTHREAD_CFLAGS=""
8222         fi
8223         LIBS="$save_LIBS"
8224         CFLAGS="$save_CFLAGS"
8225 fi
8226
8227 # We must check for the threads library under a number of different
8228 # names; the ordering is very important because some systems
8229 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
8230 # libraries is broken (non-POSIX).
8231
8232 # Create a list of thread flags to try.  Items starting with a "-" are
8233 # C compiler flags, and other items are library names, except for "none"
8234 # which indicates that we try without any flags at all, and "pthread-config"
8235 # which is a program returning the flags for the Pth emulation library.
8236
8237 ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mt -mthreads pthread --thread-safe pthread-config"
8238
8239 # The ordering *is* (sometimes) important.  Some notes on the
8240 # individual items follow:
8241
8242 # pthreads: AIX (must check this before -lpthread)
8243 # none: in case threads are in libc; should be tried before -Kthread and
8244 #       other compiler flags to prevent continual compiler warnings
8245 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
8246 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
8247 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
8248 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
8249 # -pthreads: Solaris/gcc
8250 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
8251 #      doesn't hurt to check since this sometimes defines pthreads and
8252 #      -D_REENTRANT too), HP C (must be checked before -lpthread, which
8253 #      is present but should not be used directly)
8254 # -mthreads: Mingw32/gcc, Lynx/gcc
8255 # pthread: Linux, etcetera
8256 # --thread-safe: KAI C++
8257 # pthread-config: use pthread-config program (for GNU Pth library)
8258
8259 case $host_os in
8260
8261         hpux*)
8262
8263         # From the cc(1) man page: "[-mt] Sets various -D flags to enable
8264         # multi-threading and also sets -lpthread."
8265
8266         ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
8267         ;;
8268
8269         openedition*)
8270
8271         # IBM z/OS requires a feature-test macro to be defined in order to
8272         # enable POSIX threads at all, so give the user a hint if this is
8273         # not set. (We don't define these ourselves, as they can affect
8274         # other portions of the system API in unpredictable ways.)
8275
8276         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8277 /* end confdefs.h.  */
8278
8279 #            if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
8280              AX_PTHREAD_ZOS_MISSING
8281 #            endif
8282
8283 _ACEOF
8284 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8285   $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
8286   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
8287 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
8288 fi
8289 rm -f conftest*
8290
8291         ;;
8292
8293         solaris*)
8294
8295         # Newer versions of Solaris require the "-mt -lpthread" pair, and we
8296         # check that first.  On some older versions, libc contains stubbed
8297         # (non-functional) versions of the pthreads routines, so link-based
8298         # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
8299         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
8300         # a function called by this macro, so we could check for that, but
8301         # who knows whether they'll stub that too in a future libc.)  So
8302         # we'll look for -pthreads and -lpthread shortly thereafter.
8303
8304         ax_pthread_flags="-mt,pthread -pthreads -pthread pthread $ax_pthread_flags"
8305         ;;
8306 esac
8307
8308 # Older versions of Clang only give a warning instead of an error for an
8309 # unrecognized option, unless we specify -Werror. (We throw in some extra
8310 # Clang warning flags for good measure.)
8311
8312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler needs certain flags to reject unknown flags" >&5
8313 $as_echo_n "checking if compiler needs certain flags to reject unknown flags... " >&6; }
8314 if ${ax_cv_PTHREAD_REJECT_UNKNOWN+:} false; then :
8315   $as_echo_n "(cached) " >&6
8316 else
8317   ax_cv_PTHREAD_REJECT_UNKNOWN=unknown
8318      save_CFLAGS="$CFLAGS"
8319      ax_pthread_extra_flags="-Wunknown-warning-option -Wunused-command-line-argument"
8320      CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wfoobaz -foobaz"
8321      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8322 /* end confdefs.h.  */
8323 int foo(void);
8324 int
8325 main ()
8326 {
8327 foo()
8328   ;
8329   return 0;
8330 }
8331 _ACEOF
8332 if ac_fn_c_try_compile "$LINENO"; then :
8333   ax_cv_PTHREAD_REJECT_UNKNOWN="-Werror $ax_pthread_extra_flags"
8334 else
8335   ax_cv_PTHREAD_REJECT_UNKNOWN=no
8336 fi
8337 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8338      CFLAGS="$save_CFLAGS"
8339
8340 fi
8341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_REJECT_UNKNOWN" >&5
8342 $as_echo "$ax_cv_PTHREAD_REJECT_UNKNOWN" >&6; }
8343 ax_pthread_extra_flags=
8344 if test "x$ax_cv_PTHREAD_REJECT_UNKNOWN" != "xno"; then :
8345   ax_pthread_extra_flags="$ax_cv_PTHREAD_REJECT_UNKNOWN"
8346 fi
8347
8348 if test x"$ax_pthread_ok" = xno; then
8349 for flag in $ax_pthread_flags; do
8350
8351         case $flag in
8352                 none)
8353                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
8354 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
8355                 ;;
8356
8357                 -mt,pthread)
8358                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
8359 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
8360                 PTHREAD_CFLAGS="-mt"
8361                 PTHREAD_LIBS="-lpthread"
8362                 ;;
8363
8364                 -*)
8365                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
8366 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
8367                 PTHREAD_CFLAGS="$flag"
8368                 ;;
8369
8370                 pthread-config)
8371                 # Extract the first word of "pthread-config", so it can be a program name with args.
8372 set dummy pthread-config; ac_word=$2
8373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8374 $as_echo_n "checking for $ac_word... " >&6; }
8375 if ${ac_cv_prog_ax_pthread_config+:} false; then :
8376   $as_echo_n "(cached) " >&6
8377 else
8378   if test -n "$ax_pthread_config"; then
8379   ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
8380 else
8381 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8382 for as_dir in $PATH
8383 do
8384   IFS=$as_save_IFS
8385   test -z "$as_dir" && as_dir=.
8386     for ac_exec_ext in '' $ac_executable_extensions; do
8387   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8388     ac_cv_prog_ax_pthread_config="yes"
8389     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8390     break 2
8391   fi
8392 done
8393   done
8394 IFS=$as_save_IFS
8395
8396   test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
8397 fi
8398 fi
8399 ax_pthread_config=$ac_cv_prog_ax_pthread_config
8400 if test -n "$ax_pthread_config"; then
8401   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
8402 $as_echo "$ax_pthread_config" >&6; }
8403 else
8404   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8405 $as_echo "no" >&6; }
8406 fi
8407
8408
8409                 if test x"$ax_pthread_config" = xno; then continue; fi
8410                 PTHREAD_CFLAGS="`pthread-config --cflags`"
8411                 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
8412                 ;;
8413
8414                 *)
8415                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
8416 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
8417                 PTHREAD_LIBS="-l$flag"
8418                 ;;
8419         esac
8420
8421         save_LIBS="$LIBS"
8422         save_CFLAGS="$CFLAGS"
8423         LIBS="$PTHREAD_LIBS $LIBS"
8424         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
8425
8426         # Check for various functions.  We must include pthread.h,
8427         # since some functions may be macros.  (On the Sequent, we
8428         # need a special flag -Kthread to make this header compile.)
8429         # We check for pthread_join because it is in -lpthread on IRIX
8430         # while pthread_create is in libc.  We check for pthread_attr_init
8431         # due to DEC craziness with -lpthreads.  We check for
8432         # pthread_cleanup_push because it is one of the few pthread
8433         # functions on Solaris that doesn't have a non-functional libc stub.
8434         # We try pthread_create on general principles.
8435         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8436 /* end confdefs.h.  */
8437 #include <pthread.h>
8438                         static void routine(void *a) { a = 0; }
8439                         static void *start_routine(void *a) { return a; }
8440 int
8441 main ()
8442 {
8443 pthread_t th; pthread_attr_t attr;
8444                         pthread_create(&th, 0, start_routine, 0);
8445                         pthread_join(th, 0);
8446                         pthread_attr_init(&attr);
8447                         pthread_cleanup_push(routine, 0);
8448                         pthread_cleanup_pop(0) /* ; */
8449   ;
8450   return 0;
8451 }
8452 _ACEOF
8453 if ac_fn_c_try_link "$LINENO"; then :
8454   ax_pthread_ok=yes
8455 fi
8456 rm -f core conftest.err conftest.$ac_objext \
8457     conftest$ac_exeext conftest.$ac_ext
8458
8459         LIBS="$save_LIBS"
8460         CFLAGS="$save_CFLAGS"
8461
8462         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
8463 $as_echo "$ax_pthread_ok" >&6; }
8464         if test "x$ax_pthread_ok" = xyes; then
8465                 break;
8466         fi
8467
8468         PTHREAD_LIBS=""
8469         PTHREAD_CFLAGS=""
8470 done
8471 fi
8472
8473 # Various other checks:
8474 if test "x$ax_pthread_ok" = xyes; then
8475         save_LIBS="$LIBS"
8476         LIBS="$PTHREAD_LIBS $LIBS"
8477         save_CFLAGS="$CFLAGS"
8478         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
8479
8480         # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
8481         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
8482 $as_echo_n "checking for joinable pthread attribute... " >&6; }
8483 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
8484   $as_echo_n "(cached) " >&6
8485 else
8486   ax_cv_PTHREAD_JOINABLE_ATTR=unknown
8487              for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
8488                  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8489 /* end confdefs.h.  */
8490 #include <pthread.h>
8491 int
8492 main ()
8493 {
8494 int attr = $attr; return attr /* ; */
8495   ;
8496   return 0;
8497 }
8498 _ACEOF
8499 if ac_fn_c_try_link "$LINENO"; then :
8500   ax_cv_PTHREAD_JOINABLE_ATTR=$attr; break
8501 fi
8502 rm -f core conftest.err conftest.$ac_objext \
8503     conftest$ac_exeext conftest.$ac_ext
8504              done
8505
8506 fi
8507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
8508 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
8509         if test "$ax_cv_PTHREAD_JOINABLE_ATTR" != unknown && \
8510                test "$ax_cv_PTHREAD_JOINABLE_ATTR" != PTHREAD_CREATE_JOINABLE; then :
8511
8512 cat >>confdefs.h <<_ACEOF
8513 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
8514 _ACEOF
8515
8516 fi
8517
8518         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
8519 $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
8520 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
8521   $as_echo_n "(cached) " >&6
8522 else
8523   ax_cv_PTHREAD_SPECIAL_FLAGS=no
8524              ax_pthread_special_flags_added=no
8525              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8526 /* end confdefs.h.  */
8527
8528 #                 if !defined(_REENTRANT) && !defined(_THREAD_SAFE)
8529                   AX_PTHREAD_NEED_SPECIAL_FLAG
8530 #                 endif
8531
8532 _ACEOF
8533 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8534   $EGREP "AX_PTHREAD_NEED_SPECIAL_FLAG" >/dev/null 2>&1; then :
8535   case $host_os in
8536                   aix* | freebsd*)
8537                   ax_cv_PTHREAD_SPECIAL_FLAGS="-D_THREAD_SAFE"
8538                   ;;
8539                   darwin* | hpux* | osf* | solaris*)
8540                   ax_cv_PTHREAD_SPECIAL_FLAGS="-D_REENTRANT"
8541                   ;;
8542                   esac
8543
8544 fi
8545 rm -f conftest*
8546
8547
8548 fi
8549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
8550 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
8551         if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
8552                test "x$ax_pthread_special_flags_added" != "xyes"; then :
8553   PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
8554                ax_pthread_special_flags_added=yes
8555 fi
8556
8557         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
8558 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
8559 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
8560   $as_echo_n "(cached) " >&6
8561 else
8562   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8563 /* end confdefs.h.  */
8564 #include <pthread.h>
8565 int
8566 main ()
8567 {
8568 int i = PTHREAD_PRIO_INHERIT;
8569   ;
8570   return 0;
8571 }
8572 _ACEOF
8573 if ac_fn_c_try_link "$LINENO"; then :
8574   ax_cv_PTHREAD_PRIO_INHERIT=yes
8575 else
8576   ax_cv_PTHREAD_PRIO_INHERIT=no
8577 fi
8578 rm -f core conftest.err conftest.$ac_objext \
8579     conftest$ac_exeext conftest.$ac_ext
8580
8581 fi
8582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
8583 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
8584         if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
8585
8586 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
8587
8588 fi
8589
8590         LIBS="$save_LIBS"
8591         CFLAGS="$save_CFLAGS"
8592
8593         # More AIX lossage: compile with *_r variant
8594         if test "x$GCC" != xyes; then
8595             case $host_os in
8596                 aix*)
8597                 case "x/$CC" in #(
8598   x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
8599     #handle absolute path differently from PATH based program lookup
8600                    case "x$CC" in #(
8601   x/*) :
8602     if as_fn_executable_p ${CC}_r; then :
8603   PTHREAD_CC="${CC}_r"
8604 fi ;; #(
8605   *) :
8606     for ac_prog in ${CC}_r
8607 do
8608   # Extract the first word of "$ac_prog", so it can be a program name with args.
8609 set dummy $ac_prog; ac_word=$2
8610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8611 $as_echo_n "checking for $ac_word... " >&6; }
8612 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
8613   $as_echo_n "(cached) " >&6
8614 else
8615   if test -n "$PTHREAD_CC"; then
8616   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
8617 else
8618 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8619 for as_dir in $PATH
8620 do
8621   IFS=$as_save_IFS
8622   test -z "$as_dir" && as_dir=.
8623     for ac_exec_ext in '' $ac_executable_extensions; do
8624   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8625     ac_cv_prog_PTHREAD_CC="$ac_prog"
8626     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8627     break 2
8628   fi
8629 done
8630   done
8631 IFS=$as_save_IFS
8632
8633 fi
8634 fi
8635 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
8636 if test -n "$PTHREAD_CC"; then
8637   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
8638 $as_echo "$PTHREAD_CC" >&6; }
8639 else
8640   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8641 $as_echo "no" >&6; }
8642 fi
8643
8644
8645   test -n "$PTHREAD_CC" && break
8646 done
8647 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
8648  ;;
8649 esac ;; #(
8650   *) :
8651      ;;
8652 esac
8653                 ;;
8654             esac
8655         fi
8656 fi
8657
8658 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
8659
8660
8661
8662
8663
8664 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
8665 if test x"$ax_pthread_ok" = xyes; then
8666
8667 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
8668
8669         :
8670 else
8671         ax_pthread_ok=no
8672
8673 fi
8674 ac_ext=c
8675 ac_cpp='$CPP $CPPFLAGS'
8676 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8677 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8678 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8679
8680         # set thread flags
8681
8682 # Some platforms use these, so just define them.  They can't hurt if they
8683 # are not supported.  For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
8684 # enables 5-arg getpwuid_r, among other things.
8685 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
8686
8687 # Check for *_r functions
8688 _CFLAGS="$CFLAGS"
8689 _LIBS="$LIBS"
8690 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
8691 LIBS="$LIBS $PTHREAD_LIBS"
8692
8693 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
8694 if test "x$ac_cv_header_pthread_h" = xyes; then :
8695
8696 else
8697   as_fn_error $? "
8698 pthread.h not found;  use --disable-thread-safety to disable thread safety" "$LINENO" 5
8699 fi
8700
8701
8702
8703 for ac_func in strerror_r getpwuid_r gethostbyname_r
8704 do :
8705   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8706 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8707 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8708   cat >>confdefs.h <<_ACEOF
8709 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8710 _ACEOF
8711
8712 fi
8713 done
8714
8715
8716 # Do test here with the proper thread flags
8717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
8718 $as_echo_n "checking whether strerror_r returns int... " >&6; }
8719 if ${pgac_cv_func_strerror_r_int+:} false; then :
8720   $as_echo_n "(cached) " >&6
8721 else
8722   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8723 /* end confdefs.h.  */
8724 #include <string.h>
8725 int
8726 main ()
8727 {
8728 #ifndef _AIX
8729 int strerror_r(int, char *, size_t);
8730 #else
8731 /* Older AIX has 'int' for the third argument so we don't test the args. */
8732 int strerror_r();
8733 #endif
8734   ;
8735   return 0;
8736 }
8737 _ACEOF
8738 if ac_fn_c_try_compile "$LINENO"; then :
8739   pgac_cv_func_strerror_r_int=yes
8740 else
8741   pgac_cv_func_strerror_r_int=no
8742 fi
8743 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8744 fi
8745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
8746 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
8747 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
8748
8749 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
8750
8751 fi
8752
8753
8754 CFLAGS="$_CFLAGS"
8755 LIBS="$_LIBS"
8756
8757
8758 else
8759    # else
8760 # do not use values from template file
8761 PTHREAD_CFLAGS=
8762 PTHREAD_LIBS=
8763
8764 fi # fi
8765
8766
8767
8768
8769
8770 ##
8771 ## Libraries
8772 ##
8773 ## Most libraries are included only if they demonstrably provide a function
8774 ## we need, but libm is an exception: always include it, because there are
8775 ## too many compilers that play cute optimization games that will break
8776 ## probes for standard functions such as pow().
8777 ##
8778
8779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
8780 $as_echo_n "checking for main in -lm... " >&6; }
8781 if ${ac_cv_lib_m_main+:} false; then :
8782   $as_echo_n "(cached) " >&6
8783 else
8784   ac_check_lib_save_LIBS=$LIBS
8785 LIBS="-lm  $LIBS"
8786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8787 /* end confdefs.h.  */
8788
8789
8790 int
8791 main ()
8792 {
8793 return main ();
8794   ;
8795   return 0;
8796 }
8797 _ACEOF
8798 if ac_fn_c_try_link "$LINENO"; then :
8799   ac_cv_lib_m_main=yes
8800 else
8801   ac_cv_lib_m_main=no
8802 fi
8803 rm -f core conftest.err conftest.$ac_objext \
8804     conftest$ac_exeext conftest.$ac_ext
8805 LIBS=$ac_check_lib_save_LIBS
8806 fi
8807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
8808 $as_echo "$ac_cv_lib_m_main" >&6; }
8809 if test "x$ac_cv_lib_m_main" = xyes; then :
8810   cat >>confdefs.h <<_ACEOF
8811 #define HAVE_LIBM 1
8812 _ACEOF
8813
8814   LIBS="-lm $LIBS"
8815
8816 fi
8817
8818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
8819 $as_echo_n "checking for library containing setproctitle... " >&6; }
8820 if ${ac_cv_search_setproctitle+:} false; then :
8821   $as_echo_n "(cached) " >&6
8822 else
8823   ac_func_search_save_LIBS=$LIBS
8824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8825 /* end confdefs.h.  */
8826
8827 /* Override any GCC internal prototype to avoid an error.
8828    Use char because int might match the return type of a GCC
8829    builtin and then its argument prototype would still apply.  */
8830 #ifdef __cplusplus
8831 extern "C"
8832 #endif
8833 char setproctitle ();
8834 int
8835 main ()
8836 {
8837 return setproctitle ();
8838   ;
8839   return 0;
8840 }
8841 _ACEOF
8842 for ac_lib in '' util; do
8843   if test -z "$ac_lib"; then
8844     ac_res="none required"
8845   else
8846     ac_res=-l$ac_lib
8847     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8848   fi
8849   if ac_fn_c_try_link "$LINENO"; then :
8850   ac_cv_search_setproctitle=$ac_res
8851 fi
8852 rm -f core conftest.err conftest.$ac_objext \
8853     conftest$ac_exeext
8854   if ${ac_cv_search_setproctitle+:} false; then :
8855   break
8856 fi
8857 done
8858 if ${ac_cv_search_setproctitle+:} false; then :
8859
8860 else
8861   ac_cv_search_setproctitle=no
8862 fi
8863 rm conftest.$ac_ext
8864 LIBS=$ac_func_search_save_LIBS
8865 fi
8866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
8867 $as_echo "$ac_cv_search_setproctitle" >&6; }
8868 ac_res=$ac_cv_search_setproctitle
8869 if test "$ac_res" != no; then :
8870   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8871
8872 fi
8873
8874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
8875 $as_echo_n "checking for library containing dlopen... " >&6; }
8876 if ${ac_cv_search_dlopen+:} false; then :
8877   $as_echo_n "(cached) " >&6
8878 else
8879   ac_func_search_save_LIBS=$LIBS
8880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8881 /* end confdefs.h.  */
8882
8883 /* Override any GCC internal prototype to avoid an error.
8884    Use char because int might match the return type of a GCC
8885    builtin and then its argument prototype would still apply.  */
8886 #ifdef __cplusplus
8887 extern "C"
8888 #endif
8889 char dlopen ();
8890 int
8891 main ()
8892 {
8893 return dlopen ();
8894   ;
8895   return 0;
8896 }
8897 _ACEOF
8898 for ac_lib in '' dl; do
8899   if test -z "$ac_lib"; then
8900     ac_res="none required"
8901   else
8902     ac_res=-l$ac_lib
8903     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8904   fi
8905   if ac_fn_c_try_link "$LINENO"; then :
8906   ac_cv_search_dlopen=$ac_res
8907 fi
8908 rm -f core conftest.err conftest.$ac_objext \
8909     conftest$ac_exeext
8910   if ${ac_cv_search_dlopen+:} false; then :
8911   break
8912 fi
8913 done
8914 if ${ac_cv_search_dlopen+:} false; then :
8915
8916 else
8917   ac_cv_search_dlopen=no
8918 fi
8919 rm conftest.$ac_ext
8920 LIBS=$ac_func_search_save_LIBS
8921 fi
8922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
8923 $as_echo "$ac_cv_search_dlopen" >&6; }
8924 ac_res=$ac_cv_search_dlopen
8925 if test "$ac_res" != no; then :
8926   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8927
8928 fi
8929
8930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
8931 $as_echo_n "checking for library containing socket... " >&6; }
8932 if ${ac_cv_search_socket+:} false; then :
8933   $as_echo_n "(cached) " >&6
8934 else
8935   ac_func_search_save_LIBS=$LIBS
8936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8937 /* end confdefs.h.  */
8938
8939 /* Override any GCC internal prototype to avoid an error.
8940    Use char because int might match the return type of a GCC
8941    builtin and then its argument prototype would still apply.  */
8942 #ifdef __cplusplus
8943 extern "C"
8944 #endif
8945 char socket ();
8946 int
8947 main ()
8948 {
8949 return socket ();
8950   ;
8951   return 0;
8952 }
8953 _ACEOF
8954 for ac_lib in '' socket ws2_32; do
8955   if test -z "$ac_lib"; then
8956     ac_res="none required"
8957   else
8958     ac_res=-l$ac_lib
8959     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8960   fi
8961   if ac_fn_c_try_link "$LINENO"; then :
8962   ac_cv_search_socket=$ac_res
8963 fi
8964 rm -f core conftest.err conftest.$ac_objext \
8965     conftest$ac_exeext
8966   if ${ac_cv_search_socket+:} false; then :
8967   break
8968 fi
8969 done
8970 if ${ac_cv_search_socket+:} false; then :
8971
8972 else
8973   ac_cv_search_socket=no
8974 fi
8975 rm conftest.$ac_ext
8976 LIBS=$ac_func_search_save_LIBS
8977 fi
8978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
8979 $as_echo "$ac_cv_search_socket" >&6; }
8980 ac_res=$ac_cv_search_socket
8981 if test "$ac_res" != no; then :
8982   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8983
8984 fi
8985
8986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
8987 $as_echo_n "checking for library containing shl_load... " >&6; }
8988 if ${ac_cv_search_shl_load+:} false; then :
8989   $as_echo_n "(cached) " >&6
8990 else
8991   ac_func_search_save_LIBS=$LIBS
8992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8993 /* end confdefs.h.  */
8994
8995 /* Override any GCC internal prototype to avoid an error.
8996    Use char because int might match the return type of a GCC
8997    builtin and then its argument prototype would still apply.  */
8998 #ifdef __cplusplus
8999 extern "C"
9000 #endif
9001 char shl_load ();
9002 int
9003 main ()
9004 {
9005 return shl_load ();
9006   ;
9007   return 0;
9008 }
9009 _ACEOF
9010 for ac_lib in '' dld; do
9011   if test -z "$ac_lib"; then
9012     ac_res="none required"
9013   else
9014     ac_res=-l$ac_lib
9015     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9016   fi
9017   if ac_fn_c_try_link "$LINENO"; then :
9018   ac_cv_search_shl_load=$ac_res
9019 fi
9020 rm -f core conftest.err conftest.$ac_objext \
9021     conftest$ac_exeext
9022   if ${ac_cv_search_shl_load+:} false; then :
9023   break
9024 fi
9025 done
9026 if ${ac_cv_search_shl_load+:} false; then :
9027
9028 else
9029   ac_cv_search_shl_load=no
9030 fi
9031 rm conftest.$ac_ext
9032 LIBS=$ac_func_search_save_LIBS
9033 fi
9034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
9035 $as_echo "$ac_cv_search_shl_load" >&6; }
9036 ac_res=$ac_cv_search_shl_load
9037 if test "$ac_res" != no; then :
9038   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9039
9040 fi
9041
9042 # We only use libld in port/dynloader/aix.c
9043 case $host_os in
9044      aix*)
9045         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ldopen" >&5
9046 $as_echo_n "checking for library containing ldopen... " >&6; }
9047 if ${ac_cv_search_ldopen+:} false; then :
9048   $as_echo_n "(cached) " >&6
9049 else
9050   ac_func_search_save_LIBS=$LIBS
9051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9052 /* end confdefs.h.  */
9053
9054 /* Override any GCC internal prototype to avoid an error.
9055    Use char because int might match the return type of a GCC
9056    builtin and then its argument prototype would still apply.  */
9057 #ifdef __cplusplus
9058 extern "C"
9059 #endif
9060 char ldopen ();
9061 int
9062 main ()
9063 {
9064 return ldopen ();
9065   ;
9066   return 0;
9067 }
9068 _ACEOF
9069 for ac_lib in '' ld; do
9070   if test -z "$ac_lib"; then
9071     ac_res="none required"
9072   else
9073     ac_res=-l$ac_lib
9074     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9075   fi
9076   if ac_fn_c_try_link "$LINENO"; then :
9077   ac_cv_search_ldopen=$ac_res
9078 fi
9079 rm -f core conftest.err conftest.$ac_objext \
9080     conftest$ac_exeext
9081   if ${ac_cv_search_ldopen+:} false; then :
9082   break
9083 fi
9084 done
9085 if ${ac_cv_search_ldopen+:} false; then :
9086
9087 else
9088   ac_cv_search_ldopen=no
9089 fi
9090 rm conftest.$ac_ext
9091 LIBS=$ac_func_search_save_LIBS
9092 fi
9093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ldopen" >&5
9094 $as_echo "$ac_cv_search_ldopen" >&6; }
9095 ac_res=$ac_cv_search_ldopen
9096 if test "$ac_res" != no; then :
9097   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9098
9099 fi
9100
9101         ;;
9102 esac
9103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
9104 $as_echo_n "checking for library containing getopt_long... " >&6; }
9105 if ${ac_cv_search_getopt_long+:} false; then :
9106   $as_echo_n "(cached) " >&6
9107 else
9108   ac_func_search_save_LIBS=$LIBS
9109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9110 /* end confdefs.h.  */
9111
9112 /* Override any GCC internal prototype to avoid an error.
9113    Use char because int might match the return type of a GCC
9114    builtin and then its argument prototype would still apply.  */
9115 #ifdef __cplusplus
9116 extern "C"
9117 #endif
9118 char getopt_long ();
9119 int
9120 main ()
9121 {
9122 return getopt_long ();
9123   ;
9124   return 0;
9125 }
9126 _ACEOF
9127 for ac_lib in '' getopt gnugetopt; do
9128   if test -z "$ac_lib"; then
9129     ac_res="none required"
9130   else
9131     ac_res=-l$ac_lib
9132     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9133   fi
9134   if ac_fn_c_try_link "$LINENO"; then :
9135   ac_cv_search_getopt_long=$ac_res
9136 fi
9137 rm -f core conftest.err conftest.$ac_objext \
9138     conftest$ac_exeext
9139   if ${ac_cv_search_getopt_long+:} false; then :
9140   break
9141 fi
9142 done
9143 if ${ac_cv_search_getopt_long+:} false; then :
9144
9145 else
9146   ac_cv_search_getopt_long=no
9147 fi
9148 rm conftest.$ac_ext
9149 LIBS=$ac_func_search_save_LIBS
9150 fi
9151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
9152 $as_echo "$ac_cv_search_getopt_long" >&6; }
9153 ac_res=$ac_cv_search_getopt_long
9154 if test "$ac_res" != no; then :
9155   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9156
9157 fi
9158
9159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
9160 $as_echo_n "checking for library containing crypt... " >&6; }
9161 if ${ac_cv_search_crypt+:} 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 crypt ();
9175 int
9176 main ()
9177 {
9178 return crypt ();
9179   ;
9180   return 0;
9181 }
9182 _ACEOF
9183 for ac_lib in '' crypt; 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_crypt=$ac_res
9192 fi
9193 rm -f core conftest.err conftest.$ac_objext \
9194     conftest$ac_exeext
9195   if ${ac_cv_search_crypt+:} false; then :
9196   break
9197 fi
9198 done
9199 if ${ac_cv_search_crypt+:} false; then :
9200
9201 else
9202   ac_cv_search_crypt=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_crypt" >&5
9208 $as_echo "$ac_cv_search_crypt" >&6; }
9209 ac_res=$ac_cv_search_crypt
9210 if test "$ac_res" != no; then :
9211   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9212
9213 fi
9214
9215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
9216 $as_echo_n "checking for library containing shm_open... " >&6; }
9217 if ${ac_cv_search_shm_open+:} false; then :
9218   $as_echo_n "(cached) " >&6
9219 else
9220   ac_func_search_save_LIBS=$LIBS
9221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9222 /* end confdefs.h.  */
9223
9224 /* Override any GCC internal prototype to avoid an error.
9225    Use char because int might match the return type of a GCC
9226    builtin and then its argument prototype would still apply.  */
9227 #ifdef __cplusplus
9228 extern "C"
9229 #endif
9230 char shm_open ();
9231 int
9232 main ()
9233 {
9234 return shm_open ();
9235   ;
9236   return 0;
9237 }
9238 _ACEOF
9239 for ac_lib in '' rt; do
9240   if test -z "$ac_lib"; then
9241     ac_res="none required"
9242   else
9243     ac_res=-l$ac_lib
9244     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9245   fi
9246   if ac_fn_c_try_link "$LINENO"; then :
9247   ac_cv_search_shm_open=$ac_res
9248 fi
9249 rm -f core conftest.err conftest.$ac_objext \
9250     conftest$ac_exeext
9251   if ${ac_cv_search_shm_open+:} false; then :
9252   break
9253 fi
9254 done
9255 if ${ac_cv_search_shm_open+:} false; then :
9256
9257 else
9258   ac_cv_search_shm_open=no
9259 fi
9260 rm conftest.$ac_ext
9261 LIBS=$ac_func_search_save_LIBS
9262 fi
9263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
9264 $as_echo "$ac_cv_search_shm_open" >&6; }
9265 ac_res=$ac_cv_search_shm_open
9266 if test "$ac_res" != no; then :
9267   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9268
9269 fi
9270
9271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
9272 $as_echo_n "checking for library containing shm_unlink... " >&6; }
9273 if ${ac_cv_search_shm_unlink+:} false; then :
9274   $as_echo_n "(cached) " >&6
9275 else
9276   ac_func_search_save_LIBS=$LIBS
9277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9278 /* end confdefs.h.  */
9279
9280 /* Override any GCC internal prototype to avoid an error.
9281    Use char because int might match the return type of a GCC
9282    builtin and then its argument prototype would still apply.  */
9283 #ifdef __cplusplus
9284 extern "C"
9285 #endif
9286 char shm_unlink ();
9287 int
9288 main ()
9289 {
9290 return shm_unlink ();
9291   ;
9292   return 0;
9293 }
9294 _ACEOF
9295 for ac_lib in '' rt; do
9296   if test -z "$ac_lib"; then
9297     ac_res="none required"
9298   else
9299     ac_res=-l$ac_lib
9300     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9301   fi
9302   if ac_fn_c_try_link "$LINENO"; then :
9303   ac_cv_search_shm_unlink=$ac_res
9304 fi
9305 rm -f core conftest.err conftest.$ac_objext \
9306     conftest$ac_exeext
9307   if ${ac_cv_search_shm_unlink+:} false; then :
9308   break
9309 fi
9310 done
9311 if ${ac_cv_search_shm_unlink+:} false; then :
9312
9313 else
9314   ac_cv_search_shm_unlink=no
9315 fi
9316 rm conftest.$ac_ext
9317 LIBS=$ac_func_search_save_LIBS
9318 fi
9319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
9320 $as_echo "$ac_cv_search_shm_unlink" >&6; }
9321 ac_res=$ac_cv_search_shm_unlink
9322 if test "$ac_res" != no; then :
9323   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9324
9325 fi
9326
9327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
9328 $as_echo_n "checking for library containing clock_gettime... " >&6; }
9329 if ${ac_cv_search_clock_gettime+:} false; then :
9330   $as_echo_n "(cached) " >&6
9331 else
9332   ac_func_search_save_LIBS=$LIBS
9333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9334 /* end confdefs.h.  */
9335
9336 /* Override any GCC internal prototype to avoid an error.
9337    Use char because int might match the return type of a GCC
9338    builtin and then its argument prototype would still apply.  */
9339 #ifdef __cplusplus
9340 extern "C"
9341 #endif
9342 char clock_gettime ();
9343 int
9344 main ()
9345 {
9346 return clock_gettime ();
9347   ;
9348   return 0;
9349 }
9350 _ACEOF
9351 for ac_lib in '' rt posix4; do
9352   if test -z "$ac_lib"; then
9353     ac_res="none required"
9354   else
9355     ac_res=-l$ac_lib
9356     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9357   fi
9358   if ac_fn_c_try_link "$LINENO"; then :
9359   ac_cv_search_clock_gettime=$ac_res
9360 fi
9361 rm -f core conftest.err conftest.$ac_objext \
9362     conftest$ac_exeext
9363   if ${ac_cv_search_clock_gettime+:} false; then :
9364   break
9365 fi
9366 done
9367 if ${ac_cv_search_clock_gettime+:} false; then :
9368
9369 else
9370   ac_cv_search_clock_gettime=no
9371 fi
9372 rm conftest.$ac_ext
9373 LIBS=$ac_func_search_save_LIBS
9374 fi
9375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
9376 $as_echo "$ac_cv_search_clock_gettime" >&6; }
9377 ac_res=$ac_cv_search_clock_gettime
9378 if test "$ac_res" != no; then :
9379   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9380
9381 fi
9382
9383 # Solaris:
9384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
9385 $as_echo_n "checking for library containing fdatasync... " >&6; }
9386 if ${ac_cv_search_fdatasync+:} false; then :
9387   $as_echo_n "(cached) " >&6
9388 else
9389   ac_func_search_save_LIBS=$LIBS
9390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9391 /* end confdefs.h.  */
9392
9393 /* Override any GCC internal prototype to avoid an error.
9394    Use char because int might match the return type of a GCC
9395    builtin and then its argument prototype would still apply.  */
9396 #ifdef __cplusplus
9397 extern "C"
9398 #endif
9399 char fdatasync ();
9400 int
9401 main ()
9402 {
9403 return fdatasync ();
9404   ;
9405   return 0;
9406 }
9407 _ACEOF
9408 for ac_lib in '' rt posix4; do
9409   if test -z "$ac_lib"; then
9410     ac_res="none required"
9411   else
9412     ac_res=-l$ac_lib
9413     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9414   fi
9415   if ac_fn_c_try_link "$LINENO"; then :
9416   ac_cv_search_fdatasync=$ac_res
9417 fi
9418 rm -f core conftest.err conftest.$ac_objext \
9419     conftest$ac_exeext
9420   if ${ac_cv_search_fdatasync+:} false; then :
9421   break
9422 fi
9423 done
9424 if ${ac_cv_search_fdatasync+:} false; then :
9425
9426 else
9427   ac_cv_search_fdatasync=no
9428 fi
9429 rm conftest.$ac_ext
9430 LIBS=$ac_func_search_save_LIBS
9431 fi
9432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
9433 $as_echo "$ac_cv_search_fdatasync" >&6; }
9434 ac_res=$ac_cv_search_fdatasync
9435 if test "$ac_res" != no; then :
9436   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9437
9438 fi
9439
9440 # Required for thread_test.c on Solaris
9441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sched_yield" >&5
9442 $as_echo_n "checking for library containing sched_yield... " >&6; }
9443 if ${ac_cv_search_sched_yield+:} false; then :
9444   $as_echo_n "(cached) " >&6
9445 else
9446   ac_func_search_save_LIBS=$LIBS
9447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9448 /* end confdefs.h.  */
9449
9450 /* Override any GCC internal prototype to avoid an error.
9451    Use char because int might match the return type of a GCC
9452    builtin and then its argument prototype would still apply.  */
9453 #ifdef __cplusplus
9454 extern "C"
9455 #endif
9456 char sched_yield ();
9457 int
9458 main ()
9459 {
9460 return sched_yield ();
9461   ;
9462   return 0;
9463 }
9464 _ACEOF
9465 for ac_lib in '' rt; do
9466   if test -z "$ac_lib"; then
9467     ac_res="none required"
9468   else
9469     ac_res=-l$ac_lib
9470     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9471   fi
9472   if ac_fn_c_try_link "$LINENO"; then :
9473   ac_cv_search_sched_yield=$ac_res
9474 fi
9475 rm -f core conftest.err conftest.$ac_objext \
9476     conftest$ac_exeext
9477   if ${ac_cv_search_sched_yield+:} false; then :
9478   break
9479 fi
9480 done
9481 if ${ac_cv_search_sched_yield+:} false; then :
9482
9483 else
9484   ac_cv_search_sched_yield=no
9485 fi
9486 rm conftest.$ac_ext
9487 LIBS=$ac_func_search_save_LIBS
9488 fi
9489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sched_yield" >&5
9490 $as_echo "$ac_cv_search_sched_yield" >&6; }
9491 ac_res=$ac_cv_search_sched_yield
9492 if test "$ac_res" != no; then :
9493   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9494
9495 fi
9496
9497 # Required for thread_test.c on Solaris 2.5:
9498 # Other ports use it too (HP-UX) so test unconditionally
9499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
9500 $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
9501 if ${ac_cv_search_gethostbyname_r+:} false; then :
9502   $as_echo_n "(cached) " >&6
9503 else
9504   ac_func_search_save_LIBS=$LIBS
9505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9506 /* end confdefs.h.  */
9507
9508 /* Override any GCC internal prototype to avoid an error.
9509    Use char because int might match the return type of a GCC
9510    builtin and then its argument prototype would still apply.  */
9511 #ifdef __cplusplus
9512 extern "C"
9513 #endif
9514 char gethostbyname_r ();
9515 int
9516 main ()
9517 {
9518 return gethostbyname_r ();
9519   ;
9520   return 0;
9521 }
9522 _ACEOF
9523 for ac_lib in '' nsl; do
9524   if test -z "$ac_lib"; then
9525     ac_res="none required"
9526   else
9527     ac_res=-l$ac_lib
9528     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9529   fi
9530   if ac_fn_c_try_link "$LINENO"; then :
9531   ac_cv_search_gethostbyname_r=$ac_res
9532 fi
9533 rm -f core conftest.err conftest.$ac_objext \
9534     conftest$ac_exeext
9535   if ${ac_cv_search_gethostbyname_r+:} false; then :
9536   break
9537 fi
9538 done
9539 if ${ac_cv_search_gethostbyname_r+:} false; then :
9540
9541 else
9542   ac_cv_search_gethostbyname_r=no
9543 fi
9544 rm conftest.$ac_ext
9545 LIBS=$ac_func_search_save_LIBS
9546 fi
9547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
9548 $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
9549 ac_res=$ac_cv_search_gethostbyname_r
9550 if test "$ac_res" != no; then :
9551   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9552
9553 fi
9554
9555 # Cygwin:
9556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
9557 $as_echo_n "checking for library containing shmget... " >&6; }
9558 if ${ac_cv_search_shmget+:} false; then :
9559   $as_echo_n "(cached) " >&6
9560 else
9561   ac_func_search_save_LIBS=$LIBS
9562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9563 /* end confdefs.h.  */
9564
9565 /* Override any GCC internal prototype to avoid an error.
9566    Use char because int might match the return type of a GCC
9567    builtin and then its argument prototype would still apply.  */
9568 #ifdef __cplusplus
9569 extern "C"
9570 #endif
9571 char shmget ();
9572 int
9573 main ()
9574 {
9575 return shmget ();
9576   ;
9577   return 0;
9578 }
9579 _ACEOF
9580 for ac_lib in '' cygipc; do
9581   if test -z "$ac_lib"; then
9582     ac_res="none required"
9583   else
9584     ac_res=-l$ac_lib
9585     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9586   fi
9587   if ac_fn_c_try_link "$LINENO"; then :
9588   ac_cv_search_shmget=$ac_res
9589 fi
9590 rm -f core conftest.err conftest.$ac_objext \
9591     conftest$ac_exeext
9592   if ${ac_cv_search_shmget+:} false; then :
9593   break
9594 fi
9595 done
9596 if ${ac_cv_search_shmget+:} false; then :
9597
9598 else
9599   ac_cv_search_shmget=no
9600 fi
9601 rm conftest.$ac_ext
9602 LIBS=$ac_func_search_save_LIBS
9603 fi
9604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
9605 $as_echo "$ac_cv_search_shmget" >&6; }
9606 ac_res=$ac_cv_search_shmget
9607 if test "$ac_res" != no; then :
9608   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9609
9610 fi
9611
9612
9613 if test "$with_readline" = yes; then
9614
9615
9616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
9617 $as_echo_n "checking for library containing readline... " >&6; }
9618 if ${pgac_cv_check_readline+:} false; then :
9619   $as_echo_n "(cached) " >&6
9620 else
9621   pgac_cv_check_readline=no
9622 pgac_save_LIBS=$LIBS
9623 if test x"$with_libedit_preferred" != x"yes"
9624 then    READLINE_ORDER="-lreadline -ledit"
9625 else    READLINE_ORDER="-ledit -lreadline"
9626 fi
9627 for pgac_rllib in $READLINE_ORDER ; do
9628   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
9629     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
9630     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9631 /* end confdefs.h.  */
9632
9633 /* Override any GCC internal prototype to avoid an error.
9634    Use char because int might match the return type of a GCC
9635    builtin and then its argument prototype would still apply.  */
9636 #ifdef __cplusplus
9637 extern "C"
9638 #endif
9639 char readline ();
9640 int
9641 main ()
9642 {
9643 return readline ();
9644   ;
9645   return 0;
9646 }
9647 _ACEOF
9648 if ac_fn_c_try_link "$LINENO"; then :
9649
9650       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
9651       # recognize dependent libraries; assume curses is needed if we didn't
9652       # find any dependency.
9653       case $host_os in
9654         netbsd* | openbsd* | irix*)
9655           if test x"$pgac_lib" = x"" ; then
9656             pgac_lib=" -lcurses"
9657           fi ;;
9658       esac
9659
9660       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
9661       break
9662
9663 fi
9664 rm -f core conftest.err conftest.$ac_objext \
9665     conftest$ac_exeext conftest.$ac_ext
9666   done
9667   if test "$pgac_cv_check_readline" != no ; then
9668     break
9669   fi
9670 done
9671 LIBS=$pgac_save_LIBS
9672
9673 fi
9674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
9675 $as_echo "$pgac_cv_check_readline" >&6; }
9676 if test "$pgac_cv_check_readline" != no ; then
9677   LIBS="$pgac_cv_check_readline $LIBS"
9678
9679 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
9680
9681 fi
9682
9683
9684   if test x"$pgac_cv_check_readline" = x"no"; then
9685     as_fn_error $? "readline library not found
9686 If you have readline already installed, see config.log for details on the
9687 failure.  It is possible the compiler isn't looking in the proper directory.
9688 Use --without-readline to disable readline support." "$LINENO" 5
9689   fi
9690 fi
9691
9692 if test "$with_zlib" = yes; then
9693   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
9694 $as_echo_n "checking for inflate in -lz... " >&6; }
9695 if ${ac_cv_lib_z_inflate+:} false; then :
9696   $as_echo_n "(cached) " >&6
9697 else
9698   ac_check_lib_save_LIBS=$LIBS
9699 LIBS="-lz  $LIBS"
9700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9701 /* end confdefs.h.  */
9702
9703 /* Override any GCC internal prototype to avoid an error.
9704    Use char because int might match the return type of a GCC
9705    builtin and then its argument prototype would still apply.  */
9706 #ifdef __cplusplus
9707 extern "C"
9708 #endif
9709 char inflate ();
9710 int
9711 main ()
9712 {
9713 return inflate ();
9714   ;
9715   return 0;
9716 }
9717 _ACEOF
9718 if ac_fn_c_try_link "$LINENO"; then :
9719   ac_cv_lib_z_inflate=yes
9720 else
9721   ac_cv_lib_z_inflate=no
9722 fi
9723 rm -f core conftest.err conftest.$ac_objext \
9724     conftest$ac_exeext conftest.$ac_ext
9725 LIBS=$ac_check_lib_save_LIBS
9726 fi
9727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
9728 $as_echo "$ac_cv_lib_z_inflate" >&6; }
9729 if test "x$ac_cv_lib_z_inflate" = xyes; then :
9730   cat >>confdefs.h <<_ACEOF
9731 #define HAVE_LIBZ 1
9732 _ACEOF
9733
9734   LIBS="-lz $LIBS"
9735
9736 else
9737   as_fn_error $? "zlib library not found
9738 If you have zlib already installed, see config.log for details on the
9739 failure.  It is possible the compiler isn't looking in the proper directory.
9740 Use --without-zlib to disable zlib support." "$LINENO" 5
9741 fi
9742
9743 fi
9744
9745 if test "$enable_spinlocks" = yes; then
9746
9747 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
9748
9749 else
9750   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9751 *** Not using spinlocks will cause poor performance." >&5
9752 $as_echo "$as_me: WARNING:
9753 *** Not using spinlocks will cause poor performance." >&2;}
9754 fi
9755
9756 if test "$enable_atomics" = yes; then
9757
9758 $as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
9759
9760 else
9761   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9762 *** Not using atomic operations will cause poor performance." >&5
9763 $as_echo "$as_me: WARNING:
9764 *** Not using atomic operations will cause poor performance." >&2;}
9765 fi
9766
9767 if test "$with_gssapi" = yes ; then
9768   if test "$PORTNAME" != "win32"; then
9769     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
9770 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
9771 if ${ac_cv_search_gss_init_sec_context+:} false; then :
9772   $as_echo_n "(cached) " >&6
9773 else
9774   ac_func_search_save_LIBS=$LIBS
9775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9776 /* end confdefs.h.  */
9777
9778 /* Override any GCC internal prototype to avoid an error.
9779    Use char because int might match the return type of a GCC
9780    builtin and then its argument prototype would still apply.  */
9781 #ifdef __cplusplus
9782 extern "C"
9783 #endif
9784 char gss_init_sec_context ();
9785 int
9786 main ()
9787 {
9788 return gss_init_sec_context ();
9789   ;
9790   return 0;
9791 }
9792 _ACEOF
9793 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
9794   if test -z "$ac_lib"; then
9795     ac_res="none required"
9796   else
9797     ac_res=-l$ac_lib
9798     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9799   fi
9800   if ac_fn_c_try_link "$LINENO"; then :
9801   ac_cv_search_gss_init_sec_context=$ac_res
9802 fi
9803 rm -f core conftest.err conftest.$ac_objext \
9804     conftest$ac_exeext
9805   if ${ac_cv_search_gss_init_sec_context+:} false; then :
9806   break
9807 fi
9808 done
9809 if ${ac_cv_search_gss_init_sec_context+:} false; then :
9810
9811 else
9812   ac_cv_search_gss_init_sec_context=no
9813 fi
9814 rm conftest.$ac_ext
9815 LIBS=$ac_func_search_save_LIBS
9816 fi
9817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
9818 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
9819 ac_res=$ac_cv_search_gss_init_sec_context
9820 if test "$ac_res" != no; then :
9821   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9822
9823 else
9824   as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
9825 fi
9826
9827   else
9828     LIBS="$LIBS -lgssapi32"
9829   fi
9830 fi
9831
9832 if test "$with_openssl" = yes ; then
9833     if test "$PORTNAME" != "win32"; then
9834      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
9835 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
9836 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
9837   $as_echo_n "(cached) " >&6
9838 else
9839   ac_check_lib_save_LIBS=$LIBS
9840 LIBS="-lcrypto  $LIBS"
9841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9842 /* end confdefs.h.  */
9843
9844 /* Override any GCC internal prototype to avoid an error.
9845    Use char because int might match the return type of a GCC
9846    builtin and then its argument prototype would still apply.  */
9847 #ifdef __cplusplus
9848 extern "C"
9849 #endif
9850 char CRYPTO_new_ex_data ();
9851 int
9852 main ()
9853 {
9854 return CRYPTO_new_ex_data ();
9855   ;
9856   return 0;
9857 }
9858 _ACEOF
9859 if ac_fn_c_try_link "$LINENO"; then :
9860   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
9861 else
9862   ac_cv_lib_crypto_CRYPTO_new_ex_data=no
9863 fi
9864 rm -f core conftest.err conftest.$ac_objext \
9865     conftest$ac_exeext conftest.$ac_ext
9866 LIBS=$ac_check_lib_save_LIBS
9867 fi
9868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
9869 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
9870 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
9871   cat >>confdefs.h <<_ACEOF
9872 #define HAVE_LIBCRYPTO 1
9873 _ACEOF
9874
9875   LIBS="-lcrypto $LIBS"
9876
9877 else
9878   as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
9879 fi
9880
9881      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
9882 $as_echo_n "checking for SSL_new in -lssl... " >&6; }
9883 if ${ac_cv_lib_ssl_SSL_new+:} false; then :
9884   $as_echo_n "(cached) " >&6
9885 else
9886   ac_check_lib_save_LIBS=$LIBS
9887 LIBS="-lssl  $LIBS"
9888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9889 /* end confdefs.h.  */
9890
9891 /* Override any GCC internal prototype to avoid an error.
9892    Use char because int might match the return type of a GCC
9893    builtin and then its argument prototype would still apply.  */
9894 #ifdef __cplusplus
9895 extern "C"
9896 #endif
9897 char SSL_new ();
9898 int
9899 main ()
9900 {
9901 return SSL_new ();
9902   ;
9903   return 0;
9904 }
9905 _ACEOF
9906 if ac_fn_c_try_link "$LINENO"; then :
9907   ac_cv_lib_ssl_SSL_new=yes
9908 else
9909   ac_cv_lib_ssl_SSL_new=no
9910 fi
9911 rm -f core conftest.err conftest.$ac_objext \
9912     conftest$ac_exeext conftest.$ac_ext
9913 LIBS=$ac_check_lib_save_LIBS
9914 fi
9915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
9916 $as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
9917 if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
9918   cat >>confdefs.h <<_ACEOF
9919 #define HAVE_LIBSSL 1
9920 _ACEOF
9921
9922   LIBS="-lssl $LIBS"
9923
9924 else
9925   as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
9926 fi
9927
9928   else
9929      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
9930 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
9931 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
9932   $as_echo_n "(cached) " >&6
9933 else
9934   ac_func_search_save_LIBS=$LIBS
9935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9936 /* end confdefs.h.  */
9937
9938 /* Override any GCC internal prototype to avoid an error.
9939    Use char because int might match the return type of a GCC
9940    builtin and then its argument prototype would still apply.  */
9941 #ifdef __cplusplus
9942 extern "C"
9943 #endif
9944 char CRYPTO_new_ex_data ();
9945 int
9946 main ()
9947 {
9948 return CRYPTO_new_ex_data ();
9949   ;
9950   return 0;
9951 }
9952 _ACEOF
9953 for ac_lib in '' eay32 crypto; do
9954   if test -z "$ac_lib"; then
9955     ac_res="none required"
9956   else
9957     ac_res=-l$ac_lib
9958     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9959   fi
9960   if ac_fn_c_try_link "$LINENO"; then :
9961   ac_cv_search_CRYPTO_new_ex_data=$ac_res
9962 fi
9963 rm -f core conftest.err conftest.$ac_objext \
9964     conftest$ac_exeext
9965   if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
9966   break
9967 fi
9968 done
9969 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
9970
9971 else
9972   ac_cv_search_CRYPTO_new_ex_data=no
9973 fi
9974 rm conftest.$ac_ext
9975 LIBS=$ac_func_search_save_LIBS
9976 fi
9977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
9978 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
9979 ac_res=$ac_cv_search_CRYPTO_new_ex_data
9980 if test "$ac_res" != no; then :
9981   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9982
9983 else
9984   as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
9985 fi
9986
9987      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
9988 $as_echo_n "checking for library containing SSL_new... " >&6; }
9989 if ${ac_cv_search_SSL_new+:} false; then :
9990   $as_echo_n "(cached) " >&6
9991 else
9992   ac_func_search_save_LIBS=$LIBS
9993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9994 /* end confdefs.h.  */
9995
9996 /* Override any GCC internal prototype to avoid an error.
9997    Use char because int might match the return type of a GCC
9998    builtin and then its argument prototype would still apply.  */
9999 #ifdef __cplusplus
10000 extern "C"
10001 #endif
10002 char SSL_new ();
10003 int
10004 main ()
10005 {
10006 return SSL_new ();
10007   ;
10008   return 0;
10009 }
10010 _ACEOF
10011 for ac_lib in '' ssleay32 ssl; do
10012   if test -z "$ac_lib"; then
10013     ac_res="none required"
10014   else
10015     ac_res=-l$ac_lib
10016     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10017   fi
10018   if ac_fn_c_try_link "$LINENO"; then :
10019   ac_cv_search_SSL_new=$ac_res
10020 fi
10021 rm -f core conftest.err conftest.$ac_objext \
10022     conftest$ac_exeext
10023   if ${ac_cv_search_SSL_new+:} false; then :
10024   break
10025 fi
10026 done
10027 if ${ac_cv_search_SSL_new+:} false; then :
10028
10029 else
10030   ac_cv_search_SSL_new=no
10031 fi
10032 rm conftest.$ac_ext
10033 LIBS=$ac_func_search_save_LIBS
10034 fi
10035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
10036 $as_echo "$ac_cv_search_SSL_new" >&6; }
10037 ac_res=$ac_cv_search_SSL_new
10038 if test "$ac_res" != no; then :
10039   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10040
10041 else
10042   as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
10043 fi
10044
10045   fi
10046   for ac_func in SSL_get_current_compression
10047 do :
10048   ac_fn_c_check_func "$LINENO" "SSL_get_current_compression" "ac_cv_func_SSL_get_current_compression"
10049 if test "x$ac_cv_func_SSL_get_current_compression" = xyes; then :
10050   cat >>confdefs.h <<_ACEOF
10051 #define HAVE_SSL_GET_CURRENT_COMPRESSION 1
10052 _ACEOF
10053
10054 fi
10055 done
10056
10057   # Functions introduced in OpenSSL 1.1.0. We used to check for
10058   # OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
10059   # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
10060   # doesn't have these OpenSSL 1.1.0 functions. So check for individual
10061   # functions.
10062   for ac_func in OPENSSL_init_ssl BIO_get_data BIO_meth_new ASN1_STRING_get0_data RAND_OpenSSL
10063 do :
10064   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10065 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10066 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10067   cat >>confdefs.h <<_ACEOF
10068 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10069 _ACEOF
10070
10071 fi
10072 done
10073
10074   # OpenSSL versions before 1.1.0 required setting callback functions, for
10075   # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
10076   # function was removed.
10077   for ac_func in CRYPTO_lock
10078 do :
10079   ac_fn_c_check_func "$LINENO" "CRYPTO_lock" "ac_cv_func_CRYPTO_lock"
10080 if test "x$ac_cv_func_CRYPTO_lock" = xyes; then :
10081   cat >>confdefs.h <<_ACEOF
10082 #define HAVE_CRYPTO_LOCK 1
10083 _ACEOF
10084
10085 fi
10086 done
10087
10088 fi
10089
10090 if test "$with_pam" = yes ; then
10091   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
10092 $as_echo_n "checking for pam_start in -lpam... " >&6; }
10093 if ${ac_cv_lib_pam_pam_start+:} false; then :
10094   $as_echo_n "(cached) " >&6
10095 else
10096   ac_check_lib_save_LIBS=$LIBS
10097 LIBS="-lpam  $LIBS"
10098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10099 /* end confdefs.h.  */
10100
10101 /* Override any GCC internal prototype to avoid an error.
10102    Use char because int might match the return type of a GCC
10103    builtin and then its argument prototype would still apply.  */
10104 #ifdef __cplusplus
10105 extern "C"
10106 #endif
10107 char pam_start ();
10108 int
10109 main ()
10110 {
10111 return pam_start ();
10112   ;
10113   return 0;
10114 }
10115 _ACEOF
10116 if ac_fn_c_try_link "$LINENO"; then :
10117   ac_cv_lib_pam_pam_start=yes
10118 else
10119   ac_cv_lib_pam_pam_start=no
10120 fi
10121 rm -f core conftest.err conftest.$ac_objext \
10122     conftest$ac_exeext conftest.$ac_ext
10123 LIBS=$ac_check_lib_save_LIBS
10124 fi
10125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
10126 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
10127 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
10128   cat >>confdefs.h <<_ACEOF
10129 #define HAVE_LIBPAM 1
10130 _ACEOF
10131
10132   LIBS="-lpam $LIBS"
10133
10134 else
10135   as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
10136 fi
10137
10138 fi
10139
10140 if test "$with_libxml" = yes ; then
10141   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
10142 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
10143 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
10144   $as_echo_n "(cached) " >&6
10145 else
10146   ac_check_lib_save_LIBS=$LIBS
10147 LIBS="-lxml2  $LIBS"
10148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10149 /* end confdefs.h.  */
10150
10151 /* Override any GCC internal prototype to avoid an error.
10152    Use char because int might match the return type of a GCC
10153    builtin and then its argument prototype would still apply.  */
10154 #ifdef __cplusplus
10155 extern "C"
10156 #endif
10157 char xmlSaveToBuffer ();
10158 int
10159 main ()
10160 {
10161 return xmlSaveToBuffer ();
10162   ;
10163   return 0;
10164 }
10165 _ACEOF
10166 if ac_fn_c_try_link "$LINENO"; then :
10167   ac_cv_lib_xml2_xmlSaveToBuffer=yes
10168 else
10169   ac_cv_lib_xml2_xmlSaveToBuffer=no
10170 fi
10171 rm -f core conftest.err conftest.$ac_objext \
10172     conftest$ac_exeext conftest.$ac_ext
10173 LIBS=$ac_check_lib_save_LIBS
10174 fi
10175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
10176 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
10177 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
10178   cat >>confdefs.h <<_ACEOF
10179 #define HAVE_LIBXML2 1
10180 _ACEOF
10181
10182   LIBS="-lxml2 $LIBS"
10183
10184 else
10185   as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
10186 fi
10187
10188 fi
10189
10190 if test "$with_libxslt" = yes ; then
10191   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
10192 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
10193 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
10194   $as_echo_n "(cached) " >&6
10195 else
10196   ac_check_lib_save_LIBS=$LIBS
10197 LIBS="-lxslt  $LIBS"
10198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10199 /* end confdefs.h.  */
10200
10201 /* Override any GCC internal prototype to avoid an error.
10202    Use char because int might match the return type of a GCC
10203    builtin and then its argument prototype would still apply.  */
10204 #ifdef __cplusplus
10205 extern "C"
10206 #endif
10207 char xsltCleanupGlobals ();
10208 int
10209 main ()
10210 {
10211 return xsltCleanupGlobals ();
10212   ;
10213   return 0;
10214 }
10215 _ACEOF
10216 if ac_fn_c_try_link "$LINENO"; then :
10217   ac_cv_lib_xslt_xsltCleanupGlobals=yes
10218 else
10219   ac_cv_lib_xslt_xsltCleanupGlobals=no
10220 fi
10221 rm -f core conftest.err conftest.$ac_objext \
10222     conftest$ac_exeext conftest.$ac_ext
10223 LIBS=$ac_check_lib_save_LIBS
10224 fi
10225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
10226 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
10227 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
10228   cat >>confdefs.h <<_ACEOF
10229 #define HAVE_LIBXSLT 1
10230 _ACEOF
10231
10232   LIBS="-lxslt $LIBS"
10233
10234 else
10235   as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
10236 fi
10237
10238 fi
10239
10240 # Note: We can test for libldap_r only after we know PTHREAD_LIBS
10241 if test "$with_ldap" = yes ; then
10242   _LIBS="$LIBS"
10243   if test "$PORTNAME" != "win32"; then
10244     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
10245 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
10246 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
10247   $as_echo_n "(cached) " >&6
10248 else
10249   ac_check_lib_save_LIBS=$LIBS
10250 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
10251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10252 /* end confdefs.h.  */
10253
10254 /* Override any GCC internal prototype to avoid an error.
10255    Use char because int might match the return type of a GCC
10256    builtin and then its argument prototype would still apply.  */
10257 #ifdef __cplusplus
10258 extern "C"
10259 #endif
10260 char ldap_bind ();
10261 int
10262 main ()
10263 {
10264 return ldap_bind ();
10265   ;
10266   return 0;
10267 }
10268 _ACEOF
10269 if ac_fn_c_try_link "$LINENO"; then :
10270   ac_cv_lib_ldap_ldap_bind=yes
10271 else
10272   ac_cv_lib_ldap_ldap_bind=no
10273 fi
10274 rm -f core conftest.err conftest.$ac_objext \
10275     conftest$ac_exeext conftest.$ac_ext
10276 LIBS=$ac_check_lib_save_LIBS
10277 fi
10278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
10279 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
10280 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
10281   cat >>confdefs.h <<_ACEOF
10282 #define HAVE_LIBLDAP 1
10283 _ACEOF
10284
10285   LIBS="-lldap $LIBS"
10286
10287 else
10288   as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
10289 fi
10290
10291     LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
10292     if test "$enable_thread_safety" = yes; then
10293       # on some platforms ldap_r fails to link without PTHREAD_LIBS
10294       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_simple_bind in -lldap_r" >&5
10295 $as_echo_n "checking for ldap_simple_bind in -lldap_r... " >&6; }
10296 if ${ac_cv_lib_ldap_r_ldap_simple_bind+:} false; then :
10297   $as_echo_n "(cached) " >&6
10298 else
10299   ac_check_lib_save_LIBS=$LIBS
10300 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
10301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10302 /* end confdefs.h.  */
10303
10304 /* Override any GCC internal prototype to avoid an error.
10305    Use char because int might match the return type of a GCC
10306    builtin and then its argument prototype would still apply.  */
10307 #ifdef __cplusplus
10308 extern "C"
10309 #endif
10310 char ldap_simple_bind ();
10311 int
10312 main ()
10313 {
10314 return ldap_simple_bind ();
10315   ;
10316   return 0;
10317 }
10318 _ACEOF
10319 if ac_fn_c_try_link "$LINENO"; then :
10320   ac_cv_lib_ldap_r_ldap_simple_bind=yes
10321 else
10322   ac_cv_lib_ldap_r_ldap_simple_bind=no
10323 fi
10324 rm -f core conftest.err conftest.$ac_objext \
10325     conftest$ac_exeext conftest.$ac_ext
10326 LIBS=$ac_check_lib_save_LIBS
10327 fi
10328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
10329 $as_echo "$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
10330 if test "x$ac_cv_lib_ldap_r_ldap_simple_bind" = xyes; then :
10331   cat >>confdefs.h <<_ACEOF
10332 #define HAVE_LIBLDAP_R 1
10333 _ACEOF
10334
10335   LIBS="-lldap_r $LIBS"
10336
10337 else
10338   as_fn_error $? "library 'ldap_r' is required for LDAP" "$LINENO" 5
10339 fi
10340
10341       LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
10342     else
10343       LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
10344     fi
10345   else
10346     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
10347 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
10348 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
10349   $as_echo_n "(cached) " >&6
10350 else
10351   ac_check_lib_save_LIBS=$LIBS
10352 LIBS="-lwldap32  $LIBS"
10353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10354 /* end confdefs.h.  */
10355
10356 /* Override any GCC internal prototype to avoid an error.
10357    Use char because int might match the return type of a GCC
10358    builtin and then its argument prototype would still apply.  */
10359 #ifdef __cplusplus
10360 extern "C"
10361 #endif
10362 char ldap_bind ();
10363 int
10364 main ()
10365 {
10366 return ldap_bind ();
10367   ;
10368   return 0;
10369 }
10370 _ACEOF
10371 if ac_fn_c_try_link "$LINENO"; then :
10372   ac_cv_lib_wldap32_ldap_bind=yes
10373 else
10374   ac_cv_lib_wldap32_ldap_bind=no
10375 fi
10376 rm -f core conftest.err conftest.$ac_objext \
10377     conftest$ac_exeext conftest.$ac_ext
10378 LIBS=$ac_check_lib_save_LIBS
10379 fi
10380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
10381 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
10382 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
10383   cat >>confdefs.h <<_ACEOF
10384 #define HAVE_LIBWLDAP32 1
10385 _ACEOF
10386
10387   LIBS="-lwldap32 $LIBS"
10388
10389 else
10390   as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
10391 fi
10392
10393     LDAP_LIBS_FE="-lwldap32"
10394     LDAP_LIBS_BE="-lwldap32"
10395   fi
10396   LIBS="$_LIBS"
10397 fi
10398
10399
10400
10401 # for contrib/sepgsql
10402 if test "$with_selinux" = yes; then
10403   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
10404 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
10405 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
10406   $as_echo_n "(cached) " >&6
10407 else
10408   ac_check_lib_save_LIBS=$LIBS
10409 LIBS="-lselinux  $LIBS"
10410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10411 /* end confdefs.h.  */
10412
10413 /* Override any GCC internal prototype to avoid an error.
10414    Use char because int might match the return type of a GCC
10415    builtin and then its argument prototype would still apply.  */
10416 #ifdef __cplusplus
10417 extern "C"
10418 #endif
10419 char security_compute_create_name ();
10420 int
10421 main ()
10422 {
10423 return security_compute_create_name ();
10424   ;
10425   return 0;
10426 }
10427 _ACEOF
10428 if ac_fn_c_try_link "$LINENO"; then :
10429   ac_cv_lib_selinux_security_compute_create_name=yes
10430 else
10431   ac_cv_lib_selinux_security_compute_create_name=no
10432 fi
10433 rm -f core conftest.err conftest.$ac_objext \
10434     conftest$ac_exeext conftest.$ac_ext
10435 LIBS=$ac_check_lib_save_LIBS
10436 fi
10437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
10438 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
10439 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
10440   cat >>confdefs.h <<_ACEOF
10441 #define HAVE_LIBSELINUX 1
10442 _ACEOF
10443
10444   LIBS="-lselinux $LIBS"
10445
10446 else
10447   as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
10448 fi
10449
10450 fi
10451
10452 # for contrib/uuid-ossp
10453 if test "$with_uuid" = bsd ; then
10454   # On BSD, the UUID functions are in libc
10455   ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
10456 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
10457   UUID_LIBS=""
10458 else
10459   as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
10460 fi
10461
10462 elif test "$with_uuid" = e2fs ; then
10463   # On macOS, the UUID functions are in libc
10464   ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
10465 if test "x$ac_cv_func_uuid_generate" = xyes; then :
10466   UUID_LIBS=""
10467 else
10468   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
10469 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
10470 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
10471   $as_echo_n "(cached) " >&6
10472 else
10473   ac_check_lib_save_LIBS=$LIBS
10474 LIBS="-luuid  $LIBS"
10475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10476 /* end confdefs.h.  */
10477
10478 /* Override any GCC internal prototype to avoid an error.
10479    Use char because int might match the return type of a GCC
10480    builtin and then its argument prototype would still apply.  */
10481 #ifdef __cplusplus
10482 extern "C"
10483 #endif
10484 char uuid_generate ();
10485 int
10486 main ()
10487 {
10488 return uuid_generate ();
10489   ;
10490   return 0;
10491 }
10492 _ACEOF
10493 if ac_fn_c_try_link "$LINENO"; then :
10494   ac_cv_lib_uuid_uuid_generate=yes
10495 else
10496   ac_cv_lib_uuid_uuid_generate=no
10497 fi
10498 rm -f core conftest.err conftest.$ac_objext \
10499     conftest$ac_exeext conftest.$ac_ext
10500 LIBS=$ac_check_lib_save_LIBS
10501 fi
10502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
10503 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
10504 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
10505   UUID_LIBS="-luuid"
10506 else
10507   as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
10508 fi
10509
10510 fi
10511
10512 elif test "$with_uuid" = ossp ; then
10513   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
10514 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
10515 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
10516   $as_echo_n "(cached) " >&6
10517 else
10518   ac_check_lib_save_LIBS=$LIBS
10519 LIBS="-lossp-uuid  $LIBS"
10520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10521 /* end confdefs.h.  */
10522
10523 /* Override any GCC internal prototype to avoid an error.
10524    Use char because int might match the return type of a GCC
10525    builtin and then its argument prototype would still apply.  */
10526 #ifdef __cplusplus
10527 extern "C"
10528 #endif
10529 char uuid_export ();
10530 int
10531 main ()
10532 {
10533 return uuid_export ();
10534   ;
10535   return 0;
10536 }
10537 _ACEOF
10538 if ac_fn_c_try_link "$LINENO"; then :
10539   ac_cv_lib_ossp_uuid_uuid_export=yes
10540 else
10541   ac_cv_lib_ossp_uuid_uuid_export=no
10542 fi
10543 rm -f core conftest.err conftest.$ac_objext \
10544     conftest$ac_exeext conftest.$ac_ext
10545 LIBS=$ac_check_lib_save_LIBS
10546 fi
10547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
10548 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
10549 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
10550   UUID_LIBS="-lossp-uuid"
10551 else
10552   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
10553 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
10554 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
10555   $as_echo_n "(cached) " >&6
10556 else
10557   ac_check_lib_save_LIBS=$LIBS
10558 LIBS="-luuid  $LIBS"
10559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10560 /* end confdefs.h.  */
10561
10562 /* Override any GCC internal prototype to avoid an error.
10563    Use char because int might match the return type of a GCC
10564    builtin and then its argument prototype would still apply.  */
10565 #ifdef __cplusplus
10566 extern "C"
10567 #endif
10568 char uuid_export ();
10569 int
10570 main ()
10571 {
10572 return uuid_export ();
10573   ;
10574   return 0;
10575 }
10576 _ACEOF
10577 if ac_fn_c_try_link "$LINENO"; then :
10578   ac_cv_lib_uuid_uuid_export=yes
10579 else
10580   ac_cv_lib_uuid_uuid_export=no
10581 fi
10582 rm -f core conftest.err conftest.$ac_objext \
10583     conftest$ac_exeext conftest.$ac_ext
10584 LIBS=$ac_check_lib_save_LIBS
10585 fi
10586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
10587 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
10588 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
10589   UUID_LIBS="-luuid"
10590 else
10591   as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
10592 fi
10593
10594 fi
10595
10596 fi
10597
10598
10599
10600 ##
10601 ## Header files
10602 ##
10603
10604 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 sys/epoll.h sys/ipc.h sys/poll.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/sockio.h sys/tas.h sys/un.h termios.h ucred.h utime.h wchar.h wctype.h
10605 do :
10606   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10607 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10608 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10609   cat >>confdefs.h <<_ACEOF
10610 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10611 _ACEOF
10612
10613 fi
10614
10615 done
10616
10617
10618 # On BSD, test for net/if.h will fail unless sys/socket.h
10619 # is included first.
10620 for ac_header in net/if.h
10621 do :
10622   ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
10623 #include <sys/socket.h>
10624
10625 "
10626 if test "x$ac_cv_header_net_if_h" = xyes; then :
10627   cat >>confdefs.h <<_ACEOF
10628 #define HAVE_NET_IF_H 1
10629 _ACEOF
10630
10631 fi
10632
10633 done
10634
10635
10636 # On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
10637 # is included first.
10638 for ac_header in sys/ucred.h
10639 do :
10640   ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
10641 #include <sys/param.h>
10642
10643 "
10644 if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
10645   cat >>confdefs.h <<_ACEOF
10646 #define HAVE_SYS_UCRED_H 1
10647 _ACEOF
10648
10649 fi
10650
10651 done
10652
10653
10654 # At least on IRIX, test for netinet/tcp.h will fail unless
10655 # netinet/in.h is included first.
10656 for ac_header in netinet/tcp.h
10657 do :
10658   ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
10659 #include <netinet/in.h>
10660
10661 "
10662 if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
10663   cat >>confdefs.h <<_ACEOF
10664 #define HAVE_NETINET_TCP_H 1
10665 _ACEOF
10666
10667 fi
10668
10669 done
10670
10671
10672 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
10673   for ac_header in readline/readline.h
10674 do :
10675   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
10676 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
10677   cat >>confdefs.h <<_ACEOF
10678 #define HAVE_READLINE_READLINE_H 1
10679 _ACEOF
10680
10681 else
10682   for ac_header in readline.h
10683 do :
10684   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
10685 if test "x$ac_cv_header_readline_h" = xyes; then :
10686   cat >>confdefs.h <<_ACEOF
10687 #define HAVE_READLINE_H 1
10688 _ACEOF
10689
10690 else
10691   as_fn_error $? "readline header not found
10692 If you have readline already installed, see config.log for details on the
10693 failure.  It is possible the compiler isn't looking in the proper directory.
10694 Use --without-readline to disable readline support." "$LINENO" 5
10695 fi
10696
10697 done
10698
10699 fi
10700
10701 done
10702
10703   for ac_header in readline/history.h
10704 do :
10705   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
10706 if test "x$ac_cv_header_readline_history_h" = xyes; then :
10707   cat >>confdefs.h <<_ACEOF
10708 #define HAVE_READLINE_HISTORY_H 1
10709 _ACEOF
10710
10711 else
10712   for ac_header in history.h
10713 do :
10714   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
10715 if test "x$ac_cv_header_history_h" = xyes; then :
10716   cat >>confdefs.h <<_ACEOF
10717 #define HAVE_HISTORY_H 1
10718 _ACEOF
10719
10720 else
10721   as_fn_error $? "history header not found
10722 If you have readline already installed, see config.log for details on the
10723 failure.  It is possible the compiler isn't looking in the proper directory.
10724 Use --without-readline to disable readline support." "$LINENO" 5
10725 fi
10726
10727 done
10728
10729 fi
10730
10731 done
10732
10733 fi
10734
10735 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
10736 # Some installations of libedit usurp /usr/include/readline/, which seems
10737 # bad practice, since in combined installations readline will have its headers
10738 # there.  We might have to resort to AC_EGREP checks to make sure we found
10739 # the proper header...
10740   for ac_header in editline/readline.h
10741 do :
10742   ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
10743 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
10744   cat >>confdefs.h <<_ACEOF
10745 #define HAVE_EDITLINE_READLINE_H 1
10746 _ACEOF
10747
10748 else
10749   for ac_header in readline.h
10750 do :
10751   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
10752 if test "x$ac_cv_header_readline_h" = xyes; then :
10753   cat >>confdefs.h <<_ACEOF
10754 #define HAVE_READLINE_H 1
10755 _ACEOF
10756
10757 else
10758   for ac_header in readline/readline.h
10759 do :
10760   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
10761 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
10762   cat >>confdefs.h <<_ACEOF
10763 #define HAVE_READLINE_READLINE_H 1
10764 _ACEOF
10765
10766 else
10767   as_fn_error $? "readline header not found
10768 If you have libedit already installed, see config.log for details on the
10769 failure.  It is possible the compiler isn't looking in the proper directory.
10770 Use --without-readline to disable libedit support." "$LINENO" 5
10771 fi
10772
10773 done
10774
10775 fi
10776
10777 done
10778
10779 fi
10780
10781 done
10782
10783 # Note: in a libedit installation, history.h is sometimes a dummy, and may
10784 # not be there at all.  Hence, don't complain if not found.  We must check
10785 # though, since in yet other versions it is an independent header.
10786   for ac_header in editline/history.h
10787 do :
10788   ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
10789 if test "x$ac_cv_header_editline_history_h" = xyes; then :
10790   cat >>confdefs.h <<_ACEOF
10791 #define HAVE_EDITLINE_HISTORY_H 1
10792 _ACEOF
10793
10794 else
10795   for ac_header in history.h
10796 do :
10797   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
10798 if test "x$ac_cv_header_history_h" = xyes; then :
10799   cat >>confdefs.h <<_ACEOF
10800 #define HAVE_HISTORY_H 1
10801 _ACEOF
10802
10803 else
10804   for ac_header in readline/history.h
10805 do :
10806   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
10807 if test "x$ac_cv_header_readline_history_h" = xyes; then :
10808   cat >>confdefs.h <<_ACEOF
10809 #define HAVE_READLINE_HISTORY_H 1
10810 _ACEOF
10811
10812 fi
10813
10814 done
10815
10816 fi
10817
10818 done
10819
10820 fi
10821
10822 done
10823
10824 fi
10825
10826 if test "$with_zlib" = yes; then
10827   ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
10828 if test "x$ac_cv_header_zlib_h" = xyes; then :
10829
10830 else
10831   as_fn_error $? "zlib header not found
10832 If you have zlib already installed, see config.log for details on the
10833 failure.  It is possible the compiler isn't looking in the proper directory.
10834 Use --without-zlib to disable zlib support." "$LINENO" 5
10835 fi
10836
10837
10838 fi
10839
10840 if test "$with_gssapi" = yes ; then
10841   for ac_header in gssapi/gssapi.h
10842 do :
10843   ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
10844 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
10845   cat >>confdefs.h <<_ACEOF
10846 #define HAVE_GSSAPI_GSSAPI_H 1
10847 _ACEOF
10848
10849 else
10850   for ac_header in gssapi.h
10851 do :
10852   ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
10853 if test "x$ac_cv_header_gssapi_h" = xyes; then :
10854   cat >>confdefs.h <<_ACEOF
10855 #define HAVE_GSSAPI_H 1
10856 _ACEOF
10857
10858 else
10859   as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
10860 fi
10861
10862 done
10863
10864 fi
10865
10866 done
10867
10868 fi
10869
10870 if test "$with_openssl" = yes ; then
10871   ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
10872 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
10873
10874 else
10875   as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
10876 fi
10877
10878
10879   ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
10880 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
10881
10882 else
10883   as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
10884 fi
10885
10886
10887 fi
10888
10889 if test "$with_pam" = yes ; then
10890   for ac_header in security/pam_appl.h
10891 do :
10892   ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
10893 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
10894   cat >>confdefs.h <<_ACEOF
10895 #define HAVE_SECURITY_PAM_APPL_H 1
10896 _ACEOF
10897
10898 else
10899   for ac_header in pam/pam_appl.h
10900 do :
10901   ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
10902 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
10903   cat >>confdefs.h <<_ACEOF
10904 #define HAVE_PAM_PAM_APPL_H 1
10905 _ACEOF
10906
10907 else
10908   as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
10909 fi
10910
10911 done
10912
10913 fi
10914
10915 done
10916
10917 fi
10918
10919 if test "$with_bsd_auth" = yes ; then
10920   ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
10921 if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
10922
10923 else
10924   as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
10925 fi
10926
10927
10928 fi
10929
10930 if test "$with_systemd" = yes ; then
10931   ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
10932 if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
10933
10934 else
10935   as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
10936 fi
10937
10938
10939 fi
10940
10941 if test "$with_libxml" = yes ; then
10942   ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
10943 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
10944
10945 else
10946   as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
10947 fi
10948
10949
10950 fi
10951
10952 if test "$with_libxslt" = yes ; then
10953   ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
10954 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
10955
10956 else
10957   as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
10958 fi
10959
10960
10961 fi
10962
10963 if test "$with_ldap" = yes ; then
10964   if test "$PORTNAME" != "win32"; then
10965      for ac_header in ldap.h
10966 do :
10967   ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
10968 if test "x$ac_cv_header_ldap_h" = xyes; then :
10969   cat >>confdefs.h <<_ACEOF
10970 #define HAVE_LDAP_H 1
10971 _ACEOF
10972
10973 else
10974   as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
10975 fi
10976
10977 done
10978
10979      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
10980 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
10981 if ${pgac_cv_ldap_safe+:} false; then :
10982   $as_echo_n "(cached) " >&6
10983 else
10984   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10985 /* end confdefs.h.  */
10986 #include <ldap.h>
10987 #if !defined(LDAP_VENDOR_VERSION) || \
10988      (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
10989       LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
10990 choke me
10991 #endif
10992 int
10993 main ()
10994 {
10995
10996   ;
10997   return 0;
10998 }
10999 _ACEOF
11000 if ac_fn_c_try_compile "$LINENO"; then :
11001   pgac_cv_ldap_safe=yes
11002 else
11003   pgac_cv_ldap_safe=no
11004 fi
11005 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11006 fi
11007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
11008 $as_echo "$pgac_cv_ldap_safe" >&6; }
11009
11010 if test "$pgac_cv_ldap_safe" != yes; then
11011   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
11012 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
11013 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
11014 *** also uses LDAP will crash on exit." >&5
11015 $as_echo "$as_me: WARNING:
11016 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
11017 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
11018 *** also uses LDAP will crash on exit." >&2;}
11019 fi
11020   else
11021      for ac_header in winldap.h
11022 do :
11023   ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
11024 #include <windows.h>
11025
11026 "
11027 if test "x$ac_cv_header_winldap_h" = xyes; then :
11028   cat >>confdefs.h <<_ACEOF
11029 #define HAVE_WINLDAP_H 1
11030 _ACEOF
11031
11032 else
11033   as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
11034 fi
11035
11036 done
11037
11038   fi
11039 fi
11040
11041 if test "$with_bonjour" = yes ; then
11042   ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
11043 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
11044
11045 else
11046   as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
11047 fi
11048
11049
11050 fi
11051
11052 # for contrib/uuid-ossp
11053 if test "$with_uuid" = bsd ; then
11054   for ac_header in uuid.h
11055 do :
11056   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
11057 if test "x$ac_cv_header_uuid_h" = xyes; then :
11058   cat >>confdefs.h <<_ACEOF
11059 #define HAVE_UUID_H 1
11060 _ACEOF
11061  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11062 /* end confdefs.h.  */
11063 #include <uuid.h>
11064
11065 _ACEOF
11066 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11067   $EGREP "uuid_to_string" >/dev/null 2>&1; then :
11068
11069 else
11070   as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
11071 fi
11072 rm -f conftest*
11073
11074 else
11075   as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
11076 fi
11077
11078 done
11079
11080 elif test "$with_uuid" = e2fs ; then
11081   for ac_header in uuid/uuid.h
11082 do :
11083   ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
11084 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
11085   cat >>confdefs.h <<_ACEOF
11086 #define HAVE_UUID_UUID_H 1
11087 _ACEOF
11088  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11089 /* end confdefs.h.  */
11090 #include <uuid/uuid.h>
11091
11092 _ACEOF
11093 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11094   $EGREP "uuid_generate" >/dev/null 2>&1; then :
11095
11096 else
11097   as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
11098 fi
11099 rm -f conftest*
11100
11101 else
11102   for ac_header in uuid.h
11103 do :
11104   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
11105 if test "x$ac_cv_header_uuid_h" = xyes; then :
11106   cat >>confdefs.h <<_ACEOF
11107 #define HAVE_UUID_H 1
11108 _ACEOF
11109  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11110 /* end confdefs.h.  */
11111 #include <uuid.h>
11112
11113 _ACEOF
11114 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11115   $EGREP "uuid_generate" >/dev/null 2>&1; then :
11116
11117 else
11118   as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
11119 fi
11120 rm -f conftest*
11121
11122 else
11123   as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
11124 fi
11125
11126 done
11127
11128 fi
11129
11130 done
11131
11132 elif test "$with_uuid" = ossp ; then
11133   for ac_header in ossp/uuid.h
11134 do :
11135   ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
11136 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
11137   cat >>confdefs.h <<_ACEOF
11138 #define HAVE_OSSP_UUID_H 1
11139 _ACEOF
11140  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11141 /* end confdefs.h.  */
11142 #include <ossp/uuid.h>
11143
11144 _ACEOF
11145 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11146   $EGREP "uuid_export" >/dev/null 2>&1; then :
11147
11148 else
11149   as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
11150 fi
11151 rm -f conftest*
11152
11153 else
11154   for ac_header in uuid.h
11155 do :
11156   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
11157 if test "x$ac_cv_header_uuid_h" = xyes; then :
11158   cat >>confdefs.h <<_ACEOF
11159 #define HAVE_UUID_H 1
11160 _ACEOF
11161  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11162 /* end confdefs.h.  */
11163 #include <uuid.h>
11164
11165 _ACEOF
11166 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11167   $EGREP "uuid_export" >/dev/null 2>&1; then :
11168
11169 else
11170   as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
11171 fi
11172 rm -f conftest*
11173
11174 else
11175   as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
11176 fi
11177
11178 done
11179
11180 fi
11181
11182 done
11183
11184 fi
11185
11186 if test "$PORTNAME" = "win32" ; then
11187    for ac_header in crtdefs.h
11188 do :
11189   ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
11190 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
11191   cat >>confdefs.h <<_ACEOF
11192 #define HAVE_CRTDEFS_H 1
11193 _ACEOF
11194
11195 fi
11196
11197 done
11198
11199 fi
11200
11201 ##
11202 ## Types, structures, compiler characteristics
11203 ##
11204
11205   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
11206 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
11207 if ${ac_cv_c_bigendian+:} false; then :
11208   $as_echo_n "(cached) " >&6
11209 else
11210   ac_cv_c_bigendian=unknown
11211     # See if we're dealing with a universal compiler.
11212     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11213 /* end confdefs.h.  */
11214 #ifndef __APPLE_CC__
11215                not a universal capable compiler
11216              #endif
11217              typedef int dummy;
11218
11219 _ACEOF
11220 if ac_fn_c_try_compile "$LINENO"; then :
11221
11222         # Check for potential -arch flags.  It is not universal unless
11223         # there are at least two -arch flags with different values.
11224         ac_arch=
11225         ac_prev=
11226         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11227          if test -n "$ac_prev"; then
11228            case $ac_word in
11229              i?86 | x86_64 | ppc | ppc64)
11230                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11231                  ac_arch=$ac_word
11232                else
11233                  ac_cv_c_bigendian=universal
11234                  break
11235                fi
11236                ;;
11237            esac
11238            ac_prev=
11239          elif test "x$ac_word" = "x-arch"; then
11240            ac_prev=arch
11241          fi
11242        done
11243 fi
11244 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11245     if test $ac_cv_c_bigendian = unknown; then
11246       # See if sys/param.h defines the BYTE_ORDER macro.
11247       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11248 /* end confdefs.h.  */
11249 #include <sys/types.h>
11250              #include <sys/param.h>
11251
11252 int
11253 main ()
11254 {
11255 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11256                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11257                      && LITTLE_ENDIAN)
11258               bogus endian macros
11259              #endif
11260
11261   ;
11262   return 0;
11263 }
11264 _ACEOF
11265 if ac_fn_c_try_compile "$LINENO"; then :
11266   # It does; now see whether it defined to BIG_ENDIAN or not.
11267          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11268 /* end confdefs.h.  */
11269 #include <sys/types.h>
11270                 #include <sys/param.h>
11271
11272 int
11273 main ()
11274 {
11275 #if BYTE_ORDER != BIG_ENDIAN
11276                  not big endian
11277                 #endif
11278
11279   ;
11280   return 0;
11281 }
11282 _ACEOF
11283 if ac_fn_c_try_compile "$LINENO"; then :
11284   ac_cv_c_bigendian=yes
11285 else
11286   ac_cv_c_bigendian=no
11287 fi
11288 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11289 fi
11290 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11291     fi
11292     if test $ac_cv_c_bigendian = unknown; then
11293       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11294       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11295 /* end confdefs.h.  */
11296 #include <limits.h>
11297
11298 int
11299 main ()
11300 {
11301 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11302               bogus endian macros
11303              #endif
11304
11305   ;
11306   return 0;
11307 }
11308 _ACEOF
11309 if ac_fn_c_try_compile "$LINENO"; then :
11310   # It does; now see whether it defined to _BIG_ENDIAN or not.
11311          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11312 /* end confdefs.h.  */
11313 #include <limits.h>
11314
11315 int
11316 main ()
11317 {
11318 #ifndef _BIG_ENDIAN
11319                  not big endian
11320                 #endif
11321
11322   ;
11323   return 0;
11324 }
11325 _ACEOF
11326 if ac_fn_c_try_compile "$LINENO"; then :
11327   ac_cv_c_bigendian=yes
11328 else
11329   ac_cv_c_bigendian=no
11330 fi
11331 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11332 fi
11333 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11334     fi
11335     if test $ac_cv_c_bigendian = unknown; then
11336       # Compile a test program.
11337       if test "$cross_compiling" = yes; then :
11338   # Try to guess by grepping values from an object file.
11339          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11340 /* end confdefs.h.  */
11341 short int ascii_mm[] =
11342                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
11343                 short int ascii_ii[] =
11344                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
11345                 int use_ascii (int i) {
11346                   return ascii_mm[i] + ascii_ii[i];
11347                 }
11348                 short int ebcdic_ii[] =
11349                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
11350                 short int ebcdic_mm[] =
11351                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
11352                 int use_ebcdic (int i) {
11353                   return ebcdic_mm[i] + ebcdic_ii[i];
11354                 }
11355                 extern int foo;
11356
11357 int
11358 main ()
11359 {
11360 return use_ascii (foo) == use_ebcdic (foo);
11361   ;
11362   return 0;
11363 }
11364 _ACEOF
11365 if ac_fn_c_try_compile "$LINENO"; then :
11366   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
11367               ac_cv_c_bigendian=yes
11368             fi
11369             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
11370               if test "$ac_cv_c_bigendian" = unknown; then
11371                 ac_cv_c_bigendian=no
11372               else
11373                 # finding both strings is unlikely to happen, but who knows?
11374                 ac_cv_c_bigendian=unknown
11375               fi
11376             fi
11377 fi
11378 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11379 else
11380   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11381 /* end confdefs.h.  */
11382 $ac_includes_default
11383 int
11384 main ()
11385 {
11386
11387              /* Are we little or big endian?  From Harbison&Steele.  */
11388              union
11389              {
11390                long int l;
11391                char c[sizeof (long int)];
11392              } u;
11393              u.l = 1;
11394              return u.c[sizeof (long int) - 1] == 1;
11395
11396   ;
11397   return 0;
11398 }
11399 _ACEOF
11400 if ac_fn_c_try_run "$LINENO"; then :
11401   ac_cv_c_bigendian=no
11402 else
11403   ac_cv_c_bigendian=yes
11404 fi
11405 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11406   conftest.$ac_objext conftest.beam conftest.$ac_ext
11407 fi
11408
11409     fi
11410 fi
11411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
11412 $as_echo "$ac_cv_c_bigendian" >&6; }
11413  case $ac_cv_c_bigendian in #(
11414    yes)
11415      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
11416 ;; #(
11417    no)
11418       ;; #(
11419    universal)
11420
11421 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
11422
11423      ;; #(
11424    *)
11425      as_fn_error $? "unknown endianness
11426  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
11427  esac
11428
11429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
11430 $as_echo_n "checking for inline... " >&6; }
11431 if ${ac_cv_c_inline+:} false; then :
11432   $as_echo_n "(cached) " >&6
11433 else
11434   ac_cv_c_inline=no
11435 for ac_kw in inline __inline__ __inline; do
11436   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11437 /* end confdefs.h.  */
11438 #ifndef __cplusplus
11439 typedef int foo_t;
11440 static $ac_kw foo_t static_foo () {return 0; }
11441 $ac_kw foo_t foo () {return 0; }
11442 #endif
11443
11444 _ACEOF
11445 if ac_fn_c_try_compile "$LINENO"; then :
11446   ac_cv_c_inline=$ac_kw
11447 fi
11448 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11449   test "$ac_cv_c_inline" != no && break
11450 done
11451
11452 fi
11453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
11454 $as_echo "$ac_cv_c_inline" >&6; }
11455
11456 case $ac_cv_c_inline in
11457   inline | yes) ;;
11458   *)
11459     case $ac_cv_c_inline in
11460       no) ac_val=;;
11461       *) ac_val=$ac_cv_c_inline;;
11462     esac
11463     cat >>confdefs.h <<_ACEOF
11464 #ifndef __cplusplus
11465 #define inline $ac_val
11466 #endif
11467 _ACEOF
11468     ;;
11469 esac
11470
11471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
11472 $as_echo_n "checking for printf format archetype... " >&6; }
11473 if ${pgac_cv_printf_archetype+:} false; then :
11474   $as_echo_n "(cached) " >&6
11475 else
11476   ac_save_c_werror_flag=$ac_c_werror_flag
11477 ac_c_werror_flag=yes
11478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11479 /* end confdefs.h.  */
11480 extern int
11481 pgac_write(int ignore, const char *fmt,...)
11482 __attribute__((format(gnu_printf, 2, 3)));
11483 int
11484 main ()
11485 {
11486
11487   ;
11488   return 0;
11489 }
11490 _ACEOF
11491 if ac_fn_c_try_compile "$LINENO"; then :
11492   pgac_cv_printf_archetype=gnu_printf
11493 else
11494   pgac_cv_printf_archetype=printf
11495 fi
11496 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11497 ac_c_werror_flag=$ac_save_c_werror_flag
11498 fi
11499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
11500 $as_echo "$pgac_cv_printf_archetype" >&6; }
11501
11502 cat >>confdefs.h <<_ACEOF
11503 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
11504 _ACEOF
11505
11506
11507
11508   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array members" >&5
11509 $as_echo_n "checking for flexible array members... " >&6; }
11510 if ${ac_cv_c_flexmember+:} false; then :
11511   $as_echo_n "(cached) " >&6
11512 else
11513   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11514 /* end confdefs.h.  */
11515 #include <stdlib.h>
11516             #include <stdio.h>
11517             #include <stddef.h>
11518             struct s { int n; double d[]; };
11519 int
11520 main ()
11521 {
11522 int m = getchar ();
11523             struct s *p = malloc (offsetof (struct s, d)
11524                                   + m * sizeof (double));
11525             p->d[0] = 0.0;
11526             return p->d != (double *) NULL;
11527   ;
11528   return 0;
11529 }
11530 _ACEOF
11531 if ac_fn_c_try_compile "$LINENO"; then :
11532   ac_cv_c_flexmember=yes
11533 else
11534   ac_cv_c_flexmember=no
11535 fi
11536 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11537 fi
11538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
11539 $as_echo "$ac_cv_c_flexmember" >&6; }
11540   if test $ac_cv_c_flexmember = yes; then
11541
11542 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
11543
11544   else
11545     $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
11546
11547   fi
11548
11549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed types" >&5
11550 $as_echo_n "checking for signed types... " >&6; }
11551 if ${pgac_cv_c_signed+:} false; then :
11552   $as_echo_n "(cached) " >&6
11553 else
11554   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11555 /* end confdefs.h.  */
11556
11557 int
11558 main ()
11559 {
11560 signed char c; signed short s; signed int i;
11561   ;
11562   return 0;
11563 }
11564 _ACEOF
11565 if ac_fn_c_try_compile "$LINENO"; then :
11566   pgac_cv_c_signed=yes
11567 else
11568   pgac_cv_c_signed=no
11569 fi
11570 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11571 fi
11572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_signed" >&5
11573 $as_echo "$pgac_cv_c_signed" >&6; }
11574 if test x"$pgac_cv_c_signed" = xno ; then
11575
11576 $as_echo "#define signed /**/" >>confdefs.h
11577
11578 fi
11579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5
11580 $as_echo_n "checking for __func__... " >&6; }
11581 if ${pgac_cv_funcname_func_support+:} false; then :
11582   $as_echo_n "(cached) " >&6
11583 else
11584   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11585 /* end confdefs.h.  */
11586 #include <stdio.h>
11587 int
11588 main ()
11589 {
11590 printf("%s\n", __func__);
11591   ;
11592   return 0;
11593 }
11594 _ACEOF
11595 if ac_fn_c_try_compile "$LINENO"; then :
11596   pgac_cv_funcname_func_support=yes
11597 else
11598   pgac_cv_funcname_func_support=no
11599 fi
11600 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11601 fi
11602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_func_support" >&5
11603 $as_echo "$pgac_cv_funcname_func_support" >&6; }
11604 if test x"$pgac_cv_funcname_func_support" = xyes ; then
11605
11606 $as_echo "#define HAVE_FUNCNAME__FUNC 1" >>confdefs.h
11607
11608 else
11609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__" >&5
11610 $as_echo_n "checking for __FUNCTION__... " >&6; }
11611 if ${pgac_cv_funcname_function_support+:} false; then :
11612   $as_echo_n "(cached) " >&6
11613 else
11614   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11615 /* end confdefs.h.  */
11616 #include <stdio.h>
11617 int
11618 main ()
11619 {
11620 printf("%s\n", __FUNCTION__);
11621   ;
11622   return 0;
11623 }
11624 _ACEOF
11625 if ac_fn_c_try_compile "$LINENO"; then :
11626   pgac_cv_funcname_function_support=yes
11627 else
11628   pgac_cv_funcname_function_support=no
11629 fi
11630 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11631 fi
11632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_function_support" >&5
11633 $as_echo "$pgac_cv_funcname_function_support" >&6; }
11634 if test x"$pgac_cv_funcname_function_support" = xyes ; then
11635
11636 $as_echo "#define HAVE_FUNCNAME__FUNCTION 1" >>confdefs.h
11637
11638 fi
11639 fi
11640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
11641 $as_echo_n "checking for _Static_assert... " >&6; }
11642 if ${pgac_cv__static_assert+:} false; then :
11643   $as_echo_n "(cached) " >&6
11644 else
11645   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11646 /* end confdefs.h.  */
11647
11648 int
11649 main ()
11650 {
11651 ({ _Static_assert(1, "foo"); })
11652   ;
11653   return 0;
11654 }
11655 _ACEOF
11656 if ac_fn_c_try_link "$LINENO"; then :
11657   pgac_cv__static_assert=yes
11658 else
11659   pgac_cv__static_assert=no
11660 fi
11661 rm -f core conftest.err conftest.$ac_objext \
11662     conftest$ac_exeext conftest.$ac_ext
11663 fi
11664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
11665 $as_echo "$pgac_cv__static_assert" >&6; }
11666 if test x"$pgac_cv__static_assert" = xyes ; then
11667
11668 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
11669
11670 fi
11671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5
11672 $as_echo_n "checking for typeof... " >&6; }
11673 if ${pgac_cv_c_typeof+:} false; then :
11674   $as_echo_n "(cached) " >&6
11675 else
11676   pgac_cv_c_typeof=no
11677 for pgac_kw in typeof __typeof__ decltype; do
11678   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11679 /* end confdefs.h.  */
11680
11681 int
11682 main ()
11683 {
11684 int x = 0;
11685 $pgac_kw(x) y;
11686 y = x;
11687 return y;
11688   ;
11689   return 0;
11690 }
11691 _ACEOF
11692 if ac_fn_c_try_compile "$LINENO"; then :
11693   pgac_cv_c_typeof=$pgac_kw
11694 fi
11695 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11696   test "$pgac_cv_c_typeof" != no && break
11697 done
11698 fi
11699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_typeof" >&5
11700 $as_echo "$pgac_cv_c_typeof" >&6; }
11701 if test "$pgac_cv_c_typeof" != no; then
11702
11703 $as_echo "#define HAVE_TYPEOF 1" >>confdefs.h
11704
11705   if test "$pgac_cv_c_typeof" != typeof; then
11706
11707 cat >>confdefs.h <<_ACEOF
11708 #define typeof $pgac_cv_c_typeof
11709 _ACEOF
11710
11711   fi
11712 fi
11713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
11714 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
11715 if ${pgac_cv__types_compatible+:} false; then :
11716   $as_echo_n "(cached) " >&6
11717 else
11718   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11719 /* end confdefs.h.  */
11720
11721 int
11722 main ()
11723 {
11724  int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
11725   ;
11726   return 0;
11727 }
11728 _ACEOF
11729 if ac_fn_c_try_compile "$LINENO"; then :
11730   pgac_cv__types_compatible=yes
11731 else
11732   pgac_cv__types_compatible=no
11733 fi
11734 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11735 fi
11736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
11737 $as_echo "$pgac_cv__types_compatible" >&6; }
11738 if test x"$pgac_cv__types_compatible" = xyes ; then
11739
11740 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
11741
11742 fi
11743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
11744 $as_echo_n "checking for __builtin_bswap32... " >&6; }
11745 if ${pgac_cv__builtin_bswap32+:} false; then :
11746   $as_echo_n "(cached) " >&6
11747 else
11748   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11749 /* end confdefs.h.  */
11750 static unsigned long int x = __builtin_bswap32(0xaabbccdd);
11751
11752 _ACEOF
11753 if ac_fn_c_try_compile "$LINENO"; then :
11754   pgac_cv__builtin_bswap32=yes
11755 else
11756   pgac_cv__builtin_bswap32=no
11757 fi
11758 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11759 fi
11760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
11761 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
11762 if test x"$pgac_cv__builtin_bswap32" = xyes ; then
11763
11764 $as_echo "#define HAVE__BUILTIN_BSWAP32 1" >>confdefs.h
11765
11766 fi
11767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
11768 $as_echo_n "checking for __builtin_bswap64... " >&6; }
11769 if ${pgac_cv__builtin_bswap64+:} false; then :
11770   $as_echo_n "(cached) " >&6
11771 else
11772   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11773 /* end confdefs.h.  */
11774 static unsigned long int x = __builtin_bswap64(0xaabbccddeeff0011);
11775
11776 _ACEOF
11777 if ac_fn_c_try_compile "$LINENO"; then :
11778   pgac_cv__builtin_bswap64=yes
11779 else
11780   pgac_cv__builtin_bswap64=no
11781 fi
11782 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11783 fi
11784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
11785 $as_echo "$pgac_cv__builtin_bswap64" >&6; }
11786 if test x"$pgac_cv__builtin_bswap64" = xyes ; then
11787
11788 $as_echo "#define HAVE__BUILTIN_BSWAP64 1" >>confdefs.h
11789
11790 fi
11791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
11792 $as_echo_n "checking for __builtin_constant_p... " >&6; }
11793 if ${pgac_cv__builtin_constant_p+:} false; then :
11794   $as_echo_n "(cached) " >&6
11795 else
11796   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11797 /* end confdefs.h.  */
11798 static int x; static int y[__builtin_constant_p(x) ? x : 1];
11799
11800 _ACEOF
11801 if ac_fn_c_try_compile "$LINENO"; then :
11802   pgac_cv__builtin_constant_p=yes
11803 else
11804   pgac_cv__builtin_constant_p=no
11805 fi
11806 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11807 fi
11808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
11809 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
11810 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
11811
11812 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
11813
11814 fi
11815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
11816 $as_echo_n "checking for __builtin_unreachable... " >&6; }
11817 if ${pgac_cv__builtin_unreachable+:} false; then :
11818   $as_echo_n "(cached) " >&6
11819 else
11820   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11821 /* end confdefs.h.  */
11822
11823 int
11824 main ()
11825 {
11826 __builtin_unreachable();
11827   ;
11828   return 0;
11829 }
11830 _ACEOF
11831 if ac_fn_c_try_link "$LINENO"; then :
11832   pgac_cv__builtin_unreachable=yes
11833 else
11834   pgac_cv__builtin_unreachable=no
11835 fi
11836 rm -f core conftest.err conftest.$ac_objext \
11837     conftest$ac_exeext conftest.$ac_ext
11838 fi
11839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
11840 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
11841 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
11842
11843 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
11844
11845 fi
11846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for computed goto support" >&5
11847 $as_echo_n "checking for computed goto support... " >&6; }
11848 if ${pgac_cv_computed_goto+:} false; then :
11849   $as_echo_n "(cached) " >&6
11850 else
11851   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11852 /* end confdefs.h.  */
11853
11854 int
11855 main ()
11856 {
11857 void *labeladdrs[] = {&&my_label};
11858   goto *labeladdrs[0];
11859   my_label:
11860   return 1;
11861
11862   ;
11863   return 0;
11864 }
11865 _ACEOF
11866 if ac_fn_c_try_compile "$LINENO"; then :
11867   pgac_cv_computed_goto=yes
11868 else
11869   pgac_cv_computed_goto=no
11870 fi
11871 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11872 fi
11873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_computed_goto" >&5
11874 $as_echo "$pgac_cv_computed_goto" >&6; }
11875 if test x"$pgac_cv_computed_goto" = xyes ; then
11876
11877 $as_echo "#define HAVE_COMPUTED_GOTO 1" >>confdefs.h
11878
11879 fi
11880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __VA_ARGS__" >&5
11881 $as_echo_n "checking for __VA_ARGS__... " >&6; }
11882 if ${pgac_cv__va_args+:} false; then :
11883   $as_echo_n "(cached) " >&6
11884 else
11885   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11886 /* end confdefs.h.  */
11887 #include <stdio.h>
11888 int
11889 main ()
11890 {
11891 #define debug(...) fprintf(stderr, __VA_ARGS__)
11892 debug("%s", "blarg");
11893
11894   ;
11895   return 0;
11896 }
11897 _ACEOF
11898 if ac_fn_c_try_compile "$LINENO"; then :
11899   pgac_cv__va_args=yes
11900 else
11901   pgac_cv__va_args=no
11902 fi
11903 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11904 fi
11905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__va_args" >&5
11906 $as_echo "$pgac_cv__va_args" >&6; }
11907 if test x"$pgac_cv__va_args" = xyes ; then
11908
11909 $as_echo "#define HAVE__VA_ARGS 1" >>confdefs.h
11910
11911 fi
11912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11913 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
11914 if ${ac_cv_struct_tm+:} false; then :
11915   $as_echo_n "(cached) " >&6
11916 else
11917   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11918 /* end confdefs.h.  */
11919 #include <sys/types.h>
11920 #include <time.h>
11921
11922 int
11923 main ()
11924 {
11925 struct tm tm;
11926                                      int *p = &tm.tm_sec;
11927                                      return !p;
11928   ;
11929   return 0;
11930 }
11931 _ACEOF
11932 if ac_fn_c_try_compile "$LINENO"; then :
11933   ac_cv_struct_tm=time.h
11934 else
11935   ac_cv_struct_tm=sys/time.h
11936 fi
11937 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11938 fi
11939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11940 $as_echo "$ac_cv_struct_tm" >&6; }
11941 if test $ac_cv_struct_tm = sys/time.h; then
11942
11943 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
11944
11945 fi
11946
11947 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
11948 #include <$ac_cv_struct_tm>
11949
11950 "
11951 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
11952
11953 cat >>confdefs.h <<_ACEOF
11954 #define HAVE_STRUCT_TM_TM_ZONE 1
11955 _ACEOF
11956
11957
11958 fi
11959
11960 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11961
11962 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
11963
11964 fi
11965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11966 $as_echo_n "checking for tzname... " >&6; }
11967 if ${ac_cv_var_tzname+:} false; then :
11968   $as_echo_n "(cached) " >&6
11969 else
11970   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11971 /* end confdefs.h.  */
11972 #include <stdlib.h>
11973 #include <time.h>
11974 #ifndef tzname /* For SGI.  */
11975 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
11976 #endif
11977
11978 int
11979 main ()
11980 {
11981 atoi(*tzname);
11982   ;
11983   return 0;
11984 }
11985 _ACEOF
11986 if ac_fn_c_try_link "$LINENO"; then :
11987   ac_cv_var_tzname=yes
11988 else
11989   ac_cv_var_tzname=no
11990 fi
11991 rm -f core conftest.err conftest.$ac_objext \
11992     conftest$ac_exeext conftest.$ac_ext
11993 fi
11994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11995 $as_echo "$ac_cv_var_tzname" >&6; }
11996 if test $ac_cv_var_tzname = yes; then
11997
11998 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
11999
12000 fi
12001
12002 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
12003 #ifdef HAVE_SYS_IPC_H
12004 #include <sys/ipc.h>
12005 #endif
12006 #ifdef HAVE_SYS_SEM_H
12007 #include <sys/sem.h>
12008 #endif
12009 "
12010 if test "x$ac_cv_type_union_semun" = xyes; then :
12011
12012 cat >>confdefs.h <<_ACEOF
12013 #define HAVE_UNION_SEMUN 1
12014 _ACEOF
12015
12016
12017 fi
12018
12019 ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
12020 #ifdef HAVE_SYS_UN_H
12021 #include <sys/un.h>
12022 #endif
12023
12024 "
12025 if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
12026
12027 $as_echo "#define HAVE_UNIX_SOCKETS 1" >>confdefs.h
12028
12029 fi
12030
12031 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
12032 #include <sys/socket.h>
12033
12034 "
12035 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
12036
12037 cat >>confdefs.h <<_ACEOF
12038 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
12039 _ACEOF
12040
12041
12042 fi
12043
12044 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
12045 #include <sys/socket.h>
12046
12047 "
12048 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
12049
12050 cat >>confdefs.h <<_ACEOF
12051 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
12052 _ACEOF
12053
12054
12055 fi
12056 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
12057 #include <sys/socket.h>
12058
12059 "
12060 if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
12061
12062 cat >>confdefs.h <<_ACEOF
12063 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
12064 _ACEOF
12065
12066
12067 fi
12068 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
12069 #include <sys/socket.h>
12070
12071 "
12072 if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
12073
12074 cat >>confdefs.h <<_ACEOF
12075 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
12076 _ACEOF
12077
12078
12079 fi
12080 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
12081 #include <sys/socket.h>
12082
12083 "
12084 if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
12085
12086 cat >>confdefs.h <<_ACEOF
12087 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
12088 _ACEOF
12089
12090
12091 fi
12092 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
12093 #include <sys/socket.h>
12094
12095 "
12096 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
12097
12098 cat >>confdefs.h <<_ACEOF
12099 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
12100 _ACEOF
12101
12102
12103 fi
12104
12105 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include <sys/types.h>
12106 #include <sys/socket.h>
12107 #include <netdb.h>
12108
12109 "
12110 if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
12111
12112 cat >>confdefs.h <<_ACEOF
12113 #define HAVE_STRUCT_ADDRINFO 1
12114 _ACEOF
12115
12116
12117 fi
12118
12119
12120   ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
12121 if test "x$ac_cv_type_intptr_t" = xyes; then :
12122
12123 $as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
12124
12125 else
12126   for ac_type in 'int' 'long int' 'long long int'; do
12127        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12128 /* end confdefs.h.  */
12129 $ac_includes_default
12130 int
12131 main ()
12132 {
12133 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
12134 test_array [0] = 0;
12135 return test_array [0];
12136
12137   ;
12138   return 0;
12139 }
12140 _ACEOF
12141 if ac_fn_c_try_compile "$LINENO"; then :
12142
12143 cat >>confdefs.h <<_ACEOF
12144 #define intptr_t $ac_type
12145 _ACEOF
12146
12147           ac_type=
12148 fi
12149 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12150        test -z "$ac_type" && break
12151      done
12152 fi
12153
12154
12155
12156   ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
12157 if test "x$ac_cv_type_uintptr_t" = xyes; then :
12158
12159 $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
12160
12161 else
12162   for ac_type in 'unsigned int' 'unsigned long int' \
12163         'unsigned long long int'; do
12164        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12165 /* end confdefs.h.  */
12166 $ac_includes_default
12167 int
12168 main ()
12169 {
12170 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
12171 test_array [0] = 0;
12172 return test_array [0];
12173
12174   ;
12175   return 0;
12176 }
12177 _ACEOF
12178 if ac_fn_c_try_compile "$LINENO"; then :
12179
12180 cat >>confdefs.h <<_ACEOF
12181 #define uintptr_t $ac_type
12182 _ACEOF
12183
12184           ac_type=
12185 fi
12186 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12187        test -z "$ac_type" && break
12188      done
12189 fi
12190
12191
12192
12193   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
12194 $as_echo_n "checking for unsigned long long int... " >&6; }
12195 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
12196   $as_echo_n "(cached) " >&6
12197 else
12198   ac_cv_type_unsigned_long_long_int=yes
12199      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
12200        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12201 /* end confdefs.h.  */
12202
12203   /* For now, do not test the preprocessor; as of 2007 there are too many
12204          implementations with broken preprocessors.  Perhaps this can
12205          be revisited in 2012.  In the meantime, code should not expect
12206          #if to work with literals wider than 32 bits.  */
12207       /* Test literals.  */
12208       long long int ll = 9223372036854775807ll;
12209       long long int nll = -9223372036854775807LL;
12210       unsigned long long int ull = 18446744073709551615ULL;
12211       /* Test constant expressions.   */
12212       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
12213                      ? 1 : -1)];
12214       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
12215                      ? 1 : -1)];
12216       int i = 63;
12217 int
12218 main ()
12219 {
12220 /* Test availability of runtime routines for shift and division.  */
12221       long long int llmax = 9223372036854775807ll;
12222       unsigned long long int ullmax = 18446744073709551615ull;
12223       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
12224               | (llmax / ll) | (llmax % ll)
12225               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
12226               | (ullmax / ull) | (ullmax % ull));
12227   ;
12228   return 0;
12229 }
12230
12231 _ACEOF
12232 if ac_fn_c_try_link "$LINENO"; then :
12233
12234 else
12235   ac_cv_type_unsigned_long_long_int=no
12236 fi
12237 rm -f core conftest.err conftest.$ac_objext \
12238     conftest$ac_exeext conftest.$ac_ext
12239      fi
12240 fi
12241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
12242 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
12243   if test $ac_cv_type_unsigned_long_long_int = yes; then
12244
12245 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
12246
12247   fi
12248
12249
12250
12251   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
12252 $as_echo_n "checking for long long int... " >&6; }
12253 if ${ac_cv_type_long_long_int+:} false; then :
12254   $as_echo_n "(cached) " >&6
12255 else
12256   ac_cv_type_long_long_int=yes
12257       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
12258         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
12259         if test $ac_cv_type_long_long_int = yes; then
12260                                   if test "$cross_compiling" = yes; then :
12261   :
12262 else
12263   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12264 /* end confdefs.h.  */
12265 #include <limits.h>
12266                  #ifndef LLONG_MAX
12267                  # define HALF \
12268                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
12269                  # define LLONG_MAX (HALF - 1 + HALF)
12270                  #endif
12271 int
12272 main ()
12273 {
12274 long long int n = 1;
12275                  int i;
12276                  for (i = 0; ; i++)
12277                    {
12278                      long long int m = n << i;
12279                      if (m >> i != n)
12280                        return 1;
12281                      if (LLONG_MAX / 2 < m)
12282                        break;
12283                    }
12284                  return 0;
12285   ;
12286   return 0;
12287 }
12288 _ACEOF
12289 if ac_fn_c_try_run "$LINENO"; then :
12290
12291 else
12292   ac_cv_type_long_long_int=no
12293 fi
12294 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12295   conftest.$ac_objext conftest.beam conftest.$ac_ext
12296 fi
12297
12298         fi
12299       fi
12300 fi
12301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
12302 $as_echo "$ac_cv_type_long_long_int" >&6; }
12303   if test $ac_cv_type_long_long_int = yes; then
12304
12305 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
12306
12307   fi
12308
12309
12310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
12311 $as_echo_n "checking for locale_t... " >&6; }
12312 if ${pgac_cv_type_locale_t+:} false; then :
12313   $as_echo_n "(cached) " >&6
12314 else
12315   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12316 /* end confdefs.h.  */
12317 #include <locale.h>
12318 locale_t x;
12319 int
12320 main ()
12321 {
12322
12323   ;
12324   return 0;
12325 }
12326 _ACEOF
12327 if ac_fn_c_try_compile "$LINENO"; then :
12328   pgac_cv_type_locale_t=yes
12329 else
12330   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12331 /* end confdefs.h.  */
12332 #include <xlocale.h>
12333 locale_t x;
12334 int
12335 main ()
12336 {
12337
12338   ;
12339   return 0;
12340 }
12341 _ACEOF
12342 if ac_fn_c_try_compile "$LINENO"; then :
12343   pgac_cv_type_locale_t='yes (in xlocale.h)'
12344 else
12345   pgac_cv_type_locale_t=no
12346 fi
12347 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12348 fi
12349 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12350 fi
12351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
12352 $as_echo "$pgac_cv_type_locale_t" >&6; }
12353 if test "$pgac_cv_type_locale_t" != no; then
12354
12355 $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
12356
12357 fi
12358 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
12359
12360 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
12361
12362 fi
12363
12364 ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
12365 #include <sys/param.h>
12366 #ifdef HAVE_SYS_UCRED_H
12367 #include <sys/ucred.h>
12368 #endif
12369 "
12370 if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
12371
12372 cat >>confdefs.h <<_ACEOF
12373 #define HAVE_STRUCT_CMSGCRED 1
12374 _ACEOF
12375
12376
12377 fi
12378
12379
12380 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
12381 #include <getopt.h>
12382 #endif
12383 "
12384 if test "x$ac_cv_type_struct_option" = xyes; then :
12385
12386 cat >>confdefs.h <<_ACEOF
12387 #define HAVE_STRUCT_OPTION 1
12388 _ACEOF
12389
12390
12391 fi
12392
12393
12394 if test "$with_zlib" = yes; then
12395   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
12396   # did not).  While we could work around the lack of z_streamp, it
12397   # seems unwise to encourage people to use such old zlib versions...
12398   ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
12399 "
12400 if test "x$ac_cv_type_z_streamp" = xyes; then :
12401
12402 else
12403   as_fn_error $? "zlib version is too old
12404 Use --without-zlib to disable zlib support." "$LINENO" 5
12405 fi
12406
12407 fi
12408
12409 # On PPC, check if assembler supports LWARX instruction's mutex hint bit
12410 case $host_cpu in
12411   ppc*|powerpc*)
12412     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports lwarx hint bit" >&5
12413 $as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
12414     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12415 /* end confdefs.h.  */
12416
12417 int
12418 main ()
12419 {
12420 int a = 0; int *p = &a; int r;
12421          __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
12422   ;
12423   return 0;
12424 }
12425 _ACEOF
12426 if ac_fn_c_try_compile "$LINENO"; then :
12427   pgac_cv_have_ppc_mutex_hint=yes
12428 else
12429   pgac_cv_have_ppc_mutex_hint=no
12430 fi
12431 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12432     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_ppc_mutex_hint" >&5
12433 $as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
12434     if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
12435
12436 $as_echo "#define HAVE_PPC_LWARX_MUTEX_HINT 1" >>confdefs.h
12437
12438     fi
12439   ;;
12440 esac
12441
12442 # Check largefile support.  You might think this is a system service not a
12443 # compiler characteristic, but you'd be wrong.  We must check this before
12444 # probing existence of related functions such as fseeko, since the largefile
12445 # defines can affect what is generated for that.
12446 if test "$PORTNAME" != "win32"; then
12447    # Check whether --enable-largefile was given.
12448 if test "${enable_largefile+set}" = set; then :
12449   enableval=$enable_largefile;
12450 fi
12451
12452 if test "$enable_largefile" != no; then
12453
12454   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
12455 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
12456 if ${ac_cv_sys_largefile_CC+:} false; then :
12457   $as_echo_n "(cached) " >&6
12458 else
12459   ac_cv_sys_largefile_CC=no
12460      if test "$GCC" != yes; then
12461        ac_save_CC=$CC
12462        while :; do
12463          # IRIX 6.2 and later do not support large files by default,
12464          # so use the C compiler's -n32 option if that helps.
12465          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12466 /* end confdefs.h.  */
12467 #include <sys/types.h>
12468  /* Check that off_t can represent 2**63 - 1 correctly.
12469     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12470     since some C++ compilers masquerading as C compilers
12471     incorrectly reject 9223372036854775807.  */
12472 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12473   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12474                        && LARGE_OFF_T % 2147483647 == 1)
12475                       ? 1 : -1];
12476 int
12477 main ()
12478 {
12479
12480   ;
12481   return 0;
12482 }
12483 _ACEOF
12484          if ac_fn_c_try_compile "$LINENO"; then :
12485   break
12486 fi
12487 rm -f core conftest.err conftest.$ac_objext
12488          CC="$CC -n32"
12489          if ac_fn_c_try_compile "$LINENO"; then :
12490   ac_cv_sys_largefile_CC=' -n32'; break
12491 fi
12492 rm -f core conftest.err conftest.$ac_objext
12493          break
12494        done
12495        CC=$ac_save_CC
12496        rm -f conftest.$ac_ext
12497     fi
12498 fi
12499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
12500 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
12501   if test "$ac_cv_sys_largefile_CC" != no; then
12502     CC=$CC$ac_cv_sys_largefile_CC
12503   fi
12504
12505   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12506 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
12507 if ${ac_cv_sys_file_offset_bits+:} false; then :
12508   $as_echo_n "(cached) " >&6
12509 else
12510   while :; do
12511   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12512 /* end confdefs.h.  */
12513 #include <sys/types.h>
12514  /* Check that off_t can represent 2**63 - 1 correctly.
12515     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12516     since some C++ compilers masquerading as C compilers
12517     incorrectly reject 9223372036854775807.  */
12518 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12519   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12520                        && LARGE_OFF_T % 2147483647 == 1)
12521                       ? 1 : -1];
12522 int
12523 main ()
12524 {
12525
12526   ;
12527   return 0;
12528 }
12529 _ACEOF
12530 if ac_fn_c_try_compile "$LINENO"; then :
12531   ac_cv_sys_file_offset_bits=no; break
12532 fi
12533 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12534   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12535 /* end confdefs.h.  */
12536 #define _FILE_OFFSET_BITS 64
12537 #include <sys/types.h>
12538  /* Check that off_t can represent 2**63 - 1 correctly.
12539     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12540     since some C++ compilers masquerading as C compilers
12541     incorrectly reject 9223372036854775807.  */
12542 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12543   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12544                        && LARGE_OFF_T % 2147483647 == 1)
12545                       ? 1 : -1];
12546 int
12547 main ()
12548 {
12549
12550   ;
12551   return 0;
12552 }
12553 _ACEOF
12554 if ac_fn_c_try_compile "$LINENO"; then :
12555   ac_cv_sys_file_offset_bits=64; break
12556 fi
12557 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12558   ac_cv_sys_file_offset_bits=unknown
12559   break
12560 done
12561 fi
12562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
12563 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
12564 case $ac_cv_sys_file_offset_bits in #(
12565   no | unknown) ;;
12566   *)
12567 cat >>confdefs.h <<_ACEOF
12568 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
12569 _ACEOF
12570 ;;
12571 esac
12572 rm -rf conftest*
12573   if test $ac_cv_sys_file_offset_bits = unknown; then
12574     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
12575 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
12576 if ${ac_cv_sys_large_files+:} false; then :
12577   $as_echo_n "(cached) " >&6
12578 else
12579   while :; do
12580   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12581 /* end confdefs.h.  */
12582 #include <sys/types.h>
12583  /* Check that off_t can represent 2**63 - 1 correctly.
12584     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12585     since some C++ compilers masquerading as C compilers
12586     incorrectly reject 9223372036854775807.  */
12587 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12588   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12589                        && LARGE_OFF_T % 2147483647 == 1)
12590                       ? 1 : -1];
12591 int
12592 main ()
12593 {
12594
12595   ;
12596   return 0;
12597 }
12598 _ACEOF
12599 if ac_fn_c_try_compile "$LINENO"; then :
12600   ac_cv_sys_large_files=no; break
12601 fi
12602 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12603   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12604 /* end confdefs.h.  */
12605 #define _LARGE_FILES 1
12606 #include <sys/types.h>
12607  /* Check that off_t can represent 2**63 - 1 correctly.
12608     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12609     since some C++ compilers masquerading as C compilers
12610     incorrectly reject 9223372036854775807.  */
12611 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12612   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12613                        && LARGE_OFF_T % 2147483647 == 1)
12614                       ? 1 : -1];
12615 int
12616 main ()
12617 {
12618
12619   ;
12620   return 0;
12621 }
12622 _ACEOF
12623 if ac_fn_c_try_compile "$LINENO"; then :
12624   ac_cv_sys_large_files=1; break
12625 fi
12626 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12627   ac_cv_sys_large_files=unknown
12628   break
12629 done
12630 fi
12631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
12632 $as_echo "$ac_cv_sys_large_files" >&6; }
12633 case $ac_cv_sys_large_files in #(
12634   no | unknown) ;;
12635   *)
12636 cat >>confdefs.h <<_ACEOF
12637 #define _LARGE_FILES $ac_cv_sys_large_files
12638 _ACEOF
12639 ;;
12640 esac
12641 rm -rf conftest*
12642   fi
12643
12644
12645 fi
12646
12647
12648 fi
12649
12650 # Check for largefile support (must be after AC_SYS_LARGEFILE)
12651 # The cast to long int works around a bug in the HP C Compiler
12652 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12653 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12654 # This bug is HP SR number 8606223364.
12655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
12656 $as_echo_n "checking size of off_t... " >&6; }
12657 if ${ac_cv_sizeof_off_t+:} false; then :
12658   $as_echo_n "(cached) " >&6
12659 else
12660   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :
12661
12662 else
12663   if test "$ac_cv_type_off_t" = yes; then
12664      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12665 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12666 as_fn_error 77 "cannot compute sizeof (off_t)
12667 See \`config.log' for more details" "$LINENO" 5; }
12668    else
12669      ac_cv_sizeof_off_t=0
12670    fi
12671 fi
12672
12673 fi
12674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
12675 $as_echo "$ac_cv_sizeof_off_t" >&6; }
12676
12677
12678
12679 cat >>confdefs.h <<_ACEOF
12680 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
12681 _ACEOF
12682
12683
12684
12685 # If we don't have largefile support, can't handle segsize >= 2GB.
12686 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
12687    as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
12688 fi
12689
12690
12691 ##
12692 ## Functions, global variables
12693 ##
12694
12695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
12696 $as_echo_n "checking for int timezone... " >&6; }
12697 if ${pgac_cv_var_int_timezone+:} false; then :
12698   $as_echo_n "(cached) " >&6
12699 else
12700   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12701 /* end confdefs.h.  */
12702 #include <time.h>
12703 int res;
12704 int
12705 main ()
12706 {
12707 #ifndef __CYGWIN__
12708 res = timezone / 60;
12709 #else
12710 res = _timezone / 60;
12711 #endif
12712   ;
12713   return 0;
12714 }
12715 _ACEOF
12716 if ac_fn_c_try_link "$LINENO"; then :
12717   pgac_cv_var_int_timezone=yes
12718 else
12719   pgac_cv_var_int_timezone=no
12720 fi
12721 rm -f core conftest.err conftest.$ac_objext \
12722     conftest$ac_exeext conftest.$ac_ext
12723 fi
12724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
12725 $as_echo "$pgac_cv_var_int_timezone" >&6; }
12726 if test x"$pgac_cv_var_int_timezone" = xyes ; then
12727
12728 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
12729
12730 fi
12731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for accept()" >&5
12732 $as_echo_n "checking types of arguments for accept()... " >&6; }
12733  if ${ac_cv_func_accept_return+:} false; then :
12734   $as_echo_n "(cached) " >&6
12735 else
12736    if ${ac_cv_func_accept_arg1+:} false; then :
12737   $as_echo_n "(cached) " >&6
12738 else
12739     if ${ac_cv_func_accept_arg2+:} false; then :
12740   $as_echo_n "(cached) " >&6
12741 else
12742      if ${ac_cv_func_accept_arg3+:} false; then :
12743   $as_echo_n "(cached) " >&6
12744 else
12745       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL' 'SOCKET WSAAPI'; do
12746       for ac_cv_func_accept_arg1 in 'int' 'unsigned int' 'SOCKET'; do
12747        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
12748         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
12749          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12750 /* end confdefs.h.  */
12751 #include <sys/types.h>
12752 #include <sys/socket.h>
12753 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
12754 _ACEOF
12755 if ac_fn_c_try_compile "$LINENO"; then :
12756   ac_not_found=no; break 4
12757 else
12758   ac_not_found=yes
12759 fi
12760 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12761        done
12762       done
12763      done
12764     done
12765     if test "$ac_not_found" = yes; then
12766       as_fn_error $? "could not determine argument types" "$LINENO" 5
12767     fi
12768     if test "$ac_cv_func_accept_arg3" = "void"; then
12769       ac_cv_func_accept_arg3=int
12770     fi
12771
12772 fi
12773
12774 fi
12775
12776 fi
12777
12778 fi
12779  { $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
12780 $as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
12781
12782 cat >>confdefs.h <<_ACEOF
12783 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
12784 _ACEOF
12785
12786
12787 cat >>confdefs.h <<_ACEOF
12788 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
12789 _ACEOF
12790
12791
12792 cat >>confdefs.h <<_ACEOF
12793 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
12794 _ACEOF
12795
12796
12797 cat >>confdefs.h <<_ACEOF
12798 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
12799 _ACEOF
12800
12801
12802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
12803 $as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
12804 if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
12805   $as_echo_n "(cached) " >&6
12806 else
12807   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12808 /* end confdefs.h.  */
12809 #include <sys/time.h>
12810 int
12811 main ()
12812 {
12813 struct timeval *tp;
12814 struct timezone *tzp;
12815 gettimeofday(tp,tzp);
12816   ;
12817   return 0;
12818 }
12819 _ACEOF
12820 if ac_fn_c_try_compile "$LINENO"; then :
12821   pgac_cv_func_gettimeofday_1arg=no
12822 else
12823   pgac_cv_func_gettimeofday_1arg=yes
12824 fi
12825 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12826 fi
12827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5
12828 $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
12829 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
12830
12831 $as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
12832
12833 fi
12834
12835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcstombs_l declaration" >&5
12836 $as_echo_n "checking for wcstombs_l declaration... " >&6; }
12837 if ${pgac_cv_func_wcstombs_l+:} false; then :
12838   $as_echo_n "(cached) " >&6
12839 else
12840   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12841 /* end confdefs.h.  */
12842 #include <stdlib.h>
12843 #include <locale.h>
12844 int
12845 main ()
12846 {
12847 #ifndef wcstombs_l
12848 (void) wcstombs_l;
12849 #endif
12850   ;
12851   return 0;
12852 }
12853 _ACEOF
12854 if ac_fn_c_try_compile "$LINENO"; then :
12855   pgac_cv_func_wcstombs_l='yes'
12856 else
12857   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12858 /* end confdefs.h.  */
12859 #include <stdlib.h>
12860 #include <locale.h>
12861 #include <xlocale.h>
12862 int
12863 main ()
12864 {
12865 #ifndef wcstombs_l
12866 (void) wcstombs_l;
12867 #endif
12868   ;
12869   return 0;
12870 }
12871 _ACEOF
12872 if ac_fn_c_try_compile "$LINENO"; then :
12873   pgac_cv_func_wcstombs_l='yes (in xlocale.h)'
12874 else
12875   pgac_cv_func_wcstombs_l='no'
12876 fi
12877 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12878 fi
12879 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12880 fi
12881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_wcstombs_l" >&5
12882 $as_echo "$pgac_cv_func_wcstombs_l" >&6; }
12883 if test "$pgac_cv_func_wcstombs_l" = 'yes (in xlocale.h)'; then
12884
12885 $as_echo "#define WCSTOMBS_L_IN_XLOCALE 1" >>confdefs.h
12886
12887 fi
12888
12889 # Some versions of libedit contain strlcpy(), setproctitle(), and other
12890 # symbols that that library has no business exposing to the world.  Pending
12891 # acquisition of a clue by those developers, ignore libedit (including its
12892 # possible alias of libreadline) while checking for everything else.
12893 LIBS_including_readline="$LIBS"
12894 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
12895
12896 for ac_func in cbrt clock_gettime 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
12897 do :
12898   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12899 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12900 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12901   cat >>confdefs.h <<_ACEOF
12902 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12903 _ACEOF
12904
12905 fi
12906 done
12907
12908
12909 ac_fn_c_check_func "$LINENO" "fseeko" "ac_cv_func_fseeko"
12910 if test "x$ac_cv_func_fseeko" = xyes; then :
12911   $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
12912
12913 else
12914   case " $LIBOBJS " in
12915   *" fseeko.$ac_objext "* ) ;;
12916   *) LIBOBJS="$LIBOBJS fseeko.$ac_objext"
12917  ;;
12918 esac
12919
12920 fi
12921
12922
12923 case $host_os in
12924         # NetBSD uses a custom fseeko/ftello built on fsetpos/fgetpos
12925         # Mingw uses macros to access Win32 API calls
12926         netbsd*|mingw*)
12927
12928 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
12929
12930                 ac_cv_func_fseeko=yes;;
12931         *)
12932                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
12933 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
12934 if ${ac_cv_sys_largefile_source+:} false; then :
12935   $as_echo_n "(cached) " >&6
12936 else
12937   while :; do
12938   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12939 /* end confdefs.h.  */
12940 #include <sys/types.h> /* for off_t */
12941      #include <stdio.h>
12942 int
12943 main ()
12944 {
12945 int (*fp) (FILE *, off_t, int) = fseeko;
12946      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
12947   ;
12948   return 0;
12949 }
12950 _ACEOF
12951 if ac_fn_c_try_link "$LINENO"; then :
12952   ac_cv_sys_largefile_source=no; break
12953 fi
12954 rm -f core conftest.err conftest.$ac_objext \
12955     conftest$ac_exeext conftest.$ac_ext
12956   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12957 /* end confdefs.h.  */
12958 #define _LARGEFILE_SOURCE 1
12959 #include <sys/types.h> /* for off_t */
12960      #include <stdio.h>
12961 int
12962 main ()
12963 {
12964 int (*fp) (FILE *, off_t, int) = fseeko;
12965      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
12966   ;
12967   return 0;
12968 }
12969 _ACEOF
12970 if ac_fn_c_try_link "$LINENO"; then :
12971   ac_cv_sys_largefile_source=1; break
12972 fi
12973 rm -f core conftest.err conftest.$ac_objext \
12974     conftest$ac_exeext conftest.$ac_ext
12975   ac_cv_sys_largefile_source=unknown
12976   break
12977 done
12978 fi
12979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
12980 $as_echo "$ac_cv_sys_largefile_source" >&6; }
12981 case $ac_cv_sys_largefile_source in #(
12982   no | unknown) ;;
12983   *)
12984 cat >>confdefs.h <<_ACEOF
12985 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
12986 _ACEOF
12987 ;;
12988 esac
12989 rm -rf conftest*
12990
12991 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
12992 # in glibc 2.1.3, but that breaks too many other things.
12993 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
12994 if test $ac_cv_sys_largefile_source != unknown; then
12995
12996 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
12997
12998 fi
12999 ;;
13000 esac
13001
13002 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
13003 # by calling it, 2009-04-02
13004 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
13005 if test "$PORTNAME" != "solaris"; then
13006 for ac_func in posix_fadvise
13007 do :
13008   ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
13009 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
13010   cat >>confdefs.h <<_ACEOF
13011 #define HAVE_POSIX_FADVISE 1
13012 _ACEOF
13013
13014 fi
13015 done
13016
13017 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
13018 "
13019 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
13020   ac_have_decl=1
13021 else
13022   ac_have_decl=0
13023 fi
13024
13025 cat >>confdefs.h <<_ACEOF
13026 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
13027 _ACEOF
13028
13029 fi
13030
13031 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
13032 "
13033 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
13034   ac_have_decl=1
13035 else
13036   ac_have_decl=0
13037 fi
13038
13039 cat >>confdefs.h <<_ACEOF
13040 #define HAVE_DECL_FDATASYNC $ac_have_decl
13041 _ACEOF
13042
13043 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
13044 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
13045   ac_have_decl=1
13046 else
13047   ac_have_decl=0
13048 fi
13049
13050 cat >>confdefs.h <<_ACEOF
13051 #define HAVE_DECL_STRLCAT $ac_have_decl
13052 _ACEOF
13053 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
13054 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
13055   ac_have_decl=1
13056 else
13057   ac_have_decl=0
13058 fi
13059
13060 cat >>confdefs.h <<_ACEOF
13061 #define HAVE_DECL_STRLCPY $ac_have_decl
13062 _ACEOF
13063
13064 # This is probably only present on macOS, but may as well check always
13065 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
13066 "
13067 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
13068   ac_have_decl=1
13069 else
13070   ac_have_decl=0
13071 fi
13072
13073 cat >>confdefs.h <<_ACEOF
13074 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
13075 _ACEOF
13076
13077
13078 HAVE_IPV6=no
13079 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default
13080 #include <netinet/in.h>
13081 "
13082 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
13083
13084 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
13085
13086          HAVE_IPV6=yes
13087 fi
13088
13089
13090
13091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
13092 $as_echo_n "checking for PS_STRINGS... " >&6; }
13093 if ${pgac_cv_var_PS_STRINGS+:} false; then :
13094   $as_echo_n "(cached) " >&6
13095 else
13096   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13097 /* end confdefs.h.  */
13098 #include <machine/vmparam.h>
13099 #include <sys/exec.h>
13100
13101 int
13102 main ()
13103 {
13104 PS_STRINGS->ps_nargvstr = 1;
13105 PS_STRINGS->ps_argvstr = "foo";
13106   ;
13107   return 0;
13108 }
13109 _ACEOF
13110 if ac_fn_c_try_link "$LINENO"; then :
13111   pgac_cv_var_PS_STRINGS=yes
13112 else
13113   pgac_cv_var_PS_STRINGS=no
13114 fi
13115 rm -f core conftest.err conftest.$ac_objext \
13116     conftest$ac_exeext conftest.$ac_ext
13117 fi
13118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
13119 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
13120 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
13121
13122 $as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
13123
13124 fi
13125
13126
13127 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
13128 # is missing.  Yes, there are machines that have only one.  We may
13129 # also decide to use snprintf.c if snprintf() is present but does not
13130 # have all the features we need --- see below.
13131
13132 if test "$PORTNAME" = "win32"; then
13133   # Win32 gets snprintf.c built unconditionally.
13134   #
13135   # To properly translate all NLS languages strings, we must support the
13136   # *printf() %$ format, which allows *printf() arguments to be selected
13137   # by position in the translated string.
13138   #
13139   # libintl versions < 0.13 use the native *printf() functions, and Win32
13140   # *printf() doesn't understand %$, so we must use our /port versions,
13141   # which do understand %$. libintl versions >= 0.13 include their own
13142   # *printf versions on Win32.  The libintl 0.13 release note text is:
13143   #
13144   #   C format strings with positions, as they arise when a translator
13145   #   needs to reorder a sentence, are now supported on all platforms.
13146   #   On those few platforms (NetBSD and Woe32) for which the native
13147   #   printf()/fprintf()/... functions don't support such format
13148   #   strings, replacements are provided through <libintl.h>.
13149   #
13150   # We could use libintl >= 0.13's *printf() if we were sure that we had
13151   # a litint >= 0.13 at runtime, but seeing that there is no clean way
13152   # to guarantee that, it is best to just use our own, so we are sure to
13153   # get %$ support. In include/port.h we disable the *printf() macros
13154   # that might have been defined by libintl.
13155   #
13156   # We do this unconditionally whether NLS is used or not so we are sure
13157   # that all Win32 libraries and binaries behave the same.
13158   pgac_need_repl_snprintf=yes
13159 else
13160   pgac_need_repl_snprintf=no
13161   for ac_func in snprintf
13162 do :
13163   ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
13164 if test "x$ac_cv_func_snprintf" = xyes; then :
13165   cat >>confdefs.h <<_ACEOF
13166 #define HAVE_SNPRINTF 1
13167 _ACEOF
13168
13169 else
13170   pgac_need_repl_snprintf=yes
13171 fi
13172 done
13173
13174   for ac_func in vsnprintf
13175 do :
13176   ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
13177 if test "x$ac_cv_func_vsnprintf" = xyes; then :
13178   cat >>confdefs.h <<_ACEOF
13179 #define HAVE_VSNPRINTF 1
13180 _ACEOF
13181
13182 else
13183   pgac_need_repl_snprintf=yes
13184 fi
13185 done
13186
13187 fi
13188
13189
13190 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
13191 # include/c.h will provide declarations.  Note this is a separate test
13192 # from whether the functions exist in the C library --- there are
13193 # systems that have the functions but don't bother to declare them :-(
13194
13195 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
13196 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
13197   ac_have_decl=1
13198 else
13199   ac_have_decl=0
13200 fi
13201
13202 cat >>confdefs.h <<_ACEOF
13203 #define HAVE_DECL_SNPRINTF $ac_have_decl
13204 _ACEOF
13205 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
13206 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
13207   ac_have_decl=1
13208 else
13209   ac_have_decl=0
13210 fi
13211
13212 cat >>confdefs.h <<_ACEOF
13213 #define HAVE_DECL_VSNPRINTF $ac_have_decl
13214 _ACEOF
13215
13216
13217
13218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf" >&5
13219 $as_echo_n "checking for isinf... " >&6; }
13220 if ${ac_cv_func_isinf+:} false; then :
13221   $as_echo_n "(cached) " >&6
13222 else
13223   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13224 /* end confdefs.h.  */
13225
13226 #include <math.h>
13227 double glob_double;
13228
13229 int
13230 main ()
13231 {
13232 return isinf(glob_double) ? 0 : 1;
13233   ;
13234   return 0;
13235 }
13236 _ACEOF
13237 if ac_fn_c_try_link "$LINENO"; then :
13238   ac_cv_func_isinf=yes
13239 else
13240   ac_cv_func_isinf=no
13241 fi
13242 rm -f core conftest.err conftest.$ac_objext \
13243     conftest$ac_exeext conftest.$ac_ext
13244 fi
13245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_isinf" >&5
13246 $as_echo "$ac_cv_func_isinf" >&6; }
13247
13248 if test $ac_cv_func_isinf = yes ; then
13249
13250 $as_echo "#define HAVE_ISINF 1" >>confdefs.h
13251
13252 else
13253   case " $LIBOBJS " in
13254   *" isinf.$ac_objext "* ) ;;
13255   *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
13256  ;;
13257 esac
13258
13259   # Look for a way to implement a substitute for isinf()
13260   for ac_func in fpclass fp_class fp_class_d class
13261 do :
13262   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13263 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13264 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13265   cat >>confdefs.h <<_ACEOF
13266 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13267 _ACEOF
13268  break
13269 fi
13270 done
13271
13272 fi
13273
13274 ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
13275 if test "x$ac_cv_func_crypt" = xyes; then :
13276   $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
13277
13278 else
13279   case " $LIBOBJS " in
13280   *" crypt.$ac_objext "* ) ;;
13281   *) LIBOBJS="$LIBOBJS crypt.$ac_objext"
13282  ;;
13283 esac
13284
13285 fi
13286
13287 ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
13288 if test "x$ac_cv_func_fls" = xyes; then :
13289   $as_echo "#define HAVE_FLS 1" >>confdefs.h
13290
13291 else
13292   case " $LIBOBJS " in
13293   *" fls.$ac_objext "* ) ;;
13294   *) LIBOBJS="$LIBOBJS fls.$ac_objext"
13295  ;;
13296 esac
13297
13298 fi
13299
13300 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
13301 if test "x$ac_cv_func_getopt" = xyes; then :
13302   $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
13303
13304 else
13305   case " $LIBOBJS " in
13306   *" getopt.$ac_objext "* ) ;;
13307   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
13308  ;;
13309 esac
13310
13311 fi
13312
13313 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
13314 if test "x$ac_cv_func_getrusage" = xyes; then :
13315   $as_echo "#define HAVE_GETRUSAGE 1" >>confdefs.h
13316
13317 else
13318   case " $LIBOBJS " in
13319   *" getrusage.$ac_objext "* ) ;;
13320   *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
13321  ;;
13322 esac
13323
13324 fi
13325
13326 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
13327 if test "x$ac_cv_func_inet_aton" = xyes; then :
13328   $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
13329
13330 else
13331   case " $LIBOBJS " in
13332   *" inet_aton.$ac_objext "* ) ;;
13333   *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
13334  ;;
13335 esac
13336
13337 fi
13338
13339 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
13340 if test "x$ac_cv_func_mkdtemp" = xyes; then :
13341   $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
13342
13343 else
13344   case " $LIBOBJS " in
13345   *" mkdtemp.$ac_objext "* ) ;;
13346   *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
13347  ;;
13348 esac
13349
13350 fi
13351
13352 ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
13353 if test "x$ac_cv_func_random" = xyes; then :
13354   $as_echo "#define HAVE_RANDOM 1" >>confdefs.h
13355
13356 else
13357   case " $LIBOBJS " in
13358   *" random.$ac_objext "* ) ;;
13359   *) LIBOBJS="$LIBOBJS random.$ac_objext"
13360  ;;
13361 esac
13362
13363 fi
13364
13365 ac_fn_c_check_func "$LINENO" "rint" "ac_cv_func_rint"
13366 if test "x$ac_cv_func_rint" = xyes; then :
13367   $as_echo "#define HAVE_RINT 1" >>confdefs.h
13368
13369 else
13370   case " $LIBOBJS " in
13371   *" rint.$ac_objext "* ) ;;
13372   *) LIBOBJS="$LIBOBJS rint.$ac_objext"
13373  ;;
13374 esac
13375
13376 fi
13377
13378 ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
13379 if test "x$ac_cv_func_srandom" = xyes; then :
13380   $as_echo "#define HAVE_SRANDOM 1" >>confdefs.h
13381
13382 else
13383   case " $LIBOBJS " in
13384   *" srandom.$ac_objext "* ) ;;
13385   *) LIBOBJS="$LIBOBJS srandom.$ac_objext"
13386  ;;
13387 esac
13388
13389 fi
13390
13391 ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
13392 if test "x$ac_cv_func_strerror" = xyes; then :
13393   $as_echo "#define HAVE_STRERROR 1" >>confdefs.h
13394
13395 else
13396   case " $LIBOBJS " in
13397   *" strerror.$ac_objext "* ) ;;
13398   *) LIBOBJS="$LIBOBJS strerror.$ac_objext"
13399  ;;
13400 esac
13401
13402 fi
13403
13404 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
13405 if test "x$ac_cv_func_strlcat" = xyes; then :
13406   $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
13407
13408 else
13409   case " $LIBOBJS " in
13410   *" strlcat.$ac_objext "* ) ;;
13411   *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
13412  ;;
13413 esac
13414
13415 fi
13416
13417 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
13418 if test "x$ac_cv_func_strlcpy" = xyes; then :
13419   $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
13420
13421 else
13422   case " $LIBOBJS " in
13423   *" strlcpy.$ac_objext "* ) ;;
13424   *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
13425  ;;
13426 esac
13427
13428 fi
13429
13430
13431
13432 case $host_os in
13433
13434         # Windows uses a specialised env handler
13435         # and doesn't need a replacement getpeereid because it doesn't use
13436         # Unix sockets.
13437         mingw*)
13438
13439 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
13440
13441
13442 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
13443
13444                 ac_cv_func_unsetenv=yes
13445                 ac_cv_func_getpeereid=yes;;
13446         *)
13447                 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
13448 if test "x$ac_cv_func_unsetenv" = xyes; then :
13449   $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
13450
13451 else
13452   case " $LIBOBJS " in
13453   *" unsetenv.$ac_objext "* ) ;;
13454   *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext"
13455  ;;
13456 esac
13457
13458 fi
13459
13460 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
13461 if test "x$ac_cv_func_getpeereid" = xyes; then :
13462   $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
13463
13464 else
13465   case " $LIBOBJS " in
13466   *" getpeereid.$ac_objext "* ) ;;
13467   *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
13468  ;;
13469 esac
13470
13471 fi
13472
13473
13474                 ;;
13475 esac
13476
13477 # System's version of getaddrinfo(), if any, may be used only if we found
13478 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
13479 # We use only our own getaddrinfo.c on Windows, but it's time to revisit that.
13480 if test x"$ac_cv_type_struct_addrinfo" = xyes && \
13481    test "$PORTNAME" != "win32"; then
13482   ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
13483 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
13484   $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
13485
13486 else
13487   case " $LIBOBJS " in
13488   *" getaddrinfo.$ac_objext "* ) ;;
13489   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
13490  ;;
13491 esac
13492
13493 fi
13494
13495
13496 else
13497   case " $LIBOBJS " in
13498   *" getaddrinfo.$ac_objext "* ) ;;
13499   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
13500  ;;
13501 esac
13502
13503 fi
13504
13505 # Similarly, use system's getopt_long() only if system provides struct option.
13506 if test x"$ac_cv_type_struct_option" = xyes ; then
13507   ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
13508 if test "x$ac_cv_func_getopt_long" = xyes; then :
13509   $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
13510
13511 else
13512   case " $LIBOBJS " in
13513   *" getopt_long.$ac_objext "* ) ;;
13514   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
13515  ;;
13516 esac
13517
13518 fi
13519
13520
13521 else
13522   case " $LIBOBJS " in
13523   *" getopt_long.$ac_objext "* ) ;;
13524   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
13525  ;;
13526 esac
13527
13528 fi
13529
13530 # Solaris' getopt() doesn't do what we want for long options, so always use
13531 # our version on that platform.
13532 if test "$PORTNAME" = "solaris"; then
13533   case " $LIBOBJS " in
13534   *" getopt.$ac_objext "* ) ;;
13535   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
13536  ;;
13537 esac
13538
13539 fi
13540
13541 # mingw has adopted a GNU-centric interpretation of optind/optreset,
13542 # so always use our version on Windows.
13543 if test "$PORTNAME" = "win32"; then
13544   case " $LIBOBJS " in
13545   *" getopt.$ac_objext "* ) ;;
13546   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
13547  ;;
13548 esac
13549
13550   case " $LIBOBJS " in
13551   *" getopt_long.$ac_objext "* ) ;;
13552   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
13553  ;;
13554 esac
13555
13556 fi
13557
13558 # Win32 (really MinGW) support
13559 if test "$PORTNAME" = "win32"; then
13560   ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
13561 if test "x$ac_cv_func_gettimeofday" = xyes; then :
13562   $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
13563
13564 else
13565   case " $LIBOBJS " in
13566   *" gettimeofday.$ac_objext "* ) ;;
13567   *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
13568  ;;
13569 esac
13570
13571 fi
13572
13573
13574   case " $LIBOBJS " in
13575   *" dirmod.$ac_objext "* ) ;;
13576   *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
13577  ;;
13578 esac
13579
13580   case " $LIBOBJS " in
13581   *" kill.$ac_objext "* ) ;;
13582   *) LIBOBJS="$LIBOBJS kill.$ac_objext"
13583  ;;
13584 esac
13585
13586   case " $LIBOBJS " in
13587   *" open.$ac_objext "* ) ;;
13588   *) LIBOBJS="$LIBOBJS open.$ac_objext"
13589  ;;
13590 esac
13591
13592   case " $LIBOBJS " in
13593   *" system.$ac_objext "* ) ;;
13594   *) LIBOBJS="$LIBOBJS system.$ac_objext"
13595  ;;
13596 esac
13597
13598   case " $LIBOBJS " in
13599   *" win32env.$ac_objext "* ) ;;
13600   *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
13601  ;;
13602 esac
13603
13604   case " $LIBOBJS " in
13605   *" win32error.$ac_objext "* ) ;;
13606   *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
13607  ;;
13608 esac
13609
13610   case " $LIBOBJS " in
13611   *" win32security.$ac_objext "* ) ;;
13612   *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
13613  ;;
13614 esac
13615
13616   case " $LIBOBJS " in
13617   *" win32setlocale.$ac_objext "* ) ;;
13618   *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
13619  ;;
13620 esac
13621
13622
13623 $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
13624
13625   ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
13626 #define WIN32_LEAN_AND_MEAN
13627 #include <windows.h>
13628 #include <string.h>
13629 #include <dbghelp.h>
13630 "
13631 if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
13632
13633 cat >>confdefs.h <<_ACEOF
13634 #define HAVE_MINIDUMP_TYPE 1
13635 _ACEOF
13636
13637 pgac_minidump_type=yes
13638 else
13639   pgac_minidump_type=no
13640 fi
13641
13642 fi
13643 if test x"$pgac_minidump_type" = x"yes" ; then
13644   have_win32_dbghelp=yes
13645
13646 else
13647   have_win32_dbghelp=no
13648
13649 fi
13650
13651 # Cygwin needs only a bit of that
13652 if test "$PORTNAME" = "cygwin"; then
13653   case " $LIBOBJS " in
13654   *" dirmod.$ac_objext "* ) ;;
13655   *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
13656  ;;
13657 esac
13658
13659 fi
13660
13661 ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
13662 /* NetBSD declares sys_siglist in unistd.h.  */
13663 #ifdef HAVE_UNISTD_H
13664 # include <unistd.h>
13665 #endif
13666
13667 "
13668 if test "x$ac_cv_have_decl_sys_siglist" = xyes; then :
13669   ac_have_decl=1
13670 else
13671   ac_have_decl=0
13672 fi
13673
13674 cat >>confdefs.h <<_ACEOF
13675 #define HAVE_DECL_SYS_SIGLIST $ac_have_decl
13676 _ACEOF
13677
13678
13679 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
13680 if test "x$ac_cv_func_syslog" = xyes; then :
13681   ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
13682 if test "x$ac_cv_header_syslog_h" = xyes; then :
13683
13684 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
13685
13686 fi
13687
13688
13689 fi
13690
13691
13692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
13693 $as_echo_n "checking for opterr... " >&6; }
13694 if ${pgac_cv_var_int_opterr+:} false; then :
13695   $as_echo_n "(cached) " >&6
13696 else
13697   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13698 /* end confdefs.h.  */
13699 #include <unistd.h>
13700 int
13701 main ()
13702 {
13703 extern int opterr; opterr = 1;
13704   ;
13705   return 0;
13706 }
13707 _ACEOF
13708 if ac_fn_c_try_link "$LINENO"; then :
13709   pgac_cv_var_int_opterr=yes
13710 else
13711   pgac_cv_var_int_opterr=no
13712 fi
13713 rm -f core conftest.err conftest.$ac_objext \
13714     conftest$ac_exeext conftest.$ac_ext
13715 fi
13716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
13717 $as_echo "$pgac_cv_var_int_opterr" >&6; }
13718 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
13719
13720 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
13721
13722 fi
13723
13724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
13725 $as_echo_n "checking for optreset... " >&6; }
13726 if ${pgac_cv_var_int_optreset+:} false; then :
13727   $as_echo_n "(cached) " >&6
13728 else
13729   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13730 /* end confdefs.h.  */
13731 #include <unistd.h>
13732 int
13733 main ()
13734 {
13735 extern int optreset; optreset = 1;
13736   ;
13737   return 0;
13738 }
13739 _ACEOF
13740 if ac_fn_c_try_link "$LINENO"; then :
13741   pgac_cv_var_int_optreset=yes
13742 else
13743   pgac_cv_var_int_optreset=no
13744 fi
13745 rm -f core conftest.err conftest.$ac_objext \
13746     conftest$ac_exeext conftest.$ac_ext
13747 fi
13748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
13749 $as_echo "$pgac_cv_var_int_optreset" >&6; }
13750 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
13751
13752 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
13753
13754 fi
13755
13756 for ac_func in strtoll strtoq
13757 do :
13758   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13759 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13760 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13761   cat >>confdefs.h <<_ACEOF
13762 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13763 _ACEOF
13764  break
13765 fi
13766 done
13767
13768 for ac_func in strtoull strtouq
13769 do :
13770   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13771 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13772 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13773   cat >>confdefs.h <<_ACEOF
13774 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13775 _ACEOF
13776  break
13777 fi
13778 done
13779
13780
13781 if test "$with_icu" = yes; then
13782   # ICU functions are macros, so we need to do this the long way.
13783
13784   # ucol_strcollUTF8() appeared in ICU 50.
13785   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ucol_strcollUTF8" >&5
13786 $as_echo_n "checking for ucol_strcollUTF8... " >&6; }
13787 if ${pgac_cv_func_ucol_strcollUTF8+:} false; then :
13788   $as_echo_n "(cached) " >&6
13789 else
13790   ac_save_CPPFLAGS=$CPPFLAGS
13791 CPPFLAGS="$ICU_CFLAGS $CPPFLAGS"
13792 ac_save_LIBS=$LIBS
13793 LIBS="$ICU_LIBS $LIBS"
13794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13795 /* end confdefs.h.  */
13796 #include <unicode/ucol.h>
13797
13798 int
13799 main ()
13800 {
13801 ucol_strcollUTF8(NULL, NULL, 0, NULL, 0, NULL);
13802   ;
13803   return 0;
13804 }
13805 _ACEOF
13806 if ac_fn_c_try_link "$LINENO"; then :
13807   pgac_cv_func_ucol_strcollUTF8=yes
13808 else
13809   pgac_cv_func_ucol_strcollUTF8=no
13810 fi
13811 rm -f core conftest.err conftest.$ac_objext \
13812     conftest$ac_exeext conftest.$ac_ext
13813 CPPFLAGS=$ac_save_CPPFLAGS
13814 LIBS=$ac_save_LIBS
13815 fi
13816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_ucol_strcollUTF8" >&5
13817 $as_echo "$pgac_cv_func_ucol_strcollUTF8" >&6; }
13818   if test "$pgac_cv_func_ucol_strcollUTF8" = yes ; then
13819
13820 $as_echo "#define HAVE_UCOL_STRCOLLUTF8 1" >>confdefs.h
13821
13822   fi
13823 fi
13824
13825 # Lastly, restore full LIBS list and check for readline/libedit symbols
13826 LIBS="$LIBS_including_readline"
13827
13828 if test "$with_readline" = yes; then
13829   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_append_character" >&5
13830 $as_echo_n "checking for rl_completion_append_character... " >&6; }
13831 if ${pgac_cv_var_rl_completion_append_character+:} false; then :
13832   $as_echo_n "(cached) " >&6
13833 else
13834   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13835 /* end confdefs.h.  */
13836 #include <stdio.h>
13837 #ifdef HAVE_READLINE_READLINE_H
13838 # include <readline/readline.h>
13839 #elif defined(HAVE_READLINE_H)
13840 # include <readline.h>
13841 #endif
13842
13843 int
13844 main ()
13845 {
13846 rl_completion_append_character = 'x';
13847   ;
13848   return 0;
13849 }
13850 _ACEOF
13851 if ac_fn_c_try_link "$LINENO"; then :
13852   pgac_cv_var_rl_completion_append_character=yes
13853 else
13854   pgac_cv_var_rl_completion_append_character=no
13855 fi
13856 rm -f core conftest.err conftest.$ac_objext \
13857     conftest$ac_exeext conftest.$ac_ext
13858 fi
13859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_append_character" >&5
13860 $as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
13861 if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
13862
13863 $as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
13864
13865 fi
13866   for ac_func in rl_completion_matches rl_filename_completion_function rl_reset_screen_size
13867 do :
13868   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13869 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13870 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13871   cat >>confdefs.h <<_ACEOF
13872 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13873 _ACEOF
13874
13875 fi
13876 done
13877
13878   for ac_func in append_history history_truncate_file
13879 do :
13880   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13881 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13882 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13883   cat >>confdefs.h <<_ACEOF
13884 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13885 _ACEOF
13886
13887 fi
13888 done
13889
13890 fi
13891
13892
13893 # This test makes sure that run tests work at all.  Sometimes a shared
13894 # library is found by the linker, but the runtime linker can't find it.
13895 # This check should come after all modifications of compiler or linker
13896 # variables, and before any other run tests.
13897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
13898 $as_echo_n "checking test program... " >&6; }
13899 if test "$cross_compiling" = yes; then :
13900   { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
13901 $as_echo "cross-compiling" >&6; }
13902 else
13903   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13904 /* end confdefs.h.  */
13905 int main() { return 0; }
13906 _ACEOF
13907 if ac_fn_c_try_run "$LINENO"; then :
13908   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
13909 $as_echo "ok" >&6; }
13910 else
13911   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
13912 $as_echo "failed" >&6; }
13913 as_fn_error $? "
13914 Could not execute a simple test program.  This may be a problem
13915 related to locating shared libraries.  Check the file 'config.log'
13916 for the exact reason." "$LINENO" 5
13917 fi
13918 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13919   conftest.$ac_objext conftest.beam conftest.$ac_ext
13920 fi
13921
13922
13923 # --------------------
13924 # Run tests below here
13925 # --------------------
13926
13927 # Force use of our snprintf if system's doesn't do arg control
13928 # See comment above at snprintf test for details.
13929 if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
13930   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports argument control" >&5
13931 $as_echo_n "checking whether snprintf supports argument control... " >&6; }
13932 if ${pgac_cv_snprintf_arg_control+:} false; then :
13933   $as_echo_n "(cached) " >&6
13934 else
13935   if test "$cross_compiling" = yes; then :
13936   pgac_cv_snprintf_arg_control=cross
13937 else
13938   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13939 /* end confdefs.h.  */
13940 #include <stdio.h>
13941 #include <string.h>
13942
13943 int main()
13944 {
13945   char buf[100];
13946
13947   /* can it swap arguments? */
13948   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
13949   if (strcmp(buf, "4 3") != 0)
13950     return 1;
13951   return 0;
13952 }
13953 _ACEOF
13954 if ac_fn_c_try_run "$LINENO"; then :
13955   pgac_cv_snprintf_arg_control=yes
13956 else
13957   pgac_cv_snprintf_arg_control=no
13958 fi
13959 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13960   conftest.$ac_objext conftest.beam conftest.$ac_ext
13961 fi
13962
13963
13964 fi
13965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_arg_control" >&5
13966 $as_echo "$pgac_cv_snprintf_arg_control" >&6; }
13967
13968   if test $pgac_cv_snprintf_arg_control != yes ; then
13969     pgac_need_repl_snprintf=yes
13970   fi
13971 fi
13972
13973
13974
13975
13976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
13977 $as_echo_n "checking whether long int is 64 bits... " >&6; }
13978 if ${pgac_cv_type_long_int_64+:} false; then :
13979   $as_echo_n "(cached) " >&6
13980 else
13981   if test "$cross_compiling" = yes; then :
13982   # If cross-compiling, check the size reported by the compiler and
13983 # trust that the arithmetic works.
13984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13985 /* end confdefs.h.  */
13986
13987 int
13988 main ()
13989 {
13990 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
13991 test_array [0] = 0;
13992 return test_array [0];
13993
13994   ;
13995   return 0;
13996 }
13997 _ACEOF
13998 if ac_fn_c_try_compile "$LINENO"; then :
13999   pgac_cv_type_long_int_64=yes
14000 else
14001   pgac_cv_type_long_int_64=no
14002 fi
14003 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14004 else
14005   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14006 /* end confdefs.h.  */
14007 typedef long int ac_int64;
14008
14009 /*
14010  * These are globals to discourage the compiler from folding all the
14011  * arithmetic tests down to compile-time constants.
14012  */
14013 ac_int64 a = 20000001;
14014 ac_int64 b = 40000005;
14015
14016 int does_int64_work()
14017 {
14018   ac_int64 c,d;
14019
14020   if (sizeof(ac_int64) != 8)
14021     return 0;                   /* definitely not the right size */
14022
14023   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
14024   c = a * b;
14025   d = (c + b) / b;
14026   if (d != a+1)
14027     return 0;
14028   return 1;
14029 }
14030
14031 int
14032 main() {
14033   return (! does_int64_work());
14034 }
14035 _ACEOF
14036 if ac_fn_c_try_run "$LINENO"; then :
14037   pgac_cv_type_long_int_64=yes
14038 else
14039   pgac_cv_type_long_int_64=no
14040 fi
14041 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14042   conftest.$ac_objext conftest.beam conftest.$ac_ext
14043 fi
14044
14045 fi
14046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
14047 $as_echo "$pgac_cv_type_long_int_64" >&6; }
14048
14049 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
14050 if test x"$pgac_cv_type_long_int_64" = xyes ; then
14051
14052 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
14053
14054 fi
14055
14056
14057 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
14058   pg_int64_type="long int"
14059 else
14060   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
14061 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
14062 if ${pgac_cv_type_long_long_int_64+:} false; then :
14063   $as_echo_n "(cached) " >&6
14064 else
14065   if test "$cross_compiling" = yes; then :
14066   # If cross-compiling, check the size reported by the compiler and
14067 # trust that the arithmetic works.
14068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14069 /* end confdefs.h.  */
14070
14071 int
14072 main ()
14073 {
14074 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
14075 test_array [0] = 0;
14076 return test_array [0];
14077
14078   ;
14079   return 0;
14080 }
14081 _ACEOF
14082 if ac_fn_c_try_compile "$LINENO"; then :
14083   pgac_cv_type_long_long_int_64=yes
14084 else
14085   pgac_cv_type_long_long_int_64=no
14086 fi
14087 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14088 else
14089   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14090 /* end confdefs.h.  */
14091 typedef long long int ac_int64;
14092
14093 /*
14094  * These are globals to discourage the compiler from folding all the
14095  * arithmetic tests down to compile-time constants.
14096  */
14097 ac_int64 a = 20000001;
14098 ac_int64 b = 40000005;
14099
14100 int does_int64_work()
14101 {
14102   ac_int64 c,d;
14103
14104   if (sizeof(ac_int64) != 8)
14105     return 0;                   /* definitely not the right size */
14106
14107   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
14108   c = a * b;
14109   d = (c + b) / b;
14110   if (d != a+1)
14111     return 0;
14112   return 1;
14113 }
14114
14115 int
14116 main() {
14117   return (! does_int64_work());
14118 }
14119 _ACEOF
14120 if ac_fn_c_try_run "$LINENO"; then :
14121   pgac_cv_type_long_long_int_64=yes
14122 else
14123   pgac_cv_type_long_long_int_64=no
14124 fi
14125 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14126   conftest.$ac_objext conftest.beam conftest.$ac_ext
14127 fi
14128
14129 fi
14130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
14131 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
14132
14133 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
14134 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
14135
14136 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
14137
14138 fi
14139
14140   if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
14141     pg_int64_type="long long int"
14142   else
14143     as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
14144   fi
14145 fi
14146
14147
14148 cat >>confdefs.h <<_ACEOF
14149 #define PG_INT64_TYPE $pg_int64_type
14150 _ACEOF
14151
14152
14153
14154 if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
14155   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14156 /* end confdefs.h.  */
14157
14158 #define INT64CONST(x)  x##LL
14159 long long int foo = INT64CONST(0x1234567890123456);
14160
14161 _ACEOF
14162 if ac_fn_c_try_compile "$LINENO"; then :
14163
14164 $as_echo "#define HAVE_LL_CONSTANTS 1" >>confdefs.h
14165
14166 fi
14167 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14168 fi
14169
14170
14171 # If we found "long int" is 64 bits, assume snprintf handles it.  If
14172 # we found we need to use "long long int", better check.  We cope with
14173 # snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
14174 # work, fall back to our own snprintf emulation (which we know uses %lld).
14175
14176 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
14177   if test $pgac_need_repl_snprintf = no; then
14178     { $as_echo "$as_me:${as_lineno-$LINENO}: checking snprintf length modifier for long long int" >&5
14179 $as_echo_n "checking snprintf length modifier for long long int... " >&6; }
14180 if ${pgac_cv_snprintf_long_long_int_modifier+:} false; then :
14181   $as_echo_n "(cached) " >&6
14182 else
14183   for pgac_modifier in 'll' 'q' 'I64'; do
14184 if test "$cross_compiling" = yes; then :
14185   pgac_cv_snprintf_long_long_int_modifier=cross; break
14186 else
14187   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14188 /* end confdefs.h.  */
14189 #include <stdio.h>
14190 #include <string.h>
14191 typedef long long int ac_int64;
14192 #define INT64_FORMAT "%${pgac_modifier}d"
14193
14194 ac_int64 a = 20000001;
14195 ac_int64 b = 40000005;
14196
14197 int does_int64_snprintf_work()
14198 {
14199   ac_int64 c;
14200   char buf[100];
14201
14202   if (sizeof(ac_int64) != 8)
14203     return 0;                   /* doesn't look like the right size */
14204
14205   c = a * b;
14206   snprintf(buf, 100, INT64_FORMAT, c);
14207   if (strcmp(buf, "800000140000005") != 0)
14208     return 0;                   /* either multiply or snprintf is busted */
14209   return 1;
14210 }
14211
14212 int
14213 main() {
14214   return (! does_int64_snprintf_work());
14215 }
14216 _ACEOF
14217 if ac_fn_c_try_run "$LINENO"; then :
14218   pgac_cv_snprintf_long_long_int_modifier=$pgac_modifier; break
14219 fi
14220 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14221   conftest.$ac_objext conftest.beam conftest.$ac_ext
14222 fi
14223
14224 done
14225 fi
14226
14227 LONG_LONG_INT_MODIFIER=''
14228
14229 case $pgac_cv_snprintf_long_long_int_modifier in
14230   cross) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot test (not on host machine)" >&5
14231 $as_echo "cannot test (not on host machine)" >&6; };;
14232   ?*)    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_long_long_int_modifier" >&5
14233 $as_echo "$pgac_cv_snprintf_long_long_int_modifier" >&6; }
14234          LONG_LONG_INT_MODIFIER=$pgac_cv_snprintf_long_long_int_modifier;;
14235   *)     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14236 $as_echo "none" >&6; };;
14237 esac
14238     if test "$LONG_LONG_INT_MODIFIER" = ""; then
14239       # Force usage of our own snprintf, since system snprintf is broken
14240       pgac_need_repl_snprintf=yes
14241       LONG_LONG_INT_MODIFIER='ll'
14242     fi
14243   else
14244     # Here if we previously decided we needed to use our own snprintf
14245     LONG_LONG_INT_MODIFIER='ll'
14246   fi
14247 else
14248   # Here if we are not using 'long long int' at all
14249   LONG_LONG_INT_MODIFIER='l'
14250 fi
14251
14252 INT64_MODIFIER="\"$LONG_LONG_INT_MODIFIER\""
14253
14254
14255 cat >>confdefs.h <<_ACEOF
14256 #define INT64_MODIFIER $INT64_MODIFIER
14257 _ACEOF
14258
14259
14260 # Also force use of our snprintf if the system's doesn't support the %z flag.
14261 if test "$pgac_need_repl_snprintf" = no; then
14262   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports the %z modifier" >&5
14263 $as_echo_n "checking whether snprintf supports the %z modifier... " >&6; }
14264 if ${pgac_cv_snprintf_size_t_support+:} false; then :
14265   $as_echo_n "(cached) " >&6
14266 else
14267   if test "$cross_compiling" = yes; then :
14268   pgac_cv_snprintf_size_t_support=cross
14269 else
14270   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14271 /* end confdefs.h.  */
14272 #include <stdio.h>
14273 #include <string.h>
14274
14275 int main()
14276 {
14277   char bufz[100];
14278   char buf64[100];
14279
14280   /*
14281    * Print the largest unsigned number fitting in a size_t using both %zu
14282    * and the previously-determined format for 64-bit integers.  Note that
14283    * we don't run this code unless we know snprintf handles 64-bit ints.
14284    */
14285   bufz[0] = '\0';  /* in case snprintf fails to emit anything */
14286   snprintf(bufz, sizeof(bufz), "%zu", ~((size_t) 0));
14287   snprintf(buf64, sizeof(buf64), "%" INT64_MODIFIER "u",
14288     (unsigned PG_INT64_TYPE) ~((size_t) 0));
14289   if (strcmp(bufz, buf64) != 0)
14290     return 1;
14291   return 0;
14292 }
14293 _ACEOF
14294 if ac_fn_c_try_run "$LINENO"; then :
14295   pgac_cv_snprintf_size_t_support=yes
14296 else
14297   pgac_cv_snprintf_size_t_support=no
14298 fi
14299 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14300   conftest.$ac_objext conftest.beam conftest.$ac_ext
14301 fi
14302
14303
14304 fi
14305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_size_t_support" >&5
14306 $as_echo "$pgac_cv_snprintf_size_t_support" >&6; }
14307
14308   if test "$pgac_cv_snprintf_size_t_support" != yes; then
14309     pgac_need_repl_snprintf=yes
14310   fi
14311 fi
14312
14313 # Now we have checked all the reasons to replace snprintf
14314 if test $pgac_need_repl_snprintf = yes; then
14315
14316 $as_echo "#define USE_REPL_SNPRINTF 1" >>confdefs.h
14317
14318   case " $LIBOBJS " in
14319   *" snprintf.$ac_objext "* ) ;;
14320   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
14321  ;;
14322 esac
14323
14324 fi
14325
14326 # Check size of void *, size_t (enables tweaks for > 32bit address space)
14327 # The cast to long int works around a bug in the HP C Compiler
14328 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14329 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14330 # This bug is HP SR number 8606223364.
14331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
14332 $as_echo_n "checking size of void *... " >&6; }
14333 if ${ac_cv_sizeof_void_p+:} false; then :
14334   $as_echo_n "(cached) " >&6
14335 else
14336   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
14337
14338 else
14339   if test "$ac_cv_type_void_p" = yes; then
14340      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14341 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14342 as_fn_error 77 "cannot compute sizeof (void *)
14343 See \`config.log' for more details" "$LINENO" 5; }
14344    else
14345      ac_cv_sizeof_void_p=0
14346    fi
14347 fi
14348
14349 fi
14350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
14351 $as_echo "$ac_cv_sizeof_void_p" >&6; }
14352
14353
14354
14355 cat >>confdefs.h <<_ACEOF
14356 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
14357 _ACEOF
14358
14359
14360 # The cast to long int works around a bug in the HP C Compiler
14361 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14362 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14363 # This bug is HP SR number 8606223364.
14364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
14365 $as_echo_n "checking size of size_t... " >&6; }
14366 if ${ac_cv_sizeof_size_t+:} false; then :
14367   $as_echo_n "(cached) " >&6
14368 else
14369   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
14370
14371 else
14372   if test "$ac_cv_type_size_t" = yes; then
14373      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14374 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14375 as_fn_error 77 "cannot compute sizeof (size_t)
14376 See \`config.log' for more details" "$LINENO" 5; }
14377    else
14378      ac_cv_sizeof_size_t=0
14379    fi
14380 fi
14381
14382 fi
14383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
14384 $as_echo "$ac_cv_sizeof_size_t" >&6; }
14385
14386
14387
14388 cat >>confdefs.h <<_ACEOF
14389 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
14390 _ACEOF
14391
14392
14393 # The cast to long int works around a bug in the HP C Compiler
14394 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14395 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14396 # This bug is HP SR number 8606223364.
14397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
14398 $as_echo_n "checking size of long... " >&6; }
14399 if ${ac_cv_sizeof_long+:} false; then :
14400   $as_echo_n "(cached) " >&6
14401 else
14402   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
14403
14404 else
14405   if test "$ac_cv_type_long" = yes; then
14406      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14407 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14408 as_fn_error 77 "cannot compute sizeof (long)
14409 See \`config.log' for more details" "$LINENO" 5; }
14410    else
14411      ac_cv_sizeof_long=0
14412    fi
14413 fi
14414
14415 fi
14416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
14417 $as_echo "$ac_cv_sizeof_long" >&6; }
14418
14419
14420
14421 cat >>confdefs.h <<_ACEOF
14422 #define SIZEOF_LONG $ac_cv_sizeof_long
14423 _ACEOF
14424
14425
14426
14427 # Decide whether float4 is passed by value: user-selectable, enabled by default
14428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float4 passed by value" >&5
14429 $as_echo_n "checking whether to build with float4 passed by value... " >&6; }
14430
14431
14432 # Check whether --enable-float4-byval was given.
14433 if test "${enable_float4_byval+set}" = set; then :
14434   enableval=$enable_float4_byval;
14435   case $enableval in
14436     yes)
14437
14438 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
14439
14440                float4passbyval=true
14441       ;;
14442     no)
14443       float4passbyval=false
14444       ;;
14445     *)
14446       as_fn_error $? "no argument expected for --enable-float4-byval option" "$LINENO" 5
14447       ;;
14448   esac
14449
14450 else
14451   enable_float4_byval=yes
14452
14453 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
14454
14455                float4passbyval=true
14456 fi
14457
14458
14459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float4_byval" >&5
14460 $as_echo "$enable_float4_byval" >&6; }
14461
14462 cat >>confdefs.h <<_ACEOF
14463 #define FLOAT4PASSBYVAL $float4passbyval
14464 _ACEOF
14465
14466
14467 # Decide whether float8 is passed by value.
14468 # Note: this setting also controls int8 and related types such as timestamp.
14469 # If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
14470 # If not, trying to select it is an error.
14471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float8 passed by value" >&5
14472 $as_echo_n "checking whether to build with float8 passed by value... " >&6; }
14473 if test $ac_cv_sizeof_void_p -ge 8 ; then
14474
14475
14476 # Check whether --enable-float8-byval was given.
14477 if test "${enable_float8_byval+set}" = set; then :
14478   enableval=$enable_float8_byval;
14479   case $enableval in
14480     yes)
14481       :
14482       ;;
14483     no)
14484       :
14485       ;;
14486     *)
14487       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
14488       ;;
14489   esac
14490
14491 else
14492   enable_float8_byval=yes
14493
14494 fi
14495
14496
14497 else
14498
14499
14500 # Check whether --enable-float8-byval was given.
14501 if test "${enable_float8_byval+set}" = set; then :
14502   enableval=$enable_float8_byval;
14503   case $enableval in
14504     yes)
14505       :
14506       ;;
14507     no)
14508       :
14509       ;;
14510     *)
14511       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
14512       ;;
14513   esac
14514
14515 else
14516   enable_float8_byval=no
14517
14518 fi
14519
14520
14521   if test "$enable_float8_byval" = yes ; then
14522     as_fn_error $? "--enable-float8-byval is not supported on 32-bit platforms." "$LINENO" 5
14523   fi
14524 fi
14525 if test "$enable_float8_byval" = yes ; then
14526
14527 $as_echo "#define USE_FLOAT8_BYVAL 1" >>confdefs.h
14528
14529   float8passbyval=true
14530 else
14531   float8passbyval=false
14532 fi
14533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float8_byval" >&5
14534 $as_echo "$enable_float8_byval" >&6; }
14535
14536 cat >>confdefs.h <<_ACEOF
14537 #define FLOAT8PASSBYVAL $float8passbyval
14538 _ACEOF
14539
14540
14541 # Determine memory alignment requirements for the basic C data types.
14542
14543 # The cast to long int works around a bug in the HP C Compiler,
14544 # see AC_CHECK_SIZEOF for more information.
14545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
14546 $as_echo_n "checking alignment of short... " >&6; }
14547 if ${ac_cv_alignof_short+:} false; then :
14548   $as_echo_n "(cached) " >&6
14549 else
14550   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short"        "$ac_includes_default
14551 #ifndef offsetof
14552 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14553 #endif
14554 typedef struct { char x; short y; } ac__type_alignof_;"; then :
14555
14556 else
14557   if test "$ac_cv_type_short" = yes; then
14558      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14559 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14560 as_fn_error 77 "cannot compute alignment of short
14561 See \`config.log' for more details" "$LINENO" 5; }
14562    else
14563      ac_cv_alignof_short=0
14564    fi
14565 fi
14566
14567 fi
14568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
14569 $as_echo "$ac_cv_alignof_short" >&6; }
14570
14571
14572
14573 cat >>confdefs.h <<_ACEOF
14574 #define ALIGNOF_SHORT $ac_cv_alignof_short
14575 _ACEOF
14576
14577
14578 # The cast to long int works around a bug in the HP C Compiler,
14579 # see AC_CHECK_SIZEOF for more information.
14580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
14581 $as_echo_n "checking alignment of int... " >&6; }
14582 if ${ac_cv_alignof_int+:} false; then :
14583   $as_echo_n "(cached) " >&6
14584 else
14585   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int"        "$ac_includes_default
14586 #ifndef offsetof
14587 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14588 #endif
14589 typedef struct { char x; int y; } ac__type_alignof_;"; then :
14590
14591 else
14592   if test "$ac_cv_type_int" = yes; then
14593      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14594 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14595 as_fn_error 77 "cannot compute alignment of int
14596 See \`config.log' for more details" "$LINENO" 5; }
14597    else
14598      ac_cv_alignof_int=0
14599    fi
14600 fi
14601
14602 fi
14603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
14604 $as_echo "$ac_cv_alignof_int" >&6; }
14605
14606
14607
14608 cat >>confdefs.h <<_ACEOF
14609 #define ALIGNOF_INT $ac_cv_alignof_int
14610 _ACEOF
14611
14612
14613 # The cast to long int works around a bug in the HP C Compiler,
14614 # see AC_CHECK_SIZEOF for more information.
14615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
14616 $as_echo_n "checking alignment of long... " >&6; }
14617 if ${ac_cv_alignof_long+:} false; then :
14618   $as_echo_n "(cached) " >&6
14619 else
14620   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long"        "$ac_includes_default
14621 #ifndef offsetof
14622 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14623 #endif
14624 typedef struct { char x; long y; } ac__type_alignof_;"; then :
14625
14626 else
14627   if test "$ac_cv_type_long" = yes; then
14628      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14629 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14630 as_fn_error 77 "cannot compute alignment of long
14631 See \`config.log' for more details" "$LINENO" 5; }
14632    else
14633      ac_cv_alignof_long=0
14634    fi
14635 fi
14636
14637 fi
14638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
14639 $as_echo "$ac_cv_alignof_long" >&6; }
14640
14641
14642
14643 cat >>confdefs.h <<_ACEOF
14644 #define ALIGNOF_LONG $ac_cv_alignof_long
14645 _ACEOF
14646
14647
14648 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
14649   # The cast to long int works around a bug in the HP C Compiler,
14650 # see AC_CHECK_SIZEOF for more information.
14651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
14652 $as_echo_n "checking alignment of long long int... " >&6; }
14653 if ${ac_cv_alignof_long_long_int+:} false; then :
14654   $as_echo_n "(cached) " >&6
14655 else
14656   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int"        "$ac_includes_default
14657 #ifndef offsetof
14658 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14659 #endif
14660 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
14661
14662 else
14663   if test "$ac_cv_type_long_long_int" = yes; then
14664      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14665 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14666 as_fn_error 77 "cannot compute alignment of long long int
14667 See \`config.log' for more details" "$LINENO" 5; }
14668    else
14669      ac_cv_alignof_long_long_int=0
14670    fi
14671 fi
14672
14673 fi
14674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
14675 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
14676
14677
14678
14679 cat >>confdefs.h <<_ACEOF
14680 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
14681 _ACEOF
14682
14683
14684 fi
14685 # The cast to long int works around a bug in the HP C Compiler,
14686 # see AC_CHECK_SIZEOF for more information.
14687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
14688 $as_echo_n "checking alignment of double... " >&6; }
14689 if ${ac_cv_alignof_double+:} false; then :
14690   $as_echo_n "(cached) " >&6
14691 else
14692   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double"        "$ac_includes_default
14693 #ifndef offsetof
14694 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14695 #endif
14696 typedef struct { char x; double y; } ac__type_alignof_;"; then :
14697
14698 else
14699   if test "$ac_cv_type_double" = yes; then
14700      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14701 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14702 as_fn_error 77 "cannot compute alignment of double
14703 See \`config.log' for more details" "$LINENO" 5; }
14704    else
14705      ac_cv_alignof_double=0
14706    fi
14707 fi
14708
14709 fi
14710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
14711 $as_echo "$ac_cv_alignof_double" >&6; }
14712
14713
14714
14715 cat >>confdefs.h <<_ACEOF
14716 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
14717 _ACEOF
14718
14719
14720
14721 # Compute maximum alignment of any basic type.
14722 # We assume long's alignment is at least as strong as char, short, or int;
14723 # but we must check long long (if it exists) and double.
14724
14725 MAX_ALIGNOF=$ac_cv_alignof_long
14726 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
14727   MAX_ALIGNOF=$ac_cv_alignof_double
14728 fi
14729 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
14730   MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
14731 fi
14732
14733 cat >>confdefs.h <<_ACEOF
14734 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
14735 _ACEOF
14736
14737
14738
14739 # Some platforms predefine the types int8, int16, etc.  Only check
14740 # a (hopefully) representative subset.
14741 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
14742 "
14743 if test "x$ac_cv_type_int8" = xyes; then :
14744
14745 cat >>confdefs.h <<_ACEOF
14746 #define HAVE_INT8 1
14747 _ACEOF
14748
14749
14750 fi
14751 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
14752 "
14753 if test "x$ac_cv_type_uint8" = xyes; then :
14754
14755 cat >>confdefs.h <<_ACEOF
14756 #define HAVE_UINT8 1
14757 _ACEOF
14758
14759
14760 fi
14761 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
14762 "
14763 if test "x$ac_cv_type_int64" = xyes; then :
14764
14765 cat >>confdefs.h <<_ACEOF
14766 #define HAVE_INT64 1
14767 _ACEOF
14768
14769
14770 fi
14771 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
14772 "
14773 if test "x$ac_cv_type_uint64" = xyes; then :
14774
14775 cat >>confdefs.h <<_ACEOF
14776 #define HAVE_UINT64 1
14777 _ACEOF
14778
14779
14780 fi
14781
14782
14783 # Check for extensions offering the integer scalar type __int128.
14784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
14785 $as_echo_n "checking for __int128... " >&6; }
14786 if ${pgac_cv__128bit_int+:} false; then :
14787   $as_echo_n "(cached) " >&6
14788 else
14789   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14790 /* end confdefs.h.  */
14791
14792 /*
14793  * These are globals to discourage the compiler from folding all the
14794  * arithmetic tests down to compile-time constants.  We do not have
14795  * convenient support for 64bit literals at this point...
14796  */
14797 __int128 a = 48828125;
14798 __int128 b = 97656255;
14799
14800 int
14801 main ()
14802 {
14803
14804 __int128 c,d;
14805 a = (a << 12) + 1; /* 200000000001 */
14806 b = (b << 12) + 5; /* 400000000005 */
14807 /* use the most relevant arithmetic ops */
14808 c = a * b;
14809 d = (c + b) / b;
14810 /* return different values, to prevent optimizations */
14811 if (d != a+1)
14812   return 0;
14813 return 1;
14814
14815   ;
14816   return 0;
14817 }
14818 _ACEOF
14819 if ac_fn_c_try_link "$LINENO"; then :
14820   pgac_cv__128bit_int=yes
14821 else
14822   pgac_cv__128bit_int=no
14823 fi
14824 rm -f core conftest.err conftest.$ac_objext \
14825     conftest$ac_exeext conftest.$ac_ext
14826 fi
14827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
14828 $as_echo "$pgac_cv__128bit_int" >&6; }
14829 if test x"$pgac_cv__128bit_int" = xyes ; then
14830
14831 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
14832
14833 fi
14834
14835 # Check for various atomic operations now that we have checked how to declare
14836 # 64bit integers.
14837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
14838 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
14839 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
14840   $as_echo_n "(cached) " >&6
14841 else
14842   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14843 /* end confdefs.h.  */
14844
14845 int
14846 main ()
14847 {
14848 char lock = 0;
14849    __sync_lock_test_and_set(&lock, 1);
14850    __sync_lock_release(&lock);
14851   ;
14852   return 0;
14853 }
14854 _ACEOF
14855 if ac_fn_c_try_link "$LINENO"; then :
14856   pgac_cv_gcc_sync_char_tas="yes"
14857 else
14858   pgac_cv_gcc_sync_char_tas="no"
14859 fi
14860 rm -f core conftest.err conftest.$ac_objext \
14861     conftest$ac_exeext conftest.$ac_ext
14862 fi
14863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
14864 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
14865 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
14866
14867 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
14868
14869 fi
14870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
14871 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
14872 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
14873   $as_echo_n "(cached) " >&6
14874 else
14875   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14876 /* end confdefs.h.  */
14877
14878 int
14879 main ()
14880 {
14881 int lock = 0;
14882    __sync_lock_test_and_set(&lock, 1);
14883    __sync_lock_release(&lock);
14884   ;
14885   return 0;
14886 }
14887 _ACEOF
14888 if ac_fn_c_try_link "$LINENO"; then :
14889   pgac_cv_gcc_sync_int32_tas="yes"
14890 else
14891   pgac_cv_gcc_sync_int32_tas="no"
14892 fi
14893 rm -f core conftest.err conftest.$ac_objext \
14894     conftest$ac_exeext conftest.$ac_ext
14895 fi
14896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
14897 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
14898 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
14899
14900 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
14901
14902 fi
14903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
14904 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
14905 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
14906   $as_echo_n "(cached) " >&6
14907 else
14908   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14909 /* end confdefs.h.  */
14910
14911 int
14912 main ()
14913 {
14914 int val = 0;
14915    __sync_val_compare_and_swap(&val, 0, 37);
14916   ;
14917   return 0;
14918 }
14919 _ACEOF
14920 if ac_fn_c_try_link "$LINENO"; then :
14921   pgac_cv_gcc_sync_int32_cas="yes"
14922 else
14923   pgac_cv_gcc_sync_int32_cas="no"
14924 fi
14925 rm -f core conftest.err conftest.$ac_objext \
14926     conftest$ac_exeext conftest.$ac_ext
14927 fi
14928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
14929 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
14930 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
14931
14932 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
14933
14934 fi
14935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
14936 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
14937 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
14938   $as_echo_n "(cached) " >&6
14939 else
14940   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14941 /* end confdefs.h.  */
14942
14943 int
14944 main ()
14945 {
14946 PG_INT64_TYPE lock = 0;
14947    __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
14948   ;
14949   return 0;
14950 }
14951 _ACEOF
14952 if ac_fn_c_try_link "$LINENO"; then :
14953   pgac_cv_gcc_sync_int64_cas="yes"
14954 else
14955   pgac_cv_gcc_sync_int64_cas="no"
14956 fi
14957 rm -f core conftest.err conftest.$ac_objext \
14958     conftest$ac_exeext conftest.$ac_ext
14959 fi
14960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
14961 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
14962 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
14963
14964 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
14965
14966 fi
14967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
14968 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
14969 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
14970   $as_echo_n "(cached) " >&6
14971 else
14972   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14973 /* end confdefs.h.  */
14974
14975 int
14976 main ()
14977 {
14978 int val = 0;
14979    int expect = 0;
14980    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
14981   ;
14982   return 0;
14983 }
14984 _ACEOF
14985 if ac_fn_c_try_link "$LINENO"; then :
14986   pgac_cv_gcc_atomic_int32_cas="yes"
14987 else
14988   pgac_cv_gcc_atomic_int32_cas="no"
14989 fi
14990 rm -f core conftest.err conftest.$ac_objext \
14991     conftest$ac_exeext conftest.$ac_ext
14992 fi
14993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
14994 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
14995 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
14996
14997 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
14998
14999 fi
15000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
15001 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
15002 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
15003   $as_echo_n "(cached) " >&6
15004 else
15005   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15006 /* end confdefs.h.  */
15007
15008 int
15009 main ()
15010 {
15011 PG_INT64_TYPE val = 0;
15012    PG_INT64_TYPE expect = 0;
15013    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
15014   ;
15015   return 0;
15016 }
15017 _ACEOF
15018 if ac_fn_c_try_link "$LINENO"; then :
15019   pgac_cv_gcc_atomic_int64_cas="yes"
15020 else
15021   pgac_cv_gcc_atomic_int64_cas="no"
15022 fi
15023 rm -f core conftest.err conftest.$ac_objext \
15024     conftest$ac_exeext conftest.$ac_ext
15025 fi
15026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
15027 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
15028 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
15029
15030 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
15031
15032 fi
15033
15034
15035 # Check for x86 cpuid instruction
15036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
15037 $as_echo_n "checking for __get_cpuid... " >&6; }
15038 if ${pgac_cv__get_cpuid+:} false; then :
15039   $as_echo_n "(cached) " >&6
15040 else
15041   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15042 /* end confdefs.h.  */
15043 #include <cpuid.h>
15044 int
15045 main ()
15046 {
15047 unsigned int exx[4] = {0, 0, 0, 0};
15048   __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
15049
15050   ;
15051   return 0;
15052 }
15053 _ACEOF
15054 if ac_fn_c_try_link "$LINENO"; then :
15055   pgac_cv__get_cpuid="yes"
15056 else
15057   pgac_cv__get_cpuid="no"
15058 fi
15059 rm -f core conftest.err conftest.$ac_objext \
15060     conftest$ac_exeext conftest.$ac_ext
15061 fi
15062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
15063 $as_echo "$pgac_cv__get_cpuid" >&6; }
15064 if test x"$pgac_cv__get_cpuid" = x"yes"; then
15065
15066 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
15067
15068 fi
15069
15070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
15071 $as_echo_n "checking for __cpuid... " >&6; }
15072 if ${pgac_cv__cpuid+:} false; then :
15073   $as_echo_n "(cached) " >&6
15074 else
15075   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15076 /* end confdefs.h.  */
15077 #include <intrin.h>
15078 int
15079 main ()
15080 {
15081 unsigned int exx[4] = {0, 0, 0, 0};
15082   __get_cpuid(exx[0], 1);
15083
15084   ;
15085   return 0;
15086 }
15087 _ACEOF
15088 if ac_fn_c_try_link "$LINENO"; then :
15089   pgac_cv__cpuid="yes"
15090 else
15091   pgac_cv__cpuid="no"
15092 fi
15093 rm -f core conftest.err conftest.$ac_objext \
15094     conftest$ac_exeext conftest.$ac_ext
15095 fi
15096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
15097 $as_echo "$pgac_cv__cpuid" >&6; }
15098 if test x"$pgac_cv__cpuid" = x"yes"; then
15099
15100 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
15101
15102 fi
15103
15104 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
15105 #
15106 # First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
15107 # with the default compiler flags. If not, check if adding the -msse4.2
15108 # flag helps. CFLAGS_SSE42 is set to -msse4.2 if that's required.
15109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
15110 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
15111 if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
15112   $as_echo_n "(cached) " >&6
15113 else
15114   pgac_save_CFLAGS=$CFLAGS
15115 CFLAGS="$pgac_save_CFLAGS "
15116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15117 /* end confdefs.h.  */
15118 #include <nmmintrin.h>
15119 int
15120 main ()
15121 {
15122 unsigned int crc = 0;
15123    crc = _mm_crc32_u8(crc, 0);
15124    crc = _mm_crc32_u32(crc, 0);
15125    /* return computed value, to prevent the above being optimized away */
15126    return crc == 0;
15127   ;
15128   return 0;
15129 }
15130 _ACEOF
15131 if ac_fn_c_try_link "$LINENO"; then :
15132   pgac_cv_sse42_crc32_intrinsics_=yes
15133 else
15134   pgac_cv_sse42_crc32_intrinsics_=no
15135 fi
15136 rm -f core conftest.err conftest.$ac_objext \
15137     conftest$ac_exeext conftest.$ac_ext
15138 CFLAGS="$pgac_save_CFLAGS"
15139 fi
15140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
15141 $as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
15142 if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
15143   CFLAGS_SSE42=""
15144   pgac_sse42_crc32_intrinsics=yes
15145 fi
15146
15147 if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
15148   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
15149 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
15150 if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
15151   $as_echo_n "(cached) " >&6
15152 else
15153   pgac_save_CFLAGS=$CFLAGS
15154 CFLAGS="$pgac_save_CFLAGS -msse4.2"
15155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15156 /* end confdefs.h.  */
15157 #include <nmmintrin.h>
15158 int
15159 main ()
15160 {
15161 unsigned int crc = 0;
15162    crc = _mm_crc32_u8(crc, 0);
15163    crc = _mm_crc32_u32(crc, 0);
15164    /* return computed value, to prevent the above being optimized away */
15165    return crc == 0;
15166   ;
15167   return 0;
15168 }
15169 _ACEOF
15170 if ac_fn_c_try_link "$LINENO"; then :
15171   pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
15172 else
15173   pgac_cv_sse42_crc32_intrinsics__msse4_2=no
15174 fi
15175 rm -f core conftest.err conftest.$ac_objext \
15176     conftest$ac_exeext conftest.$ac_ext
15177 CFLAGS="$pgac_save_CFLAGS"
15178 fi
15179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
15180 $as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
15181 if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
15182   CFLAGS_SSE42="-msse4.2"
15183   pgac_sse42_crc32_intrinsics=yes
15184 fi
15185
15186 fi
15187
15188
15189 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
15190 # define __SSE4_2__ in that case.
15191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15192 /* end confdefs.h.  */
15193
15194 int
15195 main ()
15196 {
15197
15198 #ifndef __SSE4_2__
15199 #error __SSE4_2__ not defined
15200 #endif
15201
15202   ;
15203   return 0;
15204 }
15205 _ACEOF
15206 if ac_fn_c_try_compile "$LINENO"; then :
15207   SSE4_2_TARGETED=1
15208 fi
15209 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15210
15211 # Select CRC-32C implementation.
15212 #
15213 # If we are targeting a processor that has SSE 4.2 instructions, we can use the
15214 # special CRC instructions for calculating CRC-32C. If we're not targeting such
15215 # a processor, but we can nevertheless produce code that uses the SSE
15216 # intrinsics, perhaps with some extra CFLAGS, compile both implementations and
15217 # select which one to use at runtime, depending on whether SSE 4.2 is supported
15218 # by the processor we're running on.
15219 #
15220 # You can override this logic by setting the appropriate USE_*_CRC32 flag to 1
15221 # in the template or configure command line.
15222 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
15223   if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
15224     USE_SSE42_CRC32C=1
15225   else
15226     # the CPUID instruction is needed for the runtime check.
15227     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
15228       USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
15229     else
15230       # fall back to slicing-by-8 algorithm which doesn't require any special
15231       # CPU support.
15232       USE_SLICING_BY_8_CRC32C=1
15233     fi
15234   fi
15235 fi
15236
15237 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
15238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
15239 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
15240 if test x"$USE_SSE42_CRC32C" = x"1"; then
15241
15242 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
15243
15244   PG_CRC32C_OBJS="pg_crc32c_sse42.o"
15245   { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
15246 $as_echo "SSE 4.2" >&6; }
15247 else
15248   if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
15249
15250 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
15251
15252     PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_choose.o"
15253     { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
15254 $as_echo "SSE 4.2 with runtime check" >&6; }
15255   else
15256
15257 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
15258
15259     PG_CRC32C_OBJS="pg_crc32c_sb8.o"
15260     { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
15261 $as_echo "slicing-by-8" >&6; }
15262   fi
15263 fi
15264
15265
15266
15267 # Select semaphore implementation type.
15268 if test "$PORTNAME" != "win32"; then
15269   if test x"$PREFERRED_SEMAPHORES" = x"NAMED_POSIX" ; then
15270     # Need sem_open for this
15271     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5
15272 $as_echo_n "checking for library containing sem_open... " >&6; }
15273 if ${ac_cv_search_sem_open+:} false; then :
15274   $as_echo_n "(cached) " >&6
15275 else
15276   ac_func_search_save_LIBS=$LIBS
15277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15278 /* end confdefs.h.  */
15279
15280 /* Override any GCC internal prototype to avoid an error.
15281    Use char because int might match the return type of a GCC
15282    builtin and then its argument prototype would still apply.  */
15283 #ifdef __cplusplus
15284 extern "C"
15285 #endif
15286 char sem_open ();
15287 int
15288 main ()
15289 {
15290 return sem_open ();
15291   ;
15292   return 0;
15293 }
15294 _ACEOF
15295 for ac_lib in '' rt pthread; do
15296   if test -z "$ac_lib"; then
15297     ac_res="none required"
15298   else
15299     ac_res=-l$ac_lib
15300     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15301   fi
15302   if ac_fn_c_try_link "$LINENO"; then :
15303   ac_cv_search_sem_open=$ac_res
15304 fi
15305 rm -f core conftest.err conftest.$ac_objext \
15306     conftest$ac_exeext
15307   if ${ac_cv_search_sem_open+:} false; then :
15308   break
15309 fi
15310 done
15311 if ${ac_cv_search_sem_open+:} false; then :
15312
15313 else
15314   ac_cv_search_sem_open=no
15315 fi
15316 rm conftest.$ac_ext
15317 LIBS=$ac_func_search_save_LIBS
15318 fi
15319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5
15320 $as_echo "$ac_cv_search_sem_open" >&6; }
15321 ac_res=$ac_cv_search_sem_open
15322 if test "$ac_res" != no; then :
15323   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15324   USE_NAMED_POSIX_SEMAPHORES=1
15325 fi
15326
15327   fi
15328   if test x"$PREFERRED_SEMAPHORES" = x"UNNAMED_POSIX" ; then
15329     # Need sem_init for this
15330     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
15331 $as_echo_n "checking for library containing sem_init... " >&6; }
15332 if ${ac_cv_search_sem_init+:} false; then :
15333   $as_echo_n "(cached) " >&6
15334 else
15335   ac_func_search_save_LIBS=$LIBS
15336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15337 /* end confdefs.h.  */
15338
15339 /* Override any GCC internal prototype to avoid an error.
15340    Use char because int might match the return type of a GCC
15341    builtin and then its argument prototype would still apply.  */
15342 #ifdef __cplusplus
15343 extern "C"
15344 #endif
15345 char sem_init ();
15346 int
15347 main ()
15348 {
15349 return sem_init ();
15350   ;
15351   return 0;
15352 }
15353 _ACEOF
15354 for ac_lib in '' rt pthread; do
15355   if test -z "$ac_lib"; then
15356     ac_res="none required"
15357   else
15358     ac_res=-l$ac_lib
15359     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15360   fi
15361   if ac_fn_c_try_link "$LINENO"; then :
15362   ac_cv_search_sem_init=$ac_res
15363 fi
15364 rm -f core conftest.err conftest.$ac_objext \
15365     conftest$ac_exeext
15366   if ${ac_cv_search_sem_init+:} false; then :
15367   break
15368 fi
15369 done
15370 if ${ac_cv_search_sem_init+:} false; then :
15371
15372 else
15373   ac_cv_search_sem_init=no
15374 fi
15375 rm conftest.$ac_ext
15376 LIBS=$ac_func_search_save_LIBS
15377 fi
15378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
15379 $as_echo "$ac_cv_search_sem_init" >&6; }
15380 ac_res=$ac_cv_search_sem_init
15381 if test "$ac_res" != no; then :
15382   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15383   USE_UNNAMED_POSIX_SEMAPHORES=1
15384 fi
15385
15386   fi
15387   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which semaphore API to use" >&5
15388 $as_echo_n "checking which semaphore API to use... " >&6; }
15389   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
15390
15391 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
15392
15393     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
15394     sematype="named POSIX"
15395   else
15396     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
15397
15398 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
15399
15400       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
15401       sematype="unnamed POSIX"
15402     else
15403
15404 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
15405
15406       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
15407       sematype="System V"
15408     fi
15409   fi
15410   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sematype" >&5
15411 $as_echo "$sematype" >&6; }
15412 else
15413
15414 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
15415
15416   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
15417 fi
15418
15419
15420 # Select shared-memory implementation type.
15421 if test "$PORTNAME" != "win32"; then
15422
15423 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
15424
15425   SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
15426 else
15427
15428 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
15429
15430   SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
15431 fi
15432
15433 # Select random number source
15434 #
15435 # You can override this logic by setting the appropriate USE_*RANDOM flag to 1
15436 # in the template or configure command line.
15437
15438 # If not selected manually, try to select a source automatically.
15439 if test "$enable_strong_random" = "yes" && test x"$USE_OPENSSL_RANDOM" = x"" && test x"$USE_WIN32_RANDOM" = x"" && test x"$USE_DEV_URANDOM" = x"" ; then
15440   if test x"$with_openssl" = x"yes" ; then
15441     USE_OPENSSL_RANDOM=1
15442   elif test "$PORTNAME" = "win32" ; then
15443     USE_WIN32_RANDOM=1
15444   else
15445     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5
15446 $as_echo_n "checking for /dev/urandom... " >&6; }
15447 if ${ac_cv_file__dev_urandom+:} false; then :
15448   $as_echo_n "(cached) " >&6
15449 else
15450   test "$cross_compiling" = yes &&
15451   as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15452 if test -r "/dev/urandom"; then
15453   ac_cv_file__dev_urandom=yes
15454 else
15455   ac_cv_file__dev_urandom=no
15456 fi
15457 fi
15458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5
15459 $as_echo "$ac_cv_file__dev_urandom" >&6; }
15460 if test "x$ac_cv_file__dev_urandom" = xyes; then :
15461
15462 fi
15463
15464
15465     if test x"$ac_cv_file__dev_urandom" = x"yes" ; then
15466       USE_DEV_URANDOM=1
15467     fi
15468   fi
15469 fi
15470
15471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which random number source to use" >&5
15472 $as_echo_n "checking which random number source to use... " >&6; }
15473 if test "$enable_strong_random" = yes ; then
15474   if test x"$USE_OPENSSL_RANDOM" = x"1" ; then
15475
15476 $as_echo "#define USE_OPENSSL_RANDOM 1" >>confdefs.h
15477
15478     { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5
15479 $as_echo "OpenSSL" >&6; }
15480   elif test x"$USE_WIN32_RANDOM" = x"1" ; then
15481
15482 $as_echo "#define USE_WIN32_RANDOM 1" >>confdefs.h
15483
15484     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
15485 $as_echo "Windows native" >&6; }
15486   elif test x"$USE_DEV_URANDOM" = x"1" ; then
15487
15488 $as_echo "#define USE_DEV_URANDOM 1" >>confdefs.h
15489
15490     { $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
15491 $as_echo "/dev/urandom" >&6; }
15492   else
15493     as_fn_error $? "
15494 no source of strong random numbers was found
15495 PostgreSQL can use OpenSSL or /dev/urandom as a source of random numbers,
15496 for authentication protocols. You can use --disable-strong-random to use a
15497 built-in pseudo random number generator, but that may be insecure." "$LINENO" 5
15498   fi
15499
15500 $as_echo "#define HAVE_STRONG_RANDOM 1" >>confdefs.h
15501
15502 else
15503     { $as_echo "$as_me:${as_lineno-$LINENO}: result: weak builtin PRNG" >&5
15504 $as_echo "weak builtin PRNG" >&6; }
15505     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
15506 *** Not using a strong random number source may be insecure." >&5
15507 $as_echo "$as_me: WARNING:
15508 *** Not using a strong random number source may be insecure." >&2;}
15509 fi
15510
15511 # If not set in template file, set bytes to use libc memset()
15512 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
15513   MEMSET_LOOP_LIMIT=1024
15514 fi
15515
15516 cat >>confdefs.h <<_ACEOF
15517 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
15518 _ACEOF
15519
15520
15521
15522 if test "$enable_nls" = yes ; then
15523
15524   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
15525 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
15526 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
15527   $as_echo_n "(cached) " >&6
15528 else
15529   ac_func_search_save_LIBS=$LIBS
15530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15531 /* end confdefs.h.  */
15532
15533 /* Override any GCC internal prototype to avoid an error.
15534    Use char because int might match the return type of a GCC
15535    builtin and then its argument prototype would still apply.  */
15536 #ifdef __cplusplus
15537 extern "C"
15538 #endif
15539 char bind_textdomain_codeset ();
15540 int
15541 main ()
15542 {
15543 return bind_textdomain_codeset ();
15544   ;
15545   return 0;
15546 }
15547 _ACEOF
15548 for ac_lib in '' intl; do
15549   if test -z "$ac_lib"; then
15550     ac_res="none required"
15551   else
15552     ac_res=-l$ac_lib
15553     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15554   fi
15555   if ac_fn_c_try_link "$LINENO"; then :
15556   ac_cv_search_bind_textdomain_codeset=$ac_res
15557 fi
15558 rm -f core conftest.err conftest.$ac_objext \
15559     conftest$ac_exeext
15560   if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
15561   break
15562 fi
15563 done
15564 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
15565
15566 else
15567   ac_cv_search_bind_textdomain_codeset=no
15568 fi
15569 rm conftest.$ac_ext
15570 LIBS=$ac_func_search_save_LIBS
15571 fi
15572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
15573 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
15574 ac_res=$ac_cv_search_bind_textdomain_codeset
15575 if test "$ac_res" != no; then :
15576   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15577
15578 else
15579   as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
15580 fi
15581
15582   ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
15583 if test "x$ac_cv_header_libintl_h" = xyes; then :
15584
15585 else
15586   as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
15587 fi
15588
15589
15590   for ac_prog in msgfmt
15591 do
15592   # Extract the first word of "$ac_prog", so it can be a program name with args.
15593 set dummy $ac_prog; ac_word=$2
15594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15595 $as_echo_n "checking for $ac_word... " >&6; }
15596 if ${ac_cv_prog_MSGFMT+:} false; then :
15597   $as_echo_n "(cached) " >&6
15598 else
15599   if test -n "$MSGFMT"; then
15600   ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
15601 else
15602 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15603 for as_dir in $PATH
15604 do
15605   IFS=$as_save_IFS
15606   test -z "$as_dir" && as_dir=.
15607     for ac_exec_ext in '' $ac_executable_extensions; do
15608   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15609     ac_cv_prog_MSGFMT="$ac_prog"
15610     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15611     break 2
15612   fi
15613 done
15614   done
15615 IFS=$as_save_IFS
15616
15617 fi
15618 fi
15619 MSGFMT=$ac_cv_prog_MSGFMT
15620 if test -n "$MSGFMT"; then
15621   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
15622 $as_echo "$MSGFMT" >&6; }
15623 else
15624   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15625 $as_echo "no" >&6; }
15626 fi
15627
15628
15629   test -n "$MSGFMT" && break
15630 done
15631
15632   if test -z "$MSGFMT"; then
15633     as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
15634   fi
15635   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
15636 $as_echo_n "checking for msgfmt flags... " >&6; }
15637 if ${pgac_cv_msgfmt_flags+:} false; then :
15638   $as_echo_n "(cached) " >&6
15639 else
15640   if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
15641     pgac_cv_msgfmt_flags=-c
15642 fi
15643 fi
15644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
15645 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
15646   MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
15647
15648   for ac_prog in msgmerge
15649 do
15650   # Extract the first word of "$ac_prog", so it can be a program name with args.
15651 set dummy $ac_prog; ac_word=$2
15652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15653 $as_echo_n "checking for $ac_word... " >&6; }
15654 if ${ac_cv_prog_MSGMERGE+:} false; then :
15655   $as_echo_n "(cached) " >&6
15656 else
15657   if test -n "$MSGMERGE"; then
15658   ac_cv_prog_MSGMERGE="$MSGMERGE" # Let the user override the test.
15659 else
15660 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15661 for as_dir in $PATH
15662 do
15663   IFS=$as_save_IFS
15664   test -z "$as_dir" && as_dir=.
15665     for ac_exec_ext in '' $ac_executable_extensions; do
15666   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15667     ac_cv_prog_MSGMERGE="$ac_prog"
15668     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15669     break 2
15670   fi
15671 done
15672   done
15673 IFS=$as_save_IFS
15674
15675 fi
15676 fi
15677 MSGMERGE=$ac_cv_prog_MSGMERGE
15678 if test -n "$MSGMERGE"; then
15679   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
15680 $as_echo "$MSGMERGE" >&6; }
15681 else
15682   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15683 $as_echo "no" >&6; }
15684 fi
15685
15686
15687   test -n "$MSGMERGE" && break
15688 done
15689
15690   for ac_prog in xgettext
15691 do
15692   # Extract the first word of "$ac_prog", so it can be a program name with args.
15693 set dummy $ac_prog; ac_word=$2
15694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15695 $as_echo_n "checking for $ac_word... " >&6; }
15696 if ${ac_cv_prog_XGETTEXT+:} false; then :
15697   $as_echo_n "(cached) " >&6
15698 else
15699   if test -n "$XGETTEXT"; then
15700   ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test.
15701 else
15702 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15703 for as_dir in $PATH
15704 do
15705   IFS=$as_save_IFS
15706   test -z "$as_dir" && as_dir=.
15707     for ac_exec_ext in '' $ac_executable_extensions; do
15708   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15709     ac_cv_prog_XGETTEXT="$ac_prog"
15710     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15711     break 2
15712   fi
15713 done
15714   done
15715 IFS=$as_save_IFS
15716
15717 fi
15718 fi
15719 XGETTEXT=$ac_cv_prog_XGETTEXT
15720 if test -n "$XGETTEXT"; then
15721   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
15722 $as_echo "$XGETTEXT" >&6; }
15723 else
15724   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15725 $as_echo "no" >&6; }
15726 fi
15727
15728
15729   test -n "$XGETTEXT" && break
15730 done
15731
15732
15733 fi
15734
15735 # Check for Tcl configuration script tclConfig.sh
15736 if test "$with_tcl" = yes; then
15737     for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
15738 do
15739   # Extract the first word of "$ac_prog", so it can be a program name with args.
15740 set dummy $ac_prog; ac_word=$2
15741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15742 $as_echo_n "checking for $ac_word... " >&6; }
15743 if ${ac_cv_path_TCLSH+:} false; then :
15744   $as_echo_n "(cached) " >&6
15745 else
15746   case $TCLSH in
15747   [\\/]* | ?:[\\/]*)
15748   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
15749   ;;
15750   *)
15751   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15752 for as_dir in $PATH
15753 do
15754   IFS=$as_save_IFS
15755   test -z "$as_dir" && as_dir=.
15756     for ac_exec_ext in '' $ac_executable_extensions; do
15757   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15758     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
15759     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15760     break 2
15761   fi
15762 done
15763   done
15764 IFS=$as_save_IFS
15765
15766   ;;
15767 esac
15768 fi
15769 TCLSH=$ac_cv_path_TCLSH
15770 if test -n "$TCLSH"; then
15771   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
15772 $as_echo "$TCLSH" >&6; }
15773 else
15774   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15775 $as_echo "no" >&6; }
15776 fi
15777
15778
15779   test -n "$TCLSH" && break
15780 done
15781
15782 if test x"$TCLSH" = x""; then
15783   as_fn_error $? "Tcl shell not found" "$LINENO" 5
15784 fi
15785
15786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
15787 $as_echo_n "checking for tclConfig.sh... " >&6; }
15788 # Let user override test
15789 if test -z "$TCL_CONFIG_SH"; then
15790     pgac_test_dirs="$with_tclconfig"
15791
15792     set X $pgac_test_dirs; shift
15793     if test $# -eq 0; then
15794         test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
15795         set X `echo 'puts $auto_path' | $TCLSH`; shift
15796     fi
15797
15798     for pgac_dir do
15799         if test -r "$pgac_dir/tclConfig.sh"; then
15800             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
15801             break
15802         fi
15803     done
15804 fi
15805
15806 if test -z "$TCL_CONFIG_SH"; then
15807     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15808 $as_echo "no" >&6; }
15809     as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
15810 else
15811     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
15812 $as_echo "$TCL_CONFIG_SH" >&6; }
15813 fi
15814
15815
15816
15817     . "$TCL_CONFIG_SH"
15818 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
15819 eval TCL_LIBS=\"$TCL_LIBS\"
15820 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
15821 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
15822
15823         if test "$TCL_SHARED_BUILD" != 1; then
15824       as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
15825 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
15826     fi
15827     # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
15828     ac_save_CPPFLAGS=$CPPFLAGS
15829     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
15830     ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
15831 if test "x$ac_cv_header_tcl_h" = xyes; then :
15832
15833 else
15834   as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
15835 fi
15836
15837
15838     CPPFLAGS=$ac_save_CPPFLAGS
15839 fi
15840
15841 # check for <perl.h>
15842 if test "$with_perl" = yes; then
15843   ac_save_CPPFLAGS=$CPPFLAGS
15844   CPPFLAGS="$CPPFLAGS -I$perl_archlibexp/CORE"
15845   ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
15846 "
15847 if test "x$ac_cv_header_perl_h" = xyes; then :
15848
15849 else
15850   as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
15851 fi
15852
15853
15854   # While we're at it, check that we can link to libperl.
15855   # On most platforms, if perl.h is there then libperl.so will be too, but at
15856   # this writing Debian packages them separately.  There is no known reason to
15857   # waste cycles on separate probes for the Tcl or Python libraries, though.
15858   pgac_save_LIBS=$LIBS
15859   LIBS="$perl_embed_ldflags"
15860   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
15861 $as_echo_n "checking for libperl... " >&6; }
15862   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15863 /* end confdefs.h.  */
15864
15865 #include <EXTERN.h>
15866 #include <perl.h>
15867
15868 int
15869 main ()
15870 {
15871 perl_alloc();
15872   ;
15873   return 0;
15874 }
15875 _ACEOF
15876 if ac_fn_c_try_link "$LINENO"; then :
15877   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15878 $as_echo "yes" >&6; }
15879 else
15880   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15881 $as_echo "no" >&6; }
15882      as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
15883 fi
15884 rm -f core conftest.err conftest.$ac_objext \
15885     conftest$ac_exeext conftest.$ac_ext
15886   LIBS=$pgac_save_LIBS
15887   CPPFLAGS=$ac_save_CPPFLAGS
15888 fi
15889
15890 # check for <Python.h>
15891 if test "$with_python" = yes; then
15892   ac_save_CPPFLAGS=$CPPFLAGS
15893   CPPFLAGS="$python_includespec $CPPFLAGS"
15894   ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
15895 if test "x$ac_cv_header_Python_h" = xyes; then :
15896
15897 else
15898   as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
15899 fi
15900
15901
15902   CPPFLAGS=$ac_save_CPPFLAGS
15903 fi
15904
15905 #
15906 # Check for DocBook and tools
15907 #
15908 for ac_prog in onsgmls nsgmls
15909 do
15910   # Extract the first word of "$ac_prog", so it can be a program name with args.
15911 set dummy $ac_prog; ac_word=$2
15912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15913 $as_echo_n "checking for $ac_word... " >&6; }
15914 if ${ac_cv_prog_NSGMLS+:} false; then :
15915   $as_echo_n "(cached) " >&6
15916 else
15917   if test -n "$NSGMLS"; then
15918   ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
15919 else
15920 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15921 for as_dir in $PATH
15922 do
15923   IFS=$as_save_IFS
15924   test -z "$as_dir" && as_dir=.
15925     for ac_exec_ext in '' $ac_executable_extensions; do
15926   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15927     ac_cv_prog_NSGMLS="$ac_prog"
15928     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15929     break 2
15930   fi
15931 done
15932   done
15933 IFS=$as_save_IFS
15934
15935 fi
15936 fi
15937 NSGMLS=$ac_cv_prog_NSGMLS
15938 if test -n "$NSGMLS"; then
15939   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NSGMLS" >&5
15940 $as_echo "$NSGMLS" >&6; }
15941 else
15942   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15943 $as_echo "no" >&6; }
15944 fi
15945
15946
15947   test -n "$NSGMLS" && break
15948 done
15949
15950 for ac_prog in openjade jade
15951 do
15952   # Extract the first word of "$ac_prog", so it can be a program name with args.
15953 set dummy $ac_prog; ac_word=$2
15954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15955 $as_echo_n "checking for $ac_word... " >&6; }
15956 if ${ac_cv_prog_JADE+:} false; then :
15957   $as_echo_n "(cached) " >&6
15958 else
15959   if test -n "$JADE"; then
15960   ac_cv_prog_JADE="$JADE" # Let the user override the test.
15961 else
15962 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15963 for as_dir in $PATH
15964 do
15965   IFS=$as_save_IFS
15966   test -z "$as_dir" && as_dir=.
15967     for ac_exec_ext in '' $ac_executable_extensions; do
15968   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15969     ac_cv_prog_JADE="$ac_prog"
15970     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15971     break 2
15972   fi
15973 done
15974   done
15975 IFS=$as_save_IFS
15976
15977 fi
15978 fi
15979 JADE=$ac_cv_prog_JADE
15980 if test -n "$JADE"; then
15981   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JADE" >&5
15982 $as_echo "$JADE" >&6; }
15983 else
15984   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15985 $as_echo "no" >&6; }
15986 fi
15987
15988
15989   test -n "$JADE" && break
15990 done
15991
15992
15993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook V4.2" >&5
15994 $as_echo_n "checking for DocBook V4.2... " >&6; }
15995 if ${pgac_cv_check_docbook+:} false; then :
15996   $as_echo_n "(cached) " >&6
15997 else
15998   cat >conftest.sgml <<EOF
15999 <!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
16000 <book>
16001  <title>test</title>
16002  <chapter>
16003   <title>random</title>
16004    <sect1>
16005     <title>testsect</title>
16006     <para>text</para>
16007   </sect1>
16008  </chapter>
16009 </book>
16010 EOF
16011
16012 pgac_cv_check_docbook=no
16013
16014 if test -n "$NSGMLS"; then
16015   $NSGMLS -s conftest.sgml 1>&5 2>&1
16016   if test $? -eq 0; then
16017     pgac_cv_check_docbook=yes
16018   fi
16019 fi
16020 rm -f conftest.sgml
16021 fi
16022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_docbook" >&5
16023 $as_echo "$pgac_cv_check_docbook" >&6; }
16024
16025 have_docbook=$pgac_cv_check_docbook
16026
16027
16028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook stylesheets" >&5
16029 $as_echo_n "checking for DocBook stylesheets... " >&6; }
16030 if ${pgac_cv_path_stylesheets+:} false; then :
16031   $as_echo_n "(cached) " >&6
16032 else
16033   if test -n "$DOCBOOKSTYLE"; then
16034   pgac_cv_path_stylesheets=$DOCBOOKSTYLE
16035 else
16036   for pgac_prefix in /usr /usr/local /opt /sw; do
16037     for pgac_infix in share lib; do
16038       for pgac_postfix in \
16039         sgml/stylesheets/nwalsh-modular \
16040         sgml/stylesheets/docbook \
16041         sgml/stylesheets/dsssl/docbook \
16042         sgml/docbook-dsssl \
16043         sgml/docbook/dsssl/modular \
16044         sgml/docbook/stylesheet/dsssl/modular \
16045         sgml/docbook/dsssl-stylesheets \
16046         sgml/dsssl/docbook-dsssl-nwalsh
16047       do
16048         pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
16049         if test -r "$pgac_candidate/html/docbook.dsl" \
16050            && test -r "$pgac_candidate/print/docbook.dsl"
16051         then
16052           pgac_cv_path_stylesheets=$pgac_candidate
16053           break 3
16054         fi
16055       done
16056     done
16057   done
16058 fi
16059 fi
16060
16061 DOCBOOKSTYLE=$pgac_cv_path_stylesheets
16062
16063 if test -n "$DOCBOOKSTYLE"; then
16064   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOCBOOKSTYLE" >&5
16065 $as_echo "$DOCBOOKSTYLE" >&6; }
16066 else
16067   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16068 $as_echo "no" >&6; }
16069 fi
16070 if test -n "$DOCBOOKSTYLE" -a -r "$DOCBOOKSTYLE/bin/collateindex.pl"; then
16071   COLLATEINDEX="$DOCBOOKSTYLE/bin/collateindex.pl"
16072
16073 else
16074   # Extract the first word of "collateindex.pl", so it can be a program name with args.
16075 set dummy collateindex.pl; ac_word=$2
16076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16077 $as_echo_n "checking for $ac_word... " >&6; }
16078 if ${ac_cv_path_COLLATEINDEX+:} false; then :
16079   $as_echo_n "(cached) " >&6
16080 else
16081   case $COLLATEINDEX in
16082   [\\/]* | ?:[\\/]*)
16083   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
16084   ;;
16085   *)
16086   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16087 for as_dir in $PATH
16088 do
16089   IFS=$as_save_IFS
16090   test -z "$as_dir" && as_dir=.
16091     for ac_exec_ext in '' $ac_executable_extensions; do
16092   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16093     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
16094     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16095     break 2
16096   fi
16097 done
16098   done
16099 IFS=$as_save_IFS
16100
16101   ;;
16102 esac
16103 fi
16104 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
16105 if test -n "$COLLATEINDEX"; then
16106   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COLLATEINDEX" >&5
16107 $as_echo "$COLLATEINDEX" >&6; }
16108 else
16109   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16110 $as_echo "no" >&6; }
16111 fi
16112
16113
16114 fi
16115 for ac_prog in dbtoepub
16116 do
16117   # Extract the first word of "$ac_prog", so it can be a program name with args.
16118 set dummy $ac_prog; ac_word=$2
16119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16120 $as_echo_n "checking for $ac_word... " >&6; }
16121 if ${ac_cv_prog_DBTOEPUB+:} false; then :
16122   $as_echo_n "(cached) " >&6
16123 else
16124   if test -n "$DBTOEPUB"; then
16125   ac_cv_prog_DBTOEPUB="$DBTOEPUB" # Let the user override the test.
16126 else
16127 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16128 for as_dir in $PATH
16129 do
16130   IFS=$as_save_IFS
16131   test -z "$as_dir" && as_dir=.
16132     for ac_exec_ext in '' $ac_executable_extensions; do
16133   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16134     ac_cv_prog_DBTOEPUB="$ac_prog"
16135     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16136     break 2
16137   fi
16138 done
16139   done
16140 IFS=$as_save_IFS
16141
16142 fi
16143 fi
16144 DBTOEPUB=$ac_cv_prog_DBTOEPUB
16145 if test -n "$DBTOEPUB"; then
16146   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
16147 $as_echo "$DBTOEPUB" >&6; }
16148 else
16149   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16150 $as_echo "no" >&6; }
16151 fi
16152
16153
16154   test -n "$DBTOEPUB" && break
16155 done
16156
16157 for ac_prog in xmllint
16158 do
16159   # Extract the first word of "$ac_prog", so it can be a program name with args.
16160 set dummy $ac_prog; ac_word=$2
16161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16162 $as_echo_n "checking for $ac_word... " >&6; }
16163 if ${ac_cv_prog_XMLLINT+:} false; then :
16164   $as_echo_n "(cached) " >&6
16165 else
16166   if test -n "$XMLLINT"; then
16167   ac_cv_prog_XMLLINT="$XMLLINT" # Let the user override the test.
16168 else
16169 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16170 for as_dir in $PATH
16171 do
16172   IFS=$as_save_IFS
16173   test -z "$as_dir" && as_dir=.
16174     for ac_exec_ext in '' $ac_executable_extensions; do
16175   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16176     ac_cv_prog_XMLLINT="$ac_prog"
16177     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16178     break 2
16179   fi
16180 done
16181   done
16182 IFS=$as_save_IFS
16183
16184 fi
16185 fi
16186 XMLLINT=$ac_cv_prog_XMLLINT
16187 if test -n "$XMLLINT"; then
16188   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
16189 $as_echo "$XMLLINT" >&6; }
16190 else
16191   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16192 $as_echo "no" >&6; }
16193 fi
16194
16195
16196   test -n "$XMLLINT" && break
16197 done
16198
16199 for ac_prog in xsltproc
16200 do
16201   # Extract the first word of "$ac_prog", so it can be a program name with args.
16202 set dummy $ac_prog; ac_word=$2
16203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16204 $as_echo_n "checking for $ac_word... " >&6; }
16205 if ${ac_cv_prog_XSLTPROC+:} false; then :
16206   $as_echo_n "(cached) " >&6
16207 else
16208   if test -n "$XSLTPROC"; then
16209   ac_cv_prog_XSLTPROC="$XSLTPROC" # Let the user override the test.
16210 else
16211 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16212 for as_dir in $PATH
16213 do
16214   IFS=$as_save_IFS
16215   test -z "$as_dir" && as_dir=.
16216     for ac_exec_ext in '' $ac_executable_extensions; do
16217   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16218     ac_cv_prog_XSLTPROC="$ac_prog"
16219     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16220     break 2
16221   fi
16222 done
16223   done
16224 IFS=$as_save_IFS
16225
16226 fi
16227 fi
16228 XSLTPROC=$ac_cv_prog_XSLTPROC
16229 if test -n "$XSLTPROC"; then
16230   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
16231 $as_echo "$XSLTPROC" >&6; }
16232 else
16233   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16234 $as_echo "no" >&6; }
16235 fi
16236
16237
16238   test -n "$XSLTPROC" && break
16239 done
16240
16241 for ac_prog in osx sgml2xml sx
16242 do
16243   # Extract the first word of "$ac_prog", so it can be a program name with args.
16244 set dummy $ac_prog; ac_word=$2
16245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16246 $as_echo_n "checking for $ac_word... " >&6; }
16247 if ${ac_cv_prog_OSX+:} false; then :
16248   $as_echo_n "(cached) " >&6
16249 else
16250   if test -n "$OSX"; then
16251   ac_cv_prog_OSX="$OSX" # Let the user override the test.
16252 else
16253 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16254 for as_dir in $PATH
16255 do
16256   IFS=$as_save_IFS
16257   test -z "$as_dir" && as_dir=.
16258     for ac_exec_ext in '' $ac_executable_extensions; do
16259   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16260     ac_cv_prog_OSX="$ac_prog"
16261     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16262     break 2
16263   fi
16264 done
16265   done
16266 IFS=$as_save_IFS
16267
16268 fi
16269 fi
16270 OSX=$ac_cv_prog_OSX
16271 if test -n "$OSX"; then
16272   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OSX" >&5
16273 $as_echo "$OSX" >&6; }
16274 else
16275   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16276 $as_echo "no" >&6; }
16277 fi
16278
16279
16280   test -n "$OSX" && break
16281 done
16282
16283
16284 #
16285 # Check for test tools
16286 #
16287 if test "$enable_tap_tests" = yes; then
16288   for ac_prog in prove
16289 do
16290   # Extract the first word of "$ac_prog", so it can be a program name with args.
16291 set dummy $ac_prog; ac_word=$2
16292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16293 $as_echo_n "checking for $ac_word... " >&6; }
16294 if ${ac_cv_prog_PROVE+:} false; then :
16295   $as_echo_n "(cached) " >&6
16296 else
16297   if test -n "$PROVE"; then
16298   ac_cv_prog_PROVE="$PROVE" # Let the user override the test.
16299 else
16300 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16301 for as_dir in $PATH
16302 do
16303   IFS=$as_save_IFS
16304   test -z "$as_dir" && as_dir=.
16305     for ac_exec_ext in '' $ac_executable_extensions; do
16306   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16307     ac_cv_prog_PROVE="$ac_prog"
16308     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16309     break 2
16310   fi
16311 done
16312   done
16313 IFS=$as_save_IFS
16314
16315 fi
16316 fi
16317 PROVE=$ac_cv_prog_PROVE
16318 if test -n "$PROVE"; then
16319   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
16320 $as_echo "$PROVE" >&6; }
16321 else
16322   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16323 $as_echo "no" >&6; }
16324 fi
16325
16326
16327   test -n "$PROVE" && break
16328 done
16329
16330   if test -z "$PROVE"; then
16331     as_fn_error $? "prove not found" "$LINENO" 5
16332   fi
16333   if test -z "$PERL"; then
16334     as_fn_error $? "Perl not found" "$LINENO" 5
16335   fi
16336 fi
16337
16338 # Thread testing
16339
16340 # We have to run the thread test near the end so we have all our symbols
16341 # defined.  Cross compiling throws a warning.
16342 #
16343 if test "$enable_thread_safety" = yes; then
16344 if test "$PORTNAME" != "win32"
16345 then
16346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking thread safety of required library functions" >&5
16347 $as_echo_n "checking thread safety of required library functions... " >&6; }
16348
16349 _CFLAGS="$CFLAGS"
16350 _LIBS="$LIBS"
16351 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
16352 LIBS="$LIBS $PTHREAD_LIBS"
16353 if test "$cross_compiling" = yes; then :
16354   { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
16355 $as_echo "maybe" >&6; }
16356   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
16357 *** Skipping thread test program because of cross-compile build.
16358 *** Run the program in src/test/thread on the target machine.
16359 " >&5
16360 $as_echo "$as_me: WARNING:
16361 *** Skipping thread test program because of cross-compile build.
16362 *** Run the program in src/test/thread on the target machine.
16363 " >&2;}
16364 else
16365   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16366 /* end confdefs.h.  */
16367 #include "$srcdir/src/test/thread/thread_test.c"
16368 _ACEOF
16369 if ac_fn_c_try_run "$LINENO"; then :
16370   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16371 $as_echo "yes" >&6; }
16372 else
16373   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16374 $as_echo "no" >&6; }
16375   as_fn_error $? "thread test program failed
16376 This platform is not thread-safe.  Check the file 'config.log' or compile
16377 and run src/test/thread/thread_test for the exact reason.
16378 Use --disable-thread-safety to disable thread safety." "$LINENO" 5
16379 fi
16380 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16381   conftest.$ac_objext conftest.beam conftest.$ac_ext
16382 fi
16383
16384 CFLAGS="$_CFLAGS"
16385 LIBS="$_LIBS"
16386 else
16387 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** skipping thread test on Win32" >&5
16388 $as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
16389 fi
16390 fi
16391
16392 # If compiler will take -Wl,--as-needed (or various platform-specific
16393 # spellings thereof) then add that to LDFLAGS.  This is much easier than
16394 # trying to filter LIBS to the minimum for each executable.
16395 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
16396 # libreadline; therefore we postpone testing it until we know what library
16397 # dependencies readline has.  The test code will try to link with $LIBS.
16398 if test "$with_readline" = yes; then
16399   link_test_func=readline
16400 else
16401   link_test_func=exit
16402 fi
16403
16404 if test "$PORTNAME" = "darwin"; then
16405   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
16406 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
16407 if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
16408   $as_echo_n "(cached) " >&6
16409 else
16410   pgac_save_LDFLAGS=$LDFLAGS
16411 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
16412 if test "$cross_compiling" = yes; then :
16413   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
16414 else
16415   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16416 /* end confdefs.h.  */
16417 extern void $link_test_func (); void (*fptr) () = $link_test_func;
16418 int
16419 main ()
16420 {
16421
16422   ;
16423   return 0;
16424 }
16425 _ACEOF
16426 if ac_fn_c_try_run "$LINENO"; then :
16427   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
16428 else
16429   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
16430 fi
16431 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16432   conftest.$ac_objext conftest.beam conftest.$ac_ext
16433 fi
16434
16435 LDFLAGS="$pgac_save_LDFLAGS"
16436 fi
16437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
16438 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
16439 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
16440   LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
16441 fi
16442
16443 elif test "$PORTNAME" = "openbsd"; then
16444   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
16445 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
16446 if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
16447   $as_echo_n "(cached) " >&6
16448 else
16449   pgac_save_LDFLAGS=$LDFLAGS
16450 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
16451 if test "$cross_compiling" = yes; then :
16452   pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
16453 else
16454   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16455 /* end confdefs.h.  */
16456 extern void $link_test_func (); void (*fptr) () = $link_test_func;
16457 int
16458 main ()
16459 {
16460
16461   ;
16462   return 0;
16463 }
16464 _ACEOF
16465 if ac_fn_c_try_run "$LINENO"; then :
16466   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
16467 else
16468   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
16469 fi
16470 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16471   conftest.$ac_objext conftest.beam conftest.$ac_ext
16472 fi
16473
16474 LDFLAGS="$pgac_save_LDFLAGS"
16475 fi
16476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
16477 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
16478 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
16479   LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
16480 fi
16481
16482 else
16483   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
16484 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
16485 if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
16486   $as_echo_n "(cached) " >&6
16487 else
16488   pgac_save_LDFLAGS=$LDFLAGS
16489 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
16490 if test "$cross_compiling" = yes; then :
16491   pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
16492 else
16493   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16494 /* end confdefs.h.  */
16495 extern void $link_test_func (); void (*fptr) () = $link_test_func;
16496 int
16497 main ()
16498 {
16499
16500   ;
16501   return 0;
16502 }
16503 _ACEOF
16504 if ac_fn_c_try_run "$LINENO"; then :
16505   pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
16506 else
16507   pgac_cv_prog_cc_ldflags__Wl___as_needed=no
16508 fi
16509 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16510   conftest.$ac_objext conftest.beam conftest.$ac_ext
16511 fi
16512
16513 LDFLAGS="$pgac_save_LDFLAGS"
16514 fi
16515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
16516 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
16517 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
16518   LDFLAGS="$LDFLAGS -Wl,--as-needed"
16519 fi
16520
16521 fi
16522
16523 # Create compiler version string
16524 if test x"$GCC" = x"yes" ; then
16525   cc_string=`${CC} --version | sed q`
16526   case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
16527 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
16528   cc_string=`${CC} -V 2>&1 | sed q`
16529 else
16530   cc_string=$CC
16531 fi
16532
16533
16534 cat >>confdefs.h <<_ACEOF
16535 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
16536 _ACEOF
16537
16538
16539 # Supply a numeric version string for use by 3rd party add-ons
16540 # awk -F is a regex on some platforms, and not on others, so make "." a tab
16541 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
16542 tr '.' '        ' |
16543 $AWK '{printf "%d%02d%02d", $1, $2, (NF >= 3) ? $3 : 0}'`"
16544
16545 cat >>confdefs.h <<_ACEOF
16546 #define PG_VERSION_NUM $PG_VERSION_NUM
16547 _ACEOF
16548
16549
16550
16551
16552 # Begin output steps
16553
16554 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
16555 $as_echo "$as_me: using compiler=$cc_string" >&6;}
16556 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
16557 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
16558 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
16559 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
16560 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
16561 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
16562
16563 # prepare build tree if outside source tree
16564 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
16565 # Note 2: /bin/pwd might be better than shell's built-in at getting
16566 #         a symlink-free name.
16567 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
16568   vpath_build=no
16569 else
16570   vpath_build=yes
16571   if test "$no_create" != yes; then
16572     $as_echo_n "preparing build tree... " >&6
16573     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
16574     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
16575       || as_fn_error $? "failed" "$LINENO" 5
16576     { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16577 $as_echo "done" >&6; }
16578   fi
16579 fi
16580
16581
16582
16583 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
16584
16585
16586 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}"
16587
16588
16589 if test "$PORTNAME" = "win32"; then
16590 ac_config_commands="$ac_config_commands check_win32_symlinks"
16591
16592 fi
16593
16594 ac_config_headers="$ac_config_headers src/include/pg_config.h"
16595
16596
16597 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
16598
16599
16600 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
16601
16602
16603 cat >confcache <<\_ACEOF
16604 # This file is a shell script that caches the results of configure
16605 # tests run on this system so they can be shared between configure
16606 # scripts and configure runs, see configure's option --config-cache.
16607 # It is not useful on other systems.  If it contains results you don't
16608 # want to keep, you may remove or edit it.
16609 #
16610 # config.status only pays attention to the cache file if you give it
16611 # the --recheck option to rerun configure.
16612 #
16613 # `ac_cv_env_foo' variables (set or unset) will be overridden when
16614 # loading this file, other *unset* `ac_cv_foo' will be assigned the
16615 # following values.
16616
16617 _ACEOF
16618
16619 # The following way of writing the cache mishandles newlines in values,
16620 # but we know of no workaround that is simple, portable, and efficient.
16621 # So, we kill variables containing newlines.
16622 # Ultrix sh set writes to stderr and can't be redirected directly,
16623 # and sets the high bit in the cache file unless we assign to the vars.
16624 (
16625   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16626     eval ac_val=\$$ac_var
16627     case $ac_val in #(
16628     *${as_nl}*)
16629       case $ac_var in #(
16630       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16631 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
16632       esac
16633       case $ac_var in #(
16634       _ | IFS | as_nl) ;; #(
16635       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16636       *) { eval $ac_var=; unset $ac_var;} ;;
16637       esac ;;
16638     esac
16639   done
16640
16641   (set) 2>&1 |
16642     case $as_nl`(ac_space=' '; set) 2>&1` in #(
16643     *${as_nl}ac_space=\ *)
16644       # `set' does not quote correctly, so add quotes: double-quote
16645       # substitution turns \\\\ into \\, and sed turns \\ into \.
16646       sed -n \
16647         "s/'/'\\\\''/g;
16648           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16649       ;; #(
16650     *)
16651       # `set' quotes correctly as required by POSIX, so do not add quotes.
16652       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
16653       ;;
16654     esac |
16655     sort
16656 ) |
16657   sed '
16658      /^ac_cv_env_/b end
16659      t clear
16660      :clear
16661      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16662      t end
16663      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16664      :end' >>confcache
16665 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16666   if test -w "$cache_file"; then
16667     if test "x$cache_file" != "x/dev/null"; then
16668       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16669 $as_echo "$as_me: updating cache $cache_file" >&6;}
16670       if test ! -f "$cache_file" || test -h "$cache_file"; then
16671         cat confcache >"$cache_file"
16672       else
16673         case $cache_file in #(
16674         */* | ?:*)
16675           mv -f confcache "$cache_file"$$ &&
16676           mv -f "$cache_file"$$ "$cache_file" ;; #(
16677         *)
16678           mv -f confcache "$cache_file" ;;
16679         esac
16680       fi
16681     fi
16682   else
16683     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16684 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
16685   fi
16686 fi
16687 rm -f confcache
16688
16689 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16690 # Let make expand exec_prefix.
16691 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16692
16693 DEFS=-DHAVE_CONFIG_H
16694
16695 ac_libobjs=
16696 ac_ltlibobjs=
16697 U=
16698 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16699   # 1. Remove the extension, and $U if already installed.
16700   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
16701   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
16702   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
16703   #    will be set to the directory where LIBOBJS objects are built.
16704   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16705   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
16706 done
16707 LIBOBJS=$ac_libobjs
16708
16709 LTLIBOBJS=$ac_ltlibobjs
16710
16711
16712
16713
16714 : "${CONFIG_STATUS=./config.status}"
16715 ac_write_fail=0
16716 ac_clean_files_save=$ac_clean_files
16717 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16718 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16719 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16720 as_write_fail=0
16721 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
16722 #! $SHELL
16723 # Generated by $as_me.
16724 # Run this file to recreate the current configuration.
16725 # Compiler output produced by configure, useful for debugging
16726 # configure, is in config.log if it exists.
16727
16728 debug=false
16729 ac_cs_recheck=false
16730 ac_cs_silent=false
16731
16732 SHELL=\${CONFIG_SHELL-$SHELL}
16733 export SHELL
16734 _ASEOF
16735 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16736 ## -------------------- ##
16737 ## M4sh Initialization. ##
16738 ## -------------------- ##
16739
16740 # Be more Bourne compatible
16741 DUALCASE=1; export DUALCASE # for MKS sh
16742 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
16743   emulate sh
16744   NULLCMD=:
16745   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
16746   # is contrary to our usage.  Disable this feature.
16747   alias -g '${1+"$@"}'='"$@"'
16748   setopt NO_GLOB_SUBST
16749 else
16750   case `(set -o) 2>/dev/null` in #(
16751   *posix*) :
16752     set -o posix ;; #(
16753   *) :
16754      ;;
16755 esac
16756 fi
16757
16758
16759 as_nl='
16760 '
16761 export as_nl
16762 # Printing a long string crashes Solaris 7 /usr/bin/printf.
16763 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16764 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16765 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16766 # Prefer a ksh shell builtin over an external printf program on Solaris,
16767 # but without wasting forks for bash or zsh.
16768 if test -z "$BASH_VERSION$ZSH_VERSION" \
16769     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16770   as_echo='print -r --'
16771   as_echo_n='print -rn --'
16772 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16773   as_echo='printf %s\n'
16774   as_echo_n='printf %s'
16775 else
16776   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16777     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16778     as_echo_n='/usr/ucb/echo -n'
16779   else
16780     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16781     as_echo_n_body='eval
16782       arg=$1;
16783       case $arg in #(
16784       *"$as_nl"*)
16785         expr "X$arg" : "X\\(.*\\)$as_nl";
16786         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16787       esac;
16788       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16789     '
16790     export as_echo_n_body
16791     as_echo_n='sh -c $as_echo_n_body as_echo'
16792   fi
16793   export as_echo_body
16794   as_echo='sh -c $as_echo_body as_echo'
16795 fi
16796
16797 # The user is always right.
16798 if test "${PATH_SEPARATOR+set}" != set; then
16799   PATH_SEPARATOR=:
16800   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16801     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16802       PATH_SEPARATOR=';'
16803   }
16804 fi
16805
16806
16807 # IFS
16808 # We need space, tab and new line, in precisely that order.  Quoting is
16809 # there to prevent editors from complaining about space-tab.
16810 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
16811 # splitting by setting IFS to empty value.)
16812 IFS=" ""        $as_nl"
16813
16814 # Find who we are.  Look in the path if we contain no directory separator.
16815 as_myself=
16816 case $0 in #((
16817   *[\\/]* ) as_myself=$0 ;;
16818   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16819 for as_dir in $PATH
16820 do
16821   IFS=$as_save_IFS
16822   test -z "$as_dir" && as_dir=.
16823     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16824   done
16825 IFS=$as_save_IFS
16826
16827      ;;
16828 esac
16829 # We did not find ourselves, most probably we were run as `sh COMMAND'
16830 # in which case we are not to be found in the path.
16831 if test "x$as_myself" = x; then
16832   as_myself=$0
16833 fi
16834 if test ! -f "$as_myself"; then
16835   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16836   exit 1
16837 fi
16838
16839 # Unset variables that we do not need and which cause bugs (e.g. in
16840 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
16841 # suppresses any "Segmentation fault" message there.  '((' could
16842 # trigger a bug in pdksh 5.2.14.
16843 for as_var in BASH_ENV ENV MAIL MAILPATH
16844 do eval test x\${$as_var+set} = xset \
16845   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
16846 done
16847 PS1='$ '
16848 PS2='> '
16849 PS4='+ '
16850
16851 # NLS nuisances.
16852 LC_ALL=C
16853 export LC_ALL
16854 LANGUAGE=C
16855 export LANGUAGE
16856
16857 # CDPATH.
16858 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16859
16860
16861 # as_fn_error STATUS ERROR [LINENO LOG_FD]
16862 # ----------------------------------------
16863 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16864 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
16865 # script with STATUS, using 1 if that was 0.
16866 as_fn_error ()
16867 {
16868   as_status=$1; test $as_status -eq 0 && as_status=1
16869   if test "$4"; then
16870     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16871     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
16872   fi
16873   $as_echo "$as_me: error: $2" >&2
16874   as_fn_exit $as_status
16875 } # as_fn_error
16876
16877
16878 # as_fn_set_status STATUS
16879 # -----------------------
16880 # Set $? to STATUS, without forking.
16881 as_fn_set_status ()
16882 {
16883   return $1
16884 } # as_fn_set_status
16885
16886 # as_fn_exit STATUS
16887 # -----------------
16888 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16889 as_fn_exit ()
16890 {
16891   set +e
16892   as_fn_set_status $1
16893   exit $1
16894 } # as_fn_exit
16895
16896 # as_fn_unset VAR
16897 # ---------------
16898 # Portably unset VAR.
16899 as_fn_unset ()
16900 {
16901   { eval $1=; unset $1;}
16902 }
16903 as_unset=as_fn_unset
16904 # as_fn_append VAR VALUE
16905 # ----------------------
16906 # Append the text in VALUE to the end of the definition contained in VAR. Take
16907 # advantage of any shell optimizations that allow amortized linear growth over
16908 # repeated appends, instead of the typical quadratic growth present in naive
16909 # implementations.
16910 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16911   eval 'as_fn_append ()
16912   {
16913     eval $1+=\$2
16914   }'
16915 else
16916   as_fn_append ()
16917   {
16918     eval $1=\$$1\$2
16919   }
16920 fi # as_fn_append
16921
16922 # as_fn_arith ARG...
16923 # ------------------
16924 # Perform arithmetic evaluation on the ARGs, and store the result in the
16925 # global $as_val. Take advantage of shells that can avoid forks. The arguments
16926 # must be portable across $(()) and expr.
16927 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16928   eval 'as_fn_arith ()
16929   {
16930     as_val=$(( $* ))
16931   }'
16932 else
16933   as_fn_arith ()
16934   {
16935     as_val=`expr "$@" || test $? -eq 1`
16936   }
16937 fi # as_fn_arith
16938
16939
16940 if expr a : '\(a\)' >/dev/null 2>&1 &&
16941    test "X`expr 00001 : '.*\(...\)'`" = X001; then
16942   as_expr=expr
16943 else
16944   as_expr=false
16945 fi
16946
16947 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16948   as_basename=basename
16949 else
16950   as_basename=false
16951 fi
16952
16953 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16954   as_dirname=dirname
16955 else
16956   as_dirname=false
16957 fi
16958
16959 as_me=`$as_basename -- "$0" ||
16960 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16961          X"$0" : 'X\(//\)$' \| \
16962          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
16963 $as_echo X/"$0" |
16964     sed '/^.*\/\([^/][^/]*\)\/*$/{
16965             s//\1/
16966             q
16967           }
16968           /^X\/\(\/\/\)$/{
16969             s//\1/
16970             q
16971           }
16972           /^X\/\(\/\).*/{
16973             s//\1/
16974             q
16975           }
16976           s/.*/./; q'`
16977
16978 # Avoid depending upon Character Ranges.
16979 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16980 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16981 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16982 as_cr_digits='0123456789'
16983 as_cr_alnum=$as_cr_Letters$as_cr_digits
16984
16985 ECHO_C= ECHO_N= ECHO_T=
16986 case `echo -n x` in #(((((
16987 -n*)
16988   case `echo 'xy\c'` in
16989   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
16990   xy)  ECHO_C='\c';;
16991   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
16992        ECHO_T=' ';;
16993   esac;;
16994 *)
16995   ECHO_N='-n';;
16996 esac
16997
16998 rm -f conf$$ conf$$.exe conf$$.file
16999 if test -d conf$$.dir; then
17000   rm -f conf$$.dir/conf$$.file
17001 else
17002   rm -f conf$$.dir
17003   mkdir conf$$.dir 2>/dev/null
17004 fi
17005 if (echo >conf$$.file) 2>/dev/null; then
17006   if ln -s conf$$.file conf$$ 2>/dev/null; then
17007     as_ln_s='ln -s'
17008     # ... but there are two gotchas:
17009     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17010     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
17011     # In both cases, we have to default to `cp -pR'.
17012     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
17013       as_ln_s='cp -pR'
17014   elif ln conf$$.file conf$$ 2>/dev/null; then
17015     as_ln_s=ln
17016   else
17017     as_ln_s='cp -pR'
17018   fi
17019 else
17020   as_ln_s='cp -pR'
17021 fi
17022 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17023 rmdir conf$$.dir 2>/dev/null
17024
17025
17026 # as_fn_mkdir_p
17027 # -------------
17028 # Create "$as_dir" as a directory, including parents if necessary.
17029 as_fn_mkdir_p ()
17030 {
17031
17032   case $as_dir in #(
17033   -*) as_dir=./$as_dir;;
17034   esac
17035   test -d "$as_dir" || eval $as_mkdir_p || {
17036     as_dirs=
17037     while :; do
17038       case $as_dir in #(
17039       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17040       *) as_qdir=$as_dir;;
17041       esac
17042       as_dirs="'$as_qdir' $as_dirs"
17043       as_dir=`$as_dirname -- "$as_dir" ||
17044 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17045          X"$as_dir" : 'X\(//\)[^/]' \| \
17046          X"$as_dir" : 'X\(//\)$' \| \
17047          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17048 $as_echo X"$as_dir" |
17049     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17050             s//\1/
17051             q
17052           }
17053           /^X\(\/\/\)[^/].*/{
17054             s//\1/
17055             q
17056           }
17057           /^X\(\/\/\)$/{
17058             s//\1/
17059             q
17060           }
17061           /^X\(\/\).*/{
17062             s//\1/
17063             q
17064           }
17065           s/.*/./; q'`
17066       test -d "$as_dir" && break
17067     done
17068     test -z "$as_dirs" || eval "mkdir $as_dirs"
17069   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
17070
17071
17072 } # as_fn_mkdir_p
17073 if mkdir -p . 2>/dev/null; then
17074   as_mkdir_p='mkdir -p "$as_dir"'
17075 else
17076   test -d ./-p && rmdir ./-p
17077   as_mkdir_p=false
17078 fi
17079
17080
17081 # as_fn_executable_p FILE
17082 # -----------------------
17083 # Test if FILE is an executable regular file.
17084 as_fn_executable_p ()
17085 {
17086   test -f "$1" && test -x "$1"
17087 } # as_fn_executable_p
17088 as_test_x='test -x'
17089 as_executable_p=as_fn_executable_p
17090
17091 # Sed expression to map a string onto a valid CPP name.
17092 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
17093
17094 # Sed expression to map a string onto a valid variable name.
17095 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
17096
17097
17098 exec 6>&1
17099 ## ----------------------------------- ##
17100 ## Main body of $CONFIG_STATUS script. ##
17101 ## ----------------------------------- ##
17102 _ASEOF
17103 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
17104
17105 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17106 # Save the log message, to keep $0 and so on meaningful, and to
17107 # report actual input values of CONFIG_FILES etc. instead of their
17108 # values after options handling.
17109 ac_log="
17110 This file was extended by PostgreSQL $as_me 10devel, which was
17111 generated by GNU Autoconf 2.69.  Invocation command line was
17112
17113   CONFIG_FILES    = $CONFIG_FILES
17114   CONFIG_HEADERS  = $CONFIG_HEADERS
17115   CONFIG_LINKS    = $CONFIG_LINKS
17116   CONFIG_COMMANDS = $CONFIG_COMMANDS
17117   $ $0 $@
17118
17119 on `(hostname || uname -n) 2>/dev/null | sed 1q`
17120 "
17121
17122 _ACEOF
17123
17124 case $ac_config_files in *"
17125 "*) set x $ac_config_files; shift; ac_config_files=$*;;
17126 esac
17127
17128 case $ac_config_headers in *"
17129 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17130 esac
17131
17132
17133 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17134 # Files that config.status was made for.
17135 config_files="$ac_config_files"
17136 config_headers="$ac_config_headers"
17137 config_links="$ac_config_links"
17138 config_commands="$ac_config_commands"
17139
17140 _ACEOF
17141
17142 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17143 ac_cs_usage="\
17144 \`$as_me' instantiates files and other configuration actions
17145 from templates according to the current configuration.  Unless the files
17146 and actions are specified as TAGs, all are instantiated by default.
17147
17148 Usage: $0 [OPTION]... [TAG]...
17149
17150   -h, --help       print this help, then exit
17151   -V, --version    print version number and configuration settings, then exit
17152       --config     print configuration, then exit
17153   -q, --quiet, --silent
17154                    do not print progress messages
17155   -d, --debug      don't remove temporary files
17156       --recheck    update $as_me by reconfiguring in the same conditions
17157       --file=FILE[:TEMPLATE]
17158                    instantiate the configuration file FILE
17159       --header=FILE[:TEMPLATE]
17160                    instantiate the configuration header FILE
17161
17162 Configuration files:
17163 $config_files
17164
17165 Configuration headers:
17166 $config_headers
17167
17168 Configuration links:
17169 $config_links
17170
17171 Configuration commands:
17172 $config_commands
17173
17174 Report bugs to <pgsql-bugs@postgresql.org>."
17175
17176 _ACEOF
17177 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17178 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
17179 ac_cs_version="\\
17180 PostgreSQL config.status 10devel
17181 configured by $0, generated by GNU Autoconf 2.69,
17182   with options \\"\$ac_cs_config\\"
17183
17184 Copyright (C) 2012 Free Software Foundation, Inc.
17185 This config.status script is free software; the Free Software Foundation
17186 gives unlimited permission to copy, distribute and modify it."
17187
17188 ac_pwd='$ac_pwd'
17189 srcdir='$srcdir'
17190 INSTALL='$INSTALL'
17191 MKDIR_P='$MKDIR_P'
17192 AWK='$AWK'
17193 test -n "\$AWK" || AWK=awk
17194 _ACEOF
17195
17196 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17197 # The default lists apply if the user does not specify any file.
17198 ac_need_defaults=:
17199 while test $# != 0
17200 do
17201   case $1 in
17202   --*=?*)
17203     ac_option=`expr "X$1" : 'X\([^=]*\)='`
17204     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
17205     ac_shift=:
17206     ;;
17207   --*=)
17208     ac_option=`expr "X$1" : 'X\([^=]*\)='`
17209     ac_optarg=
17210     ac_shift=:
17211     ;;
17212   *)
17213     ac_option=$1
17214     ac_optarg=$2
17215     ac_shift=shift
17216     ;;
17217   esac
17218
17219   case $ac_option in
17220   # Handling of the options.
17221   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17222     ac_cs_recheck=: ;;
17223   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
17224     $as_echo "$ac_cs_version"; exit ;;
17225   --config | --confi | --conf | --con | --co | --c )
17226     $as_echo "$ac_cs_config"; exit ;;
17227   --debug | --debu | --deb | --de | --d | -d )
17228     debug=: ;;
17229   --file | --fil | --fi | --f )
17230     $ac_shift
17231     case $ac_optarg in
17232     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17233     '') as_fn_error $? "missing file argument" ;;
17234     esac
17235     as_fn_append CONFIG_FILES " '$ac_optarg'"
17236     ac_need_defaults=false;;
17237   --header | --heade | --head | --hea )
17238     $ac_shift
17239     case $ac_optarg in
17240     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17241     esac
17242     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
17243     ac_need_defaults=false;;
17244   --he | --h)
17245     # Conflict between --help and --header
17246     as_fn_error $? "ambiguous option: \`$1'
17247 Try \`$0 --help' for more information.";;
17248   --help | --hel | -h )
17249     $as_echo "$ac_cs_usage"; exit ;;
17250   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17251   | -silent | --silent | --silen | --sile | --sil | --si | --s)
17252     ac_cs_silent=: ;;
17253
17254   # This is an error.
17255   -*) as_fn_error $? "unrecognized option: \`$1'
17256 Try \`$0 --help' for more information." ;;
17257
17258   *) as_fn_append ac_config_targets " $1"
17259      ac_need_defaults=false ;;
17260
17261   esac
17262   shift
17263 done
17264
17265 ac_configure_extra_args=
17266
17267 if $ac_cs_silent; then
17268   exec 6>/dev/null
17269   ac_configure_extra_args="$ac_configure_extra_args --silent"
17270 fi
17271
17272 _ACEOF
17273 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17274 if \$ac_cs_recheck; then
17275   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
17276   shift
17277   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17278   CONFIG_SHELL='$SHELL'
17279   export CONFIG_SHELL
17280   exec "\$@"
17281 fi
17282
17283 _ACEOF
17284 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17285 exec 5>>config.log
17286 {
17287   echo
17288   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17289 ## Running $as_me. ##
17290 _ASBOX
17291   $as_echo "$ac_log"
17292 } >&5
17293
17294 _ACEOF
17295 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17296 _ACEOF
17297
17298 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17299
17300 # Handling of arguments.
17301 for ac_config_target in $ac_config_targets
17302 do
17303   case $ac_config_target in
17304     "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
17305     "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
17306     "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
17307     "src/backend/port/dynloader.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
17308     "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
17309     "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
17310     "src/include/dynloader.h") CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
17311     "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
17312     "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
17313     "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
17314     "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
17315     "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
17316     "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
17317
17318   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
17319   esac
17320 done
17321
17322
17323 # If the user did not use the arguments to specify the items to instantiate,
17324 # then the envvar interface is used.  Set only those that are not.
17325 # We use the long form for the default assignment because of an extremely
17326 # bizarre bug on SunOS 4.1.3.
17327 if $ac_need_defaults; then
17328   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17329   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17330   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
17331   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17332 fi
17333
17334 # Have a temporary directory for convenience.  Make it in the build tree
17335 # simply because there is no reason against having it here, and in addition,
17336 # creating and moving files from /tmp can sometimes cause problems.
17337 # Hook for its removal unless debugging.
17338 # Note that there is a small window in which the directory will not be cleaned:
17339 # after its creation but before its name has been assigned to `$tmp'.
17340 $debug ||
17341 {
17342   tmp= ac_tmp=
17343   trap 'exit_status=$?
17344   : "${ac_tmp:=$tmp}"
17345   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
17346 ' 0
17347   trap 'as_fn_exit 1' 1 2 13 15
17348 }
17349 # Create a (secure) tmp directory for tmp files.
17350
17351 {
17352   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
17353   test -d "$tmp"
17354 }  ||
17355 {
17356   tmp=./conf$$-$RANDOM
17357   (umask 077 && mkdir "$tmp")
17358 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
17359 ac_tmp=$tmp
17360
17361 # Set up the scripts for CONFIG_FILES section.
17362 # No need to generate them if there are no CONFIG_FILES.
17363 # This happens for instance with `./config.status config.h'.
17364 if test -n "$CONFIG_FILES"; then
17365
17366
17367 ac_cr=`echo X | tr X '\015'`
17368 # On cygwin, bash can eat \r inside `` if the user requested igncr.
17369 # But we know of no other shell where ac_cr would be empty at this
17370 # point, so we can use a bashism as a fallback.
17371 if test "x$ac_cr" = x; then
17372   eval ac_cr=\$\'\\r\'
17373 fi
17374 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17375 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
17376   ac_cs_awk_cr='\\r'
17377 else
17378   ac_cs_awk_cr=$ac_cr
17379 fi
17380
17381 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
17382 _ACEOF
17383
17384
17385 {
17386   echo "cat >conf$$subs.awk <<_ACEOF" &&
17387   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17388   echo "_ACEOF"
17389 } >conf$$subs.sh ||
17390   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17391 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
17392 ac_delim='%!_!# '
17393 for ac_last_try in false false false false false :; do
17394   . ./conf$$subs.sh ||
17395     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17396
17397   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17398   if test $ac_delim_n = $ac_delim_num; then
17399     break
17400   elif $ac_last_try; then
17401     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17402   else
17403     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17404   fi
17405 done
17406 rm -f conf$$subs.sh
17407
17408 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17409 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
17410 _ACEOF
17411 sed -n '
17412 h
17413 s/^/S["/; s/!.*/"]=/
17414 p
17415 g
17416 s/^[^!]*!//
17417 :repl
17418 t repl
17419 s/'"$ac_delim"'$//
17420 t delim
17421 :nl
17422 h
17423 s/\(.\{148\}\)..*/\1/
17424 t more1
17425 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17426 p
17427 n
17428 b repl
17429 :more1
17430 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17431 p
17432 g
17433 s/.\{148\}//
17434 t nl
17435 :delim
17436 h
17437 s/\(.\{148\}\)..*/\1/
17438 t more2
17439 s/["\\]/\\&/g; s/^/"/; s/$/"/
17440 p
17441 b
17442 :more2
17443 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17444 p
17445 g
17446 s/.\{148\}//
17447 t delim
17448 ' <conf$$subs.awk | sed '
17449 /^[^""]/{
17450   N
17451   s/\n//
17452 }
17453 ' >>$CONFIG_STATUS || ac_write_fail=1
17454 rm -f conf$$subs.awk
17455 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17456 _ACAWK
17457 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
17458   for (key in S) S_is_set[key] = 1
17459   FS = "\a"
17460
17461 }
17462 {
17463   line = $ 0
17464   nfields = split(line, field, "@")
17465   substed = 0
17466   len = length(field[1])
17467   for (i = 2; i < nfields; i++) {
17468     key = field[i]
17469     keylen = length(key)
17470     if (S_is_set[key]) {
17471       value = S[key]
17472       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17473       len += length(value) + length(field[++i])
17474       substed = 1
17475     } else
17476       len += 1 + keylen
17477   }
17478
17479   print line
17480 }
17481
17482 _ACAWK
17483 _ACEOF
17484 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17485 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17486   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17487 else
17488   cat
17489 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
17490   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
17491 _ACEOF
17492
17493 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17494 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
17495 # trailing colons and then remove the whole line if VPATH becomes empty
17496 # (actually we leave an empty line to preserve line numbers).
17497 if test "x$srcdir" = x.; then
17498   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
17499 h
17500 s///
17501 s/^/:/
17502 s/[      ]*$/:/
17503 s/:\$(srcdir):/:/g
17504 s/:\${srcdir}:/:/g
17505 s/:@srcdir@:/:/g
17506 s/^:*//
17507 s/:*$//
17508 x
17509 s/\(=[   ]*\).*/\1/
17510 G
17511 s/\n//
17512 s/^[^=]*=[       ]*$//
17513 }'
17514 fi
17515
17516 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17517 fi # test -n "$CONFIG_FILES"
17518
17519 # Set up the scripts for CONFIG_HEADERS section.
17520 # No need to generate them if there are no CONFIG_HEADERS.
17521 # This happens for instance with `./config.status Makefile'.
17522 if test -n "$CONFIG_HEADERS"; then
17523 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
17524 BEGIN {
17525 _ACEOF
17526
17527 # Transform confdefs.h into an awk script `defines.awk', embedded as
17528 # here-document in config.status, that substitutes the proper values into
17529 # config.h.in to produce config.h.
17530
17531 # Create a delimiter string that does not exist in confdefs.h, to ease
17532 # handling of long lines.
17533 ac_delim='%!_!# '
17534 for ac_last_try in false false :; do
17535   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17536   if test -z "$ac_tt"; then
17537     break
17538   elif $ac_last_try; then
17539     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
17540   else
17541     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17542   fi
17543 done
17544
17545 # For the awk script, D is an array of macro values keyed by name,
17546 # likewise P contains macro parameters if any.  Preserve backslash
17547 # newline sequences.
17548
17549 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17550 sed -n '
17551 s/.\{148\}/&'"$ac_delim"'/g
17552 t rset
17553 :rset
17554 s/^[     ]*#[    ]*define[       ][      ]*/ /
17555 t def
17556 d
17557 :def
17558 s/\\$//
17559 t bsnl
17560 s/["\\]/\\&/g
17561 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
17562 D["\1"]=" \3"/p
17563 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
17564 d
17565 :bsnl
17566 s/["\\]/\\&/g
17567 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
17568 D["\1"]=" \3\\\\\\n"\\/p
17569 t cont
17570 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17571 t cont
17572 d
17573 :cont
17574 n
17575 s/.\{148\}/&'"$ac_delim"'/g
17576 t clear
17577 :clear
17578 s/\\$//
17579 t bsnlc
17580 s/["\\]/\\&/g; s/^/"/; s/$/"/p
17581 d
17582 :bsnlc
17583 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17584 b cont
17585 ' <confdefs.h | sed '
17586 s/'"$ac_delim"'/"\\\
17587 "/g' >>$CONFIG_STATUS || ac_write_fail=1
17588
17589 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17590   for (key in D) D_is_set[key] = 1
17591   FS = "\a"
17592 }
17593 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17594   line = \$ 0
17595   split(line, arg, " ")
17596   if (arg[1] == "#") {
17597     defundef = arg[2]
17598     mac1 = arg[3]
17599   } else {
17600     defundef = substr(arg[1], 2)
17601     mac1 = arg[2]
17602   }
17603   split(mac1, mac2, "(") #)
17604   macro = mac2[1]
17605   prefix = substr(line, 1, index(line, defundef) - 1)
17606   if (D_is_set[macro]) {
17607     # Preserve the white space surrounding the "#".
17608     print prefix "define", macro P[macro] D[macro]
17609     next
17610   } else {
17611     # Replace #undef with comments.  This is necessary, for example,
17612     # in the case of _POSIX_SOURCE, which is predefined and required
17613     # on some systems where configure will not decide to define it.
17614     if (defundef == "undef") {
17615       print "/*", prefix defundef, macro, "*/"
17616       next
17617     }
17618   }
17619 }
17620 { print }
17621 _ACAWK
17622 _ACEOF
17623 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17624   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
17625 fi # test -n "$CONFIG_HEADERS"
17626
17627
17628 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
17629 shift
17630 for ac_tag
17631 do
17632   case $ac_tag in
17633   :[FHLC]) ac_mode=$ac_tag; continue;;
17634   esac
17635   case $ac_mode$ac_tag in
17636   :[FHL]*:*);;
17637   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
17638   :[FH]-) ac_tag=-:-;;
17639   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17640   esac
17641   ac_save_IFS=$IFS
17642   IFS=:
17643   set x $ac_tag
17644   IFS=$ac_save_IFS
17645   shift
17646   ac_file=$1
17647   shift
17648
17649   case $ac_mode in
17650   :L) ac_source=$1;;
17651   :[FH])
17652     ac_file_inputs=
17653     for ac_f
17654     do
17655       case $ac_f in
17656       -) ac_f="$ac_tmp/stdin";;
17657       *) # Look for the file first in the build tree, then in the source tree
17658          # (if the path is not absolute).  The absolute path cannot be DOS-style,
17659          # because $ac_f cannot contain `:'.
17660          test -f "$ac_f" ||
17661            case $ac_f in
17662            [\\/$]*) false;;
17663            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17664            esac ||
17665            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
17666       esac
17667       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17668       as_fn_append ac_file_inputs " '$ac_f'"
17669     done
17670
17671     # Let's still pretend it is `configure' which instantiates (i.e., don't
17672     # use $as_me), people would be surprised to read:
17673     #    /* config.h.  Generated by config.status.  */
17674     configure_input='Generated from '`
17675           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17676         `' by configure.'
17677     if test x"$ac_file" != x-; then
17678       configure_input="$ac_file.  $configure_input"
17679       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17680 $as_echo "$as_me: creating $ac_file" >&6;}
17681     fi
17682     # Neutralize special characters interpreted by sed in replacement strings.
17683     case $configure_input in #(
17684     *\&* | *\|* | *\\* )
17685        ac_sed_conf_input=`$as_echo "$configure_input" |
17686        sed 's/[\\\\&|]/\\\\&/g'`;; #(
17687     *) ac_sed_conf_input=$configure_input;;
17688     esac
17689
17690     case $ac_tag in
17691     *:-:* | *:-) cat >"$ac_tmp/stdin" \
17692       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
17693     esac
17694     ;;
17695   esac
17696
17697   ac_dir=`$as_dirname -- "$ac_file" ||
17698 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17699          X"$ac_file" : 'X\(//\)[^/]' \| \
17700          X"$ac_file" : 'X\(//\)$' \| \
17701          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
17702 $as_echo X"$ac_file" |
17703     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17704             s//\1/
17705             q
17706           }
17707           /^X\(\/\/\)[^/].*/{
17708             s//\1/
17709             q
17710           }
17711           /^X\(\/\/\)$/{
17712             s//\1/
17713             q
17714           }
17715           /^X\(\/\).*/{
17716             s//\1/
17717             q
17718           }
17719           s/.*/./; q'`
17720   as_dir="$ac_dir"; as_fn_mkdir_p
17721   ac_builddir=.
17722
17723 case "$ac_dir" in
17724 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17725 *)
17726   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
17727   # A ".." for each directory in $ac_dir_suffix.
17728   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
17729   case $ac_top_builddir_sub in
17730   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17731   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17732   esac ;;
17733 esac
17734 ac_abs_top_builddir=$ac_pwd
17735 ac_abs_builddir=$ac_pwd$ac_dir_suffix
17736 # for backward compatibility:
17737 ac_top_builddir=$ac_top_build_prefix
17738
17739 case $srcdir in
17740   .)  # We are building in place.
17741     ac_srcdir=.
17742     ac_top_srcdir=$ac_top_builddir_sub
17743     ac_abs_top_srcdir=$ac_pwd ;;
17744   [\\/]* | ?:[\\/]* )  # Absolute name.
17745     ac_srcdir=$srcdir$ac_dir_suffix;
17746     ac_top_srcdir=$srcdir
17747     ac_abs_top_srcdir=$srcdir ;;
17748   *) # Relative name.
17749     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17750     ac_top_srcdir=$ac_top_build_prefix$srcdir
17751     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
17752 esac
17753 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
17754
17755
17756   case $ac_mode in
17757   :F)
17758   #
17759   # CONFIG_FILE
17760   #
17761
17762   case $INSTALL in
17763   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
17764   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
17765   esac
17766   ac_MKDIR_P=$MKDIR_P
17767   case $MKDIR_P in
17768   [\\/$]* | ?:[\\/]* ) ;;
17769   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17770   esac
17771 _ACEOF
17772
17773 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17774 # If the template does not know about datarootdir, expand it.
17775 # FIXME: This hack should be removed a few years after 2.60.
17776 ac_datarootdir_hack=; ac_datarootdir_seen=
17777 ac_sed_dataroot='
17778 /datarootdir/ {
17779   p
17780   q
17781 }
17782 /@datadir@/p
17783 /@docdir@/p
17784 /@infodir@/p
17785 /@localedir@/p
17786 /@mandir@/p'
17787 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
17788 *datarootdir*) ac_datarootdir_seen=yes;;
17789 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
17790   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17791 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
17792 _ACEOF
17793 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17794   ac_datarootdir_hack='
17795   s&@datadir@&$datadir&g
17796   s&@docdir@&$docdir&g
17797   s&@infodir@&$infodir&g
17798   s&@localedir@&$localedir&g
17799   s&@mandir@&$mandir&g
17800   s&\\\${datarootdir}&$datarootdir&g' ;;
17801 esac
17802 _ACEOF
17803
17804 # Neutralize VPATH when `$srcdir' = `.'.
17805 # Shell code in configure.ac might set extrasub.
17806 # FIXME: do we really want to maintain this feature?
17807 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17808 ac_sed_extra="$ac_vpsub
17809 $extrasub
17810 _ACEOF
17811 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17812 :t
17813 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17814 s|@configure_input@|$ac_sed_conf_input|;t t
17815 s&@top_builddir@&$ac_top_builddir_sub&;t t
17816 s&@top_build_prefix@&$ac_top_build_prefix&;t t
17817 s&@srcdir@&$ac_srcdir&;t t
17818 s&@abs_srcdir@&$ac_abs_srcdir&;t t
17819 s&@top_srcdir@&$ac_top_srcdir&;t t
17820 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17821 s&@builddir@&$ac_builddir&;t t
17822 s&@abs_builddir@&$ac_abs_builddir&;t t
17823 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17824 s&@INSTALL@&$ac_INSTALL&;t t
17825 s&@MKDIR_P@&$ac_MKDIR_P&;t t
17826 $ac_datarootdir_hack
17827 "
17828 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17829   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17830
17831 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
17832   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17833   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
17834       "$ac_tmp/out"`; test -z "$ac_out"; } &&
17835   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17836 which seems to be undefined.  Please make sure it is defined" >&5
17837 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17838 which seems to be undefined.  Please make sure it is defined" >&2;}
17839
17840   rm -f "$ac_tmp/stdin"
17841   case $ac_file in
17842   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17843   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
17844   esac \
17845   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17846  ;;
17847   :H)
17848   #
17849   # CONFIG_HEADER
17850   #
17851   if test x"$ac_file" != x-; then
17852     {
17853       $as_echo "/* $configure_input  */" \
17854       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17855     } >"$ac_tmp/config.h" \
17856       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17857     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
17858       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17859 $as_echo "$as_me: $ac_file is unchanged" >&6;}
17860     else
17861       rm -f "$ac_file"
17862       mv "$ac_tmp/config.h" "$ac_file" \
17863         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17864     fi
17865   else
17866     $as_echo "/* $configure_input  */" \
17867       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
17868       || as_fn_error $? "could not create -" "$LINENO" 5
17869   fi
17870  ;;
17871   :L)
17872   #
17873   # CONFIG_LINK
17874   #
17875
17876   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
17877     :
17878   else
17879     # Prefer the file from the source tree if names are identical.
17880     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
17881       ac_source=$srcdir/$ac_source
17882     fi
17883
17884     { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
17885 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
17886
17887     if test ! -r "$ac_source"; then
17888       as_fn_error $? "$ac_source: file not found" "$LINENO" 5
17889     fi
17890     rm -f "$ac_file"
17891
17892     # Try a relative symlink, then a hard link, then a copy.
17893     case $ac_source in
17894     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
17895         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
17896     esac
17897     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
17898       ln "$ac_source" "$ac_file" 2>/dev/null ||
17899       cp -p "$ac_source" "$ac_file" ||
17900       as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
17901   fi
17902  ;;
17903   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
17904 $as_echo "$as_me: executing $ac_file commands" >&6;}
17905  ;;
17906   esac
17907
17908
17909   case $ac_file$ac_mode in
17910     "check_win32_symlinks":C)
17911 # Links sometimes fail undetected on Mingw -
17912 # so here we detect it and warn the user
17913 for FILE in $CONFIG_LINKS
17914  do
17915         # test -e works for symlinks in the MinGW console
17916         test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
17917 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
17918  done
17919  ;;
17920     "src/include/pg_config.h":H)
17921 # Update timestamp for pg_config.h (see Makefile.global)
17922 echo >src/include/stamp-h
17923  ;;
17924     "src/include/pg_config_ext.h":H)
17925 # Update timestamp for pg_config_ext.h (see Makefile.global)
17926 echo >src/include/stamp-ext-h
17927  ;;
17928     "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
17929
17930   esac
17931 done # for ac_tag
17932
17933
17934 as_fn_exit 0
17935 _ACEOF
17936 ac_clean_files=$ac_clean_files_save
17937
17938 test $ac_write_fail = 0 ||
17939   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
17940
17941
17942 # configure is writing to config.log, and then calls config.status.
17943 # config.status does its own redirection, appending to config.log.
17944 # Unfortunately, on DOS this fails, as config.log is still kept open
17945 # by configure, so config.status won't be able to write to it; its
17946 # output is simply discarded.  So we exec the FD to /dev/null,
17947 # effectively closing config.log, so it can be properly (re)opened and
17948 # appended to by config.status.  When coming back to configure, we
17949 # need to make the FD available again.
17950 if test "$no_create" != yes; then
17951   ac_cs_success=:
17952   ac_config_status_args=
17953   test "$silent" = yes &&
17954     ac_config_status_args="$ac_config_status_args --quiet"
17955   exec 5>/dev/null
17956   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
17957   exec 5>>config.log
17958   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17959   # would make configure fail if this is the last instruction.
17960   $ac_cs_success || as_fn_exit 1
17961 fi
17962 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17963   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17964 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
17965 fi
17966