]> granicus.if.org Git - postgresql/blob - configure
Revert "Use pselect(2) not select(2), if available, to wait in postmaster's loop."
[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 FOP
633 OSX
634 XSLTPROC
635 XMLLINT
636 DBTOEPUB
637 have_docbook
638 NSGMLS
639 TCL_SHLIB_LD_LIBS
640 TCL_SHARED_BUILD
641 TCL_LIB_SPEC
642 TCL_LIBS
643 TCL_INCLUDE_SPEC
644 TCL_CONFIG_SH
645 TCLSH
646 XGETTEXT
647 MSGMERGE
648 MSGFMT_FLAGS
649 MSGFMT
650 PG_CRC32C_OBJS
651 CFLAGS_SSE42
652 have_win32_dbghelp
653 HAVE_IPV6
654 LIBOBJS
655 UUID_LIBS
656 LDAP_LIBS_BE
657 LDAP_LIBS_FE
658 PTHREAD_CFLAGS
659 PTHREAD_LIBS
660 PTHREAD_CC
661 ax_pthread_config
662 ZIC
663 python_additional_libs
664 python_libspec
665 python_libdir
666 python_includespec
667 python_version
668 python_majorversion
669 PYTHON
670 perl_embed_ldflags
671 perl_useshrplib
672 perl_privlibexp
673 perl_archlibexp
674 PERL
675 FLEXFLAGS
676 FLEX
677 BISONFLAGS
678 BISON
679 MKDIR_P
680 AWK
681 LN_S
682 TAR
683 install_bin
684 INSTALL_DATA
685 INSTALL_SCRIPT
686 INSTALL_PROGRAM
687 WINDRES
688 DLLWRAP
689 DLLTOOL
690 AR
691 STRIP_SHARED_LIB
692 STRIP_STATIC_LIB
693 STRIP
694 RANLIB
695 with_gnu_ld
696 LD
697 LDFLAGS_SL
698 LDFLAGS_EX
699 ELF_SYS
700 EGREP
701 GREP
702 with_zlib
703 with_system_tzdata
704 with_libxslt
705 with_libxml
706 XML2_CONFIG
707 UUID_EXTRA_OBJS
708 with_uuid
709 with_systemd
710 with_selinux
711 with_openssl
712 krb_srvtab
713 with_python
714 with_perl
715 with_tcl
716 ICU_LIBS
717 ICU_CFLAGS
718 PKG_CONFIG_LIBDIR
719 PKG_CONFIG_PATH
720 PKG_CONFIG
721 with_icu
722 enable_thread_safety
723 INCLUDES
724 autodepend
725 TAS
726 GCC
727 CPP
728 CFLAGS_VECTOR
729 SUN_STUDIO_CC
730 OBJEXT
731 EXEEXT
732 ac_ct_CC
733 CPPFLAGS
734 LDFLAGS
735 CFLAGS
736 CC
737 enable_tap_tests
738 enable_dtrace
739 DTRACEFLAGS
740 DTRACE
741 enable_coverage
742 GENHTML
743 LCOV
744 GCOV
745 enable_debug
746 enable_strong_random
747 enable_rpath
748 default_port
749 WANTED_LANGUAGES
750 enable_nls
751 PORTNAME
752 host_os
753 host_vendor
754 host_cpu
755 host
756 build_os
757 build_vendor
758 build_cpu
759 build
760 PG_MAJORVERSION
761 configure_args
762 target_alias
763 host_alias
764 build_alias
765 LIBS
766 ECHO_T
767 ECHO_N
768 ECHO_C
769 DEFS
770 mandir
771 localedir
772 libdir
773 psdir
774 pdfdir
775 dvidir
776 htmldir
777 infodir
778 docdir
779 oldincludedir
780 includedir
781 localstatedir
782 sharedstatedir
783 sysconfdir
784 datadir
785 datarootdir
786 libexecdir
787 sbindir
788 bindir
789 program_transform_name
790 prefix
791 exec_prefix
792 PACKAGE_URL
793 PACKAGE_BUGREPORT
794 PACKAGE_STRING
795 PACKAGE_VERSION
796 PACKAGE_TARNAME
797 PACKAGE_NAME
798 PATH_SEPARATOR
799 SHELL'
800 ac_subst_files=''
801 ac_user_opts='
802 enable_option_checking
803 with_extra_version
804 with_template
805 with_includes
806 with_libraries
807 with_libs
808 enable_integer_datetimes
809 enable_nls
810 with_pgport
811 enable_rpath
812 enable_spinlocks
813 enable_atomics
814 enable_strong_random
815 enable_debug
816 enable_profiling
817 enable_coverage
818 enable_dtrace
819 enable_tap_tests
820 with_blocksize
821 with_segsize
822 with_wal_blocksize
823 with_wal_segsize
824 with_CC
825 enable_depend
826 enable_cassert
827 enable_thread_safety
828 with_icu
829 with_tcl
830 with_tclconfig
831 with_perl
832 with_python
833 with_gssapi
834 with_krb_srvnam
835 with_pam
836 with_bsd_auth
837 with_ldap
838 with_bonjour
839 with_openssl
840 with_selinux
841 with_systemd
842 with_readline
843 with_libedit_preferred
844 with_uuid
845 with_ossp_uuid
846 with_libxml
847 with_libxslt
848 with_system_tzdata
849 with_zlib
850 with_gnu_ld
851 enable_largefile
852 enable_float4_byval
853 enable_float8_byval
854 '
855       ac_precious_vars='build_alias
856 host_alias
857 target_alias
858 CC
859 CFLAGS
860 LDFLAGS
861 LIBS
862 CPPFLAGS
863 CPP
864 PKG_CONFIG
865 PKG_CONFIG_PATH
866 PKG_CONFIG_LIBDIR
867 ICU_CFLAGS
868 ICU_LIBS
869 LDFLAGS_EX
870 LDFLAGS_SL'
871
872
873 # Initialize some variables set by options.
874 ac_init_help=
875 ac_init_version=false
876 ac_unrecognized_opts=
877 ac_unrecognized_sep=
878 # The variables have the same names as the options, with
879 # dashes changed to underlines.
880 cache_file=/dev/null
881 exec_prefix=NONE
882 no_create=
883 no_recursion=
884 prefix=NONE
885 program_prefix=NONE
886 program_suffix=NONE
887 program_transform_name=s,x,x,
888 silent=
889 site=
890 srcdir=
891 verbose=
892 x_includes=NONE
893 x_libraries=NONE
894
895 # Installation directory options.
896 # These are left unexpanded so users can "make install exec_prefix=/foo"
897 # and all the variables that are supposed to be based on exec_prefix
898 # by default will actually change.
899 # Use braces instead of parens because sh, perl, etc. also accept them.
900 # (The list follows the same order as the GNU Coding Standards.)
901 bindir='${exec_prefix}/bin'
902 sbindir='${exec_prefix}/sbin'
903 libexecdir='${exec_prefix}/libexec'
904 datarootdir='${prefix}/share'
905 datadir='${datarootdir}'
906 sysconfdir='${prefix}/etc'
907 sharedstatedir='${prefix}/com'
908 localstatedir='${prefix}/var'
909 includedir='${prefix}/include'
910 oldincludedir='/usr/include'
911 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
912 infodir='${datarootdir}/info'
913 htmldir='${docdir}'
914 dvidir='${docdir}'
915 pdfdir='${docdir}'
916 psdir='${docdir}'
917 libdir='${exec_prefix}/lib'
918 localedir='${datarootdir}/locale'
919 mandir='${datarootdir}/man'
920
921 ac_prev=
922 ac_dashdash=
923 for ac_option
924 do
925   # If the previous option needs an argument, assign it.
926   if test -n "$ac_prev"; then
927     eval $ac_prev=\$ac_option
928     ac_prev=
929     continue
930   fi
931
932   case $ac_option in
933   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
934   *=)   ac_optarg= ;;
935   *)    ac_optarg=yes ;;
936   esac
937
938   # Accept the important Cygnus configure options, so we can diagnose typos.
939
940   case $ac_dashdash$ac_option in
941   --)
942     ac_dashdash=yes ;;
943
944   -bindir | --bindir | --bindi | --bind | --bin | --bi)
945     ac_prev=bindir ;;
946   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
947     bindir=$ac_optarg ;;
948
949   -build | --build | --buil | --bui | --bu)
950     ac_prev=build_alias ;;
951   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
952     build_alias=$ac_optarg ;;
953
954   -cache-file | --cache-file | --cache-fil | --cache-fi \
955   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
956     ac_prev=cache_file ;;
957   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
958   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
959     cache_file=$ac_optarg ;;
960
961   --config-cache | -C)
962     cache_file=config.cache ;;
963
964   -datadir | --datadir | --datadi | --datad)
965     ac_prev=datadir ;;
966   -datadir=* | --datadir=* | --datadi=* | --datad=*)
967     datadir=$ac_optarg ;;
968
969   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
970   | --dataroo | --dataro | --datar)
971     ac_prev=datarootdir ;;
972   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
973   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
974     datarootdir=$ac_optarg ;;
975
976   -disable-* | --disable-*)
977     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
978     # Reject names that are not valid shell variable names.
979     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
980       as_fn_error $? "invalid feature name: $ac_useropt"
981     ac_useropt_orig=$ac_useropt
982     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
983     case $ac_user_opts in
984       *"
985 "enable_$ac_useropt"
986 "*) ;;
987       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
988          ac_unrecognized_sep=', ';;
989     esac
990     eval enable_$ac_useropt=no ;;
991
992   -docdir | --docdir | --docdi | --doc | --do)
993     ac_prev=docdir ;;
994   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
995     docdir=$ac_optarg ;;
996
997   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
998     ac_prev=dvidir ;;
999   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1000     dvidir=$ac_optarg ;;
1001
1002   -enable-* | --enable-*)
1003     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1004     # Reject names that are not valid shell variable names.
1005     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1006       as_fn_error $? "invalid feature name: $ac_useropt"
1007     ac_useropt_orig=$ac_useropt
1008     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1009     case $ac_user_opts in
1010       *"
1011 "enable_$ac_useropt"
1012 "*) ;;
1013       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1014          ac_unrecognized_sep=', ';;
1015     esac
1016     eval enable_$ac_useropt=\$ac_optarg ;;
1017
1018   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1019   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1020   | --exec | --exe | --ex)
1021     ac_prev=exec_prefix ;;
1022   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1023   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1024   | --exec=* | --exe=* | --ex=*)
1025     exec_prefix=$ac_optarg ;;
1026
1027   -gas | --gas | --ga | --g)
1028     # Obsolete; use --with-gas.
1029     with_gas=yes ;;
1030
1031   -help | --help | --hel | --he | -h)
1032     ac_init_help=long ;;
1033   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1034     ac_init_help=recursive ;;
1035   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1036     ac_init_help=short ;;
1037
1038   -host | --host | --hos | --ho)
1039     ac_prev=host_alias ;;
1040   -host=* | --host=* | --hos=* | --ho=*)
1041     host_alias=$ac_optarg ;;
1042
1043   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1044     ac_prev=htmldir ;;
1045   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1046   | --ht=*)
1047     htmldir=$ac_optarg ;;
1048
1049   -includedir | --includedir | --includedi | --included | --include \
1050   | --includ | --inclu | --incl | --inc)
1051     ac_prev=includedir ;;
1052   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1053   | --includ=* | --inclu=* | --incl=* | --inc=*)
1054     includedir=$ac_optarg ;;
1055
1056   -infodir | --infodir | --infodi | --infod | --info | --inf)
1057     ac_prev=infodir ;;
1058   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1059     infodir=$ac_optarg ;;
1060
1061   -libdir | --libdir | --libdi | --libd)
1062     ac_prev=libdir ;;
1063   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1064     libdir=$ac_optarg ;;
1065
1066   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1067   | --libexe | --libex | --libe)
1068     ac_prev=libexecdir ;;
1069   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1070   | --libexe=* | --libex=* | --libe=*)
1071     libexecdir=$ac_optarg ;;
1072
1073   -localedir | --localedir | --localedi | --localed | --locale)
1074     ac_prev=localedir ;;
1075   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1076     localedir=$ac_optarg ;;
1077
1078   -localstatedir | --localstatedir | --localstatedi | --localstated \
1079   | --localstate | --localstat | --localsta | --localst | --locals)
1080     ac_prev=localstatedir ;;
1081   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1082   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1083     localstatedir=$ac_optarg ;;
1084
1085   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1086     ac_prev=mandir ;;
1087   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1088     mandir=$ac_optarg ;;
1089
1090   -nfp | --nfp | --nf)
1091     # Obsolete; use --without-fp.
1092     with_fp=no ;;
1093
1094   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1095   | --no-cr | --no-c | -n)
1096     no_create=yes ;;
1097
1098   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1099   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1100     no_recursion=yes ;;
1101
1102   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1103   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1104   | --oldin | --oldi | --old | --ol | --o)
1105     ac_prev=oldincludedir ;;
1106   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1107   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1108   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1109     oldincludedir=$ac_optarg ;;
1110
1111   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1112     ac_prev=prefix ;;
1113   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1114     prefix=$ac_optarg ;;
1115
1116   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1117   | --program-pre | --program-pr | --program-p)
1118     ac_prev=program_prefix ;;
1119   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1120   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1121     program_prefix=$ac_optarg ;;
1122
1123   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1124   | --program-suf | --program-su | --program-s)
1125     ac_prev=program_suffix ;;
1126   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1127   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1128     program_suffix=$ac_optarg ;;
1129
1130   -program-transform-name | --program-transform-name \
1131   | --program-transform-nam | --program-transform-na \
1132   | --program-transform-n | --program-transform- \
1133   | --program-transform | --program-transfor \
1134   | --program-transfo | --program-transf \
1135   | --program-trans | --program-tran \
1136   | --progr-tra | --program-tr | --program-t)
1137     ac_prev=program_transform_name ;;
1138   -program-transform-name=* | --program-transform-name=* \
1139   | --program-transform-nam=* | --program-transform-na=* \
1140   | --program-transform-n=* | --program-transform-=* \
1141   | --program-transform=* | --program-transfor=* \
1142   | --program-transfo=* | --program-transf=* \
1143   | --program-trans=* | --program-tran=* \
1144   | --progr-tra=* | --program-tr=* | --program-t=*)
1145     program_transform_name=$ac_optarg ;;
1146
1147   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1148     ac_prev=pdfdir ;;
1149   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1150     pdfdir=$ac_optarg ;;
1151
1152   -psdir | --psdir | --psdi | --psd | --ps)
1153     ac_prev=psdir ;;
1154   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1155     psdir=$ac_optarg ;;
1156
1157   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1158   | -silent | --silent | --silen | --sile | --sil)
1159     silent=yes ;;
1160
1161   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1162     ac_prev=sbindir ;;
1163   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1164   | --sbi=* | --sb=*)
1165     sbindir=$ac_optarg ;;
1166
1167   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1168   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1169   | --sharedst | --shareds | --shared | --share | --shar \
1170   | --sha | --sh)
1171     ac_prev=sharedstatedir ;;
1172   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1173   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1174   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1175   | --sha=* | --sh=*)
1176     sharedstatedir=$ac_optarg ;;
1177
1178   -site | --site | --sit)
1179     ac_prev=site ;;
1180   -site=* | --site=* | --sit=*)
1181     site=$ac_optarg ;;
1182
1183   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1184     ac_prev=srcdir ;;
1185   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1186     srcdir=$ac_optarg ;;
1187
1188   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1189   | --syscon | --sysco | --sysc | --sys | --sy)
1190     ac_prev=sysconfdir ;;
1191   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1192   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1193     sysconfdir=$ac_optarg ;;
1194
1195   -target | --target | --targe | --targ | --tar | --ta | --t)
1196     ac_prev=target_alias ;;
1197   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1198     target_alias=$ac_optarg ;;
1199
1200   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1201     verbose=yes ;;
1202
1203   -version | --version | --versio | --versi | --vers | -V)
1204     ac_init_version=: ;;
1205
1206   -with-* | --with-*)
1207     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1208     # Reject names that are not valid shell variable names.
1209     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1210       as_fn_error $? "invalid package name: $ac_useropt"
1211     ac_useropt_orig=$ac_useropt
1212     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1213     case $ac_user_opts in
1214       *"
1215 "with_$ac_useropt"
1216 "*) ;;
1217       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1218          ac_unrecognized_sep=', ';;
1219     esac
1220     eval with_$ac_useropt=\$ac_optarg ;;
1221
1222   -without-* | --without-*)
1223     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1224     # Reject names that are not valid shell variable names.
1225     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1226       as_fn_error $? "invalid package name: $ac_useropt"
1227     ac_useropt_orig=$ac_useropt
1228     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1229     case $ac_user_opts in
1230       *"
1231 "with_$ac_useropt"
1232 "*) ;;
1233       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1234          ac_unrecognized_sep=', ';;
1235     esac
1236     eval with_$ac_useropt=no ;;
1237
1238   --x)
1239     # Obsolete; use --with-x.
1240     with_x=yes ;;
1241
1242   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1243   | --x-incl | --x-inc | --x-in | --x-i)
1244     ac_prev=x_includes ;;
1245   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1246   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1247     x_includes=$ac_optarg ;;
1248
1249   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1250   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1251     ac_prev=x_libraries ;;
1252   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1253   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1254     x_libraries=$ac_optarg ;;
1255
1256   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1257 Try \`$0 --help' for more information"
1258     ;;
1259
1260   *=*)
1261     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1262     # Reject names that are not valid shell variable names.
1263     case $ac_envvar in #(
1264       '' | [0-9]* | *[!_$as_cr_alnum]* )
1265       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1266     esac
1267     eval $ac_envvar=\$ac_optarg
1268     export $ac_envvar ;;
1269
1270   *)
1271     # FIXME: should be removed in autoconf 3.0.
1272     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1273     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1274       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1275     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1276     ;;
1277
1278   esac
1279 done
1280
1281 if test -n "$ac_prev"; then
1282   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1283   as_fn_error $? "missing argument to $ac_option"
1284 fi
1285
1286 if test -n "$ac_unrecognized_opts"; then
1287   case $enable_option_checking in
1288     no) ;;
1289     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1290     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1291   esac
1292 fi
1293
1294 # Check all directory arguments for consistency.
1295 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1296                 datadir sysconfdir sharedstatedir localstatedir includedir \
1297                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1298                 libdir localedir mandir
1299 do
1300   eval ac_val=\$$ac_var
1301   # Remove trailing slashes.
1302   case $ac_val in
1303     */ )
1304       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1305       eval $ac_var=\$ac_val;;
1306   esac
1307   # Be sure to have absolute directory names.
1308   case $ac_val in
1309     [\\/$]* | ?:[\\/]* )  continue;;
1310     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1311   esac
1312   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1313 done
1314
1315 # There might be people who depend on the old broken behavior: `$host'
1316 # used to hold the argument of --host etc.
1317 # FIXME: To remove some day.
1318 build=$build_alias
1319 host=$host_alias
1320 target=$target_alias
1321
1322 # FIXME: To remove some day.
1323 if test "x$host_alias" != x; then
1324   if test "x$build_alias" = x; then
1325     cross_compiling=maybe
1326   elif test "x$build_alias" != "x$host_alias"; then
1327     cross_compiling=yes
1328   fi
1329 fi
1330
1331 ac_tool_prefix=
1332 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1333
1334 test "$silent" = yes && exec 6>/dev/null
1335
1336
1337 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1338 ac_ls_di=`ls -di .` &&
1339 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1340   as_fn_error $? "working directory cannot be determined"
1341 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1342   as_fn_error $? "pwd does not report name of working directory"
1343
1344
1345 # Find the source files, if location was not specified.
1346 if test -z "$srcdir"; then
1347   ac_srcdir_defaulted=yes
1348   # Try the directory containing this script, then the parent directory.
1349   ac_confdir=`$as_dirname -- "$as_myself" ||
1350 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1351          X"$as_myself" : 'X\(//\)[^/]' \| \
1352          X"$as_myself" : 'X\(//\)$' \| \
1353          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1354 $as_echo X"$as_myself" |
1355     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1356             s//\1/
1357             q
1358           }
1359           /^X\(\/\/\)[^/].*/{
1360             s//\1/
1361             q
1362           }
1363           /^X\(\/\/\)$/{
1364             s//\1/
1365             q
1366           }
1367           /^X\(\/\).*/{
1368             s//\1/
1369             q
1370           }
1371           s/.*/./; q'`
1372   srcdir=$ac_confdir
1373   if test ! -r "$srcdir/$ac_unique_file"; then
1374     srcdir=..
1375   fi
1376 else
1377   ac_srcdir_defaulted=no
1378 fi
1379 if test ! -r "$srcdir/$ac_unique_file"; then
1380   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1381   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1382 fi
1383 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1384 ac_abs_confdir=`(
1385         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1386         pwd)`
1387 # When building in place, set srcdir=.
1388 if test "$ac_abs_confdir" = "$ac_pwd"; then
1389   srcdir=.
1390 fi
1391 # Remove unnecessary trailing slashes from srcdir.
1392 # Double slashes in file names in object file debugging info
1393 # mess up M-x gdb in Emacs.
1394 case $srcdir in
1395 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1396 esac
1397 for ac_var in $ac_precious_vars; do
1398   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1399   eval ac_env_${ac_var}_value=\$${ac_var}
1400   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1401   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1402 done
1403
1404 #
1405 # Report the --help message.
1406 #
1407 if test "$ac_init_help" = "long"; then
1408   # Omit some internal or obsolete options to make the list less imposing.
1409   # This message is too long to be a string in the A/UX 3.1 sh.
1410   cat <<_ACEOF
1411 \`configure' configures PostgreSQL 10devel to adapt to many kinds of systems.
1412
1413 Usage: $0 [OPTION]... [VAR=VALUE]...
1414
1415 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1416 VAR=VALUE.  See below for descriptions of some of the useful variables.
1417
1418 Defaults for the options are specified in brackets.
1419
1420 Configuration:
1421   -h, --help              display this help and exit
1422       --help=short        display options specific to this package
1423       --help=recursive    display the short help of all the included packages
1424   -V, --version           display version information and exit
1425   -q, --quiet, --silent   do not print \`checking ...' messages
1426       --cache-file=FILE   cache test results in FILE [disabled]
1427   -C, --config-cache      alias for \`--cache-file=config.cache'
1428   -n, --no-create         do not create output files
1429       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1430
1431 Installation directories:
1432   --prefix=PREFIX         install architecture-independent files in PREFIX
1433                           [$ac_default_prefix]
1434   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1435                           [PREFIX]
1436
1437 By default, \`make install' will install all the files in
1438 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1439 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1440 for instance \`--prefix=\$HOME'.
1441
1442 For better control, use the options below.
1443
1444 Fine tuning of the installation directories:
1445   --bindir=DIR            user executables [EPREFIX/bin]
1446   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1447   --libexecdir=DIR        program executables [EPREFIX/libexec]
1448   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1449   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1450   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1451   --libdir=DIR            object code libraries [EPREFIX/lib]
1452   --includedir=DIR        C header files [PREFIX/include]
1453   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1454   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1455   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1456   --infodir=DIR           info documentation [DATAROOTDIR/info]
1457   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1458   --mandir=DIR            man documentation [DATAROOTDIR/man]
1459   --docdir=DIR            documentation root [DATAROOTDIR/doc/postgresql]
1460   --htmldir=DIR           html documentation [DOCDIR]
1461   --dvidir=DIR            dvi documentation [DOCDIR]
1462   --pdfdir=DIR            pdf documentation [DOCDIR]
1463   --psdir=DIR             ps documentation [DOCDIR]
1464 _ACEOF
1465
1466   cat <<\_ACEOF
1467
1468 System types:
1469   --build=BUILD     configure for building on BUILD [guessed]
1470   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1471 _ACEOF
1472 fi
1473
1474 if test -n "$ac_init_help"; then
1475   case $ac_init_help in
1476      short | recursive ) echo "Configuration of PostgreSQL 10devel:";;
1477    esac
1478   cat <<\_ACEOF
1479
1480 Optional Features:
1481   --disable-option-checking  ignore unrecognized --enable/--with options
1482   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1483   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1484   --disable-integer-datetimes
1485                           obsolete option, no longer supported
1486   --enable-nls[=LANGUAGES]
1487                           enable Native Language Support
1488   --disable-rpath         do not embed shared library search path in
1489                           executables
1490   --disable-spinlocks     do not use spinlocks
1491   --disable-atomics       do not use atomic operations
1492   --disable-strong-random do not use a strong random number source
1493   --enable-debug          build with debugging symbols (-g)
1494   --enable-profiling      build with profiling enabled
1495   --enable-coverage       build with coverage testing instrumentation
1496   --enable-dtrace         build with DTrace support
1497   --enable-tap-tests      enable TAP tests (requires Perl and IPC::Run)
1498   --enable-depend         turn on automatic dependency tracking
1499   --enable-cassert        enable assertion checks (for debugging)
1500   --disable-thread-safety disable thread-safety in client libraries
1501   --disable-largefile     omit support for large files
1502   --disable-float4-byval  disable float4 passed by value
1503   --disable-float8-byval  disable float8 passed by value
1504
1505 Optional Packages:
1506   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1507   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1508   --with-extra-version=STRING
1509                           append STRING to version
1510   --with-template=NAME    override operating system template
1511   --with-includes=DIRS    look for additional header files in DIRS
1512   --with-libraries=DIRS   look for additional libraries in DIRS
1513   --with-libs=DIRS        alternative spelling of --with-libraries
1514   --with-pgport=PORTNUM   set default port number [5432]
1515   --with-blocksize=BLOCKSIZE
1516                           set table block size in kB [8]
1517   --with-segsize=SEGSIZE  set table segment size in GB [1]
1518   --with-wal-blocksize=BLOCKSIZE
1519                           set WAL block size in kB [8]
1520   --with-wal-segsize=SEGSIZE
1521                           set WAL segment size in MB [16]
1522   --with-CC=CMD           set compiler (deprecated)
1523   --with-icu              build with ICU support
1524   --with-tcl              build Tcl modules (PL/Tcl)
1525   --with-tclconfig=DIR    tclConfig.sh is in DIR
1526   --with-perl             build Perl modules (PL/Perl)
1527   --with-python           build Python modules (PL/Python)
1528   --with-gssapi           build with GSSAPI support
1529   --with-krb-srvnam=NAME  default service principal name in Kerberos (GSSAPI)
1530                           [postgres]
1531   --with-pam              build with PAM support
1532   --with-bsd-auth         build with BSD Authentication support
1533   --with-ldap             build with LDAP support
1534   --with-bonjour          build with Bonjour support
1535   --with-openssl          build with OpenSSL support
1536   --with-selinux          build with SELinux support
1537   --with-systemd          build with systemd support
1538   --without-readline      do not use GNU Readline nor BSD Libedit for editing
1539   --with-libedit-preferred
1540                           prefer BSD Libedit over GNU Readline
1541   --with-uuid=LIB         build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1542   --with-ossp-uuid        obsolete spelling of --with-uuid=ossp
1543   --with-libxml           build with XML support
1544   --with-libxslt          use XSLT support when building contrib/xml2
1545   --with-system-tzdata=DIR
1546                           use system time zone data in DIR
1547   --without-zlib          do not use Zlib
1548   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1549
1550 Some influential environment variables:
1551   CC          C compiler command
1552   CFLAGS      C compiler flags
1553   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1554               nonstandard directory <lib dir>
1555   LIBS        libraries to pass to the linker, e.g. -l<library>
1556   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1557               you have headers in a nonstandard directory <include dir>
1558   CPP         C preprocessor
1559   PKG_CONFIG  path to pkg-config utility
1560   PKG_CONFIG_PATH
1561               directories to add to pkg-config's search path
1562   PKG_CONFIG_LIBDIR
1563               path overriding pkg-config's built-in search path
1564   ICU_CFLAGS  C compiler flags for ICU, overriding pkg-config
1565   ICU_LIBS    linker flags for ICU, overriding pkg-config
1566   LDFLAGS_EX  extra linker flags for linking executables only
1567   LDFLAGS_SL  extra linker flags for linking shared libraries only
1568
1569 Use these variables to override the choices made by `configure' or to help
1570 it to find libraries and programs with nonstandard names/locations.
1571
1572 Report bugs to <pgsql-bugs@postgresql.org>.
1573 _ACEOF
1574 ac_status=$?
1575 fi
1576
1577 if test "$ac_init_help" = "recursive"; then
1578   # If there are subdirs, report their specific --help.
1579   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1580     test -d "$ac_dir" ||
1581       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1582       continue
1583     ac_builddir=.
1584
1585 case "$ac_dir" in
1586 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1587 *)
1588   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1589   # A ".." for each directory in $ac_dir_suffix.
1590   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1591   case $ac_top_builddir_sub in
1592   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1593   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1594   esac ;;
1595 esac
1596 ac_abs_top_builddir=$ac_pwd
1597 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1598 # for backward compatibility:
1599 ac_top_builddir=$ac_top_build_prefix
1600
1601 case $srcdir in
1602   .)  # We are building in place.
1603     ac_srcdir=.
1604     ac_top_srcdir=$ac_top_builddir_sub
1605     ac_abs_top_srcdir=$ac_pwd ;;
1606   [\\/]* | ?:[\\/]* )  # Absolute name.
1607     ac_srcdir=$srcdir$ac_dir_suffix;
1608     ac_top_srcdir=$srcdir
1609     ac_abs_top_srcdir=$srcdir ;;
1610   *) # Relative name.
1611     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1612     ac_top_srcdir=$ac_top_build_prefix$srcdir
1613     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1614 esac
1615 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1616
1617     cd "$ac_dir" || { ac_status=$?; continue; }
1618     # Check for guested configure.
1619     if test -f "$ac_srcdir/configure.gnu"; then
1620       echo &&
1621       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1622     elif test -f "$ac_srcdir/configure"; then
1623       echo &&
1624       $SHELL "$ac_srcdir/configure" --help=recursive
1625     else
1626       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1627     fi || ac_status=$?
1628     cd "$ac_pwd" || { ac_status=$?; break; }
1629   done
1630 fi
1631
1632 test -n "$ac_init_help" && exit $ac_status
1633 if $ac_init_version; then
1634   cat <<\_ACEOF
1635 PostgreSQL configure 10devel
1636 generated by GNU Autoconf 2.69
1637
1638 Copyright (C) 2012 Free Software Foundation, Inc.
1639 This configure script is free software; the Free Software Foundation
1640 gives unlimited permission to copy, distribute and modify it.
1641
1642 Copyright (c) 1996-2017, PostgreSQL Global Development Group
1643 _ACEOF
1644   exit
1645 fi
1646
1647 ## ------------------------ ##
1648 ## Autoconf initialization. ##
1649 ## ------------------------ ##
1650
1651 # ac_fn_c_try_compile LINENO
1652 # --------------------------
1653 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1654 ac_fn_c_try_compile ()
1655 {
1656   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1657   rm -f conftest.$ac_objext
1658   if { { ac_try="$ac_compile"
1659 case "(($ac_try" in
1660   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1661   *) ac_try_echo=$ac_try;;
1662 esac
1663 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1664 $as_echo "$ac_try_echo"; } >&5
1665   (eval "$ac_compile") 2>conftest.err
1666   ac_status=$?
1667   if test -s conftest.err; then
1668     grep -v '^ *+' conftest.err >conftest.er1
1669     cat conftest.er1 >&5
1670     mv -f conftest.er1 conftest.err
1671   fi
1672   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1673   test $ac_status = 0; } && {
1674          test -z "$ac_c_werror_flag" ||
1675          test ! -s conftest.err
1676        } && test -s conftest.$ac_objext; then :
1677   ac_retval=0
1678 else
1679   $as_echo "$as_me: failed program was:" >&5
1680 sed 's/^/| /' conftest.$ac_ext >&5
1681
1682         ac_retval=1
1683 fi
1684   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1685   as_fn_set_status $ac_retval
1686
1687 } # ac_fn_c_try_compile
1688
1689 # ac_fn_c_try_link LINENO
1690 # -----------------------
1691 # Try to link conftest.$ac_ext, and return whether this succeeded.
1692 ac_fn_c_try_link ()
1693 {
1694   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1695   rm -f conftest.$ac_objext conftest$ac_exeext
1696   if { { ac_try="$ac_link"
1697 case "(($ac_try" in
1698   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1699   *) ac_try_echo=$ac_try;;
1700 esac
1701 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1702 $as_echo "$ac_try_echo"; } >&5
1703   (eval "$ac_link") 2>conftest.err
1704   ac_status=$?
1705   if test -s conftest.err; then
1706     grep -v '^ *+' conftest.err >conftest.er1
1707     cat conftest.er1 >&5
1708     mv -f conftest.er1 conftest.err
1709   fi
1710   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1711   test $ac_status = 0; } && {
1712          test -z "$ac_c_werror_flag" ||
1713          test ! -s conftest.err
1714        } && test -s conftest$ac_exeext && {
1715          test "$cross_compiling" = yes ||
1716          test -x conftest$ac_exeext
1717        }; then :
1718   ac_retval=0
1719 else
1720   $as_echo "$as_me: failed program was:" >&5
1721 sed 's/^/| /' conftest.$ac_ext >&5
1722
1723         ac_retval=1
1724 fi
1725   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1726   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1727   # interfere with the next link command; also delete a directory that is
1728   # left behind by Apple's compiler.  We do this before executing the actions.
1729   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1730   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1731   as_fn_set_status $ac_retval
1732
1733 } # ac_fn_c_try_link
1734
1735 # ac_fn_c_try_cpp LINENO
1736 # ----------------------
1737 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1738 ac_fn_c_try_cpp ()
1739 {
1740   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1741   if { { ac_try="$ac_cpp conftest.$ac_ext"
1742 case "(($ac_try" in
1743   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1744   *) ac_try_echo=$ac_try;;
1745 esac
1746 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1747 $as_echo "$ac_try_echo"; } >&5
1748   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1749   ac_status=$?
1750   if test -s conftest.err; then
1751     grep -v '^ *+' conftest.err >conftest.er1
1752     cat conftest.er1 >&5
1753     mv -f conftest.er1 conftest.err
1754   fi
1755   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1756   test $ac_status = 0; } > conftest.i && {
1757          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1758          test ! -s conftest.err
1759        }; then :
1760   ac_retval=0
1761 else
1762   $as_echo "$as_me: failed program was:" >&5
1763 sed 's/^/| /' conftest.$ac_ext >&5
1764
1765     ac_retval=1
1766 fi
1767   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1768   as_fn_set_status $ac_retval
1769
1770 } # ac_fn_c_try_cpp
1771
1772 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1773 # -------------------------------------------------------
1774 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1775 # the include files in INCLUDES and setting the cache variable VAR
1776 # accordingly.
1777 ac_fn_c_check_header_mongrel ()
1778 {
1779   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1780   if eval \${$3+:} false; then :
1781   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1782 $as_echo_n "checking for $2... " >&6; }
1783 if eval \${$3+:} false; then :
1784   $as_echo_n "(cached) " >&6
1785 fi
1786 eval ac_res=\$$3
1787                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1788 $as_echo "$ac_res" >&6; }
1789 else
1790   # Is the header compilable?
1791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1792 $as_echo_n "checking $2 usability... " >&6; }
1793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1794 /* end confdefs.h.  */
1795 $4
1796 #include <$2>
1797 _ACEOF
1798 if ac_fn_c_try_compile "$LINENO"; then :
1799   ac_header_compiler=yes
1800 else
1801   ac_header_compiler=no
1802 fi
1803 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1805 $as_echo "$ac_header_compiler" >&6; }
1806
1807 # Is the header present?
1808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1809 $as_echo_n "checking $2 presence... " >&6; }
1810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1811 /* end confdefs.h.  */
1812 #include <$2>
1813 _ACEOF
1814 if ac_fn_c_try_cpp "$LINENO"; then :
1815   ac_header_preproc=yes
1816 else
1817   ac_header_preproc=no
1818 fi
1819 rm -f conftest.err conftest.i conftest.$ac_ext
1820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1821 $as_echo "$ac_header_preproc" >&6; }
1822
1823 # So?  What about this header?
1824 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1825   yes:no: )
1826     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1827 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1828     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1829 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1830     ;;
1831   no:yes:* )
1832     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1833 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1834     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1835 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1836     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1837 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1838     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1839 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1840     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1841 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1842 ( $as_echo "## ---------------------------------------- ##
1843 ## Report this to pgsql-bugs@postgresql.org ##
1844 ## ---------------------------------------- ##"
1845      ) | sed "s/^/$as_me: WARNING:     /" >&2
1846     ;;
1847 esac
1848   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1849 $as_echo_n "checking for $2... " >&6; }
1850 if eval \${$3+:} false; then :
1851   $as_echo_n "(cached) " >&6
1852 else
1853   eval "$3=\$ac_header_compiler"
1854 fi
1855 eval ac_res=\$$3
1856                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1857 $as_echo "$ac_res" >&6; }
1858 fi
1859   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1860
1861 } # ac_fn_c_check_header_mongrel
1862
1863 # ac_fn_c_try_run LINENO
1864 # ----------------------
1865 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1866 # that executables *can* be run.
1867 ac_fn_c_try_run ()
1868 {
1869   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1870   if { { ac_try="$ac_link"
1871 case "(($ac_try" in
1872   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1873   *) ac_try_echo=$ac_try;;
1874 esac
1875 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1876 $as_echo "$ac_try_echo"; } >&5
1877   (eval "$ac_link") 2>&5
1878   ac_status=$?
1879   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1880   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1881   { { case "(($ac_try" in
1882   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1883   *) ac_try_echo=$ac_try;;
1884 esac
1885 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1886 $as_echo "$ac_try_echo"; } >&5
1887   (eval "$ac_try") 2>&5
1888   ac_status=$?
1889   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1890   test $ac_status = 0; }; }; then :
1891   ac_retval=0
1892 else
1893   $as_echo "$as_me: program exited with status $ac_status" >&5
1894        $as_echo "$as_me: failed program was:" >&5
1895 sed 's/^/| /' conftest.$ac_ext >&5
1896
1897        ac_retval=$ac_status
1898 fi
1899   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1900   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1901   as_fn_set_status $ac_retval
1902
1903 } # ac_fn_c_try_run
1904
1905 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1906 # -------------------------------------------------------
1907 # Tests whether HEADER exists and can be compiled using the include files in
1908 # INCLUDES, setting the cache variable VAR accordingly.
1909 ac_fn_c_check_header_compile ()
1910 {
1911   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1912   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1913 $as_echo_n "checking for $2... " >&6; }
1914 if eval \${$3+:} false; then :
1915   $as_echo_n "(cached) " >&6
1916 else
1917   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1918 /* end confdefs.h.  */
1919 $4
1920 #include <$2>
1921 _ACEOF
1922 if ac_fn_c_try_compile "$LINENO"; then :
1923   eval "$3=yes"
1924 else
1925   eval "$3=no"
1926 fi
1927 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1928 fi
1929 eval ac_res=\$$3
1930                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1931 $as_echo "$ac_res" >&6; }
1932   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1933
1934 } # ac_fn_c_check_header_compile
1935
1936 # ac_fn_c_check_func LINENO FUNC VAR
1937 # ----------------------------------
1938 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1939 ac_fn_c_check_func ()
1940 {
1941   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1942   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1943 $as_echo_n "checking for $2... " >&6; }
1944 if eval \${$3+:} false; then :
1945   $as_echo_n "(cached) " >&6
1946 else
1947   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1948 /* end confdefs.h.  */
1949 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1950    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1951 #define $2 innocuous_$2
1952
1953 /* System header to define __stub macros and hopefully few prototypes,
1954     which can conflict with char $2 (); below.
1955     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1956     <limits.h> exists even on freestanding compilers.  */
1957
1958 #ifdef __STDC__
1959 # include <limits.h>
1960 #else
1961 # include <assert.h>
1962 #endif
1963
1964 #undef $2
1965
1966 /* Override any GCC internal prototype to avoid an error.
1967    Use char because int might match the return type of a GCC
1968    builtin and then its argument prototype would still apply.  */
1969 #ifdef __cplusplus
1970 extern "C"
1971 #endif
1972 char $2 ();
1973 /* The GNU C library defines this for functions which it implements
1974     to always fail with ENOSYS.  Some functions are actually named
1975     something starting with __ and the normal name is an alias.  */
1976 #if defined __stub_$2 || defined __stub___$2
1977 choke me
1978 #endif
1979
1980 int
1981 main ()
1982 {
1983 return $2 ();
1984   ;
1985   return 0;
1986 }
1987 _ACEOF
1988 if ac_fn_c_try_link "$LINENO"; then :
1989   eval "$3=yes"
1990 else
1991   eval "$3=no"
1992 fi
1993 rm -f core conftest.err conftest.$ac_objext \
1994     conftest$ac_exeext conftest.$ac_ext
1995 fi
1996 eval ac_res=\$$3
1997                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1998 $as_echo "$ac_res" >&6; }
1999   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2000
2001 } # ac_fn_c_check_func
2002
2003 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2004 # ----------------------------------------------------
2005 # Tries to find if the field MEMBER exists in type AGGR, after including
2006 # INCLUDES, setting cache variable VAR accordingly.
2007 ac_fn_c_check_member ()
2008 {
2009   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2010   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2011 $as_echo_n "checking for $2.$3... " >&6; }
2012 if eval \${$4+:} false; then :
2013   $as_echo_n "(cached) " >&6
2014 else
2015   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2016 /* end confdefs.h.  */
2017 $5
2018 int
2019 main ()
2020 {
2021 static $2 ac_aggr;
2022 if (ac_aggr.$3)
2023 return 0;
2024   ;
2025   return 0;
2026 }
2027 _ACEOF
2028 if ac_fn_c_try_compile "$LINENO"; then :
2029   eval "$4=yes"
2030 else
2031   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2032 /* end confdefs.h.  */
2033 $5
2034 int
2035 main ()
2036 {
2037 static $2 ac_aggr;
2038 if (sizeof ac_aggr.$3)
2039 return 0;
2040   ;
2041   return 0;
2042 }
2043 _ACEOF
2044 if ac_fn_c_try_compile "$LINENO"; then :
2045   eval "$4=yes"
2046 else
2047   eval "$4=no"
2048 fi
2049 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2050 fi
2051 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2052 fi
2053 eval ac_res=\$$4
2054                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2055 $as_echo "$ac_res" >&6; }
2056   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2057
2058 } # ac_fn_c_check_member
2059
2060 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2061 # -------------------------------------------
2062 # Tests whether TYPE exists after having included INCLUDES, setting cache
2063 # variable VAR accordingly.
2064 ac_fn_c_check_type ()
2065 {
2066   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2067   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2068 $as_echo_n "checking for $2... " >&6; }
2069 if eval \${$3+:} false; then :
2070   $as_echo_n "(cached) " >&6
2071 else
2072   eval "$3=no"
2073   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2074 /* end confdefs.h.  */
2075 $4
2076 int
2077 main ()
2078 {
2079 if (sizeof ($2))
2080          return 0;
2081   ;
2082   return 0;
2083 }
2084 _ACEOF
2085 if ac_fn_c_try_compile "$LINENO"; then :
2086   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2087 /* end confdefs.h.  */
2088 $4
2089 int
2090 main ()
2091 {
2092 if (sizeof (($2)))
2093             return 0;
2094   ;
2095   return 0;
2096 }
2097 _ACEOF
2098 if ac_fn_c_try_compile "$LINENO"; then :
2099
2100 else
2101   eval "$3=yes"
2102 fi
2103 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2104 fi
2105 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2106 fi
2107 eval ac_res=\$$3
2108                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2109 $as_echo "$ac_res" >&6; }
2110   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2111
2112 } # ac_fn_c_check_type
2113
2114 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2115 # --------------------------------------------
2116 # Tries to find the compile-time value of EXPR in a program that includes
2117 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2118 # computed
2119 ac_fn_c_compute_int ()
2120 {
2121   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2122   if test "$cross_compiling" = yes; then
2123     # Depending upon the size, compute the lo and hi bounds.
2124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2125 /* end confdefs.h.  */
2126 $4
2127 int
2128 main ()
2129 {
2130 static int test_array [1 - 2 * !(($2) >= 0)];
2131 test_array [0] = 0;
2132 return test_array [0];
2133
2134   ;
2135   return 0;
2136 }
2137 _ACEOF
2138 if ac_fn_c_try_compile "$LINENO"; then :
2139   ac_lo=0 ac_mid=0
2140   while :; do
2141     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2142 /* end confdefs.h.  */
2143 $4
2144 int
2145 main ()
2146 {
2147 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2148 test_array [0] = 0;
2149 return test_array [0];
2150
2151   ;
2152   return 0;
2153 }
2154 _ACEOF
2155 if ac_fn_c_try_compile "$LINENO"; then :
2156   ac_hi=$ac_mid; break
2157 else
2158   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2159                         if test $ac_lo -le $ac_mid; then
2160                           ac_lo= ac_hi=
2161                           break
2162                         fi
2163                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2164 fi
2165 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2166   done
2167 else
2168   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2169 /* end confdefs.h.  */
2170 $4
2171 int
2172 main ()
2173 {
2174 static int test_array [1 - 2 * !(($2) < 0)];
2175 test_array [0] = 0;
2176 return test_array [0];
2177
2178   ;
2179   return 0;
2180 }
2181 _ACEOF
2182 if ac_fn_c_try_compile "$LINENO"; then :
2183   ac_hi=-1 ac_mid=-1
2184   while :; do
2185     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2186 /* end confdefs.h.  */
2187 $4
2188 int
2189 main ()
2190 {
2191 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2192 test_array [0] = 0;
2193 return test_array [0];
2194
2195   ;
2196   return 0;
2197 }
2198 _ACEOF
2199 if ac_fn_c_try_compile "$LINENO"; then :
2200   ac_lo=$ac_mid; break
2201 else
2202   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2203                         if test $ac_mid -le $ac_hi; then
2204                           ac_lo= ac_hi=
2205                           break
2206                         fi
2207                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2208 fi
2209 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2210   done
2211 else
2212   ac_lo= ac_hi=
2213 fi
2214 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2215 fi
2216 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2217 # Binary search between lo and hi bounds.
2218 while test "x$ac_lo" != "x$ac_hi"; do
2219   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2220   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2221 /* end confdefs.h.  */
2222 $4
2223 int
2224 main ()
2225 {
2226 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2227 test_array [0] = 0;
2228 return test_array [0];
2229
2230   ;
2231   return 0;
2232 }
2233 _ACEOF
2234 if ac_fn_c_try_compile "$LINENO"; then :
2235   ac_hi=$ac_mid
2236 else
2237   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2238 fi
2239 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2240 done
2241 case $ac_lo in #((
2242 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2243 '') ac_retval=1 ;;
2244 esac
2245   else
2246     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2247 /* end confdefs.h.  */
2248 $4
2249 static long int longval () { return $2; }
2250 static unsigned long int ulongval () { return $2; }
2251 #include <stdio.h>
2252 #include <stdlib.h>
2253 int
2254 main ()
2255 {
2256
2257   FILE *f = fopen ("conftest.val", "w");
2258   if (! f)
2259     return 1;
2260   if (($2) < 0)
2261     {
2262       long int i = longval ();
2263       if (i != ($2))
2264         return 1;
2265       fprintf (f, "%ld", i);
2266     }
2267   else
2268     {
2269       unsigned long int i = ulongval ();
2270       if (i != ($2))
2271         return 1;
2272       fprintf (f, "%lu", i);
2273     }
2274   /* Do not output a trailing newline, as this causes \r\n confusion
2275      on some platforms.  */
2276   return ferror (f) || fclose (f) != 0;
2277
2278   ;
2279   return 0;
2280 }
2281 _ACEOF
2282 if ac_fn_c_try_run "$LINENO"; then :
2283   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2284 else
2285   ac_retval=1
2286 fi
2287 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2288   conftest.$ac_objext conftest.beam conftest.$ac_ext
2289 rm -f conftest.val
2290
2291   fi
2292   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2293   as_fn_set_status $ac_retval
2294
2295 } # ac_fn_c_compute_int
2296
2297 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2298 # ---------------------------------------------
2299 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2300 # accordingly.
2301 ac_fn_c_check_decl ()
2302 {
2303   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2304   as_decl_name=`echo $2|sed 's/ *(.*//'`
2305   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2306   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2307 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2308 if eval \${$3+:} false; then :
2309   $as_echo_n "(cached) " >&6
2310 else
2311   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2312 /* end confdefs.h.  */
2313 $4
2314 int
2315 main ()
2316 {
2317 #ifndef $as_decl_name
2318 #ifdef __cplusplus
2319   (void) $as_decl_use;
2320 #else
2321   (void) $as_decl_name;
2322 #endif
2323 #endif
2324
2325   ;
2326   return 0;
2327 }
2328 _ACEOF
2329 if ac_fn_c_try_compile "$LINENO"; then :
2330   eval "$3=yes"
2331 else
2332   eval "$3=no"
2333 fi
2334 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2335 fi
2336 eval ac_res=\$$3
2337                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2338 $as_echo "$ac_res" >&6; }
2339   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2340
2341 } # ac_fn_c_check_decl
2342 cat >config.log <<_ACEOF
2343 This file contains any messages produced by compilers while
2344 running configure, to aid debugging if configure makes a mistake.
2345
2346 It was created by PostgreSQL $as_me 10devel, which was
2347 generated by GNU Autoconf 2.69.  Invocation command line was
2348
2349   $ $0 $@
2350
2351 _ACEOF
2352 exec 5>>config.log
2353 {
2354 cat <<_ASUNAME
2355 ## --------- ##
2356 ## Platform. ##
2357 ## --------- ##
2358
2359 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2360 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2361 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2362 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2363 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2364
2365 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2366 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2367
2368 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2369 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2370 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2371 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2372 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2373 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2374 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2375
2376 _ASUNAME
2377
2378 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2379 for as_dir in $PATH
2380 do
2381   IFS=$as_save_IFS
2382   test -z "$as_dir" && as_dir=.
2383     $as_echo "PATH: $as_dir"
2384   done
2385 IFS=$as_save_IFS
2386
2387 } >&5
2388
2389 cat >&5 <<_ACEOF
2390
2391
2392 ## ----------- ##
2393 ## Core tests. ##
2394 ## ----------- ##
2395
2396 _ACEOF
2397
2398
2399 # Keep a trace of the command line.
2400 # Strip out --no-create and --no-recursion so they do not pile up.
2401 # Strip out --silent because we don't want to record it for future runs.
2402 # Also quote any args containing shell meta-characters.
2403 # Make two passes to allow for proper duplicate-argument suppression.
2404 ac_configure_args=
2405 ac_configure_args0=
2406 ac_configure_args1=
2407 ac_must_keep_next=false
2408 for ac_pass in 1 2
2409 do
2410   for ac_arg
2411   do
2412     case $ac_arg in
2413     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2414     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2415     | -silent | --silent | --silen | --sile | --sil)
2416       continue ;;
2417     *\'*)
2418       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2419     esac
2420     case $ac_pass in
2421     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2422     2)
2423       as_fn_append ac_configure_args1 " '$ac_arg'"
2424       if test $ac_must_keep_next = true; then
2425         ac_must_keep_next=false # Got value, back to normal.
2426       else
2427         case $ac_arg in
2428           *=* | --config-cache | -C | -disable-* | --disable-* \
2429           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2430           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2431           | -with-* | --with-* | -without-* | --without-* | --x)
2432             case "$ac_configure_args0 " in
2433               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2434             esac
2435             ;;
2436           -* ) ac_must_keep_next=true ;;
2437         esac
2438       fi
2439       as_fn_append ac_configure_args " '$ac_arg'"
2440       ;;
2441     esac
2442   done
2443 done
2444 { ac_configure_args0=; unset ac_configure_args0;}
2445 { ac_configure_args1=; unset ac_configure_args1;}
2446
2447 # When interrupted or exit'd, cleanup temporary files, and complete
2448 # config.log.  We remove comments because anyway the quotes in there
2449 # would cause problems or look ugly.
2450 # WARNING: Use '\'' to represent an apostrophe within the trap.
2451 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2452 trap 'exit_status=$?
2453   # Save into config.log some information that might help in debugging.
2454   {
2455     echo
2456
2457     $as_echo "## ---------------- ##
2458 ## Cache variables. ##
2459 ## ---------------- ##"
2460     echo
2461     # The following way of writing the cache mishandles newlines in values,
2462 (
2463   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2464     eval ac_val=\$$ac_var
2465     case $ac_val in #(
2466     *${as_nl}*)
2467       case $ac_var in #(
2468       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2469 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2470       esac
2471       case $ac_var in #(
2472       _ | IFS | as_nl) ;; #(
2473       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2474       *) { eval $ac_var=; unset $ac_var;} ;;
2475       esac ;;
2476     esac
2477   done
2478   (set) 2>&1 |
2479     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2480     *${as_nl}ac_space=\ *)
2481       sed -n \
2482         "s/'\''/'\''\\\\'\'''\''/g;
2483           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2484       ;; #(
2485     *)
2486       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2487       ;;
2488     esac |
2489     sort
2490 )
2491     echo
2492
2493     $as_echo "## ----------------- ##
2494 ## Output variables. ##
2495 ## ----------------- ##"
2496     echo
2497     for ac_var in $ac_subst_vars
2498     do
2499       eval ac_val=\$$ac_var
2500       case $ac_val in
2501       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2502       esac
2503       $as_echo "$ac_var='\''$ac_val'\''"
2504     done | sort
2505     echo
2506
2507     if test -n "$ac_subst_files"; then
2508       $as_echo "## ------------------- ##
2509 ## File substitutions. ##
2510 ## ------------------- ##"
2511       echo
2512       for ac_var in $ac_subst_files
2513       do
2514         eval ac_val=\$$ac_var
2515         case $ac_val in
2516         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2517         esac
2518         $as_echo "$ac_var='\''$ac_val'\''"
2519       done | sort
2520       echo
2521     fi
2522
2523     if test -s confdefs.h; then
2524       $as_echo "## ----------- ##
2525 ## confdefs.h. ##
2526 ## ----------- ##"
2527       echo
2528       cat confdefs.h
2529       echo
2530     fi
2531     test "$ac_signal" != 0 &&
2532       $as_echo "$as_me: caught signal $ac_signal"
2533     $as_echo "$as_me: exit $exit_status"
2534   } >&5
2535   rm -f core *.core core.conftest.* &&
2536     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2537     exit $exit_status
2538 ' 0
2539 for ac_signal in 1 2 13 15; do
2540   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2541 done
2542 ac_signal=0
2543
2544 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2545 rm -f -r conftest* confdefs.h
2546
2547 $as_echo "/* confdefs.h */" > confdefs.h
2548
2549 # Predefined preprocessor variables.
2550
2551 cat >>confdefs.h <<_ACEOF
2552 #define PACKAGE_NAME "$PACKAGE_NAME"
2553 _ACEOF
2554
2555 cat >>confdefs.h <<_ACEOF
2556 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2557 _ACEOF
2558
2559 cat >>confdefs.h <<_ACEOF
2560 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2561 _ACEOF
2562
2563 cat >>confdefs.h <<_ACEOF
2564 #define PACKAGE_STRING "$PACKAGE_STRING"
2565 _ACEOF
2566
2567 cat >>confdefs.h <<_ACEOF
2568 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2569 _ACEOF
2570
2571 cat >>confdefs.h <<_ACEOF
2572 #define PACKAGE_URL "$PACKAGE_URL"
2573 _ACEOF
2574
2575
2576 # Let the site file select an alternate cache file if it wants to.
2577 # Prefer an explicitly selected file to automatically selected ones.
2578 ac_site_file1=NONE
2579 ac_site_file2=NONE
2580 if test -n "$CONFIG_SITE"; then
2581   # We do not want a PATH search for config.site.
2582   case $CONFIG_SITE in #((
2583     -*)  ac_site_file1=./$CONFIG_SITE;;
2584     */*) ac_site_file1=$CONFIG_SITE;;
2585     *)   ac_site_file1=./$CONFIG_SITE;;
2586   esac
2587 elif test "x$prefix" != xNONE; then
2588   ac_site_file1=$prefix/share/config.site
2589   ac_site_file2=$prefix/etc/config.site
2590 else
2591   ac_site_file1=$ac_default_prefix/share/config.site
2592   ac_site_file2=$ac_default_prefix/etc/config.site
2593 fi
2594 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2595 do
2596   test "x$ac_site_file" = xNONE && continue
2597   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2598     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2599 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2600     sed 's/^/| /' "$ac_site_file" >&5
2601     . "$ac_site_file" \
2602       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2603 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2604 as_fn_error $? "failed to load site script $ac_site_file
2605 See \`config.log' for more details" "$LINENO" 5; }
2606   fi
2607 done
2608
2609 if test -r "$cache_file"; then
2610   # Some versions of bash will fail to source /dev/null (special files
2611   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2612   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2613     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2614 $as_echo "$as_me: loading cache $cache_file" >&6;}
2615     case $cache_file in
2616       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2617       *)                      . "./$cache_file";;
2618     esac
2619   fi
2620 else
2621   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2622 $as_echo "$as_me: creating cache $cache_file" >&6;}
2623   >$cache_file
2624 fi
2625
2626 # Check that the precious variables saved in the cache have kept the same
2627 # value.
2628 ac_cache_corrupted=false
2629 for ac_var in $ac_precious_vars; do
2630   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2631   eval ac_new_set=\$ac_env_${ac_var}_set
2632   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2633   eval ac_new_val=\$ac_env_${ac_var}_value
2634   case $ac_old_set,$ac_new_set in
2635     set,)
2636       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2637 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2638       ac_cache_corrupted=: ;;
2639     ,set)
2640       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2641 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2642       ac_cache_corrupted=: ;;
2643     ,);;
2644     *)
2645       if test "x$ac_old_val" != "x$ac_new_val"; then
2646         # differences in whitespace do not lead to failure.
2647         ac_old_val_w=`echo x $ac_old_val`
2648         ac_new_val_w=`echo x $ac_new_val`
2649         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2650           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2651 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2652           ac_cache_corrupted=:
2653         else
2654           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2655 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2656           eval $ac_var=\$ac_old_val
2657         fi
2658         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2659 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2660         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2661 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2662       fi;;
2663   esac
2664   # Pass precious variables to config.status.
2665   if test "$ac_new_set" = set; then
2666     case $ac_new_val in
2667     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2668     *) ac_arg=$ac_var=$ac_new_val ;;
2669     esac
2670     case " $ac_configure_args " in
2671       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2672       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2673     esac
2674   fi
2675 done
2676 if $ac_cache_corrupted; then
2677   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2678 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2679   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2680 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2681   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2682 fi
2683 ## -------------------- ##
2684 ## Main body of script. ##
2685 ## -------------------- ##
2686
2687 ac_ext=c
2688 ac_cpp='$CPP $CPPFLAGS'
2689 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2690 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2691 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2692
2693
2694
2695
2696
2697
2698 ac_aux_dir=
2699 for ac_dir in config "$srcdir"/config; do
2700   if test -f "$ac_dir/install-sh"; then
2701     ac_aux_dir=$ac_dir
2702     ac_install_sh="$ac_aux_dir/install-sh -c"
2703     break
2704   elif test -f "$ac_dir/install.sh"; then
2705     ac_aux_dir=$ac_dir
2706     ac_install_sh="$ac_aux_dir/install.sh -c"
2707     break
2708   elif test -f "$ac_dir/shtool"; then
2709     ac_aux_dir=$ac_dir
2710     ac_install_sh="$ac_aux_dir/shtool install -c"
2711     break
2712   fi
2713 done
2714 if test -z "$ac_aux_dir"; then
2715   as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2716 fi
2717
2718 # These three variables are undocumented and unsupported,
2719 # and are intended to be withdrawn in a future Autoconf release.
2720 # They can cause serious problems if a builder's source tree is in a directory
2721 # whose full name contains unusual characters.
2722 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2723 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2724 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2725
2726
2727
2728 configure_args=$ac_configure_args
2729
2730
2731 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`
2732
2733
2734 cat >>confdefs.h <<_ACEOF
2735 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2736 _ACEOF
2737
2738
2739
2740
2741
2742 # Check whether --with-extra-version was given.
2743 if test "${with_extra_version+set}" = set; then :
2744   withval=$with_extra_version;
2745   case $withval in
2746     yes)
2747       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2748       ;;
2749     no)
2750       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2751       ;;
2752     *)
2753       PG_VERSION="$PACKAGE_VERSION$withval"
2754       ;;
2755   esac
2756
2757 else
2758   PG_VERSION="$PACKAGE_VERSION"
2759 fi
2760
2761
2762
2763 cat >>confdefs.h <<_ACEOF
2764 #define PG_VERSION "$PG_VERSION"
2765 _ACEOF
2766
2767
2768 # Make sure we can run config.sub.
2769 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2770   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2771
2772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2773 $as_echo_n "checking build system type... " >&6; }
2774 if ${ac_cv_build+:} false; then :
2775   $as_echo_n "(cached) " >&6
2776 else
2777   ac_build_alias=$build_alias
2778 test "x$ac_build_alias" = x &&
2779   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2780 test "x$ac_build_alias" = x &&
2781   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2782 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2783   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2784
2785 fi
2786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2787 $as_echo "$ac_cv_build" >&6; }
2788 case $ac_cv_build in
2789 *-*-*) ;;
2790 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2791 esac
2792 build=$ac_cv_build
2793 ac_save_IFS=$IFS; IFS='-'
2794 set x $ac_cv_build
2795 shift
2796 build_cpu=$1
2797 build_vendor=$2
2798 shift; shift
2799 # Remember, the first character of IFS is used to create $*,
2800 # except with old shells:
2801 build_os=$*
2802 IFS=$ac_save_IFS
2803 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2804
2805
2806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2807 $as_echo_n "checking host system type... " >&6; }
2808 if ${ac_cv_host+:} false; then :
2809   $as_echo_n "(cached) " >&6
2810 else
2811   if test "x$host_alias" = x; then
2812   ac_cv_host=$ac_cv_build
2813 else
2814   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2815     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2816 fi
2817
2818 fi
2819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2820 $as_echo "$ac_cv_host" >&6; }
2821 case $ac_cv_host in
2822 *-*-*) ;;
2823 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2824 esac
2825 host=$ac_cv_host
2826 ac_save_IFS=$IFS; IFS='-'
2827 set x $ac_cv_host
2828 shift
2829 host_cpu=$1
2830 host_vendor=$2
2831 shift; shift
2832 # Remember, the first character of IFS is used to create $*,
2833 # except with old shells:
2834 host_os=$*
2835 IFS=$ac_save_IFS
2836 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2837
2838
2839
2840 template=
2841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2842 $as_echo_n "checking which template to use... " >&6; }
2843
2844
2845
2846
2847 # Check whether --with-template was given.
2848 if test "${with_template+set}" = set; then :
2849   withval=$with_template;
2850   case $withval in
2851     yes)
2852       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2853       ;;
2854     no)
2855       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2856       ;;
2857     *)
2858
2859   case $withval in
2860     list)   echo; ls "$srcdir/src/template"; exit;;
2861     *)      if test -f "$srcdir/src/template/$with_template" ; then
2862               template=$withval
2863             else
2864               as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2865             fi;;
2866   esac
2867
2868       ;;
2869   esac
2870
2871 else
2872
2873 # --with-template not given
2874
2875 case $host_os in
2876      aix*) template=aix ;;
2877   cygwin*) template=cygwin ;;
2878   darwin*) template=darwin ;;
2879 dragonfly*) template=netbsd ;;
2880  freebsd*) template=freebsd ;;
2881     hpux*) template=hpux ;;
2882  linux*|gnu*|k*bsd*-gnu)
2883            template=linux ;;
2884    mingw*) template=win32 ;;
2885   netbsd*) template=netbsd ;;
2886  openbsd*) template=openbsd ;;
2887  solaris*) template=solaris ;;
2888 esac
2889
2890   if test x"$template" = x"" ; then
2891     as_fn_error $? "
2892 *******************************************************************
2893 PostgreSQL has apparently not been ported to your platform yet.
2894 To try a manual configuration, look into the src/template directory
2895 for a similar platform and use the '--with-template=' option.
2896
2897 Please also contact <pgsql-bugs@postgresql.org> to see about
2898 rectifying this.  Include the above 'checking host system type...'
2899 line.
2900 *******************************************************************
2901 " "$LINENO" 5
2902   fi
2903
2904
2905 fi
2906
2907
2908
2909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
2910 $as_echo "$template" >&6; }
2911
2912 PORTNAME=$template
2913
2914
2915 # Initialize default assumption that we do not need separate assembly code
2916 # for TAS (test-and-set).  This can be overridden by the template file
2917 # when it's executed.
2918 need_tas=no
2919 tas_file=dummy.s
2920
2921
2922
2923 ##
2924 ## Command line options
2925 ##
2926
2927 #
2928 # Add non-standard directories to the include path
2929 #
2930
2931
2932
2933 # Check whether --with-includes was given.
2934 if test "${with_includes+set}" = set; then :
2935   withval=$with_includes;
2936   case $withval in
2937     yes)
2938       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
2939       ;;
2940     no)
2941       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
2942       ;;
2943     *)
2944
2945       ;;
2946   esac
2947
2948 fi
2949
2950
2951
2952
2953 #
2954 # Add non-standard directories to the library search path
2955 #
2956
2957
2958
2959 # Check whether --with-libraries was given.
2960 if test "${with_libraries+set}" = set; then :
2961   withval=$with_libraries;
2962   case $withval in
2963     yes)
2964       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
2965       ;;
2966     no)
2967       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
2968       ;;
2969     *)
2970       LIBRARY_DIRS=$withval
2971       ;;
2972   esac
2973
2974 fi
2975
2976
2977
2978
2979
2980
2981 # Check whether --with-libs was given.
2982 if test "${with_libs+set}" = set; then :
2983   withval=$with_libs;
2984   case $withval in
2985     yes)
2986       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
2987       ;;
2988     no)
2989       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
2990       ;;
2991     *)
2992       LIBRARY_DIRS=$withval
2993       ;;
2994   esac
2995
2996 fi
2997
2998
2999
3000
3001 #
3002 # 64-bit integer date/time storage is now the only option, but to avoid
3003 # unnecessary breakage of build scripts, continue to accept an explicit
3004 # "--enable-integer-datetimes" switch.
3005 #
3006
3007
3008 # Check whether --enable-integer-datetimes was given.
3009 if test "${enable_integer_datetimes+set}" = set; then :
3010   enableval=$enable_integer_datetimes;
3011   case $enableval in
3012     yes)
3013       :
3014       ;;
3015     no)
3016       as_fn_error $? "--disable-integer-datetimes is no longer supported" "$LINENO" 5
3017       ;;
3018     *)
3019       as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3020       ;;
3021   esac
3022
3023 else
3024   enable_integer_datetimes=yes
3025
3026 fi
3027
3028
3029
3030
3031 #
3032 # NLS
3033 #
3034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3035 $as_echo_n "checking whether NLS is wanted... " >&6; }
3036
3037
3038 # Check whether --enable-nls was given.
3039 if test "${enable_nls+set}" = set; then :
3040   enableval=$enable_nls;
3041   case $enableval in
3042     yes)
3043       :
3044       ;;
3045     no)
3046       :
3047       ;;
3048     *)
3049       enable_nls=yes
3050 WANTED_LANGUAGES=$enableval
3051       ;;
3052   esac
3053
3054 else
3055   enable_nls=no
3056 fi
3057
3058
3059
3060 if test "$enable_nls" = yes; then
3061
3062 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3063
3064 fi
3065
3066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3067 $as_echo "$enable_nls" >&6; }
3068
3069
3070
3071 #
3072 # Default port number (--with-pgport), default 5432
3073 #
3074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3075 $as_echo_n "checking for default port number... " >&6; }
3076
3077
3078
3079 # Check whether --with-pgport was given.
3080 if test "${with_pgport+set}" = set; then :
3081   withval=$with_pgport;
3082   case $withval in
3083     yes)
3084       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3085       ;;
3086     no)
3087       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3088       ;;
3089     *)
3090       default_port=$withval
3091       ;;
3092   esac
3093
3094 else
3095   default_port=5432
3096 fi
3097
3098
3099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3100 $as_echo "$default_port" >&6; }
3101 # Need both of these because some places want an integer and some a string
3102
3103 cat >>confdefs.h <<_ACEOF
3104 #define DEF_PGPORT ${default_port}
3105 _ACEOF
3106
3107
3108 cat >>confdefs.h <<_ACEOF
3109 #define DEF_PGPORT_STR "${default_port}"
3110 _ACEOF
3111
3112
3113
3114 # It's worth validating port; you can get very confusing errors otherwise
3115 if test x"$default_port" = x""; then
3116   as_fn_error $? "invalid --with-pgport specification: empty string" "$LINENO" 5
3117 elif test ! x`echo "$default_port" | sed -e 's/[0-9]*//'` = x""; then
3118   as_fn_error $? "invalid --with-pgport specification: must be a number" "$LINENO" 5
3119 elif test ! x`echo "$default_port" | sed -e 's/^0.//'` = x"$default_port"; then
3120   as_fn_error $? "invalid --with-pgport specification: must not have leading 0" "$LINENO" 5
3121 elif test "$default_port" -lt "1" -o "$default_port" -gt "65535"; then
3122   as_fn_error $? "invalid --with-pgport specification: must be between 1 and 65535" "$LINENO" 5
3123 fi
3124
3125 #
3126 # '-rpath'-like feature can be disabled
3127 #
3128
3129
3130 # Check whether --enable-rpath was given.
3131 if test "${enable_rpath+set}" = set; then :
3132   enableval=$enable_rpath;
3133   case $enableval in
3134     yes)
3135       :
3136       ;;
3137     no)
3138       :
3139       ;;
3140     *)
3141       as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3142       ;;
3143   esac
3144
3145 else
3146   enable_rpath=yes
3147
3148 fi
3149
3150
3151
3152
3153 #
3154 # Spinlocks
3155 #
3156
3157
3158 # Check whether --enable-spinlocks was given.
3159 if test "${enable_spinlocks+set}" = set; then :
3160   enableval=$enable_spinlocks;
3161   case $enableval in
3162     yes)
3163       :
3164       ;;
3165     no)
3166       :
3167       ;;
3168     *)
3169       as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3170       ;;
3171   esac
3172
3173 else
3174   enable_spinlocks=yes
3175
3176 fi
3177
3178
3179
3180 #
3181 # Atomic operations
3182 #
3183
3184
3185 # Check whether --enable-atomics was given.
3186 if test "${enable_atomics+set}" = set; then :
3187   enableval=$enable_atomics;
3188   case $enableval in
3189     yes)
3190       :
3191       ;;
3192     no)
3193       :
3194       ;;
3195     *)
3196       as_fn_error $? "no argument expected for --enable-atomics option" "$LINENO" 5
3197       ;;
3198   esac
3199
3200 else
3201   enable_atomics=yes
3202
3203 fi
3204
3205
3206
3207 #
3208 # Random number generation
3209 #
3210
3211
3212 # Check whether --enable-strong-random was given.
3213 if test "${enable_strong_random+set}" = set; then :
3214   enableval=$enable_strong_random;
3215   case $enableval in
3216     yes)
3217       :
3218       ;;
3219     no)
3220       :
3221       ;;
3222     *)
3223       as_fn_error $? "no argument expected for --enable-strong-random option" "$LINENO" 5
3224       ;;
3225   esac
3226
3227 else
3228   enable_strong_random=yes
3229
3230 fi
3231
3232
3233
3234
3235 #
3236 # --enable-debug adds -g to compiler flags
3237 #
3238
3239
3240 # Check whether --enable-debug was given.
3241 if test "${enable_debug+set}" = set; then :
3242   enableval=$enable_debug;
3243   case $enableval in
3244     yes)
3245       :
3246       ;;
3247     no)
3248       :
3249       ;;
3250     *)
3251       as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3252       ;;
3253   esac
3254
3255 else
3256   enable_debug=no
3257
3258 fi
3259
3260
3261
3262
3263 #
3264 # --enable-profiling enables gcc profiling
3265 #
3266
3267
3268 # Check whether --enable-profiling was given.
3269 if test "${enable_profiling+set}" = set; then :
3270   enableval=$enable_profiling;
3271   case $enableval in
3272     yes)
3273       :
3274       ;;
3275     no)
3276       :
3277       ;;
3278     *)
3279       as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3280       ;;
3281   esac
3282
3283 else
3284   enable_profiling=no
3285
3286 fi
3287
3288
3289
3290 #
3291 # --enable-coverage enables generation of code coverage metrics with gcov
3292 #
3293
3294
3295 # Check whether --enable-coverage was given.
3296 if test "${enable_coverage+set}" = set; then :
3297   enableval=$enable_coverage;
3298   case $enableval in
3299     yes)
3300       for ac_prog in gcov
3301 do
3302   # Extract the first word of "$ac_prog", so it can be a program name with args.
3303 set dummy $ac_prog; ac_word=$2
3304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3305 $as_echo_n "checking for $ac_word... " >&6; }
3306 if ${ac_cv_prog_GCOV+:} false; then :
3307   $as_echo_n "(cached) " >&6
3308 else
3309   if test -n "$GCOV"; then
3310   ac_cv_prog_GCOV="$GCOV" # Let the user override the test.
3311 else
3312 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3313 for as_dir in $PATH
3314 do
3315   IFS=$as_save_IFS
3316   test -z "$as_dir" && as_dir=.
3317     for ac_exec_ext in '' $ac_executable_extensions; do
3318   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3319     ac_cv_prog_GCOV="$ac_prog"
3320     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3321     break 2
3322   fi
3323 done
3324   done
3325 IFS=$as_save_IFS
3326
3327 fi
3328 fi
3329 GCOV=$ac_cv_prog_GCOV
3330 if test -n "$GCOV"; then
3331   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3332 $as_echo "$GCOV" >&6; }
3333 else
3334   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3335 $as_echo "no" >&6; }
3336 fi
3337
3338
3339   test -n "$GCOV" && break
3340 done
3341
3342 if test -z "$GCOV"; then
3343   as_fn_error $? "gcov not found" "$LINENO" 5
3344 fi
3345 for ac_prog in lcov
3346 do
3347   # Extract the first word of "$ac_prog", so it can be a program name with args.
3348 set dummy $ac_prog; ac_word=$2
3349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3350 $as_echo_n "checking for $ac_word... " >&6; }
3351 if ${ac_cv_prog_LCOV+:} false; then :
3352   $as_echo_n "(cached) " >&6
3353 else
3354   if test -n "$LCOV"; then
3355   ac_cv_prog_LCOV="$LCOV" # Let the user override the test.
3356 else
3357 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3358 for as_dir in $PATH
3359 do
3360   IFS=$as_save_IFS
3361   test -z "$as_dir" && as_dir=.
3362     for ac_exec_ext in '' $ac_executable_extensions; do
3363   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3364     ac_cv_prog_LCOV="$ac_prog"
3365     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3366     break 2
3367   fi
3368 done
3369   done
3370 IFS=$as_save_IFS
3371
3372 fi
3373 fi
3374 LCOV=$ac_cv_prog_LCOV
3375 if test -n "$LCOV"; then
3376   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3377 $as_echo "$LCOV" >&6; }
3378 else
3379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3380 $as_echo "no" >&6; }
3381 fi
3382
3383
3384   test -n "$LCOV" && break
3385 done
3386
3387 if test -z "$LCOV"; then
3388   as_fn_error $? "lcov not found" "$LINENO" 5
3389 fi
3390 for ac_prog in genhtml
3391 do
3392   # Extract the first word of "$ac_prog", so it can be a program name with args.
3393 set dummy $ac_prog; ac_word=$2
3394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3395 $as_echo_n "checking for $ac_word... " >&6; }
3396 if ${ac_cv_prog_GENHTML+:} false; then :
3397   $as_echo_n "(cached) " >&6
3398 else
3399   if test -n "$GENHTML"; then
3400   ac_cv_prog_GENHTML="$GENHTML" # Let the user override the test.
3401 else
3402 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3403 for as_dir in $PATH
3404 do
3405   IFS=$as_save_IFS
3406   test -z "$as_dir" && as_dir=.
3407     for ac_exec_ext in '' $ac_executable_extensions; do
3408   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3409     ac_cv_prog_GENHTML="$ac_prog"
3410     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3411     break 2
3412   fi
3413 done
3414   done
3415 IFS=$as_save_IFS
3416
3417 fi
3418 fi
3419 GENHTML=$ac_cv_prog_GENHTML
3420 if test -n "$GENHTML"; then
3421   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3422 $as_echo "$GENHTML" >&6; }
3423 else
3424   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3425 $as_echo "no" >&6; }
3426 fi
3427
3428
3429   test -n "$GENHTML" && break
3430 done
3431
3432 if test -z "$GENHTML"; then
3433   as_fn_error $? "genhtml not found" "$LINENO" 5
3434 fi
3435       ;;
3436     no)
3437       :
3438       ;;
3439     *)
3440       as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3441       ;;
3442   esac
3443
3444 else
3445   enable_coverage=no
3446
3447 fi
3448
3449
3450
3451
3452 #
3453 # DTrace
3454 #
3455
3456
3457 # Check whether --enable-dtrace was given.
3458 if test "${enable_dtrace+set}" = set; then :
3459   enableval=$enable_dtrace;
3460   case $enableval in
3461     yes)
3462       for ac_prog in dtrace
3463 do
3464   # Extract the first word of "$ac_prog", so it can be a program name with args.
3465 set dummy $ac_prog; ac_word=$2
3466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3467 $as_echo_n "checking for $ac_word... " >&6; }
3468 if ${ac_cv_prog_DTRACE+:} false; then :
3469   $as_echo_n "(cached) " >&6
3470 else
3471   if test -n "$DTRACE"; then
3472   ac_cv_prog_DTRACE="$DTRACE" # Let the user override the test.
3473 else
3474 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3475 for as_dir in $PATH
3476 do
3477   IFS=$as_save_IFS
3478   test -z "$as_dir" && as_dir=.
3479     for ac_exec_ext in '' $ac_executable_extensions; do
3480   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3481     ac_cv_prog_DTRACE="$ac_prog"
3482     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3483     break 2
3484   fi
3485 done
3486   done
3487 IFS=$as_save_IFS
3488
3489 fi
3490 fi
3491 DTRACE=$ac_cv_prog_DTRACE
3492 if test -n "$DTRACE"; then
3493   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3494 $as_echo "$DTRACE" >&6; }
3495 else
3496   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3497 $as_echo "no" >&6; }
3498 fi
3499
3500
3501   test -n "$DTRACE" && break
3502 done
3503
3504 if test -z "$DTRACE"; then
3505   as_fn_error $? "dtrace not found" "$LINENO" 5
3506 fi
3507
3508       ;;
3509     no)
3510       :
3511       ;;
3512     *)
3513       as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3514       ;;
3515   esac
3516
3517 else
3518   enable_dtrace=no
3519
3520 fi
3521
3522
3523
3524
3525 #
3526 # TAP tests
3527 #
3528
3529
3530 # Check whether --enable-tap-tests was given.
3531 if test "${enable_tap_tests+set}" = set; then :
3532   enableval=$enable_tap_tests;
3533   case $enableval in
3534     yes)
3535       :
3536       ;;
3537     no)
3538       :
3539       ;;
3540     *)
3541       as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3542       ;;
3543   esac
3544
3545 else
3546   enable_tap_tests=no
3547
3548 fi
3549
3550
3551
3552
3553 #
3554 # Block size
3555 #
3556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3557 $as_echo_n "checking for block size... " >&6; }
3558
3559
3560
3561 # Check whether --with-blocksize was given.
3562 if test "${with_blocksize+set}" = set; then :
3563   withval=$with_blocksize;
3564   case $withval in
3565     yes)
3566       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3567       ;;
3568     no)
3569       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3570       ;;
3571     *)
3572       blocksize=$withval
3573       ;;
3574   esac
3575
3576 else
3577   blocksize=8
3578 fi
3579
3580
3581 case ${blocksize} in
3582   1) BLCKSZ=1024;;
3583   2) BLCKSZ=2048;;
3584   4) BLCKSZ=4096;;
3585   8) BLCKSZ=8192;;
3586  16) BLCKSZ=16384;;
3587  32) BLCKSZ=32768;;
3588   *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3589 esac
3590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3591 $as_echo "${blocksize}kB" >&6; }
3592
3593
3594 cat >>confdefs.h <<_ACEOF
3595 #define BLCKSZ ${BLCKSZ}
3596 _ACEOF
3597
3598
3599 #
3600 # Relation segment size
3601 #
3602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3603 $as_echo_n "checking for segment size... " >&6; }
3604
3605
3606
3607 # Check whether --with-segsize was given.
3608 if test "${with_segsize+set}" = set; then :
3609   withval=$with_segsize;
3610   case $withval in
3611     yes)
3612       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3613       ;;
3614     no)
3615       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3616       ;;
3617     *)
3618       segsize=$withval
3619       ;;
3620   esac
3621
3622 else
3623   segsize=1
3624 fi
3625
3626
3627 # this expression is set up to avoid unnecessary integer overflow
3628 # blocksize is already guaranteed to be a factor of 1024
3629 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3630 test $? -eq 0 || exit 1
3631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3632 $as_echo "${segsize}GB" >&6; }
3633
3634
3635 cat >>confdefs.h <<_ACEOF
3636 #define RELSEG_SIZE ${RELSEG_SIZE}
3637 _ACEOF
3638
3639
3640 #
3641 # WAL block size
3642 #
3643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3644 $as_echo_n "checking for WAL block size... " >&6; }
3645
3646
3647
3648 # Check whether --with-wal-blocksize was given.
3649 if test "${with_wal_blocksize+set}" = set; then :
3650   withval=$with_wal_blocksize;
3651   case $withval in
3652     yes)
3653       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3654       ;;
3655     no)
3656       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3657       ;;
3658     *)
3659       wal_blocksize=$withval
3660       ;;
3661   esac
3662
3663 else
3664   wal_blocksize=8
3665 fi
3666
3667
3668 case ${wal_blocksize} in
3669   1) XLOG_BLCKSZ=1024;;
3670   2) XLOG_BLCKSZ=2048;;
3671   4) XLOG_BLCKSZ=4096;;
3672   8) XLOG_BLCKSZ=8192;;
3673  16) XLOG_BLCKSZ=16384;;
3674  32) XLOG_BLCKSZ=32768;;
3675  64) XLOG_BLCKSZ=65536;;
3676   *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3677 esac
3678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3679 $as_echo "${wal_blocksize}kB" >&6; }
3680
3681
3682 cat >>confdefs.h <<_ACEOF
3683 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3684 _ACEOF
3685
3686
3687 #
3688 # WAL segment size
3689 #
3690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL segment size" >&5
3691 $as_echo_n "checking for WAL segment size... " >&6; }
3692
3693
3694
3695 # Check whether --with-wal-segsize was given.
3696 if test "${with_wal_segsize+set}" = set; then :
3697   withval=$with_wal_segsize;
3698   case $withval in
3699     yes)
3700       as_fn_error $? "argument required for --with-wal-segsize option" "$LINENO" 5
3701       ;;
3702     no)
3703       as_fn_error $? "argument required for --with-wal-segsize option" "$LINENO" 5
3704       ;;
3705     *)
3706       wal_segsize=$withval
3707       ;;
3708   esac
3709
3710 else
3711   wal_segsize=16
3712 fi
3713
3714
3715 case ${wal_segsize} in
3716   1) ;;
3717   2) ;;
3718   4) ;;
3719   8) ;;
3720  16) ;;
3721  32) ;;
3722  64) ;;
3723  128) ;;
3724  256) ;;
3725  512) ;;
3726  1024) ;;
3727   *) as_fn_error $? "Invalid WAL segment size. Allowed values are 1,2,4,8,16,32,64,128,256,512,1024." "$LINENO" 5
3728 esac
3729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_segsize}MB" >&5
3730 $as_echo "${wal_segsize}MB" >&6; }
3731
3732
3733 cat >>confdefs.h <<_ACEOF
3734 #define XLOG_SEG_SIZE (${wal_segsize} * 1024 * 1024)
3735 _ACEOF
3736
3737
3738 #
3739 # C compiler
3740 #
3741
3742 # For historical reasons you can also use --with-CC to specify the C compiler
3743 # to use, although the standard way to do this is to set the CC environment
3744 # variable.
3745
3746
3747
3748 # Check whether --with-CC was given.
3749 if test "${with_CC+set}" = set; then :
3750   withval=$with_CC;
3751   case $withval in
3752     yes)
3753       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3754       ;;
3755     no)
3756       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3757       ;;
3758     *)
3759       CC=$with_CC
3760       ;;
3761   esac
3762
3763 fi
3764
3765
3766
3767 case $template in
3768   aix) pgac_cc_list="gcc xlc";;
3769     *) pgac_cc_list="gcc cc";;
3770 esac
3771
3772 ac_ext=c
3773 ac_cpp='$CPP $CPPFLAGS'
3774 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3775 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3776 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3777 if test -n "$ac_tool_prefix"; then
3778   for ac_prog in $pgac_cc_list
3779   do
3780     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3781 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3783 $as_echo_n "checking for $ac_word... " >&6; }
3784 if ${ac_cv_prog_CC+:} false; then :
3785   $as_echo_n "(cached) " >&6
3786 else
3787   if test -n "$CC"; then
3788   ac_cv_prog_CC="$CC" # Let the user override the test.
3789 else
3790 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3791 for as_dir in $PATH
3792 do
3793   IFS=$as_save_IFS
3794   test -z "$as_dir" && as_dir=.
3795     for ac_exec_ext in '' $ac_executable_extensions; do
3796   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3797     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3798     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3799     break 2
3800   fi
3801 done
3802   done
3803 IFS=$as_save_IFS
3804
3805 fi
3806 fi
3807 CC=$ac_cv_prog_CC
3808 if test -n "$CC"; then
3809   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3810 $as_echo "$CC" >&6; }
3811 else
3812   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3813 $as_echo "no" >&6; }
3814 fi
3815
3816
3817     test -n "$CC" && break
3818   done
3819 fi
3820 if test -z "$CC"; then
3821   ac_ct_CC=$CC
3822   for ac_prog in $pgac_cc_list
3823 do
3824   # Extract the first word of "$ac_prog", so it can be a program name with args.
3825 set dummy $ac_prog; ac_word=$2
3826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3827 $as_echo_n "checking for $ac_word... " >&6; }
3828 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3829   $as_echo_n "(cached) " >&6
3830 else
3831   if test -n "$ac_ct_CC"; then
3832   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3833 else
3834 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3835 for as_dir in $PATH
3836 do
3837   IFS=$as_save_IFS
3838   test -z "$as_dir" && as_dir=.
3839     for ac_exec_ext in '' $ac_executable_extensions; do
3840   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3841     ac_cv_prog_ac_ct_CC="$ac_prog"
3842     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3843     break 2
3844   fi
3845 done
3846   done
3847 IFS=$as_save_IFS
3848
3849 fi
3850 fi
3851 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3852 if test -n "$ac_ct_CC"; then
3853   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3854 $as_echo "$ac_ct_CC" >&6; }
3855 else
3856   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3857 $as_echo "no" >&6; }
3858 fi
3859
3860
3861   test -n "$ac_ct_CC" && break
3862 done
3863
3864   if test "x$ac_ct_CC" = x; then
3865     CC=""
3866   else
3867     case $cross_compiling:$ac_tool_warned in
3868 yes:)
3869 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3870 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3871 ac_tool_warned=yes ;;
3872 esac
3873     CC=$ac_ct_CC
3874   fi
3875 fi
3876
3877
3878 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3879 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3880 as_fn_error $? "no acceptable C compiler found in \$PATH
3881 See \`config.log' for more details" "$LINENO" 5; }
3882
3883 # Provide some information about the compiler.
3884 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3885 set X $ac_compile
3886 ac_compiler=$2
3887 for ac_option in --version -v -V -qversion; do
3888   { { ac_try="$ac_compiler $ac_option >&5"
3889 case "(($ac_try" in
3890   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3891   *) ac_try_echo=$ac_try;;
3892 esac
3893 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3894 $as_echo "$ac_try_echo"; } >&5
3895   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3896   ac_status=$?
3897   if test -s conftest.err; then
3898     sed '10a\
3899 ... rest of stderr output deleted ...
3900          10q' conftest.err >conftest.er1
3901     cat conftest.er1 >&5
3902   fi
3903   rm -f conftest.er1 conftest.err
3904   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3905   test $ac_status = 0; }
3906 done
3907
3908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3909 /* end confdefs.h.  */
3910
3911 int
3912 main ()
3913 {
3914
3915   ;
3916   return 0;
3917 }
3918 _ACEOF
3919 ac_clean_files_save=$ac_clean_files
3920 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3921 # Try to create an executable without -o first, disregard a.out.
3922 # It will help us diagnose broken compilers, and finding out an intuition
3923 # of exeext.
3924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3925 $as_echo_n "checking whether the C compiler works... " >&6; }
3926 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3927
3928 # The possible output files:
3929 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3930
3931 ac_rmfiles=
3932 for ac_file in $ac_files
3933 do
3934   case $ac_file in
3935     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3936     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3937   esac
3938 done
3939 rm -f $ac_rmfiles
3940
3941 if { { ac_try="$ac_link_default"
3942 case "(($ac_try" in
3943   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3944   *) ac_try_echo=$ac_try;;
3945 esac
3946 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3947 $as_echo "$ac_try_echo"; } >&5
3948   (eval "$ac_link_default") 2>&5
3949   ac_status=$?
3950   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3951   test $ac_status = 0; }; then :
3952   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3953 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3954 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3955 # so that the user can short-circuit this test for compilers unknown to
3956 # Autoconf.
3957 for ac_file in $ac_files ''
3958 do
3959   test -f "$ac_file" || continue
3960   case $ac_file in
3961     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3962         ;;
3963     [ab].out )
3964         # We found the default executable, but exeext='' is most
3965         # certainly right.
3966         break;;
3967     *.* )
3968         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3969         then :; else
3970            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3971         fi
3972         # We set ac_cv_exeext here because the later test for it is not
3973         # safe: cross compilers may not add the suffix if given an `-o'
3974         # argument, so we may need to know it at that point already.
3975         # Even if this section looks crufty: it has the advantage of
3976         # actually working.
3977         break;;
3978     * )
3979         break;;
3980   esac
3981 done
3982 test "$ac_cv_exeext" = no && ac_cv_exeext=
3983
3984 else
3985   ac_file=''
3986 fi
3987 if test -z "$ac_file"; then :
3988   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3989 $as_echo "no" >&6; }
3990 $as_echo "$as_me: failed program was:" >&5
3991 sed 's/^/| /' conftest.$ac_ext >&5
3992
3993 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3994 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3995 as_fn_error 77 "C compiler cannot create executables
3996 See \`config.log' for more details" "$LINENO" 5; }
3997 else
3998   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3999 $as_echo "yes" >&6; }
4000 fi
4001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4002 $as_echo_n "checking for C compiler default output file name... " >&6; }
4003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4004 $as_echo "$ac_file" >&6; }
4005 ac_exeext=$ac_cv_exeext
4006
4007 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4008 ac_clean_files=$ac_clean_files_save
4009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4010 $as_echo_n "checking for suffix of executables... " >&6; }
4011 if { { ac_try="$ac_link"
4012 case "(($ac_try" in
4013   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4014   *) ac_try_echo=$ac_try;;
4015 esac
4016 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4017 $as_echo "$ac_try_echo"; } >&5
4018   (eval "$ac_link") 2>&5
4019   ac_status=$?
4020   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4021   test $ac_status = 0; }; then :
4022   # If both `conftest.exe' and `conftest' are `present' (well, observable)
4023 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4024 # work properly (i.e., refer to `conftest.exe'), while it won't with
4025 # `rm'.
4026 for ac_file in conftest.exe conftest conftest.*; do
4027   test -f "$ac_file" || continue
4028   case $ac_file in
4029     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4030     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4031           break;;
4032     * ) break;;
4033   esac
4034 done
4035 else
4036   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4037 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4038 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4039 See \`config.log' for more details" "$LINENO" 5; }
4040 fi
4041 rm -f conftest conftest$ac_cv_exeext
4042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4043 $as_echo "$ac_cv_exeext" >&6; }
4044
4045 rm -f conftest.$ac_ext
4046 EXEEXT=$ac_cv_exeext
4047 ac_exeext=$EXEEXT
4048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4049 /* end confdefs.h.  */
4050 #include <stdio.h>
4051 int
4052 main ()
4053 {
4054 FILE *f = fopen ("conftest.out", "w");
4055  return ferror (f) || fclose (f) != 0;
4056
4057   ;
4058   return 0;
4059 }
4060 _ACEOF
4061 ac_clean_files="$ac_clean_files conftest.out"
4062 # Check that the compiler produces executables we can run.  If not, either
4063 # the compiler is broken, or we cross compile.
4064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4065 $as_echo_n "checking whether we are cross compiling... " >&6; }
4066 if test "$cross_compiling" != yes; then
4067   { { ac_try="$ac_link"
4068 case "(($ac_try" in
4069   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4070   *) ac_try_echo=$ac_try;;
4071 esac
4072 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4073 $as_echo "$ac_try_echo"; } >&5
4074   (eval "$ac_link") 2>&5
4075   ac_status=$?
4076   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4077   test $ac_status = 0; }
4078   if { ac_try='./conftest$ac_cv_exeext'
4079   { { case "(($ac_try" in
4080   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4081   *) ac_try_echo=$ac_try;;
4082 esac
4083 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4084 $as_echo "$ac_try_echo"; } >&5
4085   (eval "$ac_try") 2>&5
4086   ac_status=$?
4087   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4088   test $ac_status = 0; }; }; then
4089     cross_compiling=no
4090   else
4091     if test "$cross_compiling" = maybe; then
4092         cross_compiling=yes
4093     else
4094         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4095 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4096 as_fn_error $? "cannot run C compiled programs.
4097 If you meant to cross compile, use \`--host'.
4098 See \`config.log' for more details" "$LINENO" 5; }
4099     fi
4100   fi
4101 fi
4102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4103 $as_echo "$cross_compiling" >&6; }
4104
4105 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4106 ac_clean_files=$ac_clean_files_save
4107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4108 $as_echo_n "checking for suffix of object files... " >&6; }
4109 if ${ac_cv_objext+:} false; then :
4110   $as_echo_n "(cached) " >&6
4111 else
4112   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4113 /* end confdefs.h.  */
4114
4115 int
4116 main ()
4117 {
4118
4119   ;
4120   return 0;
4121 }
4122 _ACEOF
4123 rm -f conftest.o conftest.obj
4124 if { { ac_try="$ac_compile"
4125 case "(($ac_try" in
4126   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4127   *) ac_try_echo=$ac_try;;
4128 esac
4129 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4130 $as_echo "$ac_try_echo"; } >&5
4131   (eval "$ac_compile") 2>&5
4132   ac_status=$?
4133   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4134   test $ac_status = 0; }; then :
4135   for ac_file in conftest.o conftest.obj conftest.*; do
4136   test -f "$ac_file" || continue;
4137   case $ac_file in
4138     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4139     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4140        break;;
4141   esac
4142 done
4143 else
4144   $as_echo "$as_me: failed program was:" >&5
4145 sed 's/^/| /' conftest.$ac_ext >&5
4146
4147 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4148 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4149 as_fn_error $? "cannot compute suffix of object files: cannot compile
4150 See \`config.log' for more details" "$LINENO" 5; }
4151 fi
4152 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4153 fi
4154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4155 $as_echo "$ac_cv_objext" >&6; }
4156 OBJEXT=$ac_cv_objext
4157 ac_objext=$OBJEXT
4158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4159 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4160 if ${ac_cv_c_compiler_gnu+:} false; then :
4161   $as_echo_n "(cached) " >&6
4162 else
4163   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4164 /* end confdefs.h.  */
4165
4166 int
4167 main ()
4168 {
4169 #ifndef __GNUC__
4170        choke me
4171 #endif
4172
4173   ;
4174   return 0;
4175 }
4176 _ACEOF
4177 if ac_fn_c_try_compile "$LINENO"; then :
4178   ac_compiler_gnu=yes
4179 else
4180   ac_compiler_gnu=no
4181 fi
4182 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4183 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4184
4185 fi
4186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4187 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4188 if test $ac_compiler_gnu = yes; then
4189   GCC=yes
4190 else
4191   GCC=
4192 fi
4193 ac_test_CFLAGS=${CFLAGS+set}
4194 ac_save_CFLAGS=$CFLAGS
4195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4196 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4197 if ${ac_cv_prog_cc_g+:} false; then :
4198   $as_echo_n "(cached) " >&6
4199 else
4200   ac_save_c_werror_flag=$ac_c_werror_flag
4201    ac_c_werror_flag=yes
4202    ac_cv_prog_cc_g=no
4203    CFLAGS="-g"
4204    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4205 /* end confdefs.h.  */
4206
4207 int
4208 main ()
4209 {
4210
4211   ;
4212   return 0;
4213 }
4214 _ACEOF
4215 if ac_fn_c_try_compile "$LINENO"; then :
4216   ac_cv_prog_cc_g=yes
4217 else
4218   CFLAGS=""
4219       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4220 /* end confdefs.h.  */
4221
4222 int
4223 main ()
4224 {
4225
4226   ;
4227   return 0;
4228 }
4229 _ACEOF
4230 if ac_fn_c_try_compile "$LINENO"; then :
4231
4232 else
4233   ac_c_werror_flag=$ac_save_c_werror_flag
4234          CFLAGS="-g"
4235          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4236 /* end confdefs.h.  */
4237
4238 int
4239 main ()
4240 {
4241
4242   ;
4243   return 0;
4244 }
4245 _ACEOF
4246 if ac_fn_c_try_compile "$LINENO"; then :
4247   ac_cv_prog_cc_g=yes
4248 fi
4249 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4250 fi
4251 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4252 fi
4253 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4254    ac_c_werror_flag=$ac_save_c_werror_flag
4255 fi
4256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4257 $as_echo "$ac_cv_prog_cc_g" >&6; }
4258 if test "$ac_test_CFLAGS" = set; then
4259   CFLAGS=$ac_save_CFLAGS
4260 elif test $ac_cv_prog_cc_g = yes; then
4261   if test "$GCC" = yes; then
4262     CFLAGS="-g -O2"
4263   else
4264     CFLAGS="-g"
4265   fi
4266 else
4267   if test "$GCC" = yes; then
4268     CFLAGS="-O2"
4269   else
4270     CFLAGS=
4271   fi
4272 fi
4273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4274 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4275 if ${ac_cv_prog_cc_c89+:} false; then :
4276   $as_echo_n "(cached) " >&6
4277 else
4278   ac_cv_prog_cc_c89=no
4279 ac_save_CC=$CC
4280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4281 /* end confdefs.h.  */
4282 #include <stdarg.h>
4283 #include <stdio.h>
4284 struct stat;
4285 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4286 struct buf { int x; };
4287 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4288 static char *e (p, i)
4289      char **p;
4290      int i;
4291 {
4292   return p[i];
4293 }
4294 static char *f (char * (*g) (char **, int), char **p, ...)
4295 {
4296   char *s;
4297   va_list v;
4298   va_start (v,p);
4299   s = g (p, va_arg (v,int));
4300   va_end (v);
4301   return s;
4302 }
4303
4304 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4305    function prototypes and stuff, but not '\xHH' hex character constants.
4306    These don't provoke an error unfortunately, instead are silently treated
4307    as 'x'.  The following induces an error, until -std is added to get
4308    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4309    array size at least.  It's necessary to write '\x00'==0 to get something
4310    that's true only with -std.  */
4311 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4312
4313 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4314    inside strings and character constants.  */
4315 #define FOO(x) 'x'
4316 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4317
4318 int test (int i, double x);
4319 struct s1 {int (*f) (int a);};
4320 struct s2 {int (*f) (double a);};
4321 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4322 int argc;
4323 char **argv;
4324 int
4325 main ()
4326 {
4327 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4328   ;
4329   return 0;
4330 }
4331 _ACEOF
4332 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4333         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4334 do
4335   CC="$ac_save_CC $ac_arg"
4336   if ac_fn_c_try_compile "$LINENO"; then :
4337   ac_cv_prog_cc_c89=$ac_arg
4338 fi
4339 rm -f core conftest.err conftest.$ac_objext
4340   test "x$ac_cv_prog_cc_c89" != "xno" && break
4341 done
4342 rm -f conftest.$ac_ext
4343 CC=$ac_save_CC
4344
4345 fi
4346 # AC_CACHE_VAL
4347 case "x$ac_cv_prog_cc_c89" in
4348   x)
4349     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4350 $as_echo "none needed" >&6; } ;;
4351   xno)
4352     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4353 $as_echo "unsupported" >&6; } ;;
4354   *)
4355     CC="$CC $ac_cv_prog_cc_c89"
4356     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4357 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4358 esac
4359 if test "x$ac_cv_prog_cc_c89" != xno; then :
4360
4361 fi
4362
4363 ac_ext=c
4364 ac_cpp='$CPP $CPPFLAGS'
4365 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4366 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4367 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4368
4369
4370 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4371 # but has idiosyncrasies of its own.  We assume icc will define
4372 # __INTEL_COMPILER regardless of CFLAGS.
4373
4374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4375 /* end confdefs.h.  */
4376
4377 int
4378 main ()
4379 {
4380 #ifndef __INTEL_COMPILER
4381 choke me
4382 #endif
4383   ;
4384   return 0;
4385 }
4386 _ACEOF
4387 if ac_fn_c_try_compile "$LINENO"; then :
4388   ICC=yes
4389 else
4390   ICC=no
4391 fi
4392 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4393
4394 # Check if it's Sun Studio compiler. We assume that
4395 # __SUNPRO_C will be defined for Sun Studio compilers
4396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4397 /* end confdefs.h.  */
4398
4399 int
4400 main ()
4401 {
4402 #ifndef __SUNPRO_C
4403 choke me
4404 #endif
4405   ;
4406   return 0;
4407 }
4408 _ACEOF
4409 if ac_fn_c_try_compile "$LINENO"; then :
4410   SUN_STUDIO_CC=yes
4411 else
4412   SUN_STUDIO_CC=no
4413 fi
4414 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4415
4416
4417
4418 unset CFLAGS
4419
4420 #
4421 # Read the template
4422 #
4423 . "$srcdir/src/template/$template" || exit
4424
4425 # CFLAGS are selected so:
4426 # If the user specifies something in the environment, that is used.
4427 # else:  If the template file set something, that is used.
4428 # else:  If coverage was enabled, don't set anything.
4429 # else:  If the compiler is GCC, then we use -O2.
4430 # else:  If the compiler is something else, then we use -O, unless debugging.
4431
4432 if test "$ac_env_CFLAGS_set" = set; then
4433   CFLAGS=$ac_env_CFLAGS_value
4434 elif test "${CFLAGS+set}" = set; then
4435   : # (keep what template set)
4436 elif test "$enable_coverage" = yes; then
4437   : # no optimization by default
4438 elif test "$GCC" = yes; then
4439   CFLAGS="-O2"
4440 else
4441   # if the user selected debug mode, don't use -O
4442   if test "$enable_debug" != yes; then
4443     CFLAGS="-O"
4444   fi
4445 fi
4446
4447 # CFLAGS we determined above will be added back at the end
4448 user_CFLAGS=$CFLAGS
4449 CFLAGS=""
4450
4451 # set CFLAGS_VECTOR from the environment, if available
4452 if test "$ac_env_CFLAGS_VECTOR_set" = set; then
4453   CFLAGS_VECTOR=$ac_env_CFLAGS_VECTOR_value
4454 fi
4455
4456 # Some versions of GCC support some additional useful warning flags.
4457 # Check whether they are supported, and add them to CFLAGS if so.
4458 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
4459 # but has its own.  Also check other compiler-specific flags here.
4460
4461 if test "$GCC" = yes -a "$ICC" = no; then
4462   CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
4463   # These work in some but not all gcc versions
4464   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5
4465 $as_echo_n "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
4466 if ${pgac_cv_prog_cc_cflags__Wdeclaration_after_statement+:} false; then :
4467   $as_echo_n "(cached) " >&6
4468 else
4469   pgac_save_CFLAGS=$CFLAGS
4470 CFLAGS="$pgac_save_CFLAGS -Wdeclaration-after-statement"
4471 ac_save_c_werror_flag=$ac_c_werror_flag
4472 ac_c_werror_flag=yes
4473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4474 /* end confdefs.h.  */
4475
4476 int
4477 main ()
4478 {
4479
4480   ;
4481   return 0;
4482 }
4483 _ACEOF
4484 if ac_fn_c_try_compile "$LINENO"; then :
4485   pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=yes
4486 else
4487   pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=no
4488 fi
4489 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4490 ac_c_werror_flag=$ac_save_c_werror_flag
4491 CFLAGS="$pgac_save_CFLAGS"
4492 fi
4493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&5
4494 $as_echo "$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&6; }
4495 if test x"$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" = x"yes"; then
4496   CFLAGS="$CFLAGS -Wdeclaration-after-statement"
4497 fi
4498
4499   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wendif-labels" >&5
4500 $as_echo_n "checking whether $CC supports -Wendif-labels... " >&6; }
4501 if ${pgac_cv_prog_cc_cflags__Wendif_labels+:} false; then :
4502   $as_echo_n "(cached) " >&6
4503 else
4504   pgac_save_CFLAGS=$CFLAGS
4505 CFLAGS="$pgac_save_CFLAGS -Wendif-labels"
4506 ac_save_c_werror_flag=$ac_c_werror_flag
4507 ac_c_werror_flag=yes
4508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4509 /* end confdefs.h.  */
4510
4511 int
4512 main ()
4513 {
4514
4515   ;
4516   return 0;
4517 }
4518 _ACEOF
4519 if ac_fn_c_try_compile "$LINENO"; then :
4520   pgac_cv_prog_cc_cflags__Wendif_labels=yes
4521 else
4522   pgac_cv_prog_cc_cflags__Wendif_labels=no
4523 fi
4524 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4525 ac_c_werror_flag=$ac_save_c_werror_flag
4526 CFLAGS="$pgac_save_CFLAGS"
4527 fi
4528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wendif_labels" >&5
4529 $as_echo "$pgac_cv_prog_cc_cflags__Wendif_labels" >&6; }
4530 if test x"$pgac_cv_prog_cc_cflags__Wendif_labels" = x"yes"; then
4531   CFLAGS="$CFLAGS -Wendif-labels"
4532 fi
4533
4534   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wmissing-format-attribute" >&5
4535 $as_echo_n "checking whether $CC supports -Wmissing-format-attribute... " >&6; }
4536 if ${pgac_cv_prog_cc_cflags__Wmissing_format_attribute+:} false; then :
4537   $as_echo_n "(cached) " >&6
4538 else
4539   pgac_save_CFLAGS=$CFLAGS
4540 CFLAGS="$pgac_save_CFLAGS -Wmissing-format-attribute"
4541 ac_save_c_werror_flag=$ac_c_werror_flag
4542 ac_c_werror_flag=yes
4543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4544 /* end confdefs.h.  */
4545
4546 int
4547 main ()
4548 {
4549
4550   ;
4551   return 0;
4552 }
4553 _ACEOF
4554 if ac_fn_c_try_compile "$LINENO"; then :
4555   pgac_cv_prog_cc_cflags__Wmissing_format_attribute=yes
4556 else
4557   pgac_cv_prog_cc_cflags__Wmissing_format_attribute=no
4558 fi
4559 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4560 ac_c_werror_flag=$ac_save_c_werror_flag
4561 CFLAGS="$pgac_save_CFLAGS"
4562 fi
4563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wmissing_format_attribute" >&5
4564 $as_echo "$pgac_cv_prog_cc_cflags__Wmissing_format_attribute" >&6; }
4565 if test x"$pgac_cv_prog_cc_cflags__Wmissing_format_attribute" = x"yes"; then
4566   CFLAGS="$CFLAGS -Wmissing-format-attribute"
4567 fi
4568
4569   # This was included in -Wall/-Wformat in older GCC versions
4570   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wformat-security" >&5
4571 $as_echo_n "checking whether $CC supports -Wformat-security... " >&6; }
4572 if ${pgac_cv_prog_cc_cflags__Wformat_security+:} false; then :
4573   $as_echo_n "(cached) " >&6
4574 else
4575   pgac_save_CFLAGS=$CFLAGS
4576 CFLAGS="$pgac_save_CFLAGS -Wformat-security"
4577 ac_save_c_werror_flag=$ac_c_werror_flag
4578 ac_c_werror_flag=yes
4579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4580 /* end confdefs.h.  */
4581
4582 int
4583 main ()
4584 {
4585
4586   ;
4587   return 0;
4588 }
4589 _ACEOF
4590 if ac_fn_c_try_compile "$LINENO"; then :
4591   pgac_cv_prog_cc_cflags__Wformat_security=yes
4592 else
4593   pgac_cv_prog_cc_cflags__Wformat_security=no
4594 fi
4595 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4596 ac_c_werror_flag=$ac_save_c_werror_flag
4597 CFLAGS="$pgac_save_CFLAGS"
4598 fi
4599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wformat_security" >&5
4600 $as_echo "$pgac_cv_prog_cc_cflags__Wformat_security" >&6; }
4601 if test x"$pgac_cv_prog_cc_cflags__Wformat_security" = x"yes"; then
4602   CFLAGS="$CFLAGS -Wformat-security"
4603 fi
4604
4605   # Disable strict-aliasing rules; needed for gcc 3.3+
4606   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-strict-aliasing" >&5
4607 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4608 if ${pgac_cv_prog_cc_cflags__fno_strict_aliasing+:} false; then :
4609   $as_echo_n "(cached) " >&6
4610 else
4611   pgac_save_CFLAGS=$CFLAGS
4612 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4613 ac_save_c_werror_flag=$ac_c_werror_flag
4614 ac_c_werror_flag=yes
4615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4616 /* end confdefs.h.  */
4617
4618 int
4619 main ()
4620 {
4621
4622   ;
4623   return 0;
4624 }
4625 _ACEOF
4626 if ac_fn_c_try_compile "$LINENO"; then :
4627   pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4628 else
4629   pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4630 fi
4631 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4632 ac_c_werror_flag=$ac_save_c_werror_flag
4633 CFLAGS="$pgac_save_CFLAGS"
4634 fi
4635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4636 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4637 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4638   CFLAGS="$CFLAGS -fno-strict-aliasing"
4639 fi
4640
4641   # Disable optimizations that assume no overflow; needed for gcc 4.3+
4642   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fwrapv" >&5
4643 $as_echo_n "checking whether $CC supports -fwrapv... " >&6; }
4644 if ${pgac_cv_prog_cc_cflags__fwrapv+:} false; then :
4645   $as_echo_n "(cached) " >&6
4646 else
4647   pgac_save_CFLAGS=$CFLAGS
4648 CFLAGS="$pgac_save_CFLAGS -fwrapv"
4649 ac_save_c_werror_flag=$ac_c_werror_flag
4650 ac_c_werror_flag=yes
4651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4652 /* end confdefs.h.  */
4653
4654 int
4655 main ()
4656 {
4657
4658   ;
4659   return 0;
4660 }
4661 _ACEOF
4662 if ac_fn_c_try_compile "$LINENO"; then :
4663   pgac_cv_prog_cc_cflags__fwrapv=yes
4664 else
4665   pgac_cv_prog_cc_cflags__fwrapv=no
4666 fi
4667 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4668 ac_c_werror_flag=$ac_save_c_werror_flag
4669 CFLAGS="$pgac_save_CFLAGS"
4670 fi
4671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fwrapv" >&5
4672 $as_echo "$pgac_cv_prog_cc_cflags__fwrapv" >&6; }
4673 if test x"$pgac_cv_prog_cc_cflags__fwrapv" = x"yes"; then
4674   CFLAGS="$CFLAGS -fwrapv"
4675 fi
4676
4677   # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
4678   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fexcess-precision=standard" >&5
4679 $as_echo_n "checking whether $CC supports -fexcess-precision=standard... " >&6; }
4680 if ${pgac_cv_prog_cc_cflags__fexcess_precision_standard+:} false; then :
4681   $as_echo_n "(cached) " >&6
4682 else
4683   pgac_save_CFLAGS=$CFLAGS
4684 CFLAGS="$pgac_save_CFLAGS -fexcess-precision=standard"
4685 ac_save_c_werror_flag=$ac_c_werror_flag
4686 ac_c_werror_flag=yes
4687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4688 /* end confdefs.h.  */
4689
4690 int
4691 main ()
4692 {
4693
4694   ;
4695   return 0;
4696 }
4697 _ACEOF
4698 if ac_fn_c_try_compile "$LINENO"; then :
4699   pgac_cv_prog_cc_cflags__fexcess_precision_standard=yes
4700 else
4701   pgac_cv_prog_cc_cflags__fexcess_precision_standard=no
4702 fi
4703 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4704 ac_c_werror_flag=$ac_save_c_werror_flag
4705 CFLAGS="$pgac_save_CFLAGS"
4706 fi
4707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fexcess_precision_standard" >&5
4708 $as_echo "$pgac_cv_prog_cc_cflags__fexcess_precision_standard" >&6; }
4709 if test x"$pgac_cv_prog_cc_cflags__fexcess_precision_standard" = x"yes"; then
4710   CFLAGS="$CFLAGS -fexcess-precision=standard"
4711 fi
4712
4713   # Optimization flags for specific files that benefit from vectorization
4714   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -funroll-loops" >&5
4715 $as_echo_n "checking whether $CC supports -funroll-loops... " >&6; }
4716 if ${pgac_cv_prog_cc_cflags__funroll_loops+:} false; then :
4717   $as_echo_n "(cached) " >&6
4718 else
4719   pgac_save_CFLAGS=$CFLAGS
4720 CFLAGS="$pgac_save_CFLAGS -funroll-loops"
4721 ac_save_c_werror_flag=$ac_c_werror_flag
4722 ac_c_werror_flag=yes
4723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4724 /* end confdefs.h.  */
4725
4726 int
4727 main ()
4728 {
4729
4730   ;
4731   return 0;
4732 }
4733 _ACEOF
4734 if ac_fn_c_try_compile "$LINENO"; then :
4735   pgac_cv_prog_cc_cflags__funroll_loops=yes
4736 else
4737   pgac_cv_prog_cc_cflags__funroll_loops=no
4738 fi
4739 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4740 ac_c_werror_flag=$ac_save_c_werror_flag
4741 CFLAGS="$pgac_save_CFLAGS"
4742 fi
4743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__funroll_loops" >&5
4744 $as_echo "$pgac_cv_prog_cc_cflags__funroll_loops" >&6; }
4745 if test x"$pgac_cv_prog_cc_cflags__funroll_loops" = x"yes"; then
4746   CFLAGS_VECTOR="${CFLAGS_VECTOR} -funroll-loops"
4747 fi
4748
4749   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -ftree-vectorize" >&5
4750 $as_echo_n "checking whether $CC supports -ftree-vectorize... " >&6; }
4751 if ${pgac_cv_prog_cc_cflags__ftree_vectorize+:} false; then :
4752   $as_echo_n "(cached) " >&6
4753 else
4754   pgac_save_CFLAGS=$CFLAGS
4755 CFLAGS="$pgac_save_CFLAGS -ftree-vectorize"
4756 ac_save_c_werror_flag=$ac_c_werror_flag
4757 ac_c_werror_flag=yes
4758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4759 /* end confdefs.h.  */
4760
4761 int
4762 main ()
4763 {
4764
4765   ;
4766   return 0;
4767 }
4768 _ACEOF
4769 if ac_fn_c_try_compile "$LINENO"; then :
4770   pgac_cv_prog_cc_cflags__ftree_vectorize=yes
4771 else
4772   pgac_cv_prog_cc_cflags__ftree_vectorize=no
4773 fi
4774 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4775 ac_c_werror_flag=$ac_save_c_werror_flag
4776 CFLAGS="$pgac_save_CFLAGS"
4777 fi
4778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__ftree_vectorize" >&5
4779 $as_echo "$pgac_cv_prog_cc_cflags__ftree_vectorize" >&6; }
4780 if test x"$pgac_cv_prog_cc_cflags__ftree_vectorize" = x"yes"; then
4781   CFLAGS_VECTOR="${CFLAGS_VECTOR} -ftree-vectorize"
4782 fi
4783
4784   # We want to suppress clang's unhelpful unused-command-line-argument warnings
4785   # but gcc won't complain about unrecognized -Wno-foo switches, so we have to
4786   # test for the positive form and if that works, add the negative form
4787   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wunused-command-line-argument" >&5
4788 $as_echo_n "checking whether $CC supports -Wunused-command-line-argument... " >&6; }
4789 if ${pgac_cv_prog_cc_cflags__Wunused_command_line_argument+:} false; then :
4790   $as_echo_n "(cached) " >&6
4791 else
4792   pgac_save_CFLAGS=$CFLAGS
4793 CFLAGS="$pgac_save_CFLAGS -Wunused-command-line-argument"
4794 ac_save_c_werror_flag=$ac_c_werror_flag
4795 ac_c_werror_flag=yes
4796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4797 /* end confdefs.h.  */
4798
4799 int
4800 main ()
4801 {
4802
4803   ;
4804   return 0;
4805 }
4806 _ACEOF
4807 if ac_fn_c_try_compile "$LINENO"; then :
4808   pgac_cv_prog_cc_cflags__Wunused_command_line_argument=yes
4809 else
4810   pgac_cv_prog_cc_cflags__Wunused_command_line_argument=no
4811 fi
4812 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4813 ac_c_werror_flag=$ac_save_c_werror_flag
4814 CFLAGS="$pgac_save_CFLAGS"
4815 fi
4816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wunused_command_line_argument" >&5
4817 $as_echo "$pgac_cv_prog_cc_cflags__Wunused_command_line_argument" >&6; }
4818 if test x"$pgac_cv_prog_cc_cflags__Wunused_command_line_argument" = x"yes"; then
4819   NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
4820 fi
4821
4822   if test -n "$NOT_THE_CFLAGS"; then
4823     CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
4824   fi
4825 elif test "$ICC" = yes; then
4826   # Intel's compiler has a bug/misoptimization in checking for
4827   # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
4828   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mp1" >&5
4829 $as_echo_n "checking whether $CC supports -mp1... " >&6; }
4830 if ${pgac_cv_prog_cc_cflags__mp1+:} false; then :
4831   $as_echo_n "(cached) " >&6
4832 else
4833   pgac_save_CFLAGS=$CFLAGS
4834 CFLAGS="$pgac_save_CFLAGS -mp1"
4835 ac_save_c_werror_flag=$ac_c_werror_flag
4836 ac_c_werror_flag=yes
4837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4838 /* end confdefs.h.  */
4839
4840 int
4841 main ()
4842 {
4843
4844   ;
4845   return 0;
4846 }
4847 _ACEOF
4848 if ac_fn_c_try_compile "$LINENO"; then :
4849   pgac_cv_prog_cc_cflags__mp1=yes
4850 else
4851   pgac_cv_prog_cc_cflags__mp1=no
4852 fi
4853 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4854 ac_c_werror_flag=$ac_save_c_werror_flag
4855 CFLAGS="$pgac_save_CFLAGS"
4856 fi
4857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__mp1" >&5
4858 $as_echo "$pgac_cv_prog_cc_cflags__mp1" >&6; }
4859 if test x"$pgac_cv_prog_cc_cflags__mp1" = x"yes"; then
4860   CFLAGS="$CFLAGS -mp1"
4861 fi
4862
4863   # Make sure strict aliasing is off (though this is said to be the default)
4864   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-strict-aliasing" >&5
4865 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4866 if ${pgac_cv_prog_cc_cflags__fno_strict_aliasing+:} false; then :
4867   $as_echo_n "(cached) " >&6
4868 else
4869   pgac_save_CFLAGS=$CFLAGS
4870 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4871 ac_save_c_werror_flag=$ac_c_werror_flag
4872 ac_c_werror_flag=yes
4873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4874 /* end confdefs.h.  */
4875
4876 int
4877 main ()
4878 {
4879
4880   ;
4881   return 0;
4882 }
4883 _ACEOF
4884 if ac_fn_c_try_compile "$LINENO"; then :
4885   pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4886 else
4887   pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4888 fi
4889 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4890 ac_c_werror_flag=$ac_save_c_werror_flag
4891 CFLAGS="$pgac_save_CFLAGS"
4892 fi
4893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4894 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4895 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4896   CFLAGS="$CFLAGS -fno-strict-aliasing"
4897 fi
4898
4899 elif test "$PORTNAME" = "aix"; then
4900   # AIX's xlc has to have strict aliasing turned off too
4901   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -qnoansialias" >&5
4902 $as_echo_n "checking whether $CC supports -qnoansialias... " >&6; }
4903 if ${pgac_cv_prog_cc_cflags__qnoansialias+:} false; then :
4904   $as_echo_n "(cached) " >&6
4905 else
4906   pgac_save_CFLAGS=$CFLAGS
4907 CFLAGS="$pgac_save_CFLAGS -qnoansialias"
4908 ac_save_c_werror_flag=$ac_c_werror_flag
4909 ac_c_werror_flag=yes
4910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4911 /* end confdefs.h.  */
4912
4913 int
4914 main ()
4915 {
4916
4917   ;
4918   return 0;
4919 }
4920 _ACEOF
4921 if ac_fn_c_try_compile "$LINENO"; then :
4922   pgac_cv_prog_cc_cflags__qnoansialias=yes
4923 else
4924   pgac_cv_prog_cc_cflags__qnoansialias=no
4925 fi
4926 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4927 ac_c_werror_flag=$ac_save_c_werror_flag
4928 CFLAGS="$pgac_save_CFLAGS"
4929 fi
4930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__qnoansialias" >&5
4931 $as_echo "$pgac_cv_prog_cc_cflags__qnoansialias" >&6; }
4932 if test x"$pgac_cv_prog_cc_cflags__qnoansialias" = x"yes"; then
4933   CFLAGS="$CFLAGS -qnoansialias"
4934 fi
4935
4936   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -qlonglong" >&5
4937 $as_echo_n "checking whether $CC supports -qlonglong... " >&6; }
4938 if ${pgac_cv_prog_cc_cflags__qlonglong+:} false; then :
4939   $as_echo_n "(cached) " >&6
4940 else
4941   pgac_save_CFLAGS=$CFLAGS
4942 CFLAGS="$pgac_save_CFLAGS -qlonglong"
4943 ac_save_c_werror_flag=$ac_c_werror_flag
4944 ac_c_werror_flag=yes
4945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4946 /* end confdefs.h.  */
4947
4948 int
4949 main ()
4950 {
4951
4952   ;
4953   return 0;
4954 }
4955 _ACEOF
4956 if ac_fn_c_try_compile "$LINENO"; then :
4957   pgac_cv_prog_cc_cflags__qlonglong=yes
4958 else
4959   pgac_cv_prog_cc_cflags__qlonglong=no
4960 fi
4961 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4962 ac_c_werror_flag=$ac_save_c_werror_flag
4963 CFLAGS="$pgac_save_CFLAGS"
4964 fi
4965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__qlonglong" >&5
4966 $as_echo "$pgac_cv_prog_cc_cflags__qlonglong" >&6; }
4967 if test x"$pgac_cv_prog_cc_cflags__qlonglong" = x"yes"; then
4968   CFLAGS="$CFLAGS -qlonglong"
4969 fi
4970
4971 elif test "$PORTNAME" = "hpux"; then
4972   # On some versions of HP-UX, libm functions do not set errno by default.
4973   # Fix that by using +Olibmerrno if the compiler recognizes it.
4974   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports +Olibmerrno" >&5
4975 $as_echo_n "checking whether $CC supports +Olibmerrno... " >&6; }
4976 if ${pgac_cv_prog_cc_cflags_pOlibmerrno+:} false; then :
4977   $as_echo_n "(cached) " >&6
4978 else
4979   pgac_save_CFLAGS=$CFLAGS
4980 CFLAGS="$pgac_save_CFLAGS +Olibmerrno"
4981 ac_save_c_werror_flag=$ac_c_werror_flag
4982 ac_c_werror_flag=yes
4983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4984 /* end confdefs.h.  */
4985
4986 int
4987 main ()
4988 {
4989
4990   ;
4991   return 0;
4992 }
4993 _ACEOF
4994 if ac_fn_c_try_compile "$LINENO"; then :
4995   pgac_cv_prog_cc_cflags_pOlibmerrno=yes
4996 else
4997   pgac_cv_prog_cc_cflags_pOlibmerrno=no
4998 fi
4999 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5000 ac_c_werror_flag=$ac_save_c_werror_flag
5001 CFLAGS="$pgac_save_CFLAGS"
5002 fi
5003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags_pOlibmerrno" >&5
5004 $as_echo "$pgac_cv_prog_cc_cflags_pOlibmerrno" >&6; }
5005 if test x"$pgac_cv_prog_cc_cflags_pOlibmerrno" = x"yes"; then
5006   CFLAGS="$CFLAGS +Olibmerrno"
5007 fi
5008
5009 fi
5010
5011 CFLAGS_VECTOR=$CFLAGS_VECTOR
5012
5013
5014 # supply -g if --enable-debug
5015 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
5016   CFLAGS="$CFLAGS -g"
5017 fi
5018
5019 # enable code coverage if --enable-coverage
5020 if test "$enable_coverage" = yes; then
5021   if test "$GCC" = yes; then
5022     CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
5023   else
5024     as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
5025   fi
5026 fi
5027
5028 # enable profiling if --enable-profiling
5029 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
5030   if test "$GCC" = yes; then
5031
5032 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
5033
5034     CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
5035   else
5036     as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
5037   fi
5038 fi
5039
5040 # We already have this in Makefile.win32, but configure needs it too
5041 if test "$PORTNAME" = "win32"; then
5042   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
5043 fi
5044
5045 # Now that we're done automatically adding stuff to CFLAGS, put back the
5046 # user-specified flags (if any) at the end.  This lets users override
5047 # the automatic additions.
5048 CFLAGS="$CFLAGS $user_CFLAGS"
5049
5050 # Check if the compiler still works with the final flag settings
5051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
5052 $as_echo_n "checking whether the C compiler still works... " >&6; }
5053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5054 /* end confdefs.h.  */
5055
5056 int
5057 main ()
5058 {
5059 return 0;
5060   ;
5061   return 0;
5062 }
5063 _ACEOF
5064 if ac_fn_c_try_link "$LINENO"; then :
5065   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5066 $as_echo "yes" >&6; }
5067 else
5068   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5069 $as_echo "no" >&6; }
5070    as_fn_error $? "cannot proceed" "$LINENO" 5
5071 fi
5072 rm -f core conftest.err conftest.$ac_objext \
5073     conftest$ac_exeext conftest.$ac_ext
5074
5075 # Defend against gcc -ffast-math
5076 if test "$GCC" = yes; then
5077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5078 /* end confdefs.h.  */
5079
5080 int
5081 main ()
5082 {
5083 #ifdef __FAST_MATH__
5084 choke me
5085 #endif
5086   ;
5087   return 0;
5088 }
5089 _ACEOF
5090 if ac_fn_c_try_compile "$LINENO"; then :
5091
5092 else
5093   as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
5094 fi
5095 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5096 fi
5097
5098 ac_ext=c
5099 ac_cpp='$CPP $CPPFLAGS'
5100 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5101 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5102 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5104 $as_echo_n "checking how to run the C preprocessor... " >&6; }
5105 # On Suns, sometimes $CPP names a directory.
5106 if test -n "$CPP" && test -d "$CPP"; then
5107   CPP=
5108 fi
5109 if test -z "$CPP"; then
5110   if ${ac_cv_prog_CPP+:} false; then :
5111   $as_echo_n "(cached) " >&6
5112 else
5113       # Double quotes because CPP needs to be expanded
5114     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5115     do
5116       ac_preproc_ok=false
5117 for ac_c_preproc_warn_flag in '' yes
5118 do
5119   # Use a header file that comes with gcc, so configuring glibc
5120   # with a fresh cross-compiler works.
5121   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5122   # <limits.h> exists even on freestanding compilers.
5123   # On the NeXT, cc -E runs the code through the compiler's parser,
5124   # not just through cpp. "Syntax error" is here to catch this case.
5125   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5126 /* end confdefs.h.  */
5127 #ifdef __STDC__
5128 # include <limits.h>
5129 #else
5130 # include <assert.h>
5131 #endif
5132                      Syntax error
5133 _ACEOF
5134 if ac_fn_c_try_cpp "$LINENO"; then :
5135
5136 else
5137   # Broken: fails on valid input.
5138 continue
5139 fi
5140 rm -f conftest.err conftest.i conftest.$ac_ext
5141
5142   # OK, works on sane cases.  Now check whether nonexistent headers
5143   # can be detected and how.
5144   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5145 /* end confdefs.h.  */
5146 #include <ac_nonexistent.h>
5147 _ACEOF
5148 if ac_fn_c_try_cpp "$LINENO"; then :
5149   # Broken: success on invalid input.
5150 continue
5151 else
5152   # Passes both tests.
5153 ac_preproc_ok=:
5154 break
5155 fi
5156 rm -f conftest.err conftest.i conftest.$ac_ext
5157
5158 done
5159 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5160 rm -f conftest.i conftest.err conftest.$ac_ext
5161 if $ac_preproc_ok; then :
5162   break
5163 fi
5164
5165     done
5166     ac_cv_prog_CPP=$CPP
5167
5168 fi
5169   CPP=$ac_cv_prog_CPP
5170 else
5171   ac_cv_prog_CPP=$CPP
5172 fi
5173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5174 $as_echo "$CPP" >&6; }
5175 ac_preproc_ok=false
5176 for ac_c_preproc_warn_flag in '' yes
5177 do
5178   # Use a header file that comes with gcc, so configuring glibc
5179   # with a fresh cross-compiler works.
5180   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5181   # <limits.h> exists even on freestanding compilers.
5182   # On the NeXT, cc -E runs the code through the compiler's parser,
5183   # not just through cpp. "Syntax error" is here to catch this case.
5184   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5185 /* end confdefs.h.  */
5186 #ifdef __STDC__
5187 # include <limits.h>
5188 #else
5189 # include <assert.h>
5190 #endif
5191                      Syntax error
5192 _ACEOF
5193 if ac_fn_c_try_cpp "$LINENO"; then :
5194
5195 else
5196   # Broken: fails on valid input.
5197 continue
5198 fi
5199 rm -f conftest.err conftest.i conftest.$ac_ext
5200
5201   # OK, works on sane cases.  Now check whether nonexistent headers
5202   # can be detected and how.
5203   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5204 /* end confdefs.h.  */
5205 #include <ac_nonexistent.h>
5206 _ACEOF
5207 if ac_fn_c_try_cpp "$LINENO"; then :
5208   # Broken: success on invalid input.
5209 continue
5210 else
5211   # Passes both tests.
5212 ac_preproc_ok=:
5213 break
5214 fi
5215 rm -f conftest.err conftest.i conftest.$ac_ext
5216
5217 done
5218 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5219 rm -f conftest.i conftest.err conftest.$ac_ext
5220 if $ac_preproc_ok; then :
5221
5222 else
5223   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5224 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5225 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5226 See \`config.log' for more details" "$LINENO" 5; }
5227 fi
5228
5229 ac_ext=c
5230 ac_cpp='$CPP $CPPFLAGS'
5231 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5232 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5233 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5234
5235
5236
5237
5238 #
5239 # Set up TAS assembly code if needed; the template file has now had its
5240 # chance to request this.
5241 #
5242 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
5243
5244
5245 if test "$need_tas" = yes ; then
5246   TAS=tas.o
5247 else
5248   TAS=""
5249 fi
5250
5251
5252
5253 #
5254 # Automatic dependency tracking
5255 #
5256
5257
5258 # Check whether --enable-depend was given.
5259 if test "${enable_depend+set}" = set; then :
5260   enableval=$enable_depend;
5261   case $enableval in
5262     yes)
5263       autodepend=yes
5264       ;;
5265     no)
5266       :
5267       ;;
5268     *)
5269       as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
5270       ;;
5271   esac
5272
5273 else
5274   enable_depend=no
5275
5276 fi
5277
5278
5279
5280
5281
5282 #
5283 # Enable assert checks
5284 #
5285
5286
5287 # Check whether --enable-cassert was given.
5288 if test "${enable_cassert+set}" = set; then :
5289   enableval=$enable_cassert;
5290   case $enableval in
5291     yes)
5292
5293 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
5294
5295       ;;
5296     no)
5297       :
5298       ;;
5299     *)
5300       as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
5301       ;;
5302   esac
5303
5304 else
5305   enable_cassert=no
5306
5307 fi
5308
5309
5310
5311
5312 #
5313 # Include directories
5314 #
5315 ac_save_IFS=$IFS
5316 IFS="${IFS}${PATH_SEPARATOR}"
5317 # SRCH_INC comes from the template file
5318 for dir in $with_includes $SRCH_INC; do
5319   if test -d "$dir"; then
5320     INCLUDES="$INCLUDES -I$dir"
5321   else
5322     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
5323 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
5324   fi
5325 done
5326 IFS=$ac_save_IFS
5327
5328
5329
5330 #
5331 # Library directories
5332 #
5333 ac_save_IFS=$IFS
5334 IFS="${IFS}${PATH_SEPARATOR}"
5335 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
5336 for dir in $LIBRARY_DIRS $SRCH_LIB; do
5337   if test -d "$dir"; then
5338     LIBDIRS="$LIBDIRS -L$dir"
5339   else
5340     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
5341 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
5342   fi
5343 done
5344 IFS=$ac_save_IFS
5345
5346 #
5347 # Enable thread-safe client libraries
5348 #
5349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
5350 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
5351
5352
5353 # Check whether --enable-thread-safety was given.
5354 if test "${enable_thread_safety+set}" = set; then :
5355   enableval=$enable_thread_safety;
5356   case $enableval in
5357     yes)
5358       :
5359       ;;
5360     no)
5361       :
5362       ;;
5363     *)
5364       as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
5365       ;;
5366   esac
5367
5368 else
5369   enable_thread_safety=yes
5370
5371 fi
5372
5373
5374 if test "$enable_thread_safety" = yes; then
5375
5376 $as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
5377
5378 fi
5379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
5380 $as_echo "$enable_thread_safety" >&6; }
5381
5382
5383 #
5384 # ICU
5385 #
5386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ICU support" >&5
5387 $as_echo_n "checking whether to build with ICU support... " >&6; }
5388
5389
5390
5391 # Check whether --with-icu was given.
5392 if test "${with_icu+set}" = set; then :
5393   withval=$with_icu;
5394   case $withval in
5395     yes)
5396
5397 $as_echo "#define USE_ICU 1" >>confdefs.h
5398
5399       ;;
5400     no)
5401       :
5402       ;;
5403     *)
5404       as_fn_error $? "no argument expected for --with-icu option" "$LINENO" 5
5405       ;;
5406   esac
5407
5408 else
5409   with_icu=no
5410
5411 fi
5412
5413
5414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icu" >&5
5415 $as_echo "$with_icu" >&6; }
5416
5417
5418 if test "$with_icu" = yes; then
5419
5420
5421
5422
5423
5424
5425
5426 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
5427         if test -n "$ac_tool_prefix"; then
5428   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
5429 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
5430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5431 $as_echo_n "checking for $ac_word... " >&6; }
5432 if ${ac_cv_path_PKG_CONFIG+:} false; then :
5433   $as_echo_n "(cached) " >&6
5434 else
5435   case $PKG_CONFIG in
5436   [\\/]* | ?:[\\/]*)
5437   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
5438   ;;
5439   *)
5440   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5441 for as_dir in $PATH
5442 do
5443   IFS=$as_save_IFS
5444   test -z "$as_dir" && as_dir=.
5445     for ac_exec_ext in '' $ac_executable_extensions; do
5446   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5447     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5448     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5449     break 2
5450   fi
5451 done
5452   done
5453 IFS=$as_save_IFS
5454
5455   ;;
5456 esac
5457 fi
5458 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
5459 if test -n "$PKG_CONFIG"; then
5460   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
5461 $as_echo "$PKG_CONFIG" >&6; }
5462 else
5463   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5464 $as_echo "no" >&6; }
5465 fi
5466
5467
5468 fi
5469 if test -z "$ac_cv_path_PKG_CONFIG"; then
5470   ac_pt_PKG_CONFIG=$PKG_CONFIG
5471   # Extract the first word of "pkg-config", so it can be a program name with args.
5472 set dummy pkg-config; ac_word=$2
5473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5474 $as_echo_n "checking for $ac_word... " >&6; }
5475 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
5476   $as_echo_n "(cached) " >&6
5477 else
5478   case $ac_pt_PKG_CONFIG in
5479   [\\/]* | ?:[\\/]*)
5480   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
5481   ;;
5482   *)
5483   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5484 for as_dir in $PATH
5485 do
5486   IFS=$as_save_IFS
5487   test -z "$as_dir" && as_dir=.
5488     for ac_exec_ext in '' $ac_executable_extensions; do
5489   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5490     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5491     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5492     break 2
5493   fi
5494 done
5495   done
5496 IFS=$as_save_IFS
5497
5498   ;;
5499 esac
5500 fi
5501 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
5502 if test -n "$ac_pt_PKG_CONFIG"; then
5503   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
5504 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
5505 else
5506   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5507 $as_echo "no" >&6; }
5508 fi
5509
5510   if test "x$ac_pt_PKG_CONFIG" = x; then
5511     PKG_CONFIG=""
5512   else
5513     case $cross_compiling:$ac_tool_warned in
5514 yes:)
5515 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5516 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5517 ac_tool_warned=yes ;;
5518 esac
5519     PKG_CONFIG=$ac_pt_PKG_CONFIG
5520   fi
5521 else
5522   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
5523 fi
5524
5525 fi
5526 if test -n "$PKG_CONFIG"; then
5527         _pkg_min_version=0.9.0
5528         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
5529 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
5530         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
5531                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5532 $as_echo "yes" >&6; }
5533         else
5534                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5535 $as_echo "no" >&6; }
5536                 PKG_CONFIG=""
5537         fi
5538 fi
5539
5540 pkg_failed=no
5541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5
5542 $as_echo_n "checking for icu-uc icu-i18n... " >&6; }
5543
5544 if test -n "$ICU_CFLAGS"; then
5545     pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
5546  elif test -n "$PKG_CONFIG"; then
5547     if test -n "$PKG_CONFIG" && \
5548     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
5549   ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
5550   ac_status=$?
5551   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5552   test $ac_status = 0; }; then
5553   pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc icu-i18n" 2>/dev/null`
5554                       test "x$?" != "x0" && pkg_failed=yes
5555 else
5556   pkg_failed=yes
5557 fi
5558  else
5559     pkg_failed=untried
5560 fi
5561 if test -n "$ICU_LIBS"; then
5562     pkg_cv_ICU_LIBS="$ICU_LIBS"
5563  elif test -n "$PKG_CONFIG"; then
5564     if test -n "$PKG_CONFIG" && \
5565     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
5566   ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
5567   ac_status=$?
5568   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5569   test $ac_status = 0; }; then
5570   pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc icu-i18n" 2>/dev/null`
5571                       test "x$?" != "x0" && pkg_failed=yes
5572 else
5573   pkg_failed=yes
5574 fi
5575  else
5576     pkg_failed=untried
5577 fi
5578
5579
5580
5581 if test $pkg_failed = yes; then
5582         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5583 $as_echo "no" >&6; }
5584
5585 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
5586         _pkg_short_errors_supported=yes
5587 else
5588         _pkg_short_errors_supported=no
5589 fi
5590         if test $_pkg_short_errors_supported = yes; then
5591                 ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
5592         else
5593                 ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
5594         fi
5595         # Put the nasty error message in config.log where it belongs
5596         echo "$ICU_PKG_ERRORS" >&5
5597
5598         as_fn_error $? "Package requirements (icu-uc icu-i18n) were not met:
5599
5600 $ICU_PKG_ERRORS
5601
5602 Consider adjusting the PKG_CONFIG_PATH environment variable if you
5603 installed software in a non-standard prefix.
5604
5605 Alternatively, you may set the environment variables ICU_CFLAGS
5606 and ICU_LIBS to avoid the need to call pkg-config.
5607 See the pkg-config man page for more details." "$LINENO" 5
5608 elif test $pkg_failed = untried; then
5609         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5610 $as_echo "no" >&6; }
5611         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5612 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5613 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
5614 is in your PATH or set the PKG_CONFIG environment variable to the full
5615 path to pkg-config.
5616
5617 Alternatively, you may set the environment variables ICU_CFLAGS
5618 and ICU_LIBS to avoid the need to call pkg-config.
5619 See the pkg-config man page for more details.
5620
5621 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
5622 See \`config.log' for more details" "$LINENO" 5; }
5623 else
5624         ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
5625         ICU_LIBS=$pkg_cv_ICU_LIBS
5626         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5627 $as_echo "yes" >&6; }
5628
5629 fi
5630 fi
5631
5632 #
5633 # Optionally build Tcl modules (PL/Tcl)
5634 #
5635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
5636 $as_echo_n "checking whether to build with Tcl... " >&6; }
5637
5638
5639
5640 # Check whether --with-tcl was given.
5641 if test "${with_tcl+set}" = set; then :
5642   withval=$with_tcl;
5643   case $withval in
5644     yes)
5645       :
5646       ;;
5647     no)
5648       :
5649       ;;
5650     *)
5651       as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
5652       ;;
5653   esac
5654
5655 else
5656   with_tcl=no
5657
5658 fi
5659
5660
5661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
5662 $as_echo "$with_tcl" >&6; }
5663
5664
5665 # We see if the path to the Tcl/Tk configuration scripts is specified.
5666 # This will override the use of tclsh to find the paths to search.
5667
5668
5669
5670
5671 # Check whether --with-tclconfig was given.
5672 if test "${with_tclconfig+set}" = set; then :
5673   withval=$with_tclconfig;
5674   case $withval in
5675     yes)
5676       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
5677       ;;
5678     no)
5679       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
5680       ;;
5681     *)
5682
5683       ;;
5684   esac
5685
5686 fi
5687
5688
5689
5690 #
5691 # Optionally build Perl modules (PL/Perl)
5692 #
5693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
5694 $as_echo_n "checking whether to build Perl modules... " >&6; }
5695
5696
5697
5698 # Check whether --with-perl was given.
5699 if test "${with_perl+set}" = set; then :
5700   withval=$with_perl;
5701   case $withval in
5702     yes)
5703       :
5704       ;;
5705     no)
5706       :
5707       ;;
5708     *)
5709       as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
5710       ;;
5711   esac
5712
5713 else
5714   with_perl=no
5715
5716 fi
5717
5718
5719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
5720 $as_echo "$with_perl" >&6; }
5721
5722
5723 #
5724 # Optionally build Python modules (PL/Python)
5725 #
5726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
5727 $as_echo_n "checking whether to build Python modules... " >&6; }
5728
5729
5730
5731 # Check whether --with-python was given.
5732 if test "${with_python+set}" = set; then :
5733   withval=$with_python;
5734   case $withval in
5735     yes)
5736       :
5737       ;;
5738     no)
5739       :
5740       ;;
5741     *)
5742       as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
5743       ;;
5744   esac
5745
5746 else
5747   with_python=no
5748
5749 fi
5750
5751
5752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
5753 $as_echo "$with_python" >&6; }
5754
5755
5756 #
5757 # GSSAPI
5758 #
5759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
5760 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
5761
5762
5763
5764 # Check whether --with-gssapi was given.
5765 if test "${with_gssapi+set}" = set; then :
5766   withval=$with_gssapi;
5767   case $withval in
5768     yes)
5769
5770
5771 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
5772
5773   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
5774
5775       ;;
5776     no)
5777       :
5778       ;;
5779     *)
5780       as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
5781       ;;
5782   esac
5783
5784 else
5785   with_gssapi=no
5786
5787 fi
5788
5789
5790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
5791 $as_echo "$with_gssapi" >&6; }
5792
5793
5794
5795
5796
5797 #
5798 # Kerberos configuration parameters
5799 #
5800
5801
5802
5803 # Check whether --with-krb-srvnam was given.
5804 if test "${with_krb_srvnam+set}" = set; then :
5805   withval=$with_krb_srvnam;
5806   case $withval in
5807     yes)
5808       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
5809       ;;
5810     no)
5811       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
5812       ;;
5813     *)
5814
5815       ;;
5816   esac
5817
5818 else
5819   with_krb_srvnam="postgres"
5820 fi
5821
5822
5823
5824 cat >>confdefs.h <<_ACEOF
5825 #define PG_KRB_SRVNAM "$with_krb_srvnam"
5826 _ACEOF
5827
5828
5829
5830 #
5831 # PAM
5832 #
5833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
5834 $as_echo_n "checking whether to build with PAM support... " >&6; }
5835
5836
5837
5838 # Check whether --with-pam was given.
5839 if test "${with_pam+set}" = set; then :
5840   withval=$with_pam;
5841   case $withval in
5842     yes)
5843
5844 $as_echo "#define USE_PAM 1" >>confdefs.h
5845
5846       ;;
5847     no)
5848       :
5849       ;;
5850     *)
5851       as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
5852       ;;
5853   esac
5854
5855 else
5856   with_pam=no
5857
5858 fi
5859
5860
5861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
5862 $as_echo "$with_pam" >&6; }
5863
5864
5865 #
5866 # BSD AUTH
5867 #
5868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
5869 $as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
5870
5871
5872
5873 # Check whether --with-bsd-auth was given.
5874 if test "${with_bsd_auth+set}" = set; then :
5875   withval=$with_bsd_auth;
5876   case $withval in
5877     yes)
5878
5879 $as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
5880
5881       ;;
5882     no)
5883       :
5884       ;;
5885     *)
5886       as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
5887       ;;
5888   esac
5889
5890 else
5891   with_bsd_auth=no
5892
5893 fi
5894
5895
5896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
5897 $as_echo "$with_bsd_auth" >&6; }
5898
5899
5900 #
5901 # LDAP
5902 #
5903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
5904 $as_echo_n "checking whether to build with LDAP support... " >&6; }
5905
5906
5907
5908 # Check whether --with-ldap was given.
5909 if test "${with_ldap+set}" = set; then :
5910   withval=$with_ldap;
5911   case $withval in
5912     yes)
5913
5914 $as_echo "#define USE_LDAP 1" >>confdefs.h
5915
5916       ;;
5917     no)
5918       :
5919       ;;
5920     *)
5921       as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
5922       ;;
5923   esac
5924
5925 else
5926   with_ldap=no
5927
5928 fi
5929
5930
5931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
5932 $as_echo "$with_ldap" >&6; }
5933
5934
5935 #
5936 # Bonjour
5937 #
5938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
5939 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
5940
5941
5942
5943 # Check whether --with-bonjour was given.
5944 if test "${with_bonjour+set}" = set; then :
5945   withval=$with_bonjour;
5946   case $withval in
5947     yes)
5948
5949 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
5950
5951       ;;
5952     no)
5953       :
5954       ;;
5955     *)
5956       as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
5957       ;;
5958   esac
5959
5960 else
5961   with_bonjour=no
5962
5963 fi
5964
5965
5966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
5967 $as_echo "$with_bonjour" >&6; }
5968
5969
5970 #
5971 # OpenSSL
5972 #
5973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with OpenSSL support" >&5
5974 $as_echo_n "checking whether to build with OpenSSL support... " >&6; }
5975
5976
5977
5978 # Check whether --with-openssl was given.
5979 if test "${with_openssl+set}" = set; then :
5980   withval=$with_openssl;
5981   case $withval in
5982     yes)
5983
5984 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
5985
5986       ;;
5987     no)
5988       :
5989       ;;
5990     *)
5991       as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
5992       ;;
5993   esac
5994
5995 else
5996   with_openssl=no
5997
5998 fi
5999
6000
6001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_openssl" >&5
6002 $as_echo "$with_openssl" >&6; }
6003
6004
6005 #
6006 # SELinux
6007 #
6008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
6009 $as_echo_n "checking whether to build with SELinux support... " >&6; }
6010
6011
6012
6013 # Check whether --with-selinux was given.
6014 if test "${with_selinux+set}" = set; then :
6015   withval=$with_selinux;
6016   case $withval in
6017     yes)
6018       :
6019       ;;
6020     no)
6021       :
6022       ;;
6023     *)
6024       as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
6025       ;;
6026   esac
6027
6028 else
6029   with_selinux=no
6030
6031 fi
6032
6033
6034
6035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
6036 $as_echo "$with_selinux" >&6; }
6037
6038 #
6039 # Systemd
6040 #
6041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
6042 $as_echo_n "checking whether to build with systemd support... " >&6; }
6043
6044
6045
6046 # Check whether --with-systemd was given.
6047 if test "${with_systemd+set}" = set; then :
6048   withval=$with_systemd;
6049   case $withval in
6050     yes)
6051
6052 $as_echo "#define USE_SYSTEMD 1" >>confdefs.h
6053
6054       ;;
6055     no)
6056       :
6057       ;;
6058     *)
6059       as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
6060       ;;
6061   esac
6062
6063 else
6064   with_systemd=no
6065
6066 fi
6067
6068
6069
6070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
6071 $as_echo "$with_systemd" >&6; }
6072
6073 #
6074 # Readline
6075 #
6076
6077
6078
6079 # Check whether --with-readline was given.
6080 if test "${with_readline+set}" = set; then :
6081   withval=$with_readline;
6082   case $withval in
6083     yes)
6084       :
6085       ;;
6086     no)
6087       :
6088       ;;
6089     *)
6090       as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
6091       ;;
6092   esac
6093
6094 else
6095   with_readline=yes
6096
6097 fi
6098
6099
6100 # readline on MinGW has problems with backslashes in psql and other bugs.
6101 # This is particularly a problem with non-US code pages.
6102 # Therefore disable its use until we understand the cause. 2004-07-20
6103 if test "$PORTNAME" = "win32"; then
6104   if test "$with_readline" = yes; then
6105     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
6106 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
6107     with_readline=no
6108   fi
6109 fi
6110
6111
6112 #
6113 # Prefer libedit
6114 #
6115
6116
6117
6118 # Check whether --with-libedit-preferred was given.
6119 if test "${with_libedit_preferred+set}" = set; then :
6120   withval=$with_libedit_preferred;
6121   case $withval in
6122     yes)
6123       :
6124       ;;
6125     no)
6126       :
6127       ;;
6128     *)
6129       as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
6130       ;;
6131   esac
6132
6133 else
6134   with_libedit_preferred=no
6135
6136 fi
6137
6138
6139
6140
6141 #
6142 # UUID library
6143 #
6144 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
6145 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
6146 # UUID library.  More than one of these might be present on a given platform,
6147 # so we make the user say which one she wants.
6148 #
6149
6150
6151
6152 # Check whether --with-uuid was given.
6153 if test "${with_uuid+set}" = set; then :
6154   withval=$with_uuid;
6155   case $withval in
6156     yes)
6157       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
6158       ;;
6159     no)
6160       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
6161       ;;
6162     *)
6163
6164       ;;
6165   esac
6166
6167 fi
6168
6169
6170 if test x"$with_uuid" = x"" ; then
6171   with_uuid=no
6172 fi
6173
6174
6175
6176 # Check whether --with-ossp-uuid was given.
6177 if test "${with_ossp_uuid+set}" = set; then :
6178   withval=$with_ossp_uuid;
6179   case $withval in
6180     yes)
6181       :
6182       ;;
6183     no)
6184       :
6185       ;;
6186     *)
6187       as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
6188       ;;
6189   esac
6190
6191 else
6192   with_ossp_uuid=no
6193
6194 fi
6195
6196
6197 if test "$with_ossp_uuid" = yes ; then
6198   with_uuid=ossp
6199 fi
6200
6201 if test "$with_uuid" = bsd ; then
6202
6203 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
6204
6205   UUID_EXTRA_OBJS="md5.o sha1.o"
6206 elif test "$with_uuid" = e2fs ; then
6207
6208 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
6209
6210   UUID_EXTRA_OBJS="md5.o sha1.o"
6211 elif test "$with_uuid" = ossp ; then
6212
6213 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
6214
6215   UUID_EXTRA_OBJS=""
6216 elif test "$with_uuid" = no ; then
6217   UUID_EXTRA_OBJS=""
6218 else
6219   as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
6220 fi
6221
6222
6223
6224
6225 #
6226 # XML
6227 #
6228
6229
6230
6231 # Check whether --with-libxml was given.
6232 if test "${with_libxml+set}" = set; then :
6233   withval=$with_libxml;
6234   case $withval in
6235     yes)
6236
6237 $as_echo "#define USE_LIBXML 1" >>confdefs.h
6238
6239       ;;
6240     no)
6241       :
6242       ;;
6243     *)
6244       as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
6245       ;;
6246   esac
6247
6248 else
6249   with_libxml=no
6250
6251 fi
6252
6253
6254
6255 if test "$with_libxml" = yes ; then
6256   for ac_prog in xml2-config
6257 do
6258   # Extract the first word of "$ac_prog", so it can be a program name with args.
6259 set dummy $ac_prog; ac_word=$2
6260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6261 $as_echo_n "checking for $ac_word... " >&6; }
6262 if ${ac_cv_prog_XML2_CONFIG+:} false; then :
6263   $as_echo_n "(cached) " >&6
6264 else
6265   if test -n "$XML2_CONFIG"; then
6266   ac_cv_prog_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test.
6267 else
6268 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6269 for as_dir in $PATH
6270 do
6271   IFS=$as_save_IFS
6272   test -z "$as_dir" && as_dir=.
6273     for ac_exec_ext in '' $ac_executable_extensions; do
6274   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6275     ac_cv_prog_XML2_CONFIG="$ac_prog"
6276     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6277     break 2
6278   fi
6279 done
6280   done
6281 IFS=$as_save_IFS
6282
6283 fi
6284 fi
6285 XML2_CONFIG=$ac_cv_prog_XML2_CONFIG
6286 if test -n "$XML2_CONFIG"; then
6287   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
6288 $as_echo "$XML2_CONFIG" >&6; }
6289 else
6290   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6291 $as_echo "no" >&6; }
6292 fi
6293
6294
6295   test -n "$XML2_CONFIG" && break
6296 done
6297
6298   if test -n "$XML2_CONFIG"; then
6299     for pgac_option in `$XML2_CONFIG --cflags`; do
6300       case $pgac_option in
6301         -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
6302       esac
6303     done
6304     for pgac_option in `$XML2_CONFIG --libs`; do
6305       case $pgac_option in
6306         -L*) LDFLAGS="$LDFLAGS $pgac_option";;
6307       esac
6308     done
6309   fi
6310 fi
6311
6312
6313
6314 #
6315 # XSLT
6316 #
6317
6318
6319
6320 # Check whether --with-libxslt was given.
6321 if test "${with_libxslt+set}" = set; then :
6322   withval=$with_libxslt;
6323   case $withval in
6324     yes)
6325
6326 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
6327
6328       ;;
6329     no)
6330       :
6331       ;;
6332     *)
6333       as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
6334       ;;
6335   esac
6336
6337 else
6338   with_libxslt=no
6339
6340 fi
6341
6342
6343
6344
6345
6346
6347 #
6348 # tzdata
6349 #
6350
6351
6352
6353 # Check whether --with-system-tzdata was given.
6354 if test "${with_system_tzdata+set}" = set; then :
6355   withval=$with_system_tzdata;
6356   case $withval in
6357     yes)
6358       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
6359       ;;
6360     no)
6361       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
6362       ;;
6363     *)
6364
6365       ;;
6366   esac
6367
6368 fi
6369
6370
6371
6372
6373 #
6374 # Zlib
6375 #
6376
6377
6378
6379 # Check whether --with-zlib was given.
6380 if test "${with_zlib+set}" = set; then :
6381   withval=$with_zlib;
6382   case $withval in
6383     yes)
6384       :
6385       ;;
6386     no)
6387       :
6388       ;;
6389     *)
6390       as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
6391       ;;
6392   esac
6393
6394 else
6395   with_zlib=yes
6396
6397 fi
6398
6399
6400
6401
6402 #
6403 # Elf
6404 #
6405
6406 # Assume system is ELF if it predefines __ELF__ as 1,
6407 # otherwise believe host_os based default.
6408 case $host_os in
6409     freebsd1*|freebsd2*) elf=no;;
6410     freebsd3*|freebsd4*) elf=yes;;
6411 esac
6412
6413
6414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6415 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6416 if ${ac_cv_path_GREP+:} false; then :
6417   $as_echo_n "(cached) " >&6
6418 else
6419   if test -z "$GREP"; then
6420   ac_path_GREP_found=false
6421   # Loop through the user's path and test for each of PROGNAME-LIST
6422   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6423 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6424 do
6425   IFS=$as_save_IFS
6426   test -z "$as_dir" && as_dir=.
6427     for ac_prog in grep ggrep; do
6428     for ac_exec_ext in '' $ac_executable_extensions; do
6429       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6430       as_fn_executable_p "$ac_path_GREP" || continue
6431 # Check for GNU ac_path_GREP and select it if it is found.
6432   # Check for GNU $ac_path_GREP
6433 case `"$ac_path_GREP" --version 2>&1` in
6434 *GNU*)
6435   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6436 *)
6437   ac_count=0
6438   $as_echo_n 0123456789 >"conftest.in"
6439   while :
6440   do
6441     cat "conftest.in" "conftest.in" >"conftest.tmp"
6442     mv "conftest.tmp" "conftest.in"
6443     cp "conftest.in" "conftest.nl"
6444     $as_echo 'GREP' >> "conftest.nl"
6445     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6446     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6447     as_fn_arith $ac_count + 1 && ac_count=$as_val
6448     if test $ac_count -gt ${ac_path_GREP_max-0}; then
6449       # Best one so far, save it but keep looking for a better one
6450       ac_cv_path_GREP="$ac_path_GREP"
6451       ac_path_GREP_max=$ac_count
6452     fi
6453     # 10*(2^10) chars as input seems more than enough
6454     test $ac_count -gt 10 && break
6455   done
6456   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6457 esac
6458
6459       $ac_path_GREP_found && break 3
6460     done
6461   done
6462   done
6463 IFS=$as_save_IFS
6464   if test -z "$ac_cv_path_GREP"; then
6465     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6466   fi
6467 else
6468   ac_cv_path_GREP=$GREP
6469 fi
6470
6471 fi
6472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6473 $as_echo "$ac_cv_path_GREP" >&6; }
6474  GREP="$ac_cv_path_GREP"
6475
6476
6477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6478 $as_echo_n "checking for egrep... " >&6; }
6479 if ${ac_cv_path_EGREP+:} false; then :
6480   $as_echo_n "(cached) " >&6
6481 else
6482   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6483    then ac_cv_path_EGREP="$GREP -E"
6484    else
6485      if test -z "$EGREP"; then
6486   ac_path_EGREP_found=false
6487   # Loop through the user's path and test for each of PROGNAME-LIST
6488   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6489 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6490 do
6491   IFS=$as_save_IFS
6492   test -z "$as_dir" && as_dir=.
6493     for ac_prog in egrep; do
6494     for ac_exec_ext in '' $ac_executable_extensions; do
6495       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6496       as_fn_executable_p "$ac_path_EGREP" || continue
6497 # Check for GNU ac_path_EGREP and select it if it is found.
6498   # Check for GNU $ac_path_EGREP
6499 case `"$ac_path_EGREP" --version 2>&1` in
6500 *GNU*)
6501   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6502 *)
6503   ac_count=0
6504   $as_echo_n 0123456789 >"conftest.in"
6505   while :
6506   do
6507     cat "conftest.in" "conftest.in" >"conftest.tmp"
6508     mv "conftest.tmp" "conftest.in"
6509     cp "conftest.in" "conftest.nl"
6510     $as_echo 'EGREP' >> "conftest.nl"
6511     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6512     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6513     as_fn_arith $ac_count + 1 && ac_count=$as_val
6514     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6515       # Best one so far, save it but keep looking for a better one
6516       ac_cv_path_EGREP="$ac_path_EGREP"
6517       ac_path_EGREP_max=$ac_count
6518     fi
6519     # 10*(2^10) chars as input seems more than enough
6520     test $ac_count -gt 10 && break
6521   done
6522   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6523 esac
6524
6525       $ac_path_EGREP_found && break 3
6526     done
6527   done
6528   done
6529 IFS=$as_save_IFS
6530   if test -z "$ac_cv_path_EGREP"; then
6531     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6532   fi
6533 else
6534   ac_cv_path_EGREP=$EGREP
6535 fi
6536
6537    fi
6538 fi
6539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6540 $as_echo "$ac_cv_path_EGREP" >&6; }
6541  EGREP="$ac_cv_path_EGREP"
6542
6543
6544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6545 /* end confdefs.h.  */
6546 #if __ELF__
6547   yes
6548 #endif
6549
6550 _ACEOF
6551 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6552   $EGREP "yes" >/dev/null 2>&1; then :
6553   ELF_SYS=true
6554 else
6555   if test "X$elf" = "Xyes" ; then
6556   ELF_SYS=true
6557 else
6558   ELF_SYS=
6559 fi
6560 fi
6561 rm -f conftest*
6562
6563
6564
6565 #
6566 # Assignments
6567 #
6568
6569 CPPFLAGS="$CPPFLAGS $INCLUDES"
6570 LDFLAGS="$LDFLAGS $LIBDIRS"
6571
6572
6573
6574
6575
6576 # Check whether --with-gnu-ld was given.
6577 if test "${with_gnu_ld+set}" = set; then :
6578   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
6579 else
6580   with_gnu_ld=no
6581 fi
6582
6583 ac_prog=ld
6584 if test "$GCC" = yes; then
6585   # Check if gcc -print-prog-name=ld gives a path.
6586   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
6587 $as_echo_n "checking for ld used by GCC... " >&6; }
6588   case $host in
6589   *-*-mingw*)
6590     # gcc leaves a trailing carriage return which upsets mingw
6591     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6592   *)
6593     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6594   esac
6595   case "$ac_prog" in
6596     # Accept absolute paths.
6597     [\\/]* | [A-Za-z]:[\\/]*)
6598       re_direlt='/[^/][^/]*/\.\./'
6599       # Canonicalize the path of ld
6600       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
6601       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
6602         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
6603       done
6604       test -z "$LD" && LD="$ac_prog"
6605       ;;
6606   "")
6607     # If it fails, then pretend we aren't using GCC.
6608     ac_prog=ld
6609     ;;
6610   *)
6611     # If it is relative, then search for the first ld in PATH.
6612     with_gnu_ld=unknown
6613     ;;
6614   esac
6615 elif test "$with_gnu_ld" = yes; then
6616   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
6617 $as_echo_n "checking for GNU ld... " >&6; }
6618 else
6619   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
6620 $as_echo_n "checking for non-GNU ld... " >&6; }
6621 fi
6622 if ${ac_cv_path_LD+:} false; then :
6623   $as_echo_n "(cached) " >&6
6624 else
6625   if test -z "$LD"; then
6626   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
6627   for ac_dir in $PATH; do
6628     test -z "$ac_dir" && ac_dir=.
6629     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6630       ac_cv_path_LD="$ac_dir/$ac_prog"
6631       # Check to see if the program is GNU ld.  I'd rather use --version,
6632       # but apparently some GNU ld's only accept -v.
6633       # Break only if it was the GNU/non-GNU ld that we prefer.
6634       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
6635         test "$with_gnu_ld" != no && break
6636       else
6637         test "$with_gnu_ld" != yes && break
6638       fi
6639     fi
6640   done
6641   IFS="$ac_save_ifs"
6642 else
6643   ac_cv_path_LD="$LD" # Let the user override the test with a path.
6644 fi
6645 fi
6646
6647 LD="$ac_cv_path_LD"
6648 if test -n "$LD"; then
6649   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
6650 $as_echo "$LD" >&6; }
6651 else
6652   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6653 $as_echo "no" >&6; }
6654 fi
6655 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
6656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
6657 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
6658 if ${ac_cv_prog_gnu_ld+:} false; then :
6659   $as_echo_n "(cached) " >&6
6660 else
6661   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
6662 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
6663   ac_cv_prog_gnu_ld=yes
6664 else
6665   ac_cv_prog_gnu_ld=no
6666 fi
6667 fi
6668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
6669 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
6670 with_gnu_ld=$ac_cv_prog_gnu_ld
6671
6672
6673
6674
6675 if test -n "$ac_tool_prefix"; then
6676   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6677 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6679 $as_echo_n "checking for $ac_word... " >&6; }
6680 if ${ac_cv_prog_RANLIB+:} false; then :
6681   $as_echo_n "(cached) " >&6
6682 else
6683   if test -n "$RANLIB"; then
6684   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6685 else
6686 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6687 for as_dir in $PATH
6688 do
6689   IFS=$as_save_IFS
6690   test -z "$as_dir" && as_dir=.
6691     for ac_exec_ext in '' $ac_executable_extensions; do
6692   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6693     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6694     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6695     break 2
6696   fi
6697 done
6698   done
6699 IFS=$as_save_IFS
6700
6701 fi
6702 fi
6703 RANLIB=$ac_cv_prog_RANLIB
6704 if test -n "$RANLIB"; then
6705   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6706 $as_echo "$RANLIB" >&6; }
6707 else
6708   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6709 $as_echo "no" >&6; }
6710 fi
6711
6712
6713 fi
6714 if test -z "$ac_cv_prog_RANLIB"; then
6715   ac_ct_RANLIB=$RANLIB
6716   # Extract the first word of "ranlib", so it can be a program name with args.
6717 set dummy ranlib; ac_word=$2
6718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6719 $as_echo_n "checking for $ac_word... " >&6; }
6720 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6721   $as_echo_n "(cached) " >&6
6722 else
6723   if test -n "$ac_ct_RANLIB"; then
6724   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6725 else
6726 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6727 for as_dir in $PATH
6728 do
6729   IFS=$as_save_IFS
6730   test -z "$as_dir" && as_dir=.
6731     for ac_exec_ext in '' $ac_executable_extensions; do
6732   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6733     ac_cv_prog_ac_ct_RANLIB="ranlib"
6734     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6735     break 2
6736   fi
6737 done
6738   done
6739 IFS=$as_save_IFS
6740
6741 fi
6742 fi
6743 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6744 if test -n "$ac_ct_RANLIB"; then
6745   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6746 $as_echo "$ac_ct_RANLIB" >&6; }
6747 else
6748   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6749 $as_echo "no" >&6; }
6750 fi
6751
6752   if test "x$ac_ct_RANLIB" = x; then
6753     RANLIB=":"
6754   else
6755     case $cross_compiling:$ac_tool_warned in
6756 yes:)
6757 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6758 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6759 ac_tool_warned=yes ;;
6760 esac
6761     RANLIB=$ac_ct_RANLIB
6762   fi
6763 else
6764   RANLIB="$ac_cv_prog_RANLIB"
6765 fi
6766
6767
6768   if test -n "$ac_tool_prefix"; then
6769   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6770 set dummy ${ac_tool_prefix}strip; ac_word=$2
6771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6772 $as_echo_n "checking for $ac_word... " >&6; }
6773 if ${ac_cv_prog_STRIP+:} false; then :
6774   $as_echo_n "(cached) " >&6
6775 else
6776   if test -n "$STRIP"; then
6777   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6778 else
6779 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6780 for as_dir in $PATH
6781 do
6782   IFS=$as_save_IFS
6783   test -z "$as_dir" && as_dir=.
6784     for ac_exec_ext in '' $ac_executable_extensions; do
6785   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6786     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6787     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6788     break 2
6789   fi
6790 done
6791   done
6792 IFS=$as_save_IFS
6793
6794 fi
6795 fi
6796 STRIP=$ac_cv_prog_STRIP
6797 if test -n "$STRIP"; then
6798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6799 $as_echo "$STRIP" >&6; }
6800 else
6801   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6802 $as_echo "no" >&6; }
6803 fi
6804
6805
6806 fi
6807 if test -z "$ac_cv_prog_STRIP"; then
6808   ac_ct_STRIP=$STRIP
6809   # Extract the first word of "strip", so it can be a program name with args.
6810 set dummy strip; ac_word=$2
6811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6812 $as_echo_n "checking for $ac_word... " >&6; }
6813 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
6814   $as_echo_n "(cached) " >&6
6815 else
6816   if test -n "$ac_ct_STRIP"; then
6817   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6818 else
6819 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6820 for as_dir in $PATH
6821 do
6822   IFS=$as_save_IFS
6823   test -z "$as_dir" && as_dir=.
6824     for ac_exec_ext in '' $ac_executable_extensions; do
6825   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6826     ac_cv_prog_ac_ct_STRIP="strip"
6827     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6828     break 2
6829   fi
6830 done
6831   done
6832 IFS=$as_save_IFS
6833
6834 fi
6835 fi
6836 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6837 if test -n "$ac_ct_STRIP"; then
6838   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6839 $as_echo "$ac_ct_STRIP" >&6; }
6840 else
6841   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6842 $as_echo "no" >&6; }
6843 fi
6844
6845   if test "x$ac_ct_STRIP" = x; then
6846     STRIP=":"
6847   else
6848     case $cross_compiling:$ac_tool_warned in
6849 yes:)
6850 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6851 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6852 ac_tool_warned=yes ;;
6853 esac
6854     STRIP=$ac_ct_STRIP
6855   fi
6856 else
6857   STRIP="$ac_cv_prog_STRIP"
6858 fi
6859
6860
6861   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
6862 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
6863   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
6864     STRIP_STATIC_LIB="$STRIP -x"
6865     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
6866     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6867 $as_echo "yes" >&6; }
6868   else
6869     case $host_os in
6870       darwin*)
6871         STRIP="$STRIP -x"
6872         STRIP_STATIC_LIB=$STRIP
6873         STRIP_SHARED_LIB=$STRIP
6874         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6875 $as_echo "yes" >&6; }
6876         ;;
6877       *)
6878         STRIP_STATIC_LIB=:
6879         STRIP_SHARED_LIB=:
6880         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6881 $as_echo "no" >&6; }
6882         ;;
6883     esac
6884   fi
6885
6886
6887
6888 if test -n "$ac_tool_prefix"; then
6889   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6890 set dummy ${ac_tool_prefix}ar; ac_word=$2
6891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6892 $as_echo_n "checking for $ac_word... " >&6; }
6893 if ${ac_cv_prog_AR+:} false; then :
6894   $as_echo_n "(cached) " >&6
6895 else
6896   if test -n "$AR"; then
6897   ac_cv_prog_AR="$AR" # Let the user override the test.
6898 else
6899 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6900 for as_dir in $PATH
6901 do
6902   IFS=$as_save_IFS
6903   test -z "$as_dir" && as_dir=.
6904     for ac_exec_ext in '' $ac_executable_extensions; do
6905   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6906     ac_cv_prog_AR="${ac_tool_prefix}ar"
6907     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6908     break 2
6909   fi
6910 done
6911   done
6912 IFS=$as_save_IFS
6913
6914 fi
6915 fi
6916 AR=$ac_cv_prog_AR
6917 if test -n "$AR"; then
6918   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6919 $as_echo "$AR" >&6; }
6920 else
6921   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6922 $as_echo "no" >&6; }
6923 fi
6924
6925
6926 fi
6927 if test -z "$ac_cv_prog_AR"; then
6928   ac_ct_AR=$AR
6929   # Extract the first word of "ar", so it can be a program name with args.
6930 set dummy ar; ac_word=$2
6931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6932 $as_echo_n "checking for $ac_word... " >&6; }
6933 if ${ac_cv_prog_ac_ct_AR+:} false; then :
6934   $as_echo_n "(cached) " >&6
6935 else
6936   if test -n "$ac_ct_AR"; then
6937   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6938 else
6939 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6940 for as_dir in $PATH
6941 do
6942   IFS=$as_save_IFS
6943   test -z "$as_dir" && as_dir=.
6944     for ac_exec_ext in '' $ac_executable_extensions; do
6945   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6946     ac_cv_prog_ac_ct_AR="ar"
6947     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6948     break 2
6949   fi
6950 done
6951   done
6952 IFS=$as_save_IFS
6953
6954 fi
6955 fi
6956 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6957 if test -n "$ac_ct_AR"; then
6958   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6959 $as_echo "$ac_ct_AR" >&6; }
6960 else
6961   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6962 $as_echo "no" >&6; }
6963 fi
6964
6965   if test "x$ac_ct_AR" = x; then
6966     AR="ar"
6967   else
6968     case $cross_compiling:$ac_tool_warned in
6969 yes:)
6970 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6971 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6972 ac_tool_warned=yes ;;
6973 esac
6974     AR=$ac_ct_AR
6975   fi
6976 else
6977   AR="$ac_cv_prog_AR"
6978 fi
6979
6980 if test "$PORTNAME" = "win32"; then
6981   if test -n "$ac_tool_prefix"; then
6982   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6983 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
6984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6985 $as_echo_n "checking for $ac_word... " >&6; }
6986 if ${ac_cv_prog_DLLTOOL+:} false; then :
6987   $as_echo_n "(cached) " >&6
6988 else
6989   if test -n "$DLLTOOL"; then
6990   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6991 else
6992 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6993 for as_dir in $PATH
6994 do
6995   IFS=$as_save_IFS
6996   test -z "$as_dir" && as_dir=.
6997     for ac_exec_ext in '' $ac_executable_extensions; do
6998   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6999     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
7000     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7001     break 2
7002   fi
7003 done
7004   done
7005 IFS=$as_save_IFS
7006
7007 fi
7008 fi
7009 DLLTOOL=$ac_cv_prog_DLLTOOL
7010 if test -n "$DLLTOOL"; then
7011   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7012 $as_echo "$DLLTOOL" >&6; }
7013 else
7014   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7015 $as_echo "no" >&6; }
7016 fi
7017
7018
7019 fi
7020 if test -z "$ac_cv_prog_DLLTOOL"; then
7021   ac_ct_DLLTOOL=$DLLTOOL
7022   # Extract the first word of "dlltool", so it can be a program name with args.
7023 set dummy dlltool; ac_word=$2
7024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7025 $as_echo_n "checking for $ac_word... " >&6; }
7026 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
7027   $as_echo_n "(cached) " >&6
7028 else
7029   if test -n "$ac_ct_DLLTOOL"; then
7030   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7031 else
7032 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7033 for as_dir in $PATH
7034 do
7035   IFS=$as_save_IFS
7036   test -z "$as_dir" && as_dir=.
7037     for ac_exec_ext in '' $ac_executable_extensions; do
7038   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7039     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
7040     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7041     break 2
7042   fi
7043 done
7044   done
7045 IFS=$as_save_IFS
7046
7047 fi
7048 fi
7049 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7050 if test -n "$ac_ct_DLLTOOL"; then
7051   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7052 $as_echo "$ac_ct_DLLTOOL" >&6; }
7053 else
7054   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7055 $as_echo "no" >&6; }
7056 fi
7057
7058   if test "x$ac_ct_DLLTOOL" = x; then
7059     DLLTOOL="dlltool"
7060   else
7061     case $cross_compiling:$ac_tool_warned in
7062 yes:)
7063 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7064 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7065 ac_tool_warned=yes ;;
7066 esac
7067     DLLTOOL=$ac_ct_DLLTOOL
7068   fi
7069 else
7070   DLLTOOL="$ac_cv_prog_DLLTOOL"
7071 fi
7072
7073   if test -n "$ac_tool_prefix"; then
7074   # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
7075 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
7076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7077 $as_echo_n "checking for $ac_word... " >&6; }
7078 if ${ac_cv_prog_DLLWRAP+:} false; then :
7079   $as_echo_n "(cached) " >&6
7080 else
7081   if test -n "$DLLWRAP"; then
7082   ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
7083 else
7084 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7085 for as_dir in $PATH
7086 do
7087   IFS=$as_save_IFS
7088   test -z "$as_dir" && as_dir=.
7089     for ac_exec_ext in '' $ac_executable_extensions; do
7090   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7091     ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
7092     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7093     break 2
7094   fi
7095 done
7096   done
7097 IFS=$as_save_IFS
7098
7099 fi
7100 fi
7101 DLLWRAP=$ac_cv_prog_DLLWRAP
7102 if test -n "$DLLWRAP"; then
7103   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5
7104 $as_echo "$DLLWRAP" >&6; }
7105 else
7106   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7107 $as_echo "no" >&6; }
7108 fi
7109
7110
7111 fi
7112 if test -z "$ac_cv_prog_DLLWRAP"; then
7113   ac_ct_DLLWRAP=$DLLWRAP
7114   # Extract the first word of "dllwrap", so it can be a program name with args.
7115 set dummy dllwrap; ac_word=$2
7116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7117 $as_echo_n "checking for $ac_word... " >&6; }
7118 if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then :
7119   $as_echo_n "(cached) " >&6
7120 else
7121   if test -n "$ac_ct_DLLWRAP"; then
7122   ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
7123 else
7124 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7125 for as_dir in $PATH
7126 do
7127   IFS=$as_save_IFS
7128   test -z "$as_dir" && as_dir=.
7129     for ac_exec_ext in '' $ac_executable_extensions; do
7130   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7131     ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
7132     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7133     break 2
7134   fi
7135 done
7136   done
7137 IFS=$as_save_IFS
7138
7139 fi
7140 fi
7141 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
7142 if test -n "$ac_ct_DLLWRAP"; then
7143   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5
7144 $as_echo "$ac_ct_DLLWRAP" >&6; }
7145 else
7146   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7147 $as_echo "no" >&6; }
7148 fi
7149
7150   if test "x$ac_ct_DLLWRAP" = x; then
7151     DLLWRAP="dllwrap"
7152   else
7153     case $cross_compiling:$ac_tool_warned in
7154 yes:)
7155 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7156 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7157 ac_tool_warned=yes ;;
7158 esac
7159     DLLWRAP=$ac_ct_DLLWRAP
7160   fi
7161 else
7162   DLLWRAP="$ac_cv_prog_DLLWRAP"
7163 fi
7164
7165   if test -n "$ac_tool_prefix"; then
7166   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7167 set dummy ${ac_tool_prefix}windres; ac_word=$2
7168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7169 $as_echo_n "checking for $ac_word... " >&6; }
7170 if ${ac_cv_prog_WINDRES+:} false; then :
7171   $as_echo_n "(cached) " >&6
7172 else
7173   if test -n "$WINDRES"; then
7174   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7175 else
7176 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7177 for as_dir in $PATH
7178 do
7179   IFS=$as_save_IFS
7180   test -z "$as_dir" && as_dir=.
7181     for ac_exec_ext in '' $ac_executable_extensions; do
7182   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7183     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
7184     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7185     break 2
7186   fi
7187 done
7188   done
7189 IFS=$as_save_IFS
7190
7191 fi
7192 fi
7193 WINDRES=$ac_cv_prog_WINDRES
7194 if test -n "$WINDRES"; then
7195   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7196 $as_echo "$WINDRES" >&6; }
7197 else
7198   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7199 $as_echo "no" >&6; }
7200 fi
7201
7202
7203 fi
7204 if test -z "$ac_cv_prog_WINDRES"; then
7205   ac_ct_WINDRES=$WINDRES
7206   # Extract the first word of "windres", so it can be a program name with args.
7207 set dummy windres; ac_word=$2
7208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7209 $as_echo_n "checking for $ac_word... " >&6; }
7210 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
7211   $as_echo_n "(cached) " >&6
7212 else
7213   if test -n "$ac_ct_WINDRES"; then
7214   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7215 else
7216 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7217 for as_dir in $PATH
7218 do
7219   IFS=$as_save_IFS
7220   test -z "$as_dir" && as_dir=.
7221     for ac_exec_ext in '' $ac_executable_extensions; do
7222   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7223     ac_cv_prog_ac_ct_WINDRES="windres"
7224     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7225     break 2
7226   fi
7227 done
7228   done
7229 IFS=$as_save_IFS
7230
7231 fi
7232 fi
7233 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7234 if test -n "$ac_ct_WINDRES"; then
7235   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7236 $as_echo "$ac_ct_WINDRES" >&6; }
7237 else
7238   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7239 $as_echo "no" >&6; }
7240 fi
7241
7242   if test "x$ac_ct_WINDRES" = x; then
7243     WINDRES="windres"
7244   else
7245     case $cross_compiling:$ac_tool_warned in
7246 yes:)
7247 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7248 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7249 ac_tool_warned=yes ;;
7250 esac
7251     WINDRES=$ac_ct_WINDRES
7252   fi
7253 else
7254   WINDRES="$ac_cv_prog_WINDRES"
7255 fi
7256
7257 fi
7258
7259 # Find a good install program.  We prefer a C program (faster),
7260 # so one script is as good as another.  But avoid the broken or
7261 # incompatible versions:
7262 # SysV /etc/install, /usr/sbin/install
7263 # SunOS /usr/etc/install
7264 # IRIX /sbin/install
7265 # AIX /bin/install
7266 # AmigaOS /C/install, which installs bootblocks on floppy discs
7267 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7268 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
7269 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7270 # OS/2's system install, which has a completely different semantic
7271 # ./install, which can be erroneously created by make from ./install.sh.
7272 # Reject install programs that cannot install multiple files.
7273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7274 $as_echo_n "checking for a BSD-compatible install... " >&6; }
7275 if test -z "$INSTALL"; then
7276 if ${ac_cv_path_install+:} false; then :
7277   $as_echo_n "(cached) " >&6
7278 else
7279   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7280 for as_dir in $PATH
7281 do
7282   IFS=$as_save_IFS
7283   test -z "$as_dir" && as_dir=.
7284     # Account for people who put trailing slashes in PATH elements.
7285 case $as_dir/ in #((
7286   ./ | .// | /[cC]/* | \
7287   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7288   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7289   /usr/ucb/* ) ;;
7290   *)
7291     # OSF1 and SCO ODT 3.0 have their own names for install.
7292     # Don't use installbsd from OSF since it installs stuff as root
7293     # by default.
7294     for ac_prog in ginstall scoinst install; do
7295       for ac_exec_ext in '' $ac_executable_extensions; do
7296         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
7297           if test $ac_prog = install &&
7298             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7299             # AIX install.  It has an incompatible calling convention.
7300             :
7301           elif test $ac_prog = install &&
7302             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7303             # program-specific install script used by HP pwplus--don't use.
7304             :
7305           else
7306             rm -rf conftest.one conftest.two conftest.dir
7307             echo one > conftest.one
7308             echo two > conftest.two
7309             mkdir conftest.dir
7310             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7311               test -s conftest.one && test -s conftest.two &&
7312               test -s conftest.dir/conftest.one &&
7313               test -s conftest.dir/conftest.two
7314             then
7315               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7316               break 3
7317             fi
7318           fi
7319         fi
7320       done
7321     done
7322     ;;
7323 esac
7324
7325   done
7326 IFS=$as_save_IFS
7327
7328 rm -rf conftest.one conftest.two conftest.dir
7329
7330 fi
7331   if test "${ac_cv_path_install+set}" = set; then
7332     INSTALL=$ac_cv_path_install
7333   else
7334     # As a last resort, use the slow shell script.  Don't cache a
7335     # value for INSTALL within a source directory, because that will
7336     # break other packages using the cache if that directory is
7337     # removed, or if the value is a relative name.
7338     INSTALL=$ac_install_sh
7339   fi
7340 fi
7341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7342 $as_echo "$INSTALL" >&6; }
7343
7344 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7345 # It thinks the first close brace ends the variable substitution.
7346 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7347
7348 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7349
7350 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7351
7352 # When Autoconf chooses install-sh as install program it tries to generate
7353 # a relative path to it in each makefile where it substitutes it. This clashes
7354 # with our Makefile.global concept. This workaround helps.
7355 case $INSTALL in
7356   *install-sh*) install_bin='';;
7357   *) install_bin=$INSTALL;;
7358 esac
7359
7360
7361 # Extract the first word of "tar", so it can be a program name with args.
7362 set dummy tar; ac_word=$2
7363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7364 $as_echo_n "checking for $ac_word... " >&6; }
7365 if ${ac_cv_path_TAR+:} false; then :
7366   $as_echo_n "(cached) " >&6
7367 else
7368   case $TAR in
7369   [\\/]* | ?:[\\/]*)
7370   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
7371   ;;
7372   *)
7373   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7374 for as_dir in $PATH
7375 do
7376   IFS=$as_save_IFS
7377   test -z "$as_dir" && as_dir=.
7378     for ac_exec_ext in '' $ac_executable_extensions; do
7379   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7380     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
7381     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7382     break 2
7383   fi
7384 done
7385   done
7386 IFS=$as_save_IFS
7387
7388   ;;
7389 esac
7390 fi
7391 TAR=$ac_cv_path_TAR
7392 if test -n "$TAR"; then
7393   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
7394 $as_echo "$TAR" >&6; }
7395 else
7396   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7397 $as_echo "no" >&6; }
7398 fi
7399
7400
7401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7402 $as_echo_n "checking whether ln -s works... " >&6; }
7403 LN_S=$as_ln_s
7404 if test "$LN_S" = "ln -s"; then
7405   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7406 $as_echo "yes" >&6; }
7407 else
7408   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7409 $as_echo "no, using $LN_S" >&6; }
7410 fi
7411
7412 for ac_prog in gawk mawk nawk awk
7413 do
7414   # Extract the first word of "$ac_prog", so it can be a program name with args.
7415 set dummy $ac_prog; ac_word=$2
7416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7417 $as_echo_n "checking for $ac_word... " >&6; }
7418 if ${ac_cv_prog_AWK+:} false; then :
7419   $as_echo_n "(cached) " >&6
7420 else
7421   if test -n "$AWK"; then
7422   ac_cv_prog_AWK="$AWK" # Let the user override the test.
7423 else
7424 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7425 for as_dir in $PATH
7426 do
7427   IFS=$as_save_IFS
7428   test -z "$as_dir" && as_dir=.
7429     for ac_exec_ext in '' $ac_executable_extensions; do
7430   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7431     ac_cv_prog_AWK="$ac_prog"
7432     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7433     break 2
7434   fi
7435 done
7436   done
7437 IFS=$as_save_IFS
7438
7439 fi
7440 fi
7441 AWK=$ac_cv_prog_AWK
7442 if test -n "$AWK"; then
7443   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7444 $as_echo "$AWK" >&6; }
7445 else
7446   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7447 $as_echo "no" >&6; }
7448 fi
7449
7450
7451   test -n "$AWK" && break
7452 done
7453
7454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
7455 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
7456 if test -z "$MKDIR_P"; then
7457   if ${ac_cv_path_mkdir+:} false; then :
7458   $as_echo_n "(cached) " >&6
7459 else
7460   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7461 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
7462 do
7463   IFS=$as_save_IFS
7464   test -z "$as_dir" && as_dir=.
7465     for ac_prog in mkdir gmkdir; do
7466          for ac_exec_ext in '' $ac_executable_extensions; do
7467            as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
7468            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
7469              'mkdir (GNU coreutils) '* | \
7470              'mkdir (coreutils) '* | \
7471              'mkdir (fileutils) '4.1*)
7472                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
7473                break 3;;
7474            esac
7475          done
7476        done
7477   done
7478 IFS=$as_save_IFS
7479
7480 fi
7481
7482   test -d ./--version && rmdir ./--version
7483   if test "${ac_cv_path_mkdir+set}" = set; then
7484     MKDIR_P="$ac_cv_path_mkdir -p"
7485   else
7486     # As a last resort, use the slow shell script.  Don't cache a
7487     # value for MKDIR_P within a source directory, because that will
7488     # break other packages using the cache if that directory is
7489     # removed, or if the value is a relative name.
7490     MKDIR_P="$ac_install_sh -d"
7491   fi
7492 fi
7493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
7494 $as_echo "$MKDIR_P" >&6; }
7495
7496 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
7497 # a relative path to it in each makefile where it substitutes it. This clashes
7498 # with our Makefile.global concept. This workaround helps.
7499 case $MKDIR_P in
7500   *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
7501 esac
7502
7503 # Let the user override the search
7504 if test -z "$BISON"; then
7505   for ac_prog in bison
7506 do
7507   # Extract the first word of "$ac_prog", so it can be a program name with args.
7508 set dummy $ac_prog; ac_word=$2
7509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7510 $as_echo_n "checking for $ac_word... " >&6; }
7511 if ${ac_cv_path_BISON+:} false; then :
7512   $as_echo_n "(cached) " >&6
7513 else
7514   case $BISON in
7515   [\\/]* | ?:[\\/]*)
7516   ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
7517   ;;
7518   *)
7519   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7520 for as_dir in $PATH
7521 do
7522   IFS=$as_save_IFS
7523   test -z "$as_dir" && as_dir=.
7524     for ac_exec_ext in '' $ac_executable_extensions; do
7525   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7526     ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
7527     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7528     break 2
7529   fi
7530 done
7531   done
7532 IFS=$as_save_IFS
7533
7534   ;;
7535 esac
7536 fi
7537 BISON=$ac_cv_path_BISON
7538 if test -n "$BISON"; then
7539   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
7540 $as_echo "$BISON" >&6; }
7541 else
7542   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7543 $as_echo "no" >&6; }
7544 fi
7545
7546
7547   test -n "$BISON" && break
7548 done
7549
7550 fi
7551
7552 if test "$BISON"; then
7553   pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
7554   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
7555 $as_echo "$as_me: using $pgac_bison_version" >&6;}
7556   if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
7557   then
7558     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7559 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
7560 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
7561 $as_echo "$as_me: WARNING:
7562 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
7563 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
7564     BISON=""
7565   fi
7566   # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
7567   # of the now preferred %name-prefix "base_yy", but the latter
7568   # doesn't work with Bison 2.3 or less.  So for now we silence the
7569   # deprecation warnings.
7570   if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
7571   then
7572     BISONFLAGS="$BISONFLAGS -Wno-deprecated"
7573   fi
7574 fi
7575
7576 if test -z "$BISON"; then
7577   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7578 *** Without Bison you will not be able to build PostgreSQL from Git nor
7579 *** change any of the parser definition files.  You can obtain Bison from
7580 *** a GNU mirror site.  (If you are using the official distribution of
7581 *** PostgreSQL then you do not need to worry about this, because the Bison
7582 *** output is pre-generated.)" >&5
7583 $as_echo "$as_me: WARNING:
7584 *** Without Bison you will not be able to build PostgreSQL from Git nor
7585 *** change any of the parser definition files.  You can obtain Bison from
7586 *** a GNU mirror site.  (If you are using the official distribution of
7587 *** PostgreSQL then you do not need to worry about this, because the Bison
7588 *** output is pre-generated.)" >&2;}
7589 fi
7590 # We don't need AC_SUBST(BISON) because AC_PATH_PROG did it
7591
7592
7593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
7594 $as_echo_n "checking for flex... " >&6; }
7595 if ${pgac_cv_path_flex+:} false; then :
7596   $as_echo_n "(cached) " >&6
7597 else
7598   # Let the user override the test
7599 if test -n "$FLEX"; then
7600   pgac_cv_path_flex=$FLEX
7601 else
7602   pgac_save_IFS=$IFS
7603   IFS=$PATH_SEPARATOR
7604   for pgac_dir in $PATH; do
7605     IFS=$pgac_save_IFS
7606     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
7607       pgac_dir=`pwd`
7608     fi
7609     for pgac_prog in flex lex; do
7610       pgac_candidate="$pgac_dir/$pgac_prog"
7611       if test -f "$pgac_candidate" \
7612         && $pgac_candidate --version </dev/null >/dev/null 2>&1
7613       then
7614         echo '%%'  > conftest.l
7615         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
7616           pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
7617           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;}'
7618           then
7619             pgac_cv_path_flex=$pgac_candidate
7620             break 2
7621           else
7622             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7623 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
7624 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
7625 $as_echo "$as_me: WARNING:
7626 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
7627 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
7628           fi
7629         fi
7630       fi
7631     done
7632   done
7633   rm -f conftest.l lex.yy.c
7634   : ${pgac_cv_path_flex=no}
7635 fi
7636
7637 fi
7638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
7639 $as_echo "$pgac_cv_path_flex" >&6; }
7640 if test x"$pgac_cv_path_flex" = x"no"; then
7641   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7642 *** Without Flex you will not be able to build PostgreSQL from Git nor
7643 *** change any of the scanner definition files.  You can obtain Flex from
7644 *** a GNU mirror site.  (If you are using the official distribution of
7645 *** PostgreSQL then you do not need to worry about this because the Flex
7646 *** output is pre-generated.)" >&5
7647 $as_echo "$as_me: WARNING:
7648 *** Without Flex you will not be able to build PostgreSQL from Git nor
7649 *** change any of the scanner definition files.  You can obtain Flex from
7650 *** a GNU mirror site.  (If you are using the official distribution of
7651 *** PostgreSQL then you do not need to worry about this because the Flex
7652 *** output is pre-generated.)" >&2;}
7653
7654   FLEX=
7655 else
7656   FLEX=$pgac_cv_path_flex
7657   pgac_flex_version=`$FLEX --version 2>/dev/null`
7658   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
7659 $as_echo "$as_me: using $pgac_flex_version" >&6;}
7660 fi
7661
7662
7663
7664
7665
7666 # Let the user override the search
7667 if test -z "$PERL"; then
7668   # Extract the first word of "perl", so it can be a program name with args.
7669 set dummy perl; ac_word=$2
7670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7671 $as_echo_n "checking for $ac_word... " >&6; }
7672 if ${ac_cv_path_PERL+:} false; then :
7673   $as_echo_n "(cached) " >&6
7674 else
7675   case $PERL in
7676   [\\/]* | ?:[\\/]*)
7677   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
7678   ;;
7679   *)
7680   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7681 for as_dir in $PATH
7682 do
7683   IFS=$as_save_IFS
7684   test -z "$as_dir" && as_dir=.
7685     for ac_exec_ext in '' $ac_executable_extensions; do
7686   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7687     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
7688     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7689     break 2
7690   fi
7691 done
7692   done
7693 IFS=$as_save_IFS
7694
7695   ;;
7696 esac
7697 fi
7698 PERL=$ac_cv_path_PERL
7699 if test -n "$PERL"; then
7700   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
7701 $as_echo "$PERL" >&6; }
7702 else
7703   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7704 $as_echo "no" >&6; }
7705 fi
7706
7707
7708 fi
7709
7710 if test "$PERL"; then
7711   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'`
7712   { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
7713 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
7714   if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
7715     $AWK '{ if ($1 == 5 && $2 >= 8) exit 1; else exit 0;}'
7716   then
7717     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7718 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7719 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
7720 $as_echo "$as_me: WARNING:
7721 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7722 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
7723     PERL=""
7724   fi
7725 fi
7726
7727 if test -z "$PERL"; then
7728   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7729 *** Without Perl you will not be able to build PostgreSQL from Git.
7730 *** You can obtain Perl from any CPAN mirror site.
7731 *** (If you are using the official distribution of PostgreSQL then you do not
7732 *** need to worry about this, because the Perl output is pre-generated.)" >&5
7733 $as_echo "$as_me: WARNING:
7734 *** Without Perl you will not be able to build PostgreSQL from Git.
7735 *** You can obtain Perl from any CPAN mirror site.
7736 *** (If you are using the official distribution of PostgreSQL then you do not
7737 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
7738 fi
7739
7740 if test "$with_perl" = yes; then
7741   if test -z "$PERL"; then
7742     as_fn_error $? "Perl not found" "$LINENO" 5
7743   fi
7744
7745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
7746 $as_echo_n "checking for Perl archlibexp... " >&6; }
7747 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
7748 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
7749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
7750 $as_echo "$perl_archlibexp" >&6; }
7751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
7752 $as_echo_n "checking for Perl privlibexp... " >&6; }
7753 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
7754 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
7755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
7756 $as_echo "$perl_privlibexp" >&6; }
7757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
7758 $as_echo_n "checking for Perl useshrplib... " >&6; }
7759 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
7760 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
7761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
7762 $as_echo "$perl_useshrplib" >&6; }
7763   if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
7764     as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
7765 You might have to rebuild your Perl installation.  Refer to the
7766 documentation for details.  Use --without-perl to disable building
7767 PL/Perl." "$LINENO" 5
7768   fi
7769
7770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
7771 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
7772 if test "$PORTNAME" = "win32" ; then
7773 perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
7774 test -e "$perl_archlibexp/CORE/$perl_lib.lib" && perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
7775 else
7776 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
7777 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
7778 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
7779 fi
7780 if test -z "$perl_embed_ldflags" ; then
7781         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7782 $as_echo "no" >&6; }
7783         as_fn_error $? "could not determine flags for linking embedded Perl.
7784 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
7785 installed." "$LINENO" 5
7786 else
7787         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
7788 $as_echo "$perl_embed_ldflags" >&6; }
7789 fi
7790
7791 fi
7792
7793 if test "$with_python" = yes; then
7794   # Extract the first word of "python", so it can be a program name with args.
7795 set dummy python; ac_word=$2
7796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7797 $as_echo_n "checking for $ac_word... " >&6; }
7798 if ${ac_cv_path_PYTHON+:} false; then :
7799   $as_echo_n "(cached) " >&6
7800 else
7801   case $PYTHON in
7802   [\\/]* | ?:[\\/]*)
7803   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
7804   ;;
7805   *)
7806   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7807 for as_dir in $PATH
7808 do
7809   IFS=$as_save_IFS
7810   test -z "$as_dir" && as_dir=.
7811     for ac_exec_ext in '' $ac_executable_extensions; do
7812   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7813     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
7814     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7815     break 2
7816   fi
7817 done
7818   done
7819 IFS=$as_save_IFS
7820
7821   ;;
7822 esac
7823 fi
7824 PYTHON=$ac_cv_path_PYTHON
7825 if test -n "$PYTHON"; then
7826   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
7827 $as_echo "$PYTHON" >&6; }
7828 else
7829   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7830 $as_echo "no" >&6; }
7831 fi
7832
7833
7834 if test x"$PYTHON" = x""; then
7835   as_fn_error $? "Python not found" "$LINENO" 5
7836 fi
7837
7838
7839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python distutils module" >&5
7840 $as_echo_n "checking for Python distutils module... " >&6; }
7841 if "${PYTHON}" -c 'import distutils' 2>&5
7842 then
7843     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7844 $as_echo "yes" >&6; }
7845 else
7846     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7847 $as_echo "no" >&6; }
7848     as_fn_error $? "distutils module not found" "$LINENO" 5
7849 fi
7850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
7851 $as_echo_n "checking Python configuration directory... " >&6; }
7852 python_majorversion=`${PYTHON} -c "import sys; print(sys.version[0])"`
7853 python_minorversion=`${PYTHON} -c "import sys; print(sys.version[2])"`
7854 python_version=`${PYTHON} -c "import sys; print(sys.version[:3])"`
7855 python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
7856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
7857 $as_echo "$python_configdir" >&6; }
7858
7859 # Reject unsupported Python versions as soon as practical.
7860 if test "$python_majorversion" -lt 3 -a "$python_minorversion" -lt 4; then
7861   as_fn_error $? "Python version $python_version is too old (version 2.4 or later is required)" "$LINENO" 5
7862 fi
7863
7864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directories" >&5
7865 $as_echo_n "checking Python include directories... " >&6; }
7866 python_includespec=`${PYTHON} -c "
7867 import distutils.sysconfig
7868 a = '-I' + distutils.sysconfig.get_python_inc(False)
7869 b = '-I' + distutils.sysconfig.get_python_inc(True)
7870 if a == b:
7871     print(a)
7872 else:
7873     print(a + ' ' + b)"`
7874 if test "$PORTNAME" = win32 ; then
7875     python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
7876 fi
7877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
7878 $as_echo "$python_includespec" >&6; }
7879
7880
7881
7882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
7883 $as_echo_n "checking how to link an embedded Python application... " >&6; }
7884
7885 python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
7886 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
7887
7888 # If LDLIBRARY exists and has a shlib extension, use it verbatim.
7889 ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
7890 if test -e "${python_libdir}/${python_ldlibrary}" -a x"${python_ldlibrary}" != x"${ldlibrary}"
7891 then
7892         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
7893         found_shlib=1
7894 else
7895         # Otherwise, guess the base name of the shlib.
7896         # LDVERSION was added in Python 3.2, before that use VERSION,
7897         # or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS.
7898         python_ldversion=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDVERSION'))))"`
7899         if test x"${python_ldversion}" != x""; then
7900                 ldlibrary="python${python_ldversion}"
7901         else
7902                 python_version_var=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('VERSION'))))"`
7903                 if test x"${python_version_var}" != x""; then
7904                         ldlibrary="python${python_version_var}"
7905                 else
7906                         ldlibrary="python${python_version}"
7907                 fi
7908         fi
7909         # Search for a likely-looking file.
7910         found_shlib=0
7911         for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
7912         do
7913                 # We don't know the platform DLSUFFIX here, so check 'em all.
7914                 for e in .so .dll .dylib .sl; do
7915                         if test -e "$d/lib${ldlibrary}$e"; then
7916                                 python_libdir="$d"
7917                                 found_shlib=1
7918                                 break 2
7919                         fi
7920                 done
7921         done
7922         # Some platforms (OpenBSD) require us to accept a bare versioned shlib
7923         # (".so.n.n") as well. However, check this only after failing to find
7924         # ".so" anywhere, because yet other platforms (Debian) put the .so
7925         # symlink in a different directory from the underlying versioned shlib.
7926         if test "$found_shlib" != 1; then
7927                 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
7928                 do
7929                         for f in "$d/lib${ldlibrary}.so."* ; do
7930                                 if test -e "$f"; then
7931                                         python_libdir="$d"
7932                                         found_shlib=1
7933                                         break 2
7934                                 fi
7935                         done
7936                 done
7937         fi
7938         # As usual, Windows has its own ideas.  Possible default library
7939         # locations include c:/Windows/System32 and (for Cygwin) /usr/bin,
7940         # and the "lib" prefix might not be there.
7941         if test "$found_shlib" != 1 -a \( "$PORTNAME" = win32 -o "$PORTNAME" = cygwin \); then
7942                 for d in "${python_libdir}" "${python_configdir}" c:/Windows/System32 /usr/bin
7943                 do
7944                         for f in "$d/lib${ldlibrary}.dll" "$d/${ldlibrary}.dll" ; do
7945                                 if test -e "$f"; then
7946                                         python_libdir="$d"
7947                                         found_shlib=1
7948                                         break 2
7949                                 fi
7950                         done
7951                 done
7952         fi
7953 fi
7954 if test "$found_shlib" != 1; then
7955         as_fn_error $? "could not find shared library for Python
7956 You might have to rebuild your Python installation.  Refer to the
7957 documentation for details.  Use --without-python to disable building
7958 PL/Python." "$LINENO" 5
7959 fi
7960 python_libspec="-L${python_libdir} -l${ldlibrary}"
7961
7962 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
7963
7964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
7965 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
7966
7967
7968
7969 fi
7970
7971 if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
7972   # Extract the first word of "zic", so it can be a program name with args.
7973 set dummy zic; ac_word=$2
7974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7975 $as_echo_n "checking for $ac_word... " >&6; }
7976 if ${ac_cv_path_ZIC+:} false; then :
7977   $as_echo_n "(cached) " >&6
7978 else
7979   case $ZIC in
7980   [\\/]* | ?:[\\/]*)
7981   ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
7982   ;;
7983   *)
7984   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7985 for as_dir in $PATH
7986 do
7987   IFS=$as_save_IFS
7988   test -z "$as_dir" && as_dir=.
7989     for ac_exec_ext in '' $ac_executable_extensions; do
7990   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7991     ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
7992     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7993     break 2
7994   fi
7995 done
7996   done
7997 IFS=$as_save_IFS
7998
7999   ;;
8000 esac
8001 fi
8002 ZIC=$ac_cv_path_ZIC
8003 if test -n "$ZIC"; then
8004   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
8005 $as_echo "$ZIC" >&6; }
8006 else
8007   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8008 $as_echo "no" >&6; }
8009 fi
8010
8011
8012   if test -z "$ZIC"; then
8013     as_fn_error $? "
8014 When cross-compiling, either use the option --with-system-tzdata to use
8015 existing time-zone data, or set the environment variable ZIC to a zic
8016 program to use during the build." "$LINENO" 5
8017   fi
8018 fi
8019
8020 #
8021 # Pthreads
8022 #
8023 # For each platform, we need to know about any special compile and link
8024 # libraries, and whether the normal C function names are thread-safe.
8025 # See the comment at the top of src/port/thread.c for more information.
8026 # WIN32 doesn't need the pthread tests;  it always uses threads
8027 #
8028 # These tests are run before the library-tests, because linking with the
8029 # other libraries can pull in the pthread functions as a side-effect.  We
8030 # want to use the -pthread or similar flags directly, and not rely on
8031 # the side-effects of linking with some other library.
8032 #
8033 # note: We have to use AS_IF here rather than plain if. The AC_CHECK_HEADER
8034 # invocation below is the first one in the script, and autoconf generates
8035 # additional code for that, which must not be inside the if-block. AS_IF
8036 # knows how to do that.
8037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
8038 $as_echo_n "checking for ANSI C header files... " >&6; }
8039 if ${ac_cv_header_stdc+:} false; then :
8040   $as_echo_n "(cached) " >&6
8041 else
8042   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8043 /* end confdefs.h.  */
8044 #include <stdlib.h>
8045 #include <stdarg.h>
8046 #include <string.h>
8047 #include <float.h>
8048
8049 int
8050 main ()
8051 {
8052
8053   ;
8054   return 0;
8055 }
8056 _ACEOF
8057 if ac_fn_c_try_compile "$LINENO"; then :
8058   ac_cv_header_stdc=yes
8059 else
8060   ac_cv_header_stdc=no
8061 fi
8062 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8063
8064 if test $ac_cv_header_stdc = yes; then
8065   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8066   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8067 /* end confdefs.h.  */
8068 #include <string.h>
8069
8070 _ACEOF
8071 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8072   $EGREP "memchr" >/dev/null 2>&1; then :
8073
8074 else
8075   ac_cv_header_stdc=no
8076 fi
8077 rm -f conftest*
8078
8079 fi
8080
8081 if test $ac_cv_header_stdc = yes; then
8082   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8083   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8084 /* end confdefs.h.  */
8085 #include <stdlib.h>
8086
8087 _ACEOF
8088 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8089   $EGREP "free" >/dev/null 2>&1; then :
8090
8091 else
8092   ac_cv_header_stdc=no
8093 fi
8094 rm -f conftest*
8095
8096 fi
8097
8098 if test $ac_cv_header_stdc = yes; then
8099   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8100   if test "$cross_compiling" = yes; then :
8101   :
8102 else
8103   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8104 /* end confdefs.h.  */
8105 #include <ctype.h>
8106 #include <stdlib.h>
8107 #if ((' ' & 0x0FF) == 0x020)
8108 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8109 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8110 #else
8111 # define ISLOWER(c) \
8112                    (('a' <= (c) && (c) <= 'i') \
8113                      || ('j' <= (c) && (c) <= 'r') \
8114                      || ('s' <= (c) && (c) <= 'z'))
8115 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8116 #endif
8117
8118 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8119 int
8120 main ()
8121 {
8122   int i;
8123   for (i = 0; i < 256; i++)
8124     if (XOR (islower (i), ISLOWER (i))
8125         || toupper (i) != TOUPPER (i))
8126       return 2;
8127   return 0;
8128 }
8129 _ACEOF
8130 if ac_fn_c_try_run "$LINENO"; then :
8131
8132 else
8133   ac_cv_header_stdc=no
8134 fi
8135 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8136   conftest.$ac_objext conftest.beam conftest.$ac_ext
8137 fi
8138
8139 fi
8140 fi
8141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
8142 $as_echo "$ac_cv_header_stdc" >&6; }
8143 if test $ac_cv_header_stdc = yes; then
8144
8145 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
8146
8147 fi
8148
8149 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
8150 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
8151                   inttypes.h stdint.h unistd.h
8152 do :
8153   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8154 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
8155 "
8156 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8157   cat >>confdefs.h <<_ACEOF
8158 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8159 _ACEOF
8160
8161 fi
8162
8163 done
8164
8165
8166 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then :
8167    # then
8168
8169
8170
8171 ac_ext=c
8172 ac_cpp='$CPP $CPPFLAGS'
8173 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8174 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8175 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8176
8177 ax_pthread_ok=no
8178
8179 # We used to check for pthread.h first, but this fails if pthread.h
8180 # requires special compiler flags (e.g. on Tru64 or Sequent).
8181 # It gets checked for in the link test anyway.
8182
8183 # First of all, check if the user has set any of the PTHREAD_LIBS,
8184 # etcetera environment variables, and if threads linking works using
8185 # them:
8186 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
8187         save_CFLAGS="$CFLAGS"
8188         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
8189         save_LIBS="$LIBS"
8190         LIBS="$PTHREAD_LIBS $LIBS"
8191         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
8192 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
8193         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8194 /* end confdefs.h.  */
8195
8196 /* Override any GCC internal prototype to avoid an error.
8197    Use char because int might match the return type of a GCC
8198    builtin and then its argument prototype would still apply.  */
8199 #ifdef __cplusplus
8200 extern "C"
8201 #endif
8202 char pthread_join ();
8203 int
8204 main ()
8205 {
8206 return pthread_join ();
8207   ;
8208   return 0;
8209 }
8210 _ACEOF
8211 if ac_fn_c_try_link "$LINENO"; then :
8212   ax_pthread_ok=yes
8213 fi
8214 rm -f core conftest.err conftest.$ac_objext \
8215     conftest$ac_exeext conftest.$ac_ext
8216         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
8217 $as_echo "$ax_pthread_ok" >&6; }
8218         if test x"$ax_pthread_ok" = xno; then
8219                 PTHREAD_LIBS=""
8220                 PTHREAD_CFLAGS=""
8221         fi
8222         LIBS="$save_LIBS"
8223         CFLAGS="$save_CFLAGS"
8224 fi
8225
8226 # We must check for the threads library under a number of different
8227 # names; the ordering is very important because some systems
8228 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
8229 # libraries is broken (non-POSIX).
8230
8231 # Create a list of thread flags to try.  Items starting with a "-" are
8232 # C compiler flags, and other items are library names, except for "none"
8233 # which indicates that we try without any flags at all, and "pthread-config"
8234 # which is a program returning the flags for the Pth emulation library.
8235
8236 ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mt -mthreads pthread --thread-safe pthread-config"
8237
8238 # The ordering *is* (sometimes) important.  Some notes on the
8239 # individual items follow:
8240
8241 # pthreads: AIX (must check this before -lpthread)
8242 # none: in case threads are in libc; should be tried before -Kthread and
8243 #       other compiler flags to prevent continual compiler warnings
8244 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
8245 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
8246 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
8247 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
8248 # -pthreads: Solaris/gcc
8249 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
8250 #      doesn't hurt to check since this sometimes defines pthreads and
8251 #      -D_REENTRANT too), HP C (must be checked before -lpthread, which
8252 #      is present but should not be used directly)
8253 # -mthreads: Mingw32/gcc, Lynx/gcc
8254 # pthread: Linux, etcetera
8255 # --thread-safe: KAI C++
8256 # pthread-config: use pthread-config program (for GNU Pth library)
8257
8258 case $host_os in
8259
8260         hpux*)
8261
8262         # From the cc(1) man page: "[-mt] Sets various -D flags to enable
8263         # multi-threading and also sets -lpthread."
8264
8265         ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
8266         ;;
8267
8268         openedition*)
8269
8270         # IBM z/OS requires a feature-test macro to be defined in order to
8271         # enable POSIX threads at all, so give the user a hint if this is
8272         # not set. (We don't define these ourselves, as they can affect
8273         # other portions of the system API in unpredictable ways.)
8274
8275         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8276 /* end confdefs.h.  */
8277
8278 #            if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
8279              AX_PTHREAD_ZOS_MISSING
8280 #            endif
8281
8282 _ACEOF
8283 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8284   $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
8285   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
8286 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
8287 fi
8288 rm -f conftest*
8289
8290         ;;
8291
8292         solaris*)
8293
8294         # Newer versions of Solaris require the "-mt -lpthread" pair, and we
8295         # check that first.  On some older versions, libc contains stubbed
8296         # (non-functional) versions of the pthreads routines, so link-based
8297         # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
8298         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
8299         # a function called by this macro, so we could check for that, but
8300         # who knows whether they'll stub that too in a future libc.)  So
8301         # we'll look for -pthreads and -lpthread shortly thereafter.
8302
8303         ax_pthread_flags="-mt,pthread -pthreads -pthread pthread $ax_pthread_flags"
8304         ;;
8305 esac
8306
8307 # Older versions of Clang only give a warning instead of an error for an
8308 # unrecognized option, unless we specify -Werror. (We throw in some extra
8309 # Clang warning flags for good measure.)
8310
8311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler needs certain flags to reject unknown flags" >&5
8312 $as_echo_n "checking if compiler needs certain flags to reject unknown flags... " >&6; }
8313 if ${ax_cv_PTHREAD_REJECT_UNKNOWN+:} false; then :
8314   $as_echo_n "(cached) " >&6
8315 else
8316   ax_cv_PTHREAD_REJECT_UNKNOWN=unknown
8317      save_CFLAGS="$CFLAGS"
8318      ax_pthread_extra_flags="-Wunknown-warning-option -Wunused-command-line-argument"
8319      CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wfoobaz -foobaz"
8320      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8321 /* end confdefs.h.  */
8322 int foo(void);
8323 int
8324 main ()
8325 {
8326 foo()
8327   ;
8328   return 0;
8329 }
8330 _ACEOF
8331 if ac_fn_c_try_compile "$LINENO"; then :
8332   ax_cv_PTHREAD_REJECT_UNKNOWN="-Werror $ax_pthread_extra_flags"
8333 else
8334   ax_cv_PTHREAD_REJECT_UNKNOWN=no
8335 fi
8336 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8337      CFLAGS="$save_CFLAGS"
8338
8339 fi
8340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_REJECT_UNKNOWN" >&5
8341 $as_echo "$ax_cv_PTHREAD_REJECT_UNKNOWN" >&6; }
8342 ax_pthread_extra_flags=
8343 if test "x$ax_cv_PTHREAD_REJECT_UNKNOWN" != "xno"; then :
8344   ax_pthread_extra_flags="$ax_cv_PTHREAD_REJECT_UNKNOWN"
8345 fi
8346
8347 if test x"$ax_pthread_ok" = xno; then
8348 for flag in $ax_pthread_flags; do
8349
8350         case $flag in
8351                 none)
8352                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
8353 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
8354                 ;;
8355
8356                 -mt,pthread)
8357                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
8358 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
8359                 PTHREAD_CFLAGS="-mt"
8360                 PTHREAD_LIBS="-lpthread"
8361                 ;;
8362
8363                 -*)
8364                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
8365 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
8366                 PTHREAD_CFLAGS="$flag"
8367                 ;;
8368
8369                 pthread-config)
8370                 # Extract the first word of "pthread-config", so it can be a program name with args.
8371 set dummy pthread-config; ac_word=$2
8372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8373 $as_echo_n "checking for $ac_word... " >&6; }
8374 if ${ac_cv_prog_ax_pthread_config+:} false; then :
8375   $as_echo_n "(cached) " >&6
8376 else
8377   if test -n "$ax_pthread_config"; then
8378   ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
8379 else
8380 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8381 for as_dir in $PATH
8382 do
8383   IFS=$as_save_IFS
8384   test -z "$as_dir" && as_dir=.
8385     for ac_exec_ext in '' $ac_executable_extensions; do
8386   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8387     ac_cv_prog_ax_pthread_config="yes"
8388     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8389     break 2
8390   fi
8391 done
8392   done
8393 IFS=$as_save_IFS
8394
8395   test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
8396 fi
8397 fi
8398 ax_pthread_config=$ac_cv_prog_ax_pthread_config
8399 if test -n "$ax_pthread_config"; then
8400   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
8401 $as_echo "$ax_pthread_config" >&6; }
8402 else
8403   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8404 $as_echo "no" >&6; }
8405 fi
8406
8407
8408                 if test x"$ax_pthread_config" = xno; then continue; fi
8409                 PTHREAD_CFLAGS="`pthread-config --cflags`"
8410                 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
8411                 ;;
8412
8413                 *)
8414                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
8415 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
8416                 PTHREAD_LIBS="-l$flag"
8417                 ;;
8418         esac
8419
8420         save_LIBS="$LIBS"
8421         save_CFLAGS="$CFLAGS"
8422         LIBS="$PTHREAD_LIBS $LIBS"
8423         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
8424
8425         # Check for various functions.  We must include pthread.h,
8426         # since some functions may be macros.  (On the Sequent, we
8427         # need a special flag -Kthread to make this header compile.)
8428         # We check for pthread_join because it is in -lpthread on IRIX
8429         # while pthread_create is in libc.  We check for pthread_attr_init
8430         # due to DEC craziness with -lpthreads.  We check for
8431         # pthread_cleanup_push because it is one of the few pthread
8432         # functions on Solaris that doesn't have a non-functional libc stub.
8433         # We try pthread_create on general principles.
8434         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8435 /* end confdefs.h.  */
8436 #include <pthread.h>
8437                         static void routine(void *a) { a = 0; }
8438                         static void *start_routine(void *a) { return a; }
8439 int
8440 main ()
8441 {
8442 pthread_t th; pthread_attr_t attr;
8443                         pthread_create(&th, 0, start_routine, 0);
8444                         pthread_join(th, 0);
8445                         pthread_attr_init(&attr);
8446                         pthread_cleanup_push(routine, 0);
8447                         pthread_cleanup_pop(0) /* ; */
8448   ;
8449   return 0;
8450 }
8451 _ACEOF
8452 if ac_fn_c_try_link "$LINENO"; then :
8453   ax_pthread_ok=yes
8454 fi
8455 rm -f core conftest.err conftest.$ac_objext \
8456     conftest$ac_exeext conftest.$ac_ext
8457
8458         LIBS="$save_LIBS"
8459         CFLAGS="$save_CFLAGS"
8460
8461         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
8462 $as_echo "$ax_pthread_ok" >&6; }
8463         if test "x$ax_pthread_ok" = xyes; then
8464                 break;
8465         fi
8466
8467         PTHREAD_LIBS=""
8468         PTHREAD_CFLAGS=""
8469 done
8470 fi
8471
8472 # Various other checks:
8473 if test "x$ax_pthread_ok" = xyes; then
8474         save_LIBS="$LIBS"
8475         LIBS="$PTHREAD_LIBS $LIBS"
8476         save_CFLAGS="$CFLAGS"
8477         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
8478
8479         # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
8480         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
8481 $as_echo_n "checking for joinable pthread attribute... " >&6; }
8482 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
8483   $as_echo_n "(cached) " >&6
8484 else
8485   ax_cv_PTHREAD_JOINABLE_ATTR=unknown
8486              for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
8487                  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8488 /* end confdefs.h.  */
8489 #include <pthread.h>
8490 int
8491 main ()
8492 {
8493 int attr = $attr; return attr /* ; */
8494   ;
8495   return 0;
8496 }
8497 _ACEOF
8498 if ac_fn_c_try_link "$LINENO"; then :
8499   ax_cv_PTHREAD_JOINABLE_ATTR=$attr; break
8500 fi
8501 rm -f core conftest.err conftest.$ac_objext \
8502     conftest$ac_exeext conftest.$ac_ext
8503              done
8504
8505 fi
8506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
8507 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
8508         if test "$ax_cv_PTHREAD_JOINABLE_ATTR" != unknown && \
8509                test "$ax_cv_PTHREAD_JOINABLE_ATTR" != PTHREAD_CREATE_JOINABLE; then :
8510
8511 cat >>confdefs.h <<_ACEOF
8512 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
8513 _ACEOF
8514
8515 fi
8516
8517         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
8518 $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
8519 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
8520   $as_echo_n "(cached) " >&6
8521 else
8522   ax_cv_PTHREAD_SPECIAL_FLAGS=no
8523              ax_pthread_special_flags_added=no
8524              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8525 /* end confdefs.h.  */
8526
8527 #                 if !defined(_REENTRANT) && !defined(_THREAD_SAFE)
8528                   AX_PTHREAD_NEED_SPECIAL_FLAG
8529 #                 endif
8530
8531 _ACEOF
8532 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8533   $EGREP "AX_PTHREAD_NEED_SPECIAL_FLAG" >/dev/null 2>&1; then :
8534   case $host_os in
8535                   aix* | freebsd*)
8536                   ax_cv_PTHREAD_SPECIAL_FLAGS="-D_THREAD_SAFE"
8537                   ;;
8538                   darwin* | hpux* | osf* | solaris*)
8539                   ax_cv_PTHREAD_SPECIAL_FLAGS="-D_REENTRANT"
8540                   ;;
8541                   esac
8542
8543 fi
8544 rm -f conftest*
8545
8546
8547 fi
8548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
8549 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
8550         if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
8551                test "x$ax_pthread_special_flags_added" != "xyes"; then :
8552   PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
8553                ax_pthread_special_flags_added=yes
8554 fi
8555
8556         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
8557 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
8558 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
8559   $as_echo_n "(cached) " >&6
8560 else
8561   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8562 /* end confdefs.h.  */
8563 #include <pthread.h>
8564 int
8565 main ()
8566 {
8567 int i = PTHREAD_PRIO_INHERIT;
8568   ;
8569   return 0;
8570 }
8571 _ACEOF
8572 if ac_fn_c_try_link "$LINENO"; then :
8573   ax_cv_PTHREAD_PRIO_INHERIT=yes
8574 else
8575   ax_cv_PTHREAD_PRIO_INHERIT=no
8576 fi
8577 rm -f core conftest.err conftest.$ac_objext \
8578     conftest$ac_exeext conftest.$ac_ext
8579
8580 fi
8581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
8582 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
8583         if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
8584
8585 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
8586
8587 fi
8588
8589         LIBS="$save_LIBS"
8590         CFLAGS="$save_CFLAGS"
8591
8592         # More AIX lossage: compile with *_r variant
8593         if test "x$GCC" != xyes; then
8594             case $host_os in
8595                 aix*)
8596                 case "x/$CC" in #(
8597   x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
8598     #handle absolute path differently from PATH based program lookup
8599                    case "x$CC" in #(
8600   x/*) :
8601     if as_fn_executable_p ${CC}_r; then :
8602   PTHREAD_CC="${CC}_r"
8603 fi ;; #(
8604   *) :
8605     for ac_prog in ${CC}_r
8606 do
8607   # Extract the first word of "$ac_prog", so it can be a program name with args.
8608 set dummy $ac_prog; ac_word=$2
8609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8610 $as_echo_n "checking for $ac_word... " >&6; }
8611 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
8612   $as_echo_n "(cached) " >&6
8613 else
8614   if test -n "$PTHREAD_CC"; then
8615   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
8616 else
8617 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8618 for as_dir in $PATH
8619 do
8620   IFS=$as_save_IFS
8621   test -z "$as_dir" && as_dir=.
8622     for ac_exec_ext in '' $ac_executable_extensions; do
8623   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8624     ac_cv_prog_PTHREAD_CC="$ac_prog"
8625     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8626     break 2
8627   fi
8628 done
8629   done
8630 IFS=$as_save_IFS
8631
8632 fi
8633 fi
8634 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
8635 if test -n "$PTHREAD_CC"; then
8636   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
8637 $as_echo "$PTHREAD_CC" >&6; }
8638 else
8639   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8640 $as_echo "no" >&6; }
8641 fi
8642
8643
8644   test -n "$PTHREAD_CC" && break
8645 done
8646 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
8647  ;;
8648 esac ;; #(
8649   *) :
8650      ;;
8651 esac
8652                 ;;
8653             esac
8654         fi
8655 fi
8656
8657 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
8658
8659
8660
8661
8662
8663 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
8664 if test x"$ax_pthread_ok" = xyes; then
8665
8666 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
8667
8668         :
8669 else
8670         ax_pthread_ok=no
8671
8672 fi
8673 ac_ext=c
8674 ac_cpp='$CPP $CPPFLAGS'
8675 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8676 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8677 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8678
8679         # set thread flags
8680
8681 # Some platforms use these, so just define them.  They can't hurt if they
8682 # are not supported.  For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
8683 # enables 5-arg getpwuid_r, among other things.
8684 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
8685
8686 # Check for *_r functions
8687 _CFLAGS="$CFLAGS"
8688 _LIBS="$LIBS"
8689 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
8690 LIBS="$LIBS $PTHREAD_LIBS"
8691
8692 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
8693 if test "x$ac_cv_header_pthread_h" = xyes; then :
8694
8695 else
8696   as_fn_error $? "
8697 pthread.h not found;  use --disable-thread-safety to disable thread safety" "$LINENO" 5
8698 fi
8699
8700
8701
8702 for ac_func in strerror_r getpwuid_r gethostbyname_r
8703 do :
8704   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8705 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8706 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8707   cat >>confdefs.h <<_ACEOF
8708 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8709 _ACEOF
8710
8711 fi
8712 done
8713
8714
8715 # Do test here with the proper thread flags
8716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
8717 $as_echo_n "checking whether strerror_r returns int... " >&6; }
8718 if ${pgac_cv_func_strerror_r_int+:} false; then :
8719   $as_echo_n "(cached) " >&6
8720 else
8721   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8722 /* end confdefs.h.  */
8723 #include <string.h>
8724 int
8725 main ()
8726 {
8727 #ifndef _AIX
8728 int strerror_r(int, char *, size_t);
8729 #else
8730 /* Older AIX has 'int' for the third argument so we don't test the args. */
8731 int strerror_r();
8732 #endif
8733   ;
8734   return 0;
8735 }
8736 _ACEOF
8737 if ac_fn_c_try_compile "$LINENO"; then :
8738   pgac_cv_func_strerror_r_int=yes
8739 else
8740   pgac_cv_func_strerror_r_int=no
8741 fi
8742 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8743 fi
8744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
8745 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
8746 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
8747
8748 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
8749
8750 fi
8751
8752
8753 CFLAGS="$_CFLAGS"
8754 LIBS="$_LIBS"
8755
8756
8757 else
8758    # else
8759 # do not use values from template file
8760 PTHREAD_CFLAGS=
8761 PTHREAD_LIBS=
8762
8763 fi # fi
8764
8765
8766
8767
8768
8769 ##
8770 ## Libraries
8771 ##
8772 ## Most libraries are included only if they demonstrably provide a function
8773 ## we need, but libm is an exception: always include it, because there are
8774 ## too many compilers that play cute optimization games that will break
8775 ## probes for standard functions such as pow().
8776 ##
8777
8778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
8779 $as_echo_n "checking for main in -lm... " >&6; }
8780 if ${ac_cv_lib_m_main+:} false; then :
8781   $as_echo_n "(cached) " >&6
8782 else
8783   ac_check_lib_save_LIBS=$LIBS
8784 LIBS="-lm  $LIBS"
8785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8786 /* end confdefs.h.  */
8787
8788
8789 int
8790 main ()
8791 {
8792 return main ();
8793   ;
8794   return 0;
8795 }
8796 _ACEOF
8797 if ac_fn_c_try_link "$LINENO"; then :
8798   ac_cv_lib_m_main=yes
8799 else
8800   ac_cv_lib_m_main=no
8801 fi
8802 rm -f core conftest.err conftest.$ac_objext \
8803     conftest$ac_exeext conftest.$ac_ext
8804 LIBS=$ac_check_lib_save_LIBS
8805 fi
8806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
8807 $as_echo "$ac_cv_lib_m_main" >&6; }
8808 if test "x$ac_cv_lib_m_main" = xyes; then :
8809   cat >>confdefs.h <<_ACEOF
8810 #define HAVE_LIBM 1
8811 _ACEOF
8812
8813   LIBS="-lm $LIBS"
8814
8815 fi
8816
8817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
8818 $as_echo_n "checking for library containing setproctitle... " >&6; }
8819 if ${ac_cv_search_setproctitle+:} false; then :
8820   $as_echo_n "(cached) " >&6
8821 else
8822   ac_func_search_save_LIBS=$LIBS
8823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8824 /* end confdefs.h.  */
8825
8826 /* Override any GCC internal prototype to avoid an error.
8827    Use char because int might match the return type of a GCC
8828    builtin and then its argument prototype would still apply.  */
8829 #ifdef __cplusplus
8830 extern "C"
8831 #endif
8832 char setproctitle ();
8833 int
8834 main ()
8835 {
8836 return setproctitle ();
8837   ;
8838   return 0;
8839 }
8840 _ACEOF
8841 for ac_lib in '' util; do
8842   if test -z "$ac_lib"; then
8843     ac_res="none required"
8844   else
8845     ac_res=-l$ac_lib
8846     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8847   fi
8848   if ac_fn_c_try_link "$LINENO"; then :
8849   ac_cv_search_setproctitle=$ac_res
8850 fi
8851 rm -f core conftest.err conftest.$ac_objext \
8852     conftest$ac_exeext
8853   if ${ac_cv_search_setproctitle+:} false; then :
8854   break
8855 fi
8856 done
8857 if ${ac_cv_search_setproctitle+:} false; then :
8858
8859 else
8860   ac_cv_search_setproctitle=no
8861 fi
8862 rm conftest.$ac_ext
8863 LIBS=$ac_func_search_save_LIBS
8864 fi
8865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
8866 $as_echo "$ac_cv_search_setproctitle" >&6; }
8867 ac_res=$ac_cv_search_setproctitle
8868 if test "$ac_res" != no; then :
8869   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8870
8871 fi
8872
8873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
8874 $as_echo_n "checking for library containing dlopen... " >&6; }
8875 if ${ac_cv_search_dlopen+:} false; then :
8876   $as_echo_n "(cached) " >&6
8877 else
8878   ac_func_search_save_LIBS=$LIBS
8879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8880 /* end confdefs.h.  */
8881
8882 /* Override any GCC internal prototype to avoid an error.
8883    Use char because int might match the return type of a GCC
8884    builtin and then its argument prototype would still apply.  */
8885 #ifdef __cplusplus
8886 extern "C"
8887 #endif
8888 char dlopen ();
8889 int
8890 main ()
8891 {
8892 return dlopen ();
8893   ;
8894   return 0;
8895 }
8896 _ACEOF
8897 for ac_lib in '' dl; do
8898   if test -z "$ac_lib"; then
8899     ac_res="none required"
8900   else
8901     ac_res=-l$ac_lib
8902     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8903   fi
8904   if ac_fn_c_try_link "$LINENO"; then :
8905   ac_cv_search_dlopen=$ac_res
8906 fi
8907 rm -f core conftest.err conftest.$ac_objext \
8908     conftest$ac_exeext
8909   if ${ac_cv_search_dlopen+:} false; then :
8910   break
8911 fi
8912 done
8913 if ${ac_cv_search_dlopen+:} false; then :
8914
8915 else
8916   ac_cv_search_dlopen=no
8917 fi
8918 rm conftest.$ac_ext
8919 LIBS=$ac_func_search_save_LIBS
8920 fi
8921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
8922 $as_echo "$ac_cv_search_dlopen" >&6; }
8923 ac_res=$ac_cv_search_dlopen
8924 if test "$ac_res" != no; then :
8925   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8926
8927 fi
8928
8929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
8930 $as_echo_n "checking for library containing socket... " >&6; }
8931 if ${ac_cv_search_socket+:} false; then :
8932   $as_echo_n "(cached) " >&6
8933 else
8934   ac_func_search_save_LIBS=$LIBS
8935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8936 /* end confdefs.h.  */
8937
8938 /* Override any GCC internal prototype to avoid an error.
8939    Use char because int might match the return type of a GCC
8940    builtin and then its argument prototype would still apply.  */
8941 #ifdef __cplusplus
8942 extern "C"
8943 #endif
8944 char socket ();
8945 int
8946 main ()
8947 {
8948 return socket ();
8949   ;
8950   return 0;
8951 }
8952 _ACEOF
8953 for ac_lib in '' socket ws2_32; do
8954   if test -z "$ac_lib"; then
8955     ac_res="none required"
8956   else
8957     ac_res=-l$ac_lib
8958     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8959   fi
8960   if ac_fn_c_try_link "$LINENO"; then :
8961   ac_cv_search_socket=$ac_res
8962 fi
8963 rm -f core conftest.err conftest.$ac_objext \
8964     conftest$ac_exeext
8965   if ${ac_cv_search_socket+:} false; then :
8966   break
8967 fi
8968 done
8969 if ${ac_cv_search_socket+:} false; then :
8970
8971 else
8972   ac_cv_search_socket=no
8973 fi
8974 rm conftest.$ac_ext
8975 LIBS=$ac_func_search_save_LIBS
8976 fi
8977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
8978 $as_echo "$ac_cv_search_socket" >&6; }
8979 ac_res=$ac_cv_search_socket
8980 if test "$ac_res" != no; then :
8981   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8982
8983 fi
8984
8985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
8986 $as_echo_n "checking for library containing shl_load... " >&6; }
8987 if ${ac_cv_search_shl_load+:} false; then :
8988   $as_echo_n "(cached) " >&6
8989 else
8990   ac_func_search_save_LIBS=$LIBS
8991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8992 /* end confdefs.h.  */
8993
8994 /* Override any GCC internal prototype to avoid an error.
8995    Use char because int might match the return type of a GCC
8996    builtin and then its argument prototype would still apply.  */
8997 #ifdef __cplusplus
8998 extern "C"
8999 #endif
9000 char shl_load ();
9001 int
9002 main ()
9003 {
9004 return shl_load ();
9005   ;
9006   return 0;
9007 }
9008 _ACEOF
9009 for ac_lib in '' dld; do
9010   if test -z "$ac_lib"; then
9011     ac_res="none required"
9012   else
9013     ac_res=-l$ac_lib
9014     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9015   fi
9016   if ac_fn_c_try_link "$LINENO"; then :
9017   ac_cv_search_shl_load=$ac_res
9018 fi
9019 rm -f core conftest.err conftest.$ac_objext \
9020     conftest$ac_exeext
9021   if ${ac_cv_search_shl_load+:} false; then :
9022   break
9023 fi
9024 done
9025 if ${ac_cv_search_shl_load+:} false; then :
9026
9027 else
9028   ac_cv_search_shl_load=no
9029 fi
9030 rm conftest.$ac_ext
9031 LIBS=$ac_func_search_save_LIBS
9032 fi
9033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
9034 $as_echo "$ac_cv_search_shl_load" >&6; }
9035 ac_res=$ac_cv_search_shl_load
9036 if test "$ac_res" != no; then :
9037   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9038
9039 fi
9040
9041 # We only use libld in port/dynloader/aix.c
9042 case $host_os in
9043      aix*)
9044         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ldopen" >&5
9045 $as_echo_n "checking for library containing ldopen... " >&6; }
9046 if ${ac_cv_search_ldopen+:} false; then :
9047   $as_echo_n "(cached) " >&6
9048 else
9049   ac_func_search_save_LIBS=$LIBS
9050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9051 /* end confdefs.h.  */
9052
9053 /* Override any GCC internal prototype to avoid an error.
9054    Use char because int might match the return type of a GCC
9055    builtin and then its argument prototype would still apply.  */
9056 #ifdef __cplusplus
9057 extern "C"
9058 #endif
9059 char ldopen ();
9060 int
9061 main ()
9062 {
9063 return ldopen ();
9064   ;
9065   return 0;
9066 }
9067 _ACEOF
9068 for ac_lib in '' ld; do
9069   if test -z "$ac_lib"; then
9070     ac_res="none required"
9071   else
9072     ac_res=-l$ac_lib
9073     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9074   fi
9075   if ac_fn_c_try_link "$LINENO"; then :
9076   ac_cv_search_ldopen=$ac_res
9077 fi
9078 rm -f core conftest.err conftest.$ac_objext \
9079     conftest$ac_exeext
9080   if ${ac_cv_search_ldopen+:} false; then :
9081   break
9082 fi
9083 done
9084 if ${ac_cv_search_ldopen+:} false; then :
9085
9086 else
9087   ac_cv_search_ldopen=no
9088 fi
9089 rm conftest.$ac_ext
9090 LIBS=$ac_func_search_save_LIBS
9091 fi
9092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ldopen" >&5
9093 $as_echo "$ac_cv_search_ldopen" >&6; }
9094 ac_res=$ac_cv_search_ldopen
9095 if test "$ac_res" != no; then :
9096   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9097
9098 fi
9099
9100         ;;
9101 esac
9102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
9103 $as_echo_n "checking for library containing getopt_long... " >&6; }
9104 if ${ac_cv_search_getopt_long+:} false; then :
9105   $as_echo_n "(cached) " >&6
9106 else
9107   ac_func_search_save_LIBS=$LIBS
9108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9109 /* end confdefs.h.  */
9110
9111 /* Override any GCC internal prototype to avoid an error.
9112    Use char because int might match the return type of a GCC
9113    builtin and then its argument prototype would still apply.  */
9114 #ifdef __cplusplus
9115 extern "C"
9116 #endif
9117 char getopt_long ();
9118 int
9119 main ()
9120 {
9121 return getopt_long ();
9122   ;
9123   return 0;
9124 }
9125 _ACEOF
9126 for ac_lib in '' getopt gnugetopt; do
9127   if test -z "$ac_lib"; then
9128     ac_res="none required"
9129   else
9130     ac_res=-l$ac_lib
9131     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9132   fi
9133   if ac_fn_c_try_link "$LINENO"; then :
9134   ac_cv_search_getopt_long=$ac_res
9135 fi
9136 rm -f core conftest.err conftest.$ac_objext \
9137     conftest$ac_exeext
9138   if ${ac_cv_search_getopt_long+:} false; then :
9139   break
9140 fi
9141 done
9142 if ${ac_cv_search_getopt_long+:} false; then :
9143
9144 else
9145   ac_cv_search_getopt_long=no
9146 fi
9147 rm conftest.$ac_ext
9148 LIBS=$ac_func_search_save_LIBS
9149 fi
9150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
9151 $as_echo "$ac_cv_search_getopt_long" >&6; }
9152 ac_res=$ac_cv_search_getopt_long
9153 if test "$ac_res" != no; then :
9154   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9155
9156 fi
9157
9158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
9159 $as_echo_n "checking for library containing crypt... " >&6; }
9160 if ${ac_cv_search_crypt+:} false; then :
9161   $as_echo_n "(cached) " >&6
9162 else
9163   ac_func_search_save_LIBS=$LIBS
9164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9165 /* end confdefs.h.  */
9166
9167 /* Override any GCC internal prototype to avoid an error.
9168    Use char because int might match the return type of a GCC
9169    builtin and then its argument prototype would still apply.  */
9170 #ifdef __cplusplus
9171 extern "C"
9172 #endif
9173 char crypt ();
9174 int
9175 main ()
9176 {
9177 return crypt ();
9178   ;
9179   return 0;
9180 }
9181 _ACEOF
9182 for ac_lib in '' crypt; do
9183   if test -z "$ac_lib"; then
9184     ac_res="none required"
9185   else
9186     ac_res=-l$ac_lib
9187     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9188   fi
9189   if ac_fn_c_try_link "$LINENO"; then :
9190   ac_cv_search_crypt=$ac_res
9191 fi
9192 rm -f core conftest.err conftest.$ac_objext \
9193     conftest$ac_exeext
9194   if ${ac_cv_search_crypt+:} false; then :
9195   break
9196 fi
9197 done
9198 if ${ac_cv_search_crypt+:} false; then :
9199
9200 else
9201   ac_cv_search_crypt=no
9202 fi
9203 rm conftest.$ac_ext
9204 LIBS=$ac_func_search_save_LIBS
9205 fi
9206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
9207 $as_echo "$ac_cv_search_crypt" >&6; }
9208 ac_res=$ac_cv_search_crypt
9209 if test "$ac_res" != no; then :
9210   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9211
9212 fi
9213
9214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
9215 $as_echo_n "checking for library containing shm_open... " >&6; }
9216 if ${ac_cv_search_shm_open+:} false; then :
9217   $as_echo_n "(cached) " >&6
9218 else
9219   ac_func_search_save_LIBS=$LIBS
9220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9221 /* end confdefs.h.  */
9222
9223 /* Override any GCC internal prototype to avoid an error.
9224    Use char because int might match the return type of a GCC
9225    builtin and then its argument prototype would still apply.  */
9226 #ifdef __cplusplus
9227 extern "C"
9228 #endif
9229 char shm_open ();
9230 int
9231 main ()
9232 {
9233 return shm_open ();
9234   ;
9235   return 0;
9236 }
9237 _ACEOF
9238 for ac_lib in '' rt; do
9239   if test -z "$ac_lib"; then
9240     ac_res="none required"
9241   else
9242     ac_res=-l$ac_lib
9243     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9244   fi
9245   if ac_fn_c_try_link "$LINENO"; then :
9246   ac_cv_search_shm_open=$ac_res
9247 fi
9248 rm -f core conftest.err conftest.$ac_objext \
9249     conftest$ac_exeext
9250   if ${ac_cv_search_shm_open+:} false; then :
9251   break
9252 fi
9253 done
9254 if ${ac_cv_search_shm_open+:} false; then :
9255
9256 else
9257   ac_cv_search_shm_open=no
9258 fi
9259 rm conftest.$ac_ext
9260 LIBS=$ac_func_search_save_LIBS
9261 fi
9262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
9263 $as_echo "$ac_cv_search_shm_open" >&6; }
9264 ac_res=$ac_cv_search_shm_open
9265 if test "$ac_res" != no; then :
9266   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9267
9268 fi
9269
9270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
9271 $as_echo_n "checking for library containing shm_unlink... " >&6; }
9272 if ${ac_cv_search_shm_unlink+:} false; then :
9273   $as_echo_n "(cached) " >&6
9274 else
9275   ac_func_search_save_LIBS=$LIBS
9276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9277 /* end confdefs.h.  */
9278
9279 /* Override any GCC internal prototype to avoid an error.
9280    Use char because int might match the return type of a GCC
9281    builtin and then its argument prototype would still apply.  */
9282 #ifdef __cplusplus
9283 extern "C"
9284 #endif
9285 char shm_unlink ();
9286 int
9287 main ()
9288 {
9289 return shm_unlink ();
9290   ;
9291   return 0;
9292 }
9293 _ACEOF
9294 for ac_lib in '' rt; do
9295   if test -z "$ac_lib"; then
9296     ac_res="none required"
9297   else
9298     ac_res=-l$ac_lib
9299     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9300   fi
9301   if ac_fn_c_try_link "$LINENO"; then :
9302   ac_cv_search_shm_unlink=$ac_res
9303 fi
9304 rm -f core conftest.err conftest.$ac_objext \
9305     conftest$ac_exeext
9306   if ${ac_cv_search_shm_unlink+:} false; then :
9307   break
9308 fi
9309 done
9310 if ${ac_cv_search_shm_unlink+:} false; then :
9311
9312 else
9313   ac_cv_search_shm_unlink=no
9314 fi
9315 rm conftest.$ac_ext
9316 LIBS=$ac_func_search_save_LIBS
9317 fi
9318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
9319 $as_echo "$ac_cv_search_shm_unlink" >&6; }
9320 ac_res=$ac_cv_search_shm_unlink
9321 if test "$ac_res" != no; then :
9322   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9323
9324 fi
9325
9326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
9327 $as_echo_n "checking for library containing clock_gettime... " >&6; }
9328 if ${ac_cv_search_clock_gettime+:} false; then :
9329   $as_echo_n "(cached) " >&6
9330 else
9331   ac_func_search_save_LIBS=$LIBS
9332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9333 /* end confdefs.h.  */
9334
9335 /* Override any GCC internal prototype to avoid an error.
9336    Use char because int might match the return type of a GCC
9337    builtin and then its argument prototype would still apply.  */
9338 #ifdef __cplusplus
9339 extern "C"
9340 #endif
9341 char clock_gettime ();
9342 int
9343 main ()
9344 {
9345 return clock_gettime ();
9346   ;
9347   return 0;
9348 }
9349 _ACEOF
9350 for ac_lib in '' rt posix4; do
9351   if test -z "$ac_lib"; then
9352     ac_res="none required"
9353   else
9354     ac_res=-l$ac_lib
9355     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9356   fi
9357   if ac_fn_c_try_link "$LINENO"; then :
9358   ac_cv_search_clock_gettime=$ac_res
9359 fi
9360 rm -f core conftest.err conftest.$ac_objext \
9361     conftest$ac_exeext
9362   if ${ac_cv_search_clock_gettime+:} false; then :
9363   break
9364 fi
9365 done
9366 if ${ac_cv_search_clock_gettime+:} false; then :
9367
9368 else
9369   ac_cv_search_clock_gettime=no
9370 fi
9371 rm conftest.$ac_ext
9372 LIBS=$ac_func_search_save_LIBS
9373 fi
9374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
9375 $as_echo "$ac_cv_search_clock_gettime" >&6; }
9376 ac_res=$ac_cv_search_clock_gettime
9377 if test "$ac_res" != no; then :
9378   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9379
9380 fi
9381
9382 # Solaris:
9383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
9384 $as_echo_n "checking for library containing fdatasync... " >&6; }
9385 if ${ac_cv_search_fdatasync+:} false; then :
9386   $as_echo_n "(cached) " >&6
9387 else
9388   ac_func_search_save_LIBS=$LIBS
9389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9390 /* end confdefs.h.  */
9391
9392 /* Override any GCC internal prototype to avoid an error.
9393    Use char because int might match the return type of a GCC
9394    builtin and then its argument prototype would still apply.  */
9395 #ifdef __cplusplus
9396 extern "C"
9397 #endif
9398 char fdatasync ();
9399 int
9400 main ()
9401 {
9402 return fdatasync ();
9403   ;
9404   return 0;
9405 }
9406 _ACEOF
9407 for ac_lib in '' rt posix4; do
9408   if test -z "$ac_lib"; then
9409     ac_res="none required"
9410   else
9411     ac_res=-l$ac_lib
9412     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9413   fi
9414   if ac_fn_c_try_link "$LINENO"; then :
9415   ac_cv_search_fdatasync=$ac_res
9416 fi
9417 rm -f core conftest.err conftest.$ac_objext \
9418     conftest$ac_exeext
9419   if ${ac_cv_search_fdatasync+:} false; then :
9420   break
9421 fi
9422 done
9423 if ${ac_cv_search_fdatasync+:} false; then :
9424
9425 else
9426   ac_cv_search_fdatasync=no
9427 fi
9428 rm conftest.$ac_ext
9429 LIBS=$ac_func_search_save_LIBS
9430 fi
9431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
9432 $as_echo "$ac_cv_search_fdatasync" >&6; }
9433 ac_res=$ac_cv_search_fdatasync
9434 if test "$ac_res" != no; then :
9435   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9436
9437 fi
9438
9439 # Required for thread_test.c on Solaris
9440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sched_yield" >&5
9441 $as_echo_n "checking for library containing sched_yield... " >&6; }
9442 if ${ac_cv_search_sched_yield+:} false; then :
9443   $as_echo_n "(cached) " >&6
9444 else
9445   ac_func_search_save_LIBS=$LIBS
9446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9447 /* end confdefs.h.  */
9448
9449 /* Override any GCC internal prototype to avoid an error.
9450    Use char because int might match the return type of a GCC
9451    builtin and then its argument prototype would still apply.  */
9452 #ifdef __cplusplus
9453 extern "C"
9454 #endif
9455 char sched_yield ();
9456 int
9457 main ()
9458 {
9459 return sched_yield ();
9460   ;
9461   return 0;
9462 }
9463 _ACEOF
9464 for ac_lib in '' rt; do
9465   if test -z "$ac_lib"; then
9466     ac_res="none required"
9467   else
9468     ac_res=-l$ac_lib
9469     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9470   fi
9471   if ac_fn_c_try_link "$LINENO"; then :
9472   ac_cv_search_sched_yield=$ac_res
9473 fi
9474 rm -f core conftest.err conftest.$ac_objext \
9475     conftest$ac_exeext
9476   if ${ac_cv_search_sched_yield+:} false; then :
9477   break
9478 fi
9479 done
9480 if ${ac_cv_search_sched_yield+:} false; then :
9481
9482 else
9483   ac_cv_search_sched_yield=no
9484 fi
9485 rm conftest.$ac_ext
9486 LIBS=$ac_func_search_save_LIBS
9487 fi
9488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sched_yield" >&5
9489 $as_echo "$ac_cv_search_sched_yield" >&6; }
9490 ac_res=$ac_cv_search_sched_yield
9491 if test "$ac_res" != no; then :
9492   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9493
9494 fi
9495
9496 # Required for thread_test.c on Solaris 2.5:
9497 # Other ports use it too (HP-UX) so test unconditionally
9498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
9499 $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
9500 if ${ac_cv_search_gethostbyname_r+:} false; then :
9501   $as_echo_n "(cached) " >&6
9502 else
9503   ac_func_search_save_LIBS=$LIBS
9504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9505 /* end confdefs.h.  */
9506
9507 /* Override any GCC internal prototype to avoid an error.
9508    Use char because int might match the return type of a GCC
9509    builtin and then its argument prototype would still apply.  */
9510 #ifdef __cplusplus
9511 extern "C"
9512 #endif
9513 char gethostbyname_r ();
9514 int
9515 main ()
9516 {
9517 return gethostbyname_r ();
9518   ;
9519   return 0;
9520 }
9521 _ACEOF
9522 for ac_lib in '' nsl; do
9523   if test -z "$ac_lib"; then
9524     ac_res="none required"
9525   else
9526     ac_res=-l$ac_lib
9527     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9528   fi
9529   if ac_fn_c_try_link "$LINENO"; then :
9530   ac_cv_search_gethostbyname_r=$ac_res
9531 fi
9532 rm -f core conftest.err conftest.$ac_objext \
9533     conftest$ac_exeext
9534   if ${ac_cv_search_gethostbyname_r+:} false; then :
9535   break
9536 fi
9537 done
9538 if ${ac_cv_search_gethostbyname_r+:} false; then :
9539
9540 else
9541   ac_cv_search_gethostbyname_r=no
9542 fi
9543 rm conftest.$ac_ext
9544 LIBS=$ac_func_search_save_LIBS
9545 fi
9546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
9547 $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
9548 ac_res=$ac_cv_search_gethostbyname_r
9549 if test "$ac_res" != no; then :
9550   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9551
9552 fi
9553
9554 # Cygwin:
9555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
9556 $as_echo_n "checking for library containing shmget... " >&6; }
9557 if ${ac_cv_search_shmget+:} false; then :
9558   $as_echo_n "(cached) " >&6
9559 else
9560   ac_func_search_save_LIBS=$LIBS
9561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9562 /* end confdefs.h.  */
9563
9564 /* Override any GCC internal prototype to avoid an error.
9565    Use char because int might match the return type of a GCC
9566    builtin and then its argument prototype would still apply.  */
9567 #ifdef __cplusplus
9568 extern "C"
9569 #endif
9570 char shmget ();
9571 int
9572 main ()
9573 {
9574 return shmget ();
9575   ;
9576   return 0;
9577 }
9578 _ACEOF
9579 for ac_lib in '' cygipc; do
9580   if test -z "$ac_lib"; then
9581     ac_res="none required"
9582   else
9583     ac_res=-l$ac_lib
9584     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9585   fi
9586   if ac_fn_c_try_link "$LINENO"; then :
9587   ac_cv_search_shmget=$ac_res
9588 fi
9589 rm -f core conftest.err conftest.$ac_objext \
9590     conftest$ac_exeext
9591   if ${ac_cv_search_shmget+:} false; then :
9592   break
9593 fi
9594 done
9595 if ${ac_cv_search_shmget+:} false; then :
9596
9597 else
9598   ac_cv_search_shmget=no
9599 fi
9600 rm conftest.$ac_ext
9601 LIBS=$ac_func_search_save_LIBS
9602 fi
9603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
9604 $as_echo "$ac_cv_search_shmget" >&6; }
9605 ac_res=$ac_cv_search_shmget
9606 if test "$ac_res" != no; then :
9607   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9608
9609 fi
9610
9611
9612 if test "$with_readline" = yes; then
9613
9614
9615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
9616 $as_echo_n "checking for library containing readline... " >&6; }
9617 if ${pgac_cv_check_readline+:} false; then :
9618   $as_echo_n "(cached) " >&6
9619 else
9620   pgac_cv_check_readline=no
9621 pgac_save_LIBS=$LIBS
9622 if test x"$with_libedit_preferred" != x"yes"
9623 then    READLINE_ORDER="-lreadline -ledit"
9624 else    READLINE_ORDER="-ledit -lreadline"
9625 fi
9626 for pgac_rllib in $READLINE_ORDER ; do
9627   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
9628     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
9629     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9630 /* end confdefs.h.  */
9631
9632 /* Override any GCC internal prototype to avoid an error.
9633    Use char because int might match the return type of a GCC
9634    builtin and then its argument prototype would still apply.  */
9635 #ifdef __cplusplus
9636 extern "C"
9637 #endif
9638 char readline ();
9639 int
9640 main ()
9641 {
9642 return readline ();
9643   ;
9644   return 0;
9645 }
9646 _ACEOF
9647 if ac_fn_c_try_link "$LINENO"; then :
9648
9649       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
9650       # recognize dependent libraries; assume curses is needed if we didn't
9651       # find any dependency.
9652       case $host_os in
9653         netbsd* | openbsd* | irix*)
9654           if test x"$pgac_lib" = x"" ; then
9655             pgac_lib=" -lcurses"
9656           fi ;;
9657       esac
9658
9659       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
9660       break
9661
9662 fi
9663 rm -f core conftest.err conftest.$ac_objext \
9664     conftest$ac_exeext conftest.$ac_ext
9665   done
9666   if test "$pgac_cv_check_readline" != no ; then
9667     break
9668   fi
9669 done
9670 LIBS=$pgac_save_LIBS
9671
9672 fi
9673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
9674 $as_echo "$pgac_cv_check_readline" >&6; }
9675 if test "$pgac_cv_check_readline" != no ; then
9676   LIBS="$pgac_cv_check_readline $LIBS"
9677
9678 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
9679
9680 fi
9681
9682
9683   if test x"$pgac_cv_check_readline" = x"no"; then
9684     as_fn_error $? "readline library not found
9685 If you have readline already installed, see config.log for details on the
9686 failure.  It is possible the compiler isn't looking in the proper directory.
9687 Use --without-readline to disable readline support." "$LINENO" 5
9688   fi
9689 fi
9690
9691 if test "$with_zlib" = yes; then
9692   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
9693 $as_echo_n "checking for inflate in -lz... " >&6; }
9694 if ${ac_cv_lib_z_inflate+:} false; then :
9695   $as_echo_n "(cached) " >&6
9696 else
9697   ac_check_lib_save_LIBS=$LIBS
9698 LIBS="-lz  $LIBS"
9699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9700 /* end confdefs.h.  */
9701
9702 /* Override any GCC internal prototype to avoid an error.
9703    Use char because int might match the return type of a GCC
9704    builtin and then its argument prototype would still apply.  */
9705 #ifdef __cplusplus
9706 extern "C"
9707 #endif
9708 char inflate ();
9709 int
9710 main ()
9711 {
9712 return inflate ();
9713   ;
9714   return 0;
9715 }
9716 _ACEOF
9717 if ac_fn_c_try_link "$LINENO"; then :
9718   ac_cv_lib_z_inflate=yes
9719 else
9720   ac_cv_lib_z_inflate=no
9721 fi
9722 rm -f core conftest.err conftest.$ac_objext \
9723     conftest$ac_exeext conftest.$ac_ext
9724 LIBS=$ac_check_lib_save_LIBS
9725 fi
9726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
9727 $as_echo "$ac_cv_lib_z_inflate" >&6; }
9728 if test "x$ac_cv_lib_z_inflate" = xyes; then :
9729   cat >>confdefs.h <<_ACEOF
9730 #define HAVE_LIBZ 1
9731 _ACEOF
9732
9733   LIBS="-lz $LIBS"
9734
9735 else
9736   as_fn_error $? "zlib library not found
9737 If you have zlib already installed, see config.log for details on the
9738 failure.  It is possible the compiler isn't looking in the proper directory.
9739 Use --without-zlib to disable zlib support." "$LINENO" 5
9740 fi
9741
9742 fi
9743
9744 if test "$enable_spinlocks" = yes; then
9745
9746 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
9747
9748 else
9749   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9750 *** Not using spinlocks will cause poor performance." >&5
9751 $as_echo "$as_me: WARNING:
9752 *** Not using spinlocks will cause poor performance." >&2;}
9753 fi
9754
9755 if test "$enable_atomics" = yes; then
9756
9757 $as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
9758
9759 else
9760   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9761 *** Not using atomic operations will cause poor performance." >&5
9762 $as_echo "$as_me: WARNING:
9763 *** Not using atomic operations will cause poor performance." >&2;}
9764 fi
9765
9766 if test "$with_gssapi" = yes ; then
9767   if test "$PORTNAME" != "win32"; then
9768     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
9769 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
9770 if ${ac_cv_search_gss_init_sec_context+:} false; then :
9771   $as_echo_n "(cached) " >&6
9772 else
9773   ac_func_search_save_LIBS=$LIBS
9774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9775 /* end confdefs.h.  */
9776
9777 /* Override any GCC internal prototype to avoid an error.
9778    Use char because int might match the return type of a GCC
9779    builtin and then its argument prototype would still apply.  */
9780 #ifdef __cplusplus
9781 extern "C"
9782 #endif
9783 char gss_init_sec_context ();
9784 int
9785 main ()
9786 {
9787 return gss_init_sec_context ();
9788   ;
9789   return 0;
9790 }
9791 _ACEOF
9792 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
9793   if test -z "$ac_lib"; then
9794     ac_res="none required"
9795   else
9796     ac_res=-l$ac_lib
9797     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9798   fi
9799   if ac_fn_c_try_link "$LINENO"; then :
9800   ac_cv_search_gss_init_sec_context=$ac_res
9801 fi
9802 rm -f core conftest.err conftest.$ac_objext \
9803     conftest$ac_exeext
9804   if ${ac_cv_search_gss_init_sec_context+:} false; then :
9805   break
9806 fi
9807 done
9808 if ${ac_cv_search_gss_init_sec_context+:} false; then :
9809
9810 else
9811   ac_cv_search_gss_init_sec_context=no
9812 fi
9813 rm conftest.$ac_ext
9814 LIBS=$ac_func_search_save_LIBS
9815 fi
9816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
9817 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
9818 ac_res=$ac_cv_search_gss_init_sec_context
9819 if test "$ac_res" != no; then :
9820   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9821
9822 else
9823   as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
9824 fi
9825
9826   else
9827     LIBS="$LIBS -lgssapi32"
9828   fi
9829 fi
9830
9831 if test "$with_openssl" = yes ; then
9832     if test "$PORTNAME" != "win32"; then
9833      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
9834 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
9835 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
9836   $as_echo_n "(cached) " >&6
9837 else
9838   ac_check_lib_save_LIBS=$LIBS
9839 LIBS="-lcrypto  $LIBS"
9840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9841 /* end confdefs.h.  */
9842
9843 /* Override any GCC internal prototype to avoid an error.
9844    Use char because int might match the return type of a GCC
9845    builtin and then its argument prototype would still apply.  */
9846 #ifdef __cplusplus
9847 extern "C"
9848 #endif
9849 char CRYPTO_new_ex_data ();
9850 int
9851 main ()
9852 {
9853 return CRYPTO_new_ex_data ();
9854   ;
9855   return 0;
9856 }
9857 _ACEOF
9858 if ac_fn_c_try_link "$LINENO"; then :
9859   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
9860 else
9861   ac_cv_lib_crypto_CRYPTO_new_ex_data=no
9862 fi
9863 rm -f core conftest.err conftest.$ac_objext \
9864     conftest$ac_exeext conftest.$ac_ext
9865 LIBS=$ac_check_lib_save_LIBS
9866 fi
9867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
9868 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
9869 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
9870   cat >>confdefs.h <<_ACEOF
9871 #define HAVE_LIBCRYPTO 1
9872 _ACEOF
9873
9874   LIBS="-lcrypto $LIBS"
9875
9876 else
9877   as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
9878 fi
9879
9880      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
9881 $as_echo_n "checking for SSL_new in -lssl... " >&6; }
9882 if ${ac_cv_lib_ssl_SSL_new+:} false; then :
9883   $as_echo_n "(cached) " >&6
9884 else
9885   ac_check_lib_save_LIBS=$LIBS
9886 LIBS="-lssl  $LIBS"
9887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9888 /* end confdefs.h.  */
9889
9890 /* Override any GCC internal prototype to avoid an error.
9891    Use char because int might match the return type of a GCC
9892    builtin and then its argument prototype would still apply.  */
9893 #ifdef __cplusplus
9894 extern "C"
9895 #endif
9896 char SSL_new ();
9897 int
9898 main ()
9899 {
9900 return SSL_new ();
9901   ;
9902   return 0;
9903 }
9904 _ACEOF
9905 if ac_fn_c_try_link "$LINENO"; then :
9906   ac_cv_lib_ssl_SSL_new=yes
9907 else
9908   ac_cv_lib_ssl_SSL_new=no
9909 fi
9910 rm -f core conftest.err conftest.$ac_objext \
9911     conftest$ac_exeext conftest.$ac_ext
9912 LIBS=$ac_check_lib_save_LIBS
9913 fi
9914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
9915 $as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
9916 if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
9917   cat >>confdefs.h <<_ACEOF
9918 #define HAVE_LIBSSL 1
9919 _ACEOF
9920
9921   LIBS="-lssl $LIBS"
9922
9923 else
9924   as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
9925 fi
9926
9927   else
9928      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
9929 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
9930 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
9931   $as_echo_n "(cached) " >&6
9932 else
9933   ac_func_search_save_LIBS=$LIBS
9934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9935 /* end confdefs.h.  */
9936
9937 /* Override any GCC internal prototype to avoid an error.
9938    Use char because int might match the return type of a GCC
9939    builtin and then its argument prototype would still apply.  */
9940 #ifdef __cplusplus
9941 extern "C"
9942 #endif
9943 char CRYPTO_new_ex_data ();
9944 int
9945 main ()
9946 {
9947 return CRYPTO_new_ex_data ();
9948   ;
9949   return 0;
9950 }
9951 _ACEOF
9952 for ac_lib in '' eay32 crypto; do
9953   if test -z "$ac_lib"; then
9954     ac_res="none required"
9955   else
9956     ac_res=-l$ac_lib
9957     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9958   fi
9959   if ac_fn_c_try_link "$LINENO"; then :
9960   ac_cv_search_CRYPTO_new_ex_data=$ac_res
9961 fi
9962 rm -f core conftest.err conftest.$ac_objext \
9963     conftest$ac_exeext
9964   if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
9965   break
9966 fi
9967 done
9968 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
9969
9970 else
9971   ac_cv_search_CRYPTO_new_ex_data=no
9972 fi
9973 rm conftest.$ac_ext
9974 LIBS=$ac_func_search_save_LIBS
9975 fi
9976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
9977 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
9978 ac_res=$ac_cv_search_CRYPTO_new_ex_data
9979 if test "$ac_res" != no; then :
9980   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9981
9982 else
9983   as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
9984 fi
9985
9986      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
9987 $as_echo_n "checking for library containing SSL_new... " >&6; }
9988 if ${ac_cv_search_SSL_new+:} false; then :
9989   $as_echo_n "(cached) " >&6
9990 else
9991   ac_func_search_save_LIBS=$LIBS
9992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9993 /* end confdefs.h.  */
9994
9995 /* Override any GCC internal prototype to avoid an error.
9996    Use char because int might match the return type of a GCC
9997    builtin and then its argument prototype would still apply.  */
9998 #ifdef __cplusplus
9999 extern "C"
10000 #endif
10001 char SSL_new ();
10002 int
10003 main ()
10004 {
10005 return SSL_new ();
10006   ;
10007   return 0;
10008 }
10009 _ACEOF
10010 for ac_lib in '' ssleay32 ssl; do
10011   if test -z "$ac_lib"; then
10012     ac_res="none required"
10013   else
10014     ac_res=-l$ac_lib
10015     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10016   fi
10017   if ac_fn_c_try_link "$LINENO"; then :
10018   ac_cv_search_SSL_new=$ac_res
10019 fi
10020 rm -f core conftest.err conftest.$ac_objext \
10021     conftest$ac_exeext
10022   if ${ac_cv_search_SSL_new+:} false; then :
10023   break
10024 fi
10025 done
10026 if ${ac_cv_search_SSL_new+:} false; then :
10027
10028 else
10029   ac_cv_search_SSL_new=no
10030 fi
10031 rm conftest.$ac_ext
10032 LIBS=$ac_func_search_save_LIBS
10033 fi
10034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
10035 $as_echo "$ac_cv_search_SSL_new" >&6; }
10036 ac_res=$ac_cv_search_SSL_new
10037 if test "$ac_res" != no; then :
10038   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10039
10040 else
10041   as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
10042 fi
10043
10044   fi
10045   for ac_func in SSL_get_current_compression
10046 do :
10047   ac_fn_c_check_func "$LINENO" "SSL_get_current_compression" "ac_cv_func_SSL_get_current_compression"
10048 if test "x$ac_cv_func_SSL_get_current_compression" = xyes; then :
10049   cat >>confdefs.h <<_ACEOF
10050 #define HAVE_SSL_GET_CURRENT_COMPRESSION 1
10051 _ACEOF
10052
10053 fi
10054 done
10055
10056   # Functions introduced in OpenSSL 1.1.0. We used to check for
10057   # OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
10058   # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
10059   # doesn't have these OpenSSL 1.1.0 functions. So check for individual
10060   # functions.
10061   for ac_func in OPENSSL_init_ssl BIO_get_data BIO_meth_new ASN1_STRING_get0_data RAND_OpenSSL
10062 do :
10063   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10064 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10065 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10066   cat >>confdefs.h <<_ACEOF
10067 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10068 _ACEOF
10069
10070 fi
10071 done
10072
10073   # OpenSSL versions before 1.1.0 required setting callback functions, for
10074   # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
10075   # function was removed.
10076   for ac_func in CRYPTO_lock
10077 do :
10078   ac_fn_c_check_func "$LINENO" "CRYPTO_lock" "ac_cv_func_CRYPTO_lock"
10079 if test "x$ac_cv_func_CRYPTO_lock" = xyes; then :
10080   cat >>confdefs.h <<_ACEOF
10081 #define HAVE_CRYPTO_LOCK 1
10082 _ACEOF
10083
10084 fi
10085 done
10086
10087 fi
10088
10089 if test "$with_pam" = yes ; then
10090   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
10091 $as_echo_n "checking for pam_start in -lpam... " >&6; }
10092 if ${ac_cv_lib_pam_pam_start+:} false; then :
10093   $as_echo_n "(cached) " >&6
10094 else
10095   ac_check_lib_save_LIBS=$LIBS
10096 LIBS="-lpam  $LIBS"
10097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10098 /* end confdefs.h.  */
10099
10100 /* Override any GCC internal prototype to avoid an error.
10101    Use char because int might match the return type of a GCC
10102    builtin and then its argument prototype would still apply.  */
10103 #ifdef __cplusplus
10104 extern "C"
10105 #endif
10106 char pam_start ();
10107 int
10108 main ()
10109 {
10110 return pam_start ();
10111   ;
10112   return 0;
10113 }
10114 _ACEOF
10115 if ac_fn_c_try_link "$LINENO"; then :
10116   ac_cv_lib_pam_pam_start=yes
10117 else
10118   ac_cv_lib_pam_pam_start=no
10119 fi
10120 rm -f core conftest.err conftest.$ac_objext \
10121     conftest$ac_exeext conftest.$ac_ext
10122 LIBS=$ac_check_lib_save_LIBS
10123 fi
10124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
10125 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
10126 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
10127   cat >>confdefs.h <<_ACEOF
10128 #define HAVE_LIBPAM 1
10129 _ACEOF
10130
10131   LIBS="-lpam $LIBS"
10132
10133 else
10134   as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
10135 fi
10136
10137 fi
10138
10139 if test "$with_libxml" = yes ; then
10140   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
10141 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
10142 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
10143   $as_echo_n "(cached) " >&6
10144 else
10145   ac_check_lib_save_LIBS=$LIBS
10146 LIBS="-lxml2  $LIBS"
10147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10148 /* end confdefs.h.  */
10149
10150 /* Override any GCC internal prototype to avoid an error.
10151    Use char because int might match the return type of a GCC
10152    builtin and then its argument prototype would still apply.  */
10153 #ifdef __cplusplus
10154 extern "C"
10155 #endif
10156 char xmlSaveToBuffer ();
10157 int
10158 main ()
10159 {
10160 return xmlSaveToBuffer ();
10161   ;
10162   return 0;
10163 }
10164 _ACEOF
10165 if ac_fn_c_try_link "$LINENO"; then :
10166   ac_cv_lib_xml2_xmlSaveToBuffer=yes
10167 else
10168   ac_cv_lib_xml2_xmlSaveToBuffer=no
10169 fi
10170 rm -f core conftest.err conftest.$ac_objext \
10171     conftest$ac_exeext conftest.$ac_ext
10172 LIBS=$ac_check_lib_save_LIBS
10173 fi
10174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
10175 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
10176 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
10177   cat >>confdefs.h <<_ACEOF
10178 #define HAVE_LIBXML2 1
10179 _ACEOF
10180
10181   LIBS="-lxml2 $LIBS"
10182
10183 else
10184   as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
10185 fi
10186
10187 fi
10188
10189 if test "$with_libxslt" = yes ; then
10190   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
10191 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
10192 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
10193   $as_echo_n "(cached) " >&6
10194 else
10195   ac_check_lib_save_LIBS=$LIBS
10196 LIBS="-lxslt  $LIBS"
10197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10198 /* end confdefs.h.  */
10199
10200 /* Override any GCC internal prototype to avoid an error.
10201    Use char because int might match the return type of a GCC
10202    builtin and then its argument prototype would still apply.  */
10203 #ifdef __cplusplus
10204 extern "C"
10205 #endif
10206 char xsltCleanupGlobals ();
10207 int
10208 main ()
10209 {
10210 return xsltCleanupGlobals ();
10211   ;
10212   return 0;
10213 }
10214 _ACEOF
10215 if ac_fn_c_try_link "$LINENO"; then :
10216   ac_cv_lib_xslt_xsltCleanupGlobals=yes
10217 else
10218   ac_cv_lib_xslt_xsltCleanupGlobals=no
10219 fi
10220 rm -f core conftest.err conftest.$ac_objext \
10221     conftest$ac_exeext conftest.$ac_ext
10222 LIBS=$ac_check_lib_save_LIBS
10223 fi
10224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
10225 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
10226 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
10227   cat >>confdefs.h <<_ACEOF
10228 #define HAVE_LIBXSLT 1
10229 _ACEOF
10230
10231   LIBS="-lxslt $LIBS"
10232
10233 else
10234   as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
10235 fi
10236
10237 fi
10238
10239 # Note: We can test for libldap_r only after we know PTHREAD_LIBS
10240 if test "$with_ldap" = yes ; then
10241   _LIBS="$LIBS"
10242   if test "$PORTNAME" != "win32"; then
10243     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
10244 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
10245 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
10246   $as_echo_n "(cached) " >&6
10247 else
10248   ac_check_lib_save_LIBS=$LIBS
10249 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
10250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10251 /* end confdefs.h.  */
10252
10253 /* Override any GCC internal prototype to avoid an error.
10254    Use char because int might match the return type of a GCC
10255    builtin and then its argument prototype would still apply.  */
10256 #ifdef __cplusplus
10257 extern "C"
10258 #endif
10259 char ldap_bind ();
10260 int
10261 main ()
10262 {
10263 return ldap_bind ();
10264   ;
10265   return 0;
10266 }
10267 _ACEOF
10268 if ac_fn_c_try_link "$LINENO"; then :
10269   ac_cv_lib_ldap_ldap_bind=yes
10270 else
10271   ac_cv_lib_ldap_ldap_bind=no
10272 fi
10273 rm -f core conftest.err conftest.$ac_objext \
10274     conftest$ac_exeext conftest.$ac_ext
10275 LIBS=$ac_check_lib_save_LIBS
10276 fi
10277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
10278 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
10279 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
10280   cat >>confdefs.h <<_ACEOF
10281 #define HAVE_LIBLDAP 1
10282 _ACEOF
10283
10284   LIBS="-lldap $LIBS"
10285
10286 else
10287   as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
10288 fi
10289
10290     LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
10291     if test "$enable_thread_safety" = yes; then
10292       # on some platforms ldap_r fails to link without PTHREAD_LIBS
10293       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_simple_bind in -lldap_r" >&5
10294 $as_echo_n "checking for ldap_simple_bind in -lldap_r... " >&6; }
10295 if ${ac_cv_lib_ldap_r_ldap_simple_bind+:} false; then :
10296   $as_echo_n "(cached) " >&6
10297 else
10298   ac_check_lib_save_LIBS=$LIBS
10299 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
10300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10301 /* end confdefs.h.  */
10302
10303 /* Override any GCC internal prototype to avoid an error.
10304    Use char because int might match the return type of a GCC
10305    builtin and then its argument prototype would still apply.  */
10306 #ifdef __cplusplus
10307 extern "C"
10308 #endif
10309 char ldap_simple_bind ();
10310 int
10311 main ()
10312 {
10313 return ldap_simple_bind ();
10314   ;
10315   return 0;
10316 }
10317 _ACEOF
10318 if ac_fn_c_try_link "$LINENO"; then :
10319   ac_cv_lib_ldap_r_ldap_simple_bind=yes
10320 else
10321   ac_cv_lib_ldap_r_ldap_simple_bind=no
10322 fi
10323 rm -f core conftest.err conftest.$ac_objext \
10324     conftest$ac_exeext conftest.$ac_ext
10325 LIBS=$ac_check_lib_save_LIBS
10326 fi
10327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
10328 $as_echo "$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
10329 if test "x$ac_cv_lib_ldap_r_ldap_simple_bind" = xyes; then :
10330   cat >>confdefs.h <<_ACEOF
10331 #define HAVE_LIBLDAP_R 1
10332 _ACEOF
10333
10334   LIBS="-lldap_r $LIBS"
10335
10336 else
10337   as_fn_error $? "library 'ldap_r' is required for LDAP" "$LINENO" 5
10338 fi
10339
10340       LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
10341     else
10342       LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
10343     fi
10344   else
10345     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
10346 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
10347 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
10348   $as_echo_n "(cached) " >&6
10349 else
10350   ac_check_lib_save_LIBS=$LIBS
10351 LIBS="-lwldap32  $LIBS"
10352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10353 /* end confdefs.h.  */
10354
10355 /* Override any GCC internal prototype to avoid an error.
10356    Use char because int might match the return type of a GCC
10357    builtin and then its argument prototype would still apply.  */
10358 #ifdef __cplusplus
10359 extern "C"
10360 #endif
10361 char ldap_bind ();
10362 int
10363 main ()
10364 {
10365 return ldap_bind ();
10366   ;
10367   return 0;
10368 }
10369 _ACEOF
10370 if ac_fn_c_try_link "$LINENO"; then :
10371   ac_cv_lib_wldap32_ldap_bind=yes
10372 else
10373   ac_cv_lib_wldap32_ldap_bind=no
10374 fi
10375 rm -f core conftest.err conftest.$ac_objext \
10376     conftest$ac_exeext conftest.$ac_ext
10377 LIBS=$ac_check_lib_save_LIBS
10378 fi
10379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
10380 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
10381 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
10382   cat >>confdefs.h <<_ACEOF
10383 #define HAVE_LIBWLDAP32 1
10384 _ACEOF
10385
10386   LIBS="-lwldap32 $LIBS"
10387
10388 else
10389   as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
10390 fi
10391
10392     LDAP_LIBS_FE="-lwldap32"
10393     LDAP_LIBS_BE="-lwldap32"
10394   fi
10395   LIBS="$_LIBS"
10396 fi
10397
10398
10399
10400 # for contrib/sepgsql
10401 if test "$with_selinux" = yes; then
10402   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
10403 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
10404 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
10405   $as_echo_n "(cached) " >&6
10406 else
10407   ac_check_lib_save_LIBS=$LIBS
10408 LIBS="-lselinux  $LIBS"
10409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10410 /* end confdefs.h.  */
10411
10412 /* Override any GCC internal prototype to avoid an error.
10413    Use char because int might match the return type of a GCC
10414    builtin and then its argument prototype would still apply.  */
10415 #ifdef __cplusplus
10416 extern "C"
10417 #endif
10418 char security_compute_create_name ();
10419 int
10420 main ()
10421 {
10422 return security_compute_create_name ();
10423   ;
10424   return 0;
10425 }
10426 _ACEOF
10427 if ac_fn_c_try_link "$LINENO"; then :
10428   ac_cv_lib_selinux_security_compute_create_name=yes
10429 else
10430   ac_cv_lib_selinux_security_compute_create_name=no
10431 fi
10432 rm -f core conftest.err conftest.$ac_objext \
10433     conftest$ac_exeext conftest.$ac_ext
10434 LIBS=$ac_check_lib_save_LIBS
10435 fi
10436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
10437 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
10438 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
10439   cat >>confdefs.h <<_ACEOF
10440 #define HAVE_LIBSELINUX 1
10441 _ACEOF
10442
10443   LIBS="-lselinux $LIBS"
10444
10445 else
10446   as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
10447 fi
10448
10449 fi
10450
10451 # for contrib/uuid-ossp
10452 if test "$with_uuid" = bsd ; then
10453   # On BSD, the UUID functions are in libc
10454   ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
10455 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
10456   UUID_LIBS=""
10457 else
10458   as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
10459 fi
10460
10461 elif test "$with_uuid" = e2fs ; then
10462   # On macOS, the UUID functions are in libc
10463   ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
10464 if test "x$ac_cv_func_uuid_generate" = xyes; then :
10465   UUID_LIBS=""
10466 else
10467   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
10468 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
10469 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
10470   $as_echo_n "(cached) " >&6
10471 else
10472   ac_check_lib_save_LIBS=$LIBS
10473 LIBS="-luuid  $LIBS"
10474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10475 /* end confdefs.h.  */
10476
10477 /* Override any GCC internal prototype to avoid an error.
10478    Use char because int might match the return type of a GCC
10479    builtin and then its argument prototype would still apply.  */
10480 #ifdef __cplusplus
10481 extern "C"
10482 #endif
10483 char uuid_generate ();
10484 int
10485 main ()
10486 {
10487 return uuid_generate ();
10488   ;
10489   return 0;
10490 }
10491 _ACEOF
10492 if ac_fn_c_try_link "$LINENO"; then :
10493   ac_cv_lib_uuid_uuid_generate=yes
10494 else
10495   ac_cv_lib_uuid_uuid_generate=no
10496 fi
10497 rm -f core conftest.err conftest.$ac_objext \
10498     conftest$ac_exeext conftest.$ac_ext
10499 LIBS=$ac_check_lib_save_LIBS
10500 fi
10501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
10502 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
10503 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
10504   UUID_LIBS="-luuid"
10505 else
10506   as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
10507 fi
10508
10509 fi
10510
10511 elif test "$with_uuid" = ossp ; then
10512   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
10513 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
10514 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
10515   $as_echo_n "(cached) " >&6
10516 else
10517   ac_check_lib_save_LIBS=$LIBS
10518 LIBS="-lossp-uuid  $LIBS"
10519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10520 /* end confdefs.h.  */
10521
10522 /* Override any GCC internal prototype to avoid an error.
10523    Use char because int might match the return type of a GCC
10524    builtin and then its argument prototype would still apply.  */
10525 #ifdef __cplusplus
10526 extern "C"
10527 #endif
10528 char uuid_export ();
10529 int
10530 main ()
10531 {
10532 return uuid_export ();
10533   ;
10534   return 0;
10535 }
10536 _ACEOF
10537 if ac_fn_c_try_link "$LINENO"; then :
10538   ac_cv_lib_ossp_uuid_uuid_export=yes
10539 else
10540   ac_cv_lib_ossp_uuid_uuid_export=no
10541 fi
10542 rm -f core conftest.err conftest.$ac_objext \
10543     conftest$ac_exeext conftest.$ac_ext
10544 LIBS=$ac_check_lib_save_LIBS
10545 fi
10546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
10547 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
10548 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
10549   UUID_LIBS="-lossp-uuid"
10550 else
10551   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
10552 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
10553 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
10554   $as_echo_n "(cached) " >&6
10555 else
10556   ac_check_lib_save_LIBS=$LIBS
10557 LIBS="-luuid  $LIBS"
10558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10559 /* end confdefs.h.  */
10560
10561 /* Override any GCC internal prototype to avoid an error.
10562    Use char because int might match the return type of a GCC
10563    builtin and then its argument prototype would still apply.  */
10564 #ifdef __cplusplus
10565 extern "C"
10566 #endif
10567 char uuid_export ();
10568 int
10569 main ()
10570 {
10571 return uuid_export ();
10572   ;
10573   return 0;
10574 }
10575 _ACEOF
10576 if ac_fn_c_try_link "$LINENO"; then :
10577   ac_cv_lib_uuid_uuid_export=yes
10578 else
10579   ac_cv_lib_uuid_uuid_export=no
10580 fi
10581 rm -f core conftest.err conftest.$ac_objext \
10582     conftest$ac_exeext conftest.$ac_ext
10583 LIBS=$ac_check_lib_save_LIBS
10584 fi
10585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
10586 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
10587 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
10588   UUID_LIBS="-luuid"
10589 else
10590   as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
10591 fi
10592
10593 fi
10594
10595 fi
10596
10597
10598
10599 ##
10600 ## Header files
10601 ##
10602
10603 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/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
10604 do :
10605   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10606 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10607 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10608   cat >>confdefs.h <<_ACEOF
10609 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10610 _ACEOF
10611
10612 fi
10613
10614 done
10615
10616
10617 # On BSD, test for net/if.h will fail unless sys/socket.h
10618 # is included first.
10619 for ac_header in net/if.h
10620 do :
10621   ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
10622 #include <sys/socket.h>
10623
10624 "
10625 if test "x$ac_cv_header_net_if_h" = xyes; then :
10626   cat >>confdefs.h <<_ACEOF
10627 #define HAVE_NET_IF_H 1
10628 _ACEOF
10629
10630 fi
10631
10632 done
10633
10634
10635 # On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
10636 # is included first.
10637 for ac_header in sys/ucred.h
10638 do :
10639   ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
10640 #include <sys/param.h>
10641
10642 "
10643 if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
10644   cat >>confdefs.h <<_ACEOF
10645 #define HAVE_SYS_UCRED_H 1
10646 _ACEOF
10647
10648 fi
10649
10650 done
10651
10652
10653 # At least on IRIX, test for netinet/tcp.h will fail unless
10654 # netinet/in.h is included first.
10655 for ac_header in netinet/tcp.h
10656 do :
10657   ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
10658 #include <netinet/in.h>
10659
10660 "
10661 if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
10662   cat >>confdefs.h <<_ACEOF
10663 #define HAVE_NETINET_TCP_H 1
10664 _ACEOF
10665
10666 fi
10667
10668 done
10669
10670
10671 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
10672   for ac_header in readline/readline.h
10673 do :
10674   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
10675 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
10676   cat >>confdefs.h <<_ACEOF
10677 #define HAVE_READLINE_READLINE_H 1
10678 _ACEOF
10679
10680 else
10681   for ac_header in readline.h
10682 do :
10683   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
10684 if test "x$ac_cv_header_readline_h" = xyes; then :
10685   cat >>confdefs.h <<_ACEOF
10686 #define HAVE_READLINE_H 1
10687 _ACEOF
10688
10689 else
10690   as_fn_error $? "readline header not found
10691 If you have readline already installed, see config.log for details on the
10692 failure.  It is possible the compiler isn't looking in the proper directory.
10693 Use --without-readline to disable readline support." "$LINENO" 5
10694 fi
10695
10696 done
10697
10698 fi
10699
10700 done
10701
10702   for ac_header in readline/history.h
10703 do :
10704   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
10705 if test "x$ac_cv_header_readline_history_h" = xyes; then :
10706   cat >>confdefs.h <<_ACEOF
10707 #define HAVE_READLINE_HISTORY_H 1
10708 _ACEOF
10709
10710 else
10711   for ac_header in history.h
10712 do :
10713   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
10714 if test "x$ac_cv_header_history_h" = xyes; then :
10715   cat >>confdefs.h <<_ACEOF
10716 #define HAVE_HISTORY_H 1
10717 _ACEOF
10718
10719 else
10720   as_fn_error $? "history header not found
10721 If you have readline already installed, see config.log for details on the
10722 failure.  It is possible the compiler isn't looking in the proper directory.
10723 Use --without-readline to disable readline support." "$LINENO" 5
10724 fi
10725
10726 done
10727
10728 fi
10729
10730 done
10731
10732 fi
10733
10734 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
10735 # Some installations of libedit usurp /usr/include/readline/, which seems
10736 # bad practice, since in combined installations readline will have its headers
10737 # there.  We might have to resort to AC_EGREP checks to make sure we found
10738 # the proper header...
10739   for ac_header in editline/readline.h
10740 do :
10741   ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
10742 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
10743   cat >>confdefs.h <<_ACEOF
10744 #define HAVE_EDITLINE_READLINE_H 1
10745 _ACEOF
10746
10747 else
10748   for ac_header in readline.h
10749 do :
10750   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
10751 if test "x$ac_cv_header_readline_h" = xyes; then :
10752   cat >>confdefs.h <<_ACEOF
10753 #define HAVE_READLINE_H 1
10754 _ACEOF
10755
10756 else
10757   for ac_header in readline/readline.h
10758 do :
10759   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
10760 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
10761   cat >>confdefs.h <<_ACEOF
10762 #define HAVE_READLINE_READLINE_H 1
10763 _ACEOF
10764
10765 else
10766   as_fn_error $? "readline header not found
10767 If you have libedit already installed, see config.log for details on the
10768 failure.  It is possible the compiler isn't looking in the proper directory.
10769 Use --without-readline to disable libedit support." "$LINENO" 5
10770 fi
10771
10772 done
10773
10774 fi
10775
10776 done
10777
10778 fi
10779
10780 done
10781
10782 # Note: in a libedit installation, history.h is sometimes a dummy, and may
10783 # not be there at all.  Hence, don't complain if not found.  We must check
10784 # though, since in yet other versions it is an independent header.
10785   for ac_header in editline/history.h
10786 do :
10787   ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
10788 if test "x$ac_cv_header_editline_history_h" = xyes; then :
10789   cat >>confdefs.h <<_ACEOF
10790 #define HAVE_EDITLINE_HISTORY_H 1
10791 _ACEOF
10792
10793 else
10794   for ac_header in history.h
10795 do :
10796   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
10797 if test "x$ac_cv_header_history_h" = xyes; then :
10798   cat >>confdefs.h <<_ACEOF
10799 #define HAVE_HISTORY_H 1
10800 _ACEOF
10801
10802 else
10803   for ac_header in readline/history.h
10804 do :
10805   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
10806 if test "x$ac_cv_header_readline_history_h" = xyes; then :
10807   cat >>confdefs.h <<_ACEOF
10808 #define HAVE_READLINE_HISTORY_H 1
10809 _ACEOF
10810
10811 fi
10812
10813 done
10814
10815 fi
10816
10817 done
10818
10819 fi
10820
10821 done
10822
10823 fi
10824
10825 if test "$with_zlib" = yes; then
10826   ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
10827 if test "x$ac_cv_header_zlib_h" = xyes; then :
10828
10829 else
10830   as_fn_error $? "zlib header not found
10831 If you have zlib already installed, see config.log for details on the
10832 failure.  It is possible the compiler isn't looking in the proper directory.
10833 Use --without-zlib to disable zlib support." "$LINENO" 5
10834 fi
10835
10836
10837 fi
10838
10839 if test "$with_gssapi" = yes ; then
10840   for ac_header in gssapi/gssapi.h
10841 do :
10842   ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
10843 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
10844   cat >>confdefs.h <<_ACEOF
10845 #define HAVE_GSSAPI_GSSAPI_H 1
10846 _ACEOF
10847
10848 else
10849   for ac_header in gssapi.h
10850 do :
10851   ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
10852 if test "x$ac_cv_header_gssapi_h" = xyes; then :
10853   cat >>confdefs.h <<_ACEOF
10854 #define HAVE_GSSAPI_H 1
10855 _ACEOF
10856
10857 else
10858   as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
10859 fi
10860
10861 done
10862
10863 fi
10864
10865 done
10866
10867 fi
10868
10869 if test "$with_openssl" = yes ; then
10870   ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
10871 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
10872
10873 else
10874   as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
10875 fi
10876
10877
10878   ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
10879 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
10880
10881 else
10882   as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
10883 fi
10884
10885
10886 fi
10887
10888 if test "$with_pam" = yes ; then
10889   for ac_header in security/pam_appl.h
10890 do :
10891   ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
10892 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
10893   cat >>confdefs.h <<_ACEOF
10894 #define HAVE_SECURITY_PAM_APPL_H 1
10895 _ACEOF
10896
10897 else
10898   for ac_header in pam/pam_appl.h
10899 do :
10900   ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
10901 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
10902   cat >>confdefs.h <<_ACEOF
10903 #define HAVE_PAM_PAM_APPL_H 1
10904 _ACEOF
10905
10906 else
10907   as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
10908 fi
10909
10910 done
10911
10912 fi
10913
10914 done
10915
10916 fi
10917
10918 if test "$with_bsd_auth" = yes ; then
10919   ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
10920 if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
10921
10922 else
10923   as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
10924 fi
10925
10926
10927 fi
10928
10929 if test "$with_systemd" = yes ; then
10930   ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
10931 if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
10932
10933 else
10934   as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
10935 fi
10936
10937
10938 fi
10939
10940 if test "$with_libxml" = yes ; then
10941   ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
10942 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
10943
10944 else
10945   as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
10946 fi
10947
10948
10949 fi
10950
10951 if test "$with_libxslt" = yes ; then
10952   ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
10953 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
10954
10955 else
10956   as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
10957 fi
10958
10959
10960 fi
10961
10962 if test "$with_ldap" = yes ; then
10963   if test "$PORTNAME" != "win32"; then
10964      for ac_header in ldap.h
10965 do :
10966   ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
10967 if test "x$ac_cv_header_ldap_h" = xyes; then :
10968   cat >>confdefs.h <<_ACEOF
10969 #define HAVE_LDAP_H 1
10970 _ACEOF
10971
10972 else
10973   as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
10974 fi
10975
10976 done
10977
10978      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
10979 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
10980 if ${pgac_cv_ldap_safe+:} false; then :
10981   $as_echo_n "(cached) " >&6
10982 else
10983   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10984 /* end confdefs.h.  */
10985 #include <ldap.h>
10986 #if !defined(LDAP_VENDOR_VERSION) || \
10987      (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
10988       LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
10989 choke me
10990 #endif
10991 int
10992 main ()
10993 {
10994
10995   ;
10996   return 0;
10997 }
10998 _ACEOF
10999 if ac_fn_c_try_compile "$LINENO"; then :
11000   pgac_cv_ldap_safe=yes
11001 else
11002   pgac_cv_ldap_safe=no
11003 fi
11004 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11005 fi
11006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
11007 $as_echo "$pgac_cv_ldap_safe" >&6; }
11008
11009 if test "$pgac_cv_ldap_safe" != yes; then
11010   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
11011 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
11012 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
11013 *** also uses LDAP will crash on exit." >&5
11014 $as_echo "$as_me: WARNING:
11015 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
11016 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
11017 *** also uses LDAP will crash on exit." >&2;}
11018 fi
11019   else
11020      for ac_header in winldap.h
11021 do :
11022   ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
11023 #include <windows.h>
11024
11025 "
11026 if test "x$ac_cv_header_winldap_h" = xyes; then :
11027   cat >>confdefs.h <<_ACEOF
11028 #define HAVE_WINLDAP_H 1
11029 _ACEOF
11030
11031 else
11032   as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
11033 fi
11034
11035 done
11036
11037   fi
11038 fi
11039
11040 if test "$with_bonjour" = yes ; then
11041   ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
11042 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
11043
11044 else
11045   as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
11046 fi
11047
11048
11049 fi
11050
11051 # for contrib/uuid-ossp
11052 if test "$with_uuid" = bsd ; then
11053   for ac_header in uuid.h
11054 do :
11055   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
11056 if test "x$ac_cv_header_uuid_h" = xyes; then :
11057   cat >>confdefs.h <<_ACEOF
11058 #define HAVE_UUID_H 1
11059 _ACEOF
11060  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11061 /* end confdefs.h.  */
11062 #include <uuid.h>
11063
11064 _ACEOF
11065 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11066   $EGREP "uuid_to_string" >/dev/null 2>&1; then :
11067
11068 else
11069   as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
11070 fi
11071 rm -f conftest*
11072
11073 else
11074   as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
11075 fi
11076
11077 done
11078
11079 elif test "$with_uuid" = e2fs ; then
11080   for ac_header in uuid/uuid.h
11081 do :
11082   ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
11083 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
11084   cat >>confdefs.h <<_ACEOF
11085 #define HAVE_UUID_UUID_H 1
11086 _ACEOF
11087  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11088 /* end confdefs.h.  */
11089 #include <uuid/uuid.h>
11090
11091 _ACEOF
11092 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11093   $EGREP "uuid_generate" >/dev/null 2>&1; then :
11094
11095 else
11096   as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
11097 fi
11098 rm -f conftest*
11099
11100 else
11101   for ac_header in uuid.h
11102 do :
11103   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
11104 if test "x$ac_cv_header_uuid_h" = xyes; then :
11105   cat >>confdefs.h <<_ACEOF
11106 #define HAVE_UUID_H 1
11107 _ACEOF
11108  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11109 /* end confdefs.h.  */
11110 #include <uuid.h>
11111
11112 _ACEOF
11113 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11114   $EGREP "uuid_generate" >/dev/null 2>&1; then :
11115
11116 else
11117   as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
11118 fi
11119 rm -f conftest*
11120
11121 else
11122   as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
11123 fi
11124
11125 done
11126
11127 fi
11128
11129 done
11130
11131 elif test "$with_uuid" = ossp ; then
11132   for ac_header in ossp/uuid.h
11133 do :
11134   ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
11135 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
11136   cat >>confdefs.h <<_ACEOF
11137 #define HAVE_OSSP_UUID_H 1
11138 _ACEOF
11139  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11140 /* end confdefs.h.  */
11141 #include <ossp/uuid.h>
11142
11143 _ACEOF
11144 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11145   $EGREP "uuid_export" >/dev/null 2>&1; then :
11146
11147 else
11148   as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
11149 fi
11150 rm -f conftest*
11151
11152 else
11153   for ac_header in uuid.h
11154 do :
11155   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
11156 if test "x$ac_cv_header_uuid_h" = xyes; then :
11157   cat >>confdefs.h <<_ACEOF
11158 #define HAVE_UUID_H 1
11159 _ACEOF
11160  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11161 /* end confdefs.h.  */
11162 #include <uuid.h>
11163
11164 _ACEOF
11165 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11166   $EGREP "uuid_export" >/dev/null 2>&1; then :
11167
11168 else
11169   as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
11170 fi
11171 rm -f conftest*
11172
11173 else
11174   as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
11175 fi
11176
11177 done
11178
11179 fi
11180
11181 done
11182
11183 fi
11184
11185 if test "$PORTNAME" = "win32" ; then
11186    for ac_header in crtdefs.h
11187 do :
11188   ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
11189 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
11190   cat >>confdefs.h <<_ACEOF
11191 #define HAVE_CRTDEFS_H 1
11192 _ACEOF
11193
11194 fi
11195
11196 done
11197
11198 fi
11199
11200 ##
11201 ## Types, structures, compiler characteristics
11202 ##
11203
11204   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
11205 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
11206 if ${ac_cv_c_bigendian+:} false; then :
11207   $as_echo_n "(cached) " >&6
11208 else
11209   ac_cv_c_bigendian=unknown
11210     # See if we're dealing with a universal compiler.
11211     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11212 /* end confdefs.h.  */
11213 #ifndef __APPLE_CC__
11214                not a universal capable compiler
11215              #endif
11216              typedef int dummy;
11217
11218 _ACEOF
11219 if ac_fn_c_try_compile "$LINENO"; then :
11220
11221         # Check for potential -arch flags.  It is not universal unless
11222         # there are at least two -arch flags with different values.
11223         ac_arch=
11224         ac_prev=
11225         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11226          if test -n "$ac_prev"; then
11227            case $ac_word in
11228              i?86 | x86_64 | ppc | ppc64)
11229                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11230                  ac_arch=$ac_word
11231                else
11232                  ac_cv_c_bigendian=universal
11233                  break
11234                fi
11235                ;;
11236            esac
11237            ac_prev=
11238          elif test "x$ac_word" = "x-arch"; then
11239            ac_prev=arch
11240          fi
11241        done
11242 fi
11243 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11244     if test $ac_cv_c_bigendian = unknown; then
11245       # See if sys/param.h defines the BYTE_ORDER macro.
11246       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11247 /* end confdefs.h.  */
11248 #include <sys/types.h>
11249              #include <sys/param.h>
11250
11251 int
11252 main ()
11253 {
11254 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11255                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11256                      && LITTLE_ENDIAN)
11257               bogus endian macros
11258              #endif
11259
11260   ;
11261   return 0;
11262 }
11263 _ACEOF
11264 if ac_fn_c_try_compile "$LINENO"; then :
11265   # It does; now see whether it defined to BIG_ENDIAN or not.
11266          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11267 /* end confdefs.h.  */
11268 #include <sys/types.h>
11269                 #include <sys/param.h>
11270
11271 int
11272 main ()
11273 {
11274 #if BYTE_ORDER != BIG_ENDIAN
11275                  not big endian
11276                 #endif
11277
11278   ;
11279   return 0;
11280 }
11281 _ACEOF
11282 if ac_fn_c_try_compile "$LINENO"; then :
11283   ac_cv_c_bigendian=yes
11284 else
11285   ac_cv_c_bigendian=no
11286 fi
11287 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11288 fi
11289 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11290     fi
11291     if test $ac_cv_c_bigendian = unknown; then
11292       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11293       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11294 /* end confdefs.h.  */
11295 #include <limits.h>
11296
11297 int
11298 main ()
11299 {
11300 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11301               bogus endian macros
11302              #endif
11303
11304   ;
11305   return 0;
11306 }
11307 _ACEOF
11308 if ac_fn_c_try_compile "$LINENO"; then :
11309   # It does; now see whether it defined to _BIG_ENDIAN or not.
11310          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11311 /* end confdefs.h.  */
11312 #include <limits.h>
11313
11314 int
11315 main ()
11316 {
11317 #ifndef _BIG_ENDIAN
11318                  not big endian
11319                 #endif
11320
11321   ;
11322   return 0;
11323 }
11324 _ACEOF
11325 if ac_fn_c_try_compile "$LINENO"; then :
11326   ac_cv_c_bigendian=yes
11327 else
11328   ac_cv_c_bigendian=no
11329 fi
11330 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11331 fi
11332 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11333     fi
11334     if test $ac_cv_c_bigendian = unknown; then
11335       # Compile a test program.
11336       if test "$cross_compiling" = yes; then :
11337   # Try to guess by grepping values from an object file.
11338          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11339 /* end confdefs.h.  */
11340 short int ascii_mm[] =
11341                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
11342                 short int ascii_ii[] =
11343                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
11344                 int use_ascii (int i) {
11345                   return ascii_mm[i] + ascii_ii[i];
11346                 }
11347                 short int ebcdic_ii[] =
11348                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
11349                 short int ebcdic_mm[] =
11350                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
11351                 int use_ebcdic (int i) {
11352                   return ebcdic_mm[i] + ebcdic_ii[i];
11353                 }
11354                 extern int foo;
11355
11356 int
11357 main ()
11358 {
11359 return use_ascii (foo) == use_ebcdic (foo);
11360   ;
11361   return 0;
11362 }
11363 _ACEOF
11364 if ac_fn_c_try_compile "$LINENO"; then :
11365   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
11366               ac_cv_c_bigendian=yes
11367             fi
11368             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
11369               if test "$ac_cv_c_bigendian" = unknown; then
11370                 ac_cv_c_bigendian=no
11371               else
11372                 # finding both strings is unlikely to happen, but who knows?
11373                 ac_cv_c_bigendian=unknown
11374               fi
11375             fi
11376 fi
11377 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11378 else
11379   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11380 /* end confdefs.h.  */
11381 $ac_includes_default
11382 int
11383 main ()
11384 {
11385
11386              /* Are we little or big endian?  From Harbison&Steele.  */
11387              union
11388              {
11389                long int l;
11390                char c[sizeof (long int)];
11391              } u;
11392              u.l = 1;
11393              return u.c[sizeof (long int) - 1] == 1;
11394
11395   ;
11396   return 0;
11397 }
11398 _ACEOF
11399 if ac_fn_c_try_run "$LINENO"; then :
11400   ac_cv_c_bigendian=no
11401 else
11402   ac_cv_c_bigendian=yes
11403 fi
11404 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11405   conftest.$ac_objext conftest.beam conftest.$ac_ext
11406 fi
11407
11408     fi
11409 fi
11410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
11411 $as_echo "$ac_cv_c_bigendian" >&6; }
11412  case $ac_cv_c_bigendian in #(
11413    yes)
11414      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
11415 ;; #(
11416    no)
11417       ;; #(
11418    universal)
11419
11420 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
11421
11422      ;; #(
11423    *)
11424      as_fn_error $? "unknown endianness
11425  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
11426  esac
11427
11428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
11429 $as_echo_n "checking for inline... " >&6; }
11430 if ${ac_cv_c_inline+:} false; then :
11431   $as_echo_n "(cached) " >&6
11432 else
11433   ac_cv_c_inline=no
11434 for ac_kw in inline __inline__ __inline; do
11435   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11436 /* end confdefs.h.  */
11437 #ifndef __cplusplus
11438 typedef int foo_t;
11439 static $ac_kw foo_t static_foo () {return 0; }
11440 $ac_kw foo_t foo () {return 0; }
11441 #endif
11442
11443 _ACEOF
11444 if ac_fn_c_try_compile "$LINENO"; then :
11445   ac_cv_c_inline=$ac_kw
11446 fi
11447 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11448   test "$ac_cv_c_inline" != no && break
11449 done
11450
11451 fi
11452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
11453 $as_echo "$ac_cv_c_inline" >&6; }
11454
11455 case $ac_cv_c_inline in
11456   inline | yes) ;;
11457   *)
11458     case $ac_cv_c_inline in
11459       no) ac_val=;;
11460       *) ac_val=$ac_cv_c_inline;;
11461     esac
11462     cat >>confdefs.h <<_ACEOF
11463 #ifndef __cplusplus
11464 #define inline $ac_val
11465 #endif
11466 _ACEOF
11467     ;;
11468 esac
11469
11470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
11471 $as_echo_n "checking for printf format archetype... " >&6; }
11472 if ${pgac_cv_printf_archetype+:} false; then :
11473   $as_echo_n "(cached) " >&6
11474 else
11475   ac_save_c_werror_flag=$ac_c_werror_flag
11476 ac_c_werror_flag=yes
11477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11478 /* end confdefs.h.  */
11479 extern int
11480 pgac_write(int ignore, const char *fmt,...)
11481 __attribute__((format(gnu_printf, 2, 3)));
11482 int
11483 main ()
11484 {
11485
11486   ;
11487   return 0;
11488 }
11489 _ACEOF
11490 if ac_fn_c_try_compile "$LINENO"; then :
11491   pgac_cv_printf_archetype=gnu_printf
11492 else
11493   pgac_cv_printf_archetype=printf
11494 fi
11495 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11496 ac_c_werror_flag=$ac_save_c_werror_flag
11497 fi
11498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
11499 $as_echo "$pgac_cv_printf_archetype" >&6; }
11500
11501 cat >>confdefs.h <<_ACEOF
11502 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
11503 _ACEOF
11504
11505
11506
11507   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array members" >&5
11508 $as_echo_n "checking for flexible array members... " >&6; }
11509 if ${ac_cv_c_flexmember+:} false; then :
11510   $as_echo_n "(cached) " >&6
11511 else
11512   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11513 /* end confdefs.h.  */
11514 #include <stdlib.h>
11515             #include <stdio.h>
11516             #include <stddef.h>
11517             struct s { int n; double d[]; };
11518 int
11519 main ()
11520 {
11521 int m = getchar ();
11522             struct s *p = malloc (offsetof (struct s, d)
11523                                   + m * sizeof (double));
11524             p->d[0] = 0.0;
11525             return p->d != (double *) NULL;
11526   ;
11527   return 0;
11528 }
11529 _ACEOF
11530 if ac_fn_c_try_compile "$LINENO"; then :
11531   ac_cv_c_flexmember=yes
11532 else
11533   ac_cv_c_flexmember=no
11534 fi
11535 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11536 fi
11537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
11538 $as_echo "$ac_cv_c_flexmember" >&6; }
11539   if test $ac_cv_c_flexmember = yes; then
11540
11541 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
11542
11543   else
11544     $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
11545
11546   fi
11547
11548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed types" >&5
11549 $as_echo_n "checking for signed types... " >&6; }
11550 if ${pgac_cv_c_signed+:} false; then :
11551   $as_echo_n "(cached) " >&6
11552 else
11553   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11554 /* end confdefs.h.  */
11555
11556 int
11557 main ()
11558 {
11559 signed char c; signed short s; signed int i;
11560   ;
11561   return 0;
11562 }
11563 _ACEOF
11564 if ac_fn_c_try_compile "$LINENO"; then :
11565   pgac_cv_c_signed=yes
11566 else
11567   pgac_cv_c_signed=no
11568 fi
11569 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11570 fi
11571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_signed" >&5
11572 $as_echo "$pgac_cv_c_signed" >&6; }
11573 if test x"$pgac_cv_c_signed" = xno ; then
11574
11575 $as_echo "#define signed /**/" >>confdefs.h
11576
11577 fi
11578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5
11579 $as_echo_n "checking for __func__... " >&6; }
11580 if ${pgac_cv_funcname_func_support+:} false; then :
11581   $as_echo_n "(cached) " >&6
11582 else
11583   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11584 /* end confdefs.h.  */
11585 #include <stdio.h>
11586 int
11587 main ()
11588 {
11589 printf("%s\n", __func__);
11590   ;
11591   return 0;
11592 }
11593 _ACEOF
11594 if ac_fn_c_try_compile "$LINENO"; then :
11595   pgac_cv_funcname_func_support=yes
11596 else
11597   pgac_cv_funcname_func_support=no
11598 fi
11599 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11600 fi
11601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_func_support" >&5
11602 $as_echo "$pgac_cv_funcname_func_support" >&6; }
11603 if test x"$pgac_cv_funcname_func_support" = xyes ; then
11604
11605 $as_echo "#define HAVE_FUNCNAME__FUNC 1" >>confdefs.h
11606
11607 else
11608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__" >&5
11609 $as_echo_n "checking for __FUNCTION__... " >&6; }
11610 if ${pgac_cv_funcname_function_support+:} false; then :
11611   $as_echo_n "(cached) " >&6
11612 else
11613   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11614 /* end confdefs.h.  */
11615 #include <stdio.h>
11616 int
11617 main ()
11618 {
11619 printf("%s\n", __FUNCTION__);
11620   ;
11621   return 0;
11622 }
11623 _ACEOF
11624 if ac_fn_c_try_compile "$LINENO"; then :
11625   pgac_cv_funcname_function_support=yes
11626 else
11627   pgac_cv_funcname_function_support=no
11628 fi
11629 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11630 fi
11631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_function_support" >&5
11632 $as_echo "$pgac_cv_funcname_function_support" >&6; }
11633 if test x"$pgac_cv_funcname_function_support" = xyes ; then
11634
11635 $as_echo "#define HAVE_FUNCNAME__FUNCTION 1" >>confdefs.h
11636
11637 fi
11638 fi
11639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
11640 $as_echo_n "checking for _Static_assert... " >&6; }
11641 if ${pgac_cv__static_assert+:} false; then :
11642   $as_echo_n "(cached) " >&6
11643 else
11644   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11645 /* end confdefs.h.  */
11646
11647 int
11648 main ()
11649 {
11650 ({ _Static_assert(1, "foo"); })
11651   ;
11652   return 0;
11653 }
11654 _ACEOF
11655 if ac_fn_c_try_link "$LINENO"; then :
11656   pgac_cv__static_assert=yes
11657 else
11658   pgac_cv__static_assert=no
11659 fi
11660 rm -f core conftest.err conftest.$ac_objext \
11661     conftest$ac_exeext conftest.$ac_ext
11662 fi
11663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
11664 $as_echo "$pgac_cv__static_assert" >&6; }
11665 if test x"$pgac_cv__static_assert" = xyes ; then
11666
11667 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
11668
11669 fi
11670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5
11671 $as_echo_n "checking for typeof... " >&6; }
11672 if ${pgac_cv_c_typeof+:} false; then :
11673   $as_echo_n "(cached) " >&6
11674 else
11675   pgac_cv_c_typeof=no
11676 for pgac_kw in typeof __typeof__ decltype; do
11677   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11678 /* end confdefs.h.  */
11679
11680 int
11681 main ()
11682 {
11683 int x = 0;
11684 $pgac_kw(x) y;
11685 y = x;
11686 return y;
11687   ;
11688   return 0;
11689 }
11690 _ACEOF
11691 if ac_fn_c_try_compile "$LINENO"; then :
11692   pgac_cv_c_typeof=$pgac_kw
11693 fi
11694 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11695   test "$pgac_cv_c_typeof" != no && break
11696 done
11697 fi
11698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_typeof" >&5
11699 $as_echo "$pgac_cv_c_typeof" >&6; }
11700 if test "$pgac_cv_c_typeof" != no; then
11701
11702 $as_echo "#define HAVE_TYPEOF 1" >>confdefs.h
11703
11704   if test "$pgac_cv_c_typeof" != typeof; then
11705
11706 cat >>confdefs.h <<_ACEOF
11707 #define typeof $pgac_cv_c_typeof
11708 _ACEOF
11709
11710   fi
11711 fi
11712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
11713 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
11714 if ${pgac_cv__types_compatible+:} false; then :
11715   $as_echo_n "(cached) " >&6
11716 else
11717   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11718 /* end confdefs.h.  */
11719
11720 int
11721 main ()
11722 {
11723  int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
11724   ;
11725   return 0;
11726 }
11727 _ACEOF
11728 if ac_fn_c_try_compile "$LINENO"; then :
11729   pgac_cv__types_compatible=yes
11730 else
11731   pgac_cv__types_compatible=no
11732 fi
11733 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11734 fi
11735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
11736 $as_echo "$pgac_cv__types_compatible" >&6; }
11737 if test x"$pgac_cv__types_compatible" = xyes ; then
11738
11739 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
11740
11741 fi
11742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
11743 $as_echo_n "checking for __builtin_bswap32... " >&6; }
11744 if ${pgac_cv__builtin_bswap32+:} false; then :
11745   $as_echo_n "(cached) " >&6
11746 else
11747   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11748 /* end confdefs.h.  */
11749 static unsigned long int x = __builtin_bswap32(0xaabbccdd);
11750
11751 _ACEOF
11752 if ac_fn_c_try_compile "$LINENO"; then :
11753   pgac_cv__builtin_bswap32=yes
11754 else
11755   pgac_cv__builtin_bswap32=no
11756 fi
11757 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11758 fi
11759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
11760 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
11761 if test x"$pgac_cv__builtin_bswap32" = xyes ; then
11762
11763 $as_echo "#define HAVE__BUILTIN_BSWAP32 1" >>confdefs.h
11764
11765 fi
11766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
11767 $as_echo_n "checking for __builtin_bswap64... " >&6; }
11768 if ${pgac_cv__builtin_bswap64+:} false; then :
11769   $as_echo_n "(cached) " >&6
11770 else
11771   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11772 /* end confdefs.h.  */
11773 static unsigned long int x = __builtin_bswap64(0xaabbccddeeff0011);
11774
11775 _ACEOF
11776 if ac_fn_c_try_compile "$LINENO"; then :
11777   pgac_cv__builtin_bswap64=yes
11778 else
11779   pgac_cv__builtin_bswap64=no
11780 fi
11781 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11782 fi
11783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
11784 $as_echo "$pgac_cv__builtin_bswap64" >&6; }
11785 if test x"$pgac_cv__builtin_bswap64" = xyes ; then
11786
11787 $as_echo "#define HAVE__BUILTIN_BSWAP64 1" >>confdefs.h
11788
11789 fi
11790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
11791 $as_echo_n "checking for __builtin_constant_p... " >&6; }
11792 if ${pgac_cv__builtin_constant_p+:} false; then :
11793   $as_echo_n "(cached) " >&6
11794 else
11795   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11796 /* end confdefs.h.  */
11797 static int x; static int y[__builtin_constant_p(x) ? x : 1];
11798
11799 _ACEOF
11800 if ac_fn_c_try_compile "$LINENO"; then :
11801   pgac_cv__builtin_constant_p=yes
11802 else
11803   pgac_cv__builtin_constant_p=no
11804 fi
11805 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11806 fi
11807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
11808 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
11809 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
11810
11811 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
11812
11813 fi
11814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
11815 $as_echo_n "checking for __builtin_unreachable... " >&6; }
11816 if ${pgac_cv__builtin_unreachable+:} false; then :
11817   $as_echo_n "(cached) " >&6
11818 else
11819   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11820 /* end confdefs.h.  */
11821
11822 int
11823 main ()
11824 {
11825 __builtin_unreachable();
11826   ;
11827   return 0;
11828 }
11829 _ACEOF
11830 if ac_fn_c_try_link "$LINENO"; then :
11831   pgac_cv__builtin_unreachable=yes
11832 else
11833   pgac_cv__builtin_unreachable=no
11834 fi
11835 rm -f core conftest.err conftest.$ac_objext \
11836     conftest$ac_exeext conftest.$ac_ext
11837 fi
11838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
11839 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
11840 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
11841
11842 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
11843
11844 fi
11845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for computed goto support" >&5
11846 $as_echo_n "checking for computed goto support... " >&6; }
11847 if ${pgac_cv_computed_goto+:} false; then :
11848   $as_echo_n "(cached) " >&6
11849 else
11850   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11851 /* end confdefs.h.  */
11852
11853 int
11854 main ()
11855 {
11856 void *labeladdrs[] = {&&my_label};
11857   goto *labeladdrs[0];
11858   my_label:
11859   return 1;
11860
11861   ;
11862   return 0;
11863 }
11864 _ACEOF
11865 if ac_fn_c_try_compile "$LINENO"; then :
11866   pgac_cv_computed_goto=yes
11867 else
11868   pgac_cv_computed_goto=no
11869 fi
11870 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11871 fi
11872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_computed_goto" >&5
11873 $as_echo "$pgac_cv_computed_goto" >&6; }
11874 if test x"$pgac_cv_computed_goto" = xyes ; then
11875
11876 $as_echo "#define HAVE_COMPUTED_GOTO 1" >>confdefs.h
11877
11878 fi
11879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __VA_ARGS__" >&5
11880 $as_echo_n "checking for __VA_ARGS__... " >&6; }
11881 if ${pgac_cv__va_args+:} false; then :
11882   $as_echo_n "(cached) " >&6
11883 else
11884   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11885 /* end confdefs.h.  */
11886 #include <stdio.h>
11887 int
11888 main ()
11889 {
11890 #define debug(...) fprintf(stderr, __VA_ARGS__)
11891 debug("%s", "blarg");
11892
11893   ;
11894   return 0;
11895 }
11896 _ACEOF
11897 if ac_fn_c_try_compile "$LINENO"; then :
11898   pgac_cv__va_args=yes
11899 else
11900   pgac_cv__va_args=no
11901 fi
11902 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11903 fi
11904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__va_args" >&5
11905 $as_echo "$pgac_cv__va_args" >&6; }
11906 if test x"$pgac_cv__va_args" = xyes ; then
11907
11908 $as_echo "#define HAVE__VA_ARGS 1" >>confdefs.h
11909
11910 fi
11911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11912 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
11913 if ${ac_cv_struct_tm+:} false; then :
11914   $as_echo_n "(cached) " >&6
11915 else
11916   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11917 /* end confdefs.h.  */
11918 #include <sys/types.h>
11919 #include <time.h>
11920
11921 int
11922 main ()
11923 {
11924 struct tm tm;
11925                                      int *p = &tm.tm_sec;
11926                                      return !p;
11927   ;
11928   return 0;
11929 }
11930 _ACEOF
11931 if ac_fn_c_try_compile "$LINENO"; then :
11932   ac_cv_struct_tm=time.h
11933 else
11934   ac_cv_struct_tm=sys/time.h
11935 fi
11936 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11937 fi
11938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11939 $as_echo "$ac_cv_struct_tm" >&6; }
11940 if test $ac_cv_struct_tm = sys/time.h; then
11941
11942 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
11943
11944 fi
11945
11946 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
11947 #include <$ac_cv_struct_tm>
11948
11949 "
11950 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
11951
11952 cat >>confdefs.h <<_ACEOF
11953 #define HAVE_STRUCT_TM_TM_ZONE 1
11954 _ACEOF
11955
11956
11957 fi
11958
11959 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11960
11961 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
11962
11963 fi
11964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11965 $as_echo_n "checking for tzname... " >&6; }
11966 if ${ac_cv_var_tzname+:} false; then :
11967   $as_echo_n "(cached) " >&6
11968 else
11969   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11970 /* end confdefs.h.  */
11971 #include <stdlib.h>
11972 #include <time.h>
11973 #ifndef tzname /* For SGI.  */
11974 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
11975 #endif
11976
11977 int
11978 main ()
11979 {
11980 atoi(*tzname);
11981   ;
11982   return 0;
11983 }
11984 _ACEOF
11985 if ac_fn_c_try_link "$LINENO"; then :
11986   ac_cv_var_tzname=yes
11987 else
11988   ac_cv_var_tzname=no
11989 fi
11990 rm -f core conftest.err conftest.$ac_objext \
11991     conftest$ac_exeext conftest.$ac_ext
11992 fi
11993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11994 $as_echo "$ac_cv_var_tzname" >&6; }
11995 if test $ac_cv_var_tzname = yes; then
11996
11997 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
11998
11999 fi
12000
12001 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
12002 #ifdef HAVE_SYS_IPC_H
12003 #include <sys/ipc.h>
12004 #endif
12005 #ifdef HAVE_SYS_SEM_H
12006 #include <sys/sem.h>
12007 #endif
12008 "
12009 if test "x$ac_cv_type_union_semun" = xyes; then :
12010
12011 cat >>confdefs.h <<_ACEOF
12012 #define HAVE_UNION_SEMUN 1
12013 _ACEOF
12014
12015
12016 fi
12017
12018 ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
12019 #ifdef HAVE_SYS_UN_H
12020 #include <sys/un.h>
12021 #endif
12022
12023 "
12024 if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
12025
12026 $as_echo "#define HAVE_UNIX_SOCKETS 1" >>confdefs.h
12027
12028 fi
12029
12030 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
12031 #include <sys/socket.h>
12032
12033 "
12034 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
12035
12036 cat >>confdefs.h <<_ACEOF
12037 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
12038 _ACEOF
12039
12040
12041 fi
12042
12043 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
12044 #include <sys/socket.h>
12045
12046 "
12047 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
12048
12049 cat >>confdefs.h <<_ACEOF
12050 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
12051 _ACEOF
12052
12053
12054 fi
12055 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
12056 #include <sys/socket.h>
12057
12058 "
12059 if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
12060
12061 cat >>confdefs.h <<_ACEOF
12062 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
12063 _ACEOF
12064
12065
12066 fi
12067 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
12068 #include <sys/socket.h>
12069
12070 "
12071 if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
12072
12073 cat >>confdefs.h <<_ACEOF
12074 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
12075 _ACEOF
12076
12077
12078 fi
12079 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
12080 #include <sys/socket.h>
12081
12082 "
12083 if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
12084
12085 cat >>confdefs.h <<_ACEOF
12086 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
12087 _ACEOF
12088
12089
12090 fi
12091 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
12092 #include <sys/socket.h>
12093
12094 "
12095 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
12096
12097 cat >>confdefs.h <<_ACEOF
12098 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
12099 _ACEOF
12100
12101
12102 fi
12103
12104 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include <sys/types.h>
12105 #include <sys/socket.h>
12106 #include <netdb.h>
12107
12108 "
12109 if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
12110
12111 cat >>confdefs.h <<_ACEOF
12112 #define HAVE_STRUCT_ADDRINFO 1
12113 _ACEOF
12114
12115
12116 fi
12117
12118
12119   ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
12120 if test "x$ac_cv_type_intptr_t" = xyes; then :
12121
12122 $as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
12123
12124 else
12125   for ac_type in 'int' 'long int' 'long long int'; do
12126        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12127 /* end confdefs.h.  */
12128 $ac_includes_default
12129 int
12130 main ()
12131 {
12132 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
12133 test_array [0] = 0;
12134 return test_array [0];
12135
12136   ;
12137   return 0;
12138 }
12139 _ACEOF
12140 if ac_fn_c_try_compile "$LINENO"; then :
12141
12142 cat >>confdefs.h <<_ACEOF
12143 #define intptr_t $ac_type
12144 _ACEOF
12145
12146           ac_type=
12147 fi
12148 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12149        test -z "$ac_type" && break
12150      done
12151 fi
12152
12153
12154
12155   ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
12156 if test "x$ac_cv_type_uintptr_t" = xyes; then :
12157
12158 $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
12159
12160 else
12161   for ac_type in 'unsigned int' 'unsigned long int' \
12162         'unsigned long long int'; do
12163        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12164 /* end confdefs.h.  */
12165 $ac_includes_default
12166 int
12167 main ()
12168 {
12169 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
12170 test_array [0] = 0;
12171 return test_array [0];
12172
12173   ;
12174   return 0;
12175 }
12176 _ACEOF
12177 if ac_fn_c_try_compile "$LINENO"; then :
12178
12179 cat >>confdefs.h <<_ACEOF
12180 #define uintptr_t $ac_type
12181 _ACEOF
12182
12183           ac_type=
12184 fi
12185 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12186        test -z "$ac_type" && break
12187      done
12188 fi
12189
12190
12191
12192   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
12193 $as_echo_n "checking for unsigned long long int... " >&6; }
12194 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
12195   $as_echo_n "(cached) " >&6
12196 else
12197   ac_cv_type_unsigned_long_long_int=yes
12198      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
12199        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12200 /* end confdefs.h.  */
12201
12202   /* For now, do not test the preprocessor; as of 2007 there are too many
12203          implementations with broken preprocessors.  Perhaps this can
12204          be revisited in 2012.  In the meantime, code should not expect
12205          #if to work with literals wider than 32 bits.  */
12206       /* Test literals.  */
12207       long long int ll = 9223372036854775807ll;
12208       long long int nll = -9223372036854775807LL;
12209       unsigned long long int ull = 18446744073709551615ULL;
12210       /* Test constant expressions.   */
12211       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
12212                      ? 1 : -1)];
12213       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
12214                      ? 1 : -1)];
12215       int i = 63;
12216 int
12217 main ()
12218 {
12219 /* Test availability of runtime routines for shift and division.  */
12220       long long int llmax = 9223372036854775807ll;
12221       unsigned long long int ullmax = 18446744073709551615ull;
12222       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
12223               | (llmax / ll) | (llmax % ll)
12224               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
12225               | (ullmax / ull) | (ullmax % ull));
12226   ;
12227   return 0;
12228 }
12229
12230 _ACEOF
12231 if ac_fn_c_try_link "$LINENO"; then :
12232
12233 else
12234   ac_cv_type_unsigned_long_long_int=no
12235 fi
12236 rm -f core conftest.err conftest.$ac_objext \
12237     conftest$ac_exeext conftest.$ac_ext
12238      fi
12239 fi
12240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
12241 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
12242   if test $ac_cv_type_unsigned_long_long_int = yes; then
12243
12244 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
12245
12246   fi
12247
12248
12249
12250   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
12251 $as_echo_n "checking for long long int... " >&6; }
12252 if ${ac_cv_type_long_long_int+:} false; then :
12253   $as_echo_n "(cached) " >&6
12254 else
12255   ac_cv_type_long_long_int=yes
12256       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
12257         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
12258         if test $ac_cv_type_long_long_int = yes; then
12259                                   if test "$cross_compiling" = yes; then :
12260   :
12261 else
12262   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12263 /* end confdefs.h.  */
12264 #include <limits.h>
12265                  #ifndef LLONG_MAX
12266                  # define HALF \
12267                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
12268                  # define LLONG_MAX (HALF - 1 + HALF)
12269                  #endif
12270 int
12271 main ()
12272 {
12273 long long int n = 1;
12274                  int i;
12275                  for (i = 0; ; i++)
12276                    {
12277                      long long int m = n << i;
12278                      if (m >> i != n)
12279                        return 1;
12280                      if (LLONG_MAX / 2 < m)
12281                        break;
12282                    }
12283                  return 0;
12284   ;
12285   return 0;
12286 }
12287 _ACEOF
12288 if ac_fn_c_try_run "$LINENO"; then :
12289
12290 else
12291   ac_cv_type_long_long_int=no
12292 fi
12293 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12294   conftest.$ac_objext conftest.beam conftest.$ac_ext
12295 fi
12296
12297         fi
12298       fi
12299 fi
12300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
12301 $as_echo "$ac_cv_type_long_long_int" >&6; }
12302   if test $ac_cv_type_long_long_int = yes; then
12303
12304 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
12305
12306   fi
12307
12308
12309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
12310 $as_echo_n "checking for locale_t... " >&6; }
12311 if ${pgac_cv_type_locale_t+:} false; then :
12312   $as_echo_n "(cached) " >&6
12313 else
12314   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12315 /* end confdefs.h.  */
12316 #include <locale.h>
12317 locale_t x;
12318 int
12319 main ()
12320 {
12321
12322   ;
12323   return 0;
12324 }
12325 _ACEOF
12326 if ac_fn_c_try_compile "$LINENO"; then :
12327   pgac_cv_type_locale_t=yes
12328 else
12329   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12330 /* end confdefs.h.  */
12331 #include <xlocale.h>
12332 locale_t x;
12333 int
12334 main ()
12335 {
12336
12337   ;
12338   return 0;
12339 }
12340 _ACEOF
12341 if ac_fn_c_try_compile "$LINENO"; then :
12342   pgac_cv_type_locale_t='yes (in xlocale.h)'
12343 else
12344   pgac_cv_type_locale_t=no
12345 fi
12346 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12347 fi
12348 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12349 fi
12350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
12351 $as_echo "$pgac_cv_type_locale_t" >&6; }
12352 if test "$pgac_cv_type_locale_t" != no; then
12353
12354 $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
12355
12356 fi
12357 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
12358
12359 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
12360
12361 fi
12362
12363 ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
12364 #include <sys/param.h>
12365 #ifdef HAVE_SYS_UCRED_H
12366 #include <sys/ucred.h>
12367 #endif
12368 "
12369 if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
12370
12371 cat >>confdefs.h <<_ACEOF
12372 #define HAVE_STRUCT_CMSGCRED 1
12373 _ACEOF
12374
12375
12376 fi
12377
12378
12379 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
12380 #include <getopt.h>
12381 #endif
12382 "
12383 if test "x$ac_cv_type_struct_option" = xyes; then :
12384
12385 cat >>confdefs.h <<_ACEOF
12386 #define HAVE_STRUCT_OPTION 1
12387 _ACEOF
12388
12389
12390 fi
12391
12392
12393 if test "$with_zlib" = yes; then
12394   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
12395   # did not).  While we could work around the lack of z_streamp, it
12396   # seems unwise to encourage people to use such old zlib versions...
12397   ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
12398 "
12399 if test "x$ac_cv_type_z_streamp" = xyes; then :
12400
12401 else
12402   as_fn_error $? "zlib version is too old
12403 Use --without-zlib to disable zlib support." "$LINENO" 5
12404 fi
12405
12406 fi
12407
12408 # On PPC, check if assembler supports LWARX instruction's mutex hint bit
12409 case $host_cpu in
12410   ppc*|powerpc*)
12411     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports lwarx hint bit" >&5
12412 $as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
12413     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12414 /* end confdefs.h.  */
12415
12416 int
12417 main ()
12418 {
12419 int a = 0; int *p = &a; int r;
12420          __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
12421   ;
12422   return 0;
12423 }
12424 _ACEOF
12425 if ac_fn_c_try_compile "$LINENO"; then :
12426   pgac_cv_have_ppc_mutex_hint=yes
12427 else
12428   pgac_cv_have_ppc_mutex_hint=no
12429 fi
12430 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12431     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_ppc_mutex_hint" >&5
12432 $as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
12433     if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
12434
12435 $as_echo "#define HAVE_PPC_LWARX_MUTEX_HINT 1" >>confdefs.h
12436
12437     fi
12438   ;;
12439 esac
12440
12441 # Check largefile support.  You might think this is a system service not a
12442 # compiler characteristic, but you'd be wrong.  We must check this before
12443 # probing existence of related functions such as fseeko, since the largefile
12444 # defines can affect what is generated for that.
12445 if test "$PORTNAME" != "win32"; then
12446    # Check whether --enable-largefile was given.
12447 if test "${enable_largefile+set}" = set; then :
12448   enableval=$enable_largefile;
12449 fi
12450
12451 if test "$enable_largefile" != no; then
12452
12453   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
12454 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
12455 if ${ac_cv_sys_largefile_CC+:} false; then :
12456   $as_echo_n "(cached) " >&6
12457 else
12458   ac_cv_sys_largefile_CC=no
12459      if test "$GCC" != yes; then
12460        ac_save_CC=$CC
12461        while :; do
12462          # IRIX 6.2 and later do not support large files by default,
12463          # so use the C compiler's -n32 option if that helps.
12464          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12465 /* end confdefs.h.  */
12466 #include <sys/types.h>
12467  /* Check that off_t can represent 2**63 - 1 correctly.
12468     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12469     since some C++ compilers masquerading as C compilers
12470     incorrectly reject 9223372036854775807.  */
12471 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12472   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12473                        && LARGE_OFF_T % 2147483647 == 1)
12474                       ? 1 : -1];
12475 int
12476 main ()
12477 {
12478
12479   ;
12480   return 0;
12481 }
12482 _ACEOF
12483          if ac_fn_c_try_compile "$LINENO"; then :
12484   break
12485 fi
12486 rm -f core conftest.err conftest.$ac_objext
12487          CC="$CC -n32"
12488          if ac_fn_c_try_compile "$LINENO"; then :
12489   ac_cv_sys_largefile_CC=' -n32'; break
12490 fi
12491 rm -f core conftest.err conftest.$ac_objext
12492          break
12493        done
12494        CC=$ac_save_CC
12495        rm -f conftest.$ac_ext
12496     fi
12497 fi
12498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
12499 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
12500   if test "$ac_cv_sys_largefile_CC" != no; then
12501     CC=$CC$ac_cv_sys_largefile_CC
12502   fi
12503
12504   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12505 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
12506 if ${ac_cv_sys_file_offset_bits+:} false; then :
12507   $as_echo_n "(cached) " >&6
12508 else
12509   while :; do
12510   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12511 /* end confdefs.h.  */
12512 #include <sys/types.h>
12513  /* Check that off_t can represent 2**63 - 1 correctly.
12514     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12515     since some C++ compilers masquerading as C compilers
12516     incorrectly reject 9223372036854775807.  */
12517 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12518   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12519                        && LARGE_OFF_T % 2147483647 == 1)
12520                       ? 1 : -1];
12521 int
12522 main ()
12523 {
12524
12525   ;
12526   return 0;
12527 }
12528 _ACEOF
12529 if ac_fn_c_try_compile "$LINENO"; then :
12530   ac_cv_sys_file_offset_bits=no; break
12531 fi
12532 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12533   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12534 /* end confdefs.h.  */
12535 #define _FILE_OFFSET_BITS 64
12536 #include <sys/types.h>
12537  /* Check that off_t can represent 2**63 - 1 correctly.
12538     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12539     since some C++ compilers masquerading as C compilers
12540     incorrectly reject 9223372036854775807.  */
12541 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12542   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12543                        && LARGE_OFF_T % 2147483647 == 1)
12544                       ? 1 : -1];
12545 int
12546 main ()
12547 {
12548
12549   ;
12550   return 0;
12551 }
12552 _ACEOF
12553 if ac_fn_c_try_compile "$LINENO"; then :
12554   ac_cv_sys_file_offset_bits=64; break
12555 fi
12556 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12557   ac_cv_sys_file_offset_bits=unknown
12558   break
12559 done
12560 fi
12561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
12562 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
12563 case $ac_cv_sys_file_offset_bits in #(
12564   no | unknown) ;;
12565   *)
12566 cat >>confdefs.h <<_ACEOF
12567 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
12568 _ACEOF
12569 ;;
12570 esac
12571 rm -rf conftest*
12572   if test $ac_cv_sys_file_offset_bits = unknown; then
12573     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
12574 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
12575 if ${ac_cv_sys_large_files+:} false; then :
12576   $as_echo_n "(cached) " >&6
12577 else
12578   while :; do
12579   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12580 /* end confdefs.h.  */
12581 #include <sys/types.h>
12582  /* Check that off_t can represent 2**63 - 1 correctly.
12583     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12584     since some C++ compilers masquerading as C compilers
12585     incorrectly reject 9223372036854775807.  */
12586 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12587   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12588                        && LARGE_OFF_T % 2147483647 == 1)
12589                       ? 1 : -1];
12590 int
12591 main ()
12592 {
12593
12594   ;
12595   return 0;
12596 }
12597 _ACEOF
12598 if ac_fn_c_try_compile "$LINENO"; then :
12599   ac_cv_sys_large_files=no; break
12600 fi
12601 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12602   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12603 /* end confdefs.h.  */
12604 #define _LARGE_FILES 1
12605 #include <sys/types.h>
12606  /* Check that off_t can represent 2**63 - 1 correctly.
12607     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12608     since some C++ compilers masquerading as C compilers
12609     incorrectly reject 9223372036854775807.  */
12610 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12611   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12612                        && LARGE_OFF_T % 2147483647 == 1)
12613                       ? 1 : -1];
12614 int
12615 main ()
12616 {
12617
12618   ;
12619   return 0;
12620 }
12621 _ACEOF
12622 if ac_fn_c_try_compile "$LINENO"; then :
12623   ac_cv_sys_large_files=1; break
12624 fi
12625 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12626   ac_cv_sys_large_files=unknown
12627   break
12628 done
12629 fi
12630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
12631 $as_echo "$ac_cv_sys_large_files" >&6; }
12632 case $ac_cv_sys_large_files in #(
12633   no | unknown) ;;
12634   *)
12635 cat >>confdefs.h <<_ACEOF
12636 #define _LARGE_FILES $ac_cv_sys_large_files
12637 _ACEOF
12638 ;;
12639 esac
12640 rm -rf conftest*
12641   fi
12642
12643
12644 fi
12645
12646
12647 fi
12648
12649 # Check for largefile support (must be after AC_SYS_LARGEFILE)
12650 # The cast to long int works around a bug in the HP C Compiler
12651 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12652 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12653 # This bug is HP SR number 8606223364.
12654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
12655 $as_echo_n "checking size of off_t... " >&6; }
12656 if ${ac_cv_sizeof_off_t+:} false; then :
12657   $as_echo_n "(cached) " >&6
12658 else
12659   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :
12660
12661 else
12662   if test "$ac_cv_type_off_t" = yes; then
12663      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12664 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12665 as_fn_error 77 "cannot compute sizeof (off_t)
12666 See \`config.log' for more details" "$LINENO" 5; }
12667    else
12668      ac_cv_sizeof_off_t=0
12669    fi
12670 fi
12671
12672 fi
12673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
12674 $as_echo "$ac_cv_sizeof_off_t" >&6; }
12675
12676
12677
12678 cat >>confdefs.h <<_ACEOF
12679 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
12680 _ACEOF
12681
12682
12683
12684 # If we don't have largefile support, can't handle segsize >= 2GB.
12685 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
12686    as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
12687 fi
12688
12689
12690 ##
12691 ## Functions, global variables
12692 ##
12693
12694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
12695 $as_echo_n "checking for int timezone... " >&6; }
12696 if ${pgac_cv_var_int_timezone+:} false; then :
12697   $as_echo_n "(cached) " >&6
12698 else
12699   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12700 /* end confdefs.h.  */
12701 #include <time.h>
12702 int res;
12703 int
12704 main ()
12705 {
12706 #ifndef __CYGWIN__
12707 res = timezone / 60;
12708 #else
12709 res = _timezone / 60;
12710 #endif
12711   ;
12712   return 0;
12713 }
12714 _ACEOF
12715 if ac_fn_c_try_link "$LINENO"; then :
12716   pgac_cv_var_int_timezone=yes
12717 else
12718   pgac_cv_var_int_timezone=no
12719 fi
12720 rm -f core conftest.err conftest.$ac_objext \
12721     conftest$ac_exeext conftest.$ac_ext
12722 fi
12723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
12724 $as_echo "$pgac_cv_var_int_timezone" >&6; }
12725 if test x"$pgac_cv_var_int_timezone" = xyes ; then
12726
12727 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
12728
12729 fi
12730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for accept()" >&5
12731 $as_echo_n "checking types of arguments for accept()... " >&6; }
12732  if ${ac_cv_func_accept_return+:} false; then :
12733   $as_echo_n "(cached) " >&6
12734 else
12735    if ${ac_cv_func_accept_arg1+:} false; then :
12736   $as_echo_n "(cached) " >&6
12737 else
12738     if ${ac_cv_func_accept_arg2+:} false; then :
12739   $as_echo_n "(cached) " >&6
12740 else
12741      if ${ac_cv_func_accept_arg3+:} false; then :
12742   $as_echo_n "(cached) " >&6
12743 else
12744       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL' 'SOCKET WSAAPI'; do
12745       for ac_cv_func_accept_arg1 in 'int' 'unsigned int' 'SOCKET'; do
12746        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
12747         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
12748          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12749 /* end confdefs.h.  */
12750 #include <sys/types.h>
12751 #include <sys/socket.h>
12752 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
12753 _ACEOF
12754 if ac_fn_c_try_compile "$LINENO"; then :
12755   ac_not_found=no; break 4
12756 else
12757   ac_not_found=yes
12758 fi
12759 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12760        done
12761       done
12762      done
12763     done
12764     if test "$ac_not_found" = yes; then
12765       as_fn_error $? "could not determine argument types" "$LINENO" 5
12766     fi
12767     if test "$ac_cv_func_accept_arg3" = "void"; then
12768       ac_cv_func_accept_arg3=int
12769     fi
12770
12771 fi
12772
12773 fi
12774
12775 fi
12776
12777 fi
12778  { $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
12779 $as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
12780
12781 cat >>confdefs.h <<_ACEOF
12782 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
12783 _ACEOF
12784
12785
12786 cat >>confdefs.h <<_ACEOF
12787 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
12788 _ACEOF
12789
12790
12791 cat >>confdefs.h <<_ACEOF
12792 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
12793 _ACEOF
12794
12795
12796 cat >>confdefs.h <<_ACEOF
12797 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
12798 _ACEOF
12799
12800
12801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
12802 $as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
12803 if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
12804   $as_echo_n "(cached) " >&6
12805 else
12806   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12807 /* end confdefs.h.  */
12808 #include <sys/time.h>
12809 int
12810 main ()
12811 {
12812 struct timeval *tp;
12813 struct timezone *tzp;
12814 gettimeofday(tp,tzp);
12815   ;
12816   return 0;
12817 }
12818 _ACEOF
12819 if ac_fn_c_try_compile "$LINENO"; then :
12820   pgac_cv_func_gettimeofday_1arg=no
12821 else
12822   pgac_cv_func_gettimeofday_1arg=yes
12823 fi
12824 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12825 fi
12826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5
12827 $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
12828 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
12829
12830 $as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
12831
12832 fi
12833
12834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcstombs_l declaration" >&5
12835 $as_echo_n "checking for wcstombs_l declaration... " >&6; }
12836 if ${pgac_cv_func_wcstombs_l+:} false; then :
12837   $as_echo_n "(cached) " >&6
12838 else
12839   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12840 /* end confdefs.h.  */
12841 #include <stdlib.h>
12842 #include <locale.h>
12843 int
12844 main ()
12845 {
12846 #ifndef wcstombs_l
12847 (void) wcstombs_l;
12848 #endif
12849   ;
12850   return 0;
12851 }
12852 _ACEOF
12853 if ac_fn_c_try_compile "$LINENO"; then :
12854   pgac_cv_func_wcstombs_l='yes'
12855 else
12856   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12857 /* end confdefs.h.  */
12858 #include <stdlib.h>
12859 #include <locale.h>
12860 #include <xlocale.h>
12861 int
12862 main ()
12863 {
12864 #ifndef wcstombs_l
12865 (void) wcstombs_l;
12866 #endif
12867   ;
12868   return 0;
12869 }
12870 _ACEOF
12871 if ac_fn_c_try_compile "$LINENO"; then :
12872   pgac_cv_func_wcstombs_l='yes (in xlocale.h)'
12873 else
12874   pgac_cv_func_wcstombs_l='no'
12875 fi
12876 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12877 fi
12878 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12879 fi
12880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_wcstombs_l" >&5
12881 $as_echo "$pgac_cv_func_wcstombs_l" >&6; }
12882 if test "$pgac_cv_func_wcstombs_l" = 'yes (in xlocale.h)'; then
12883
12884 $as_echo "#define WCSTOMBS_L_IN_XLOCALE 1" >>confdefs.h
12885
12886 fi
12887
12888 # Some versions of libedit contain strlcpy(), setproctitle(), and other
12889 # symbols that that library has no business exposing to the world.  Pending
12890 # acquisition of a clue by those developers, ignore libedit (including its
12891 # possible alias of libreadline) while checking for everything else.
12892 LIBS_including_readline="$LIBS"
12893 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
12894
12895 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
12896 do :
12897   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12898 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12899 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12900   cat >>confdefs.h <<_ACEOF
12901 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12902 _ACEOF
12903
12904 fi
12905 done
12906
12907
12908 ac_fn_c_check_func "$LINENO" "fseeko" "ac_cv_func_fseeko"
12909 if test "x$ac_cv_func_fseeko" = xyes; then :
12910   $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
12911
12912 else
12913   case " $LIBOBJS " in
12914   *" fseeko.$ac_objext "* ) ;;
12915   *) LIBOBJS="$LIBOBJS fseeko.$ac_objext"
12916  ;;
12917 esac
12918
12919 fi
12920
12921
12922 case $host_os in
12923         # NetBSD uses a custom fseeko/ftello built on fsetpos/fgetpos
12924         # Mingw uses macros to access Win32 API calls
12925         netbsd*|mingw*)
12926
12927 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
12928
12929                 ac_cv_func_fseeko=yes;;
12930         *)
12931                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
12932 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
12933 if ${ac_cv_sys_largefile_source+:} false; then :
12934   $as_echo_n "(cached) " >&6
12935 else
12936   while :; do
12937   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12938 /* end confdefs.h.  */
12939 #include <sys/types.h> /* for off_t */
12940      #include <stdio.h>
12941 int
12942 main ()
12943 {
12944 int (*fp) (FILE *, off_t, int) = fseeko;
12945      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
12946   ;
12947   return 0;
12948 }
12949 _ACEOF
12950 if ac_fn_c_try_link "$LINENO"; then :
12951   ac_cv_sys_largefile_source=no; break
12952 fi
12953 rm -f core conftest.err conftest.$ac_objext \
12954     conftest$ac_exeext conftest.$ac_ext
12955   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12956 /* end confdefs.h.  */
12957 #define _LARGEFILE_SOURCE 1
12958 #include <sys/types.h> /* for off_t */
12959      #include <stdio.h>
12960 int
12961 main ()
12962 {
12963 int (*fp) (FILE *, off_t, int) = fseeko;
12964      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
12965   ;
12966   return 0;
12967 }
12968 _ACEOF
12969 if ac_fn_c_try_link "$LINENO"; then :
12970   ac_cv_sys_largefile_source=1; break
12971 fi
12972 rm -f core conftest.err conftest.$ac_objext \
12973     conftest$ac_exeext conftest.$ac_ext
12974   ac_cv_sys_largefile_source=unknown
12975   break
12976 done
12977 fi
12978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
12979 $as_echo "$ac_cv_sys_largefile_source" >&6; }
12980 case $ac_cv_sys_largefile_source in #(
12981   no | unknown) ;;
12982   *)
12983 cat >>confdefs.h <<_ACEOF
12984 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
12985 _ACEOF
12986 ;;
12987 esac
12988 rm -rf conftest*
12989
12990 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
12991 # in glibc 2.1.3, but that breaks too many other things.
12992 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
12993 if test $ac_cv_sys_largefile_source != unknown; then
12994
12995 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
12996
12997 fi
12998 ;;
12999 esac
13000
13001 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
13002 # by calling it, 2009-04-02
13003 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
13004 if test "$PORTNAME" != "solaris"; then
13005 for ac_func in posix_fadvise
13006 do :
13007   ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
13008 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
13009   cat >>confdefs.h <<_ACEOF
13010 #define HAVE_POSIX_FADVISE 1
13011 _ACEOF
13012
13013 fi
13014 done
13015
13016 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
13017 "
13018 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
13019   ac_have_decl=1
13020 else
13021   ac_have_decl=0
13022 fi
13023
13024 cat >>confdefs.h <<_ACEOF
13025 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
13026 _ACEOF
13027
13028 fi
13029
13030 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
13031 "
13032 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
13033   ac_have_decl=1
13034 else
13035   ac_have_decl=0
13036 fi
13037
13038 cat >>confdefs.h <<_ACEOF
13039 #define HAVE_DECL_FDATASYNC $ac_have_decl
13040 _ACEOF
13041
13042 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
13043 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
13044   ac_have_decl=1
13045 else
13046   ac_have_decl=0
13047 fi
13048
13049 cat >>confdefs.h <<_ACEOF
13050 #define HAVE_DECL_STRLCAT $ac_have_decl
13051 _ACEOF
13052 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
13053 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
13054   ac_have_decl=1
13055 else
13056   ac_have_decl=0
13057 fi
13058
13059 cat >>confdefs.h <<_ACEOF
13060 #define HAVE_DECL_STRLCPY $ac_have_decl
13061 _ACEOF
13062
13063 # This is probably only present on macOS, but may as well check always
13064 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
13065 "
13066 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
13067   ac_have_decl=1
13068 else
13069   ac_have_decl=0
13070 fi
13071
13072 cat >>confdefs.h <<_ACEOF
13073 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
13074 _ACEOF
13075
13076
13077 HAVE_IPV6=no
13078 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default
13079 #include <netinet/in.h>
13080 "
13081 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
13082
13083 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
13084
13085          HAVE_IPV6=yes
13086 fi
13087
13088
13089
13090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
13091 $as_echo_n "checking for PS_STRINGS... " >&6; }
13092 if ${pgac_cv_var_PS_STRINGS+:} false; then :
13093   $as_echo_n "(cached) " >&6
13094 else
13095   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13096 /* end confdefs.h.  */
13097 #include <machine/vmparam.h>
13098 #include <sys/exec.h>
13099
13100 int
13101 main ()
13102 {
13103 PS_STRINGS->ps_nargvstr = 1;
13104 PS_STRINGS->ps_argvstr = "foo";
13105   ;
13106   return 0;
13107 }
13108 _ACEOF
13109 if ac_fn_c_try_link "$LINENO"; then :
13110   pgac_cv_var_PS_STRINGS=yes
13111 else
13112   pgac_cv_var_PS_STRINGS=no
13113 fi
13114 rm -f core conftest.err conftest.$ac_objext \
13115     conftest$ac_exeext conftest.$ac_ext
13116 fi
13117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
13118 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
13119 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
13120
13121 $as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
13122
13123 fi
13124
13125
13126 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
13127 # is missing.  Yes, there are machines that have only one.  We may
13128 # also decide to use snprintf.c if snprintf() is present but does not
13129 # have all the features we need --- see below.
13130
13131 if test "$PORTNAME" = "win32"; then
13132   # Win32 gets snprintf.c built unconditionally.
13133   #
13134   # To properly translate all NLS languages strings, we must support the
13135   # *printf() %$ format, which allows *printf() arguments to be selected
13136   # by position in the translated string.
13137   #
13138   # libintl versions < 0.13 use the native *printf() functions, and Win32
13139   # *printf() doesn't understand %$, so we must use our /port versions,
13140   # which do understand %$. libintl versions >= 0.13 include their own
13141   # *printf versions on Win32.  The libintl 0.13 release note text is:
13142   #
13143   #   C format strings with positions, as they arise when a translator
13144   #   needs to reorder a sentence, are now supported on all platforms.
13145   #   On those few platforms (NetBSD and Woe32) for which the native
13146   #   printf()/fprintf()/... functions don't support such format
13147   #   strings, replacements are provided through <libintl.h>.
13148   #
13149   # We could use libintl >= 0.13's *printf() if we were sure that we had
13150   # a litint >= 0.13 at runtime, but seeing that there is no clean way
13151   # to guarantee that, it is best to just use our own, so we are sure to
13152   # get %$ support. In include/port.h we disable the *printf() macros
13153   # that might have been defined by libintl.
13154   #
13155   # We do this unconditionally whether NLS is used or not so we are sure
13156   # that all Win32 libraries and binaries behave the same.
13157   pgac_need_repl_snprintf=yes
13158 else
13159   pgac_need_repl_snprintf=no
13160   for ac_func in snprintf
13161 do :
13162   ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
13163 if test "x$ac_cv_func_snprintf" = xyes; then :
13164   cat >>confdefs.h <<_ACEOF
13165 #define HAVE_SNPRINTF 1
13166 _ACEOF
13167
13168 else
13169   pgac_need_repl_snprintf=yes
13170 fi
13171 done
13172
13173   for ac_func in vsnprintf
13174 do :
13175   ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
13176 if test "x$ac_cv_func_vsnprintf" = xyes; then :
13177   cat >>confdefs.h <<_ACEOF
13178 #define HAVE_VSNPRINTF 1
13179 _ACEOF
13180
13181 else
13182   pgac_need_repl_snprintf=yes
13183 fi
13184 done
13185
13186 fi
13187
13188
13189 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
13190 # include/c.h will provide declarations.  Note this is a separate test
13191 # from whether the functions exist in the C library --- there are
13192 # systems that have the functions but don't bother to declare them :-(
13193
13194 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
13195 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
13196   ac_have_decl=1
13197 else
13198   ac_have_decl=0
13199 fi
13200
13201 cat >>confdefs.h <<_ACEOF
13202 #define HAVE_DECL_SNPRINTF $ac_have_decl
13203 _ACEOF
13204 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
13205 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
13206   ac_have_decl=1
13207 else
13208   ac_have_decl=0
13209 fi
13210
13211 cat >>confdefs.h <<_ACEOF
13212 #define HAVE_DECL_VSNPRINTF $ac_have_decl
13213 _ACEOF
13214
13215
13216
13217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf" >&5
13218 $as_echo_n "checking for isinf... " >&6; }
13219 if ${ac_cv_func_isinf+:} false; then :
13220   $as_echo_n "(cached) " >&6
13221 else
13222   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13223 /* end confdefs.h.  */
13224
13225 #include <math.h>
13226 double glob_double;
13227
13228 int
13229 main ()
13230 {
13231 return isinf(glob_double) ? 0 : 1;
13232   ;
13233   return 0;
13234 }
13235 _ACEOF
13236 if ac_fn_c_try_link "$LINENO"; then :
13237   ac_cv_func_isinf=yes
13238 else
13239   ac_cv_func_isinf=no
13240 fi
13241 rm -f core conftest.err conftest.$ac_objext \
13242     conftest$ac_exeext conftest.$ac_ext
13243 fi
13244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_isinf" >&5
13245 $as_echo "$ac_cv_func_isinf" >&6; }
13246
13247 if test $ac_cv_func_isinf = yes ; then
13248
13249 $as_echo "#define HAVE_ISINF 1" >>confdefs.h
13250
13251 else
13252   case " $LIBOBJS " in
13253   *" isinf.$ac_objext "* ) ;;
13254   *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
13255  ;;
13256 esac
13257
13258   # Look for a way to implement a substitute for isinf()
13259   for ac_func in fpclass fp_class fp_class_d class
13260 do :
13261   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13262 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13263 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13264   cat >>confdefs.h <<_ACEOF
13265 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13266 _ACEOF
13267  break
13268 fi
13269 done
13270
13271 fi
13272
13273 ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
13274 if test "x$ac_cv_func_crypt" = xyes; then :
13275   $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
13276
13277 else
13278   case " $LIBOBJS " in
13279   *" crypt.$ac_objext "* ) ;;
13280   *) LIBOBJS="$LIBOBJS crypt.$ac_objext"
13281  ;;
13282 esac
13283
13284 fi
13285
13286 ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
13287 if test "x$ac_cv_func_fls" = xyes; then :
13288   $as_echo "#define HAVE_FLS 1" >>confdefs.h
13289
13290 else
13291   case " $LIBOBJS " in
13292   *" fls.$ac_objext "* ) ;;
13293   *) LIBOBJS="$LIBOBJS fls.$ac_objext"
13294  ;;
13295 esac
13296
13297 fi
13298
13299 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
13300 if test "x$ac_cv_func_getopt" = xyes; then :
13301   $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
13302
13303 else
13304   case " $LIBOBJS " in
13305   *" getopt.$ac_objext "* ) ;;
13306   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
13307  ;;
13308 esac
13309
13310 fi
13311
13312 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
13313 if test "x$ac_cv_func_getrusage" = xyes; then :
13314   $as_echo "#define HAVE_GETRUSAGE 1" >>confdefs.h
13315
13316 else
13317   case " $LIBOBJS " in
13318   *" getrusage.$ac_objext "* ) ;;
13319   *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
13320  ;;
13321 esac
13322
13323 fi
13324
13325 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
13326 if test "x$ac_cv_func_inet_aton" = xyes; then :
13327   $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
13328
13329 else
13330   case " $LIBOBJS " in
13331   *" inet_aton.$ac_objext "* ) ;;
13332   *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
13333  ;;
13334 esac
13335
13336 fi
13337
13338 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
13339 if test "x$ac_cv_func_mkdtemp" = xyes; then :
13340   $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
13341
13342 else
13343   case " $LIBOBJS " in
13344   *" mkdtemp.$ac_objext "* ) ;;
13345   *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
13346  ;;
13347 esac
13348
13349 fi
13350
13351 ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
13352 if test "x$ac_cv_func_random" = xyes; then :
13353   $as_echo "#define HAVE_RANDOM 1" >>confdefs.h
13354
13355 else
13356   case " $LIBOBJS " in
13357   *" random.$ac_objext "* ) ;;
13358   *) LIBOBJS="$LIBOBJS random.$ac_objext"
13359  ;;
13360 esac
13361
13362 fi
13363
13364 ac_fn_c_check_func "$LINENO" "rint" "ac_cv_func_rint"
13365 if test "x$ac_cv_func_rint" = xyes; then :
13366   $as_echo "#define HAVE_RINT 1" >>confdefs.h
13367
13368 else
13369   case " $LIBOBJS " in
13370   *" rint.$ac_objext "* ) ;;
13371   *) LIBOBJS="$LIBOBJS rint.$ac_objext"
13372  ;;
13373 esac
13374
13375 fi
13376
13377 ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
13378 if test "x$ac_cv_func_srandom" = xyes; then :
13379   $as_echo "#define HAVE_SRANDOM 1" >>confdefs.h
13380
13381 else
13382   case " $LIBOBJS " in
13383   *" srandom.$ac_objext "* ) ;;
13384   *) LIBOBJS="$LIBOBJS srandom.$ac_objext"
13385  ;;
13386 esac
13387
13388 fi
13389
13390 ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
13391 if test "x$ac_cv_func_strerror" = xyes; then :
13392   $as_echo "#define HAVE_STRERROR 1" >>confdefs.h
13393
13394 else
13395   case " $LIBOBJS " in
13396   *" strerror.$ac_objext "* ) ;;
13397   *) LIBOBJS="$LIBOBJS strerror.$ac_objext"
13398  ;;
13399 esac
13400
13401 fi
13402
13403 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
13404 if test "x$ac_cv_func_strlcat" = xyes; then :
13405   $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
13406
13407 else
13408   case " $LIBOBJS " in
13409   *" strlcat.$ac_objext "* ) ;;
13410   *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
13411  ;;
13412 esac
13413
13414 fi
13415
13416 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
13417 if test "x$ac_cv_func_strlcpy" = xyes; then :
13418   $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
13419
13420 else
13421   case " $LIBOBJS " in
13422   *" strlcpy.$ac_objext "* ) ;;
13423   *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
13424  ;;
13425 esac
13426
13427 fi
13428
13429
13430
13431 case $host_os in
13432
13433         # Windows uses a specialised env handler
13434         # and doesn't need a replacement getpeereid because it doesn't use
13435         # Unix sockets.
13436         mingw*)
13437
13438 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
13439
13440
13441 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
13442
13443                 ac_cv_func_unsetenv=yes
13444                 ac_cv_func_getpeereid=yes;;
13445         *)
13446                 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
13447 if test "x$ac_cv_func_unsetenv" = xyes; then :
13448   $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
13449
13450 else
13451   case " $LIBOBJS " in
13452   *" unsetenv.$ac_objext "* ) ;;
13453   *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext"
13454  ;;
13455 esac
13456
13457 fi
13458
13459 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
13460 if test "x$ac_cv_func_getpeereid" = xyes; then :
13461   $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
13462
13463 else
13464   case " $LIBOBJS " in
13465   *" getpeereid.$ac_objext "* ) ;;
13466   *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
13467  ;;
13468 esac
13469
13470 fi
13471
13472
13473                 ;;
13474 esac
13475
13476 # System's version of getaddrinfo(), if any, may be used only if we found
13477 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
13478 # We use only our own getaddrinfo.c on Windows, but it's time to revisit that.
13479 if test x"$ac_cv_type_struct_addrinfo" = xyes && \
13480    test "$PORTNAME" != "win32"; then
13481   ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
13482 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
13483   $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
13484
13485 else
13486   case " $LIBOBJS " in
13487   *" getaddrinfo.$ac_objext "* ) ;;
13488   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
13489  ;;
13490 esac
13491
13492 fi
13493
13494
13495 else
13496   case " $LIBOBJS " in
13497   *" getaddrinfo.$ac_objext "* ) ;;
13498   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
13499  ;;
13500 esac
13501
13502 fi
13503
13504 # Similarly, use system's getopt_long() only if system provides struct option.
13505 if test x"$ac_cv_type_struct_option" = xyes ; then
13506   ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
13507 if test "x$ac_cv_func_getopt_long" = xyes; then :
13508   $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
13509
13510 else
13511   case " $LIBOBJS " in
13512   *" getopt_long.$ac_objext "* ) ;;
13513   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
13514  ;;
13515 esac
13516
13517 fi
13518
13519
13520 else
13521   case " $LIBOBJS " in
13522   *" getopt_long.$ac_objext "* ) ;;
13523   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
13524  ;;
13525 esac
13526
13527 fi
13528
13529 # Solaris' getopt() doesn't do what we want for long options, so always use
13530 # our version on that platform.
13531 if test "$PORTNAME" = "solaris"; then
13532   case " $LIBOBJS " in
13533   *" getopt.$ac_objext "* ) ;;
13534   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
13535  ;;
13536 esac
13537
13538 fi
13539
13540 # mingw has adopted a GNU-centric interpretation of optind/optreset,
13541 # so always use our version on Windows.
13542 if test "$PORTNAME" = "win32"; then
13543   case " $LIBOBJS " in
13544   *" getopt.$ac_objext "* ) ;;
13545   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
13546  ;;
13547 esac
13548
13549   case " $LIBOBJS " in
13550   *" getopt_long.$ac_objext "* ) ;;
13551   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
13552  ;;
13553 esac
13554
13555 fi
13556
13557 # Win32 (really MinGW) support
13558 if test "$PORTNAME" = "win32"; then
13559   ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
13560 if test "x$ac_cv_func_gettimeofday" = xyes; then :
13561   $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
13562
13563 else
13564   case " $LIBOBJS " in
13565   *" gettimeofday.$ac_objext "* ) ;;
13566   *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
13567  ;;
13568 esac
13569
13570 fi
13571
13572
13573   case " $LIBOBJS " in
13574   *" dirmod.$ac_objext "* ) ;;
13575   *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
13576  ;;
13577 esac
13578
13579   case " $LIBOBJS " in
13580   *" kill.$ac_objext "* ) ;;
13581   *) LIBOBJS="$LIBOBJS kill.$ac_objext"
13582  ;;
13583 esac
13584
13585   case " $LIBOBJS " in
13586   *" open.$ac_objext "* ) ;;
13587   *) LIBOBJS="$LIBOBJS open.$ac_objext"
13588  ;;
13589 esac
13590
13591   case " $LIBOBJS " in
13592   *" system.$ac_objext "* ) ;;
13593   *) LIBOBJS="$LIBOBJS system.$ac_objext"
13594  ;;
13595 esac
13596
13597   case " $LIBOBJS " in
13598   *" win32env.$ac_objext "* ) ;;
13599   *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
13600  ;;
13601 esac
13602
13603   case " $LIBOBJS " in
13604   *" win32error.$ac_objext "* ) ;;
13605   *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
13606  ;;
13607 esac
13608
13609   case " $LIBOBJS " in
13610   *" win32security.$ac_objext "* ) ;;
13611   *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
13612  ;;
13613 esac
13614
13615   case " $LIBOBJS " in
13616   *" win32setlocale.$ac_objext "* ) ;;
13617   *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
13618  ;;
13619 esac
13620
13621
13622 $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
13623
13624   ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
13625 #define WIN32_LEAN_AND_MEAN
13626 #include <windows.h>
13627 #include <string.h>
13628 #include <dbghelp.h>
13629 "
13630 if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
13631
13632 cat >>confdefs.h <<_ACEOF
13633 #define HAVE_MINIDUMP_TYPE 1
13634 _ACEOF
13635
13636 pgac_minidump_type=yes
13637 else
13638   pgac_minidump_type=no
13639 fi
13640
13641 fi
13642 if test x"$pgac_minidump_type" = x"yes" ; then
13643   have_win32_dbghelp=yes
13644
13645 else
13646   have_win32_dbghelp=no
13647
13648 fi
13649
13650 # Cygwin needs only a bit of that
13651 if test "$PORTNAME" = "cygwin"; then
13652   case " $LIBOBJS " in
13653   *" dirmod.$ac_objext "* ) ;;
13654   *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
13655  ;;
13656 esac
13657
13658 fi
13659
13660 ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
13661 /* NetBSD declares sys_siglist in unistd.h.  */
13662 #ifdef HAVE_UNISTD_H
13663 # include <unistd.h>
13664 #endif
13665
13666 "
13667 if test "x$ac_cv_have_decl_sys_siglist" = xyes; then :
13668   ac_have_decl=1
13669 else
13670   ac_have_decl=0
13671 fi
13672
13673 cat >>confdefs.h <<_ACEOF
13674 #define HAVE_DECL_SYS_SIGLIST $ac_have_decl
13675 _ACEOF
13676
13677
13678 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
13679 if test "x$ac_cv_func_syslog" = xyes; then :
13680   ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
13681 if test "x$ac_cv_header_syslog_h" = xyes; then :
13682
13683 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
13684
13685 fi
13686
13687
13688 fi
13689
13690
13691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
13692 $as_echo_n "checking for opterr... " >&6; }
13693 if ${pgac_cv_var_int_opterr+:} false; then :
13694   $as_echo_n "(cached) " >&6
13695 else
13696   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13697 /* end confdefs.h.  */
13698 #include <unistd.h>
13699 int
13700 main ()
13701 {
13702 extern int opterr; opterr = 1;
13703   ;
13704   return 0;
13705 }
13706 _ACEOF
13707 if ac_fn_c_try_link "$LINENO"; then :
13708   pgac_cv_var_int_opterr=yes
13709 else
13710   pgac_cv_var_int_opterr=no
13711 fi
13712 rm -f core conftest.err conftest.$ac_objext \
13713     conftest$ac_exeext conftest.$ac_ext
13714 fi
13715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
13716 $as_echo "$pgac_cv_var_int_opterr" >&6; }
13717 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
13718
13719 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
13720
13721 fi
13722
13723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
13724 $as_echo_n "checking for optreset... " >&6; }
13725 if ${pgac_cv_var_int_optreset+:} false; then :
13726   $as_echo_n "(cached) " >&6
13727 else
13728   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13729 /* end confdefs.h.  */
13730 #include <unistd.h>
13731 int
13732 main ()
13733 {
13734 extern int optreset; optreset = 1;
13735   ;
13736   return 0;
13737 }
13738 _ACEOF
13739 if ac_fn_c_try_link "$LINENO"; then :
13740   pgac_cv_var_int_optreset=yes
13741 else
13742   pgac_cv_var_int_optreset=no
13743 fi
13744 rm -f core conftest.err conftest.$ac_objext \
13745     conftest$ac_exeext conftest.$ac_ext
13746 fi
13747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
13748 $as_echo "$pgac_cv_var_int_optreset" >&6; }
13749 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
13750
13751 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
13752
13753 fi
13754
13755 for ac_func in strtoll strtoq
13756 do :
13757   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13758 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13759 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13760   cat >>confdefs.h <<_ACEOF
13761 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13762 _ACEOF
13763  break
13764 fi
13765 done
13766
13767 for ac_func in strtoull strtouq
13768 do :
13769   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13770 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13771 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13772   cat >>confdefs.h <<_ACEOF
13773 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13774 _ACEOF
13775  break
13776 fi
13777 done
13778
13779
13780 if test "$with_icu" = yes; then
13781   # ICU functions are macros, so we need to do this the long way.
13782
13783   # ucol_strcollUTF8() appeared in ICU 50.
13784   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ucol_strcollUTF8" >&5
13785 $as_echo_n "checking for ucol_strcollUTF8... " >&6; }
13786 if ${pgac_cv_func_ucol_strcollUTF8+:} false; then :
13787   $as_echo_n "(cached) " >&6
13788 else
13789   ac_save_CPPFLAGS=$CPPFLAGS
13790 CPPFLAGS="$ICU_CFLAGS $CPPFLAGS"
13791 ac_save_LIBS=$LIBS
13792 LIBS="$ICU_LIBS $LIBS"
13793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13794 /* end confdefs.h.  */
13795 #include <unicode/ucol.h>
13796
13797 int
13798 main ()
13799 {
13800 ucol_strcollUTF8(NULL, NULL, 0, NULL, 0, NULL);
13801   ;
13802   return 0;
13803 }
13804 _ACEOF
13805 if ac_fn_c_try_link "$LINENO"; then :
13806   pgac_cv_func_ucol_strcollUTF8=yes
13807 else
13808   pgac_cv_func_ucol_strcollUTF8=no
13809 fi
13810 rm -f core conftest.err conftest.$ac_objext \
13811     conftest$ac_exeext conftest.$ac_ext
13812 CPPFLAGS=$ac_save_CPPFLAGS
13813 LIBS=$ac_save_LIBS
13814 fi
13815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_ucol_strcollUTF8" >&5
13816 $as_echo "$pgac_cv_func_ucol_strcollUTF8" >&6; }
13817   if test "$pgac_cv_func_ucol_strcollUTF8" = yes ; then
13818
13819 $as_echo "#define HAVE_UCOL_STRCOLLUTF8 1" >>confdefs.h
13820
13821   fi
13822 fi
13823
13824 # Lastly, restore full LIBS list and check for readline/libedit symbols
13825 LIBS="$LIBS_including_readline"
13826
13827 if test "$with_readline" = yes; then
13828   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_append_character" >&5
13829 $as_echo_n "checking for rl_completion_append_character... " >&6; }
13830 if ${pgac_cv_var_rl_completion_append_character+:} false; then :
13831   $as_echo_n "(cached) " >&6
13832 else
13833   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13834 /* end confdefs.h.  */
13835 #include <stdio.h>
13836 #ifdef HAVE_READLINE_READLINE_H
13837 # include <readline/readline.h>
13838 #elif defined(HAVE_READLINE_H)
13839 # include <readline.h>
13840 #endif
13841
13842 int
13843 main ()
13844 {
13845 rl_completion_append_character = 'x';
13846   ;
13847   return 0;
13848 }
13849 _ACEOF
13850 if ac_fn_c_try_link "$LINENO"; then :
13851   pgac_cv_var_rl_completion_append_character=yes
13852 else
13853   pgac_cv_var_rl_completion_append_character=no
13854 fi
13855 rm -f core conftest.err conftest.$ac_objext \
13856     conftest$ac_exeext conftest.$ac_ext
13857 fi
13858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_append_character" >&5
13859 $as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
13860 if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
13861
13862 $as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
13863
13864 fi
13865   for ac_func in rl_completion_matches rl_filename_completion_function rl_reset_screen_size
13866 do :
13867   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13868 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13869 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13870   cat >>confdefs.h <<_ACEOF
13871 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13872 _ACEOF
13873
13874 fi
13875 done
13876
13877   for ac_func in append_history history_truncate_file
13878 do :
13879   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13880 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13881 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13882   cat >>confdefs.h <<_ACEOF
13883 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13884 _ACEOF
13885
13886 fi
13887 done
13888
13889 fi
13890
13891
13892 # This test makes sure that run tests work at all.  Sometimes a shared
13893 # library is found by the linker, but the runtime linker can't find it.
13894 # This check should come after all modifications of compiler or linker
13895 # variables, and before any other run tests.
13896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
13897 $as_echo_n "checking test program... " >&6; }
13898 if test "$cross_compiling" = yes; then :
13899   { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
13900 $as_echo "cross-compiling" >&6; }
13901 else
13902   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13903 /* end confdefs.h.  */
13904 int main() { return 0; }
13905 _ACEOF
13906 if ac_fn_c_try_run "$LINENO"; then :
13907   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
13908 $as_echo "ok" >&6; }
13909 else
13910   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
13911 $as_echo "failed" >&6; }
13912 as_fn_error $? "
13913 Could not execute a simple test program.  This may be a problem
13914 related to locating shared libraries.  Check the file 'config.log'
13915 for the exact reason." "$LINENO" 5
13916 fi
13917 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13918   conftest.$ac_objext conftest.beam conftest.$ac_ext
13919 fi
13920
13921
13922 # --------------------
13923 # Run tests below here
13924 # --------------------
13925
13926 # Force use of our snprintf if system's doesn't do arg control
13927 # See comment above at snprintf test for details.
13928 if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
13929   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports argument control" >&5
13930 $as_echo_n "checking whether snprintf supports argument control... " >&6; }
13931 if ${pgac_cv_snprintf_arg_control+:} false; then :
13932   $as_echo_n "(cached) " >&6
13933 else
13934   if test "$cross_compiling" = yes; then :
13935   pgac_cv_snprintf_arg_control=cross
13936 else
13937   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13938 /* end confdefs.h.  */
13939 #include <stdio.h>
13940 #include <string.h>
13941
13942 int main()
13943 {
13944   char buf[100];
13945
13946   /* can it swap arguments? */
13947   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
13948   if (strcmp(buf, "4 3") != 0)
13949     return 1;
13950   return 0;
13951 }
13952 _ACEOF
13953 if ac_fn_c_try_run "$LINENO"; then :
13954   pgac_cv_snprintf_arg_control=yes
13955 else
13956   pgac_cv_snprintf_arg_control=no
13957 fi
13958 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13959   conftest.$ac_objext conftest.beam conftest.$ac_ext
13960 fi
13961
13962
13963 fi
13964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_arg_control" >&5
13965 $as_echo "$pgac_cv_snprintf_arg_control" >&6; }
13966
13967   if test $pgac_cv_snprintf_arg_control != yes ; then
13968     pgac_need_repl_snprintf=yes
13969   fi
13970 fi
13971
13972
13973
13974
13975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
13976 $as_echo_n "checking whether long int is 64 bits... " >&6; }
13977 if ${pgac_cv_type_long_int_64+:} false; then :
13978   $as_echo_n "(cached) " >&6
13979 else
13980   if test "$cross_compiling" = yes; then :
13981   # If cross-compiling, check the size reported by the compiler and
13982 # trust that the arithmetic works.
13983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13984 /* end confdefs.h.  */
13985
13986 int
13987 main ()
13988 {
13989 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
13990 test_array [0] = 0;
13991 return test_array [0];
13992
13993   ;
13994   return 0;
13995 }
13996 _ACEOF
13997 if ac_fn_c_try_compile "$LINENO"; then :
13998   pgac_cv_type_long_int_64=yes
13999 else
14000   pgac_cv_type_long_int_64=no
14001 fi
14002 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14003 else
14004   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14005 /* end confdefs.h.  */
14006 typedef long int ac_int64;
14007
14008 /*
14009  * These are globals to discourage the compiler from folding all the
14010  * arithmetic tests down to compile-time constants.
14011  */
14012 ac_int64 a = 20000001;
14013 ac_int64 b = 40000005;
14014
14015 int does_int64_work()
14016 {
14017   ac_int64 c,d;
14018
14019   if (sizeof(ac_int64) != 8)
14020     return 0;                   /* definitely not the right size */
14021
14022   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
14023   c = a * b;
14024   d = (c + b) / b;
14025   if (d != a+1)
14026     return 0;
14027   return 1;
14028 }
14029
14030 int
14031 main() {
14032   return (! does_int64_work());
14033 }
14034 _ACEOF
14035 if ac_fn_c_try_run "$LINENO"; then :
14036   pgac_cv_type_long_int_64=yes
14037 else
14038   pgac_cv_type_long_int_64=no
14039 fi
14040 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14041   conftest.$ac_objext conftest.beam conftest.$ac_ext
14042 fi
14043
14044 fi
14045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
14046 $as_echo "$pgac_cv_type_long_int_64" >&6; }
14047
14048 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
14049 if test x"$pgac_cv_type_long_int_64" = xyes ; then
14050
14051 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
14052
14053 fi
14054
14055
14056 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
14057   pg_int64_type="long int"
14058 else
14059   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
14060 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
14061 if ${pgac_cv_type_long_long_int_64+:} false; then :
14062   $as_echo_n "(cached) " >&6
14063 else
14064   if test "$cross_compiling" = yes; then :
14065   # If cross-compiling, check the size reported by the compiler and
14066 # trust that the arithmetic works.
14067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14068 /* end confdefs.h.  */
14069
14070 int
14071 main ()
14072 {
14073 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
14074 test_array [0] = 0;
14075 return test_array [0];
14076
14077   ;
14078   return 0;
14079 }
14080 _ACEOF
14081 if ac_fn_c_try_compile "$LINENO"; then :
14082   pgac_cv_type_long_long_int_64=yes
14083 else
14084   pgac_cv_type_long_long_int_64=no
14085 fi
14086 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14087 else
14088   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14089 /* end confdefs.h.  */
14090 typedef long long int ac_int64;
14091
14092 /*
14093  * These are globals to discourage the compiler from folding all the
14094  * arithmetic tests down to compile-time constants.
14095  */
14096 ac_int64 a = 20000001;
14097 ac_int64 b = 40000005;
14098
14099 int does_int64_work()
14100 {
14101   ac_int64 c,d;
14102
14103   if (sizeof(ac_int64) != 8)
14104     return 0;                   /* definitely not the right size */
14105
14106   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
14107   c = a * b;
14108   d = (c + b) / b;
14109   if (d != a+1)
14110     return 0;
14111   return 1;
14112 }
14113
14114 int
14115 main() {
14116   return (! does_int64_work());
14117 }
14118 _ACEOF
14119 if ac_fn_c_try_run "$LINENO"; then :
14120   pgac_cv_type_long_long_int_64=yes
14121 else
14122   pgac_cv_type_long_long_int_64=no
14123 fi
14124 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14125   conftest.$ac_objext conftest.beam conftest.$ac_ext
14126 fi
14127
14128 fi
14129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
14130 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
14131
14132 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
14133 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
14134
14135 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
14136
14137 fi
14138
14139   if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
14140     pg_int64_type="long long int"
14141   else
14142     as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
14143   fi
14144 fi
14145
14146
14147 cat >>confdefs.h <<_ACEOF
14148 #define PG_INT64_TYPE $pg_int64_type
14149 _ACEOF
14150
14151
14152
14153 if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
14154   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14155 /* end confdefs.h.  */
14156
14157 #define INT64CONST(x)  x##LL
14158 long long int foo = INT64CONST(0x1234567890123456);
14159
14160 _ACEOF
14161 if ac_fn_c_try_compile "$LINENO"; then :
14162
14163 $as_echo "#define HAVE_LL_CONSTANTS 1" >>confdefs.h
14164
14165 fi
14166 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14167 fi
14168
14169
14170 # If we found "long int" is 64 bits, assume snprintf handles it.  If
14171 # we found we need to use "long long int", better check.  We cope with
14172 # snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
14173 # work, fall back to our own snprintf emulation (which we know uses %lld).
14174
14175 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
14176   if test $pgac_need_repl_snprintf = no; then
14177     { $as_echo "$as_me:${as_lineno-$LINENO}: checking snprintf length modifier for long long int" >&5
14178 $as_echo_n "checking snprintf length modifier for long long int... " >&6; }
14179 if ${pgac_cv_snprintf_long_long_int_modifier+:} false; then :
14180   $as_echo_n "(cached) " >&6
14181 else
14182   for pgac_modifier in 'll' 'q' 'I64'; do
14183 if test "$cross_compiling" = yes; then :
14184   pgac_cv_snprintf_long_long_int_modifier=cross; break
14185 else
14186   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14187 /* end confdefs.h.  */
14188 #include <stdio.h>
14189 #include <string.h>
14190 typedef long long int ac_int64;
14191 #define INT64_FORMAT "%${pgac_modifier}d"
14192
14193 ac_int64 a = 20000001;
14194 ac_int64 b = 40000005;
14195
14196 int does_int64_snprintf_work()
14197 {
14198   ac_int64 c;
14199   char buf[100];
14200
14201   if (sizeof(ac_int64) != 8)
14202     return 0;                   /* doesn't look like the right size */
14203
14204   c = a * b;
14205   snprintf(buf, 100, INT64_FORMAT, c);
14206   if (strcmp(buf, "800000140000005") != 0)
14207     return 0;                   /* either multiply or snprintf is busted */
14208   return 1;
14209 }
14210
14211 int
14212 main() {
14213   return (! does_int64_snprintf_work());
14214 }
14215 _ACEOF
14216 if ac_fn_c_try_run "$LINENO"; then :
14217   pgac_cv_snprintf_long_long_int_modifier=$pgac_modifier; break
14218 fi
14219 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14220   conftest.$ac_objext conftest.beam conftest.$ac_ext
14221 fi
14222
14223 done
14224 fi
14225
14226 LONG_LONG_INT_MODIFIER=''
14227
14228 case $pgac_cv_snprintf_long_long_int_modifier in
14229   cross) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot test (not on host machine)" >&5
14230 $as_echo "cannot test (not on host machine)" >&6; };;
14231   ?*)    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_long_long_int_modifier" >&5
14232 $as_echo "$pgac_cv_snprintf_long_long_int_modifier" >&6; }
14233          LONG_LONG_INT_MODIFIER=$pgac_cv_snprintf_long_long_int_modifier;;
14234   *)     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14235 $as_echo "none" >&6; };;
14236 esac
14237     if test "$LONG_LONG_INT_MODIFIER" = ""; then
14238       # Force usage of our own snprintf, since system snprintf is broken
14239       pgac_need_repl_snprintf=yes
14240       LONG_LONG_INT_MODIFIER='ll'
14241     fi
14242   else
14243     # Here if we previously decided we needed to use our own snprintf
14244     LONG_LONG_INT_MODIFIER='ll'
14245   fi
14246 else
14247   # Here if we are not using 'long long int' at all
14248   LONG_LONG_INT_MODIFIER='l'
14249 fi
14250
14251 INT64_MODIFIER="\"$LONG_LONG_INT_MODIFIER\""
14252
14253
14254 cat >>confdefs.h <<_ACEOF
14255 #define INT64_MODIFIER $INT64_MODIFIER
14256 _ACEOF
14257
14258
14259 # Also force use of our snprintf if the system's doesn't support the %z flag.
14260 if test "$pgac_need_repl_snprintf" = no; then
14261   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports the %z modifier" >&5
14262 $as_echo_n "checking whether snprintf supports the %z modifier... " >&6; }
14263 if ${pgac_cv_snprintf_size_t_support+:} false; then :
14264   $as_echo_n "(cached) " >&6
14265 else
14266   if test "$cross_compiling" = yes; then :
14267   pgac_cv_snprintf_size_t_support=cross
14268 else
14269   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14270 /* end confdefs.h.  */
14271 #include <stdio.h>
14272 #include <string.h>
14273
14274 int main()
14275 {
14276   char bufz[100];
14277   char buf64[100];
14278
14279   /*
14280    * Print the largest unsigned number fitting in a size_t using both %zu
14281    * and the previously-determined format for 64-bit integers.  Note that
14282    * we don't run this code unless we know snprintf handles 64-bit ints.
14283    */
14284   bufz[0] = '\0';  /* in case snprintf fails to emit anything */
14285   snprintf(bufz, sizeof(bufz), "%zu", ~((size_t) 0));
14286   snprintf(buf64, sizeof(buf64), "%" INT64_MODIFIER "u",
14287     (unsigned PG_INT64_TYPE) ~((size_t) 0));
14288   if (strcmp(bufz, buf64) != 0)
14289     return 1;
14290   return 0;
14291 }
14292 _ACEOF
14293 if ac_fn_c_try_run "$LINENO"; then :
14294   pgac_cv_snprintf_size_t_support=yes
14295 else
14296   pgac_cv_snprintf_size_t_support=no
14297 fi
14298 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14299   conftest.$ac_objext conftest.beam conftest.$ac_ext
14300 fi
14301
14302
14303 fi
14304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_size_t_support" >&5
14305 $as_echo "$pgac_cv_snprintf_size_t_support" >&6; }
14306
14307   if test "$pgac_cv_snprintf_size_t_support" != yes; then
14308     pgac_need_repl_snprintf=yes
14309   fi
14310 fi
14311
14312 # Now we have checked all the reasons to replace snprintf
14313 if test $pgac_need_repl_snprintf = yes; then
14314
14315 $as_echo "#define USE_REPL_SNPRINTF 1" >>confdefs.h
14316
14317   case " $LIBOBJS " in
14318   *" snprintf.$ac_objext "* ) ;;
14319   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
14320  ;;
14321 esac
14322
14323 fi
14324
14325 # Check size of void *, size_t (enables tweaks for > 32bit address space)
14326 # The cast to long int works around a bug in the HP C Compiler
14327 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14328 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14329 # This bug is HP SR number 8606223364.
14330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
14331 $as_echo_n "checking size of void *... " >&6; }
14332 if ${ac_cv_sizeof_void_p+:} false; then :
14333   $as_echo_n "(cached) " >&6
14334 else
14335   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
14336
14337 else
14338   if test "$ac_cv_type_void_p" = yes; then
14339      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14340 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14341 as_fn_error 77 "cannot compute sizeof (void *)
14342 See \`config.log' for more details" "$LINENO" 5; }
14343    else
14344      ac_cv_sizeof_void_p=0
14345    fi
14346 fi
14347
14348 fi
14349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
14350 $as_echo "$ac_cv_sizeof_void_p" >&6; }
14351
14352
14353
14354 cat >>confdefs.h <<_ACEOF
14355 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
14356 _ACEOF
14357
14358
14359 # The cast to long int works around a bug in the HP C Compiler
14360 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14361 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14362 # This bug is HP SR number 8606223364.
14363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
14364 $as_echo_n "checking size of size_t... " >&6; }
14365 if ${ac_cv_sizeof_size_t+:} false; then :
14366   $as_echo_n "(cached) " >&6
14367 else
14368   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
14369
14370 else
14371   if test "$ac_cv_type_size_t" = yes; then
14372      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14373 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14374 as_fn_error 77 "cannot compute sizeof (size_t)
14375 See \`config.log' for more details" "$LINENO" 5; }
14376    else
14377      ac_cv_sizeof_size_t=0
14378    fi
14379 fi
14380
14381 fi
14382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
14383 $as_echo "$ac_cv_sizeof_size_t" >&6; }
14384
14385
14386
14387 cat >>confdefs.h <<_ACEOF
14388 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
14389 _ACEOF
14390
14391
14392 # The cast to long int works around a bug in the HP C Compiler
14393 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14394 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14395 # This bug is HP SR number 8606223364.
14396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
14397 $as_echo_n "checking size of long... " >&6; }
14398 if ${ac_cv_sizeof_long+:} false; then :
14399   $as_echo_n "(cached) " >&6
14400 else
14401   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
14402
14403 else
14404   if test "$ac_cv_type_long" = yes; then
14405      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14406 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14407 as_fn_error 77 "cannot compute sizeof (long)
14408 See \`config.log' for more details" "$LINENO" 5; }
14409    else
14410      ac_cv_sizeof_long=0
14411    fi
14412 fi
14413
14414 fi
14415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
14416 $as_echo "$ac_cv_sizeof_long" >&6; }
14417
14418
14419
14420 cat >>confdefs.h <<_ACEOF
14421 #define SIZEOF_LONG $ac_cv_sizeof_long
14422 _ACEOF
14423
14424
14425
14426 # Decide whether float4 is passed by value: user-selectable, enabled by default
14427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float4 passed by value" >&5
14428 $as_echo_n "checking whether to build with float4 passed by value... " >&6; }
14429
14430
14431 # Check whether --enable-float4-byval was given.
14432 if test "${enable_float4_byval+set}" = set; then :
14433   enableval=$enable_float4_byval;
14434   case $enableval in
14435     yes)
14436
14437 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
14438
14439                float4passbyval=true
14440       ;;
14441     no)
14442       float4passbyval=false
14443       ;;
14444     *)
14445       as_fn_error $? "no argument expected for --enable-float4-byval option" "$LINENO" 5
14446       ;;
14447   esac
14448
14449 else
14450   enable_float4_byval=yes
14451
14452 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
14453
14454                float4passbyval=true
14455 fi
14456
14457
14458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float4_byval" >&5
14459 $as_echo "$enable_float4_byval" >&6; }
14460
14461 cat >>confdefs.h <<_ACEOF
14462 #define FLOAT4PASSBYVAL $float4passbyval
14463 _ACEOF
14464
14465
14466 # Decide whether float8 is passed by value.
14467 # Note: this setting also controls int8 and related types such as timestamp.
14468 # If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
14469 # If not, trying to select it is an error.
14470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float8 passed by value" >&5
14471 $as_echo_n "checking whether to build with float8 passed by value... " >&6; }
14472 if test $ac_cv_sizeof_void_p -ge 8 ; then
14473
14474
14475 # Check whether --enable-float8-byval was given.
14476 if test "${enable_float8_byval+set}" = set; then :
14477   enableval=$enable_float8_byval;
14478   case $enableval in
14479     yes)
14480       :
14481       ;;
14482     no)
14483       :
14484       ;;
14485     *)
14486       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
14487       ;;
14488   esac
14489
14490 else
14491   enable_float8_byval=yes
14492
14493 fi
14494
14495
14496 else
14497
14498
14499 # Check whether --enable-float8-byval was given.
14500 if test "${enable_float8_byval+set}" = set; then :
14501   enableval=$enable_float8_byval;
14502   case $enableval in
14503     yes)
14504       :
14505       ;;
14506     no)
14507       :
14508       ;;
14509     *)
14510       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
14511       ;;
14512   esac
14513
14514 else
14515   enable_float8_byval=no
14516
14517 fi
14518
14519
14520   if test "$enable_float8_byval" = yes ; then
14521     as_fn_error $? "--enable-float8-byval is not supported on 32-bit platforms." "$LINENO" 5
14522   fi
14523 fi
14524 if test "$enable_float8_byval" = yes ; then
14525
14526 $as_echo "#define USE_FLOAT8_BYVAL 1" >>confdefs.h
14527
14528   float8passbyval=true
14529 else
14530   float8passbyval=false
14531 fi
14532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float8_byval" >&5
14533 $as_echo "$enable_float8_byval" >&6; }
14534
14535 cat >>confdefs.h <<_ACEOF
14536 #define FLOAT8PASSBYVAL $float8passbyval
14537 _ACEOF
14538
14539
14540 # Determine memory alignment requirements for the basic C data types.
14541
14542 # The cast to long int works around a bug in the HP C Compiler,
14543 # see AC_CHECK_SIZEOF for more information.
14544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
14545 $as_echo_n "checking alignment of short... " >&6; }
14546 if ${ac_cv_alignof_short+:} false; then :
14547   $as_echo_n "(cached) " >&6
14548 else
14549   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short"        "$ac_includes_default
14550 #ifndef offsetof
14551 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14552 #endif
14553 typedef struct { char x; short y; } ac__type_alignof_;"; then :
14554
14555 else
14556   if test "$ac_cv_type_short" = yes; then
14557      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14558 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14559 as_fn_error 77 "cannot compute alignment of short
14560 See \`config.log' for more details" "$LINENO" 5; }
14561    else
14562      ac_cv_alignof_short=0
14563    fi
14564 fi
14565
14566 fi
14567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
14568 $as_echo "$ac_cv_alignof_short" >&6; }
14569
14570
14571
14572 cat >>confdefs.h <<_ACEOF
14573 #define ALIGNOF_SHORT $ac_cv_alignof_short
14574 _ACEOF
14575
14576
14577 # The cast to long int works around a bug in the HP C Compiler,
14578 # see AC_CHECK_SIZEOF for more information.
14579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
14580 $as_echo_n "checking alignment of int... " >&6; }
14581 if ${ac_cv_alignof_int+:} false; then :
14582   $as_echo_n "(cached) " >&6
14583 else
14584   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int"        "$ac_includes_default
14585 #ifndef offsetof
14586 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14587 #endif
14588 typedef struct { char x; int y; } ac__type_alignof_;"; then :
14589
14590 else
14591   if test "$ac_cv_type_int" = yes; then
14592      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14593 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14594 as_fn_error 77 "cannot compute alignment of int
14595 See \`config.log' for more details" "$LINENO" 5; }
14596    else
14597      ac_cv_alignof_int=0
14598    fi
14599 fi
14600
14601 fi
14602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
14603 $as_echo "$ac_cv_alignof_int" >&6; }
14604
14605
14606
14607 cat >>confdefs.h <<_ACEOF
14608 #define ALIGNOF_INT $ac_cv_alignof_int
14609 _ACEOF
14610
14611
14612 # The cast to long int works around a bug in the HP C Compiler,
14613 # see AC_CHECK_SIZEOF for more information.
14614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
14615 $as_echo_n "checking alignment of long... " >&6; }
14616 if ${ac_cv_alignof_long+:} false; then :
14617   $as_echo_n "(cached) " >&6
14618 else
14619   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long"        "$ac_includes_default
14620 #ifndef offsetof
14621 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14622 #endif
14623 typedef struct { char x; long y; } ac__type_alignof_;"; then :
14624
14625 else
14626   if test "$ac_cv_type_long" = yes; then
14627      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14628 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14629 as_fn_error 77 "cannot compute alignment of long
14630 See \`config.log' for more details" "$LINENO" 5; }
14631    else
14632      ac_cv_alignof_long=0
14633    fi
14634 fi
14635
14636 fi
14637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
14638 $as_echo "$ac_cv_alignof_long" >&6; }
14639
14640
14641
14642 cat >>confdefs.h <<_ACEOF
14643 #define ALIGNOF_LONG $ac_cv_alignof_long
14644 _ACEOF
14645
14646
14647 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
14648   # The cast to long int works around a bug in the HP C Compiler,
14649 # see AC_CHECK_SIZEOF for more information.
14650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
14651 $as_echo_n "checking alignment of long long int... " >&6; }
14652 if ${ac_cv_alignof_long_long_int+:} false; then :
14653   $as_echo_n "(cached) " >&6
14654 else
14655   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int"        "$ac_includes_default
14656 #ifndef offsetof
14657 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14658 #endif
14659 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
14660
14661 else
14662   if test "$ac_cv_type_long_long_int" = yes; then
14663      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14664 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14665 as_fn_error 77 "cannot compute alignment of long long int
14666 See \`config.log' for more details" "$LINENO" 5; }
14667    else
14668      ac_cv_alignof_long_long_int=0
14669    fi
14670 fi
14671
14672 fi
14673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
14674 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
14675
14676
14677
14678 cat >>confdefs.h <<_ACEOF
14679 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
14680 _ACEOF
14681
14682
14683 fi
14684 # The cast to long int works around a bug in the HP C Compiler,
14685 # see AC_CHECK_SIZEOF for more information.
14686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
14687 $as_echo_n "checking alignment of double... " >&6; }
14688 if ${ac_cv_alignof_double+:} false; then :
14689   $as_echo_n "(cached) " >&6
14690 else
14691   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double"        "$ac_includes_default
14692 #ifndef offsetof
14693 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14694 #endif
14695 typedef struct { char x; double y; } ac__type_alignof_;"; then :
14696
14697 else
14698   if test "$ac_cv_type_double" = yes; then
14699      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14700 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14701 as_fn_error 77 "cannot compute alignment of double
14702 See \`config.log' for more details" "$LINENO" 5; }
14703    else
14704      ac_cv_alignof_double=0
14705    fi
14706 fi
14707
14708 fi
14709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
14710 $as_echo "$ac_cv_alignof_double" >&6; }
14711
14712
14713
14714 cat >>confdefs.h <<_ACEOF
14715 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
14716 _ACEOF
14717
14718
14719
14720 # Compute maximum alignment of any basic type.
14721 # We assume long's alignment is at least as strong as char, short, or int;
14722 # but we must check long long (if it exists) and double.
14723
14724 MAX_ALIGNOF=$ac_cv_alignof_long
14725 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
14726   MAX_ALIGNOF=$ac_cv_alignof_double
14727 fi
14728 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
14729   MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
14730 fi
14731
14732 cat >>confdefs.h <<_ACEOF
14733 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
14734 _ACEOF
14735
14736
14737
14738 # Some platforms predefine the types int8, int16, etc.  Only check
14739 # a (hopefully) representative subset.
14740 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
14741 "
14742 if test "x$ac_cv_type_int8" = xyes; then :
14743
14744 cat >>confdefs.h <<_ACEOF
14745 #define HAVE_INT8 1
14746 _ACEOF
14747
14748
14749 fi
14750 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
14751 "
14752 if test "x$ac_cv_type_uint8" = xyes; then :
14753
14754 cat >>confdefs.h <<_ACEOF
14755 #define HAVE_UINT8 1
14756 _ACEOF
14757
14758
14759 fi
14760 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
14761 "
14762 if test "x$ac_cv_type_int64" = xyes; then :
14763
14764 cat >>confdefs.h <<_ACEOF
14765 #define HAVE_INT64 1
14766 _ACEOF
14767
14768
14769 fi
14770 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
14771 "
14772 if test "x$ac_cv_type_uint64" = xyes; then :
14773
14774 cat >>confdefs.h <<_ACEOF
14775 #define HAVE_UINT64 1
14776 _ACEOF
14777
14778
14779 fi
14780
14781
14782 # Check for extensions offering the integer scalar type __int128.
14783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
14784 $as_echo_n "checking for __int128... " >&6; }
14785 if ${pgac_cv__128bit_int+:} false; then :
14786   $as_echo_n "(cached) " >&6
14787 else
14788   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14789 /* end confdefs.h.  */
14790
14791 /*
14792  * These are globals to discourage the compiler from folding all the
14793  * arithmetic tests down to compile-time constants.  We do not have
14794  * convenient support for 64bit literals at this point...
14795  */
14796 __int128 a = 48828125;
14797 __int128 b = 97656255;
14798
14799 int
14800 main ()
14801 {
14802
14803 __int128 c,d;
14804 a = (a << 12) + 1; /* 200000000001 */
14805 b = (b << 12) + 5; /* 400000000005 */
14806 /* use the most relevant arithmetic ops */
14807 c = a * b;
14808 d = (c + b) / b;
14809 /* return different values, to prevent optimizations */
14810 if (d != a+1)
14811   return 0;
14812 return 1;
14813
14814   ;
14815   return 0;
14816 }
14817 _ACEOF
14818 if ac_fn_c_try_link "$LINENO"; then :
14819   pgac_cv__128bit_int=yes
14820 else
14821   pgac_cv__128bit_int=no
14822 fi
14823 rm -f core conftest.err conftest.$ac_objext \
14824     conftest$ac_exeext conftest.$ac_ext
14825 fi
14826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
14827 $as_echo "$pgac_cv__128bit_int" >&6; }
14828 if test x"$pgac_cv__128bit_int" = xyes ; then
14829
14830 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
14831
14832 fi
14833
14834 # Check for various atomic operations now that we have checked how to declare
14835 # 64bit integers.
14836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
14837 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
14838 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
14839   $as_echo_n "(cached) " >&6
14840 else
14841   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14842 /* end confdefs.h.  */
14843
14844 int
14845 main ()
14846 {
14847 char lock = 0;
14848    __sync_lock_test_and_set(&lock, 1);
14849    __sync_lock_release(&lock);
14850   ;
14851   return 0;
14852 }
14853 _ACEOF
14854 if ac_fn_c_try_link "$LINENO"; then :
14855   pgac_cv_gcc_sync_char_tas="yes"
14856 else
14857   pgac_cv_gcc_sync_char_tas="no"
14858 fi
14859 rm -f core conftest.err conftest.$ac_objext \
14860     conftest$ac_exeext conftest.$ac_ext
14861 fi
14862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
14863 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
14864 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
14865
14866 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
14867
14868 fi
14869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
14870 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
14871 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
14872   $as_echo_n "(cached) " >&6
14873 else
14874   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14875 /* end confdefs.h.  */
14876
14877 int
14878 main ()
14879 {
14880 int lock = 0;
14881    __sync_lock_test_and_set(&lock, 1);
14882    __sync_lock_release(&lock);
14883   ;
14884   return 0;
14885 }
14886 _ACEOF
14887 if ac_fn_c_try_link "$LINENO"; then :
14888   pgac_cv_gcc_sync_int32_tas="yes"
14889 else
14890   pgac_cv_gcc_sync_int32_tas="no"
14891 fi
14892 rm -f core conftest.err conftest.$ac_objext \
14893     conftest$ac_exeext conftest.$ac_ext
14894 fi
14895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
14896 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
14897 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
14898
14899 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
14900
14901 fi
14902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
14903 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
14904 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
14905   $as_echo_n "(cached) " >&6
14906 else
14907   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14908 /* end confdefs.h.  */
14909
14910 int
14911 main ()
14912 {
14913 int val = 0;
14914    __sync_val_compare_and_swap(&val, 0, 37);
14915   ;
14916   return 0;
14917 }
14918 _ACEOF
14919 if ac_fn_c_try_link "$LINENO"; then :
14920   pgac_cv_gcc_sync_int32_cas="yes"
14921 else
14922   pgac_cv_gcc_sync_int32_cas="no"
14923 fi
14924 rm -f core conftest.err conftest.$ac_objext \
14925     conftest$ac_exeext conftest.$ac_ext
14926 fi
14927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
14928 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
14929 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
14930
14931 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
14932
14933 fi
14934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
14935 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
14936 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
14937   $as_echo_n "(cached) " >&6
14938 else
14939   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14940 /* end confdefs.h.  */
14941
14942 int
14943 main ()
14944 {
14945 PG_INT64_TYPE lock = 0;
14946    __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
14947   ;
14948   return 0;
14949 }
14950 _ACEOF
14951 if ac_fn_c_try_link "$LINENO"; then :
14952   pgac_cv_gcc_sync_int64_cas="yes"
14953 else
14954   pgac_cv_gcc_sync_int64_cas="no"
14955 fi
14956 rm -f core conftest.err conftest.$ac_objext \
14957     conftest$ac_exeext conftest.$ac_ext
14958 fi
14959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
14960 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
14961 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
14962
14963 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
14964
14965 fi
14966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
14967 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
14968 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
14969   $as_echo_n "(cached) " >&6
14970 else
14971   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14972 /* end confdefs.h.  */
14973
14974 int
14975 main ()
14976 {
14977 int val = 0;
14978    int expect = 0;
14979    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
14980   ;
14981   return 0;
14982 }
14983 _ACEOF
14984 if ac_fn_c_try_link "$LINENO"; then :
14985   pgac_cv_gcc_atomic_int32_cas="yes"
14986 else
14987   pgac_cv_gcc_atomic_int32_cas="no"
14988 fi
14989 rm -f core conftest.err conftest.$ac_objext \
14990     conftest$ac_exeext conftest.$ac_ext
14991 fi
14992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
14993 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
14994 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
14995
14996 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
14997
14998 fi
14999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
15000 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
15001 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
15002   $as_echo_n "(cached) " >&6
15003 else
15004   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15005 /* end confdefs.h.  */
15006
15007 int
15008 main ()
15009 {
15010 PG_INT64_TYPE val = 0;
15011    PG_INT64_TYPE expect = 0;
15012    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
15013   ;
15014   return 0;
15015 }
15016 _ACEOF
15017 if ac_fn_c_try_link "$LINENO"; then :
15018   pgac_cv_gcc_atomic_int64_cas="yes"
15019 else
15020   pgac_cv_gcc_atomic_int64_cas="no"
15021 fi
15022 rm -f core conftest.err conftest.$ac_objext \
15023     conftest$ac_exeext conftest.$ac_ext
15024 fi
15025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
15026 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
15027 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
15028
15029 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
15030
15031 fi
15032
15033
15034 # Check for x86 cpuid instruction
15035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
15036 $as_echo_n "checking for __get_cpuid... " >&6; }
15037 if ${pgac_cv__get_cpuid+:} false; then :
15038   $as_echo_n "(cached) " >&6
15039 else
15040   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15041 /* end confdefs.h.  */
15042 #include <cpuid.h>
15043 int
15044 main ()
15045 {
15046 unsigned int exx[4] = {0, 0, 0, 0};
15047   __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
15048
15049   ;
15050   return 0;
15051 }
15052 _ACEOF
15053 if ac_fn_c_try_link "$LINENO"; then :
15054   pgac_cv__get_cpuid="yes"
15055 else
15056   pgac_cv__get_cpuid="no"
15057 fi
15058 rm -f core conftest.err conftest.$ac_objext \
15059     conftest$ac_exeext conftest.$ac_ext
15060 fi
15061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
15062 $as_echo "$pgac_cv__get_cpuid" >&6; }
15063 if test x"$pgac_cv__get_cpuid" = x"yes"; then
15064
15065 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
15066
15067 fi
15068
15069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
15070 $as_echo_n "checking for __cpuid... " >&6; }
15071 if ${pgac_cv__cpuid+:} false; then :
15072   $as_echo_n "(cached) " >&6
15073 else
15074   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15075 /* end confdefs.h.  */
15076 #include <intrin.h>
15077 int
15078 main ()
15079 {
15080 unsigned int exx[4] = {0, 0, 0, 0};
15081   __get_cpuid(exx[0], 1);
15082
15083   ;
15084   return 0;
15085 }
15086 _ACEOF
15087 if ac_fn_c_try_link "$LINENO"; then :
15088   pgac_cv__cpuid="yes"
15089 else
15090   pgac_cv__cpuid="no"
15091 fi
15092 rm -f core conftest.err conftest.$ac_objext \
15093     conftest$ac_exeext conftest.$ac_ext
15094 fi
15095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
15096 $as_echo "$pgac_cv__cpuid" >&6; }
15097 if test x"$pgac_cv__cpuid" = x"yes"; then
15098
15099 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
15100
15101 fi
15102
15103 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
15104 #
15105 # First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
15106 # with the default compiler flags. If not, check if adding the -msse4.2
15107 # flag helps. CFLAGS_SSE42 is set to -msse4.2 if that's required.
15108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
15109 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
15110 if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
15111   $as_echo_n "(cached) " >&6
15112 else
15113   pgac_save_CFLAGS=$CFLAGS
15114 CFLAGS="$pgac_save_CFLAGS "
15115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15116 /* end confdefs.h.  */
15117 #include <nmmintrin.h>
15118 int
15119 main ()
15120 {
15121 unsigned int crc = 0;
15122    crc = _mm_crc32_u8(crc, 0);
15123    crc = _mm_crc32_u32(crc, 0);
15124    /* return computed value, to prevent the above being optimized away */
15125    return crc == 0;
15126   ;
15127   return 0;
15128 }
15129 _ACEOF
15130 if ac_fn_c_try_link "$LINENO"; then :
15131   pgac_cv_sse42_crc32_intrinsics_=yes
15132 else
15133   pgac_cv_sse42_crc32_intrinsics_=no
15134 fi
15135 rm -f core conftest.err conftest.$ac_objext \
15136     conftest$ac_exeext conftest.$ac_ext
15137 CFLAGS="$pgac_save_CFLAGS"
15138 fi
15139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
15140 $as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
15141 if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
15142   CFLAGS_SSE42=""
15143   pgac_sse42_crc32_intrinsics=yes
15144 fi
15145
15146 if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
15147   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
15148 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
15149 if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
15150   $as_echo_n "(cached) " >&6
15151 else
15152   pgac_save_CFLAGS=$CFLAGS
15153 CFLAGS="$pgac_save_CFLAGS -msse4.2"
15154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15155 /* end confdefs.h.  */
15156 #include <nmmintrin.h>
15157 int
15158 main ()
15159 {
15160 unsigned int crc = 0;
15161    crc = _mm_crc32_u8(crc, 0);
15162    crc = _mm_crc32_u32(crc, 0);
15163    /* return computed value, to prevent the above being optimized away */
15164    return crc == 0;
15165   ;
15166   return 0;
15167 }
15168 _ACEOF
15169 if ac_fn_c_try_link "$LINENO"; then :
15170   pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
15171 else
15172   pgac_cv_sse42_crc32_intrinsics__msse4_2=no
15173 fi
15174 rm -f core conftest.err conftest.$ac_objext \
15175     conftest$ac_exeext conftest.$ac_ext
15176 CFLAGS="$pgac_save_CFLAGS"
15177 fi
15178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
15179 $as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
15180 if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
15181   CFLAGS_SSE42="-msse4.2"
15182   pgac_sse42_crc32_intrinsics=yes
15183 fi
15184
15185 fi
15186
15187
15188 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
15189 # define __SSE4_2__ in that case.
15190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15191 /* end confdefs.h.  */
15192
15193 int
15194 main ()
15195 {
15196
15197 #ifndef __SSE4_2__
15198 #error __SSE4_2__ not defined
15199 #endif
15200
15201   ;
15202   return 0;
15203 }
15204 _ACEOF
15205 if ac_fn_c_try_compile "$LINENO"; then :
15206   SSE4_2_TARGETED=1
15207 fi
15208 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15209
15210 # Select CRC-32C implementation.
15211 #
15212 # If we are targeting a processor that has SSE 4.2 instructions, we can use the
15213 # special CRC instructions for calculating CRC-32C. If we're not targeting such
15214 # a processor, but we can nevertheless produce code that uses the SSE
15215 # intrinsics, perhaps with some extra CFLAGS, compile both implementations and
15216 # select which one to use at runtime, depending on whether SSE 4.2 is supported
15217 # by the processor we're running on.
15218 #
15219 # You can override this logic by setting the appropriate USE_*_CRC32 flag to 1
15220 # in the template or configure command line.
15221 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
15222   if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
15223     USE_SSE42_CRC32C=1
15224   else
15225     # the CPUID instruction is needed for the runtime check.
15226     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
15227       USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
15228     else
15229       # fall back to slicing-by-8 algorithm which doesn't require any special
15230       # CPU support.
15231       USE_SLICING_BY_8_CRC32C=1
15232     fi
15233   fi
15234 fi
15235
15236 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
15237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
15238 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
15239 if test x"$USE_SSE42_CRC32C" = x"1"; then
15240
15241 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
15242
15243   PG_CRC32C_OBJS="pg_crc32c_sse42.o"
15244   { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
15245 $as_echo "SSE 4.2" >&6; }
15246 else
15247   if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
15248
15249 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
15250
15251     PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_choose.o"
15252     { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
15253 $as_echo "SSE 4.2 with runtime check" >&6; }
15254   else
15255
15256 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
15257
15258     PG_CRC32C_OBJS="pg_crc32c_sb8.o"
15259     { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
15260 $as_echo "slicing-by-8" >&6; }
15261   fi
15262 fi
15263
15264
15265
15266 # Select semaphore implementation type.
15267 if test "$PORTNAME" != "win32"; then
15268   if test x"$PREFERRED_SEMAPHORES" = x"NAMED_POSIX" ; then
15269     # Need sem_open for this
15270     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5
15271 $as_echo_n "checking for library containing sem_open... " >&6; }
15272 if ${ac_cv_search_sem_open+:} false; then :
15273   $as_echo_n "(cached) " >&6
15274 else
15275   ac_func_search_save_LIBS=$LIBS
15276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15277 /* end confdefs.h.  */
15278
15279 /* Override any GCC internal prototype to avoid an error.
15280    Use char because int might match the return type of a GCC
15281    builtin and then its argument prototype would still apply.  */
15282 #ifdef __cplusplus
15283 extern "C"
15284 #endif
15285 char sem_open ();
15286 int
15287 main ()
15288 {
15289 return sem_open ();
15290   ;
15291   return 0;
15292 }
15293 _ACEOF
15294 for ac_lib in '' rt pthread; do
15295   if test -z "$ac_lib"; then
15296     ac_res="none required"
15297   else
15298     ac_res=-l$ac_lib
15299     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15300   fi
15301   if ac_fn_c_try_link "$LINENO"; then :
15302   ac_cv_search_sem_open=$ac_res
15303 fi
15304 rm -f core conftest.err conftest.$ac_objext \
15305     conftest$ac_exeext
15306   if ${ac_cv_search_sem_open+:} false; then :
15307   break
15308 fi
15309 done
15310 if ${ac_cv_search_sem_open+:} false; then :
15311
15312 else
15313   ac_cv_search_sem_open=no
15314 fi
15315 rm conftest.$ac_ext
15316 LIBS=$ac_func_search_save_LIBS
15317 fi
15318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5
15319 $as_echo "$ac_cv_search_sem_open" >&6; }
15320 ac_res=$ac_cv_search_sem_open
15321 if test "$ac_res" != no; then :
15322   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15323   USE_NAMED_POSIX_SEMAPHORES=1
15324 fi
15325
15326   fi
15327   if test x"$PREFERRED_SEMAPHORES" = x"UNNAMED_POSIX" ; then
15328     # Need sem_init for this
15329     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
15330 $as_echo_n "checking for library containing sem_init... " >&6; }
15331 if ${ac_cv_search_sem_init+:} false; then :
15332   $as_echo_n "(cached) " >&6
15333 else
15334   ac_func_search_save_LIBS=$LIBS
15335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15336 /* end confdefs.h.  */
15337
15338 /* Override any GCC internal prototype to avoid an error.
15339    Use char because int might match the return type of a GCC
15340    builtin and then its argument prototype would still apply.  */
15341 #ifdef __cplusplus
15342 extern "C"
15343 #endif
15344 char sem_init ();
15345 int
15346 main ()
15347 {
15348 return sem_init ();
15349   ;
15350   return 0;
15351 }
15352 _ACEOF
15353 for ac_lib in '' rt pthread; do
15354   if test -z "$ac_lib"; then
15355     ac_res="none required"
15356   else
15357     ac_res=-l$ac_lib
15358     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15359   fi
15360   if ac_fn_c_try_link "$LINENO"; then :
15361   ac_cv_search_sem_init=$ac_res
15362 fi
15363 rm -f core conftest.err conftest.$ac_objext \
15364     conftest$ac_exeext
15365   if ${ac_cv_search_sem_init+:} false; then :
15366   break
15367 fi
15368 done
15369 if ${ac_cv_search_sem_init+:} false; then :
15370
15371 else
15372   ac_cv_search_sem_init=no
15373 fi
15374 rm conftest.$ac_ext
15375 LIBS=$ac_func_search_save_LIBS
15376 fi
15377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
15378 $as_echo "$ac_cv_search_sem_init" >&6; }
15379 ac_res=$ac_cv_search_sem_init
15380 if test "$ac_res" != no; then :
15381   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15382   USE_UNNAMED_POSIX_SEMAPHORES=1
15383 fi
15384
15385   fi
15386   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which semaphore API to use" >&5
15387 $as_echo_n "checking which semaphore API to use... " >&6; }
15388   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
15389
15390 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
15391
15392     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
15393     sematype="named POSIX"
15394   else
15395     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
15396
15397 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
15398
15399       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
15400       sematype="unnamed POSIX"
15401     else
15402
15403 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
15404
15405       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
15406       sematype="System V"
15407     fi
15408   fi
15409   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sematype" >&5
15410 $as_echo "$sematype" >&6; }
15411 else
15412
15413 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
15414
15415   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
15416 fi
15417
15418
15419 # Select shared-memory implementation type.
15420 if test "$PORTNAME" != "win32"; then
15421
15422 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
15423
15424   SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
15425 else
15426
15427 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
15428
15429   SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
15430 fi
15431
15432 # Select random number source
15433 #
15434 # You can override this logic by setting the appropriate USE_*RANDOM flag to 1
15435 # in the template or configure command line.
15436
15437 # If not selected manually, try to select a source automatically.
15438 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
15439   if test x"$with_openssl" = x"yes" ; then
15440     USE_OPENSSL_RANDOM=1
15441   elif test "$PORTNAME" = "win32" ; then
15442     USE_WIN32_RANDOM=1
15443   else
15444     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5
15445 $as_echo_n "checking for /dev/urandom... " >&6; }
15446 if ${ac_cv_file__dev_urandom+:} false; then :
15447   $as_echo_n "(cached) " >&6
15448 else
15449   test "$cross_compiling" = yes &&
15450   as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15451 if test -r "/dev/urandom"; then
15452   ac_cv_file__dev_urandom=yes
15453 else
15454   ac_cv_file__dev_urandom=no
15455 fi
15456 fi
15457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5
15458 $as_echo "$ac_cv_file__dev_urandom" >&6; }
15459 if test "x$ac_cv_file__dev_urandom" = xyes; then :
15460
15461 fi
15462
15463
15464     if test x"$ac_cv_file__dev_urandom" = x"yes" ; then
15465       USE_DEV_URANDOM=1
15466     fi
15467   fi
15468 fi
15469
15470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which random number source to use" >&5
15471 $as_echo_n "checking which random number source to use... " >&6; }
15472 if test "$enable_strong_random" = yes ; then
15473   if test x"$USE_OPENSSL_RANDOM" = x"1" ; then
15474
15475 $as_echo "#define USE_OPENSSL_RANDOM 1" >>confdefs.h
15476
15477     { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5
15478 $as_echo "OpenSSL" >&6; }
15479   elif test x"$USE_WIN32_RANDOM" = x"1" ; then
15480
15481 $as_echo "#define USE_WIN32_RANDOM 1" >>confdefs.h
15482
15483     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
15484 $as_echo "Windows native" >&6; }
15485   elif test x"$USE_DEV_URANDOM" = x"1" ; then
15486
15487 $as_echo "#define USE_DEV_URANDOM 1" >>confdefs.h
15488
15489     { $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
15490 $as_echo "/dev/urandom" >&6; }
15491   else
15492     as_fn_error $? "
15493 no source of strong random numbers was found
15494 PostgreSQL can use OpenSSL or /dev/urandom as a source of random numbers,
15495 for authentication protocols. You can use --disable-strong-random to use a
15496 built-in pseudo random number generator, but that may be insecure." "$LINENO" 5
15497   fi
15498
15499 $as_echo "#define HAVE_STRONG_RANDOM 1" >>confdefs.h
15500
15501 else
15502     { $as_echo "$as_me:${as_lineno-$LINENO}: result: weak builtin PRNG" >&5
15503 $as_echo "weak builtin PRNG" >&6; }
15504     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
15505 *** Not using a strong random number source may be insecure." >&5
15506 $as_echo "$as_me: WARNING:
15507 *** Not using a strong random number source may be insecure." >&2;}
15508 fi
15509
15510 # If not set in template file, set bytes to use libc memset()
15511 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
15512   MEMSET_LOOP_LIMIT=1024
15513 fi
15514
15515 cat >>confdefs.h <<_ACEOF
15516 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
15517 _ACEOF
15518
15519
15520
15521 if test "$enable_nls" = yes ; then
15522
15523   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
15524 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
15525 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
15526   $as_echo_n "(cached) " >&6
15527 else
15528   ac_func_search_save_LIBS=$LIBS
15529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15530 /* end confdefs.h.  */
15531
15532 /* Override any GCC internal prototype to avoid an error.
15533    Use char because int might match the return type of a GCC
15534    builtin and then its argument prototype would still apply.  */
15535 #ifdef __cplusplus
15536 extern "C"
15537 #endif
15538 char bind_textdomain_codeset ();
15539 int
15540 main ()
15541 {
15542 return bind_textdomain_codeset ();
15543   ;
15544   return 0;
15545 }
15546 _ACEOF
15547 for ac_lib in '' intl; do
15548   if test -z "$ac_lib"; then
15549     ac_res="none required"
15550   else
15551     ac_res=-l$ac_lib
15552     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15553   fi
15554   if ac_fn_c_try_link "$LINENO"; then :
15555   ac_cv_search_bind_textdomain_codeset=$ac_res
15556 fi
15557 rm -f core conftest.err conftest.$ac_objext \
15558     conftest$ac_exeext
15559   if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
15560   break
15561 fi
15562 done
15563 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
15564
15565 else
15566   ac_cv_search_bind_textdomain_codeset=no
15567 fi
15568 rm conftest.$ac_ext
15569 LIBS=$ac_func_search_save_LIBS
15570 fi
15571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
15572 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
15573 ac_res=$ac_cv_search_bind_textdomain_codeset
15574 if test "$ac_res" != no; then :
15575   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15576
15577 else
15578   as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
15579 fi
15580
15581   ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
15582 if test "x$ac_cv_header_libintl_h" = xyes; then :
15583
15584 else
15585   as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
15586 fi
15587
15588
15589   for ac_prog in msgfmt
15590 do
15591   # Extract the first word of "$ac_prog", so it can be a program name with args.
15592 set dummy $ac_prog; ac_word=$2
15593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15594 $as_echo_n "checking for $ac_word... " >&6; }
15595 if ${ac_cv_prog_MSGFMT+:} false; then :
15596   $as_echo_n "(cached) " >&6
15597 else
15598   if test -n "$MSGFMT"; then
15599   ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
15600 else
15601 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15602 for as_dir in $PATH
15603 do
15604   IFS=$as_save_IFS
15605   test -z "$as_dir" && as_dir=.
15606     for ac_exec_ext in '' $ac_executable_extensions; do
15607   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15608     ac_cv_prog_MSGFMT="$ac_prog"
15609     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15610     break 2
15611   fi
15612 done
15613   done
15614 IFS=$as_save_IFS
15615
15616 fi
15617 fi
15618 MSGFMT=$ac_cv_prog_MSGFMT
15619 if test -n "$MSGFMT"; then
15620   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
15621 $as_echo "$MSGFMT" >&6; }
15622 else
15623   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15624 $as_echo "no" >&6; }
15625 fi
15626
15627
15628   test -n "$MSGFMT" && break
15629 done
15630
15631   if test -z "$MSGFMT"; then
15632     as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
15633   fi
15634   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
15635 $as_echo_n "checking for msgfmt flags... " >&6; }
15636 if ${pgac_cv_msgfmt_flags+:} false; then :
15637   $as_echo_n "(cached) " >&6
15638 else
15639   if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
15640     pgac_cv_msgfmt_flags=-c
15641 fi
15642 fi
15643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
15644 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
15645   MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
15646
15647   for ac_prog in msgmerge
15648 do
15649   # Extract the first word of "$ac_prog", so it can be a program name with args.
15650 set dummy $ac_prog; ac_word=$2
15651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15652 $as_echo_n "checking for $ac_word... " >&6; }
15653 if ${ac_cv_prog_MSGMERGE+:} false; then :
15654   $as_echo_n "(cached) " >&6
15655 else
15656   if test -n "$MSGMERGE"; then
15657   ac_cv_prog_MSGMERGE="$MSGMERGE" # Let the user override the test.
15658 else
15659 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15660 for as_dir in $PATH
15661 do
15662   IFS=$as_save_IFS
15663   test -z "$as_dir" && as_dir=.
15664     for ac_exec_ext in '' $ac_executable_extensions; do
15665   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15666     ac_cv_prog_MSGMERGE="$ac_prog"
15667     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15668     break 2
15669   fi
15670 done
15671   done
15672 IFS=$as_save_IFS
15673
15674 fi
15675 fi
15676 MSGMERGE=$ac_cv_prog_MSGMERGE
15677 if test -n "$MSGMERGE"; then
15678   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
15679 $as_echo "$MSGMERGE" >&6; }
15680 else
15681   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15682 $as_echo "no" >&6; }
15683 fi
15684
15685
15686   test -n "$MSGMERGE" && break
15687 done
15688
15689   for ac_prog in xgettext
15690 do
15691   # Extract the first word of "$ac_prog", so it can be a program name with args.
15692 set dummy $ac_prog; ac_word=$2
15693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15694 $as_echo_n "checking for $ac_word... " >&6; }
15695 if ${ac_cv_prog_XGETTEXT+:} false; then :
15696   $as_echo_n "(cached) " >&6
15697 else
15698   if test -n "$XGETTEXT"; then
15699   ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test.
15700 else
15701 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15702 for as_dir in $PATH
15703 do
15704   IFS=$as_save_IFS
15705   test -z "$as_dir" && as_dir=.
15706     for ac_exec_ext in '' $ac_executable_extensions; do
15707   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15708     ac_cv_prog_XGETTEXT="$ac_prog"
15709     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15710     break 2
15711   fi
15712 done
15713   done
15714 IFS=$as_save_IFS
15715
15716 fi
15717 fi
15718 XGETTEXT=$ac_cv_prog_XGETTEXT
15719 if test -n "$XGETTEXT"; then
15720   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
15721 $as_echo "$XGETTEXT" >&6; }
15722 else
15723   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15724 $as_echo "no" >&6; }
15725 fi
15726
15727
15728   test -n "$XGETTEXT" && break
15729 done
15730
15731
15732 fi
15733
15734 # Check for Tcl configuration script tclConfig.sh
15735 if test "$with_tcl" = yes; then
15736     for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
15737 do
15738   # Extract the first word of "$ac_prog", so it can be a program name with args.
15739 set dummy $ac_prog; ac_word=$2
15740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15741 $as_echo_n "checking for $ac_word... " >&6; }
15742 if ${ac_cv_path_TCLSH+:} false; then :
15743   $as_echo_n "(cached) " >&6
15744 else
15745   case $TCLSH in
15746   [\\/]* | ?:[\\/]*)
15747   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
15748   ;;
15749   *)
15750   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15751 for as_dir in $PATH
15752 do
15753   IFS=$as_save_IFS
15754   test -z "$as_dir" && as_dir=.
15755     for ac_exec_ext in '' $ac_executable_extensions; do
15756   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15757     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
15758     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15759     break 2
15760   fi
15761 done
15762   done
15763 IFS=$as_save_IFS
15764
15765   ;;
15766 esac
15767 fi
15768 TCLSH=$ac_cv_path_TCLSH
15769 if test -n "$TCLSH"; then
15770   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
15771 $as_echo "$TCLSH" >&6; }
15772 else
15773   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15774 $as_echo "no" >&6; }
15775 fi
15776
15777
15778   test -n "$TCLSH" && break
15779 done
15780
15781 if test x"$TCLSH" = x""; then
15782   as_fn_error $? "Tcl shell not found" "$LINENO" 5
15783 fi
15784
15785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
15786 $as_echo_n "checking for tclConfig.sh... " >&6; }
15787 # Let user override test
15788 if test -z "$TCL_CONFIG_SH"; then
15789     pgac_test_dirs="$with_tclconfig"
15790
15791     set X $pgac_test_dirs; shift
15792     if test $# -eq 0; then
15793         test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
15794         set X `echo 'puts $auto_path' | $TCLSH`; shift
15795     fi
15796
15797     for pgac_dir do
15798         if test -r "$pgac_dir/tclConfig.sh"; then
15799             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
15800             break
15801         fi
15802     done
15803 fi
15804
15805 if test -z "$TCL_CONFIG_SH"; then
15806     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15807 $as_echo "no" >&6; }
15808     as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
15809 else
15810     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
15811 $as_echo "$TCL_CONFIG_SH" >&6; }
15812 fi
15813
15814
15815
15816     . "$TCL_CONFIG_SH"
15817 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
15818 eval TCL_LIBS=\"$TCL_LIBS\"
15819 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
15820 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
15821
15822         if test "$TCL_SHARED_BUILD" != 1; then
15823       as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
15824 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
15825     fi
15826     # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
15827     ac_save_CPPFLAGS=$CPPFLAGS
15828     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
15829     ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
15830 if test "x$ac_cv_header_tcl_h" = xyes; then :
15831
15832 else
15833   as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
15834 fi
15835
15836
15837     CPPFLAGS=$ac_save_CPPFLAGS
15838 fi
15839
15840 # check for <perl.h>
15841 if test "$with_perl" = yes; then
15842   ac_save_CPPFLAGS=$CPPFLAGS
15843   CPPFLAGS="$CPPFLAGS -I$perl_archlibexp/CORE"
15844   ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
15845 "
15846 if test "x$ac_cv_header_perl_h" = xyes; then :
15847
15848 else
15849   as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
15850 fi
15851
15852
15853   # While we're at it, check that we can link to libperl.
15854   # On most platforms, if perl.h is there then libperl.so will be too, but at
15855   # this writing Debian packages them separately.  There is no known reason to
15856   # waste cycles on separate probes for the Tcl or Python libraries, though.
15857   pgac_save_LIBS=$LIBS
15858   LIBS="$perl_embed_ldflags"
15859   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
15860 $as_echo_n "checking for libperl... " >&6; }
15861   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15862 /* end confdefs.h.  */
15863
15864 #include <EXTERN.h>
15865 #include <perl.h>
15866
15867 int
15868 main ()
15869 {
15870 perl_alloc();
15871   ;
15872   return 0;
15873 }
15874 _ACEOF
15875 if ac_fn_c_try_link "$LINENO"; then :
15876   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15877 $as_echo "yes" >&6; }
15878 else
15879   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15880 $as_echo "no" >&6; }
15881      as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
15882 fi
15883 rm -f core conftest.err conftest.$ac_objext \
15884     conftest$ac_exeext conftest.$ac_ext
15885   LIBS=$pgac_save_LIBS
15886   CPPFLAGS=$ac_save_CPPFLAGS
15887 fi
15888
15889 # check for <Python.h>
15890 if test "$with_python" = yes; then
15891   ac_save_CPPFLAGS=$CPPFLAGS
15892   CPPFLAGS="$python_includespec $CPPFLAGS"
15893   ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
15894 if test "x$ac_cv_header_Python_h" = xyes; then :
15895
15896 else
15897   as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
15898 fi
15899
15900
15901   CPPFLAGS=$ac_save_CPPFLAGS
15902 fi
15903
15904 #
15905 # Check for DocBook and tools
15906 #
15907 for ac_prog in onsgmls nsgmls
15908 do
15909   # Extract the first word of "$ac_prog", so it can be a program name with args.
15910 set dummy $ac_prog; ac_word=$2
15911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15912 $as_echo_n "checking for $ac_word... " >&6; }
15913 if ${ac_cv_prog_NSGMLS+:} false; then :
15914   $as_echo_n "(cached) " >&6
15915 else
15916   if test -n "$NSGMLS"; then
15917   ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
15918 else
15919 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15920 for as_dir in $PATH
15921 do
15922   IFS=$as_save_IFS
15923   test -z "$as_dir" && as_dir=.
15924     for ac_exec_ext in '' $ac_executable_extensions; do
15925   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15926     ac_cv_prog_NSGMLS="$ac_prog"
15927     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15928     break 2
15929   fi
15930 done
15931   done
15932 IFS=$as_save_IFS
15933
15934 fi
15935 fi
15936 NSGMLS=$ac_cv_prog_NSGMLS
15937 if test -n "$NSGMLS"; then
15938   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NSGMLS" >&5
15939 $as_echo "$NSGMLS" >&6; }
15940 else
15941   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15942 $as_echo "no" >&6; }
15943 fi
15944
15945
15946   test -n "$NSGMLS" && break
15947 done
15948
15949
15950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook V4.2" >&5
15951 $as_echo_n "checking for DocBook V4.2... " >&6; }
15952 if ${pgac_cv_check_docbook+:} false; then :
15953   $as_echo_n "(cached) " >&6
15954 else
15955   cat >conftest.sgml <<EOF
15956 <!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
15957 <book>
15958  <title>test</title>
15959  <chapter>
15960   <title>random</title>
15961    <sect1>
15962     <title>testsect</title>
15963     <para>text</para>
15964   </sect1>
15965  </chapter>
15966 </book>
15967 EOF
15968
15969 pgac_cv_check_docbook=no
15970
15971 if test -n "$NSGMLS"; then
15972   $NSGMLS -s conftest.sgml 1>&5 2>&1
15973   if test $? -eq 0; then
15974     pgac_cv_check_docbook=yes
15975   fi
15976 fi
15977 rm -f conftest.sgml
15978 fi
15979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_docbook" >&5
15980 $as_echo "$pgac_cv_check_docbook" >&6; }
15981
15982 have_docbook=$pgac_cv_check_docbook
15983
15984
15985 for ac_prog in dbtoepub
15986 do
15987   # Extract the first word of "$ac_prog", so it can be a program name with args.
15988 set dummy $ac_prog; ac_word=$2
15989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15990 $as_echo_n "checking for $ac_word... " >&6; }
15991 if ${ac_cv_prog_DBTOEPUB+:} false; then :
15992   $as_echo_n "(cached) " >&6
15993 else
15994   if test -n "$DBTOEPUB"; then
15995   ac_cv_prog_DBTOEPUB="$DBTOEPUB" # Let the user override the test.
15996 else
15997 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15998 for as_dir in $PATH
15999 do
16000   IFS=$as_save_IFS
16001   test -z "$as_dir" && as_dir=.
16002     for ac_exec_ext in '' $ac_executable_extensions; do
16003   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16004     ac_cv_prog_DBTOEPUB="$ac_prog"
16005     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16006     break 2
16007   fi
16008 done
16009   done
16010 IFS=$as_save_IFS
16011
16012 fi
16013 fi
16014 DBTOEPUB=$ac_cv_prog_DBTOEPUB
16015 if test -n "$DBTOEPUB"; then
16016   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
16017 $as_echo "$DBTOEPUB" >&6; }
16018 else
16019   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16020 $as_echo "no" >&6; }
16021 fi
16022
16023
16024   test -n "$DBTOEPUB" && break
16025 done
16026
16027 for ac_prog in xmllint
16028 do
16029   # Extract the first word of "$ac_prog", so it can be a program name with args.
16030 set dummy $ac_prog; ac_word=$2
16031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16032 $as_echo_n "checking for $ac_word... " >&6; }
16033 if ${ac_cv_prog_XMLLINT+:} false; then :
16034   $as_echo_n "(cached) " >&6
16035 else
16036   if test -n "$XMLLINT"; then
16037   ac_cv_prog_XMLLINT="$XMLLINT" # Let the user override the test.
16038 else
16039 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16040 for as_dir in $PATH
16041 do
16042   IFS=$as_save_IFS
16043   test -z "$as_dir" && as_dir=.
16044     for ac_exec_ext in '' $ac_executable_extensions; do
16045   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16046     ac_cv_prog_XMLLINT="$ac_prog"
16047     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16048     break 2
16049   fi
16050 done
16051   done
16052 IFS=$as_save_IFS
16053
16054 fi
16055 fi
16056 XMLLINT=$ac_cv_prog_XMLLINT
16057 if test -n "$XMLLINT"; then
16058   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
16059 $as_echo "$XMLLINT" >&6; }
16060 else
16061   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16062 $as_echo "no" >&6; }
16063 fi
16064
16065
16066   test -n "$XMLLINT" && break
16067 done
16068
16069 for ac_prog in xsltproc
16070 do
16071   # Extract the first word of "$ac_prog", so it can be a program name with args.
16072 set dummy $ac_prog; ac_word=$2
16073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16074 $as_echo_n "checking for $ac_word... " >&6; }
16075 if ${ac_cv_prog_XSLTPROC+:} false; then :
16076   $as_echo_n "(cached) " >&6
16077 else
16078   if test -n "$XSLTPROC"; then
16079   ac_cv_prog_XSLTPROC="$XSLTPROC" # Let the user override the test.
16080 else
16081 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16082 for as_dir in $PATH
16083 do
16084   IFS=$as_save_IFS
16085   test -z "$as_dir" && as_dir=.
16086     for ac_exec_ext in '' $ac_executable_extensions; do
16087   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16088     ac_cv_prog_XSLTPROC="$ac_prog"
16089     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16090     break 2
16091   fi
16092 done
16093   done
16094 IFS=$as_save_IFS
16095
16096 fi
16097 fi
16098 XSLTPROC=$ac_cv_prog_XSLTPROC
16099 if test -n "$XSLTPROC"; then
16100   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
16101 $as_echo "$XSLTPROC" >&6; }
16102 else
16103   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16104 $as_echo "no" >&6; }
16105 fi
16106
16107
16108   test -n "$XSLTPROC" && break
16109 done
16110
16111 for ac_prog in osx sgml2xml sx
16112 do
16113   # Extract the first word of "$ac_prog", so it can be a program name with args.
16114 set dummy $ac_prog; ac_word=$2
16115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16116 $as_echo_n "checking for $ac_word... " >&6; }
16117 if ${ac_cv_prog_OSX+:} false; then :
16118   $as_echo_n "(cached) " >&6
16119 else
16120   if test -n "$OSX"; then
16121   ac_cv_prog_OSX="$OSX" # Let the user override the test.
16122 else
16123 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16124 for as_dir in $PATH
16125 do
16126   IFS=$as_save_IFS
16127   test -z "$as_dir" && as_dir=.
16128     for ac_exec_ext in '' $ac_executable_extensions; do
16129   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16130     ac_cv_prog_OSX="$ac_prog"
16131     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16132     break 2
16133   fi
16134 done
16135   done
16136 IFS=$as_save_IFS
16137
16138 fi
16139 fi
16140 OSX=$ac_cv_prog_OSX
16141 if test -n "$OSX"; then
16142   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OSX" >&5
16143 $as_echo "$OSX" >&6; }
16144 else
16145   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16146 $as_echo "no" >&6; }
16147 fi
16148
16149
16150   test -n "$OSX" && break
16151 done
16152
16153 for ac_prog in fop
16154 do
16155   # Extract the first word of "$ac_prog", so it can be a program name with args.
16156 set dummy $ac_prog; ac_word=$2
16157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16158 $as_echo_n "checking for $ac_word... " >&6; }
16159 if ${ac_cv_prog_FOP+:} false; then :
16160   $as_echo_n "(cached) " >&6
16161 else
16162   if test -n "$FOP"; then
16163   ac_cv_prog_FOP="$FOP" # Let the user override the test.
16164 else
16165 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16166 for as_dir in $PATH
16167 do
16168   IFS=$as_save_IFS
16169   test -z "$as_dir" && as_dir=.
16170     for ac_exec_ext in '' $ac_executable_extensions; do
16171   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16172     ac_cv_prog_FOP="$ac_prog"
16173     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16174     break 2
16175   fi
16176 done
16177   done
16178 IFS=$as_save_IFS
16179
16180 fi
16181 fi
16182 FOP=$ac_cv_prog_FOP
16183 if test -n "$FOP"; then
16184   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
16185 $as_echo "$FOP" >&6; }
16186 else
16187   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16188 $as_echo "no" >&6; }
16189 fi
16190
16191
16192   test -n "$FOP" && break
16193 done
16194
16195
16196 #
16197 # Check for test tools
16198 #
16199 if test "$enable_tap_tests" = yes; then
16200   for ac_prog in prove
16201 do
16202   # Extract the first word of "$ac_prog", so it can be a program name with args.
16203 set dummy $ac_prog; ac_word=$2
16204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16205 $as_echo_n "checking for $ac_word... " >&6; }
16206 if ${ac_cv_prog_PROVE+:} false; then :
16207   $as_echo_n "(cached) " >&6
16208 else
16209   if test -n "$PROVE"; then
16210   ac_cv_prog_PROVE="$PROVE" # Let the user override the test.
16211 else
16212 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16213 for as_dir in $PATH
16214 do
16215   IFS=$as_save_IFS
16216   test -z "$as_dir" && as_dir=.
16217     for ac_exec_ext in '' $ac_executable_extensions; do
16218   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16219     ac_cv_prog_PROVE="$ac_prog"
16220     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16221     break 2
16222   fi
16223 done
16224   done
16225 IFS=$as_save_IFS
16226
16227 fi
16228 fi
16229 PROVE=$ac_cv_prog_PROVE
16230 if test -n "$PROVE"; then
16231   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
16232 $as_echo "$PROVE" >&6; }
16233 else
16234   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16235 $as_echo "no" >&6; }
16236 fi
16237
16238
16239   test -n "$PROVE" && break
16240 done
16241
16242   if test -z "$PROVE"; then
16243     as_fn_error $? "prove not found" "$LINENO" 5
16244   fi
16245   if test -z "$PERL"; then
16246     as_fn_error $? "Perl not found" "$LINENO" 5
16247   fi
16248 fi
16249
16250 # Thread testing
16251
16252 # We have to run the thread test near the end so we have all our symbols
16253 # defined.  Cross compiling throws a warning.
16254 #
16255 if test "$enable_thread_safety" = yes; then
16256 if test "$PORTNAME" != "win32"
16257 then
16258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking thread safety of required library functions" >&5
16259 $as_echo_n "checking thread safety of required library functions... " >&6; }
16260
16261 _CFLAGS="$CFLAGS"
16262 _LIBS="$LIBS"
16263 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
16264 LIBS="$LIBS $PTHREAD_LIBS"
16265 if test "$cross_compiling" = yes; then :
16266   { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
16267 $as_echo "maybe" >&6; }
16268   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
16269 *** Skipping thread test program because of cross-compile build.
16270 *** Run the program in src/test/thread on the target machine.
16271 " >&5
16272 $as_echo "$as_me: WARNING:
16273 *** Skipping thread test program because of cross-compile build.
16274 *** Run the program in src/test/thread on the target machine.
16275 " >&2;}
16276 else
16277   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16278 /* end confdefs.h.  */
16279 #include "$srcdir/src/test/thread/thread_test.c"
16280 _ACEOF
16281 if ac_fn_c_try_run "$LINENO"; then :
16282   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16283 $as_echo "yes" >&6; }
16284 else
16285   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16286 $as_echo "no" >&6; }
16287   as_fn_error $? "thread test program failed
16288 This platform is not thread-safe.  Check the file 'config.log' or compile
16289 and run src/test/thread/thread_test for the exact reason.
16290 Use --disable-thread-safety to disable thread safety." "$LINENO" 5
16291 fi
16292 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16293   conftest.$ac_objext conftest.beam conftest.$ac_ext
16294 fi
16295
16296 CFLAGS="$_CFLAGS"
16297 LIBS="$_LIBS"
16298 else
16299 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** skipping thread test on Win32" >&5
16300 $as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
16301 fi
16302 fi
16303
16304 # If compiler will take -Wl,--as-needed (or various platform-specific
16305 # spellings thereof) then add that to LDFLAGS.  This is much easier than
16306 # trying to filter LIBS to the minimum for each executable.
16307 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
16308 # libreadline; therefore we postpone testing it until we know what library
16309 # dependencies readline has.  The test code will try to link with $LIBS.
16310 if test "$with_readline" = yes; then
16311   link_test_func=readline
16312 else
16313   link_test_func=exit
16314 fi
16315
16316 if test "$PORTNAME" = "darwin"; then
16317   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
16318 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
16319 if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
16320   $as_echo_n "(cached) " >&6
16321 else
16322   pgac_save_LDFLAGS=$LDFLAGS
16323 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
16324 if test "$cross_compiling" = yes; then :
16325   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
16326 else
16327   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16328 /* end confdefs.h.  */
16329 extern void $link_test_func (); void (*fptr) () = $link_test_func;
16330 int
16331 main ()
16332 {
16333
16334   ;
16335   return 0;
16336 }
16337 _ACEOF
16338 if ac_fn_c_try_run "$LINENO"; then :
16339   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
16340 else
16341   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
16342 fi
16343 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16344   conftest.$ac_objext conftest.beam conftest.$ac_ext
16345 fi
16346
16347 LDFLAGS="$pgac_save_LDFLAGS"
16348 fi
16349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
16350 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
16351 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
16352   LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
16353 fi
16354
16355 elif test "$PORTNAME" = "openbsd"; then
16356   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
16357 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
16358 if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
16359   $as_echo_n "(cached) " >&6
16360 else
16361   pgac_save_LDFLAGS=$LDFLAGS
16362 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
16363 if test "$cross_compiling" = yes; then :
16364   pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
16365 else
16366   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16367 /* end confdefs.h.  */
16368 extern void $link_test_func (); void (*fptr) () = $link_test_func;
16369 int
16370 main ()
16371 {
16372
16373   ;
16374   return 0;
16375 }
16376 _ACEOF
16377 if ac_fn_c_try_run "$LINENO"; then :
16378   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
16379 else
16380   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
16381 fi
16382 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16383   conftest.$ac_objext conftest.beam conftest.$ac_ext
16384 fi
16385
16386 LDFLAGS="$pgac_save_LDFLAGS"
16387 fi
16388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
16389 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
16390 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
16391   LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
16392 fi
16393
16394 else
16395   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
16396 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
16397 if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
16398   $as_echo_n "(cached) " >&6
16399 else
16400   pgac_save_LDFLAGS=$LDFLAGS
16401 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
16402 if test "$cross_compiling" = yes; then :
16403   pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
16404 else
16405   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16406 /* end confdefs.h.  */
16407 extern void $link_test_func (); void (*fptr) () = $link_test_func;
16408 int
16409 main ()
16410 {
16411
16412   ;
16413   return 0;
16414 }
16415 _ACEOF
16416 if ac_fn_c_try_run "$LINENO"; then :
16417   pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
16418 else
16419   pgac_cv_prog_cc_ldflags__Wl___as_needed=no
16420 fi
16421 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16422   conftest.$ac_objext conftest.beam conftest.$ac_ext
16423 fi
16424
16425 LDFLAGS="$pgac_save_LDFLAGS"
16426 fi
16427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
16428 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
16429 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
16430   LDFLAGS="$LDFLAGS -Wl,--as-needed"
16431 fi
16432
16433 fi
16434
16435 # Create compiler version string
16436 if test x"$GCC" = x"yes" ; then
16437   cc_string=`${CC} --version | sed q`
16438   case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
16439 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
16440   cc_string=`${CC} -V 2>&1 | sed q`
16441 else
16442   cc_string=$CC
16443 fi
16444
16445
16446 cat >>confdefs.h <<_ACEOF
16447 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
16448 _ACEOF
16449
16450
16451 # Supply a numeric version string for use by 3rd party add-ons
16452 # awk -F is a regex on some platforms, and not on others, so make "." a tab
16453 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
16454 tr '.' '        ' |
16455 $AWK '{printf "%d%02d%02d", $1, $2, (NF >= 3) ? $3 : 0}'`"
16456
16457 cat >>confdefs.h <<_ACEOF
16458 #define PG_VERSION_NUM $PG_VERSION_NUM
16459 _ACEOF
16460
16461
16462
16463
16464 # Begin output steps
16465
16466 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
16467 $as_echo "$as_me: using compiler=$cc_string" >&6;}
16468 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
16469 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
16470 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
16471 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
16472 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
16473 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
16474
16475 # prepare build tree if outside source tree
16476 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
16477 # Note 2: /bin/pwd might be better than shell's built-in at getting
16478 #         a symlink-free name.
16479 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
16480   vpath_build=no
16481 else
16482   vpath_build=yes
16483   if test "$no_create" != yes; then
16484     $as_echo_n "preparing build tree... " >&6
16485     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
16486     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
16487       || as_fn_error $? "failed" "$LINENO" 5
16488     { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16489 $as_echo "done" >&6; }
16490   fi
16491 fi
16492
16493
16494
16495 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
16496
16497
16498 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}"
16499
16500
16501 if test "$PORTNAME" = "win32"; then
16502 ac_config_commands="$ac_config_commands check_win32_symlinks"
16503
16504 fi
16505
16506 ac_config_headers="$ac_config_headers src/include/pg_config.h"
16507
16508
16509 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
16510
16511
16512 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
16513
16514
16515 cat >confcache <<\_ACEOF
16516 # This file is a shell script that caches the results of configure
16517 # tests run on this system so they can be shared between configure
16518 # scripts and configure runs, see configure's option --config-cache.
16519 # It is not useful on other systems.  If it contains results you don't
16520 # want to keep, you may remove or edit it.
16521 #
16522 # config.status only pays attention to the cache file if you give it
16523 # the --recheck option to rerun configure.
16524 #
16525 # `ac_cv_env_foo' variables (set or unset) will be overridden when
16526 # loading this file, other *unset* `ac_cv_foo' will be assigned the
16527 # following values.
16528
16529 _ACEOF
16530
16531 # The following way of writing the cache mishandles newlines in values,
16532 # but we know of no workaround that is simple, portable, and efficient.
16533 # So, we kill variables containing newlines.
16534 # Ultrix sh set writes to stderr and can't be redirected directly,
16535 # and sets the high bit in the cache file unless we assign to the vars.
16536 (
16537   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16538     eval ac_val=\$$ac_var
16539     case $ac_val in #(
16540     *${as_nl}*)
16541       case $ac_var in #(
16542       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16543 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
16544       esac
16545       case $ac_var in #(
16546       _ | IFS | as_nl) ;; #(
16547       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16548       *) { eval $ac_var=; unset $ac_var;} ;;
16549       esac ;;
16550     esac
16551   done
16552
16553   (set) 2>&1 |
16554     case $as_nl`(ac_space=' '; set) 2>&1` in #(
16555     *${as_nl}ac_space=\ *)
16556       # `set' does not quote correctly, so add quotes: double-quote
16557       # substitution turns \\\\ into \\, and sed turns \\ into \.
16558       sed -n \
16559         "s/'/'\\\\''/g;
16560           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16561       ;; #(
16562     *)
16563       # `set' quotes correctly as required by POSIX, so do not add quotes.
16564       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
16565       ;;
16566     esac |
16567     sort
16568 ) |
16569   sed '
16570      /^ac_cv_env_/b end
16571      t clear
16572      :clear
16573      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16574      t end
16575      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16576      :end' >>confcache
16577 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16578   if test -w "$cache_file"; then
16579     if test "x$cache_file" != "x/dev/null"; then
16580       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16581 $as_echo "$as_me: updating cache $cache_file" >&6;}
16582       if test ! -f "$cache_file" || test -h "$cache_file"; then
16583         cat confcache >"$cache_file"
16584       else
16585         case $cache_file in #(
16586         */* | ?:*)
16587           mv -f confcache "$cache_file"$$ &&
16588           mv -f "$cache_file"$$ "$cache_file" ;; #(
16589         *)
16590           mv -f confcache "$cache_file" ;;
16591         esac
16592       fi
16593     fi
16594   else
16595     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16596 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
16597   fi
16598 fi
16599 rm -f confcache
16600
16601 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16602 # Let make expand exec_prefix.
16603 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16604
16605 DEFS=-DHAVE_CONFIG_H
16606
16607 ac_libobjs=
16608 ac_ltlibobjs=
16609 U=
16610 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16611   # 1. Remove the extension, and $U if already installed.
16612   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
16613   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
16614   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
16615   #    will be set to the directory where LIBOBJS objects are built.
16616   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16617   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
16618 done
16619 LIBOBJS=$ac_libobjs
16620
16621 LTLIBOBJS=$ac_ltlibobjs
16622
16623
16624
16625
16626 : "${CONFIG_STATUS=./config.status}"
16627 ac_write_fail=0
16628 ac_clean_files_save=$ac_clean_files
16629 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16630 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16631 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16632 as_write_fail=0
16633 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
16634 #! $SHELL
16635 # Generated by $as_me.
16636 # Run this file to recreate the current configuration.
16637 # Compiler output produced by configure, useful for debugging
16638 # configure, is in config.log if it exists.
16639
16640 debug=false
16641 ac_cs_recheck=false
16642 ac_cs_silent=false
16643
16644 SHELL=\${CONFIG_SHELL-$SHELL}
16645 export SHELL
16646 _ASEOF
16647 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16648 ## -------------------- ##
16649 ## M4sh Initialization. ##
16650 ## -------------------- ##
16651
16652 # Be more Bourne compatible
16653 DUALCASE=1; export DUALCASE # for MKS sh
16654 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
16655   emulate sh
16656   NULLCMD=:
16657   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
16658   # is contrary to our usage.  Disable this feature.
16659   alias -g '${1+"$@"}'='"$@"'
16660   setopt NO_GLOB_SUBST
16661 else
16662   case `(set -o) 2>/dev/null` in #(
16663   *posix*) :
16664     set -o posix ;; #(
16665   *) :
16666      ;;
16667 esac
16668 fi
16669
16670
16671 as_nl='
16672 '
16673 export as_nl
16674 # Printing a long string crashes Solaris 7 /usr/bin/printf.
16675 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16676 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16677 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16678 # Prefer a ksh shell builtin over an external printf program on Solaris,
16679 # but without wasting forks for bash or zsh.
16680 if test -z "$BASH_VERSION$ZSH_VERSION" \
16681     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16682   as_echo='print -r --'
16683   as_echo_n='print -rn --'
16684 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16685   as_echo='printf %s\n'
16686   as_echo_n='printf %s'
16687 else
16688   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16689     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16690     as_echo_n='/usr/ucb/echo -n'
16691   else
16692     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16693     as_echo_n_body='eval
16694       arg=$1;
16695       case $arg in #(
16696       *"$as_nl"*)
16697         expr "X$arg" : "X\\(.*\\)$as_nl";
16698         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16699       esac;
16700       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16701     '
16702     export as_echo_n_body
16703     as_echo_n='sh -c $as_echo_n_body as_echo'
16704   fi
16705   export as_echo_body
16706   as_echo='sh -c $as_echo_body as_echo'
16707 fi
16708
16709 # The user is always right.
16710 if test "${PATH_SEPARATOR+set}" != set; then
16711   PATH_SEPARATOR=:
16712   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16713     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16714       PATH_SEPARATOR=';'
16715   }
16716 fi
16717
16718
16719 # IFS
16720 # We need space, tab and new line, in precisely that order.  Quoting is
16721 # there to prevent editors from complaining about space-tab.
16722 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
16723 # splitting by setting IFS to empty value.)
16724 IFS=" ""        $as_nl"
16725
16726 # Find who we are.  Look in the path if we contain no directory separator.
16727 as_myself=
16728 case $0 in #((
16729   *[\\/]* ) as_myself=$0 ;;
16730   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16731 for as_dir in $PATH
16732 do
16733   IFS=$as_save_IFS
16734   test -z "$as_dir" && as_dir=.
16735     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16736   done
16737 IFS=$as_save_IFS
16738
16739      ;;
16740 esac
16741 # We did not find ourselves, most probably we were run as `sh COMMAND'
16742 # in which case we are not to be found in the path.
16743 if test "x$as_myself" = x; then
16744   as_myself=$0
16745 fi
16746 if test ! -f "$as_myself"; then
16747   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16748   exit 1
16749 fi
16750
16751 # Unset variables that we do not need and which cause bugs (e.g. in
16752 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
16753 # suppresses any "Segmentation fault" message there.  '((' could
16754 # trigger a bug in pdksh 5.2.14.
16755 for as_var in BASH_ENV ENV MAIL MAILPATH
16756 do eval test x\${$as_var+set} = xset \
16757   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
16758 done
16759 PS1='$ '
16760 PS2='> '
16761 PS4='+ '
16762
16763 # NLS nuisances.
16764 LC_ALL=C
16765 export LC_ALL
16766 LANGUAGE=C
16767 export LANGUAGE
16768
16769 # CDPATH.
16770 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16771
16772
16773 # as_fn_error STATUS ERROR [LINENO LOG_FD]
16774 # ----------------------------------------
16775 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16776 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
16777 # script with STATUS, using 1 if that was 0.
16778 as_fn_error ()
16779 {
16780   as_status=$1; test $as_status -eq 0 && as_status=1
16781   if test "$4"; then
16782     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16783     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
16784   fi
16785   $as_echo "$as_me: error: $2" >&2
16786   as_fn_exit $as_status
16787 } # as_fn_error
16788
16789
16790 # as_fn_set_status STATUS
16791 # -----------------------
16792 # Set $? to STATUS, without forking.
16793 as_fn_set_status ()
16794 {
16795   return $1
16796 } # as_fn_set_status
16797
16798 # as_fn_exit STATUS
16799 # -----------------
16800 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16801 as_fn_exit ()
16802 {
16803   set +e
16804   as_fn_set_status $1
16805   exit $1
16806 } # as_fn_exit
16807
16808 # as_fn_unset VAR
16809 # ---------------
16810 # Portably unset VAR.
16811 as_fn_unset ()
16812 {
16813   { eval $1=; unset $1;}
16814 }
16815 as_unset=as_fn_unset
16816 # as_fn_append VAR VALUE
16817 # ----------------------
16818 # Append the text in VALUE to the end of the definition contained in VAR. Take
16819 # advantage of any shell optimizations that allow amortized linear growth over
16820 # repeated appends, instead of the typical quadratic growth present in naive
16821 # implementations.
16822 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16823   eval 'as_fn_append ()
16824   {
16825     eval $1+=\$2
16826   }'
16827 else
16828   as_fn_append ()
16829   {
16830     eval $1=\$$1\$2
16831   }
16832 fi # as_fn_append
16833
16834 # as_fn_arith ARG...
16835 # ------------------
16836 # Perform arithmetic evaluation on the ARGs, and store the result in the
16837 # global $as_val. Take advantage of shells that can avoid forks. The arguments
16838 # must be portable across $(()) and expr.
16839 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16840   eval 'as_fn_arith ()
16841   {
16842     as_val=$(( $* ))
16843   }'
16844 else
16845   as_fn_arith ()
16846   {
16847     as_val=`expr "$@" || test $? -eq 1`
16848   }
16849 fi # as_fn_arith
16850
16851
16852 if expr a : '\(a\)' >/dev/null 2>&1 &&
16853    test "X`expr 00001 : '.*\(...\)'`" = X001; then
16854   as_expr=expr
16855 else
16856   as_expr=false
16857 fi
16858
16859 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16860   as_basename=basename
16861 else
16862   as_basename=false
16863 fi
16864
16865 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16866   as_dirname=dirname
16867 else
16868   as_dirname=false
16869 fi
16870
16871 as_me=`$as_basename -- "$0" ||
16872 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16873          X"$0" : 'X\(//\)$' \| \
16874          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
16875 $as_echo X/"$0" |
16876     sed '/^.*\/\([^/][^/]*\)\/*$/{
16877             s//\1/
16878             q
16879           }
16880           /^X\/\(\/\/\)$/{
16881             s//\1/
16882             q
16883           }
16884           /^X\/\(\/\).*/{
16885             s//\1/
16886             q
16887           }
16888           s/.*/./; q'`
16889
16890 # Avoid depending upon Character Ranges.
16891 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16892 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16893 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16894 as_cr_digits='0123456789'
16895 as_cr_alnum=$as_cr_Letters$as_cr_digits
16896
16897 ECHO_C= ECHO_N= ECHO_T=
16898 case `echo -n x` in #(((((
16899 -n*)
16900   case `echo 'xy\c'` in
16901   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
16902   xy)  ECHO_C='\c';;
16903   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
16904        ECHO_T=' ';;
16905   esac;;
16906 *)
16907   ECHO_N='-n';;
16908 esac
16909
16910 rm -f conf$$ conf$$.exe conf$$.file
16911 if test -d conf$$.dir; then
16912   rm -f conf$$.dir/conf$$.file
16913 else
16914   rm -f conf$$.dir
16915   mkdir conf$$.dir 2>/dev/null
16916 fi
16917 if (echo >conf$$.file) 2>/dev/null; then
16918   if ln -s conf$$.file conf$$ 2>/dev/null; then
16919     as_ln_s='ln -s'
16920     # ... but there are two gotchas:
16921     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16922     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
16923     # In both cases, we have to default to `cp -pR'.
16924     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
16925       as_ln_s='cp -pR'
16926   elif ln conf$$.file conf$$ 2>/dev/null; then
16927     as_ln_s=ln
16928   else
16929     as_ln_s='cp -pR'
16930   fi
16931 else
16932   as_ln_s='cp -pR'
16933 fi
16934 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16935 rmdir conf$$.dir 2>/dev/null
16936
16937
16938 # as_fn_mkdir_p
16939 # -------------
16940 # Create "$as_dir" as a directory, including parents if necessary.
16941 as_fn_mkdir_p ()
16942 {
16943
16944   case $as_dir in #(
16945   -*) as_dir=./$as_dir;;
16946   esac
16947   test -d "$as_dir" || eval $as_mkdir_p || {
16948     as_dirs=
16949     while :; do
16950       case $as_dir in #(
16951       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16952       *) as_qdir=$as_dir;;
16953       esac
16954       as_dirs="'$as_qdir' $as_dirs"
16955       as_dir=`$as_dirname -- "$as_dir" ||
16956 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16957          X"$as_dir" : 'X\(//\)[^/]' \| \
16958          X"$as_dir" : 'X\(//\)$' \| \
16959          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16960 $as_echo X"$as_dir" |
16961     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16962             s//\1/
16963             q
16964           }
16965           /^X\(\/\/\)[^/].*/{
16966             s//\1/
16967             q
16968           }
16969           /^X\(\/\/\)$/{
16970             s//\1/
16971             q
16972           }
16973           /^X\(\/\).*/{
16974             s//\1/
16975             q
16976           }
16977           s/.*/./; q'`
16978       test -d "$as_dir" && break
16979     done
16980     test -z "$as_dirs" || eval "mkdir $as_dirs"
16981   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
16982
16983
16984 } # as_fn_mkdir_p
16985 if mkdir -p . 2>/dev/null; then
16986   as_mkdir_p='mkdir -p "$as_dir"'
16987 else
16988   test -d ./-p && rmdir ./-p
16989   as_mkdir_p=false
16990 fi
16991
16992
16993 # as_fn_executable_p FILE
16994 # -----------------------
16995 # Test if FILE is an executable regular file.
16996 as_fn_executable_p ()
16997 {
16998   test -f "$1" && test -x "$1"
16999 } # as_fn_executable_p
17000 as_test_x='test -x'
17001 as_executable_p=as_fn_executable_p
17002
17003 # Sed expression to map a string onto a valid CPP name.
17004 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
17005
17006 # Sed expression to map a string onto a valid variable name.
17007 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
17008
17009
17010 exec 6>&1
17011 ## ----------------------------------- ##
17012 ## Main body of $CONFIG_STATUS script. ##
17013 ## ----------------------------------- ##
17014 _ASEOF
17015 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
17016
17017 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17018 # Save the log message, to keep $0 and so on meaningful, and to
17019 # report actual input values of CONFIG_FILES etc. instead of their
17020 # values after options handling.
17021 ac_log="
17022 This file was extended by PostgreSQL $as_me 10devel, which was
17023 generated by GNU Autoconf 2.69.  Invocation command line was
17024
17025   CONFIG_FILES    = $CONFIG_FILES
17026   CONFIG_HEADERS  = $CONFIG_HEADERS
17027   CONFIG_LINKS    = $CONFIG_LINKS
17028   CONFIG_COMMANDS = $CONFIG_COMMANDS
17029   $ $0 $@
17030
17031 on `(hostname || uname -n) 2>/dev/null | sed 1q`
17032 "
17033
17034 _ACEOF
17035
17036 case $ac_config_files in *"
17037 "*) set x $ac_config_files; shift; ac_config_files=$*;;
17038 esac
17039
17040 case $ac_config_headers in *"
17041 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17042 esac
17043
17044
17045 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17046 # Files that config.status was made for.
17047 config_files="$ac_config_files"
17048 config_headers="$ac_config_headers"
17049 config_links="$ac_config_links"
17050 config_commands="$ac_config_commands"
17051
17052 _ACEOF
17053
17054 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17055 ac_cs_usage="\
17056 \`$as_me' instantiates files and other configuration actions
17057 from templates according to the current configuration.  Unless the files
17058 and actions are specified as TAGs, all are instantiated by default.
17059
17060 Usage: $0 [OPTION]... [TAG]...
17061
17062   -h, --help       print this help, then exit
17063   -V, --version    print version number and configuration settings, then exit
17064       --config     print configuration, then exit
17065   -q, --quiet, --silent
17066                    do not print progress messages
17067   -d, --debug      don't remove temporary files
17068       --recheck    update $as_me by reconfiguring in the same conditions
17069       --file=FILE[:TEMPLATE]
17070                    instantiate the configuration file FILE
17071       --header=FILE[:TEMPLATE]
17072                    instantiate the configuration header FILE
17073
17074 Configuration files:
17075 $config_files
17076
17077 Configuration headers:
17078 $config_headers
17079
17080 Configuration links:
17081 $config_links
17082
17083 Configuration commands:
17084 $config_commands
17085
17086 Report bugs to <pgsql-bugs@postgresql.org>."
17087
17088 _ACEOF
17089 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17090 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
17091 ac_cs_version="\\
17092 PostgreSQL config.status 10devel
17093 configured by $0, generated by GNU Autoconf 2.69,
17094   with options \\"\$ac_cs_config\\"
17095
17096 Copyright (C) 2012 Free Software Foundation, Inc.
17097 This config.status script is free software; the Free Software Foundation
17098 gives unlimited permission to copy, distribute and modify it."
17099
17100 ac_pwd='$ac_pwd'
17101 srcdir='$srcdir'
17102 INSTALL='$INSTALL'
17103 MKDIR_P='$MKDIR_P'
17104 AWK='$AWK'
17105 test -n "\$AWK" || AWK=awk
17106 _ACEOF
17107
17108 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17109 # The default lists apply if the user does not specify any file.
17110 ac_need_defaults=:
17111 while test $# != 0
17112 do
17113   case $1 in
17114   --*=?*)
17115     ac_option=`expr "X$1" : 'X\([^=]*\)='`
17116     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
17117     ac_shift=:
17118     ;;
17119   --*=)
17120     ac_option=`expr "X$1" : 'X\([^=]*\)='`
17121     ac_optarg=
17122     ac_shift=:
17123     ;;
17124   *)
17125     ac_option=$1
17126     ac_optarg=$2
17127     ac_shift=shift
17128     ;;
17129   esac
17130
17131   case $ac_option in
17132   # Handling of the options.
17133   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17134     ac_cs_recheck=: ;;
17135   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
17136     $as_echo "$ac_cs_version"; exit ;;
17137   --config | --confi | --conf | --con | --co | --c )
17138     $as_echo "$ac_cs_config"; exit ;;
17139   --debug | --debu | --deb | --de | --d | -d )
17140     debug=: ;;
17141   --file | --fil | --fi | --f )
17142     $ac_shift
17143     case $ac_optarg in
17144     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17145     '') as_fn_error $? "missing file argument" ;;
17146     esac
17147     as_fn_append CONFIG_FILES " '$ac_optarg'"
17148     ac_need_defaults=false;;
17149   --header | --heade | --head | --hea )
17150     $ac_shift
17151     case $ac_optarg in
17152     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17153     esac
17154     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
17155     ac_need_defaults=false;;
17156   --he | --h)
17157     # Conflict between --help and --header
17158     as_fn_error $? "ambiguous option: \`$1'
17159 Try \`$0 --help' for more information.";;
17160   --help | --hel | -h )
17161     $as_echo "$ac_cs_usage"; exit ;;
17162   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17163   | -silent | --silent | --silen | --sile | --sil | --si | --s)
17164     ac_cs_silent=: ;;
17165
17166   # This is an error.
17167   -*) as_fn_error $? "unrecognized option: \`$1'
17168 Try \`$0 --help' for more information." ;;
17169
17170   *) as_fn_append ac_config_targets " $1"
17171      ac_need_defaults=false ;;
17172
17173   esac
17174   shift
17175 done
17176
17177 ac_configure_extra_args=
17178
17179 if $ac_cs_silent; then
17180   exec 6>/dev/null
17181   ac_configure_extra_args="$ac_configure_extra_args --silent"
17182 fi
17183
17184 _ACEOF
17185 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17186 if \$ac_cs_recheck; then
17187   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
17188   shift
17189   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17190   CONFIG_SHELL='$SHELL'
17191   export CONFIG_SHELL
17192   exec "\$@"
17193 fi
17194
17195 _ACEOF
17196 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17197 exec 5>>config.log
17198 {
17199   echo
17200   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17201 ## Running $as_me. ##
17202 _ASBOX
17203   $as_echo "$ac_log"
17204 } >&5
17205
17206 _ACEOF
17207 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17208 _ACEOF
17209
17210 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17211
17212 # Handling of arguments.
17213 for ac_config_target in $ac_config_targets
17214 do
17215   case $ac_config_target in
17216     "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
17217     "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
17218     "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
17219     "src/backend/port/dynloader.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
17220     "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
17221     "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
17222     "src/include/dynloader.h") CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
17223     "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
17224     "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
17225     "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
17226     "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
17227     "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
17228     "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
17229
17230   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
17231   esac
17232 done
17233
17234
17235 # If the user did not use the arguments to specify the items to instantiate,
17236 # then the envvar interface is used.  Set only those that are not.
17237 # We use the long form for the default assignment because of an extremely
17238 # bizarre bug on SunOS 4.1.3.
17239 if $ac_need_defaults; then
17240   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17241   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17242   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
17243   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17244 fi
17245
17246 # Have a temporary directory for convenience.  Make it in the build tree
17247 # simply because there is no reason against having it here, and in addition,
17248 # creating and moving files from /tmp can sometimes cause problems.
17249 # Hook for its removal unless debugging.
17250 # Note that there is a small window in which the directory will not be cleaned:
17251 # after its creation but before its name has been assigned to `$tmp'.
17252 $debug ||
17253 {
17254   tmp= ac_tmp=
17255   trap 'exit_status=$?
17256   : "${ac_tmp:=$tmp}"
17257   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
17258 ' 0
17259   trap 'as_fn_exit 1' 1 2 13 15
17260 }
17261 # Create a (secure) tmp directory for tmp files.
17262
17263 {
17264   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
17265   test -d "$tmp"
17266 }  ||
17267 {
17268   tmp=./conf$$-$RANDOM
17269   (umask 077 && mkdir "$tmp")
17270 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
17271 ac_tmp=$tmp
17272
17273 # Set up the scripts for CONFIG_FILES section.
17274 # No need to generate them if there are no CONFIG_FILES.
17275 # This happens for instance with `./config.status config.h'.
17276 if test -n "$CONFIG_FILES"; then
17277
17278
17279 ac_cr=`echo X | tr X '\015'`
17280 # On cygwin, bash can eat \r inside `` if the user requested igncr.
17281 # But we know of no other shell where ac_cr would be empty at this
17282 # point, so we can use a bashism as a fallback.
17283 if test "x$ac_cr" = x; then
17284   eval ac_cr=\$\'\\r\'
17285 fi
17286 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17287 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
17288   ac_cs_awk_cr='\\r'
17289 else
17290   ac_cs_awk_cr=$ac_cr
17291 fi
17292
17293 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
17294 _ACEOF
17295
17296
17297 {
17298   echo "cat >conf$$subs.awk <<_ACEOF" &&
17299   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17300   echo "_ACEOF"
17301 } >conf$$subs.sh ||
17302   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17303 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
17304 ac_delim='%!_!# '
17305 for ac_last_try in false false false false false :; do
17306   . ./conf$$subs.sh ||
17307     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17308
17309   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17310   if test $ac_delim_n = $ac_delim_num; then
17311     break
17312   elif $ac_last_try; then
17313     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17314   else
17315     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17316   fi
17317 done
17318 rm -f conf$$subs.sh
17319
17320 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17321 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
17322 _ACEOF
17323 sed -n '
17324 h
17325 s/^/S["/; s/!.*/"]=/
17326 p
17327 g
17328 s/^[^!]*!//
17329 :repl
17330 t repl
17331 s/'"$ac_delim"'$//
17332 t delim
17333 :nl
17334 h
17335 s/\(.\{148\}\)..*/\1/
17336 t more1
17337 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17338 p
17339 n
17340 b repl
17341 :more1
17342 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17343 p
17344 g
17345 s/.\{148\}//
17346 t nl
17347 :delim
17348 h
17349 s/\(.\{148\}\)..*/\1/
17350 t more2
17351 s/["\\]/\\&/g; s/^/"/; s/$/"/
17352 p
17353 b
17354 :more2
17355 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17356 p
17357 g
17358 s/.\{148\}//
17359 t delim
17360 ' <conf$$subs.awk | sed '
17361 /^[^""]/{
17362   N
17363   s/\n//
17364 }
17365 ' >>$CONFIG_STATUS || ac_write_fail=1
17366 rm -f conf$$subs.awk
17367 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17368 _ACAWK
17369 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
17370   for (key in S) S_is_set[key] = 1
17371   FS = "\a"
17372
17373 }
17374 {
17375   line = $ 0
17376   nfields = split(line, field, "@")
17377   substed = 0
17378   len = length(field[1])
17379   for (i = 2; i < nfields; i++) {
17380     key = field[i]
17381     keylen = length(key)
17382     if (S_is_set[key]) {
17383       value = S[key]
17384       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17385       len += length(value) + length(field[++i])
17386       substed = 1
17387     } else
17388       len += 1 + keylen
17389   }
17390
17391   print line
17392 }
17393
17394 _ACAWK
17395 _ACEOF
17396 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17397 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17398   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17399 else
17400   cat
17401 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
17402   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
17403 _ACEOF
17404
17405 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17406 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
17407 # trailing colons and then remove the whole line if VPATH becomes empty
17408 # (actually we leave an empty line to preserve line numbers).
17409 if test "x$srcdir" = x.; then
17410   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
17411 h
17412 s///
17413 s/^/:/
17414 s/[      ]*$/:/
17415 s/:\$(srcdir):/:/g
17416 s/:\${srcdir}:/:/g
17417 s/:@srcdir@:/:/g
17418 s/^:*//
17419 s/:*$//
17420 x
17421 s/\(=[   ]*\).*/\1/
17422 G
17423 s/\n//
17424 s/^[^=]*=[       ]*$//
17425 }'
17426 fi
17427
17428 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17429 fi # test -n "$CONFIG_FILES"
17430
17431 # Set up the scripts for CONFIG_HEADERS section.
17432 # No need to generate them if there are no CONFIG_HEADERS.
17433 # This happens for instance with `./config.status Makefile'.
17434 if test -n "$CONFIG_HEADERS"; then
17435 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
17436 BEGIN {
17437 _ACEOF
17438
17439 # Transform confdefs.h into an awk script `defines.awk', embedded as
17440 # here-document in config.status, that substitutes the proper values into
17441 # config.h.in to produce config.h.
17442
17443 # Create a delimiter string that does not exist in confdefs.h, to ease
17444 # handling of long lines.
17445 ac_delim='%!_!# '
17446 for ac_last_try in false false :; do
17447   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17448   if test -z "$ac_tt"; then
17449     break
17450   elif $ac_last_try; then
17451     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
17452   else
17453     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17454   fi
17455 done
17456
17457 # For the awk script, D is an array of macro values keyed by name,
17458 # likewise P contains macro parameters if any.  Preserve backslash
17459 # newline sequences.
17460
17461 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17462 sed -n '
17463 s/.\{148\}/&'"$ac_delim"'/g
17464 t rset
17465 :rset
17466 s/^[     ]*#[    ]*define[       ][      ]*/ /
17467 t def
17468 d
17469 :def
17470 s/\\$//
17471 t bsnl
17472 s/["\\]/\\&/g
17473 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
17474 D["\1"]=" \3"/p
17475 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
17476 d
17477 :bsnl
17478 s/["\\]/\\&/g
17479 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
17480 D["\1"]=" \3\\\\\\n"\\/p
17481 t cont
17482 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17483 t cont
17484 d
17485 :cont
17486 n
17487 s/.\{148\}/&'"$ac_delim"'/g
17488 t clear
17489 :clear
17490 s/\\$//
17491 t bsnlc
17492 s/["\\]/\\&/g; s/^/"/; s/$/"/p
17493 d
17494 :bsnlc
17495 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17496 b cont
17497 ' <confdefs.h | sed '
17498 s/'"$ac_delim"'/"\\\
17499 "/g' >>$CONFIG_STATUS || ac_write_fail=1
17500
17501 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17502   for (key in D) D_is_set[key] = 1
17503   FS = "\a"
17504 }
17505 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17506   line = \$ 0
17507   split(line, arg, " ")
17508   if (arg[1] == "#") {
17509     defundef = arg[2]
17510     mac1 = arg[3]
17511   } else {
17512     defundef = substr(arg[1], 2)
17513     mac1 = arg[2]
17514   }
17515   split(mac1, mac2, "(") #)
17516   macro = mac2[1]
17517   prefix = substr(line, 1, index(line, defundef) - 1)
17518   if (D_is_set[macro]) {
17519     # Preserve the white space surrounding the "#".
17520     print prefix "define", macro P[macro] D[macro]
17521     next
17522   } else {
17523     # Replace #undef with comments.  This is necessary, for example,
17524     # in the case of _POSIX_SOURCE, which is predefined and required
17525     # on some systems where configure will not decide to define it.
17526     if (defundef == "undef") {
17527       print "/*", prefix defundef, macro, "*/"
17528       next
17529     }
17530   }
17531 }
17532 { print }
17533 _ACAWK
17534 _ACEOF
17535 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17536   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
17537 fi # test -n "$CONFIG_HEADERS"
17538
17539
17540 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
17541 shift
17542 for ac_tag
17543 do
17544   case $ac_tag in
17545   :[FHLC]) ac_mode=$ac_tag; continue;;
17546   esac
17547   case $ac_mode$ac_tag in
17548   :[FHL]*:*);;
17549   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
17550   :[FH]-) ac_tag=-:-;;
17551   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17552   esac
17553   ac_save_IFS=$IFS
17554   IFS=:
17555   set x $ac_tag
17556   IFS=$ac_save_IFS
17557   shift
17558   ac_file=$1
17559   shift
17560
17561   case $ac_mode in
17562   :L) ac_source=$1;;
17563   :[FH])
17564     ac_file_inputs=
17565     for ac_f
17566     do
17567       case $ac_f in
17568       -) ac_f="$ac_tmp/stdin";;
17569       *) # Look for the file first in the build tree, then in the source tree
17570          # (if the path is not absolute).  The absolute path cannot be DOS-style,
17571          # because $ac_f cannot contain `:'.
17572          test -f "$ac_f" ||
17573            case $ac_f in
17574            [\\/$]*) false;;
17575            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17576            esac ||
17577            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
17578       esac
17579       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17580       as_fn_append ac_file_inputs " '$ac_f'"
17581     done
17582
17583     # Let's still pretend it is `configure' which instantiates (i.e., don't
17584     # use $as_me), people would be surprised to read:
17585     #    /* config.h.  Generated by config.status.  */
17586     configure_input='Generated from '`
17587           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17588         `' by configure.'
17589     if test x"$ac_file" != x-; then
17590       configure_input="$ac_file.  $configure_input"
17591       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17592 $as_echo "$as_me: creating $ac_file" >&6;}
17593     fi
17594     # Neutralize special characters interpreted by sed in replacement strings.
17595     case $configure_input in #(
17596     *\&* | *\|* | *\\* )
17597        ac_sed_conf_input=`$as_echo "$configure_input" |
17598        sed 's/[\\\\&|]/\\\\&/g'`;; #(
17599     *) ac_sed_conf_input=$configure_input;;
17600     esac
17601
17602     case $ac_tag in
17603     *:-:* | *:-) cat >"$ac_tmp/stdin" \
17604       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
17605     esac
17606     ;;
17607   esac
17608
17609   ac_dir=`$as_dirname -- "$ac_file" ||
17610 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17611          X"$ac_file" : 'X\(//\)[^/]' \| \
17612          X"$ac_file" : 'X\(//\)$' \| \
17613          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
17614 $as_echo X"$ac_file" |
17615     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17616             s//\1/
17617             q
17618           }
17619           /^X\(\/\/\)[^/].*/{
17620             s//\1/
17621             q
17622           }
17623           /^X\(\/\/\)$/{
17624             s//\1/
17625             q
17626           }
17627           /^X\(\/\).*/{
17628             s//\1/
17629             q
17630           }
17631           s/.*/./; q'`
17632   as_dir="$ac_dir"; as_fn_mkdir_p
17633   ac_builddir=.
17634
17635 case "$ac_dir" in
17636 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17637 *)
17638   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
17639   # A ".." for each directory in $ac_dir_suffix.
17640   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
17641   case $ac_top_builddir_sub in
17642   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17643   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17644   esac ;;
17645 esac
17646 ac_abs_top_builddir=$ac_pwd
17647 ac_abs_builddir=$ac_pwd$ac_dir_suffix
17648 # for backward compatibility:
17649 ac_top_builddir=$ac_top_build_prefix
17650
17651 case $srcdir in
17652   .)  # We are building in place.
17653     ac_srcdir=.
17654     ac_top_srcdir=$ac_top_builddir_sub
17655     ac_abs_top_srcdir=$ac_pwd ;;
17656   [\\/]* | ?:[\\/]* )  # Absolute name.
17657     ac_srcdir=$srcdir$ac_dir_suffix;
17658     ac_top_srcdir=$srcdir
17659     ac_abs_top_srcdir=$srcdir ;;
17660   *) # Relative name.
17661     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17662     ac_top_srcdir=$ac_top_build_prefix$srcdir
17663     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
17664 esac
17665 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
17666
17667
17668   case $ac_mode in
17669   :F)
17670   #
17671   # CONFIG_FILE
17672   #
17673
17674   case $INSTALL in
17675   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
17676   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
17677   esac
17678   ac_MKDIR_P=$MKDIR_P
17679   case $MKDIR_P in
17680   [\\/$]* | ?:[\\/]* ) ;;
17681   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17682   esac
17683 _ACEOF
17684
17685 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17686 # If the template does not know about datarootdir, expand it.
17687 # FIXME: This hack should be removed a few years after 2.60.
17688 ac_datarootdir_hack=; ac_datarootdir_seen=
17689 ac_sed_dataroot='
17690 /datarootdir/ {
17691   p
17692   q
17693 }
17694 /@datadir@/p
17695 /@docdir@/p
17696 /@infodir@/p
17697 /@localedir@/p
17698 /@mandir@/p'
17699 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
17700 *datarootdir*) ac_datarootdir_seen=yes;;
17701 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
17702   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17703 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
17704 _ACEOF
17705 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17706   ac_datarootdir_hack='
17707   s&@datadir@&$datadir&g
17708   s&@docdir@&$docdir&g
17709   s&@infodir@&$infodir&g
17710   s&@localedir@&$localedir&g
17711   s&@mandir@&$mandir&g
17712   s&\\\${datarootdir}&$datarootdir&g' ;;
17713 esac
17714 _ACEOF
17715
17716 # Neutralize VPATH when `$srcdir' = `.'.
17717 # Shell code in configure.ac might set extrasub.
17718 # FIXME: do we really want to maintain this feature?
17719 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17720 ac_sed_extra="$ac_vpsub
17721 $extrasub
17722 _ACEOF
17723 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17724 :t
17725 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17726 s|@configure_input@|$ac_sed_conf_input|;t t
17727 s&@top_builddir@&$ac_top_builddir_sub&;t t
17728 s&@top_build_prefix@&$ac_top_build_prefix&;t t
17729 s&@srcdir@&$ac_srcdir&;t t
17730 s&@abs_srcdir@&$ac_abs_srcdir&;t t
17731 s&@top_srcdir@&$ac_top_srcdir&;t t
17732 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17733 s&@builddir@&$ac_builddir&;t t
17734 s&@abs_builddir@&$ac_abs_builddir&;t t
17735 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17736 s&@INSTALL@&$ac_INSTALL&;t t
17737 s&@MKDIR_P@&$ac_MKDIR_P&;t t
17738 $ac_datarootdir_hack
17739 "
17740 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17741   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17742
17743 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
17744   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17745   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
17746       "$ac_tmp/out"`; test -z "$ac_out"; } &&
17747   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17748 which seems to be undefined.  Please make sure it is defined" >&5
17749 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17750 which seems to be undefined.  Please make sure it is defined" >&2;}
17751
17752   rm -f "$ac_tmp/stdin"
17753   case $ac_file in
17754   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17755   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
17756   esac \
17757   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17758  ;;
17759   :H)
17760   #
17761   # CONFIG_HEADER
17762   #
17763   if test x"$ac_file" != x-; then
17764     {
17765       $as_echo "/* $configure_input  */" \
17766       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17767     } >"$ac_tmp/config.h" \
17768       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17769     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
17770       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17771 $as_echo "$as_me: $ac_file is unchanged" >&6;}
17772     else
17773       rm -f "$ac_file"
17774       mv "$ac_tmp/config.h" "$ac_file" \
17775         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17776     fi
17777   else
17778     $as_echo "/* $configure_input  */" \
17779       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
17780       || as_fn_error $? "could not create -" "$LINENO" 5
17781   fi
17782  ;;
17783   :L)
17784   #
17785   # CONFIG_LINK
17786   #
17787
17788   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
17789     :
17790   else
17791     # Prefer the file from the source tree if names are identical.
17792     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
17793       ac_source=$srcdir/$ac_source
17794     fi
17795
17796     { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
17797 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
17798
17799     if test ! -r "$ac_source"; then
17800       as_fn_error $? "$ac_source: file not found" "$LINENO" 5
17801     fi
17802     rm -f "$ac_file"
17803
17804     # Try a relative symlink, then a hard link, then a copy.
17805     case $ac_source in
17806     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
17807         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
17808     esac
17809     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
17810       ln "$ac_source" "$ac_file" 2>/dev/null ||
17811       cp -p "$ac_source" "$ac_file" ||
17812       as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
17813   fi
17814  ;;
17815   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
17816 $as_echo "$as_me: executing $ac_file commands" >&6;}
17817  ;;
17818   esac
17819
17820
17821   case $ac_file$ac_mode in
17822     "check_win32_symlinks":C)
17823 # Links sometimes fail undetected on Mingw -
17824 # so here we detect it and warn the user
17825 for FILE in $CONFIG_LINKS
17826  do
17827         # test -e works for symlinks in the MinGW console
17828         test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
17829 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
17830  done
17831  ;;
17832     "src/include/pg_config.h":H)
17833 # Update timestamp for pg_config.h (see Makefile.global)
17834 echo >src/include/stamp-h
17835  ;;
17836     "src/include/pg_config_ext.h":H)
17837 # Update timestamp for pg_config_ext.h (see Makefile.global)
17838 echo >src/include/stamp-ext-h
17839  ;;
17840     "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
17841
17842   esac
17843 done # for ac_tag
17844
17845
17846 as_fn_exit 0
17847 _ACEOF
17848 ac_clean_files=$ac_clean_files_save
17849
17850 test $ac_write_fail = 0 ||
17851   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
17852
17853
17854 # configure is writing to config.log, and then calls config.status.
17855 # config.status does its own redirection, appending to config.log.
17856 # Unfortunately, on DOS this fails, as config.log is still kept open
17857 # by configure, so config.status won't be able to write to it; its
17858 # output is simply discarded.  So we exec the FD to /dev/null,
17859 # effectively closing config.log, so it can be properly (re)opened and
17860 # appended to by config.status.  When coming back to configure, we
17861 # need to make the FD available again.
17862 if test "$no_create" != yes; then
17863   ac_cs_success=:
17864   ac_config_status_args=
17865   test "$silent" = yes &&
17866     ac_config_status_args="$ac_config_status_args --quiet"
17867   exec 5>/dev/null
17868   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
17869   exec 5>>config.log
17870   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17871   # would make configure fail if this is the last instruction.
17872   $ac_cs_success || as_fn_exit 1
17873 fi
17874 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17875   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17876 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
17877 fi
17878